patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maryam Tahhan <mtahhan@redhat.com>
To: "Loftus, Ciara" <ciara.loftus@intel.com>,
	"ferruh.yigit@amd.com" <ferruh.yigit@amd.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: [v11 2/3] net/af_xdp: fix multi interface support for K8s
Date: Fri, 1 Mar 2024 17:04:42 +0000	[thread overview]
Message-ID: <3c3842f4-4b9d-4a29-a84a-c5b84e4051d7@redhat.com> (raw)
In-Reply-To: <MW4PR11MB58728DB7098730D0C5D28BDD8E5E2@MW4PR11MB5872.namprd11.prod.outlook.com>

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

On 01/03/2024 15:43, Loftus, Ciara wrote:
> snip
>
>> @@ -1695,17 +1699,16 @@ xsk_configure(struct pmd_internals *internals,
>> struct pkt_rx_queue *rxq,
>>   	}
>>
>>   	if (internals->use_cni) {
>> -		int err, fd, map_fd;
>> +		int err, map_fd;
>>
>> -		/* get socket fd from CNI plugin */
>> -		map_fd = get_cni_fd(internals->if_name);
>> +		/* get socket fd from AF_XDP Device Plugin */
>> +		map_fd = uds_get_xskmap_fd(internals->if_name, internals-
>>> dp_path);
>>   		if (map_fd < 0) {
>> -			AF_XDP_LOG(ERR, "Failed to receive CNI plugin fd\n");
>> +			AF_XDP_LOG(ERR, "Failed to receive xskmap fd from
>> AF_XDP Device Plugin\n");
>>   			goto out_xsk;
>>   		}
>> -		/* get socket fd */
>> -		fd = xsk_socket__fd(rxq->xsk);
>> -		err = bpf_map_update_elem(map_fd, &rxq->xsk_queue_idx,
>> &fd, 0);
>> +
>> +		err = xsk_socket__update_xskmap(rxq->xsk, map_fd);
> Hi Maryam,
>
> I've reviewed the series again. I haven't tested the device-plugin specific functionality as I don't have that environment set up, but outside of that I am happy that the new functionality doesn't break anything else. The doc updates look good to me now, thank you for the fixes.
>
> I have just spotted one issue and I apologise for only catching it now.
> Patch 2 introduces a dependency on the xsk_socket__update_xskmap function which is available in:
> libbpf >= v0.3.0 and <= v0.6.0
> libxdp > v1.2.0
>
> The af_xdp.rst guide states we are compatible with libbpf (on it's own) <= v0.6.0. So users using libbpf < v0.3.0 will get an undefined reference warning for the xsk_socket__update_xskmap function.
>
> Is it possible to implement fallback functionality (or if that's not possible, bail out) if that function is not available? See how this is done for the xsk_socket__create_shared function in meson.build and compat.h.
>
> Thanks,
> Ciara
>

Hi Ciara

Yeah, no prob - I can re introduce the ``bpf_map_update_elem()`` call as 
a fall back. I will need to retest the permissions as I remember 
escalated permissions being required when issuing that call directly in 
the PMD which is why I moved it to using ``xsk_socket__update_xskmap()`` 
but let me retest and circle back with some changes.

:) Looks like we are going to a v12 :)

BR Maryam

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

      reply	other threads:[~2024-03-01 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240229132129.656166-1-mtahhan@redhat.com>
2024-02-29 13:21 ` [v11 1/3] docs: AF_XDP Device Plugin Maryam Tahhan
2024-02-29 13:21 ` [v11 2/3] net/af_xdp: fix multi interface support for K8s Maryam Tahhan
2024-03-01 15:43   ` Loftus, Ciara
2024-03-01 17:04     ` Maryam Tahhan [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=3c3842f4-4b9d-4a29-a84a-c5b84e4051d7@redhat.com \
    --to=mtahhan@redhat.com \
    --cc=ciara.loftus@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=lihuisong@huawei.com \
    --cc=liuyonglong@huawei.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).