Skip to contentSkip to conversation

eth: mlx4: select PAGE_POOL

PATCH Applied Greg Thelen 3 participants 3 messages Apr 1, 2025 – Apr 2, 2025

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

PATCH 1/1 eth: mlx4: select PAGE_POOL

With commit 8533b14b3d65 ("eth: mlx4: create a page pool for Rx") mlx4 started using functions guarded by PAGE_POOL. This change introduced build errors when CONFIG_MLX4_EN is set but CONFIG_PAGE_POOL is not:

ld: vmlinux.o: in function `mlx4_en_alloc_frags':
en_rx.c:(.text+0xa5eaf9): undefined reference to `page_pool_alloc_pages'
ld: vmlinux.o: in function `mlx4_en_create_rx_ring':
(.text+0xa5ee91): undefined reference to `page_pool_create'

Make MLX4_EN select PAGE_POOL to fix the ml;x4 build errors.

Fixes 8533b14b3d65 ("eth: mlx4: create a page pool for Rx")
---
 drivers/net/ethernet/mellanox/mlx4/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mellanox/mlx4/Kconfig +1 -0
index 825e05fb8607..0b1cb340206f 100644
@@ -7,6 +7,7 @@ config MLX4_EN
 	tristate "Mellanox Technologies 1/10/40Gbit Ethernet support"
 	depends on PCI && NETDEVICES && ETHERNET && INET
 	depends on PTP_1588_CLOCK_OPTIONAL
+	select PAGE_POOL
 	select MLX4_CORE
 	help
 	  This driver supports Mellanox Technologies ConnectX Ethernet
Signature · 1 line
2.49.0.472.ge94155a9ec-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Greg Thelen

With commit 8533b14b3d65 ("eth: mlx4: create a page pool for Rx") mlx4 started using functions guarded by PAGE_POOL. This change introduced build errors when CONFIG_MLX4_EN is set but CONFIG_PAGE_POOL is not:

ld: vmlinux.o: in function `mlx4_en_alloc_frags':
en_rx.c:(.text+0xa5eaf9): undefined reference to `page_pool_alloc_pages'
ld: vmlinux.o: in function `mlx4_en_create_rx_ring':
(.text+0xa5ee91): undefined reference to `page_pool_create'

Make MLX4_EN select PAGE_POOL to fix the ml;x4 build errors.

Fixes 8533b14b3d65 ("eth: mlx4: create a page pool for Rx")
---
 drivers/net/ethernet/mellanox/mlx4/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mellanox/mlx4/Kconfig +0 -0
index 825e05fb8607..0b1cb340206f 100644

drivers/net/ethernet/mellanox/mlx4/Kconfig config MLX4_EN · line 10

Quoted 4 lines
drivers/net/ethernet/mellanox/mlx4/Kconfig +1 -0
@@ -7,6 +7,7 @@ config MLX4_EN
 	tristate "Mellanox Technologies 1/10/40Gbit Ethernet support"
 	depends on PCI && NETDEVICES && ETHERNET && INET
 	depends on PTP_1588_CLOCK_OPTIONAL
+	select PAGE_POOL

I didn't look, but I assume that mlx4 does not use page pool stats?

If it does, there might be a follow-up change to select PAGE_POOL_STATS?

#2 lore raw
In reply to Greg Thelen
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Mon, 31 Mar 2025 18:53:15 -0700 you wrote:

With commit 8533b14b3d65 ("eth: mlx4: create a page pool for Rx") mlx4 started using functions guarded by PAGE_POOL. This change introduced build errors when CONFIG_MLX4_EN is set but CONFIG_PAGE_POOL is not:

ld: vmlinux.o: in function `mlx4_en_alloc_frags':
en_rx.c:(.text+0xa5eaf9): undefined reference to `page_pool_alloc_pages'
ld: vmlinux.o: in function `mlx4_en_create_rx_ring':
(.text+0xa5ee91): undefined reference to `page_pool_create'

[...]

Here is the summary with links:
- eth: mlx4: select PAGE_POOL

    https://git.kernel.org/netdev/net/c/d3210dabda8d

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html