summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRichard Gobert <richardbgobert@gmail.com>2025-09-23 10:59:07 +0200
committerPaolo Abeni <pabeni@redhat.com>2025-09-25 12:42:49 +0200
commitf095a358faf263bf1d8ae712bd38e13b71286819 (patch)
treed4ad192146bfd561ffa71841cb8bb6388015e4a1 /net
parent3271f19bf7b9df665549666d789b9f126b4420c7 (diff)
net: gro: remove unnecessary df checks
Currently, packets with fixed IDs will be merged only if their don't-fragment bit is set. This restriction is unnecessary since packets without the don't-fragment bit will be forwarded as-is even if they were merged together. The merged packets will be segmented into their original forms before being forwarded, either by GSO or by TSO. The IDs will also remain identical unless NETIF_F_TSO_MANGLEID is set, in which case the IDs can become incrementing, which is also fine. Clean up the code by removing the unnecessary don't-fragment checks. Signed-off-by: Richard Gobert <richardbgobert@gmail.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250923085908.4687-5-richardbgobert@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/af_inet.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 804c51296c55..3109c5ec38f3 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1395,10 +1395,7 @@ struct sk_buff *inet_gso_segment(struct sk_buff *skb,
segs = ERR_PTR(-EPROTONOSUPPORT);
- /* fixed ID is invalid if DF bit is not set */
fixedid = !!(skb_shinfo(skb)->gso_type & (SKB_GSO_TCP_FIXEDID << encap));
- if (fixedid && !(ip_hdr(skb)->frag_off & htons(IP_DF)))
- goto out;
if (!skb->encapsulation || encap)
udpfrag = !!(skb_shinfo(skb)->gso_type & SKB_GSO_UDP);