summaryrefslogtreecommitdiff
path: root/sys/net/if.h
diff options
context:
space:
mode:
authorJan Klemkow <jan@cvs.openbsd.org>2023-05-16 14:32:55 +0000
committerJan Klemkow <jan@cvs.openbsd.org>2023-05-16 14:32:55 +0000
commit2d46d995289784338eb9d2fd190423b85fc46630 (patch)
treefcd1f331783ba5714481f8b8485e1c6b291b46d4 /sys/net/if.h
parent6054ba0d03a74d6440cca9aa7026e283f95581f3 (diff)
Use separate IFCAPs for LRO and TSO.
This diff introduces separate capabilities for TCP offloading. We split this into LRO (large receive offloading) and TSO (TCP segmentation offloading). LRO can be turned on/off via tcprecvoffload option of ifconfig and is not inherited to sub interfaces. TSO is inherited by sub interfaces to signal this hardware offloading capability to the network stack. With tweaks from bluhm, claudio and dlg ok bluhm, claudio
Diffstat (limited to 'sys/net/if.h')
-rw-r--r--sys/net/if.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index c8c7ec5f03f..189ce873c12 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.212 2023/05/15 16:34:56 bluhm Exp $ */
+/* $OpenBSD: if.h,v 1.213 2023/05/16 14:32:54 jan Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -231,7 +231,7 @@ struct if_status_description {
#define IFXF_INET6_NOSOII 0x40 /* [N] don't do RFC 7217 */
#define IFXF_AUTOCONF4 0x80 /* [N] v4 autoconf (aka dhcp) enabled */
#define IFXF_MONITOR 0x100 /* [N] only used for bpf */
-#define IFXF_TSO 0x200 /* [N] XXX missnamed, should be LRO */
+#define IFXF_LRO 0x200 /* [N] TCP large recv offload */
#define IFXF_CANTCHANGE \
(IFXF_MPSAFE|IFXF_CLONED)
@@ -253,7 +253,7 @@ struct if_status_description {
#define IFCAP_CSUM_UDPv6 0x00000100 /* can do IPv6/UDP checksums */
#define IFCAP_TSOv4 0x00001000 /* IPv4/TCP segment offload */
#define IFCAP_TSOv6 0x00002000 /* IPv6/TCP segment offload */
-#define IFCAP_TSO 0x00004000 /* XXX should be LRO */
+#define IFCAP_LRO 0x00004000 /* TCP large recv offload */
#define IFCAP_WOL 0x00008000 /* can do wake on lan */
#define IFCAP_CSUM_MASK (IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4 | \
@@ -546,7 +546,7 @@ void if_getdata(struct ifnet *, struct if_data *);
void ifinit(void);
int ifioctl(struct socket *, u_long, caddr_t, struct proc *);
int ifpromisc(struct ifnet *, int);
-int ifsettso(struct ifnet *, int);
+int ifsetlro(struct ifnet *, int);
struct ifg_group *if_creategroup(const char *);
int if_addgroup(struct ifnet *, const char *);
int if_delgroup(struct ifnet *, const char *);