]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/ipv6: Drop HBH for BIG TCP on RX side
authorAlice Mikityanska <alice@isovalent.com>
Thu, 5 Feb 2026 13:39:16 +0000 (15:39 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 7 Feb 2026 04:50:12 +0000 (20:50 -0800)
Complementary to the previous commit, stop inserting HBH when building
BIG TCP GRO SKBs.

Signed-off-by: Alice Mikityanska <alice@isovalent.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260205133925.526371-4-alice.kernel@fastmail.im
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/gro.c
net/ipv6/ip6_offload.c

index ef61695fbdbb67f6f4173cc957c07735a744bbeb..31d21de5b15a76439239d15f10d0fd6b6c8ab328 100644 (file)
@@ -115,8 +115,6 @@ int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb)
 
        if (unlikely(p->len + len >= GRO_LEGACY_MAX_SIZE)) {
                if (NAPI_GRO_CB(skb)->proto != IPPROTO_TCP ||
-                   (p->protocol == htons(ETH_P_IPV6) &&
-                    skb_headroom(p) < sizeof(struct hop_jumbo_hdr)) ||
                    p->encapsulation)
                        return -E2BIG;
        }
index ceb4752a535871435803e3e8ffd6597580d3ec92..c44bb5812484ef581931b4a896f958aa452f46ce 100644 (file)
@@ -336,40 +336,14 @@ INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
        const struct net_offload *ops;
        struct ipv6hdr *iph;
        int err = -ENOSYS;
-       u32 payload_len;
 
        if (skb->encapsulation) {
                skb_set_inner_protocol(skb, cpu_to_be16(ETH_P_IPV6));
                skb_set_inner_network_header(skb, nhoff);
        }
 
-       payload_len = skb->len - nhoff - sizeof(*iph);
-       if (unlikely(payload_len > IPV6_MAXPLEN)) {
-               struct hop_jumbo_hdr *hop_jumbo;
-               int hoplen = sizeof(*hop_jumbo);
-
-               /* Move network header left */
-               memmove(skb_mac_header(skb) - hoplen, skb_mac_header(skb),
-                       skb->transport_header - skb->mac_header);
-               skb->data -= hoplen;
-               skb->len += hoplen;
-               skb->mac_header -= hoplen;
-               skb->network_header -= hoplen;
-               iph = (struct ipv6hdr *)(skb->data + nhoff);
-               hop_jumbo = (struct hop_jumbo_hdr *)(iph + 1);
-
-               /* Build hop-by-hop options */
-               hop_jumbo->nexthdr = iph->nexthdr;
-               hop_jumbo->hdrlen = 0;
-               hop_jumbo->tlv_type = IPV6_TLV_JUMBO;
-               hop_jumbo->tlv_len = 4;
-               hop_jumbo->jumbo_payload_len = htonl(payload_len + hoplen);
-
-               iph->nexthdr = NEXTHDR_HOP;
-       }
-
        iph = (struct ipv6hdr *)(skb->data + nhoff);
-       ipv6_set_payload_len(iph, payload_len);
+       ipv6_set_payload_len(iph, skb->len - nhoff - sizeof(*iph));
 
        nhoff += sizeof(*iph) + ipv6_exthdrs_len(iph, &ops);