net/af_xdp: fix custom program loading with multiple queues
authorJunxiao Shi <git@mail1.yoursunny.com>
Wed, 9 Mar 2022 21:18:43 +0000 (21:18 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 14 Mar 2022 08:39:00 +0000 (09:39 +0100)
commit6f6134c35e3d2340e07f86414c75413e3ac7a0bc
tree39b33d78a84d65a0286af80ea8f3340f2d1bee28
parentd8ded501e05ce879f27f0ed1df7721a88b737e25
net/af_xdp: fix custom program loading with multiple queues

When the PMD is configured to load a custom XDP program, it sets
XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD flag to prevent libbpf from
loading its default XDP program. However, when queue_count is set to
greater than 1, this flag is only set for the first XSK socket but not
for subsequent XSK sockets. This causes XSK socket creation failure.

This commit ensures that XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD flag is
set for all XSK socket creations when custom XDP program is being used.

Fixes: 01fa83c94d7e ("net/af_xdp: workaround custom program loading")
Cc: stable@dpdk.org
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
drivers/net/af_xdp/rte_eth_af_xdp.c