summaryrefslogtreecommitdiff
path: root/sys/netinet/in.h
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2023-05-10 12:07:18 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2023-05-10 12:07:18 +0000
commit0e232e06e2a4a77df94f87d0ee99d98fb69ee3ee (patch)
tree26c382a6d5d3f2da26433865efada283fbeec0b2 /sys/netinet/in.h
parentfb26bef824305de795cd43d0ca1b581776074f80 (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 'sys/netinet/in.h')
-rw-r--r--sys/netinet/in.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 4fc6f3a58bc..16dcdb24ca0 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.h,v 1.142 2023/04/11 00:45:09 jsg Exp $ */
+/* $OpenBSD: in.h,v 1.143 2023/05/10 12:07:16 bluhm Exp $ */
/* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */
/*
@@ -780,6 +780,7 @@ int in_canforward(struct in_addr);
int in_cksum(struct mbuf *, int);
int in4_cksum(struct mbuf *, u_int8_t, int, int);
void in_proto_cksum_out(struct mbuf *, struct ifnet *);
+int in_ifcap_cksum(struct mbuf *, struct ifnet *, int);
void in_ifdetach(struct ifnet *);
int in_mask2len(struct in_addr *);
void in_len2mask(struct in_addr *, int);