From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5DB66431E9 for ; Tue, 24 Oct 2023 07:37:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2394940262; Tue, 24 Oct 2023 07:37:19 +0200 (CEST) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) by mails.dpdk.org (Postfix) with ESMTP id B262F4021D for ; Tue, 24 Oct 2023 07:37:18 +0200 (CEST) Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-66d0169cf43so27815156d6.3 for ; Mon, 23 Oct 2023 22:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698125838; x=1698730638; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1iyQdVKtZS3UQ5HG7eOLTkZiNMSWEPndAZo+gX8e3go=; b=S5E5CSj/B+5Iwo3ky+sPiFzb1flnt4MvMYSthBGtlxoYcG0T43qd6AUaN2046rnfZ1 jL2K7+ErsfVekUZXm0/kem1ahpTGLxSmeJ607ov5FB3ZEv4mCua2p8SyLhVhg8OxiagF fDR/+8vqIRb9YDnzva7SplVO2BboN347/ucFhw3pD25MrBM5H+uUZlkxWXw9i+tTGjva CaIDq7vm7VwWDTNX3rtoogULtuy7cWN3UH75aD74fD4lF6SMbINIjrBfk3nukI5REAOP PU6RrgvGD/owAkTfEts2X+PSAbVYymKcaDv9LPZVu+V5ak98DxzGycgAkJSjjZGdYjL6 oCoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698125838; x=1698730638; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1iyQdVKtZS3UQ5HG7eOLTkZiNMSWEPndAZo+gX8e3go=; b=stmXs/gcrtR5cdFg/VS1zVf3X1H7czt+a63EA7/0OuOG8TAvTvf2VecwjVmqZ41oZe I+jFgsxrsGOi7Bx8T6YorNp17OFPx2KJ3KscLQZuDPOGww2HoxeHPgSX188nWb52GJmr n9n7/QivoGAju2rwVZ2iqq1Bkycy+RHagDouoMqYVC1i05JuOViY0kKTRF9v8P+s6q/F B74zaOdjugxr67gnnWPNmRGI7FFfkT5pdlg44tFRmxwirTm/LzSNYxgG0GJDVjnpkeHr J5LXLdk80PDS8yf3lP6KKXPcpbZrtfQfr5iigr0xeFpAy/623lAB399G6WShOjp3Lt76 Nsfw== X-Gm-Message-State: AOJu0Yw4/PdQUZH+F2f+Znp/4IzXpKng79Qz1wBau6SsD2onBlYBOsdO ZPyBC1NR3Tw94lbqLRZlPTLRHh1nmlRN8MBjh3vk1hDfLwA= X-Google-Smtp-Source: AGHT+IF56IIKR+AkqSIPnn0MeliHrTD8VydGhXtJitIFoLVqOSYwfrEW13YTgveAaMV8FcESshp6HvHI4O17yA9zKsg= X-Received: by 2002:a05:6214:2aa4:b0:66d:4d2c:b0d3 with SMTP id js4-20020a0562142aa400b0066d4d2cb0d3mr12737079qvb.4.1698125837973; Mon, 23 Oct 2023 22:37:17 -0700 (PDT) MIME-Version: 1.0 References: <20231023101934.19d96421@hermes.local> In-Reply-To: <20231023101934.19d96421@hermes.local> From: Pavel Vazharov Date: Tue, 24 Oct 2023 08:37:07 +0300 Message-ID: Subject: Re: Questions about the the pdump functionality To: Stephen Hemminger Cc: users Content-Type: multipart/alternative; boundary="0000000000005b3d3a06086fbb1b" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --0000000000005b3d3a06086fbb1b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for the info. On Mon, Oct 23, 2023 at 8:19=E2=80=AFPM Stephen Hemminger < stephen@networkplumber.org> wrote: > On Mon, 23 Oct 2023 18:32:48 +0300 > Pavel Vazharov 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 th= e > > 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 applicatio= n > > 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. > --0000000000005b3d3a06086fbb1b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for the info.

On Mon, Oct 23, 2023 at 8:19=E2= =80=AFPM Stephen Hemminger <stephen@networkplumber.org> wrote:
On Mon, 23 Oct 2023 18:32:48 +0300
Pavel Vazharov <f= reakpv@gmail.com> wrote:

> Hi there,
>
> We've a DPDK based application from which we need to take packet d= umps from
> time to time when problems arise. We are planning to use librte_pdump<= br> > 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 ther= e is
> no actual packet capturing enabled by the dpdk-dumppcap tool? I suppos= e
> 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 t= he
> 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 processin= g
> packets or these functions are supposed to be called only at applicati= on
> 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.
--0000000000005b3d3a06086fbb1b--