net/mlx5e: Modify uplink state on interface up/down
When setting the PF interface up/down, notify the firmware to update
uplink state via MODIFY_VPORT_STATE, when E-Switch is enabled.
This behavior will prevent sending traffic out on uplink port when PF is
down, such as sending traffic from a VF interface which is still up.
Currently when calling mlx5e_open/close(), the driver only sends PAOS
command to notify the firmware to set the physical port state to
up/down, however, it is not sufficient. When VF is in "auto" state, it
follows the uplink state, which was not updated on mlx5e_open/close()
before this patch.
When switchdev mode is enabled and uplink representor is first enabled,
set the uplink port state value back to its FW default "AUTO".
Fixes: 63bfd399de
("net/mlx5e: Send PAOS command on interface up/down")
Signed-off-by: Ron Diskin <rondi@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:

committed by
Saeed Mahameed

parent
ed56d749c3
commit
7d0314b11c
@@ -4381,6 +4381,7 @@ struct mlx5_ifc_query_vport_state_out_bits {
|
||||
enum {
|
||||
MLX5_VPORT_STATE_OP_MOD_VNIC_VPORT = 0x0,
|
||||
MLX5_VPORT_STATE_OP_MOD_ESW_VPORT = 0x1,
|
||||
MLX5_VPORT_STATE_OP_MOD_UPLINK = 0x2,
|
||||
};
|
||||
|
||||
struct mlx5_ifc_arm_monitor_counter_in_bits {
|
||||
|
Reference in New Issue
Block a user