All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Laswell <laswell@infinite.io>
To: Raja Jayapal <raja.jayapal@tcs.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: capture packets on VM
Date: Fri, 15 Jul 2016 07:59:03 -0500	[thread overview]
Message-ID: <CA+GnqAoeijJdsTXLCHxNzENc+rQec8kv1oRR-bDak=ZheeLJYw@mail.gmail.com> (raw)
In-Reply-To: <OFE7FCB127.CF1C1A63-ON65257FF1.0020280D-65257FF1.00207F0D@tcs.com>

Hey Raja,

When you bind the ports to the DPDK poll mode drivers, the kernel no longer
has visibility into them.  This makes some sense intuitively - it would be
very bad for both the kernel and a user mode application to both attempt to
control the ports.  This is why tools like tcpdump and wireshark don't work
(and why the ports don't show up in ifconfig generally).

If you just want to know that packets are flowing, an easy way to do it is
simply to emit messages (via printf or the logging subsystem of your
choice) or increment counters when you receive packets.  If you want to
verify a little bit of information about the packets but don't need full
capture, you can either add some parsing information to your messages, or
build out more stats.

However, if you want to actually capture the packet contents, it's a little
trickier.  You can write your own packet-capture application, of course,
but that might be a bigger task than you're looking for.  You can also
instantiate a KNI interface and either copy or forward the packets to it
(and, from there, you can do tcpdump on the kernel side of the interface).
  I seem to recall that there's been some work done on tcpdump like
applications within DPDK, but don't remember what state those efforts are
in presently.

--
Matt Laswell
laswell@infinite.io
infinite io, inc.

On Fri, Jul 15, 2016 at 12:54 AM, Raja Jayapal <raja.jayapal@tcs.com> wrote:

> Hi All,
>
> I have installed dpdk on VM and would like to know how to capture the
> packets on dpdk ports.
> I am sending traffic from host  and want to know how to confirm whether
> the packets are flowing via dpdk ports.
> I tried with tcpdump and wireshark but could not capture the packets
> inside VM.
> setup : bridge1(Host)------- VM(Guest with DPDK) ----- bridge2(Host)
>
> Please suggest.
>
> Thanks,
> Raja
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>

  reply	other threads:[~2016-07-15 12:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15  5:54 capture packets on VM Raja Jayapal
2016-07-15 12:59 ` Matt Laswell [this message]
2016-07-15 14:02 ` Pattan, Reshma
2016-07-19 11:38 ` Raja Jayapal

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='CA+GnqAoeijJdsTXLCHxNzENc+rQec8kv1oRR-bDak=ZheeLJYw@mail.gmail.com' \
    --to=laswell@infinite.io \
    --cc=dev@dpdk.org \
    --cc=raja.jayapal@tcs.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.