diff mbox series

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

Message ID 20240717133744.1239356-1-kuba@kernel.org (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net] eth: fbnic: don't build the driver when skb has more than 25 frags | 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
netdev/contest fail net-next-2024-07-17--15-00 (tests: 699)

Commit Message

Jakub Kicinski July 17, 2024, 1:37 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.

Fixes: 0cb4c0a13723 ("eth: fbnic: Implement Rx queue alloc/start/stop/free")
Signed-off-by: Jakub Kicinski <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 17, 2024, 1:44 p.m. UTC | #1
On 7/17/24 15:37, 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.
> 
> Fixes: 0cb4c0a13723 ("eth: fbnic: Implement Rx queue alloc/start/stop/free")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: alexanderduyck@fb.com
> CC: kernel-team@meta.com
> ---
>   drivers/net/ethernet/meta/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/meta/Kconfig b/drivers/net/ethernet/meta/Kconfig
> index a9f078212c78..b599c71a2d27 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 < 26

I think that with aarch MAX_SKB_FRAGS should be max 21. Aarch cacheline 
size is 128, right? The frag independent part of skb_shared_info takes 
48 bytes, and sizeof(skb_frag_t) == 16:

(512 - 128 - 48)/16 = 21

Cheers,

Paolo
Jakub Kicinski July 17, 2024, 2:12 p.m. UTC | #2
On Wed, 17 Jul 2024 15:44:09 +0200 Paolo Abeni wrote:
> I think that with aarch MAX_SKB_FRAGS should be max 21. Aarch cacheline 
> size is 128, right? The frag independent part of skb_shared_info takes 
> 48 bytes, and sizeof(skb_frag_t) == 16:
> 
> (512 - 128 - 48)/16 = 21

Hm, my grep foo must be low, I don't see aarch64 with 128B cache lines.
But I do see powerpc, so we can stick to 21 to be safe.
Paolo Abeni July 17, 2024, 2:50 p.m. UTC | #3
On 7/17/24 16:12, Jakub Kicinski wrote:
> On Wed, 17 Jul 2024 15:44:09 +0200 Paolo Abeni wrote:
>> I think that with aarch MAX_SKB_FRAGS should be max 21. Aarch cacheline
>> size is 128, right? The frag independent part of skb_shared_info takes
>> 48 bytes, and sizeof(skb_frag_t) == 16:
>>
>> (512 - 128 - 48)/16 = 21
> 
> Hm, my grep foo must be low, I don't see aarch64 with 128B cache lines.
> But I do see powerpc, so we can stick to 21 to be safe.

Yup, it looks like I was wrong with aarch64, but there are indeed other 
64bits arches with 128 bytes cache line size.

Given this impact builds, I think we are better off with a fast repost 
(before the 24h grace period).

Thanks,

Paolo
diff mbox series

Patch

diff --git a/drivers/net/ethernet/meta/Kconfig b/drivers/net/ethernet/meta/Kconfig
index a9f078212c78..b599c71a2d27 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 < 26
 	depends on PCI_MSI
 	select PHYLINK
 	help