summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-09-08 16:10:02 -0700
committerDavid S. Miller <davem@davemloft.net>2008-09-08 16:10:02 -0700
commite2a6b85247aacc52d6ba0d9b37a99b8d1a3e0d83 (patch)
tree1635ffcfb925cfdded28291b26ca0505834c486f /net/core
parenta505f4ff49ff05ca9030069fab7de229dae7c819 (diff)
net: Enable TSO if supported by at least one device
As it stands users of netdev_compute_features (e.g., bridges/bonding) will only enable TSO if all consituent devices support it. This is unnecessarily pessimistic since even on devices that do not support hardware TSO and SG, emulated TSO still performs to a par with TSO off. This patch enables TSO if at least on constituent device supports it in hardware. The direct beneficiaries will be virtualisation that uses bridging since this means that TSO will always be enabled for communication from the host to the guests. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 60c51f765887..abef86ec4cb0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4663,6 +4663,12 @@ int netdev_compute_features(unsigned long all, unsigned long one)
one |= NETIF_F_GSO_SOFTWARE;
one |= NETIF_F_GSO;
+ /*
+ * If even one device supports a GSO protocol with software fallback,
+ * enable it for all.
+ */
+ all |= one & NETIF_F_GSO_SOFTWARE;
+
/* If even one device supports robust GSO, enable it for all. */
if (one & NETIF_F_GSO_ROBUST)
all |= NETIF_F_GSO_ROBUST;