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 769AFA04FD for ; Wed, 8 Jun 2022 20:55:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EE8E40689; Wed, 8 Jun 2022 20:55:04 +0200 (CEST) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by mails.dpdk.org (Postfix) with ESMTP id 2920540042 for ; Wed, 8 Jun 2022 20:55:03 +0200 (CEST) Received: by mail-qt1-f170.google.com with SMTP id 2so15614865qtw.0 for ; Wed, 08 Jun 2022 11:55:03 -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=HwDxEWeIjdTAcNm9DE1cZkpii6QIEd5XgHBnktgYKWE=; b=ogEyyTvdmPjzROXnE5EiNYVaasFSAAO0aBduLh+lpz2PmWhRlaag+so2zqNmxG86lf TVKik/CmhnLMFAwjZU4kl+jxU1t719T1zM9mn/BNlbhnUG4DesUFuwCevwXScNXv9+VA oYp4JZ1BBVt58PUpYeLeVgszGRWEwOYupWPNvTY+aUCpvju5/FphvEgiH5W5dIZo13um CViE0Mvn7WHWHxEpjOq/horoYjYBMTHFjt04x6nYEw20pffep2qMO4e+KBrlgqDGcCei jhyFBdPxJ5koc33aCdOAd/vjm9fqvC6bdAiROahyNioIxoeXtQ0uPs+vqKTfWP2y8FWH V5qg== 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=HwDxEWeIjdTAcNm9DE1cZkpii6QIEd5XgHBnktgYKWE=; b=Hy8cVn4ulisH7xL/YDMBZTF/flHdy+41rT9sg9ocjQGMU9eAE57RKnDU4fQiDIHXcK tXT/tRRr5TV75RpLx/SFoDs51ZHdW9tnZy6/55ZTXBTPIVA8QB6WHHeOiUnL4cS9Q7bt pJDS2GbF3QJDqXupV9Rm7G/EFSHXN/AFs0o79DUxSPwvUW8/5iLyXHk9v+3KYDJvspXg lBpuixJHlmWdMQ74wJ6hkFK4Wgr5jpO4RH9zbEV2E+bxHv3Hu3JoIZPnD3vTH1WNcffV tRLVCv4tECKOkYTtLAsyowh+5RTYq7g7rKJNBoLWNHApKOe8JdBN4r9vIb7QOQ0Yp2pz RT7A== X-Gm-Message-State: AOAM533aIWRGB1DjAflEeR6gjQCZltksaNYCqbKnaZH9otJIyQDr+GRZ Pt2KpKudWigE5p+HCHUI1JRnGDJXm63QSNgfzDKR+OfI X-Google-Smtp-Source: ABdhPJx1Qrtnel6+zhLZcQMoV/2miKPWxrD7HJZjy+iP06wlf5Z1ksCLdpucb72Ld2jzo5Mr0sY/AUY6M6Rs4MThdvU= X-Received: by 2002:a05:622a:586:b0:304:da27:b689 with SMTP id c6-20020a05622a058600b00304da27b689mr24888793qtb.675.1654714502250; Wed, 08 Jun 2022 11:55:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kiran Khatke Date: Wed, 8 Jun 2022 11:54:51 -0700 Message-ID: Subject: Re: Memory sharing between two primary processes To: "Pathak, Pravin" Cc: "users@dpdk.org" Content-Type: multipart/alternative; boundary="0000000000001d58c105e0f43ef3" 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 --0000000000001d58c105e0f43ef3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Pravin, will setup shared area. On Tue, Jun 7, 2022 at 5:21 PM Pathak, Pravin wrote: > I did not use memif so can not comment on its performance. It all also > depends upon what kind of communication is needed between processes. > > Is it message based or simple shared memory structure. You should be able > to allocate memory from hugepages and setup shared area. > > > > Pravin > > > > *From:* Kiran Khatke > *Sent:* Monday, June 6, 2022 9:56 AM > *To:* Pathak, Pravin > *Cc:* users@dpdk.org > *Subject:* Re: Memory sharing between two primary processes > > > > > > 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 > > --0000000000001d58c105e0f43ef3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks=C2=A0Pravin, will setup shared area.=C2=A0

On = Tue, Jun 7, 2022 at 5:21 PM Pathak, Pravin <pravin.pathak@intel.com> wrote:

I did not use memif so can not comment on its perfor= mance. It all also depends upon what kind of communication is needed betwee= n processes.

Is it message based or simple shared memory structur= e. You should be able to allocate memory from hugepages and setup shared ar= ea.

=C2=A0

Pravin

=C2=A0

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

=C2=A0

=C2=A0

Thanks=C2=A0Pravin.

=C2=A0

Do you any comments over memif PMD performance?

=C2=A0

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

=C2=A0

Kiran

=C2=A0

=C2=A0

On Mon, Jun 6, 2022 at 6:53 AM Pathak, Pravin <pravin.pathak@in= tel.com> 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/testpmd -l 0-1 --proc-type=3Dprimary --file-prefix=3D= pmd1 --vdev=3Dnet_memif,role=3Dmaster -- -i

= =C2=A0

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

#= ./build/app/testpmd -l 2-3 --proc-type=3Dprimary --file-prefix=3D= pmd2 --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

--0000000000001d58c105e0f43ef3--