]> Pileus Git - ~andy/linux/commitdiff
net: Disable NETIF_F_TSO_ECN when TSO is disabled
authorBen Hutchings <bhutchings@solarflare.com>
Tue, 12 Apr 2011 14:47:15 +0000 (14:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Apr 2011 02:29:45 +0000 (19:29 -0700)
NETIF_F_TSO_ECN has no effect when TSO is disabled; this just means
that feature state will be accurately reported to user-space.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 6401fb588145ac2e302b79d044cc7ea11219db1d..c2ac599fa0f642f368025ababaa6c95476874c24 100644 (file)
@@ -5208,6 +5208,10 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
                features &= ~NETIF_F_ALL_TSO;
        }
 
                features &= ~NETIF_F_ALL_TSO;
        }
 
+       /* TSO ECN requires that TSO is present as well. */
+       if ((features & NETIF_F_ALL_TSO) == NETIF_F_TSO_ECN)
+               features &= ~NETIF_F_TSO_ECN;
+
        /* Software GSO depends on SG. */
        if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
                netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n");
        /* Software GSO depends on SG. */
        if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
                netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n");