From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>
Cc: davem@davemloft.net, kuba@kernel.org,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, David Ahern <dsahern@gmail.com>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Pravin B Shelar <pshelar@ovn.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
Ilya Maximets <i.maximets@ovn.org>,
Aaron Conole <aconole@redhat.com>,
Roopa Prabhu <roopa@nvidia.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
Mahesh Bandewar <maheshb@google.com>,
Paul Moore <paul@paul-moore.com>,
Guillaume Nault <gnault@redhat.com>
Subject: [PATCH net-next 00/10] net: support ipv4 big tcp
Date: Fri, 13 Jan 2023 22:31:24 -0500 [thread overview]
Message-ID: <cover.1673666803.git.lucien.xin@gmail.com> (raw)
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, and Patch 8 implements this feature and Patch 10 adds a selftest
for it. Patch 9 is a fix in netfilter length_mt6 so that the selftest
can also cover IPv6 BIG TCP.
Note that the similar change as in Patch 2-7 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_max_size 128000 gso_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
Xin Long (10):
net: add a couple of helpers for iph tot_len
bridge: use skb_ip_totlen in br netfilter
openvswitch: use skb_ip_totlen in conntrack
net: sched: use skb_ip_totlen and iph_totlen
netfilter: use skb_ip_totlen and iph_totlen
cipso_ipv4: use iph_set_totlen in skbuff_setattr
ipvlan: use skb_ip_totlen in ipvlan_get_L3_hdr
net: add support for ipv4 big tcp
netfilter: get ipv6 pktlen properly in length_mt6
selftests: add a selftest for big tcp
drivers/net/ipvlan/ipvlan_core.c | 2 +-
include/linux/ip.h | 20 +++
include/linux/ipv6.h | 9 ++
include/net/netfilter/nf_tables_ipv4.h | 4 +-
include/net/route.h | 3 -
net/bridge/br_netfilter_hooks.c | 2 +-
net/bridge/netfilter/nf_conntrack_bridge.c | 4 +-
net/core/gro.c | 6 +-
net/core/sock.c | 11 +-
net/ipv4/af_inet.c | 7 +-
net/ipv4/cipso_ipv4.c | 2 +-
net/ipv4/ip_input.c | 2 +-
net/ipv4/ip_output.c | 2 +-
net/netfilter/ipvs/ip_vs_xmit.c | 2 +-
net/netfilter/nf_log_syslog.c | 2 +-
net/netfilter/xt_length.c | 5 +-
net/openvswitch/conntrack.c | 2 +-
net/sched/act_ct.c | 2 +-
net/sched/sch_cake.c | 2 +-
tools/testing/selftests/net/Makefile | 1 +
tools/testing/selftests/net/big_tcp.sh | 157 +++++++++++++++++++++
21 files changed, 212 insertions(+), 35 deletions(-)
create mode 100755 tools/testing/selftests/net/big_tcp.sh
--
2.31.1
next reply other threads:[~2023-01-14 3:31 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 3:31 Xin Long [this message]
2023-01-14 3:31 ` [PATCH net-next 01/10] net: add a couple of helpers for iph tot_len Xin Long
2023-01-14 3:31 ` [PATCH net-next 02/10] bridge: use skb_ip_totlen in br netfilter Xin Long
2023-01-14 3:31 ` [PATCH net-next 03/10] openvswitch: use skb_ip_totlen in conntrack Xin Long
2023-01-14 3:31 ` [PATCH net-next 04/10] net: sched: use skb_ip_totlen and iph_totlen Xin Long
2023-01-14 3:31 ` [PATCH net-next 05/10] netfilter: " Xin Long
2023-01-14 3:31 ` [PATCH net-next 06/10] cipso_ipv4: use iph_set_totlen in skbuff_setattr Xin Long
2023-01-14 15:38 ` Paul Moore
2023-01-14 17:52 ` Xin Long
2023-01-16 16:45 ` Paul Moore
2023-01-16 17:36 ` Xin Long
2023-01-16 18:12 ` Paul Moore
2023-01-16 19:33 ` Xin Long
2023-01-17 4:54 ` David Ahern
2023-01-17 19:51 ` Paul Moore
2023-01-17 22:46 ` Paul Moore
2023-01-18 2:47 ` David Ahern
2023-01-18 19:18 ` Paul Moore
2023-01-14 3:31 ` [PATCH net-next 07/10] ipvlan: use skb_ip_totlen in ipvlan_get_L3_hdr Xin Long
2023-01-14 3:31 ` [PATCH net-next 08/10] net: add support for ipv4 big tcp Xin Long
2023-01-14 3:31 ` [PATCH net-next 09/10] netfilter: get ipv6 pktlen properly in length_mt6 Xin Long
2023-01-15 15:41 ` David Ahern
2023-01-15 17:42 ` Xin Long
2023-01-15 19:40 ` Eric Dumazet
2023-01-15 20:14 ` Xin Long
2023-01-15 23:57 ` David Ahern
2023-01-16 9:24 ` Eric Dumazet
2023-01-16 15:07 ` David Ahern
2023-01-16 16:02 ` Eric Dumazet
2023-01-16 19:09 ` Xin Long
2023-01-16 20:37 ` Eric Dumazet
2023-01-17 15:47 ` Xin Long
2023-01-19 1:18 ` Xin Long
2023-01-19 3:13 ` Eric Dumazet
2023-01-19 15:41 ` David Ahern
2023-01-19 16:49 ` Xin Long
2023-01-19 18:10 ` Eric Dumazet
2023-01-19 18:57 ` Xin Long
2023-01-19 19:17 ` Eric Dumazet
2023-01-19 19:30 ` Xin Long
2023-01-15 23:58 ` David Ahern
2023-01-14 3:31 ` [PATCH net-next 10/10] selftests: add a selftest for big tcp Xin Long
2023-01-15 15:45 ` [PATCH net-next 00/10] net: support ipv4 " David Ahern
2023-01-15 16:04 ` Eric Dumazet
2023-01-15 17:33 ` Xin Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1673666803.git.lucien.xin@gmail.com \
--to=lucien.xin@gmail.com \
--cc=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=gnault@redhat.com \
--cc=i.maximets@ovn.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=maheshb@google.com \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=paul@paul-moore.com \
--cc=pshelar@ovn.org \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
--cc=xiyou.wangcong@gmail.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).