[dpdk-users] Query Regarding DPDK KNI exmaple

Amit Sharma amit.sh1094 at gmail.com
Mon Aug 29 13:05:45 CEST 2016


Hi,

*Setup:-*
1. 2 VMs configured using Ubuntu 14.04
2. eth0 of both VMs connected to each other, and able to ping

*Requirement:-* *pinging between both VM using DPDK KNI example*.

*DPDK related setup:-*
1. 1st VM eth0 is bound with DPDK driver[bind=uio_pci_generic]
2. Insert the KNI module in Linux kernel[insmod rte_kni.ko].
3. Start the KNI application [*./build/kni -c 0xf0 -n 4 -- -P -p 0x3
--config="(0,4,6,8),(1,5,7,9)"*].
4. Assign the ip address to vEth0_0 [*ifconfig vEth0_0 10.0.1.4*]
5. start the tcpdump on vEth0_0
6. From 2nd VM try to ping 10.0.1.4

Issue:-
*Not able to receive ping packet from VM2 to VM1.*

*Invetigation details:*

Ping from VM2 is sending an *ARP packet first* and that's received by our
KNI sample app on VM1 and it responds with an ARP reply
But when VM2 sends an ICMP request it's not received by the KNI sample app.

while investigating we found that when we configure virtual
port(vEth0_0)(step number 4 above), an *HW address is also set*, That *isn't
same as the HW addr of NIC at port 0*
So When the kernel see the ARP request, it is responding with the HW addr
of VEth0_0, VM2 sends the ICMP request to HW addr received in ARP reply.
*ICMP packet isn't seen in at port 0* as the HW addr is different,

BTW the ARP request was received because it was broadcasted and kernel
finds one of it's interfaces has ip addr which is queried in the ARP
request, so it responds


*The question is how to map physical Port 0 withe virtual port 0? any
inputs here?*

Thanks
Amit Sharma


More information about the users mailing list