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 69DAAA00C3 for ; Mon, 28 Nov 2022 15:10:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DFBE64067E; Mon, 28 Nov 2022 15:10:52 +0100 (CET) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) by mails.dpdk.org (Postfix) with ESMTP id 2C48B40150 for ; Mon, 28 Nov 2022 15:10:52 +0100 (CET) Received: by mail-vs1-f52.google.com with SMTP id m4so10652581vsc.6 for ; Mon, 28 Nov 2022 06:10:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KbxjfOg+y5DUhqAf+epEvZvEkClXVs+MRAU4T13p1iA=; b=L+eaiox4LIQNfZ9JHO9gkRX9nim7lQExkN/u1BWKWqZUrg0baCo+U21bsl33hheArL NLKIfNWd4YI8w0t2S2k4D/o5dV9RuNZkrPqKCx11EU+2S4Z779mJW1fAAt/OcZtfkjOG pb03nW7J3i82UuO+3k1WVHKMWI9vpGDkOo6Esan+UgLv+DSKAYRRFXYZXobN1YcF7EHt 1UyZNUnjHPKTRZuyDA5NMG05OBd02hGj25vhu+cITbWZLUIRM4bKt7I5LPpvRS1S7nm+ 3fdOfcSp2fOdwW6eIswrCWW0w/Zwb1kgVSJ2BWDJfza6v/o8cAGc5jg9NR20R5cathNt UNHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=KbxjfOg+y5DUhqAf+epEvZvEkClXVs+MRAU4T13p1iA=; b=v3LrL9escOxhtlharao/R7skB1lpGu5+8wueZCg3d9Drf7R/8HyrIZJ1qKW+wkS8Ao AN4zb9umhGD9RZ6U7IZ0xI1XC5yfJwTfj3tv3tLVAoiNd89sR2+BQDOSdgR1yIFOA+ro Zon2y0JEoFPd3GuevnPk9Ccf0oA9341gbURU/7Ov5wA4x74CzhqY0RG1GHc1iD0KU3Bc nqRnvDElwC1s8YPEqPKo5b+1StBFVQuYkMY9ctKGuoQNR/ECbqSPh7xlI7B2Vd2K6T+V Lc2mAdI4IEFUsiHwKicXUjw4Yr4vLs5WqfPlEmjrOeyFNCS2bAtHsQRR4Fcuud3UV/Nk DGDw== X-Gm-Message-State: ANoB5plXlS7eRwi74kJ7Wor+ngg8bLog2NrzaMsiiYbkZALIvypIve47 porh078ldgVaXFE0obwj1CJhqjCqIPZq18KS8wh91xsYBi4= X-Google-Smtp-Source: AA0mqf7GSQ4w1a2T8LuXJD/LJJrxoAjGy8NThttP479Ujgv7vox5Q5UH/Whl3Bd9uh8AIrUQ1eYwuJ5m4l2py4E/9Tg= X-Received: by 2002:a67:f5c3:0:b0:3b0:924e:9570 with SMTP id t3-20020a67f5c3000000b003b0924e9570mr4872735vso.11.1669644650542; Mon, 28 Nov 2022 06:10:50 -0800 (PST) MIME-Version: 1.0 References: <20221125090948.07295854@hermes.local> In-Reply-To: <20221125090948.07295854@hermes.local> From: ikuzar RABE Date: Mon, 28 Nov 2022 15:10:39 +0100 Message-ID: Subject: Re: multi-process support: how to share THE SAME packet between two different processes To: stephen@networkplumber.org Cc: users@dpdk.org Content-Type: multipart/alternative; boundary="0000000000004bfb0605ee887052" 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 --0000000000004bfb0605ee887052 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In this case: 9. DPDK packet capture libraries and tools =E2=80=94 Data Pl= ane Development Kit 22.11.0 documentation , which process is responsible of deallocing the memory occupied by a packet ? the primary process or the dpdk-dumpcap tool process ? if one process deallocates a memory, the second one will point to nothing..= . ikuzar i Le ven. 25 nov. 2022 =C3=A0 18:09, Stephen Hemminger a =C3=A9crit : > On Fri, 25 Nov 2022 17:27:46 +0100 > ikuzar RABE wrote: > > > Hi all, > > > > I would like to know how do you usually proceed to retrieve and share t= he > > same packet read from NIC port between two different processes ? I try = to > > work in zero-copy way. > > > > The first process job consists in parsing the packet and make some > protocol > > statistics. The second one dumps the same packet into pcap file for > further > > analysis with wireshark for example. > > > > I think none of the cases exposed here corresponds to my need: 43. > > Multi-process Support =E2=80=94 Data Plane Development Kit 22.11.0-rc4 > > documentation (dpdk.org) > > < > https://doc.dpdk.org/guides/prog_guide/multi_proc_support.html#:~:text=3D= Standalone%20DPDK%20processes%20are%20primary,process%20with%20same%20DPDK%= 20version > .>. > > Am I wrong ? > > > > is there a dpdk-compliant way to do it with threads instead of processe= s > ? > > > > Thank you for your help. > > > > Regards, > > > > ikuzar > > Use a ring buffer. > Why are you reinventing what the pdump library does? > --0000000000004bfb0605ee887052 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In this case:=C2=A0 9. DPDK packet capture libraries and tools =E2=80=94 Data Plane Developmen= t Kit 22.11.0 documentation, which process is responsible of deallocing= the memory occupied by a packet ? the primary process or the dpdk-dumpcap = tool process ?
if one process deallocates a memory, the second one will= point to nothing...

ikuzar

i

Le=C2=A0ven. 25 nov. 2022 =C3=A0=C2=A018:09, Stephen Hemminger &l= t;stephen@networkplumber.org<= /a>> a =C3=A9crit=C2=A0:
On Fri, 25 Nov 2022 17:27:46 +0100
ikuzar RABE <
i= kuzar9295@gmail.com> wrote:

> Hi all,
>
> I would like to know how do you usually proceed to retrieve and share = the
> same packet read from NIC port between two different processes ? I try= to
> work in zero-copy way.
>
> The first process job consists in parsing the packet and make some pro= tocol
> statistics. The second one dumps the same packet into pcap file for fu= rther
> analysis with wireshark for example.
>
> I think none of the cases exposed here corresponds to my need: 43.
> Multi-process Support =E2=80=94 Data Plane Development Kit 22.11.0-rc4=
> documentation (dpdk.org)
> <https://d= oc.dpdk.org/guides/prog_guide/multi_proc_support.html#:~:text=3DStandalone%= 20DPDK%20processes%20are%20primary,process%20with%20same%20DPDK%20version.>.
> Am I wrong ?
>
> is there a dpdk-compliant way to do it with threads instead of process= es ?
>
> Thank you for your help.
>
> Regards,
>
> ikuzar

Use a ring buffer.
Why are you reinventing what the pdump library does?
--0000000000004bfb0605ee887052--