diff mbox series

[net,v2] eth: fbnic: don't build the driver when skb has more than 21 frags

Message ID 20240717161600.1291544-1-kuba@kernel.org (mailing list archive)
State Accepted
Commit 4359836129d931fc424370249a1fcdec139fe407
Delegated to: Netdev Maintainers
Headers show
Series [net,v2] eth: fbnic: don't build the driver when skb has more than 21 frags | expand

Checks

Context Check Description
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/series_format success Single patches do not need cover letters
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
netdev/contest success net-next-2024-07-19--12-00 (tests: 699)

Commit Message

Jakub Kicinski July 17, 2024, 4:15 p.m. UTC
Similarly to commit 0e03c643dc93 ("eth: fbnic: fix s390 build."),
the driver won't build if skb_shared_info has more than 25 frags
assuming a 64B cache line and 21 frags assuming a 128B cache line.

  (512 - 48 -  64) / 16 = 25
  (512 - 48 - 128) / 16 = 21

Fixes: 0cb4c0a13723 ("eth: fbnic: Implement Rx queue alloc/start/stop/free")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
v2:
 - cover the 128B case as well
v1: https://lore.kernel.org/20240717133744.1239356-1-kuba@kernel.org
CC: alexanderduyck@fb.com
CC: kernel-team@meta.com
---
 drivers/net/ethernet/meta/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Paolo Abeni July 18, 2024, 1:25 p.m. UTC | #1
On 7/17/24 18:15, Jakub Kicinski wrote:
> Similarly to commit 0e03c643dc93 ("eth: fbnic: fix s390 build."),
> the driver won't build if skb_shared_info has more than 25 frags
> assuming a 64B cache line and 21 frags assuming a 128B cache line.
> 
>    (512 - 48 -  64) / 16 = 25
>    (512 - 48 - 128) / 16 = 21
> 
> Fixes: 0cb4c0a13723 ("eth: fbnic: Implement Rx queue alloc/start/stop/free")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Acked-by: Paolo Abeni <pabeni@redhat.com>
patchwork-bot+netdevbpf@kernel.org July 19, 2024, 2:40 p.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed, 17 Jul 2024 09:15:59 -0700 you wrote:
> Similarly to commit 0e03c643dc93 ("eth: fbnic: fix s390 build."),
> the driver won't build if skb_shared_info has more than 25 frags
> assuming a 64B cache line and 21 frags assuming a 128B cache line.
> 
>   (512 - 48 -  64) / 16 = 25
>   (512 - 48 - 128) / 16 = 21
> 
> [...]

Here is the summary with links:
  - [net,v2] eth: fbnic: don't build the driver when skb has more than 21 frags
    https://git.kernel.org/netdev/net/c/4359836129d9

You are awesome, thank you!
diff mbox series

Patch

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