mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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>
This commit is contained in:
parent
678f4bda35
commit
de8d5ab2ff
1 changed files with 11 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue