提交 de8d5ab2 编写于 作者: G Gal Pressman 提交者: David S. Miller

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: NDavid Miller <davem@davemloft.net>
Signed-off-by: NGal Pressman <galp@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 678f4bda
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册