[dpdk-users] Query Regarding DPDK KNI exmaple

Andriy Berestovskyy aber at semihalf.com
Mon Aug 29 15:39:07 CEST 2016

Hi Amit,
The simplest solution would be to set the same HW address on vEth*
interfaces as you had on eth* ones. You can use ifconfig or ip tool
for that, i.e.:

ip link set vEth0_0 address <MAC of your eth0>

Also you might want to add this to your /etc/network/interfaces file
(or similar) to make it permanent.


On Mon, Aug 29, 2016 at 1:05 PM, Amit Sharma <amit.sh1094 at gmail.com> wrote:
> 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*]
> 5. start the tcpdump on vEth0_0
> 6. From 2nd VM try to ping
> 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

Andriy Berestovskyy

More information about the users mailing list