diff options
author | Felix Fietkau <nbd@nbd.name> | 2024-05-02 10:44:44 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-05-06 11:54:04 +0200 |
commit | 8d95dc474f85481652a0e422d2f1f079de81f63c (patch) | |
tree | 7aff58088ce498cc84374e66625847d2772ad794 /net/ipv6 | |
parent | net: add support for segmenting TCP fraglist GSO packets (diff) | |
download | linux-8d95dc474f85481652a0e422d2f1f079de81f63c.tar.xz linux-8d95dc474f85481652a0e422d2f1f079de81f63c.zip |
net: add code for TCP fraglist GRO
This implements fraglist GRO similar to how it's handled in UDP, however
no functional changes are added yet. The next change adds a heuristic for
using fraglist GRO instead of regular GRO.
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/tcpv6_offload.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/ipv6/tcpv6_offload.c b/net/ipv6/tcpv6_offload.c index 7180c30dbbef..575e2743e331 100644 --- a/net/ipv6/tcpv6_offload.c +++ b/net/ipv6/tcpv6_offload.c @@ -32,6 +32,15 @@ INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff) const struct ipv6hdr *iph = ipv6_hdr(skb); struct tcphdr *th = tcp_hdr(skb); + if (unlikely(NAPI_GRO_CB(skb)->is_flist)) { + skb_shinfo(skb)->gso_type |= SKB_GSO_FRAGLIST | SKB_GSO_TCPV6; + skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count; + + __skb_incr_checksum_unnecessary(skb); + + return 0; + } + th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr, &iph->daddr, 0); skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV6; |