aboutsummaryrefslogtreecommitdiff
path: root/fs/crypto
diff options
context:
space:
mode:
authorGravatar Xin Long <lucien.xin@gmail.com> 2023-01-28 10:58:39 -0500
committerGravatar Jakub Kicinski <kuba@kernel.org> 2023-02-01 20:54:27 -0800
commitb1a78b9b98862cda167b643690e43662ea060625 (patch)
tree6a0ceb380c64d02b978f47debe65aef168d76d9b /fs/crypto
parentnet: add gso_ipv4_max_size and gro_ipv4_max_size per device (diff)
downloadlinux-b1a78b9b9886.tar.gz
linux-b1a78b9b9886.tar.bz2
linux-b1a78b9b9886.zip
net: add support for ipv4 big tcp
Similar to Eric's IPv6 BIG TCP, this patch is to enable IPv4 BIG TCP. Firstly, allow sk->sk_gso_max_size to be set to a value greater than GSO_LEGACY_MAX_SIZE by not trimming gso_max_size in sk_trim_gso_size() for IPv4 TCP sockets. Then on TX path, set IP header tot_len to 0 when skb->len > IP_MAX_MTU in __ip_local_out() to allow to send BIG TCP packets, and this implies that skb->len is the length of a IPv4 packet; On RX path, use skb->len as the length of the IPv4 packet when the IP header tot_len is 0 and skb->len > IP_MAX_MTU in ip_rcv_core(). As the API iph_set_totlen() and skb_ip_totlen() are used in __ip_local_out() and ip_rcv_core(), we only need to update these APIs. Also in GRO receive, add the check for ETH_P_IP/IPPROTO_TCP, and allows the merged packet size >= GRO_LEGACY_MAX_SIZE in skb_gro_receive(). In GRO complete, set IP header tot_len to 0 when the merged packet size greater than IP_MAX_MTU in iph_set_totlen() so that it can be processed on RX path. Note that by checking skb_is_gso_tcp() in API iph_totlen(), it makes this implementation safe to use iph->len == 0 indicates IPv4 BIG TCP packets. Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: David Ahern <dsahern@kernel.org> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/crypto')
0 files changed, 0 insertions, 0 deletions