From d35738c38d4b9dc6aa56b52ec288ff33d329ea64 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Sat, 25 Jan 2020 00:06:18 +0000 Subject: [PATCH] Enter the network epoch in RX processing taskqueue. --- sys/dev/mlx4/mlx4_en/mlx4_en_rx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c b/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c index c9222e1df55c..6e588a0ca92b 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c @@ -895,6 +895,7 @@ void mlx4_en_rx_irq(struct mlx4_cq *mcq) void mlx4_en_rx_que(void *context, int pending) { + struct epoch_tracker et; struct mlx4_en_cq *cq; struct thread *td; @@ -905,8 +906,10 @@ void mlx4_en_rx_que(void *context, int pending) sched_bind(td, cq->curr_poll_rx_cpu_id); thread_unlock(td); + NET_EPOCH_ENTER(et); while (mlx4_en_poll_rx_cq(cq, MLX4_EN_RX_BUDGET) == MLX4_EN_RX_BUDGET); + NET_EPOCH_EXIT(et); mlx4_en_arm_cq(cq->dev->if_softc, cq); }