[PATCH v3] net/af_xdp: fix default device plugin path
Stephen Hemminger
stephen at networkplumber.org
Thu Aug 13 04:04:19 CEST 2026
On Wed, 12 Aug 2026 01:47:42 +0000
Anurag Mandal <anurag.mandal at intel.com> wrote:
> When use_cni=1 or use_pinned_map=1 is passed without an explicit
> dp_path, the PMD builds the path to the AF_XDP device plugin
> endpoint itself.
> That default was hardcoded to /tmp/afxdp_dp/<if_name>/.
>
> A unix domain socket and a pinned map are runtime state.
> DPDK exposes a location for such state through
> rte_eal_get_runtime_dir(), which is per user, per
> file prefix, and created with mode 0700, unlike
> the shared /tmp/afxdp_dp directory.
>
> The location cannot simply be moved as it is a contract
> duplicated in the AF_XDP Device Plugin for Kubernetes,
> which creates the socket and mounts it into the pod at
> the /tmp path the PMD expects.
> Changing only the PMD would break every existing deployment.
>
> This patch fixes the default so that the endpoint is looked
> up below the EAL runtime directory first, and /tmp/afxdp_dp
> is only used when nothing is found there.
> Use of the fallback is logged at notice level.
> Existing plugin deployments keep working unchanged, while
> a deployment that places the endpoint in the runtime
> directory no longer has to pass dp_path.
> An explicit dp_path still overrides both.
>
> The <if_name> component is kept in both layouts. It is what
> keeps the endpoints of several interfaces distinct when more
> than one UDS server is mounted in a single pod.
>
> The runtime directory prefix makes the built path longer,
> so reject a dp_path that does not fit the sun_path field
> of struct sockaddr_un instead of letting strlcpy()
> silently truncate it.
>
> The interface name check is moved ahead of the path
> construction, as the default path is now built from it.
>
> Bugzilla ID: 1973
> Fixes: 9c1323736cf9 ("net/af_xdp: fix multi-interface support for k8s")
> Fixes: 8a324b1c6464 ("net/af_xdp: support AF_XDP device plugin pinned maps")
>
> Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
> ---
Applied to net-next. I went ahead and cleaned up the release
note and docs. There are still some nits that AI is complaining
about but not really worth spending time resolving.
More information about the dev
mailing list