summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorGal Pressman <galp@mellanox.com>2018-03-04 14:12:04 +0200
committerDavid S. Miller <davem@davemloft.net>2018-03-05 10:25:51 -0500
commite6c6a92905210484a84a0cae5b013570b7a67b6f (patch)
tree2ba380e66afed15d82f3ef785f9eb0cddb575950 /net/core/dev.c
parente574c0eec56a746445cab3f8f7b9a0302dd101f5 (diff)
downloadlinux-e6c6a92905210484a84a0cae5b013570b7a67b6f.tar.gz
linux-e6c6a92905210484a84a0cae5b013570b7a67b6f.tar.bz2
linux-e6c6a92905210484a84a0cae5b013570b7a67b6f.zip
net: Make RX-FCS and LRO mutually exclusive
LRO and RX-FCS offloads cannot be enabled at the same time since it is not clear what should happen to the FCS of each coalesced packet. The FCS is not really part of the TCP payload, hence cannot be merged into one big packet. On the other hand, providing one big LRO packet with one FCS contradicts the RX-FCS feature goal. Use the fix features mechanism in order to prevent intersection of the features and drop LRO in case RX-FCS is requested. Enabling RX-FCS while LRO is enabled will result in: $ ethtool -K ens6 rx-fcs on Actual changes: large-receive-offload: off [requested on] rx-fcs: on Signed-off-by: Gal Pressman <galp@mellanox.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-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 40fb3aed5df2..8b51f923ce99 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7542,6 +7542,12 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
}
}
+ /* LRO feature cannot be combined with RX-FCS */
+ if ((features & NETIF_F_LRO) && (features & NETIF_F_RXFCS)) {
+ netdev_dbg(dev, "Dropping LRO feature since RX-FCS is requested.\n");
+ features &= ~NETIF_F_LRO;
+ }
+
return features;
}