* [PATCH net-next] net: Make RX-FCS and HW GRO mutually exclusive
@ 2018-03-12 9:48 Gal Pressman
2018-03-12 15:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Gal Pressman @ 2018-03-12 9:48 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Gal Pressman
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>
---
net/core/dev.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 1bc3792..fd87c2c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7542,10 +7542,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;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: Make RX-FCS and HW GRO mutually exclusive
2018-03-12 9:48 [PATCH net-next] net: Make RX-FCS and HW GRO mutually exclusive Gal Pressman
@ 2018-03-12 15:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-03-12 15:15 UTC (permalink / raw)
To: galp; +Cc: netdev
From: Gal Pressman <galp@mellanox.com>
Date: Mon, 12 Mar 2018 11:48:49 +0200
> 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>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-12 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 9:48 [PATCH net-next] net: Make RX-FCS and HW GRO mutually exclusive Gal Pressman
2018-03-12 15:15 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.