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 10FA1A0542 for ; Mon, 6 Jun 2022 15:56:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88A2C4021E; Mon, 6 Jun 2022 15:56:36 +0200 (CEST) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mails.dpdk.org (Postfix) with ESMTP id C34AE40150 for ; Mon, 6 Jun 2022 15:56:35 +0200 (CEST) Received: by mail-qk1-f169.google.com with SMTP id 15so5692743qki.6 for ; Mon, 06 Jun 2022 06:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EK2bco8UoDpcVsH8jDYmfbrAX5DhA5OlF3y8WA8sp6U=; b=RJJ1tgO6gMxZSEj8UQhU56NgfdDACWmU6GRSEWv3xbhYy5HfI7JHrkkg89rvuqyvUH sILAiepED6b08swgPmBmy/gFPMurQgX4aqfLr310tmVnOY6jj/P7hWAvcAqj0auKfevy 6Gpl5S3LVoC+1RhnZmZMZeDbtg5qRCet+1AZ15jRSoXLPpJB9haWFqUR8H+6Umhq64ZI lkQpPPq3N/0G9XL+sh7Bu7aBIZnswl2bEVHnJ8RGI9fVuj+bem8lenidS4drX1lnHjdz wWQYR3GyXAFSJSkBo4OKL6SXyjZAinlF9vK+ww+Ayj8A7AS43kGssNL02eeVqJmrN7H9 gGAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EK2bco8UoDpcVsH8jDYmfbrAX5DhA5OlF3y8WA8sp6U=; b=WErfoMW1JWj/PmErzfcjOxguFYX2h+j6p6g1a/Sg+1YyLiCw6qa2n/lZbawLhsyWQ2 vWC8sA0WXM2BhGcnzVP9KVUtgxROiFwQm17R91apI3qxiFMjAm9cIXS2v4P9cdJ6liSF nItKHJv+MGz//9zmZjgWb/Aw8tBWQm2RY0FM6fA6PHZdv3cg2/pYTlzn3yGBf0ro/8Vg 1inEdfPIZ9s3UDK85G4TGDabzp29c0awZhYMBvQfSRYxbbPCCt3U7TIisfTYfvU7eDm5 hkGqq7ds4/7rwHX9ByZXu0ut3CFmmOxmlGA9uwWewM1pxB9Wu79ARbL7DZ/sQv5usWef e7Yw== X-Gm-Message-State: AOAM53183rKJuGOhlTFjLxs/Rrprr/6sraDm5ou7lSK5tUtmV6Cb5x0R NxB/lI4Em4Y1ZjTTSwmvPcuyPg93DBO/qQhNU7W35d1z X-Google-Smtp-Source: ABdhPJyPhvfHbPBwzgvaYz7XKT+76Vj57GZR9AlorMub8Jo/FbYVnODPe6McVk9+cBX0cpRl04YjpUD1ITdl60iYpF4= X-Received: by 2002:a37:bb41:0:b0:6a6:48f4:2814 with SMTP id l62-20020a37bb41000000b006a648f42814mr15731257qkf.421.1654523794998; Mon, 06 Jun 2022 06:56:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kiran Khatke Date: Mon, 6 Jun 2022 06:56:24 -0700 Message-ID: Subject: Re: Memory sharing between two primary processes To: "Pathak, Pravin" Cc: "users@dpdk.org" Content-Type: multipart/alternative; boundary="00000000000012ce8405e0c7d7f5" 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 --00000000000012ce8405e0c7d7f5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Pravin. Do you any comments over memif PMD performance? Are there any better options than memif PMD in terms of performance? Kiran On Mon, Jun 6, 2022 at 6:53 AM Pathak, Pravin wrote: > Hi Kiran =E2=80=93 > > It should be possible. DPDK documentation clearly shows two primary > processes using memif to communicate. > > > > *32.2.1. Example: testpmd* > > In this example we run two instances of testpmd application and transmit > packets over memif. > > First create master interface: > > #./build/app/testpmd -l 0-1 *--proc-type=3Dprimary --file-prefix=3Dpmd1* > --vdev=3Dnet_memif,role=3Dmaster -- -i > > > > Now create slave interface (master must be already running so the slave > will connect): > > #./build/app/testpmd -l 2-3 *--proc-type=3Dprimary --file-prefix=3Dpmd2* > --vdev=3Dnet_memif -- -i > > > > > > *From:* Kiran Khatke > *Sent:* Monday, June 6, 2022 9:24 AM > *To:* Pathak, Pravin > *Cc:* users@dpdk.org > *Subject:* Re: Memory sharing between two primary processes > > > > Hi Pravin, > > > > Both are DPDK application, so want to use DPDK Share memory i.e hugepage= s. > > > > How to share memory between two independent (Primary) application? Does > memif PMD allows that ? > > > > Thanks, > > Kiran > > > > On Mon, Jun 6, 2022 at 5:58 AM Pathak, Pravin > wrote: > > Hi Kiran =E2=80=93 > > Can your application create and manage shared memory on it own without > using DPDK support ? > > Regards > > Pravin > > > > *From:* Kiran Khatke > *Sent:* Monday, June 6, 2022 2:26 AM > *To:* users@dpdk.org > *Subject:* Memory sharing between two primary processes > > > > Hi, > > > > Per DPDK Multiprocess, we know that, it is possible to share > memory(hugepages) between a primary and secondary Process. Primary proce= ss > allocates the memory and that is accessible by the secondary (both are > using same "--file-prefix=3D" parameter). > > > > There is a need in our application, to have two primary processes (starte= d > with different file-prefix) and would like to know the options - To share > memory (hugepage) between two primaries and which can give us better > throughputs. > > > > During exploration, got to know about memif PMD, which allows for DPDK an= d > any other client using memif (DPDK, libmemif) to communicate over shared > memory. > > Do you have any comments about memif performance ? Are there better > options over memif to share memory between two primaries ? > > > > Thanks , > > Kiran > > --00000000000012ce8405e0c7d7f5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Thanks=C2=A0Pravin.

Do you any comments over memif PMD performance= ?

Are there any better o= ptions than memif PMD in terms of performance?

<= /div>
Kiran


On Mon, Jun 6, 2022 at 6:53 AM Pathak, = Pravin <pravin.pathak@intel.c= om> wrote:

Hi Kiran =E2=80=93

It should be possible. DPDK documentation =C2=A0clea= rly shows two primary processes using memif to communicate.

=C2=A0

32.= 2.1. Example: testpmd

In this example we run two instances of testpmd application and transmi= t packets over memif.

First create=C2=A0master=C2=A0interface:

#./build/app/te= stpmd -l 0-1 --proc-type=3Dprimary --file-prefix=3Dpmd1 --vdev=3Dnet_memif,role=3Dmaster -- -i

=C2=A0

Now create=C2=A0slave=C2=A0interface (master must be already running so the slave will connect):=

#./build/app/te= stpmd -l 2-3 --proc-type=3Dprimary --file-prefix=3Dpmd2 --vdev=3Dnet_memif -- -i

=C2=A0

=C2=A0

From: Kiran Khatke <kirankhatke23may@gmail.com>= ;
Sent: Monday, June 6, 2022 9:24 AM
To: Pathak, Pravin <pravin.pathak@intel.com>
Cc: users@dpdk.o= rg
Subject: Re: Memory sharing between two primary processes<= /u>

=C2=A0

Hi Pravin,=C2=A0

=C2=A0

Both are DPDK application, so want =C2=A0to use DPDK= Share memory i.e hugepages.

=C2=A0

How to share memory between two independent (Primary= ) application?=C2=A0 Does memif PMD allows that ?=C2=A0

=C2=A0

Thanks,

Kiran=C2=A0

=C2=A0

On Mon, Jun 6, 2022 at 5:58 AM Pathak, Pravin <pravin.pathak@in= tel.com> wrote:

Hi Kiran =E2=80=93

Can your application create and manage shared memory= on it own without using DPDK support ?

Regards

Pravin

=C2=A0

From: Kiran Khatke <kirankhatke23may@gmail.com>= ;
Sent: Monday, June 6, 2022 2:26 AM
To: users@dpdk.o= rg
Subject: Memory sharing between two primary processes<= /p>

=C2=A0

Hi,

=C2=A0

Per DPDK Multiprocess, we know that, it is possible to sha= re memory(hugepages) between a primary and secondary Process.=C2=A0 Primary= process allocates the memory and that is accessible by the secondary (both are using same=C2=A0 "--file-prefix=3D" p= arameter).

=C2=A0

There is a need in our application, to have two primary pr= ocesses (started with different file-prefix) and would like to know the opt= ions - To share memory (hugepage) between two primaries and which can give us better throughputs.

=C2=A0

During exploration, got to know about memif PMD, which all= ows for DPDK and any other client using memif (DPDK, libmemif) to communica= te over shared memory.=C2=A0

Do you have any comments about memif performance ? Are the= re better options over memif to share memory between two primaries ?=

=C2=A0

Thanks ,

Kiran=C2=A0

--00000000000012ce8405e0c7d7f5--