Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Sep 2016 08:22:30 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r306237 - stable/11/sys/dev/mlx5/mlx5_en
Message-ID:  <201609230822.u8N8MUmf049842@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Sep 23 08:22:30 2016
New Revision: 306237
URL: https://svnweb.freebsd.org/changeset/base/306237

Log:
  MFC r305871:
  mlx5en: Optimise away duplicate UAR pointers.
  
  This change also reduces the size of the mlx5e_sq structure so that the last
  queue_state element will fit into the previous cacheline and then the mlx5e_sq
  structure becomes one cacheline less for amd64.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/dev/mlx5/mlx5_en/en.h
  stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h
==============================================================================
--- stable/11/sys/dev/mlx5/mlx5_en/en.h	Fri Sep 23 08:21:45 2016	(r306236)
+++ stable/11/sys/dev/mlx5/mlx5_en/en.h	Fri Sep 23 08:22:30 2016	(r306237)
@@ -528,8 +528,7 @@ struct mlx5e_sq {
 
 	/* read only */
 	struct	mlx5_wq_cyc wq;
-	void	__iomem *uar_map;
-	void	__iomem *uar_bf_map;
+	struct	mlx5_uar uar;
 	struct	ifnet *ifp;
 	u32	sqn;
 	u32	bf_buf_size;
@@ -538,7 +537,6 @@ struct mlx5e_sq {
 
 	/* control path */
 	struct	mlx5_wq_ctrl wq_ctrl;
-	struct	mlx5_uar uar;
 	struct	mlx5e_priv *priv;
 	int	tc;
 	unsigned int queue_state;
@@ -780,13 +778,13 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, 
 	wmb();
 
 	if (bf_sz) {
-		__iowrite64_copy(sq->uar_bf_map + ofst, wqe, bf_sz);
+		__iowrite64_copy(sq->uar.bf_map + ofst, wqe, bf_sz);
 
 		/* flush the write-combining mapped buffer */
 		wmb();
 
 	} else {
-		mlx5_write64(wqe, sq->uar_map + ofst, NULL);
+		mlx5_write64(wqe, sq->uar.map + ofst, NULL);
 	}
 
 	sq->bf_offset ^= sq->bf_buf_size;

Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==============================================================================
--- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c	Fri Sep 23 08:21:45 2016	(r306236)
+++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c	Fri Sep 23 08:22:30 2016	(r306237)
@@ -956,8 +956,6 @@ mlx5e_create_sq(struct mlx5e_channel *c,
 		goto err_unmap_free_uar;
 
 	sq->wq.db = &sq->wq.db[MLX5_SND_DBR];
-	sq->uar_map = sq->uar.map;
-	sq->uar_bf_map = sq->uar.bf_map;
 	sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2;
 
 	err = mlx5e_alloc_sq_db(sq);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609230822.u8N8MUmf049842>