Netdev List
 help / color / mirror / Atom feed
* [RFC net] net: force software segmentation of PPPoE packets
@ 2026-10-20 14:30 Qingfang Deng
  2026-10-20 14:34 ` netdev-bot+sinfo
  2026-10-20 15:08 ` Eric Dumazet
  0 siblings, 2 replies; 6+ messages in thread
From: Qingfang Deng @ 2026-10-20 14:30 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Kuniyuki Iwashima, Stanislav Fomichev, Hangbin Liu,
	Martin Karsten, Felix Fietkau, netdev, linux-kernel
  Cc: Pablo Neira Ayuso

Ordinary TSO does not update the PPPoE payload length. A PPPoE GRO packet
forwarded by a bridge can retain hardware GSO features and reach the
driver without software segmentation, if the egress Ethernet interface
advertises TSO.

To force software segmentation, clear the GSO feature mask for
ETH_P_PPP_SES in harmonize_features().

Fixes: 55a5d8fca836 ("net: pppoe: implement GRO/GSO support")
Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
 net/core/dev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index a6951ea08961..27483a2ad747 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3831,6 +3831,10 @@ static netdev_features_t harmonize_features(struct sk_buff *skb,
 	type = skb_network_protocol(skb, NULL);
 	features = net_mpls_features(skb, features, type);
 
+	/* Ordinary TSO does not update the PPPoE payload length. */
+	if (IS_ENABLED(CONFIG_PPPOE) && type == htons(ETH_P_PPP_SES))
+		features &= ~NETIF_F_GSO_MASK;
+
 	if (skb->ip_summed != CHECKSUM_NONE &&
 	    !can_checksum_protocol(features, type)) {
 		features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-20 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 14:30 [RFC net] net: force software segmentation of PPPoE packets Qingfang Deng
2026-10-20 14:34 ` netdev-bot+sinfo
2026-10-20 15:08 ` Eric Dumazet
2026-10-20 16:10   ` Qingfang Deng
2026-10-20 16:44     ` Pablo Neira Ayuso
2026-10-20 16:53       ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox