skip to Main Content

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 !!

2

Answers


  1. Chosen as BEST ANSWER

    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.


  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search