[v1] net/af_xdp: enable a sock path alongside use_cni

Maryam Tahhan mtahhan at redhat.com
Fri Dec 1 11:31:40 CET 2023


On 01/12/2023 10:26, David Marchand wrote:
> Hello,
>
> On Thu, Nov 30, 2023 at 10:13 AM Maryam Tahhan<mtahhan at redhat.com>  wrote:
> [snip]
>> diff --git a/doc/guides/howto/af_xdp_cni.rst b/doc/guides/howto/af_xdp_cni.rst
>> index a1a6d5b99c..a2d90c665d 100644
>> --- a/doc/guides/howto/af_xdp_cni.rst
>> +++ b/doc/guides/howto/af_xdp_cni.rst
>> @@ -38,9 +38,10 @@ The XSKMAP is a BPF map of AF_XDP sockets (XSK).
>>   The client can then proceed with creating an AF_XDP socket
>>   and inserting that socket into the XSKMAP pointed to by the descriptor.
>>
>> -The EAL vdev argument ``use_cni`` is used to indicate that the user wishes
>> +The EAL vdev arguments ``use_cni`` and ``sock`` are used to indicate that the user wishes
>>   to run the PMD in unprivileged mode and to receive the XSKMAP file descriptor
>>   from the CNI.
>> +
>>   When this flag is set,
>>   the ``XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD`` libbpf flag
>>   should be used when creating the socket
>> @@ -49,7 +50,7 @@ Instead the loading is handled by the CNI.
>>
>>   .. note::
>>
>> -   The Unix Domain Socket file path appear in the end user is "/tmp/afxdp.sock".
>> +   The Unix Domain Socket file path appears to the end user at "/tmp/afxdp_dp/<netdev>/afxdp.sock".
>>
>>
>>   Prerequisites
>> @@ -224,7 +225,6 @@ Howto run dpdk-testpmd with CNI plugin:
>>             capabilities:
>>                add:
>>                  - CAP_NET_RAW
>> -               - CAP_BPF
>>            resources:
>>              requests:
>>                hugepages-2Mi: 2Gi
>> @@ -245,7 +245,17 @@ Howto run dpdk-testpmd with CNI plugin:
>>
>>        kubectl exec -i <Pod name> --container <containers name> -- \
>>              /<Path>/dpdk-testpmd -l 0,1 --no-pci \
>> -           --vdev=net_af_xdp0,use_cni=1,iface=<interface name> \
>> +           --vdev=net_af_xdp0,use_cni=1,iface=<interface name>,sock=/tmp/afxdp_dp/<interface name>/afxdp.sock \
>> +           -- --no-mlockall --in-memory
> Quick look at the doc update.
> - is this hunk related to $subject?
> - --in-memory is not a testpmd level option, but an EAL one.
>
>
Yeah - I actually will remove the `--no-mlockall --in-memory` in the v2 
respin (it's a typo). I'm only interested in showing the multiple af_xdp 
device (vdev) arguments. I think it's useful for anyone who is looking 
for a quick reference on how to do it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20231201/642ba9c6/attachment.htm>


More information about the dev mailing list