From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [PATCH mlx5-next v1 4/5] IB/mlx5: Limit the scope of struct mlx5_bfreg_info to mlx5_ib
Date: Tue, 24 Mar 2020 08:01:42 +0200 [thread overview]
Message-ID: <20200324060143.1569116-5-leon@kernel.org> (raw)
In-Reply-To: <20200324060143.1569116-1-leon@kernel.org>
From: Leon Romanovsky <leonro@mellanox.com>
struct mlx5_bfreg_info is used by mlx5_ib only but is exposed to both
RDMA and netdev parts of mlx5 driver. Move that struct to mlx5_ib
namespace, clean vertical space alignment and convert lib_uar_4k
from bool to bitfield.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/infiniband/hw/mlx5/mlx5_ib.h | 17 +++++++++++++++++
include/linux/mlx5/driver.h | 17 -----------------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index 370b03db366b..e26ba6c390ad 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -128,6 +128,23 @@ enum mlx5_ib_mmap_type {
MLX5_IB_MMAP_TYPE_UAR_NC = 4,
};
+struct mlx5_bfreg_info {
+ u32 *sys_pages;
+ int num_low_latency_bfregs;
+ unsigned int *count;
+
+ /*
+ * protect bfreg allocation data structs
+ */
+ struct mutex lock;
+ u32 ver;
+ u8 lib_uar_4k : 1;
+ u32 num_sys_pages;
+ u32 num_static_sys_pages;
+ u32 total_num_bfregs;
+ u32 num_dyn_bfregs;
+};
+
struct mlx5_ib_ucontext {
struct ib_ucontext ibucontext;
struct list_head db_page_list;
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 3f10a9633012..6ef3e4368550 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -213,23 +213,6 @@ enum mlx5_port_status {
MLX5_PORT_DOWN = 2,
};
-struct mlx5_bfreg_info {
- u32 *sys_pages;
- int num_low_latency_bfregs;
- unsigned int *count;
-
- /*
- * protect bfreg allocation data structs
- */
- struct mutex lock;
- u32 ver;
- bool lib_uar_4k;
- u32 num_sys_pages;
- u32 num_static_sys_pages;
- u32 total_num_bfregs;
- u32 num_dyn_bfregs;
-};
-
struct mlx5_cmd_first {
__be32 data[4];
};
--
2.24.1
next prev parent reply other threads:[~2020-03-24 6:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 6:01 [PATCH rdma-next v1 0/5] Introduce dynamic UAR allocation mode Leon Romanovsky
2020-03-24 6:01 ` [PATCH rdma-next v1 1/5] IB/mlx5: Expose UAR object and its alloc/destroy commands Leon Romanovsky
2020-03-24 6:01 ` [PATCH rdma-next v1 2/5] IB/mlx5: Extend CQ creation to get uar page index from user space Leon Romanovsky
2020-03-24 6:01 ` [PATCH rdma-next v1 3/5] IB/mlx5: Extend QP " Leon Romanovsky
2020-03-24 6:01 ` Leon Romanovsky [this message]
2020-03-24 6:01 ` [PATCH rdma-next v1 5/5] IB/mlx5: Move to fully dynamic UAR mode once user space supports it Leon Romanovsky
2020-03-27 16:08 ` [PATCH rdma-next v1 0/5] Introduce dynamic UAR allocation mode Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200324060143.1569116-5-leon@kernel.org \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.