From: Thea Corinne Rossman <thea.rossman@cs.stanford.edu>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: stephen@networkplumber.org, users@dpdk.org
Subject: Re: Containernet (Docker/Container Networking) with DPDK?
Date: Tue, 19 Nov 2024 15:23:00 -0800 [thread overview]
Message-ID: <CAHXF6-qpTXhYxUZAmRVdL_q_BT7ohv419WJ=9orycj15vkexyw@mail.gmail.com> (raw)
In-Reply-To: <2390764.BjyWNHgNrj@thomas>
[-- Attachment #1: Type: text/plain, Size: 1579 bytes --]
Conceptually, for two containers on the same host, how would exchanging
traffic work under-the-hood? Specifically, how is the physical NIC
involved, if at all?
For example, on a physical host: for TX, a userspace application writes a
packet to host memory and pushes its physical address/metadata to the
appropriate NIC's TX queue. The NIC uses the physical address + DMA to
avoid a copy when serializing/sending. (Similar for RX in the other
direction, where the NIC writes to memory.)
I'm not sure how this would translate to a containerized case on a single
host, since traffic shouldn't need to exit and the container network has
its own namespace. Say that two different containers have NICs mapped to
different PCI addresses (split device). If container A appends to its TX
queue, what happens next?
Thanks again for your help.
On Tue, Nov 19, 2024 at 2:14 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> 19/11/2024 22:39, Thea Corinne Rossman:
> > This is SO helpful -- thank you so much.
> >
> > One follow-up question regarding NICs: can multiple containers on the
> same
> > host share the same PCI device? If I have a host NIC with (say) VFIO
> driver
> > binding, do I have to split it with some kind of SR-IOV so that each
> > container has its own "NIC" binding? Or, when running DPDK's "devbind"
> > script, can I set up each one with the same PCI address?
>
> You need to split devices.
> SR-IOV VF may help, or you can use SF which was designed exactly for this,
> with the help of the Linux auxiliary bus.
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 2058 bytes --]
next prev parent reply other threads:[~2024-11-19 23:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 5:42 Thea Corinne Rossman
2024-11-19 20:53 ` Thea Corinne Rossman
2024-11-19 21:29 ` Stephen Hemminger
2024-11-19 21:39 ` Thea Corinne Rossman
2024-11-19 22:03 ` Stephen Hemminger
2024-11-20 7:10 ` Kompella V, Purnima
2024-11-20 9:27 ` Tom Barbette
2024-11-20 9:28 ` Tom Barbette
2024-11-20 9:28 ` Tom Barbette
2024-11-20 19:49 ` Thea Corinne Rossman
2024-11-19 22:14 ` Thomas Monjalon
2024-11-19 23:23 ` Thea Corinne Rossman [this message]
2024-11-19 23:30 ` Thomas Monjalon
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='CAHXF6-qpTXhYxUZAmRVdL_q_BT7ohv419WJ=9orycj15vkexyw@mail.gmail.com' \
--to=thea.rossman@cs.stanford.edu \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--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).