diff mbox series

[net] eth: fbnic: fix s390 build.

Message ID 5dfefd3e90e77828f38e68854b171a5b8b8c6ede.1721215379.git.pabeni@redhat.com (mailing list archive)
State Accepted
Commit 0e03c643dc9389e61fa484562dae58c8d6e96d63
Delegated to: Netdev Maintainers
Headers show
Series [net] eth: fbnic: fix s390 build. | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 661 this patch: 661
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 663 this patch: 663
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: 667 this patch: 667
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

Commit Message

Paolo Abeni July 17, 2024, 11:25 a.m. UTC
Building the fbnic nn s390, yield a build bug:

In function ‘fbnic_config_drop_mode_rcq’,
    inlined from ‘fbnic_enable’ at drivers/net/ethernet/meta/fbnic/fbnic_txrx.c:1836:4:
././include/linux/compiler_types.h:510:45: error: call to ‘__compiletime_assert_919’ declared with attribute error: FIELD_PREP: value too large for the field

The relevant mask is 9 bits wide, and the related value is the cacheline
aligned size of struct skb_shared_info.

On s390 the cacheline size is 256 bytes, and skb_shared_info minimum
size on 64 bits system is 320 bytes.

Avoid building the driver for such arch.

Fixes: 0cb4c0a13723 ("eth: fbnic: Implement Rx queue alloc/start/stop/free")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
Arguably this is quite sub-optimal, but sharing anyway to have a
short-term solution handy.
---
 drivers/net/ethernet/meta/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski July 17, 2024, 1:29 p.m. UTC | #1
On Wed, 17 Jul 2024 13:25:06 +0200 Paolo Abeni wrote:
> Arguably this is quite sub-optimal, but sharing anyway to have a
> short-term solution handy.

Agreed. We also need a fix for frag count > 25, it seems.
I'll send another fix, but this one is more urgent so let me 
apply already.
patchwork-bot+netdevbpf@kernel.org July 17, 2024, 1:40 p.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 17 Jul 2024 13:25:06 +0200 you wrote:
> Building the fbnic nn s390, yield a build bug:
> 
> In function ‘fbnic_config_drop_mode_rcq’,
>     inlined from ‘fbnic_enable’ at drivers/net/ethernet/meta/fbnic/fbnic_txrx.c:1836:4:
> ././include/linux/compiler_types.h:510:45: error: call to ‘__compiletime_assert_919’ declared with attribute error: FIELD_PREP: value too large for the field
> 
> The relevant mask is 9 bits wide, and the related value is the cacheline
> aligned size of struct skb_shared_info.
> 
> [...]

Here is the summary with links:
  - [net] eth: fbnic: fix s390 build.
    https://git.kernel.org/netdev/net/c/0e03c643dc93

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/meta/Kconfig b/drivers/net/ethernet/meta/Kconfig
index d8f5e9f9bb33..a9f078212c78 100644
--- a/drivers/net/ethernet/meta/Kconfig
+++ b/drivers/net/ethernet/meta/Kconfig
@@ -20,6 +20,7 @@  if NET_VENDOR_META
 config FBNIC
 	tristate "Meta Platforms Host Network Interface"
 	depends on X86_64 || COMPILE_TEST
+	depends on S390=n
 	depends on PCI_MSI
 	select PHYLINK
 	help