Skip to content

Commit 1a3c998

Browse files
klassertdavem330
authored andcommitted
net: Add a netdev software feature set that defaults to off.
The previous patch added the NETIF_F_GRO_FRAGLIST feature. This is a software feature that should default to off. Current software features default to on, so add a new feature set that defaults to off. Signed-off-by: Steffen Klassert <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3b33583 commit 1a3c998

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

include/linux/netdev_features.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start)
230230
/* changeable features with no special hardware requirements */
231231
#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO)
232232

233+
/* Changeable features with no special hardware requirements that defaults to off. */
234+
#define NETIF_F_SOFT_FEATURES_OFF NETIF_F_GRO_FRAGLIST
235+
233236
#define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \
234237
NETIF_F_HW_VLAN_CTAG_RX | \
235238
NETIF_F_HW_VLAN_CTAG_TX | \

net/core/dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9283,7 +9283,7 @@ int register_netdevice(struct net_device *dev)
92839283
/* Transfer changeable features to wanted_features and enable
92849284
* software offloads (GSO and GRO).
92859285
*/
9286-
dev->hw_features |= NETIF_F_SOFT_FEATURES;
9286+
dev->hw_features |= (NETIF_F_SOFT_FEATURES | NETIF_F_SOFT_FEATURES_OFF);
92879287
dev->features |= NETIF_F_SOFT_FEATURES;
92889288

92899289
if (dev->netdev_ops->ndo_udp_tunnel_add) {

0 commit comments

Comments
 (0)