Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de8d5ab2 authored by Gal Pressman's avatar Gal Pressman Committed by David S. Miller
Browse files

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: default avatarDavid Miller <davem@davemloft.net>
Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 678f4bda
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -7549,12 +7549,19 @@ 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)) {
	/* 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;
}