diff mbox series

eth: mlx4: select PAGE_POOL

Message ID 20250401015315.2306092-1-gthelen@google.com (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series eth: mlx4: select PAGE_POOL | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 1 blamed authors not CCed: tariqt@nvidia.com; 5 maintainers not CCed: edumazet@google.com pabeni@redhat.com andrew+netdev@lunn.ch linux-rdma@vger.kernel.org tariqt@nvidia.com
netdev/build_clang success Errors and warnings before: 1 this patch: 1
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-04-01--03-00 (tests: 902)

Commit Message

Greg Thelen April 1, 2025, 1:53 a.m. UTC
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")
Signed-off-by: Greg Thelen <gthelen@google.com>
---
 drivers/net/ethernet/mellanox/mlx4/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Joe Damato April 2, 2025, 3:50 p.m. UTC | #1
On Mon, Mar 31, 2025 at 06:53:15PM -0700, Greg Thelen 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'
> 
> Make MLX4_EN select PAGE_POOL to fix the ml;x4 build errors.
> 
> Fixes: 8533b14b3d65 ("eth: mlx4: create a page pool for Rx")
> Signed-off-by: Greg Thelen <gthelen@google.com>
> ---
>  drivers/net/ethernet/mellanox/mlx4/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/Kconfig b/drivers/net/ethernet/mellanox/mlx4/Kconfig
> index 825e05fb8607..0b1cb340206f 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/Kconfig
> +++ b/drivers/net/ethernet/mellanox/mlx4/Kconfig
> @@ -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?

Reviewed-by: Joe Damato <jdamato@fastly.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx4/Kconfig b/drivers/net/ethernet/mellanox/mlx4/Kconfig
index 825e05fb8607..0b1cb340206f 100644
--- a/drivers/net/ethernet/mellanox/mlx4/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx4/Kconfig
@@ -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