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