diff mbox series

[ovs-dev,dpdk-latest] acinclude: Use standardized DPDK component defines.

Message ID 20210902124024.3781577-1-sunil.pai.g@intel.com
State Superseded
Headers show
Series [ovs-dev,dpdk-latest] acinclude: Use standardized DPDK component defines. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Pai G, Sunil Sept. 2, 2021, 12:40 p.m. UTC
The DPDK component defines have been renamed from:
RTE_LIBRTE_* to macro's of the form:
"RTE_" + <class> + "_" + drivername
as documented in [1].
This commit replaces the old macro's with new ones.

Macro's changed:
        OLD                   NEW
     ---------            ----------
RTE_LIBRTE_PMD_PCAP   --> RTE_NET_PCAP
RTE_LIBRTE_PMD_AF_XDP --> RTE_NET_AF_XDP
RTE_LIBRTE_MLX5_PMD   --> RTE_NET_MLX5
RTE_LIBRTE_MLX4_PMD   --> RTE_NET_MLX4

[1] http://git.dpdk.org/dpdk/commit/?id=a20b2c01a7a159609fb732e3ec51b91440a1bf62

Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com>
---
 acinclude.m4 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

David Marchand Sept. 2, 2021, 3:04 p.m. UTC | #1
On Thu, Sep 2, 2021 at 2:41 PM Sunil Pai G <sunil.pai.g@intel.com> wrote:
>
> The DPDK component defines have been renamed from:
> RTE_LIBRTE_* to macro's of the form:
> "RTE_" + <class> + "_" + drivername
> as documented in [1].
> This commit replaces the old macro's with new ones.
>
> Macro's changed:
>         OLD                   NEW
>      ---------            ----------
> RTE_LIBRTE_PMD_PCAP   --> RTE_NET_PCAP
> RTE_LIBRTE_PMD_AF_XDP --> RTE_NET_AF_XDP
> RTE_LIBRTE_MLX5_PMD   --> RTE_NET_MLX5
> RTE_LIBRTE_MLX4_PMD   --> RTE_NET_MLX4
>
> [1] http://git.dpdk.org/dpdk/commit/?id=a20b2c01a7a159609fb732e3ec51b91440a1bf62

Good catch.

The real issue is in v21.02 commit 762bfccc8abf ("config: remove
compatibility build defines") which breaks OVS checks.
I would explain this in the commitlog.


The [1] commit from v20.11 preserved the old macros.
This means v20.11 has both old and new macros, so we can already take
this patch in the master branch (but I would not backport to 2.15 and
2.16 though, nothing broken there).

(soon finished) Test for master here:
https://github.com/david-marchand/ovs/actions/runs/1194643148

Ilya, Ian, wdyt?


>
> Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com>
> ---
>  acinclude.m4 | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index dba365ea1..8ab690f47 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -446,11 +446,11 @@ AC_DEFUN([OVS_CHECK_DPDK], [
>        OVS_FIND_DEPENDENCY([get_mempolicy], [numa], [libnuma])
>      ], [], [[#include <rte_config.h>]])
>
> -    AC_CHECK_DECL([RTE_LIBRTE_PMD_PCAP], [
> +    AC_CHECK_DECL([RTE_NET_PCAP], [
>        OVS_FIND_DEPENDENCY([pcap_dump_close], [pcap], [libpcap])
>      ], [], [[#include <rte_config.h>]])
>
> -    AC_CHECK_DECL([RTE_LIBRTE_PMD_AF_XDP], [
> +    AC_CHECK_DECL([RTE_NET_AF_XDP], [
>        LIBBPF_LDADD="-lbpf"
>      ], [], [[#include <rte_config.h>]])
>
> @@ -458,14 +458,14 @@ AC_DEFUN([OVS_CHECK_DPDK], [
>        AC_DEFINE([VHOST_NUMA], [1], [NUMA Aware vHost support detected in DPDK.])
>      ], [], [[#include <rte_config.h>]])
>
> -    AC_CHECK_DECL([RTE_LIBRTE_MLX5_PMD], [dnl found
> +    AC_CHECK_DECL([RTE_NET_MLX5], [dnl found
>        AC_CHECK_DECL([RTE_IBVERBS_LINK_DLOPEN], [], [dnl not found
>          OVS_FIND_DEPENDENCY([mlx5dv_create_wq], [mlx5], [libmlx5])
>          OVS_FIND_DEPENDENCY([verbs_init_cq], [ibverbs], [libibverbs])
>        ], [[#include <rte_config.h>]])
>      ], [], [[#include <rte_config.h>]])
>
> -    AC_CHECK_DECL([RTE_LIBRTE_MLX4_PMD], [dnl found
> +    AC_CHECK_DECL([RTE_NET_MLX4], [dnl found
>        AC_CHECK_DECL([RTE_IBVERBS_LINK_DLOPEN], [], [dnl not found
>          OVS_FIND_DEPENDENCY([mlx4dv_init_obj], [mlx4], [libmlx4])
>          OVS_FIND_DEPENDENCY([verbs_init_cq], [ibverbs], [libibverbs])

Those lgtm.
I double checked other uses of dpdk macros and the remaining ones look fine.

Thanks.
Ilya Maximets Sept. 15, 2021, 11:30 p.m. UTC | #2
On 9/2/21 17:04, David Marchand wrote:
> On Thu, Sep 2, 2021 at 2:41 PM Sunil Pai G <sunil.pai.g@intel.com> wrote:
>>
>> The DPDK component defines have been renamed from:
>> RTE_LIBRTE_* to macro's of the form:
>> "RTE_" + <class> + "_" + drivername
>> as documented in [1].
>> This commit replaces the old macro's with new ones.
>>
>> Macro's changed:
>>         OLD                   NEW
>>      ---------            ----------
>> RTE_LIBRTE_PMD_PCAP   --> RTE_NET_PCAP
>> RTE_LIBRTE_PMD_AF_XDP --> RTE_NET_AF_XDP
>> RTE_LIBRTE_MLX5_PMD   --> RTE_NET_MLX5
>> RTE_LIBRTE_MLX4_PMD   --> RTE_NET_MLX4
>>
>> [1] http://git.dpdk.org/dpdk/commit/?id=a20b2c01a7a159609fb732e3ec51b91440a1bf62
> 
> Good catch.
> 
> The real issue is in v21.02 commit 762bfccc8abf ("config: remove
> compatibility build defines") which breaks OVS checks.
> I would explain this in the commitlog.
> 
> 
> The [1] commit from v20.11 preserved the old macros.
> This means v20.11 has both old and new macros, so we can already take
> this patch in the master branch (but I would not backport to 2.15 and
> 2.16 though, nothing broken there).
> 
> (soon finished) Test for master here:
> https://github.com/david-marchand/ovs/actions/runs/1194643148
> 
> Ilya, Ian, wdyt?

I think it make sense to just apply to master since we can do that.

Sunil, could you, please, update the commit message and re-send the
patch for master barnch?

Best regards, Ilya Maximets.

> 
> 
>>
>> Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com>
>> ---
>>  acinclude.m4 | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/acinclude.m4 b/acinclude.m4
>> index dba365ea1..8ab690f47 100644
>> --- a/acinclude.m4
>> +++ b/acinclude.m4
>> @@ -446,11 +446,11 @@ AC_DEFUN([OVS_CHECK_DPDK], [
>>        OVS_FIND_DEPENDENCY([get_mempolicy], [numa], [libnuma])
>>      ], [], [[#include <rte_config.h>]])
>>
>> -    AC_CHECK_DECL([RTE_LIBRTE_PMD_PCAP], [
>> +    AC_CHECK_DECL([RTE_NET_PCAP], [
>>        OVS_FIND_DEPENDENCY([pcap_dump_close], [pcap], [libpcap])
>>      ], [], [[#include <rte_config.h>]])
>>
>> -    AC_CHECK_DECL([RTE_LIBRTE_PMD_AF_XDP], [
>> +    AC_CHECK_DECL([RTE_NET_AF_XDP], [
>>        LIBBPF_LDADD="-lbpf"
>>      ], [], [[#include <rte_config.h>]])
>>
>> @@ -458,14 +458,14 @@ AC_DEFUN([OVS_CHECK_DPDK], [
>>        AC_DEFINE([VHOST_NUMA], [1], [NUMA Aware vHost support detected in DPDK.])
>>      ], [], [[#include <rte_config.h>]])
>>
>> -    AC_CHECK_DECL([RTE_LIBRTE_MLX5_PMD], [dnl found
>> +    AC_CHECK_DECL([RTE_NET_MLX5], [dnl found
>>        AC_CHECK_DECL([RTE_IBVERBS_LINK_DLOPEN], [], [dnl not found
>>          OVS_FIND_DEPENDENCY([mlx5dv_create_wq], [mlx5], [libmlx5])
>>          OVS_FIND_DEPENDENCY([verbs_init_cq], [ibverbs], [libibverbs])
>>        ], [[#include <rte_config.h>]])
>>      ], [], [[#include <rte_config.h>]])
>>
>> -    AC_CHECK_DECL([RTE_LIBRTE_MLX4_PMD], [dnl found
>> +    AC_CHECK_DECL([RTE_NET_MLX4], [dnl found
>>        AC_CHECK_DECL([RTE_IBVERBS_LINK_DLOPEN], [], [dnl not found
>>          OVS_FIND_DEPENDENCY([mlx4dv_init_obj], [mlx4], [libmlx4])
>>          OVS_FIND_DEPENDENCY([verbs_init_cq], [ibverbs], [libibverbs])
> 
> Those lgtm.
> I double checked other uses of dpdk macros and the remaining ones look fine.
> 
> Thanks.
> 
>
Pai G, Sunil Sept. 16, 2021, 6:16 a.m. UTC | #3
Thanks for the review David and Ilya !
V2 has been sent with updated commit message targeting master : http://patchwork.ozlabs.org/project/openvswitch/patch/20210916061106.44853-1-sunil.pai.g@intel.com/ 

<snipped>

Regards,
Sunil
diff mbox series

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index dba365ea1..8ab690f47 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -446,11 +446,11 @@  AC_DEFUN([OVS_CHECK_DPDK], [
       OVS_FIND_DEPENDENCY([get_mempolicy], [numa], [libnuma])
     ], [], [[#include <rte_config.h>]])
 
-    AC_CHECK_DECL([RTE_LIBRTE_PMD_PCAP], [
+    AC_CHECK_DECL([RTE_NET_PCAP], [
       OVS_FIND_DEPENDENCY([pcap_dump_close], [pcap], [libpcap])
     ], [], [[#include <rte_config.h>]])
 
-    AC_CHECK_DECL([RTE_LIBRTE_PMD_AF_XDP], [
+    AC_CHECK_DECL([RTE_NET_AF_XDP], [
       LIBBPF_LDADD="-lbpf"
     ], [], [[#include <rte_config.h>]])
 
@@ -458,14 +458,14 @@  AC_DEFUN([OVS_CHECK_DPDK], [
       AC_DEFINE([VHOST_NUMA], [1], [NUMA Aware vHost support detected in DPDK.])
     ], [], [[#include <rte_config.h>]])
 
-    AC_CHECK_DECL([RTE_LIBRTE_MLX5_PMD], [dnl found
+    AC_CHECK_DECL([RTE_NET_MLX5], [dnl found
       AC_CHECK_DECL([RTE_IBVERBS_LINK_DLOPEN], [], [dnl not found
         OVS_FIND_DEPENDENCY([mlx5dv_create_wq], [mlx5], [libmlx5])
         OVS_FIND_DEPENDENCY([verbs_init_cq], [ibverbs], [libibverbs])
       ], [[#include <rte_config.h>]])
     ], [], [[#include <rte_config.h>]])
 
-    AC_CHECK_DECL([RTE_LIBRTE_MLX4_PMD], [dnl found
+    AC_CHECK_DECL([RTE_NET_MLX4], [dnl found
       AC_CHECK_DECL([RTE_IBVERBS_LINK_DLOPEN], [], [dnl not found
         OVS_FIND_DEPENDENCY([mlx4dv_init_obj], [mlx4], [libmlx4])
         OVS_FIND_DEPENDENCY([verbs_init_cq], [ibverbs], [libibverbs])