diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-05-10 12:07:18 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-05-10 12:07:18 +0000 |
commit | 0e232e06e2a4a77df94f87d0ee99d98fb69ee3ee (patch) | |
tree | 26c382a6d5d3f2da26433865efada283fbeec0b2 /usr.bin/netstat | |
parent | fb26bef824305de795cd43d0ca1b581776074f80 (diff) |
Implement TCP send offloading, for now in software only. This is
meant as a fallback if network hardware does not support TSO. Driver
support is still work in progress. TCP output generates large
packets. In IP output the packet is chopped to TCP maximum segment
size. This reduces the CPU cycles used by pf. The regular output
could be assisted by hardware later, but pf route-to and IPsec needs
the software fallback in general.
For performance comparison or to workaround possible bugs, sysctl
net.inet.tcp.tso=0 disables the feature. netstat -s -p tcp shows
TSO counter with chopped and generated packets.
based on work from jan@
tested by jmc@ jan@ Hrvoje Popovski
OK jan@ claudio@
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/inet.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 2157946fc19..e04355ed078 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.174 2022/08/12 14:49:15 bluhm Exp $ */ +/* $OpenBSD: inet.c,v 1.175 2023/05/10 12:07:17 bluhm Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -408,6 +408,10 @@ tcp_stats(char *name) p(tcps_sndwinup, "\t\t%u window update packet%s\n"); p(tcps_sndctrl, "\t\t%u control packet%s\n"); p(tcps_outswcsum, "\t\t%u packet%s software-checksummed\n"); + p(tcps_outswtso, "\t\t%u output TSO packet%s software chopped\n"); + p(tcps_outhwtso, "\t\t%u output TSO packet%s hardware processed\n"); + p(tcps_outpkttso, "\t\t%u output TSO packet%s generated\n"); + p(tcps_outbadtso, "\t\t%u output TSO packet%s dropped\n"); p(tcps_rcvtotal, "\t%u packet%s received\n"); p2(tcps_rcvackpack, tcps_rcvackbyte, "\t\t%u ack%s (for %llu byte%s)\n"); p(tcps_rcvdupack, "\t\t%u duplicate ack%s\n"); |