[PATCH v4] net/af_xdp: fix missing UMEM feature
Bruce Richardson
bruce.richardson at intel.com
Mon Oct 2 15:01:35 CEST 2023
On Mon, Oct 02, 2023 at 12:48:52PM +0000, Shibin Koikkara Reeny wrote:
> Shared UMEM feature is missing in the af_xdp driver build
> after the commit 33d66940e9ba ("build: use C11 standard").
>
> Runtime Error log while using Shared UMEM feature:
> rte_pmd_af_xdp_probe(): Initializing pmd_af_xdp for net_af_xdp0
> init_internals(): Shared UMEM feature not available. Check kernel
> and libbpf version
> rte_pmd_af_xdp_probe(): Failed to init internals
> vdev_probe(): failed to initialize net_af_xdp0 device
> EAL: Bus (vdev) probe failed.
>
> Reason for the missing UMEM feature is because the C11 standard
> doesn't include the GNU compiler extensions typeof and asm, used
> by the libbpf and libxdp header files.
>
> Meson error log:
> In file included from
> dpdk/build/meson-private/tmpf74nkhqd/testfile.c:5:
> /usr/local/include/bpf/xsk.h: In function 'xsk_prod_nb_free':
> /usr/local/include/bpf/xsk.h:165:26: error: expected ';' before '___p1'
> 165 | r->cached_cons = libbpf_smp_load_acquire(r->consumer);
> | ^~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/include/bpf/xsk.h:165:26: error: 'asm' undeclared (first use
> in this function)
> ...
> /usr/local/include/bpf/xsk.h:199:9: error: unknown type name 'typeof'
> 199 | libbpf_smp_store_release(prod->producer, *prod->producer
> + nb);
> | ^~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix is to provide alternative keywords by using macros [1].
>
> Fixes: 33d66940e9ba ("build: use C11 standard")
>
> [1] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html
>
> v4: Updated the commit message.
> v3: Used alternative keywords fix.
> v2: Added original commit causing the issue.
>
> Signed-off-by: Shibin Koikkara Reeny <shibin.koikkara.reeny at intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list