From: Ferruh Yigit <ferruh.yigit@amd.com>
To: "Loftus, Ciara" <ciara.loftus@intel.com>,
"Tahhan, Maryam" <mtahhan@redhat.com>,
"stephen@networkplumber.org" <stephen@networkplumber.org>,
"lihuisong@huawei.com" <lihuisong@huawei.com>,
"fengchengwen@huawei.com" <fengchengwen@huawei.com>,
"liuyonglong@huawei.com" <liuyonglong@huawei.com>,
"Marchand, David" <david.marchand@redhat.com>,
"Koikkara Reeny, Shibin" <shibin.koikkara.reeny@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [v9 2/3] net/af_xdp: fix multi interface support for K8s
Date: Wed, 28 Feb 2024 17:32:36 +0000 [thread overview]
Message-ID: <a23f44ed-1ec7-4cc9-b2c8-13395b0624d4@amd.com> (raw)
In-Reply-To: <MW4PR11MB5872532EF8EC642EB468AD7F8E562@MW4PR11MB5872.namprd11.prod.outlook.com>
On 2/22/2024 1:46 PM, Loftus, Ciara wrote:
>> Subject: [v9 2/3] net/af_xdp: fix multi interface support for K8s
>>
>> The original 'use_cni' implementation, was added
>> to enable support for the AF_XDP PMD in a K8s env
>> without any escalated privileges.
>> However 'use_cni' used a hardcoded socket rather
>> than a configurable one. If a DPDK pod is requesting
>> multiple net devices and these devices are from
>> different pools, then the AF_XDP PMD attempts to
>> mount all the netdev UDSes in the pod as /tmp/afxdp.sock.
>> Which means that at best only 1 netdev will handshake
>> correctly with the AF_XDP DP. This patch addresses
>> this by making the socket parameter configurable using
>> a new vdev param called 'dp_path' alongside the
>> original 'use_cni' param. If the 'dp_path' parameter
>> is not set alongside the 'use_cni' parameter, then
>> it's configured inside the AF_XDP PMD (transparently
>> to the user). This change has been tested
>> with the AF_XDP DP PR 81[1], with both single and
> [1] does not point to any reference.
>
>> multiple interfaces.
>>
>> Fixes: 7fc6ae50369d ("net/af_xdp: support CNI Integration")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
>> ---
>> doc/guides/howto/af_xdp_dp.rst | 43 ++++++++++--
>> doc/guides/nics/af_xdp.rst | 14 ++++
>> doc/guides/rel_notes/release_24_03.rst | 7 ++
>> drivers/net/af_xdp/rte_eth_af_xdp.c | 94 ++++++++++++++++----------
>> 4 files changed, 116 insertions(+), 42 deletions(-)
>>
>> diff --git a/doc/guides/howto/af_xdp_dp.rst
>> b/doc/guides/howto/af_xdp_dp.rst
>> index 657fc8d52c..8a64ec5599 100644
>> --- a/doc/guides/howto/af_xdp_dp.rst
>> +++ b/doc/guides/howto/af_xdp_dp.rst
>> @@ -52,13 +52,18 @@ should be used when creating the socket
>> to instruct libbpf not to load the default libbpf program on the netdev.
>> Instead the loading is handled by the AF_XDP Device Plugin.
>>
>> +The EAL vdev argument ``dp_path`` is used alongside the ``use_cni``
>> argument
>> +to explicitly tell the AF_XDP PMD where to find the UDS to interact with the
>> +AF_XDP Device Plugin. If this argument is not passed alongside the ``use_cni``
>> +argument then the AF_XDP PMD configures it internally.
>> +
>> Limitations
>> -----------
>>
>> For DPDK versions <= v23.11 the Unix Domain Socket file path appears in
>> the pod at "/tmp/afxdp.sock". The handshake implementation in the AF_XDP
>> PMD
>> -is only compatible with the AF_XDP Device Plugin up to commit id `38317c2`_
>> -and the pod is limited to a single netdev.
>> +is only compatible with the `AF_XDP Device Plugin for Kubernetes`_ up to
>> +commit id `38317c2`_ and the pod is limited to a single netdev.
>>
>> .. note::
>>
>> @@ -75,6 +80,14 @@ in the PMD alongside the `use_cni` parameter.
>>
>> .. _38317c2: https://github.com/intel/afxdp-plugins-for-
>> kubernetes/commit/38317c256b5c7dfb39e013a0f76010c2ded03669
>>
>> +.. note::
>> +
>> + The introduction of the ``dp_path`` EAL vdev argument fixes the limitation
>> above. If a
>> + user doesn't explicitly set the ``dp_path``parameter when using ``use_cni``
>> then that
>> + path is transparently configured in the AF_XDP PMD to the default
>> + `AF_XDP Device Plugin for Kubernetes`_ mount point path. This is
>> compatible with the latest
>> + AF_XDP Device Plugin. For backwards compatibility with versions of the
>> AF_XDP DP <= commit
>> + id `38317c2`_ please explicitly set ``dp_path`` to ``/tmp/afxdp.sock``.
> I think instead of adding a note here we can just simply remove the limitation. When the user has this patch, they most likely will not care about limitations that were previously present.
> Just make sure that the information about the behaviour when dp_path is not set and how to set dp_path to be backwards compatible is still captured in the docs somewhere.
> I just think it's confusing to state a limitation followed by a note that it is resolved.
>
> The remainder of the changes in this series LGTM.
>
> Thanks,
> Ciara
>
Hi Maryam,
It would be nice to have the patch for -rc2, otherwise there will be
small time for anyone test the new feature (or existing `use_cni` one),
do you think can the comment be addressed before -rc2?
next prev parent reply other threads:[~2024-02-28 17:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 17:03 [v9 0/3] " Maryam Tahhan
2024-02-14 17:03 ` [v9 1/3] docs: AF_XDP Device Plugin Maryam Tahhan
2024-02-21 14:44 ` Koikkara Reeny, Shibin
2024-02-14 17:03 ` [v9 2/3] net/af_xdp: fix multi interface support for K8s Maryam Tahhan
2024-02-22 13:46 ` Loftus, Ciara
2024-02-28 17:32 ` Ferruh Yigit [this message]
2024-02-14 17:03 ` [v9 3/3] net/af_xdp: support AF_XDP DP pinned maps Maryam Tahhan
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=a23f44ed-1ec7-4cc9-b2c8-13395b0624d4@amd.com \
--to=ferruh.yigit@amd.com \
--cc=ciara.loftus@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=lihuisong@huawei.com \
--cc=liuyonglong@huawei.com \
--cc=mtahhan@redhat.com \
--cc=shibin.koikkara.reeny@intel.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.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).