DPDK usage discussions
 help / color / mirror / Atom feed
* Questions about the the pdump functionality
@ 2023-10-23 15:32 Pavel Vazharov
  2023-10-23 17:19 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Vazharov @ 2023-10-23 15:32 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]

Hi there,

We've a DPDK based application from which we need to take packet dumps from
time to time when problems arise. We are planning to use librte_pdump
functions and the dpdk-dumppcap tool.
I've few questions in related to the pdump functionality which we want to
use:
- Is calling `rte_pdump_init` at the startup of the main application
causing some overhead for the packet processing during its run if there is
no actual packet capturing enabled by the dpdk-dumppcap tool? I suppose
there should be some check in place but is it something like a single `if`
condition on a boolean flag or something heavier?
- Is it possible then to call `rte_pdump_init` during the runtime of the
main application only when I know that I'm about to start the dpdk-dumppcap
tool? I mean, is it supported and safe to call `rte_pdump_init` and
`rte_pdump_uninit` while the main application is running and processing
packets or these functions are supposed to be called only at application
startup and application stop.

Thanks in advance,
Pavel.

[-- Attachment #2: Type: text/html, Size: 1158 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Questions about the the pdump functionality
  2023-10-23 15:32 Questions about the the pdump functionality Pavel Vazharov
@ 2023-10-23 17:19 ` Stephen Hemminger
  2023-10-24  5:37   ` Pavel Vazharov
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2023-10-23 17:19 UTC (permalink / raw)
  To: Pavel Vazharov; +Cc: users

On Mon, 23 Oct 2023 18:32:48 +0300
Pavel Vazharov <freakpv@gmail.com> wrote:

> Hi there,
> 
> We've a DPDK based application from which we need to take packet dumps from
> time to time when problems arise. We are planning to use librte_pdump
> functions and the dpdk-dumppcap tool.
> I've few questions in related to the pdump functionality which we want to
> use:
> - Is calling `rte_pdump_init` at the startup of the main application
> causing some overhead for the packet processing during its run if there is
> no actual packet capturing enabled by the dpdk-dumppcap tool? I suppose
> there should be some check in place but is it something like a single `if`
> condition on a boolean flag or something heavier?
> - Is it possible then to call `rte_pdump_init` during the runtime of the
> main application only when I know that I'm about to start the dpdk-dumppcap
> tool? I mean, is it supported and safe to call `rte_pdump_init` and
> `rte_pdump_uninit` while the main application is running and processing
> packets or these functions are supposed to be called only at application
> startup and application stop.
> 
> Thanks in advance,
> Pavel.

Short answer:
The overhead only happens when the dump application is running.

Long answer:
Running rte_pdump_init() tells adds an additional service to the
multi-process (primary/secondary) communication mechanism.
Secondary and primary process connect with each other over Unix
domain socket, and the services are handled by the multi-process
thread in the primary process. Adding a service does not interact
with fast path at all.

The best way (as always) to discover this yourself is to read
the source code and follow along.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Questions about the the pdump functionality
  2023-10-23 17:19 ` Stephen Hemminger
@ 2023-10-24  5:37   ` Pavel Vazharov
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Vazharov @ 2023-10-24  5:37 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: users

[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]

Thank you for the info.

On Mon, Oct 23, 2023 at 8:19 PM Stephen Hemminger <
stephen@networkplumber.org> wrote:

> On Mon, 23 Oct 2023 18:32:48 +0300
> Pavel Vazharov <freakpv@gmail.com> wrote:
>
> > Hi there,
> >
> > We've a DPDK based application from which we need to take packet dumps
> from
> > time to time when problems arise. We are planning to use librte_pdump
> > functions and the dpdk-dumppcap tool.
> > I've few questions in related to the pdump functionality which we want to
> > use:
> > - Is calling `rte_pdump_init` at the startup of the main application
> > causing some overhead for the packet processing during its run if there
> is
> > no actual packet capturing enabled by the dpdk-dumppcap tool? I suppose
> > there should be some check in place but is it something like a single
> `if`
> > condition on a boolean flag or something heavier?
> > - Is it possible then to call `rte_pdump_init` during the runtime of the
> > main application only when I know that I'm about to start the
> dpdk-dumppcap
> > tool? I mean, is it supported and safe to call `rte_pdump_init` and
> > `rte_pdump_uninit` while the main application is running and processing
> > packets or these functions are supposed to be called only at application
> > startup and application stop.
> >
> > Thanks in advance,
> > Pavel.
>
> Short answer:
> The overhead only happens when the dump application is running.
>
> Long answer:
> Running rte_pdump_init() tells adds an additional service to the
> multi-process (primary/secondary) communication mechanism.
> Secondary and primary process connect with each other over Unix
> domain socket, and the services are handled by the multi-process
> thread in the primary process. Adding a service does not interact
> with fast path at all.
>
> The best way (as always) to discover this yourself is to read
> the source code and follow along.
>

[-- Attachment #2: Type: text/html, Size: 2416 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-24  5:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 15:32 Questions about the the pdump functionality Pavel Vazharov
2023-10-23 17:19 ` Stephen Hemminger
2023-10-24  5:37   ` Pavel Vazharov

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).