patches for DPDK stable branches
 help / color / mirror / Atom feed
* Re: [PATCH] net/af_xdp: pass cflags to appropriate build components
       [not found] <20230921102923.65738-1-shibin.koikkara.reeny@intel.com>
@ 2023-09-21 10:43 ` Bruce Richardson
  2023-09-22  9:31 ` [PATCH v2] net/af_xdp: fix cflags to appropriate UMEM feature Shibin Koikkara Reeny
  1 sibling, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2023-09-21 10:43 UTC (permalink / raw)
  To: Shibin Koikkara Reeny
  Cc: dev, ciara.loftus, qi.z.zhang, john.mcnamara, stable

On Thu, Sep 21, 2023 at 10:29:23AM +0000, Shibin Koikkara Reeny wrote:
> Commit 33d66940e9ba ("build: use C11 standard") enforces
> the C11 standard so some changes need to be made to the
> af_xdp driver meson build to ensure that the appropriate
> cflags are passed when checking if certain functions are
> available in the libbpf/libxdp libraries.
> 
> Fixes: 33d66940e9ba ("build: use C11 standard")

Not sure if that is the correct offending commit, or just the commit that
exposes the already-present issue. I'd add the following also to the commit
log:

Fixes: e024c7e838fc ("net/af_xdp: avoid version-based check for shared UMEM")

That fixline would imply a possible backport though, but no issue has been
seen on versions of DPDK not using C11, so I think we skip backporting this
for now. Putting stable@dpdk.org on CC in case the LTS maintainers have
additional input.

For the code fix itself:
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Signed-off-by: Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
> ---
>  drivers/net/af_xdp/meson.build | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
> index 9a8dbb4d49..3319acca65 100644
> --- a/drivers/net/af_xdp/meson.build
> +++ b/drivers/net/af_xdp/meson.build
> @@ -56,17 +56,17 @@ if build
>    '''
>  
>    if cc.has_function('xsk_socket__create_shared', prefix : xsk_check_prefix,
> -                     dependencies : ext_deps)
> +                     dependencies : ext_deps, args: cflags)
>        cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM']
>    endif
>    if cc.has_function('bpf_object__next_program',
>                       prefix : '#include <bpf/libbpf.h>',
> -                     dependencies : bpf_dep)
> +                     dependencies : bpf_dep, args: cflags)
>        cflags += ['-DRTE_NET_AF_XDP_LIBBPF_OBJ_OPEN']
>    endif
>    if cc.has_function('bpf_xdp_attach',
>                       prefix : '#include <bpf/libbpf.h>',
> -                     dependencies : bpf_dep)
> +                     dependencies : bpf_dep, args: cflags)
>        cflags += ['-DRTE_NET_AF_XDP_LIBBPF_XDP_ATTACH']
>    endif
>  endif
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v2] net/af_xdp: fix cflags to appropriate UMEM feature
       [not found] <20230921102923.65738-1-shibin.koikkara.reeny@intel.com>
  2023-09-21 10:43 ` [PATCH] net/af_xdp: pass cflags to appropriate build components Bruce Richardson
@ 2023-09-22  9:31 ` Shibin Koikkara Reeny
  1 sibling, 0 replies; 2+ messages in thread
From: Shibin Koikkara Reeny @ 2023-09-22  9:31 UTC (permalink / raw)
  To: dev, ciara.loftus, bruce.richardson
  Cc: qi.z.zhang, john.mcnamara, stable, Shibin Koikkara Reeny

Fix missing RTE_NET_AF_XDP_SHARED_UMEM flag in
xsk_socket__create_shared().

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.

Fixes: e024c7e838fc ("net/af_xdp: avoid version-based check for shared UMEM")
Fixes: 33d66940e9ba ("build: use C11 standard")

Fix is for the commit e024c7e838fc ("net/af_xdp: avoid
version-based check for shared UMEM") fixline would imply
a possible backport though, but no issue has been seen on
version of DPDK not using C11, so I will be skipping
backporting this for now.
Commit 33d66940e9ba ("build: use C11 standard") enforces
the C11 standard so some changes need to be made to the
af_xdp driver meson build to ensure that the appropriate
cflags are passed when checking if certain functions are
available in the libbpf/libxdp libraries.

Signed-off-by: Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
---
 drivers/net/af_xdp/meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index 9a8dbb4d49..3319acca65 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -56,17 +56,17 @@ if build
   '''
 
   if cc.has_function('xsk_socket__create_shared', prefix : xsk_check_prefix,
-                     dependencies : ext_deps)
+                     dependencies : ext_deps, args: cflags)
       cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM']
   endif
   if cc.has_function('bpf_object__next_program',
                      prefix : '#include <bpf/libbpf.h>',
-                     dependencies : bpf_dep)
+                     dependencies : bpf_dep, args: cflags)
       cflags += ['-DRTE_NET_AF_XDP_LIBBPF_OBJ_OPEN']
   endif
   if cc.has_function('bpf_xdp_attach',
                      prefix : '#include <bpf/libbpf.h>',
-                     dependencies : bpf_dep)
+                     dependencies : bpf_dep, args: cflags)
       cflags += ['-DRTE_NET_AF_XDP_LIBBPF_XDP_ATTACH']
   endif
 endif
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-22  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230921102923.65738-1-shibin.koikkara.reeny@intel.com>
2023-09-21 10:43 ` [PATCH] net/af_xdp: pass cflags to appropriate build components Bruce Richardson
2023-09-22  9:31 ` [PATCH v2] net/af_xdp: fix cflags to appropriate UMEM feature Shibin Koikkara Reeny

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).