DPDK usage discussions
 help / color / mirror / Atom feed
From: "Pavey, Nicholas" <npavey@akamai.com>
To: SAKTHIVEL ANAND S <anand.sa88@gmail.com>,
	Andriy Berestovskyy <aber@semihalf.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] Unable to see incoming packets with example KNI application
Date: Wed, 11 May 2016 14:31:41 +0000	[thread overview]
Message-ID: <A384556D-FBBF-457D-9C13-53CBB4188E97@akamai.com> (raw)
In-Reply-To: <CAOP5GAzan11K7MXgGGKJh0vsDKuA4NdDzHHC7LOrAH7GgUBHzw@mail.gmail.com>

Hi Sakthivel, Andriy,

Thanks for the email.

I’m still having trouble, although things do seem to be working better than before.

It seems that the MAC address suggestion and also the IPs on the same class B network aren’t the root cause.


Current symptoms
================

I rebooted my machine, and took a note of the MAC addresses as the machine started up. It turns out that the KNI virtual interfaces actually did initialize with the correct MAC addresses.

I also reconfigured the virtual interfaces to be using different network classes, so that should no longer be a problem.

Something has improved because I’m able to see traffic on the KNI virtual interface with tcpdump, which I was not able to do previously.

Unfortunately, even though tcpdump is able to see the traffic correctly, it seems that the networking stack isn’t working as I would expect.



Outbound
========

Ping
----

I can see outbound ‘pings’ (with initial ARP requests) with ‘tcpdump', and I can see a response coming back. However, the ‘ping’ application reports 100% packet loss.

The ARP traffic is definitely getting out, because I see the IP address registered in the router’s ARP cache. Likewise, I see a response to the original ‘ping’ packet, so the outbound direction seems to be working.


Inbound
=======

The problems seem to be on the inbound side. As we saw above, the outbound side appears to be working reasonably, but I don’t appear to be able to capture inbound packets.

TCP
---

For example, if I set up a simple ‘netcat’ listener (using TCP for transport) on the target server:

  nc –l 172.25.48.200 9876

And then attempt to connect to it from another machine, as follows:

  nc 172.25.48.200 9876


‘tcpdump’ on the target server will show me the incoming ‘syn’ and a ‘syn’ retransmission, but there are no outbound ‘ack’ packets. 


UDP
---

Similarly, inbound UDP traffic never appears to be routed to the user space application.

I can counters incrementing on the virtual interface with ‘sar –n DEV 1 100’. ‘tcpdump’ also shows me the incoming data.

However, if I look at the UDP stats with ‘sar –n UDP 1 100’, I’m not seeing any packets arriving, even with ‘no port’ or ‘idgmerr’, which I’d normally expect if there’s no listening application bound to the IP address.


Next steps
==========

It almost seems as if the receive side of the network stack simply isn’t seeing the inbound data (regardless of whether it’s ICMP, TCP or UDP) and therefore isn’t sending responses.


The thing I’m confused about here is how ‘tcpdump’ is able to see the traffic - after all, if it’s able to see the inbound traffic, then a good part of the RX side of the stack must be working. I’d have thought that if ‘tcpdump’ can see the traffic, then the rest of the stack should be working too.

It makes me wondering whether perhaps I’m misunderstanding the purpose of the KNI system?

My interpretation is that it’s supposed to route traffic from the DPDK into the regular Linux network stack, where it can be used as if it were regular traffic. Do I have that right?



Do you have any ideas? 

Thanks,


Nick


From:  SAKTHIVEL ANAND S <anand.sa88@gmail.com>
Date:  Wednesday, May 11, 2016 at 3:30 AM
To:  "Pavey, Nicholas" <npavey@akamai.com>
Subject:  Re: [dpdk-users] Unable to see incoming packets with example KNI application


Hi

When you try to send echo packets(outbound), your PC will try to resolve ARP, which it could not complete properly .. due to random mac generation for KNI interface(your KNI interface having different MAC than actual interface).


After starting KNI app write your hardware address on KNI by doing, "ifconfig <vETHname> hw ether <real HW address>" and try ping. Let me know the results.


use  "tcpdump -n -i vEth** -e | grep <filter>" 

Regards

Sakthivel S OM



  parent reply	other threads:[~2016-05-11 14:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 17:58 Pavey, Nicholas
2016-05-11 13:44 ` Andriy Berestovskyy
     [not found] ` <CAOP5GAzan11K7MXgGGKJh0vsDKuA4NdDzHHC7LOrAH7GgUBHzw@mail.gmail.com>
2016-05-11 14:31   ` Pavey, Nicholas [this message]
     [not found]     ` <3B4F586F-A21F-4EDB-84FB-A5CAB253C476@tencara.com>
2016-05-11 15:00       ` Pavey, Nicholas
2016-05-11 15:32         ` Andriy Berestovskyy
2016-05-11 15:37     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A384556D-FBBF-457D-9C13-53CBB4188E97@akamai.com \
    --to=npavey@akamai.com \
    --cc=aber@semihalf.com \
    --cc=anand.sa88@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).