Intel® Acceleration Stack User Guide: Intel FPGA Programmable Acceleration Card N3000

Download
ID 683040
Date 6/14/2021
Public
Document Table of Contents

9.2. Test Using a Packet Generator

This test can be performed on 2x2x25G and 8x10G configuration.
  1. Hardware Setup: Connect loopback cable between the two QSFP ports.
    Figure 21. Test Diagram
  2. Download pktgen-3.7.1.zip into $RTE_SDK directory. Extract and build Pktgen. Run the following steps as root user:
    $	cd $RTE_SDK
    $	unzip pktgen-3.7.1.zip
    $	cd pktgen-3.7.1
    Note: If you are using RHEL OS, follow the additional setup instruction Setup Prerequisites on Red Hat-based Systems documented in INSTALL.md file.
    $	export RTE_SDK=<DPDK Source PATH> 
    $	export RTE_TARGET=x86_64-native-linuxapp-gcc
    $	export C_INCLUDE_PATH=/usr/local/src/lua-5.3.5/src
    Note: Pktgen relies on all the three-environment variable defined above.
    $	sudo -E make
  3. Start a new terminal window. Use this new terminal window for running the DPDK testpmd application. Two ports from Intel XL710 #2 are assigned to testpmd. Port topology is set to paired. Thus, the forwarding is between pairs of ports. For example: (0,1); meaning anything received on port 0 will be forwarded to port 1.
    Note: Replace XL710 B:D.F and FPGA B:D.F with values specific to your system.
    $	cd $RTE_SDK
    $	sudo  ./x86_64-native-linuxapp-gcc/app/testpmd -l 1,3 -n 4 -w  \
    0000:14:00.0,switch_mode=IPN3KE_0@15:00.0_0 -w \
    0000:14:00.1,switch_mode=IPN3KE_0@15:00.0_1 -w \
    0000:15:00.0 --vdev 'ifpga_rawdev_cfg0,ifpga=15:00.0,port=0'  \
    -- -i --no-numa --port-topology=paired
    testpmd>	start      

    Now start traffic on pktgen (step 4).

    Run the following command after starting pktgen (step 4):

    testpmd>	show port stats all
    Sample output:
    You should see 10000 pkts received on port 0 and then transmitted from port 1 of XL7102. The “--port-topology=paired” causes forwarding between pairs of ports (0,1) ie Traffic received on 0000:14:00.0 is forwarded to 0000:14:00.1 and then transmitted.  
    
    ######## NIC statistics for port 0 ########
      RX-packets: 10000      RX-missed: 0          RX-bytes:  10200000
      RX-errors: 0
      RX-nombuf:  0         
      TX-packets: 0          TX-errors: 0          TX-bytes:  0
      Throughput (since last show)
      Rx-pps:          496
      Tx-pps:            0
    ###########################################
    ##########	NIC statistics for port 1 ###########
      RX-packets: 0          RX-missed: 0          RX-bytes:  0
      RX-errors: 0
      RX-nombuf:  0         
      TX-packets: 10000      TX-errors: 0          TX-bytes:  10200000
      Throughput (since last show)
      Rx-pps:            0
      Tx-pps:          496
    ############################################
  4. Start pktgen on terminal 1. Two ports from XL710 1 are assigned to pktgen. To understand the arguments, refer to the EAL Commandline Options.
    Note: Replace XL710 B:D.F with values specific to your system.
    Refer to Troubleshooting in DPDK in case of an error.
    $	cd $RTE_SDK/pktgen_3.7.1
    $	sudo ./app/x86_64-native-linuxapp-gcc/pktgen -l 0,2,4 -n 4 \
    --proc-type primary --log-level 7 --file-prefix pg -w 0000:16:00.0 \
    -w 0000:16:00.1 -- -T -P -m 2.0 -m 4.1 -f themes/black-yellow.theme

    Configure the pkt size and pkt count:

    $	set all size 1024 
    $	set all count 10000
    $	start 0

    Sample output: You should see 10000 pkt transmitted from port 0 and received on port 1 of XL7101.

    Figure 22. Sample Output
    Note: Link status in pktgen tool may show down, this can be ignored.
Refer to the Testpmd Application User Guide to understand the Environment Abstraction Layer arguments to testpmd.
Table 13.  Specific Arguments
Arguments Description Capability Enabled
-w <"FPGA BDF"> --vdev 'ifpga_rawdev_cfg0,ifpga=<"FPGA BDF">,port=0’ The AFU name format is FPGA BDF|Port. Each FPGA can be divided into four blocks at most. Port identifies which FPGA block the AFU bitstream belongs to, but currently only Port 0 (Ethernet) is supported. This triggers rawdev PMD driver to hotplug AFU to the IFPGA BUS.
-w <XL710 port BDF> Whitelists the Intel XL710 NIC PF.  

Did you find the information on this page useful?

Characters remaining:

Feedback Message