Multi Channel DMA Intel® FPGA IP for PCI Express Design Example User Guide
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: ygy1620008114652
Ixiasoft
Visible to Intel only — GUID: ygy1620008114652
Ixiasoft
3.5.2.4.1.3. Install and Build Testpmd
- Execute the following:
$ yum install numactl-devel
- Download dpdk and apply the build patches.
Execute the following commands with root as user.
$ cd software/dpdk/patches/v20.05-rc1
$ sh apply-patch.sh
- Enable IGB_UIO module in build configuration.
Update the following macro in ./config/common_base to “y”. By default, igb_uio is disabled.
CONFIG_RTE_EAL_IGB_UIO=y
- Enable the below macro for channels more than 16:
CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=128
- Undefine IFC_BUF_REUSE macro for Testpmd in drivers/net/mcdma/rte_pmd_mcdma.h, by default it is enabled.
#undef IFC_BUF_REUSE
- 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.
#define AVOID_TX_DROP_COUNT
- Build DPDK and install.
Execute the following steps:
- $ export DPDK_DIR= <cloned dir>/software/dpdk/patches/v20.05-rc1/dpdk
- $ export RTE_SDK=${DPDK_DIR}
- $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
- $ export RTE_TARGET=x86_64-native-linuxapp-gcc
- $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
- $ make config T=x86_64-native-linuxapp-gcc
- $ rm -rf x86_64-native-linuxapp-gcc
- $ make -j32 install T=$DPDK_TARGET DESTDIR=install
- Install the UIO base module.
$ modprobe uio
- Install the igb_uio module.
$ insmod x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko
- Bind the device to the igb_uio driver.
$ ./usertools/dpdk-devbind.py -b igb_uio <BDF>
For example:
$ ./usertools/dpdk-devbind.py -b igb_uio 01:00.0
- Run Testpmd cli.
No. of Queue | Test PMD Command Line (Loop Mode) |
---|---|
1 |
|
2 |
|
3 |
|
4 |
|
8 |
|
Forwarding Mode | Test PMD Command Line |
---|---|
Only Rx Mode |
|
Only Tx Mode |
|
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
- BDF of device. (-w 0000:01:00.0)
- Forwarding mode (--tx-first)
- Number of cores (--nb-cores=1)
- Number of RX and TX queues per port (--rxq=1 --txq=1)
- Number of descriptors in the RX and TX rings (--rxd=512 --txd=512)
- Max packet length (max-pkt-len=64)
- Display statistics every PERIOD seconds (--stats-period 1)
- Number of packets per burst (--burst=127)