Skip to content

Commit 02d1e1a

Browse files
Di Zhukuba-moo
authored andcommitted
netdev: preserve NETIF_F_ALL_FOR_ALL across TSO updates
Directly increment the TSO features incurs a side effect: it will also directly clear the flags in NETIF_F_ALL_FOR_ALL on the master device, which can cause issues such as the inability to enable the nocache copy feature on the bonding driver. The fix is to include NETIF_F_ALL_FOR_ALL in the update mask, thereby preventing it from being cleared. Fixes: b0ce350 ("bonding: allow TSO being set on bonding master") Signed-off-by: Di Zhu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2a71a1a commit 02d1e1a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

include/linux/netdevice.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5323,7 +5323,8 @@ netdev_features_t netdev_increment_features(netdev_features_t all,
53235323
static inline netdev_features_t netdev_add_tso_features(netdev_features_t features,
53245324
netdev_features_t mask)
53255325
{
5326-
return netdev_increment_features(features, NETIF_F_ALL_TSO, mask);
5326+
return netdev_increment_features(features, NETIF_F_ALL_TSO |
5327+
NETIF_F_ALL_FOR_ALL, mask);
53275328
}
53285329

53295330
int __netdev_update_features(struct net_device *dev);

0 commit comments

Comments
 (0)