Skip to contentSkip to conversation

net/mlx5: include wq.o in non-ethernet build for FPGA

PATCH In review Arnd Bergmann 3 participants 5 messages Jun 30, 2017 – Jul 3, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: include wq.o in non-ethernet build for FPGA

Both the ethernet and FPGA portions of MLX5 now require the wq functions, and we get a link error when CONFIG_MLX5_CORE_EN is disabled:

drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.o: In function `mlx5_fpga_conn_create_cq':
conn.c:(.text+0x10b3): undefined reference to mlx5_cqwq_create' conn.c:(.text+0x10c6): undefined reference to mlx5_cqwq_get_size' conn.c:(.text+0x12bc): undefined reference to `mlx5_cqwq_destroy'

This includes the library in the core driver also when only the fpga support is enabled.

Fixes 537a50574175 ("net/mlx5: FPGA, Add high-speed connection routines")
---
 drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/Makefile +1 -1
index ca367445f864..50fe9e3c5dc2 100644
@@ -9,7 +9,7 @@ mlx5_core-y :=	main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \
 mlx5_core-$(CONFIG_MLX5_ACCEL) += accel/ipsec.o
 
 mlx5_core-$(CONFIG_MLX5_FPGA) += fpga/cmd.o fpga/core.o fpga/conn.o fpga/sdk.o \
-		fpga/ipsec.o
+		fpga/ipsec.o wq.o
 
 mlx5_core-$(CONFIG_MLX5_CORE_EN) += wq.o eswitch.o eswitch_offloads.o \
 		en_main.o en_common.o en_fs.o en_ethtool.o en_tx.o \
Signature · 1 line
2.9.0
#1 lore raw

PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBBcm5kIEJlcmdtYW5uIFttYWls dG86YXJuZEBhcm5kYi5kZV0NCj4gU3ViamVjdDogW1BBVENIXSBbbmV0LW5leHRdIG5ldC9tbHg1 OiBpbmNsdWRlIHdxLm8gaW4gbm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Fpbi5vIGVuX2NvbW1vbi5vIGVuX2ZzLm8gZW5fZXRodG9vbC5vIGVuX3R4Lm8gXA0KPiAtLQ0K PiAyLjkuMA0KDQo=
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 9 lines · Ilan Tayari
Quoted 9 lines
drivers/net/ethernet/mellanox/mlx5/core/Makefile +0 -0
index ca367445f864..50fe9e3c5dc2 100644
@@ -9,7 +9,7 @@ mlx5_core-y :=        main.o cmd.o debugfs.o fw.o eq.o uar.o
 pagealloc.o \
 mlx5_core-$(CONFIG_MLX5_ACCEL) += accel/ipsec.o
 
Quoted 7 lines

drivers/net/ethernet/mellanox/mlx5/core/Makefile mlx5_core-y := main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \ · line 12

Quoted 4 lines
drivers/net/ethernet/mellanox/mlx5/core/Makefile +1 -1
 mlx5_core-$(CONFIG_MLX5_FPGA) += fpga/cmd.o fpga/core.o fpga/conn.o
 fpga/sdk.o \
-             fpga/ipsec.o
+             fpga/ipsec.o wq.o

I believe we would prefer to move wq.o to mlx5_core-y. Otherwise you might build it twice.

That's not a problem, Kbuild is smart enough to drop duplicate object files that get built into the same module.

If you think it's less confusing to readers of this file if it gets put into core,
that's fine though, the only downside would be adding a little bit of code bloat for users that want neither the ethernet nor the fpga code (if that is a realistic use case).

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 19 lines · Arnd Bergmann
Quoted 9 lines · Ilan Tayari
Quoted 9 lines
drivers/net/ethernet/mellanox/mlx5/core/Makefile +0 -0
index ca367445f864..50fe9e3c5dc2 100644
@@ -9,7 +9,7 @@ mlx5_core-y :=        main.o cmd.o debugfs.o fw.o eq.o uar.o
 pagealloc.o \
 mlx5_core-$(CONFIG_MLX5_ACCEL) += accel/ipsec.o
 
Quoted 7 lines

drivers/net/ethernet/mellanox/mlx5/core/Makefile mlx5_core-y := main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \ · line 12

Quoted 4 lines
drivers/net/ethernet/mellanox/mlx5/core/Makefile +1 -1
 mlx5_core-$(CONFIG_MLX5_FPGA) += fpga/cmd.o fpga/core.o fpga/conn.o
 fpga/sdk.o \
-             fpga/ipsec.o
+             fpga/ipsec.o wq.o

I believe we would prefer to move wq.o to mlx5_core-y. Otherwise you might build it twice.

Quoted 8 lines

That's not a problem, Kbuild is smart enough to drop duplicate object files that get built into the same module.

If you think it's less confusing to readers of this file if it gets put into core,
that's fine though, the only downside would be adding a little bit of code bloat for users that want neither the ethernet nor the fpga code (if that is a realistic use case).

Hi Arnd,

Thanks for the patch, your solution is good enough, but let's avoid confusing developers with such duplications.
since the Makefile might get messy if we will keep using this method.

I suggest to move wq.o to core or make MLX5_FPGA depend on MLX5_CORE_EN. I will discuss this with Ilan and we will provide the fix ASAP.

Thanks,
Saeed.

Quoted 6 lines

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 29 lines · Saeed Mahameed
Quoted 19 lines · Arnd Bergmann
Quoted 9 lines · Ilan Tayari
Quoted 9 lines
drivers/net/ethernet/mellanox/mlx5/core/Makefile +0 -0
index ca367445f864..50fe9e3c5dc2 100644
@@ -9,7 +9,7 @@ mlx5_core-y :=        main.o cmd.o debugfs.o fw.o eq.o uar.o
 pagealloc.o \
 mlx5_core-$(CONFIG_MLX5_ACCEL) += accel/ipsec.o
 
Quoted 7 lines

drivers/net/ethernet/mellanox/mlx5/core/Makefile mlx5_core-y := main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \ · line 12

Quoted 4 lines
drivers/net/ethernet/mellanox/mlx5/core/Makefile +1 -1
 mlx5_core-$(CONFIG_MLX5_FPGA) += fpga/cmd.o fpga/core.o fpga/conn.o
 fpga/sdk.o \
-             fpga/ipsec.o
+             fpga/ipsec.o wq.o

I believe we would prefer to move wq.o to mlx5_core-y. Otherwise you might build it twice.

Quoted 8 lines

That's not a problem, Kbuild is smart enough to drop duplicate object files that get built into the same module.

If you think it's less confusing to readers of this file if it gets put into core,
that's fine though, the only downside would be adding a little bit of code bloat for users that want neither the ethernet nor the fpga code (if that is a realistic use case).

Quoted 8 lines

Hi Arnd,

Thanks for the patch, your solution is good enough, but let's avoid confusing developers with such duplications.
since the Makefile might get messy if we will keep using this method.

I suggest to move wq.o to core or make MLX5_FPGA depend on MLX5_CORE_EN. I will discuss this with Ilan and we will provide the fix ASAP.

Ok, sounds good. Thanks!

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html