Multi Channel DMA for PCI Express* Intel® FPGA IP Design Example User Guide

ID 683517
Date 2/06/2022

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents Install and Build Testpmd

If testing the MCDMA by using test-pmd, use the following steps; otherwise, if using perfq_app, skip to Install PMD and Test Application:
  1. Execute the following:
    $ yum install numactl-devel
  2. Download dpdk and apply the build patches.

    Execute the following commands with root as user.

    $ cd software/dpdk/patches/v20.05-rc1

    $ sh

  3. Enable IGB_UIO module in build configuration.
    Update the following macro in ./config/common_base to “y”. By default, igb_uio is disabled.
  4. Enable the below macro for channels more than 16:
  5. Undefine IFC_BUF_REUSE macro for Testpmd in drivers/net/mcdma/rte_pmd_mcdma.h, by default it is enabled.
    #undef IFC_BUF_REUSE
  6. In case to avoid Tx drop count, enable the following macro in the file: drivers/net/mcdma/rte_pmd_mcdma.h.
    This is applicable for pkt-gen only. Skip this step for loopback.
  7. Build DPDK and install.
    Execute the following steps:
    1. $ export DPDK_DIR= <cloned dir>/software/dpdk/patches/v20.05-rc1/dpdk
    2. $ export RTE_SDK=${DPDK_DIR}
    3. $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
    4. $ export RTE_TARGET=x86_64-native-linuxapp-gcc
    6. $ make config T=x86_64-native-linuxapp-gcc
    7. $ rm -rf x86_64-native-linuxapp-gcc
    8. $ make -j 32 install T=$DPDK_TARGET DESTDIR=install
  8. Install the UIO base module.

    $ modprobe uio

  9. Install the igb_uio module.

    $ insmod x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko

  10. Bind the device to the igb_uio driver.

    $ ./usertools/ -b igb_uio <BDF>

    For example:

    $ ./usertools/ -b igb_uio 01:00.0

  11. Run Testpmd cli.
No. of Queue Test PMD Command Line (Loop Mode)
./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 -w 0000:01:00.0 -- --tx-first\
 --nb-cores=1 --rxq=1 --txq=1 --rxd=512 --txd=512--max-pkt-len=<payload len> --no-flush-rx\
 --stats-period 1 --burst=127 --txpkts=<payload len>
./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 -w 0000:01:00.0 -- --tx-first\
 --nb-cores=2 --rxq=2 --txq=2 --rxd=512 --txd=512 --max-pkt-len=<payload len> --no-flush-rx\
 --stats-period 1 –burst=254 --txpkts=<payload len>
./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 -w 0000:01:00.0 -- --tx-first\
 --nb-cores=3 --rxq=3 --txq=3 --rxd=512 --txd=512 --max-pkt-len=64 --no-flush-rx\
 --stats-period 1 --burst=508 --txpkts=<payload len>
./x86_64-native-linuxapp-gcc/app/testpmd -c ff -n 4 -w 0000:01:00.0 -- --tx-first\
 --nb-cores=4 --rxq=4 --txq=4 --rxd=512 --txd=512 --max-pkt-len=64 --no-flush-rx\
 --stats-period 1 --burst=127 --txpkts=<payload len>
./x86_64-native-linuxapp-gcc/app/testpmd -c fff -n 4 -w 0000:01:00.0 -- --tx-first\
 --nb-cores=8 --rxq=8 --txq=8 --rxd=512 --txd=512 --max-pkt-len=<payload len> --no-flush-rx\
 --stats-period 1 --burst=127 --txpkts=<payload len>
Forwarding Mode Test PMD Command Line
Only Rx Mode
./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 -w 0000:01:00.0 --\
 --forward-mode=rxonly --nb-cores=1 --rxq=1 --txq=1 --rxd=512 --txd=512 --max-pkt-len=<payload len>\
 --no-flush-rx --stats-period 1 --burst=127 --txpkts=<payload len>
Only Tx Mode
./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 -w 0000:01:00.0 --\
 --forward-mode=txonly --nb-cores=1 --rxq=1 --txq=1 --rxd=512 --txd=512 --max-pkt-len=<payload len>\
 --no-flush-rx --stats-period 1 --burst=254 --txpkts=<payload len>
Note: --burst=0 : If set to 0, driver default is used (i.e. 16 burst-size). Otherwise, the Test PMD default burst size (i.e. 32) is used. The default Testpmd pkt-len, in the case of Tx, is 64.

Use the following command to run test-pmd:

$./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 -w
0000:01:00.0 -- --tx-first --nb-cores=1 --rxq=1 --txq=1 --rxd=512
--txd=512 --max-pkt-len=64 --no-flush-rx --stats-period 1 --
burst=127 --txpkts=64
Parameters used:
  1. BDF of device. (-w 0000:01:00.0)
  2. Forwarding mode (--tx-first)
  3. Number of cores (--nb-cores=1)
  4. Number of RX and TX queues per port (--rxq=1 --txq=1)
  5. Number of descriptors in the RX and TX rings (--rxd=512 --txd=512)
  6. Max packet length (max-pkt-len=64)
  7. Display statistics every PERIOD seconds (--stats-period 1)
  8. Number of packets per burst (--burst=127)
Note: This hardware test was run with the Intel® Stratix® 10 GX H-tile PCIe Gen3 x16 configuration.

Did you find the information on this page useful?

Characters remaining:

Feedback Message