From 1d3f5325b641fa5db9f0a37417dc961d46b79662 Mon Sep 17 00:00:00 2001 From: hselasky Date: Fri, 31 Jan 2020 10:41:47 +0000 Subject: [PATCH] Widen EPOCH(9) usage in mlx4en(4). Make sure all receive completion callbacks are covered by the network EPOCH(9), because this is required when calling if_input() and ether_input() after r357012. Convert some spaces to tabs while at it. Sponsored by: Mellanox Technologies --- sys/dev/mlx4/mlx4_en/mlx4_en_rx.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c b/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c index 6e588a0ca92b..e9f0d2f640e1 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c @@ -866,14 +866,16 @@ out: /* Rx CQ polling - called by NAPI */ static int mlx4_en_poll_rx_cq(struct mlx4_en_cq *cq, int budget) { - struct net_device *dev = cq->dev; - int done; + struct net_device *dev = cq->dev; + struct epoch_tracker et; + int done; - done = mlx4_en_process_rx_cq(dev, cq, budget); - cq->tot_rx += done; - - return done; + NET_EPOCH_ENTER(et); + done = mlx4_en_process_rx_cq(dev, cq, budget); + NET_EPOCH_EXIT(et); + cq->tot_rx += done; + return done; } void mlx4_en_rx_irq(struct mlx4_cq *mcq) {