aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index b0eee49a2489..4b43f5dcabcd 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7424,6 +7424,18 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
7424 features &= ~dev->gso_partial_features; 7424 features &= ~dev->gso_partial_features;
7425 } 7425 }
7426 7426
7427 if (!(features & NETIF_F_RXCSUM)) {
7428 /* NETIF_F_GRO_HW implies doing RXCSUM since every packet
7429 * successfully merged by hardware must also have the
7430 * checksum verified by hardware. If the user does not
7431 * want to enable RXCSUM, logically, we should disable GRO_HW.
7432 */
7433 if (features & NETIF_F_GRO_HW) {
7434 netdev_dbg(dev, "Dropping NETIF_F_GRO_HW since no RXCSUM feature.\n");
7435 features &= ~NETIF_F_GRO_HW;
7436 }
7437 }
7438
7427 return features; 7439 return features;
7428} 7440}
7429 7441