Skip to content

Commit a8dd7ac

Browse files
ayalevinSaeed Mahameed
authored andcommitted
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: Aya Levin <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 869c5f9 commit a8dd7ac

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/trap.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,6 @@ static void mlx5e_destroy_trap_direct_rq_tir(struct mlx5_core_dev *mdev, struct
128128
mlx5e_destroy_tir(mdev, tir);
129129
}
130130

131-
static void mlx5e_activate_trap_rq(struct mlx5e_rq *rq)
132-
{
133-
set_bit(MLX5E_RQ_STATE_ENABLED, &rq->state);
134-
}
135-
136-
static void mlx5e_deactivate_trap_rq(struct mlx5e_rq *rq)
137-
{
138-
clear_bit(MLX5E_RQ_STATE_ENABLED, &rq->state);
139-
}
140-
141131
static void mlx5e_build_trap_params(struct mlx5_core_dev *mdev,
142132
int max_mtu, u16 q_counter,
143133
struct mlx5e_trap *t)
@@ -202,15 +192,14 @@ void mlx5e_close_trap(struct mlx5e_trap *trap)
202192
static void mlx5e_activate_trap(struct mlx5e_trap *trap)
203193
{
204194
napi_enable(&trap->napi);
205-
mlx5e_activate_trap_rq(&trap->rq);
206-
napi_schedule(&trap->napi);
195+
mlx5e_activate_rq(&trap->rq);
207196
}
208197

209198
void mlx5e_deactivate_trap(struct mlx5e_priv *priv)
210199
{
211200
struct mlx5e_trap *trap = priv->en_trap;
212201

213-
mlx5e_deactivate_trap_rq(&trap->rq);
202+
mlx5e_deactivate_rq(&trap->rq);
214203
napi_disable(&trap->napi);
215204
}
216205

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,10 @@ int mlx5e_open_rq(struct mlx5e_params *params, struct mlx5e_rq_param *param,
886886
void mlx5e_activate_rq(struct mlx5e_rq *rq)
887887
{
888888
set_bit(MLX5E_RQ_STATE_ENABLED, &rq->state);
889-
mlx5e_trigger_irq(rq->icosq);
889+
if (rq->icosq)
890+
mlx5e_trigger_irq(rq->icosq);
891+
else
892+
napi_schedule(rq->cq.napi);
890893
}
891894

892895
void mlx5e_deactivate_rq(struct mlx5e_rq *rq)

0 commit comments

Comments
 (0)