Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Sep 2016 08:30:53 +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-10@freebsd.org
Subject:   svn commit: r306247 - stable/10/sys/dev/mlx5/mlx5_en
Message-ID:  <201609230830.u8N8UrHe053209@repo.freebsd.org>

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

Log:
  MFC r305870:
  mlx5en: Make the mlx5e_open_cq() and mlx5e_close_cq() functions global.
  
  Make some functions and structures global to allow for code reuse
  when creating rate limiting sendqueues.
  
  Sponsored by:	Mellanox Technologies

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

Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h
==============================================================================
--- stable/10/sys/dev/mlx5/mlx5_en/en.h	Fri Sep 23 08:30:09 2016	(r306246)
+++ stable/10/sys/dev/mlx5/mlx5_en/en.h	Fri Sep 23 08:30:53 2016	(r306247)
@@ -358,6 +358,21 @@ struct mlx5e_stats {
 	struct mlx5e_port_stats_debug port_stats_debug;
 };
 
+struct mlx5e_rq_param {
+	u32	rqc [MLX5_ST_SZ_DW(rqc)];
+	struct mlx5_wq_param wq;
+};
+
+struct mlx5e_sq_param {
+	u32	sqc [MLX5_ST_SZ_DW(sqc)];
+	struct mlx5_wq_param wq;
+};
+
+struct mlx5e_cq_param {
+	u32	cqc [MLX5_ST_SZ_DW(cqc)];
+	struct mlx5_wq_param wq;
+};
+
 struct mlx5e_params {
 	u8	log_sq_size;
 	u8	log_rq_size;
@@ -804,5 +819,8 @@ void	mlx5e_create_stats(struct sysctl_ct
 void	mlx5e_send_nop(struct mlx5e_sq *, u32);
 void	mlx5e_sq_cev_timeout(void *);
 int	mlx5e_refresh_channel_params(struct mlx5e_priv *);
+int	mlx5e_open_cq(struct mlx5e_priv *, struct mlx5e_cq_param *,
+    struct mlx5e_cq *, mlx5e_cq_comp_t *, int eq_ix);
+void	mlx5e_close_cq(struct mlx5e_cq *);
 
 #endif					/* _MLX5_EN_H_ */

Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==============================================================================
--- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c	Fri Sep 23 08:30:09 2016	(r306246)
+++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c	Fri Sep 23 08:30:53 2016	(r306247)
@@ -34,21 +34,6 @@
 char mlx5e_version[] = "Mellanox Ethernet driver"
     " (" ETH_DRIVER_VERSION ")";
 
-struct mlx5e_rq_param {
-	u32	rqc [MLX5_ST_SZ_DW(rqc)];
-	struct mlx5_wq_param wq;
-};
-
-struct mlx5e_sq_param {
-	u32	sqc [MLX5_ST_SZ_DW(sqc)];
-	struct mlx5_wq_param wq;
-};
-
-struct mlx5e_cq_param {
-	u32	cqc [MLX5_ST_SZ_DW(cqc)];
-	struct mlx5_wq_param wq;
-};
-
 struct mlx5e_channel_param {
 	struct mlx5e_rq_param rq;
 	struct mlx5e_sq_param sq;
@@ -1355,7 +1340,7 @@ mlx5e_disable_cq(struct mlx5e_cq *cq)
 	mlx5_core_destroy_cq(cq->priv->mdev, &cq->mcq);
 }
 
-static int
+int
 mlx5e_open_cq(struct mlx5e_priv *priv,
     struct mlx5e_cq_param *param,
     struct mlx5e_cq *cq,
@@ -1380,7 +1365,7 @@ err_destroy_cq:
 	return (err);
 }
 
-static void
+void
 mlx5e_close_cq(struct mlx5e_cq *cq)
 {
 	mlx5e_disable_cq(cq);



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