Patch "net/mlx5: Consider tx_enabled in all modes on remap" has been added to the 4.12-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net/mlx5: Consider tx_enabled in all modes on remap
to the 4.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-mlx5-consider-tx_enabled-in-all-modes-on-remap.patch
and it can be found in the queue-4.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Tue Aug 8 16:27:29 PDT 2017
From: Aviv Heller <[email protected]>
Date: Sun, 2 Jul 2017 19:13:43 +0300
Subject: net/mlx5: Consider tx_enabled in all modes on remap
From: Aviv Heller <[email protected]>
[ Upstream commit dc798b4cc0f2a06e7ad7d522403de274b86a0a6f ]
The tx_enabled lag event field is used to determine whether a slave is active.
Current logic uses this value only if the mode is active-backup.
However, LACP mode, although considered a load balancing mode, can mark a slave as inactive in certain situations (e.g., LACP timeout).
This fix takes the tx_enabled value into account when remapping, with no respect to the LAG mode (this should not affect the behavior in XOR mode, since in this mode both slaves are marked as active).
--- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/lag.c +10 -15
@@ -157,22 +157,17 @@ static bool mlx5_lag_is_bonded(struct mlstatic void mlx5_infer_tx_affinity_mapping (struct lag_tracker *tracker,u8 *port1,u8 *port2) { -if (tracker->tx_type ==NETDEV_LAG_TX_TYPE_ACTIVEBACKUP ) { -if (tracker->netdev_state[0 ].tx_enabled) { - *port1 =1 ; - *port2 =1 ; - }else { - *port1 =2 ; - *port2 =2 ; - } - }else { - *port1 =1 ; - *port2 =2 ; -if (!tracker->netdev_state[0 ].link_up) - *port1 =2 ; -else if (!tracker->netdev_state[1 ].link_up) - *port2 =1 ; + *port1 =1 ; + *port2 =2 ; +if (!tracker->netdev_state[0 ].tx_enabled || + !tracker->netdev_state[0 ].link_up) { + *port1 =2 ; +return ; } + +if (!tracker->netdev_state[1 ].tx_enabled || + !tracker->netdev_state[1 ].link_up) + *port2 =1 ; } static void mlx5_activate_lag(struct mlx5_lag *ldev,
Patches currently in stable-queue which might be from [email protected] are
queue-4.12/net-mlx5-consider-tx_enabled-in-all-modes-on-remap.patch