Skip to contentSkip to conversation

net/bnxt: fix build issue

PATCH In review David Marchand 3 participants 7 messages Jul 9, 2020 – Jul 29, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix build issue

In existing build env, RTE_LIBRTE_BNXT_PMD_SYSTEM is unset. Testing against a n value does not work and we end up with a link issue:

/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_alloc':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1040: undefined reference
to `tf_em_ext_alloc'
/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_free':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1047: undefined reference
to `tf_em_ext_free'
collect2: error: ld returned 1 exit status
gmake[4]: *** [.../dpdk/mk/rte.lib.mk:95: librte_pmd_bnxt.so.20.0.3]
Error 1
gmake[3]: *** [.../dpdk/mk/rte.subdir.mk:35: bnxt] Error 2

Fixes b2da02480cb7 ("net/bnxt: support EEM system memory")
---
 drivers/net/bnxt/tf_core/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/bnxt/tf_core/Makefile +3 -3
index b4fbdd00fc..806471427c 100644
@@ -16,10 +16,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_msg.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_tbl.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_common.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_internal.c
-ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM), n)
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
+ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM),y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_system.c
 else
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM) += tf_core/tf_em_system.c
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
 endif
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_session.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_device.c
Signature · 1 line
2.23.0
#1 lore raw
Quoted 30 lines · David Marchand

In existing build env, RTE_LIBRTE_BNXT_PMD_SYSTEM is unset. Testing against a n value does not work and we end up with a link issue:

/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_alloc':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1040: undefined reference
to `tf_em_ext_alloc'
/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_free':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1047: undefined reference
to `tf_em_ext_free'
collect2: error: ld returned 1 exit status
gmake[4]: *** [.../dpdk/mk/rte.lib.mk:95: librte_pmd_bnxt.so.20.0.3]
Error 1
gmake[3]: *** [.../dpdk/mk/rte.subdir.mk:35: bnxt] Error 2

Fixes b2da02480cb7 ("net/bnxt: support EEM system memory")
---
 drivers/net/bnxt/tf_core/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/bnxt/tf_core/Makefile +0 -0
index b4fbdd00fc..806471427c 100644
@@ -16,10 +16,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_msg.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_tbl.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_common.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_internal.c

drivers/net/bnxt/tf_core/Makefile SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_msg.c · line 25

Quoted 10 lines
drivers/net/bnxt/tf_core/Makefile +3 -3
-ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM), n)
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
+ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM),y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_system.c
 else
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM) += tf_core/tf_em_system.c
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
 endif
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_session.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_device.c

Functionally this is same so no objection to the change, but I wonder why 'RTE_LIBRTE_BNXT_PMD_SYSTEM' is unset.

"CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM=n" is added to 'config/common_base' in the same patch that updates the Makefile, so it should be set.

Btw, @Ajit, @Peter, how this new flagged managed via meson?

#2 lore raw
Quoted 50 lines · Ferruh Yigit
Quoted 4 lines · David Marchand

In existing build env, RTE_LIBRTE_BNXT_PMD_SYSTEM is unset. Testing against a n value does not work and we end up with a link issue:

/usr/bin/ld: tf_core/tf_em_common.o: in function

`tf_em_ext_common_alloc':

Quoted 1 line

.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1040: undefined

reference

Quoted 3 lines

to `tf_em_ext_alloc'
/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_free':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1047: undefined

reference

Quoted 6 lines

to `tf_em_ext_free'
collect2: error: ld returned 1 exit status
gmake[4]: *** [.../dpdk/mk/rte.lib.mk:95: librte_pmd_bnxt.so.20.0.3]
Error 1
gmake[3]: *** [.../dpdk/mk/rte.subdir.mk:35: bnxt] Error 2

Review

Quoted 8 lines
Fixes b2da02480cb7 ("net/bnxt: support EEM system memory")
---
 drivers/net/bnxt/tf_core/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/drivers/net/bnxt/tf_core/Makefile

drivers/net/bnxt/tf_core/Makefile SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) +=

Quoted 4 lines

index b4fbdd00fc..806471427c 100644

drivers/net/bnxt/tf_core/Makefile +0 -0
@@ -16,10 +16,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) +=

tf_core/tf_msg.c

Quoted 4 lines
drivers/net/bnxt/tf_core/Makefile +0 -0
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_tbl.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_common.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_internal.c

drivers/net/bnxt/tf_core/Makefile SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_msg.c · line 25

Quoted 10 lines
drivers/net/bnxt/tf_core/Makefile +3 -3
-ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM), n)
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
+ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM),y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_system.c
 else
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM) += tf_core/tf_em_system.c
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
 endif
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_session.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_device.c

Functionally this is same so no objection to the change, but I wonder why 'RTE_LIBRTE_BNXT_PMD_SYSTEM' is unset.

Quoted 7 lines

"CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM=n" is added to 'config/common_base' in the
same patch that updates the Makefile, so it should be set.

Btw, @Ajit, @Peter, how this new flagged managed via meson?

I will sync with Peter and others in the team and we will get back on this.

Acked-by on v1 1/1
#3 lore raw
In reply to David Marchand
Quoted 14 lines · David Marchand

In existing build env, RTE_LIBRTE_BNXT_PMD_SYSTEM is unset. Testing against a n value does not work and we end up with a link issue:

/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_alloc':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1040: undefined reference
to `tf_em_ext_alloc'
/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_free':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1047: undefined reference
to `tf_em_ext_free'
collect2: error: ld returned 1 exit status
gmake[4]: *** [.../dpdk/mk/rte.lib.mk:95: librte_pmd_bnxt.so.20.0.3]
Error 1
gmake[3]: *** [.../dpdk/mk/rte.subdir.mk:35: bnxt] Error 2

Quoted 4 lines
Fixes b2da02480cb7 ("net/bnxt: support EEM system memory")
Quoted 27 lines
---
 drivers/net/bnxt/tf_core/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/bnxt/tf_core/Makefile +3 -4
index b4fbdd00fc..806471427c 100644
@@ -16,10 +16,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_msg.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_tbl.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_common.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_internal.c
-ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM), n)
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
+ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM),y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_system.c
 else
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM) += tf_core/tf_em_system.c
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
 endif
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_session.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_device.c
--

2.23.0

#4 lore raw
Quoted 19 lines · Ajit Khaparde
Quoted 14 lines · David Marchand

In existing build env, RTE_LIBRTE_BNXT_PMD_SYSTEM is unset. Testing against a n value does not work and we end up with a link issue:

/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_alloc':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1040: undefined reference
to `tf_em_ext_alloc'
/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_free':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1047: undefined reference
to `tf_em_ext_free'
collect2: error: ld returned 1 exit status
gmake[4]: *** [.../dpdk/mk/rte.lib.mk:95: librte_pmd_bnxt.so.20.0.3]
Error 1
gmake[3]: *** [.../dpdk/mk/rte.subdir.mk:35: bnxt] Error 2

Quoted 6 lines
Quoted 4 lines
Fixes b2da02480cb7 ("net/bnxt: support EEM system memory")

Patch applied to dpdk-next-net-brcm. Thanks

Quoted 29 lines
Quoted 29 lines

---
 drivers/net/bnxt/tf_core/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/bnxt/tf_core/Makefile +3 -4
index b4fbdd00fc..806471427c 100644
@@ -16,10 +16,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_msg.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_tbl.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_common.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_internal.c
-ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM), n)
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
+ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM),y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_system.c
 else
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM) += tf_core/tf_em_system.c
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
 endif
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_session.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_device.c
--

2.23.0

#5 lore raw
In reply to David Marchand
Quoted 14 lines · David Marchand

In existing build env, RTE_LIBRTE_BNXT_PMD_SYSTEM is unset. Testing against a n value does not work and we end up with a link issue:

/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_alloc':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1040: undefined reference
to `tf_em_ext_alloc'
/usr/bin/ld: tf_core/tf_em_common.o: in function `tf_em_ext_common_free':
.../dpdk/drivers/net/bnxt/tf_core/tf_em_common.c:1047: undefined reference
to `tf_em_ext_free'
collect2: error: ld returned 1 exit status
gmake[4]: *** [.../dpdk/mk/rte.lib.mk:95: librte_pmd_bnxt.so.20.0.3]
Error 1
gmake[3]: *** [.../dpdk/mk/rte.subdir.mk:35: bnxt] Error 2

Quoted 4 lines
Fixes b2da02480cb7 ("net/bnxt: support EEM system memory")

David,
I have submitted a patch [1]. With that memory management for Extended Exact Match is simplified. We won't need any config or meson option with that change.

[1] https://patchwork.dpdk.org/patch/74964/

Quoted 27 lines
---
 drivers/net/bnxt/tf_core/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/bnxt/tf_core/Makefile +3 -4
index b4fbdd00fc..806471427c 100644
@@ -16,10 +16,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_msg.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_tbl.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_common.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_internal.c
-ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM), n)
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
+ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM),y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_system.c
 else
-SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD_SYSTEM) += tf_core/tf_em_system.c
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_em_host.c
 endif
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_session.c
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_device.c
--

2.23.0

#6 lore raw

Hello Ajit,

Quoted 4 lines · Ajit Khaparde

I have submitted a patch [1]. With that memory management for Extended Exact Match is simplified. We won't need any config or meson option with that change.

Thanks for removing a build option :-).
You can drop my patch then.

Signature · 1 line
David Marchand