Commit 31d8b9e0 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

net: Disable NETIF_F_TSO_ECN when TSO is disabled

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: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ea2d3688
...@@ -5208,6 +5208,10 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) ...@@ -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. */ /* Software GSO depends on SG. */
if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) { if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n"); netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment