aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Oppermann <andre@FreeBSD.org>2006-09-06 22:07:14 +0000
committerAndre Oppermann <andre@FreeBSD.org>2006-09-06 22:07:14 +0000
commitd7097da403c9230a00dfe896f2a9529c08e9c4f2 (patch)
treed27b7763a9675c7df52d8d9c0eeb35306a487b58
parente7d33dcbc5e250771aaf8f64821259fd26d7f7dc (diff)
downloadsrc-d7097da403c9230a00dfe896f2a9529c08e9c4f2.tar.gz
src-d7097da403c9230a00dfe896f2a9529c08e9c4f2.zip
Make TSO (TCP segmentation offload) capabilities visible and accessible with
'ifconfig em0 tso' and 'ifconfig em0 -tso'. TSO for IPv4 and IPv6 is always enabled or disabled together. The driver may enable only one if it doesn't support both. Document 'tso' and '-tso' in the ifconfig(8) man pages. Sponsored by: TCP/IP Optimization Fundraise 2005
Notes
Notes: svn path=/head/; revision=162088
-rw-r--r--sbin/ifconfig/ifconfig.817
-rw-r--r--sbin/ifconfig/ifconfig.c4
2 files changed, 20 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 51dd76f7b7e9..041cd6c3d201 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -356,6 +356,23 @@ support, the exact level of offloading varies between drivers.
If the driver supports user-configurable checksum offloading,
disable receive (or transmit) checksum offloading on the interface.
These settings may not always be independent of each other.
+.It Cm tso
+If the driver supports
+.Xr tcp 4
+segmentation offloading, enable TSO on the interface.
+Some drivers may not be able to support TSO for
+.Xr ip 4
+and
+.Xr ip6 4
+packets, so they may enable only one of them.
+.It Fl tso
+If the driver supports
+.Xr tcp 4
+segmentation offloading, disable TSO on the interface.
+It will always disable TSO for
+.Xr ip 4
+and
+.Xr ip6 4 .
.It Cm vlanmtu , vlanhwtag
If the driver offers user-configurable VLAN support, enable
reception of extended frames or tag processing in hardware,
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 3f0172f5459e..0f3c184b8d45 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -805,7 +805,7 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo)
#define IFCAPBITS \
"\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \
-"\10VLAN_HWCSUM"
+"\8TSO4\9TSO6\10VLAN_HWCSUM"
/*
* Print the status of the interface. If an address family was
@@ -1035,6 +1035,8 @@ static struct cmd basic_cmds[] = {
DEF_CMD("-netcons", -IFCAP_NETCONS, setifcap),
DEF_CMD("polling", IFCAP_POLLING, setifcap),
DEF_CMD("-polling", -IFCAP_POLLING, setifcap),
+ DEF_CMD("tso", IFCAP_TSO, setifcap),
+ DEF_CMD("-tso", -IFCAP_TSO, setifcap),
DEF_CMD("normal", -IFF_LINK0, setifflags),
DEF_CMD("compress", IFF_LINK0, setifflags),
DEF_CMD("noicmp", IFF_LINK1, setifflags),