Commit a8dd7ac1 authored by Aya Levin's avatar Aya Levin Committed by Saeed Mahameed

net/mlx5e: Generalize RQ activation

Support RQ activation for RQs without an ICOSQ in the main flow, like
existing trap-RQ and like PTP-RQ that will be introduced in the coming
patches in the patchset.
With this patch, remove the wrapper in traps to deactivate the trap-RQ.
Signed-off-by: default avatarAya Levin <ayal@nvidia.com>
Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 869c5f92
...@@ -128,16 +128,6 @@ static void mlx5e_destroy_trap_direct_rq_tir(struct mlx5_core_dev *mdev, struct ...@@ -128,16 +128,6 @@ static void mlx5e_destroy_trap_direct_rq_tir(struct mlx5_core_dev *mdev, struct
mlx5e_destroy_tir(mdev, tir); mlx5e_destroy_tir(mdev, tir);
} }
static void mlx5e_activate_trap_rq(struct mlx5e_rq *rq)
{
set_bit(MLX5E_RQ_STATE_ENABLED, &rq->state);
}
static void mlx5e_deactivate_trap_rq(struct mlx5e_rq *rq)
{
clear_bit(MLX5E_RQ_STATE_ENABLED, &rq->state);
}
static void mlx5e_build_trap_params(struct mlx5_core_dev *mdev, static void mlx5e_build_trap_params(struct mlx5_core_dev *mdev,
int max_mtu, u16 q_counter, int max_mtu, u16 q_counter,
struct mlx5e_trap *t) struct mlx5e_trap *t)
...@@ -202,15 +192,14 @@ void mlx5e_close_trap(struct mlx5e_trap *trap) ...@@ -202,15 +192,14 @@ void mlx5e_close_trap(struct mlx5e_trap *trap)
static void mlx5e_activate_trap(struct mlx5e_trap *trap) static void mlx5e_activate_trap(struct mlx5e_trap *trap)
{ {
napi_enable(&trap->napi); napi_enable(&trap->napi);
mlx5e_activate_trap_rq(&trap->rq); mlx5e_activate_rq(&trap->rq);
napi_schedule(&trap->napi);
} }
void mlx5e_deactivate_trap(struct mlx5e_priv *priv) void mlx5e_deactivate_trap(struct mlx5e_priv *priv)
{ {
struct mlx5e_trap *trap = priv->en_trap; struct mlx5e_trap *trap = priv->en_trap;
mlx5e_deactivate_trap_rq(&trap->rq); mlx5e_deactivate_rq(&trap->rq);
napi_disable(&trap->napi); napi_disable(&trap->napi);
} }
......
...@@ -886,7 +886,10 @@ int mlx5e_open_rq(struct mlx5e_params *params, struct mlx5e_rq_param *param, ...@@ -886,7 +886,10 @@ int mlx5e_open_rq(struct mlx5e_params *params, struct mlx5e_rq_param *param,
void mlx5e_activate_rq(struct mlx5e_rq *rq) void mlx5e_activate_rq(struct mlx5e_rq *rq)
{ {
set_bit(MLX5E_RQ_STATE_ENABLED, &rq->state); set_bit(MLX5E_RQ_STATE_ENABLED, &rq->state);
if (rq->icosq)
mlx5e_trigger_irq(rq->icosq); mlx5e_trigger_irq(rq->icosq);
else
napi_schedule(rq->cq.napi);
} }
void mlx5e_deactivate_rq(struct mlx5e_rq *rq) void mlx5e_deactivate_rq(struct mlx5e_rq *rq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment