* [PATCH net-next] net: bgmac: stop advertising TX checksum offload
@ 2026-11-02 21:58 Rosen Penev
2026-11-03 9:26 ` Markus Elfring
2026-11-06 9:39 ` Simon Horman
0 siblings, 2 replies; 4+ messages in thread
From: Rosen Penev @ 2026-11-02 21:58 UTC (permalink / raw)
To: netdev
Cc: Rafał Miłecki, Broadcom internal kernel review list,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, open list
The driver advertises NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM, but
bgmac_dma_tx_add() calls skb_checksum_help() on every CHECKSUM_PARTIAL
skb, so the checksum is always computed in software anyway. The return
value is ignored too, so if skb_checksum_help() fails the frame is sent
with a bad checksum.
Remove the feature flags and the fallback. The stack then computes the
checksum before handing the skb to the driver.
Tested on an ASUS RT-N16.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/ethernet/broadcom/bgmac.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 2dff43f540d3..822903a3ac6e 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -145,9 +145,6 @@ static netdev_tx_t bgmac_dma_tx_add(struct bgmac *bgmac,
goto err_drop;
}
- if (skb->ip_summed == CHECKSUM_PARTIAL)
- skb_checksum_help(skb);
-
nr_frags = skb_shinfo(skb)->nr_frags;
/* ring->end - ring->start will return the number of valid slots,
@@ -1574,7 +1571,7 @@ int bgmac_enet_probe(struct bgmac *bgmac)
goto err_dma_free;
}
- net_dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
+ net_dev->features = NETIF_F_SG;
net_dev->hw_features = net_dev->features;
net_dev->vlan_features = net_dev->features;
--
2.56.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: bgmac: stop advertising TX checksum offload
2026-11-02 21:58 [PATCH net-next] net: bgmac: stop advertising TX checksum offload Rosen Penev
@ 2026-11-03 9:26 ` Markus Elfring
2026-11-06 9:39 ` Simon Horman
2026-11-06 9:39 ` Simon Horman
1 sibling, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2026-11-03 9:26 UTC (permalink / raw)
To: Rosen Penev, netdev, bcm-kernel-feedback-list
Cc: linux-kernel, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rafał Miłecki
…
> Remove the feature flags and the fallback. The stack then computes the
> checksum before handing the skb to the driver.
…
How can a “stack” compute anything?
Regards,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: bgmac: stop advertising TX checksum offload
2026-11-03 9:26 ` Markus Elfring
@ 2026-11-06 9:39 ` Simon Horman
0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2026-11-06 9:39 UTC (permalink / raw)
To: Markus Elfring
Cc: Rosen Penev, netdev, bcm-kernel-feedback-list, linux-kernel,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rafał Miłecki
On Tue, Nov 03, 2026 at 10:26:21AM +0100, Markus Elfring wrote:
> …
> > Remove the feature flags and the fallback. The stack then computes the
> > checksum before handing the skb to the driver.
> …
>
> How can a “stack” compute anything?
Perhaps your assumption is that stack refers to stack memory.
But my assumption is that stack refers to the software stack,
or slightly more specifically, core parts of the Linux
implementation of networking.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: bgmac: stop advertising TX checksum offload
2026-11-02 21:58 [PATCH net-next] net: bgmac: stop advertising TX checksum offload Rosen Penev
2026-11-03 9:26 ` Markus Elfring
@ 2026-11-06 9:39 ` Simon Horman
1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2026-11-06 9:39 UTC (permalink / raw)
To: Rosen Penev
Cc: netdev, Rafał Miłecki,
Broadcom internal kernel review list, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
open list
On Mon, Nov 02, 2026 at 01:58:06PM -0800, Rosen Penev wrote:
> The driver advertises NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM, but
> bgmac_dma_tx_add() calls skb_checksum_help() on every CHECKSUM_PARTIAL
> skb, so the checksum is always computed in software anyway. The return
> value is ignored too, so if skb_checksum_help() fails the frame is sent
> with a bad checksum.
>
> Remove the feature flags and the fallback. The stack then computes the
> checksum before handing the skb to the driver.
>
> Tested on an ASUS RT-N16.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-06 9:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 21:58 [PATCH net-next] net: bgmac: stop advertising TX checksum offload Rosen Penev
2026-11-03 9:26 ` Markus Elfring
2026-11-06 9:39 ` Simon Horman
2026-11-06 9:39 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®