* [PATCH net] eth: fbnic: don't build the driver when skb has more than 25 frags
@ 2024-07-17 13:37 Jakub Kicinski
2024-07-17 13:44 ` Paolo Abeni
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2024-07-17 13:37 UTC (permalink / raw)
To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski, alexanderduyck,
kernel-team
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
depends on PCI_MSI
select PHYLINK
help
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] eth: fbnic: don't build the driver when skb has more than 25 frags
2024-07-17 13:37 [PATCH net] eth: fbnic: don't build the driver when skb has more than 25 frags Jakub Kicinski
@ 2024-07-17 13:44 ` Paolo Abeni
2024-07-17 14:12 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Abeni @ 2024-07-17 13:44 UTC (permalink / raw)
To: Jakub Kicinski, davem; +Cc: netdev, edumazet, alexanderduyck, kernel-team
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] eth: fbnic: don't build the driver when skb has more than 25 frags
2024-07-17 13:44 ` Paolo Abeni
@ 2024-07-17 14:12 ` Jakub Kicinski
2024-07-17 14:50 ` Paolo Abeni
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2024-07-17 14:12 UTC (permalink / raw)
To: Paolo Abeni; +Cc: davem, netdev, edumazet, alexanderduyck, kernel-team
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] eth: fbnic: don't build the driver when skb has more than 25 frags
2024-07-17 14:12 ` Jakub Kicinski
@ 2024-07-17 14:50 ` Paolo Abeni
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2024-07-17 14:50 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, alexanderduyck, kernel-team
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-17 14:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-17 13:37 [PATCH net] eth: fbnic: don't build the driver when skb has more than 25 frags Jakub Kicinski
2024-07-17 13:44 ` Paolo Abeni
2024-07-17 14:12 ` Jakub Kicinski
2024-07-17 14:50 ` Paolo Abeni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).