DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/af_xdp: limit libbpf version to <= v0.7.0
@ 2022-06-24  6:06 Ciara Loftus
  2022-06-24  8:28 ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Ciara Loftus @ 2022-06-24  6:06 UTC (permalink / raw)
  To: dev; +Cc: thomas, ferruh.yigit, Ciara Loftus

Linking with libbpf v0.8.0 causes deprication warnings. As a temporary
measure, prevent linking with libbpf versions v0.8.0 and greater. This
limitation should be removed in the future when appropriate
compatibility measures are introduced.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 doc/guides/nics/af_xdp.rst     | 3 ++-
 drivers/net/af_xdp/meson.build | 7 ++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst
index 56681c8365..46738e089d 100644
--- a/doc/guides/nics/af_xdp.rst
+++ b/doc/guides/nics/af_xdp.rst
@@ -43,7 +43,8 @@ Prerequisites
 This is a Linux-specific PMD, thus the following prerequisites apply:
 
 *  A Linux Kernel (version > v4.18) with XDP sockets configuration enabled;
-*  Both libxdp >=v1.2.2 and libbpf libraries installed, or, libbpf <=v0.6.0
+*  Both libxdp >=v1.2.2 and libbpf <=v0.7.0 libraries installed, or, libbpf
+   <=v0.6.0.
 *  If using libxdp, it requires an environment variable called
    LIBXDP_OBJECT_PATH to be set to the location of where libxdp placed its bpf
    object files. This is usually in /usr/local/lib/bpf or /usr/local/lib64/bpf.
diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index 1e0de23705..52862e90a1 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -10,10 +10,7 @@ endif
 sources = files('rte_eth_af_xdp.c')
 
 xdp_dep = dependency('libxdp', version : '>=1.2.2', required: false, method: 'pkg-config')
-bpf_dep = dependency('libbpf', required: false, method: 'pkg-config')
-if not bpf_dep.found()
-    bpf_dep = cc.find_library('bpf', required: false)
-endif
+bpf_dep = dependency('libbpf', version : '<=0.7.0', required: false, method: 'pkg-config')
 
 if cc.has_header('linux/if_xdp.h')
     if xdp_dep.found() and cc.has_header('xdp/xsk.h')
@@ -29,7 +26,7 @@ if cc.has_header('linux/if_xdp.h')
             endif
         else
             build = false
-            reason = 'missing dependency, libbpf'
+            reason = 'missing dependency, libbpf <= v0.7.0'
         endif
     elif bpf_dep.found() and cc.has_header('bpf/xsk.h') and cc.has_header('bpf/bpf.h')
         # libxdp not found. Rely solely on libbpf for xsk functionality
-- 
2.25.1


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

* Re: [PATCH] net/af_xdp: limit libbpf version to <= v0.7.0
  2022-06-24  6:06 [PATCH] net/af_xdp: limit libbpf version to <= v0.7.0 Ciara Loftus
@ 2022-06-24  8:28 ` Thomas Monjalon
  2022-06-24  8:37   ` Loftus, Ciara
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2022-06-24  8:28 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dev, ferruh.yigit

24/06/2022 08:06, Ciara Loftus:
> Linking with libbpf v0.8.0 causes deprication warnings. As a temporary
> measure, prevent linking with libbpf versions v0.8.0 and greater. This
> limitation should be removed in the future when appropriate
> compatibility measures are introduced.
> 
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> -bpf_dep = dependency('libbpf', required: false, method: 'pkg-config')
> -if not bpf_dep.found()
> -    bpf_dep = cc.find_library('bpf', required: false)
> -endif
> +bpf_dep = dependency('libbpf', version : '<=0.7.0', required: false, method: 'pkg-config')

It is also removing the find_library() method.
Any reason it was there?



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

* RE: [PATCH] net/af_xdp: limit libbpf version to <= v0.7.0
  2022-06-24  8:28 ` Thomas Monjalon
@ 2022-06-24  8:37   ` Loftus, Ciara
  2022-06-24 10:10     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Loftus, Ciara @ 2022-06-24  8:37 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, ferruh.yigit

> 
> 24/06/2022 08:06, Ciara Loftus:
> > Linking with libbpf v0.8.0 causes deprication warnings. As a temporary
> > measure, prevent linking with libbpf versions v0.8.0 and greater. This
> > limitation should be removed in the future when appropriate
> > compatibility measures are introduced.
> >
> > Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> > ---
> > -bpf_dep = dependency('libbpf', required: false, method: 'pkg-config')
> > -if not bpf_dep.found()
> > -    bpf_dep = cc.find_library('bpf', required: false)
> > -endif
> > +bpf_dep = dependency('libbpf', version : '<=0.7.0', required: false,
> method: 'pkg-config')
> 
> It is also removing the find_library() method.
> Any reason it was there?
> 

My understanding is that one can't check the library version using that method.
So it was a valid method of picking up the library until now where we always need to check the version before linking.

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

* Re: [PATCH] net/af_xdp: limit libbpf version to <= v0.7.0
  2022-06-24  8:37   ` Loftus, Ciara
@ 2022-06-24 10:10     ` Thomas Monjalon
  2022-06-24 11:48       ` Andrew Rybchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2022-06-24 10:10 UTC (permalink / raw)
  To: Loftus, Ciara; +Cc: dev, ferruh.yigit

24/06/2022 10:37, Loftus, Ciara:
> > 
> > 24/06/2022 08:06, Ciara Loftus:
> > > Linking with libbpf v0.8.0 causes deprication warnings. As a temporary
> > > measure, prevent linking with libbpf versions v0.8.0 and greater. This
> > > limitation should be removed in the future when appropriate
> > > compatibility measures are introduced.
> > >
> > > Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> > > ---
> > > -bpf_dep = dependency('libbpf', required: false, method: 'pkg-config')
> > > -if not bpf_dep.found()
> > > -    bpf_dep = cc.find_library('bpf', required: false)
> > > -endif
> > > +bpf_dep = dependency('libbpf', version : '<=0.7.0', required: false,
> > method: 'pkg-config')
> > 
> > It is also removing the find_library() method.
> > Any reason it was there?
> > 
> 
> My understanding is that one can't check the library version using that method.
> So it was a valid method of picking up the library until now where we always need to check the version before linking.

OK I see



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

* Re: [PATCH] net/af_xdp: limit libbpf version to <= v0.7.0
  2022-06-24 10:10     ` Thomas Monjalon
@ 2022-06-24 11:48       ` Andrew Rybchenko
  2022-07-07 11:19         ` Andrew Rybchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Rybchenko @ 2022-06-24 11:48 UTC (permalink / raw)
  To: Thomas Monjalon, Loftus, Ciara; +Cc: dev, ferruh.yigit

On 6/24/22 13:10, Thomas Monjalon wrote:
> 24/06/2022 10:37, Loftus, Ciara:
>>>
>>> 24/06/2022 08:06, Ciara Loftus:
>>>> Linking with libbpf v0.8.0 causes deprication warnings. As a temporary
>>>> measure, prevent linking with libbpf versions v0.8.0 and greater. This
>>>> limitation should be removed in the future when appropriate
>>>> compatibility measures are introduced.
>>>>
>>>> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
>>>> ---
>>>> -bpf_dep = dependency('libbpf', required: false, method: 'pkg-config')
>>>> -if not bpf_dep.found()
>>>> -    bpf_dep = cc.find_library('bpf', required: false)
>>>> -endif
>>>> +bpf_dep = dependency('libbpf', version : '<=0.7.0', required: false,
>>> method: 'pkg-config')
>>>
>>> It is also removing the find_library() method.
>>> Any reason it was there?
>>>
>>
>> My understanding is that one can't check the library version using that method.
>> So it was a valid method of picking up the library until now where we always need to check the version before linking.
> 
> OK I see

IMHO checking library version is a bad approach. We should file
the library of whatever version and check for symbols etc in it
and provide corresponding HAVE_ defines to handle it in code.

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

* Re: [PATCH] net/af_xdp: limit libbpf version to <= v0.7.0
  2022-06-24 11:48       ` Andrew Rybchenko
@ 2022-07-07 11:19         ` Andrew Rybchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Rybchenko @ 2022-07-07 11:19 UTC (permalink / raw)
  To: Thomas Monjalon, Loftus, Ciara; +Cc: dev, ferruh.yigit

On 6/24/22 14:48, Andrew Rybchenko wrote:
> On 6/24/22 13:10, Thomas Monjalon wrote:
>> 24/06/2022 10:37, Loftus, Ciara:
>>>>
>>>> 24/06/2022 08:06, Ciara Loftus:
>>>>> Linking with libbpf v0.8.0 causes deprication warnings. As a temporary
>>>>> measure, prevent linking with libbpf versions v0.8.0 and greater. This
>>>>> limitation should be removed in the future when appropriate
>>>>> compatibility measures are introduced.
>>>>>
>>>>> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
>>>>> ---
>>>>> -bpf_dep = dependency('libbpf', required: false, method: 'pkg-config')
>>>>> -if not bpf_dep.found()
>>>>> -    bpf_dep = cc.find_library('bpf', required: false)
>>>>> -endif
>>>>> +bpf_dep = dependency('libbpf', version : '<=0.7.0', required: false,
>>>> method: 'pkg-config')
>>>>
>>>> It is also removing the find_library() method.
>>>> Any reason it was there?
>>>>
>>>
>>> My understanding is that one can't check the library version using 
>>> that method.
>>> So it was a valid method of picking up the library until now where we 
>>> always need to check the version before linking.
>>
>> OK I see
> 
> IMHO checking library version is a bad approach. We should file
> the library of whatever version and check for symbols etc in it
> and provide corresponding HAVE_ defines to handle it in code.

I'm marking the patch as discarded since it is a step in a wrong
direction.

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

end of thread, other threads:[~2022-07-07 11:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24  6:06 [PATCH] net/af_xdp: limit libbpf version to <= v0.7.0 Ciara Loftus
2022-06-24  8:28 ` Thomas Monjalon
2022-06-24  8:37   ` Loftus, Ciara
2022-06-24 10:10     ` Thomas Monjalon
2022-06-24 11:48       ` Andrew Rybchenko
2022-07-07 11:19         ` Andrew Rybchenko

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