DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Fuji Nafiul <nafiul.fuji@gmail.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: How to add packet capture framework to a custom simple dpdk app
Date: Mon, 10 Jul 2023 09:49:38 -0700	[thread overview]
Message-ID: <20230710094938.06b36ad8@hermes.local> (raw)
In-Reply-To: <CA+3hWexDqPDqTiCKauTNON4nveZz1YT_turicp_nATeTvr=omg@mail.gmail.com>

On Sun, 9 Jul 2023 10:36:53 +0600
Fuji Nafiul <nafiul.fuji@gmail.com> wrote:

> Hi,
> I am using dpdk_v22.11.1 on ubuntu_v22.04.2. I have a simple app derived
> from skeleton and icmpecho which can reply to proper arp requests and also
> can reply to appropriate pings. Now whats the proper steps to add a packet
> capture framework like dpdk-dumpcap here as the doc didnt clearly said it,
> rather pointed out to check the testpmd.c
> 
> I simply added pdump header files, then initialized rte_pdump_init(), then
> I tried to run dpdk-dumpcap separately that was successful after running
> testpmd app but with my custom app it  failed.to run Then I
> noticed configure_rxtx_dump_callbacks() in port initialization and tried to
> add it properly in my app but failed. I am just not sure whether I am on
> the right way or not. so please help if you have already passed this.
> thanks in advance..!

The rte_pdump_init() handles registering the service to enable packet capture.
It causes the application (primary process) to listen for when secondary wants
capture.

The capture application (dpdk-dumpcap) then makes request to the primary
process. That request causes the dump callbacks to happen. The application
should not change.

One non obvious part is that the application has to be up and running
before the capture application starts.

  reply	other threads:[~2023-07-10 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-09  4:36 Fuji Nafiul
2023-07-10 16:49 ` Stephen Hemminger [this message]
2023-07-11  1:12 ` jiangheng (G)

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=20230710094938.06b36ad8@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=nafiul.fuji@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).