lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+rN=pcGquBONMruWUS8WG708rqMKD7TjS0OkBq+ev+Ew@mail.gmail.com>
Date:   Wed, 1 Feb 2023 09:53:45 +0100
From:   Eric Dumazet <edumazet@...gle.com>
To:     Xin Long <lucien.xin@...il.com>
Cc:     network dev <netdev@...r.kernel.org>, davem@...emloft.net,
        kuba@...nel.org, Paolo Abeni <pabeni@...hat.com>,
        David Ahern <dsahern@...il.com>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Pravin B Shelar <pshelar@....org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        Florian Westphal <fw@...len.de>,
        Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
        Ilya Maximets <i.maximets@....org>,
        Aaron Conole <aconole@...hat.com>,
        Roopa Prabhu <roopa@...dia.com>,
        Nikolay Aleksandrov <razor@...ckwall.org>,
        Mahesh Bandewar <maheshb@...gle.com>,
        Paul Moore <paul@...l-moore.com>,
        Guillaume Nault <gnault@...hat.com>
Subject: Re: [PATCHv4 net-next 00/10] net: support ipv4 big tcp

On Sat, Jan 28, 2023 at 4:58 PM Xin Long <lucien.xin@...il.com> wrote:
>
> This is similar to the BIG TCP patchset added by Eric for IPv6:
>
>   https://lwn.net/Articles/895398/
>
> Different from IPv6, IPv4 tot_len is 16-bit long only, and IPv4 header
> doesn't have exthdrs(options) for the BIG TCP packets' length. To make
> it simple, as David and Paolo suggested, we set IPv4 tot_len to 0 to
> indicate this might be a BIG TCP packet and use skb->len as the real
> IPv4 total length.
>
> This will work safely, as all BIG TCP packets are GSO/GRO packets and
> processed on the same host as they were created; There is no padding
> in GSO/GRO packets, and skb->len - network_offset is exactly the IPv4
> packet total length; Also, before implementing the feature, all those
> places that may get iph tot_len from BIG TCP packets are taken care
> with some new APIs:
>
> Patch 1 adds some APIs for iph tot_len setting and getting, which are
> used in all these places where IPv4 BIG TCP packets may reach in Patch
> 2-7, Patch 8 adds a GSO_TCP tp_status for af_packet users, and Patch 9
> add new netlink attributes to make IPv4 BIG TCP independent from IPv6
> BIG TCP on configuration, and Patch 10 implements this feature.
>
> Note that the similar change as in Patch 2-6 are also needed for IPv6
> BIG TCP packets, and will be addressed in another patchset.
>
> The similar performance test is done for IPv4 BIG TCP with 25Gbit NIC
> and 1.5K MTU:
>
> No BIG TCP:
> for i in {1..10}; do netperf -t TCP_RR -H 192.168.100.1 -- -r80000,80000 -O MIN_LATENCY,P90_LATENCY,P99_LATENCY,THROUGHPUT|tail -1; done
> 168          322          337          3776.49
> 143          236          277          4654.67
> 128          258          288          4772.83
> 171          229          278          4645.77
> 175          228          243          4678.93
> 149          239          279          4599.86
> 164          234          268          4606.94
> 155          276          289          4235.82
> 180          255          268          4418.95
> 168          241          249          4417.82
>
> Enable BIG TCP:
> ip link set dev ens1f0np0 gro_ipv4_max_size 128000 gso_ipv4_max_size 128000
> for i in {1..10}; do netperf -t TCP_RR -H 192.168.100.1 -- -r80000,80000 -O MIN_LATENCY,P90_LATENCY,P99_LATENCY,THROUGHPUT|tail -1; done
> 161          241          252          4821.73
> 174          205          217          5098.28
> 167          208          220          5001.43
> 164          228          249          4883.98
> 150          233          249          4914.90
> 180          233          244          4819.66
> 154          208          219          5004.92
> 157          209          247          4999.78
> 160          218          246          4842.31
> 174          206          217          5080.99
>
> Thanks for the feedback from Eric and David Ahern.
>
> v1->v2:
>   - remove the fixes and the selftest for IPv6 BIG TCP, will do it in
>     another patchset.
>   - add GSO_TCP for tp_status in packet sockets to tell the af_packet
>     users that this is a TCP GSO packet in Patch 8.
>   - also check skb_is_gso() when checking if it's a GSO TCP packet in
>     Patch 1.
> v2->v3:
>   - add gso/gro_ipv4_max_size per device and netlink attributes for them
>     in Patch 9, so that we can selectively enable BIG TCP for IPv6, and
>     not for IPv4, as Eric required.
>   - remove the selftest, as it requires userspace iproute2 change after
>     making IPv4 BIG TCP independent from IPv6 BIG TCP on configuration.
> v3->v4:
>   - put gso/gro_ipv4_max_size close to other related fields, so that we
>     do not need an extra cache line miss, as Eric suggested.
>   - also check ipv6_addr_v4mapped() when reading gso(_ipv4)_max_size in
>     sk_setup_caps(), as Eric noticed.

For the series:

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Please make sure to add needed changes to tcpdump/libpcap

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ