1
0

net/mlx5: Add sync reset drop mode support

On sync reset flow, firmware may request a PF, which already
acknowledged the unload event, to move to drop mode. Drop mode means
that this PF will reduce polling frequency, as this PF is not going to
have another active part in the reset, but only reload back after the
reset.

Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Moshe Shemesh
2024-10-16 20:36:14 +03:00
committed by Paolo Abeni
parent a1903bf50f
commit b37f3f2be0

View File

@@ -35,6 +35,7 @@ struct mlx5_fw_reset {
enum {
MLX5_FW_RST_STATE_IDLE = 0,
MLX5_FW_RST_STATE_TOGGLE_REQ = 4,
MLX5_FW_RST_STATE_DROP_MODE = 5,
};
enum {
@@ -616,6 +617,7 @@ static void mlx5_sync_reset_unload_event(struct work_struct *work)
struct mlx5_fw_reset *fw_reset;
struct mlx5_core_dev *dev;
unsigned long timeout;
int poll_freq = 20;
bool reset_action;
u8 rst_state;
int err;
@@ -651,7 +653,12 @@ static void mlx5_sync_reset_unload_event(struct work_struct *work)
reset_action = true;
break;
}
msleep(20);
if (rst_state == MLX5_FW_RST_STATE_DROP_MODE) {
mlx5_core_info(dev, "Sync Reset Drop mode ack\n");
mlx5_set_fw_rst_ack(dev);
poll_freq = 1000;
}
msleep(poll_freq);
} while (!time_after(jiffies, timeout));
if (!reset_action) {