aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorGal Pressman <galp@mellanox.com>2018-03-12 11:48:49 +0200
committerDavid S. Miller <davem@davemloft.net>2018-03-12 11:15:16 -0400
commitde8d5ab2ff6edc8e26822965a30b6aa4e9332025 (patch)
treef325f018f7f7d547d6c11d1e275d4c4410eff8c6 /net/core/dev.c
parentnet: llc: drop VLA in llc_sap_mcast() (diff)
downloadlinux-dev-de8d5ab2ff6edc8e26822965a30b6aa4e9332025.tar.xz
linux-dev-de8d5ab2ff6edc8e26822965a30b6aa4e9332025.zip
net: Make RX-FCS and HW GRO mutually exclusive
Same as LRO, hardware GRO cannot be enabled with RX-FCS. When both are requested, hardware GRO will be dropped. Suggested-by: David Miller <davem@davemloft.net> Signed-off-by: Gal Pressman <galp@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 259abb1515d0..12a9aad0b057 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7549,10 +7549,17 @@ 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;
+ /* LRO/HW-GRO features cannot be combined with RX-FCS */
+ if (features & NETIF_F_RXFCS) {
+ if (features & NETIF_F_LRO) {
+ netdev_dbg(dev, "Dropping LRO feature since RX-FCS is requested.\n");
+ features &= ~NETIF_F_LRO;
+ }
+
+ if (features & NETIF_F_GRO_HW) {
+ netdev_dbg(dev, "Dropping HW-GRO feature since RX-FCS is requested.\n");
+ features &= ~NETIF_F_GRO_HW;
+ }
}
return features;