1
votes

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)

enter image description here

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

1
hi @Anuradha, as I understand you created 4 VF and passed 2 Vf into VM. Inside VM you are running testpmd with one VF only -w 65:00.0. this ingress and egress traffic out. But please tell me is your expectation the PF driver will FWD or ASIC 82599ES will switch packet? - Vipin Varghese
I am comfortable to be available in skype, google meeting to understand and help you out. - Vipin Varghese
hi @VipinVarghese I'm actually running testpmd on my host machine and use port representators hopefully to control VF ports. I'm expecting my VFs to ingress and egress traffic. My expectation is making PF driver with dpdk to forward traffic between VFs. I have though about using openVswitch with dpdk, but I thought I could manage with testpmd without going through much work. I really appreciate your help given in last time and also offering me to help with skype. - Anuradha
I'm currently out of office so I won't be able to use skype. I will use skype as a last option if I couldn't find any solution. Again, thank you very much for your help! I really appreciate it! - Anuradha
for VM to VM there are conditions in how ASIC will forward traffic (82599-datasheet-v3-4.pdf). for high level overview doc.dpdk.org/guides-1.8/rel_notes/supported_features.html and doc.dpdk.org/guides/prog_guide/…. So simple thumb rule, if you want vm1 TX to go to vm2 RX can you please try setting with MAC address of vm2? - Vipin Varghese

1 Answers

1
votes

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.

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