svn commit: r357327 - head/sys/dev/mlx4/mlx4_en

Hans Petter Selasky hselasky at FreeBSD.org
Fri Jan 31 10:41:48 UTC 2020


Author: hselasky
Date: Fri Jan 31 10:41:47 2020
New Revision: 357327
URL: https://svnweb.freebsd.org/changeset/base/357327

Log:
  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

Modified:
  head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c

Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c
==============================================================================
--- head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c	Fri Jan 31 10:34:38 2020	(r357326)
+++ head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c	Fri Jan 31 10:41:47 2020	(r357327)
@@ -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;
+	NET_EPOCH_ENTER(et);
+	done = mlx4_en_process_rx_cq(dev, cq, budget);
+	NET_EPOCH_EXIT(et);
+	cq->tot_rx += done;
 
-        return done;
-
+	return done;
 }
 void mlx4_en_rx_irq(struct mlx4_cq *mcq)
 {


More information about the svn-src-all mailing list