mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
net: Disable all TSO features when SG is disabled
The feature flags NETIF_F_TSO and NETIF_F_TSO6 independently enable TSO for IPv4 and IPv6 respectively. However, the test in netdev_fix_features() and its predecessor functions was never updated to check for NETIF_F_TSO6, possibly because it was originally proposed that TSO for IPv6 would be dependent on both feature flags. Now that these feature flags can be changed independently from user-space and we depend on netdev_fix_features() to fix invalid feature combinations, it's important to disable them both if scatter-gather is disabled. Also disable NETIF_F_TSO_ECN so user-space sees all TSO features as disabled. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c0212fb146
commit
ea2d36883c
1 changed files with 3 additions and 3 deletions
|
@ -5203,9 +5203,9 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
|
|||
}
|
||||
|
||||
/* TSO requires that SG is present as well. */
|
||||
if ((features & NETIF_F_TSO) && !(features & NETIF_F_SG)) {
|
||||
netdev_info(dev, "Dropping NETIF_F_TSO since no SG feature.\n");
|
||||
features &= ~NETIF_F_TSO;
|
||||
if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) {
|
||||
netdev_info(dev, "Dropping TSO features since no SG feature.\n");
|
||||
features &= ~NETIF_F_ALL_TSO;
|
||||
}
|
||||
|
||||
/* Software GSO depends on SG. */
|
||||
|
|
Loading…
Reference in a new issue