Embedded Intel® Core™ Processors
Communicate Intel® Core™ Hardware, Software, Firmware, Graphics Concerns
1204 Discussions

Problems running DPDK KNI example

VPrus
Beginner
8,463 Views

I'm new to DPDK. I'm trying to learn about KNI. I compiled and fired up the KNI example provided with the library.

  • I used the ifconfig commands to bring up the vEth interfaces that spin up corresponding to each port and assign ipaddress and netmasks to them.
  • I tried to ping and hping (tcp ping) other machines on the same network.
  • Through tcpdump, I can see that the KNI interfaces send out the right frames but don't seem to be receiving anything.
  • I don't see any errors in dmesg or the console running the KNI test script.
  • I proceeded to try and debug by printing out mbufs entries. The KNI Rx doesn't seem find anything in the ring buffer corresponding to the Eth port which is supposed to receive the data/frames. However, the ifconfig messages do show up on the buffers and are accordingly acted upon by the kernel.

It would be very helpful if someone can advise me on how to move forward with this and get this to work as it is supposed to. I have been spinning my wheels on this for a while. I have tried this on both VMs and physical machine with multiple network interfaces.

Thanks

0 Kudos
32 Replies
Gabriel_T_Intel
Employee
3,323 Views

Hello Varun,

Welcome to the Intel Embedded Community.

We are checking your case and will contact you as soon as possible.

Best regards,

Gabriel Thomas

VPrus
Beginner
3,323 Views

Thanks.. would really appreciate any help on this..

0 Kudos
CarlosAM_INTEL
Moderator
3,323 Views

Hello Varun,

Thank you for contacting the Embedded Design Community.

The information that may help you is stated in the http://dpdk.org/doc/api/rte__kni_8h.html KNI libraryhttp://dpdk.org/doc/api/rte__kni_8h.html web site or its http://dpdk.org/doc/api/rte__kni_8h_source.html source code.

Please let us know if this information is useful to you.

Best Regards,

Carlos A.

0 Kudos
VPrus
Beginner
3,323 Views

Hi Carlos,

I did look at the documentation (links you provided). From what I can say, the example script should spin up virtual ethernet interfaces that handover frames to the Kernel network stack. I'm running an unmodified version of the KNI example that is included in the dpdk repo. I see that the interfaces send out traffic just fine but don't seem to be receiving frames. Do I understand the example script wrong?

Thanks

Varun

0 Kudos
CarlosAM_INTEL
Moderator
3,323 Views

Hello Varun,

Thanks for your reply.

We would like to address the following questions to better understand your consultation:

Could you please tell us the DPDK version associated to the cited issue?

Could you please tell us all the information of the Network Interface Cards (NICs) related to this situation?

Please let us know all the requested information to help you in the best way possible.

Thanks in advance for your collaboration.

Best Regards,

Carlos A.

0 Kudos
VPrus
Beginner
3,323 Views

I'm using DPDK-2.0.

Network interface cards: Intel 82580 Gigabit Network Connection.

Does that help? Let me know if you need any more specific information.

Thanks

0 Kudos
CarlosAM_INTEL
Moderator
3,323 Views

Hello Varun,

Thanks for your reply.

Could you please confirm that the DPDK related to this situation is the stated at the following web site?

http://dpdk.org/browse/dpdk/tree/drivers/net/e1000/ dpdk - Data Plane Development Kit

Thanks again for your collaboration.

Best Regards,

Carlos A.

0 Kudos
CarlosAM_INTEL
Moderator
3,323 Views

Hello Varun,

Thanks for your reply.

Actually the web site that you have mentioned is different that the one stated on our previous message, which is the following:

http://dpdk.org/browse/dpdk/tree/drivers/net/e1000/ http://dpdk.org/browse/dpdk/tree/drivers/net/e1000/

Could you please try this and let us know if the problem persists?

Thanks again for your cooperation.

Best Regards,

Carlos A.

0 Kudos
VPrus
Beginner
3,323 Views

Oh ok.. didn't know that.. will try this out and let you know..

0 Kudos
VPrus
Beginner
3,323 Views

I can just clone it from here right?

git://dpdk.org/dpdk

0 Kudos
VPrus
Beginner
3,323 Views

I just tried out the branch you pointed me at. seems like I still have the same issue.

0 Kudos
Muthurajan_J_Intel
3,323 Views

Thanks Carlos Thanks Varun

Our design engineer asked to check on the following please:

You might have already done some of these.

Kindly can we request you to let us know your input for these questions.

In case if you need some more clarifications in the following questions, please do not hesitate to let us know.

Thank you so much Carlos.

  • What KNI mode is used? lo_mode_none, lo_mode_fifo, lo_mode_fifo_skb modes are used for performance analysis so should not be used for this case. Only normal mode works.
  • For the test you performed from vEth to remote server, have you tried to add kernel debug information in kni_net_tx() to see whether it is invoked by TCP/IP stack?
  • Can you ping from another server to the IP of KNI vEth? When KNI works in normal mode, "netif_rx(skb);" in kni_net_rx_normal() should be invoked to push DPDK received packets to TCP/IP stack routed to KNI vEth.
  • Can you send the scripts as well as network topology for us to diagnose?

0 Kudos
VPrus
Beginner
3,323 Views
  • I'm running KNI in normal mode. When I insmod the module, I do not pass any arguments. Also the code I'm trying to run is the KNI example script provided with DPDK. As far as I know the code, it doesn't do anything fancy with the mode.
  • Yes I have. Trying to reach remote server from vEth, the kernel TCP/IP stack is invoked and the traffic is seen at the remote server. The remote server responds, which seems to be lost. I tried debugging the methods which poll the interface buffer for new frames, and seems like they never find anything new in the ring buffer.
  • No, I can't ping from a remote server to the vEth interface. I can see the remote server send the frames out, but that seems to be never received by the vEth interface. I put debug instructions in the code where it polls the ring buffer at the physical interface for new received frames. From what I can see there is never anything new there, except when I issue PMD commands through ifconfig.
  • I'm using the short and simple KNI example script provided in the DPDK repo. This one: http://dpdk.org/browse/dpdk/tree/examples/kni dpdk - Data Plane Development Kit. The network topology is pretty simple. I have an interface on my machine controlled by DPDK KNI, that interface is physically connected by wire to another linux machine. I'm trying to ping one interface from the other. I know the network setup should work because when I pull out the interface from DPDK control and hand it over to the kernel, I can ping it just fine.

Hope that answered your questions. Let me know if you need more information.

Thanks a lot for helping me with this.

Varun

0 Kudos
CarlosAM_INTEL
Moderator
3,323 Views

Hello Varun,

 

 

Thanks for your reply.

It seems that the promiscuous mode is off, then the NIC drops packet, make sure the "-P" flag is set when starting kni application.

kni [EAL options] -- -P -p PORTMASK --config="(port,lcore_rx,lcore_tx[,lcore_kthread,...])"

In case that the issue persists, please check is if iommu=pt kernel parameter is used when using igb_uio. Please refer to the information stated in section 5.6, on page 19 of the http://www.intel.com/content/dam/www/public/us/en/documents/guides/dpdk-getting-started-guide.pdf DPDK Getting Started Guide for Linux Release 2.0.0.

Please let us know if this information is useful to you.

Best Regards,

 

Carlos A.
0 Kudos
VPrus
Beginner
3,323 Views

I have already tried all 3 of those. However just to make sure I will try again with the new repo that you provided me. And keep you updated.

Thanks

0 Kudos
VPrus
Beginner
3,323 Views

I went over all the suggestions again and it didn't work work me.

any other suggestions?

0 Kudos
CarlosAM_INTEL
Moderator
3,323 Views

Hello Varun,

Thanks for your reply.

Could you please run testpmd (one in tx_only mode) on two servers to see whether it works or not? Please give us a detailed description of the results.

Thanks again for your collaboration to solve this inconvenience.

Best Regards,

Carlos A.

0 Kudos
VPrus
Beginner
3,323 Views

I'm not sure how to do that. Can you give me a little more detailed instructions? This is the first time I'm doing anything with DPDK.

I ran "sudo ./testpmd -c 3 -n 2" and got the following result:

(NOTE: I have 4 interfaces controlled by DPDK, but only one is connecting out to my other box, that is the one you can see is live)

EAL: Requesting 2048 pages of size 2MB from socket 0

EAL: TSC frequency is ~3292523 KHz

EAL: Master lcore 0 is ready (tid=11324900;cpuset=[0])

EAL: lcore 1 is ready (tid=a7e7700;cpuset=[1])

EAL: PCI device 0000:03:00.0 on NUMA socket -1

EAL: probe driver: 8086:150e rte_igb_pmd

EAL: PCI memory mapped at 0x7fc911271000

EAL: PCI memory mapped at 0x7fc91126d000

PMD: eth_igb_dev_init(): port_id 0 vendorID=0x8086 deviceID=0x150e

EAL: PCI device 0000:03:00.1 on NUMA socket -1

EAL: probe driver: 8086:150e rte_igb_pmd

EAL: PCI memory mapped at 0x7fc9111ed000

EAL: PCI memory mapped at 0x7fc9111e9000

PMD: eth_igb_dev_init(): port_id 1 vendorID=0x8086 deviceID=0x150e

EAL: PCI device 0000:03:00.2 on NUMA socket -1

EAL: probe driver: 8086:150e rte_igb_pmd

EAL: PCI memory mapped at 0x7fc911169000

EAL: PCI memory mapped at 0x7fc911165000

PMD: eth_igb_dev_init(): port_id 2 vendorID=0x8086 deviceID=0x150e

EAL: PCI device 0000:03:00.3 on NUMA socket -1

EAL: probe driver: 8086:150e rte_igb_pmd

EAL: PCI memory mapped at 0x7fc8b3b80000

EAL: PCI memory mapped at 0x7fc911161000

PMD: eth_igb_dev_init(): port_id 3 vendorID=0x8086 deviceID=0x150e

Configuring Port 0 (socket 0)

PMD: eth_igb_tx_queue_setup(): To improve 1G driver performance, consider setting the TX WTHRESH value to 4, 8, or 16.

PMD: eth_igb_tx_queue_setup(): sw_ring=0x7fc813ded9c0 hw_ring=0x7fc813defa00 dma_addr=0x21b1efa00

PMD: eth_igb_rx_queue_setup(): sw_ring=0x7fc813ddd440 hw_ring=0x7fc813ddd880 dma_addr=0x21b1dd880

PMD: eth_igb_start(): <<

Port 0: 90:E2:BA:0D:EE:5C

Configuring Port 1 (socket 0)

PMD: eth_igb_tx_queue_setup(): To improve 1G driver performance, consider setting the TX WTHRESH value to 4, 8, or 16.

PMD: eth_igb_tx_queue_setup(): sw_ring=0x7fc813dcb1c0 hw_ring=0x7fc813dcd200 dma_addr=0x21b1cd200

PMD: eth_igb_rx_queue_setup(): sw_ring=0x7fc813dbac40 hw_ring=0x7fc813dbb080 dma_addr=0x21b1bb080

PMD: eth_igb_start(): <<

Port 1: 90:E2:BA:0D:EE:5D

Configuring Port 2 (socket 0)

PMD: eth_igb_tx_queue_setup(): To improve 1G driver performance, consider setting the TX WTHRESH value to 4, 8, or 16.

PMD: eth_igb_tx_queue_setup(): sw_ring=0x7fc813da89c0 hw_ring=0x7fc813daaa00 dma_addr=0x21b1aaa00

PMD: eth_igb_rx_queue_setup(): sw_ring=0x7fc813d98440 hw_ring=0x7fc813d98880 dma_addr=0x21b198880

PMD: eth_igb_start(): <<

Port 2: 90:E2:BA:0D:EE:5E

Configuring Port 3 (socket 0)

PMD: eth_igb_tx_queue_setup(): To improve 1G driver performance, consider setting the TX WTHRESH value to 4, 8, or 16.

PMD: eth_igb_tx_queue_setup(): sw_ring=0x7fc813d861c0 hw_ring=0x7fc813d88200 dma_addr=0x21b188200

PMD: eth_igb_rx_queue_setup(): sw_ring=0x7fc813d75c40 hw_ring=0x7fc813d76080 dma_addr=0x21b176080

PMD: eth_igb_start(): <<

Port 3: 90:E2:BA:0D:EE:5F

Checking link statuses...

Port 0 Link Up - speed 1000 Mbps - full-duplex

Port 1 Link Down

Port 2 Link Down

Port 3 Link Down

Done

No commandline core given, start packet forwarding

io packet forwarding - CRC stripping disabled - packets/burst=32

nb forwarding cores=1 - nb forwarding ports=4

RX queues=1 - RX desc=128 - RX free threshold=32

RX threshold registers: pthresh=8 hthresh=8 wthresh=0

TX queues=1 - TX desc=512 - TX free threshold=0

TX threshold registers: pthresh=32 hthresh=0 wthresh=0

TX RS bit threshold=0 - TXQ flags=0x0

Press enter to exit

0 Kudos
CarlosAM_INTEL
Moderator
3,072 Views

Hello Varun,

 

 

Could you please tell us what is the DPDK version and Operating System (OS) related to your last communication?

 

 

Thanks again for your cooperation to solve this inconvenience.

 

 

Best Regards,

 

Carlos A.

 

 

Engineer is under contract to Intel.
0 Kudos
Reply