summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorAlexander Duyck2016-05-02 18:38:24 +0200
committerDavid S. Miller2016-05-04 19:32:27 +0200
commitb1dc497b28ad053d1f6d5b5cb186af9564e4d7f1 (patch)
tree3bac79c9ae7ede9897b691687ef9bf21791c274e /net/core/dev.c
parentgso: Only allow GSO_PARTIAL if we can checksum the inner protocol (diff)
downloadkernel-qcow2-linux-b1dc497b28ad053d1f6d5b5cb186af9564e4d7f1.tar.gz
kernel-qcow2-linux-b1dc497b28ad053d1f6d5b5cb186af9564e4d7f1.tar.xz
kernel-qcow2-linux-b1dc497b28ad053d1f6d5b5cb186af9564e4d7f1.zip
net: Fix netdev_fix_features so that TSO_MANGLEID is only available with TSO
This change makes it so that we will strip the TSO_MANGLEID bit if TSO is not present. This way we will also handle ECN correctly of TSO is not present. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 673d1f118bfb..e98ba63fe280 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6721,6 +6721,10 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
features &= ~NETIF_F_TSO6;
}
+ /* TSO with IPv4 ID mangling requires IPv4 TSO be enabled */
+ if ((features & NETIF_F_TSO_MANGLEID) && !(features & NETIF_F_TSO))
+ features &= ~NETIF_F_TSO_MANGLEID;
+
/* TSO ECN requires that TSO is present as well. */
if ((features & NETIF_F_ALL_TSO) == NETIF_F_TSO_ECN)
features &= ~NETIF_F_TSO_ECN;