简体   繁体   中英

DPDK Switch Representation testpmd flow commands not working

My question is related to a question I asked earlier. Forward packets between SR-IOV Virtual Function (VF) NICs Basically what I want to do is use 4 SR-IOV functions of Intel 82599ES and direct traffic between VFs as I need. The setup is something like this (don't mind the X710, I use 82599ES now)

在此处输入图像描述

For the sake of simplicity at testing I'm only using one VM running warp17 to generate traffic, send it though VF1 and receive it back from VF3. Since the new dpdk versions have a switching function as described in https://doc.dpdk.org/guides-18.11/prog_guide/switch_representation.html?highlight=switch , I'm trying to use 'testpmd' to configure switching. But it seems to be test pmd doesn't work with any flow commands I enter. All I get is "Bad argument". For example it doesn't work with this command,

flow create 1 ingress pattern / end actions port_id id 3 / end

My procedure is like this,

  1. Bind my PF(82599ES) with igb_uio driver

  2. Create 4 VFs using following command,

    echo "4" | sudo tee /sys/bus/pci/devices/0000:65:00.0/max_vfs

  3. Bind 2 VFs to vfio_pci driver using,

echo "8086 10ed" | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id sudo./usertools/dpdk-devbind.py -b vfio-pci 0000:65:10.0 0000:65:10.2

  1. Use PCI passthough to bind VFs to VM and start the VM

     sudo qemu-system-x86_64 -enable-kvm -cpu host -smp 4 -hda WARP17-disk1.qcow2 -m 6144 \

    -display vnc=:0 -redir tcp:2222::22
    -net nic,model=e1000 -net user,name=mynet0
    -device pci-assign,romfile=,host=0000:65:10.0
    -device pci-assign,romfile=,host=0000:65:10.2

  2. Run testpmd with PF and 2 port representators of VFs

sudo./testpmd --lcores 1,2 -n 4 -w 65:00.0,representor=0-1 --socket-mem 1024 --socket-mem 1024--proc-type auto --file-prefix testpmd-pf -- -i --port-topology=chained

Am I doing something wrong or is this the nature of testpmd? My dpdk version is 18.11.9

please note 82599ES uses ixgbe and X710 uses i40e PMD. Both are different and have different properties. As per the documentation comparing ixgbe PMD ( http://doc.dpdk.org/guides/nics/ixgbe.html ) and i40e PMD ( http://doc.dpdk.org/guides/nics/i40e.html ) the Flow director functionality that is for the ingress packets (packets received from the external port into ASIC). The function Floating VEB is the feature that you need to use. But this is only present in X710 and not in 82599ES .

To enable VEB one needs to use -w 84:00.0,enable_floating_veb=1 in X710. But this limits your functionality that you will not able to receive and send on physical port.

the best option is to use 2 * 10Gbps , where dpdk-0 is used wrap7/pktgen/trex and dpdk-1 is used by vm-1/vm-2/vm-3 . the easiest parameter is to control DST MAC address matching to VF.

setup:

  1. create necessary vf for port-0 and port-1
  2. share the VF to relevant VM.
  3. bind dpdk vf ports to igb_uio.
  4. from traffic generator port-0 in relevant mac address of VF.

[PS] this is the information we have discussed over skype.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM