0

We are capturing Multicast UDP streams using DPDK and need help with capturing the multicast packets coming on a VLAN trunk port. The pNIC(Intel x710) on our Linux server is connected to a trunk port on the switch and is thus receiving packets from 2 VLANs. Our Linux server has CentOS installed on the bare metal (no hypervisor is being used).

In normal case of non-VLAN traffic, we bind the physical NIC with DPDK and create a KNI port(with a well defined IP) for it (KNI is required for making mutlicast join request and without KNI port we are not able to make join requests).

enter image description here

For VLAN traffic, the physical port of our server is connected to a trunk port on the switch. On the Linux server, we have configured two VLAN interfaces pNIC.10 and pNIC.20 receiving packets from VLAN 10 and 20 respectively (referred https://www.linuxtechi.com/vlan-tagged-nic-ethernet-card-centos-rhel-servers/). In this case, we still need to bind the physical port with DPDK as binding happens for a PCI device id (the VLAN IFs do not have a PCI id). However, we are not able to figure out what and how many KNI ports to create. Have tried creating two KNI ports - one per VLAN ID and this did not work for us. The KNI ports could not be enabled in this case.

Any help will be greatly appreciated !!

Vipin Varghese
  • 4,540
  • 2
  • 9
  • 25
  • can you please update the following information, dpdk version, NIC model, firmware, DPDK application setting s for RX vlan, mutlicast IP accept, sample program if any? Also please describe the actual problem – Vipin Varghese May 04 '21 at 16:50
  • is the requirement to redirect vlan tag-1 to Kernel interface-1 and vlan tag-2 to Kernel interface-2? – Vipin Varghese May 04 '21 at 16:51
  • @VipinVarghese we are using DPDK version 18 with Intel x710 DA-4 NIC. I have added a diagram to the original post to make things clear. The problem we are facing is that we are unable to capture multicast packets over a VLAN tagged port that has data coming from multiple VLANs. Needless to say, the two VLANs have different subnets. We want to capture multicast data coming from both 172.16.1.x and 172.16.2.x using a single physical port on our Intel x710 NIC. – Ramandeep Sandhu May 05 '21 at 05:41
  • Is the following statements true? DPDK port you are using PF port, and there is VF ports. There is no MAC-VLAN enabled in either linux or DPDK for flow filtering. DPDK is enabled in promiscuous and all multicast receive? Vlan tag remove is disabled in dpdk? allow all vlan is enabled in dev_Configure? – Vipin Varghese May 05 '21 at 06:52
  • DPDK is being used with PF port. There are no VF ports. There is no MAC-VLAN enabled in either linux or DPDK for flow filtering - Yes DPDK is enabled in promiscuous - Yes all multicast receive - Yes, but only when Join request is sent since IGMP is enabled Vlan tag remove is disabled in dpdk - Yes. I guess you are referring to VLAN strip. We do set local_port_conf.rxmode.hw_vlan_filter = 1 though allow all vlan is enabled in dev_Configure - Not sure what property does this refer to. Can you share the exact name please. – Ramandeep Sandhu May 05 '21 at 07:25
  • can you enable `rte_pdump_init` in priamry and run secondary `dpdk-pdump`. Reason theoretically if there only 1 PF with the above settings one should get all packets. Also please run `dpdk-procinfo -- -xstats | grep -v ": 0"` – Vipin Varghese May 05 '21 at 07:46
  • @VipinVarghese the issue here is that we are unable to send a multicast join request because there is no KNI port via which we can send the request. Since we are using an IGMP enabled switch, the multicast streams are only available when joined. Similarily, we cannot even capture a unicast stream because a valid destination port IP is missing. Any idea, how to configure the KNI ports in this case? – Ramandeep Sandhu May 06 '21 at 07:11
  • thanks for the update I bit confused since earlier conversation the NIC (physical NIC) was mentioned not receiving vlan packets. I have tested with pktgen (vlan) and skeleton it is working. Maybe a live debug will be helpful. I can make myself available (I work out of IST timezone) – Vipin Varghese May 06 '21 at 08:08
  • are available for online debug? – Vipin Varghese May 06 '21 at 10:22
  • have been waiting for your update for live debug. So far no updates. I am able to reproduce the scenario by using DPDK example `skeleton` with Physcial NIC x710 and TAP interface. On the kernel interface (TAP DPDK PMD) I used `vconfig add dtap0 10 and vconfig add dtap0 20`. I believe same can be done with KNI as KNI PMD creates netdev too. – Vipin Varghese May 08 '21 at 06:31
  • @VipinVarghese sorry for not being able to respond back. We have been able to make some progress by adding a single KNI on top of the pNIC and then by adding VLAN IP links for this KNI. Seems to be working in the initial tests. Will post the solution once we are done. – Ramandeep Sandhu May 11 '21 at 06:42
  • as shared in my test bed I am not able to reproduce the issue as you mention. Hence requested for debug – Vipin Varghese May 11 '21 at 06:50

2 Answers2

0

Based on the standard default settings for DPDK Physical NIC (example l2fwd/skeleton/l3fwd/testpmd), DPDK physical NIC can receive VLAN tagged packets. To confirm the same one can

  1. edit the code to parse for ETHER-VLAN header
  2. Enable rte_pdump_init in primary and use dpdk-pdump as secondary to capture the packets.

In order to send VLAN packets to Kernel, one should tie either KNI or TAP interface with DPODK as the virtual interface to send packets to KNI/TAP. Following are the steps to enable VLAN packets to be received and send to Kernel Through DPDK.

  1. Choose DPDK-21.02 example skeleton
  2. compile the application with TAP and NIC PMD
  3. start the application ./applciation-binary -l 2 --vdev=net_tap0 -a [PCIe B:D:F]
  4. Bring up interface on Linux terminal ifconfig dtap0 promisc up
  5. add VALN-10 Interface vconfig add dtap0 10
  6. add VLAN-20 Interface vconfig add dtap0 20

Note: bring up VLAN interface and run TCPDUMP.

[EDIT based on comment conversation] @RamandeepSandhu will share steps for KNI soon.

Vipin Varghese
  • 4,540
  • 2
  • 9
  • 25
0

We have been able to solve the problem at hand by following the steps below:

  • The physical NIC port(p1p1) is binded to DPDK.
  • A KNI port with name p1p1 is created on top of the physical NIC port. No IP address is assigned to this KNI port.
  • VLAN Interfaces are added with p1p1 as the master using
    • "ip link add link p1p1 name p1p1.10 type vlan id 10"
    • "ip link add link p1p1 name p1p1.20 type vlan id 20"
  • Up the VLAN IFs
    • "ip link set dev p1p1.10 up"
    • "ip link set dev p1p1.20 up"
  • Appropriate IPs are assigned to p1p1.10 and p1p1.20

Post this, we are able to send Multicast Join request and receive the streams on the DPDK binded port.

  • thanks for posting the answer from your end. From your answer 2 observations 1) there were no issues in DPDK in receiving and transmitting vlan packets and 2) instead of `vconfig ` you used `ip link add` with ` type vlan`. Hence the fundamental issue `VLAN interface were not enabled in kernel`. – Vipin Varghese May 26 '21 at 09:24
  • in my opinion it will be much useful if you can add your answer to the original answer as it revolves around `enabling VLAN in kernel` – Vipin Varghese May 26 '21 at 09:25