DPDK usage discussions
 help / color / mirror / Atom feed
From: Antonio Di Bacco <a.dibacco.ks@gmail.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: users@dpdk.org
Subject: Re: Shared memory between two primary DPDK processes
Date: Thu, 14 Apr 2022 21:51:28 +0200	[thread overview]
Message-ID: <CAO8pfF=pbNjiXQT1ASpvRnTKfnxCqkxozrbOj8sZnt90QAW-jg@mail.gmail.com> (raw)
In-Reply-To: <20220414220148.0d638532@sovereign>

[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]

Il giorno gio 14 apr 2022 alle ore 21:01 Dmitry Kozlyuk <
dmitry.kozliuk@gmail.com> ha scritto:

> 2022-04-14 10:20 (UTC+0200), Antonio Di Bacco:
> [...]
> > Ok, after having a look to memif I managed to exchange the fd  between
> the
> > two processes and it works.
> > Anyway the procedure seems a little bit clunky and I think I'm going to
> use
> > the new SYSCALL pidfd_getfd
> > to achieve the same result.  In your opinion this method (getfd_pidfd)
> > could also work if the two DPDK processes
> > are inside different docker containers?
>
> Honestly, I've just learned about pidfd_getfd() from you.
> But I know that containers use PID namespaces, so there's a question
> how you will obtain the pidfd of a process in another container.
>
> In general, any method of sharing FD will work.
> Remember that you also need offset and size.
> Given that some channel is required to share those,
> I think Unix domain socket is still the preferred way.
>
> > Or is there another mechanims like using handles to hugepages present in
> > the filesystem to share between two
> > different containers?
>
> FD is needed for mmap().
> You need to either pass the FD or open() the same hugepage file by path.
> I advise against using paths because they are not a part of DPDK API
> contract.
>

Thank you very much Dmitry, your answers are always enlightening.
I'm going to ask a different question on the dpdk.org about the best
practice to share memory between two dpdk processes running in different
containers.

[-- Attachment #2: Type: text/html, Size: 2007 bytes --]

  reply	other threads:[~2022-04-14 19:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 12:31 Antonio Di Bacco
2022-04-08 13:26 ` Dmitry Kozlyuk
2022-04-08 14:36   ` Ferruh Yigit
2022-04-08 21:14     ` Antonio Di Bacco
2022-04-08 21:08   ` Antonio Di Bacco
2022-04-11 13:03     ` Antonio Di Bacco
2022-04-11 17:30       ` Dmitry Kozlyuk
2022-04-14  8:20         ` Antonio Di Bacco
2022-04-14 19:01           ` Dmitry Kozlyuk
2022-04-14 19:51             ` Antonio Di Bacco [this message]
2022-04-18 17:34               ` Antonio Di Bacco
2022-04-18 17:53                 ` Antonio Di Bacco
2022-04-18 19:08                   ` Dmitry Kozlyuk
2022-07-06 22:14   ` Antonio Di Bacco
2022-07-07  0:26     ` Dmitry Kozlyuk
2022-07-07  8:48       ` Antonio Di Bacco
2022-07-07  9:26         ` Dmitry Kozlyuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO8pfF=pbNjiXQT1ASpvRnTKfnxCqkxozrbOj8sZnt90QAW-jg@mail.gmail.com' \
    --to=a.dibacco.ks@gmail.com \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).