Skip to content

Commit e6c6a92

Browse files
Gal Pressmandavem330
authored andcommitted
net: Make RX-FCS and LRO mutually exclusive
LRO and RX-FCS offloads cannot be enabled at the same time since it is not clear what should happen to the FCS of each coalesced packet. The FCS is not really part of the TCP payload, hence cannot be merged into one big packet. On the other hand, providing one big LRO packet with one FCS contradicts the RX-FCS feature goal. Use the fix features mechanism in order to prevent intersection of the features and drop LRO in case RX-FCS is requested. Enabling RX-FCS while LRO is enabled will result in: $ ethtool -K ens6 rx-fcs on Actual changes: large-receive-offload: off [requested on] rx-fcs: on Signed-off-by: Gal Pressman <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e574c0e commit e6c6a92

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

net/core/dev.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7542,6 +7542,12 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
75427542
}
75437543
}
75447544

7545+
/* LRO feature cannot be combined with RX-FCS */
7546+
if ((features & NETIF_F_LRO) && (features & NETIF_F_RXFCS)) {
7547+
netdev_dbg(dev, "Dropping LRO feature since RX-FCS is requested.\n");
7548+
features &= ~NETIF_F_LRO;
7549+
}
7550+
75457551
return features;
75467552
}
75477553

0 commit comments

Comments
 (0)