From a6575bfc2d39cc7496dca986652b50d3b5aafb56 Mon Sep 17 00:00:00 2001 From: Andre Oppermann Date: Mon, 11 Jun 2007 20:15:20 +0000 Subject: [PATCH] Add reporting and toggling of TCP LRO (large receive offload) support to ifconfig(8). --- sbin/ifconfig/ifconfig.8 | 8 ++++++++ sbin/ifconfig/ifconfig.c | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 5613518d7cc3..3faf0292d2be 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -379,6 +379,14 @@ It will always disable TSO for .Xr ip 4 and .Xr ip6 4 . +.It Cm lro +If the driver supports +.Xr tcp 4 +large receive offloading, enable LRO on the interface. +.It Fl lro +If the driver supports +.Xr tcp 4 +large receive offloading, disable LRO on the interface. .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 2f502b53a049..f072ea8f63c5 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -748,7 +748,7 @@ setifname(const char *val, int dummy __unused, int s, #define IFCAPBITS \ "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ -"\10VLAN_HWCSUM\11TSO4\12TSO6" +"\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO" /* * Print the status of the interface. If an address family was @@ -984,6 +984,8 @@ static struct cmd basic_cmds[] = { DEF_CMD("-polling", -IFCAP_POLLING, setifcap), DEF_CMD("tso", IFCAP_TSO, setifcap), DEF_CMD("-tso", -IFCAP_TSO, setifcap), + DEF_CMD("lro", IFCAP_LRO, setifcap), + DEF_CMD("-lro", -IFCAP_LRO, setifcap), DEF_CMD("normal", -IFF_LINK0, setifflags), DEF_CMD("compress", IFF_LINK0, setifflags), DEF_CMD("noicmp", IFF_LINK1, setifflags),