Skip to contentSkip to conversation

eth: fbnic: don't build the driver when skb has more than 21 frags

PATCH Applied Jakub Kicinski 3 participants 3 messages Jul 17, 2024 – Jul 19, 2024

Subsystems (3)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH v2 1/1 eth: fbnic: don't build the driver when skb has more than 21 frags

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")

---
v2:
- cover the 128B case as well
v1: https://lore.kernel.org/[email protected]
CC: [email protected]
CC: [email protected]

---
 drivers/net/ethernet/meta/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/meta/Kconfig +1 -0
index a9f078212c78..86034ea4ba5b 100644
@@ -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
Signature · 1 line
2.45.2
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 9 lines · Jakub Kicinski

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")
#2 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

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

Quoted 8 lines · 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!

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