From: Bruce Richardson <bruce.richardson@intel.com>
To: "Koikkara Reeny, Shibin" <shibin.koikkara.reeny@intel.com>
Cc: <dev@dpdk.org>, <anatoly.burakov@intel.com>,
<ciara.loftus@intel.com>, <qi.z.zhang@intel.com>
Subject: Re: [PATCH] net/af_xdp: AF_XDP PMD CNI Integration
Date: Wed, 18 Jan 2023 12:11:11 +0000 [thread overview]
Message-ID: <Y8fh38znuENOK+Xb@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20221213104746.805221-1-shibin.koikkara.reeny@intel.com>
On Tue, Dec 13, 2022 at 10:47:46AM +0000, Koikkara Reeny, Shibin wrote:
> From: Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
>
> Integrate support for the AF_XDP CNI and device plugin so that the
> DPDK AF_XDP PMD can work in an unprivileged container environment.
> Part of the AF_XDP PMD initialization process involves loading
> an eBPF program onto the given netdev. This operation requires
> privileges, which prevents the PMD from being able to work in an
> unprivileged container (without root access). The plugin CNI handles
> the program loading. CNI open Unix Domain Socket (UDS) and waits
> listening for a client to make requests over that UDS. The client(DPDK)
> connects and a "handshake" occurs, then the File Descriptor which points
> to the XSKMAP associated with the loaded eBPF program is handed over
> to the client. The client can then proceed with creating an AF_XDP
> socket and inserting the socket into the XSKMAP pointed to by the
> FD received on the UDS.
>
> A new vdev arg "use_cni" is created to indicate user wishes to run
> the PMD in unprivileged mode and to receive the XSKMAP FD from the CNI.
> When this flag is set, the XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD libbpf flag
> should be used when creating the socket, which tells libbpf not to load the
> default libbpf program on the netdev. We tell libbpf not to do this because
> the loading is handled by the CNI in this scenario.
>
> Signed-off-by: Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
> ---
> drivers/net/af_xdp/rte_eth_af_xdp.c | 337 +++++++++++++++++++++++++++-
> 1 file changed, 325 insertions(+), 12 deletions(-)
>
Hi Shibhin,
this support sounds really interesting, but I think the patch needs to
include documentation updates on how to set up and use this feature. No
need to duplicate instructions that may be already given in the CNI/plugin
docs, but we need to at least reference those from our docs to ensure end
users can quickly find out how to work with this.
Thanks,
/Bruce
prev parent reply other threads:[~2023-01-18 12:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 10:47 Koikkara Reeny, Shibin
2023-01-18 12:11 ` Bruce Richardson [this message]
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=Y8fh38znuENOK+Xb@bricha3-MOBL.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=ciara.loftus@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=shibin.koikkara.reeny@intel.com \
/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).