From: Ophir Munk <ophirmu@mellanox.com>
To: dev@dpdk.org, Matan Azrad <matan@mellanox.com>,
Raslan Darawsheh <rasland@mellanox.com>
Cc: Ophir Munk <ophirmu@mellanox.com>
Subject: [dpdk-dev] [PATCH v1 3/8] drivers: remove mlx5 protection domain dependency on ibv
Date: Wed, 3 Jun 2020 15:05:57 +0000 [thread overview]
Message-ID: <20200603150602.4686-4-ophirmu@mellanox.com> (raw)
In-Reply-To: <20200603150602.4686-1-ophirmu@mellanox.com>
Replace 'struct ibv_pd *' with 'void *' in struct mlx5_ctx_shared and
all function calls in mlx5 PMD.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/common/mlx5/mlx5_common_mr.c | 24 ++++++++++++------------
drivers/common/mlx5/mlx5_common_mr.h | 6 +++---
drivers/net/mlx5/mlx5.h | 2 +-
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_common_mr.c b/drivers/common/mlx5/mlx5_common_mr.c
index 3b46446..e894523 100644
--- a/drivers/common/mlx5/mlx5_common_mr.c
+++ b/drivers/common/mlx5/mlx5_common_mr.c
@@ -521,7 +521,7 @@ mr_find_contig_memsegs_cb(const struct rte_memseg_list *msl,
* request fails.
*
* @param pd
- * Pointer to ibv_pd of a device (net, regex, vdpa,...).
+ * Pointer to pd of a device (net, regex, vdpa,...).
* @param share_cache
* Pointer to a global shared MR cache.
* @param[out] entry
@@ -536,7 +536,7 @@ mr_find_contig_memsegs_cb(const struct rte_memseg_list *msl,
* Searched LKey on success, UINT32_MAX on failure and rte_errno is set.
*/
static uint32_t
-mlx5_mr_create_secondary(struct ibv_pd *pd __rte_unused,
+mlx5_mr_create_secondary(void *pd __rte_unused,
struct mlx5_mp_id *mp_id,
struct mlx5_mr_share_cache *share_cache,
struct mr_cache_entry *entry, uintptr_t addr,
@@ -569,7 +569,7 @@ mlx5_mr_create_secondary(struct ibv_pd *pd __rte_unused,
* Register entire virtually contiguous memory chunk around the address.
*
* @param pd
- * Pointer to ibv_pd of a device (net, regex, vdpa,...).
+ * Pointer to pd of a device (net, regex, vdpa,...).
* @param share_cache
* Pointer to a global shared MR cache.
* @param[out] entry
@@ -584,7 +584,7 @@ mlx5_mr_create_secondary(struct ibv_pd *pd __rte_unused,
* Searched LKey on success, UINT32_MAX on failure and rte_errno is set.
*/
uint32_t
-mlx5_mr_create_primary(struct ibv_pd *pd,
+mlx5_mr_create_primary(void *pd,
struct mlx5_mr_share_cache *share_cache,
struct mr_cache_entry *entry, uintptr_t addr,
unsigned int mr_ext_memseg_en)
@@ -816,7 +816,7 @@ mlx5_mr_create_primary(struct ibv_pd *pd,
* This can be called from primary and secondary process.
*
* @param pd
- * Pointer to ibv_pd of a device (net, regex, vdpa,...).
+ * Pointer to pd handle of a device (net, regex, vdpa,...).
* @param share_cache
* Pointer to a global shared MR cache.
* @param[out] entry
@@ -829,7 +829,7 @@ mlx5_mr_create_primary(struct ibv_pd *pd,
* Searched LKey on success, UINT32_MAX on failure and rte_errno is set.
*/
static uint32_t
-mlx5_mr_create(struct ibv_pd *pd, struct mlx5_mp_id *mp_id,
+mlx5_mr_create(void *pd, struct mlx5_mp_id *mp_id,
struct mlx5_mr_share_cache *share_cache,
struct mr_cache_entry *entry, uintptr_t addr,
unsigned int mr_ext_memseg_en)
@@ -856,7 +856,7 @@ mlx5_mr_create(struct ibv_pd *pd, struct mlx5_mp_id *mp_id,
* Insert the found/created entry to local bottom-half cache table.
*
* @param pd
- * Pointer to ibv_pd of a device (net, regex, vdpa,...).
+ * Pointer to pd of a device (net, regex, vdpa,...).
* @param share_cache
* Pointer to a global shared MR cache.
* @param mr_ctrl
@@ -871,7 +871,7 @@ mlx5_mr_create(struct ibv_pd *pd, struct mlx5_mp_id *mp_id,
* Searched LKey on success, UINT32_MAX on no match.
*/
static uint32_t
-mr_lookup_caches(struct ibv_pd *pd, struct mlx5_mp_id *mp_id,
+mr_lookup_caches(void *pd, struct mlx5_mp_id *mp_id,
struct mlx5_mr_share_cache *share_cache,
struct mlx5_mr_ctrl *mr_ctrl,
struct mr_cache_entry *entry, uintptr_t addr,
@@ -920,7 +920,7 @@ mr_lookup_caches(struct ibv_pd *pd, struct mlx5_mp_id *mp_id,
* per-queue local caches.
*
* @param pd
- * Pointer to ibv_pd of a device (net, regex, vdpa,...).
+ * Pointer to pd of a device (net, regex, vdpa,...).
* @param share_cache
* Pointer to a global shared MR cache.
* @param mr_ctrl
@@ -931,7 +931,7 @@ mr_lookup_caches(struct ibv_pd *pd, struct mlx5_mp_id *mp_id,
* @return
* Searched LKey on success, UINT32_MAX on no match.
*/
-uint32_t mlx5_mr_addr2mr_bh(struct ibv_pd *pd, struct mlx5_mp_id *mp_id,
+uint32_t mlx5_mr_addr2mr_bh(void *pd, struct mlx5_mp_id *mp_id,
struct mlx5_mr_share_cache *share_cache,
struct mlx5_mr_ctrl *mr_ctrl,
uintptr_t addr, unsigned int mr_ext_memseg_en)
@@ -1022,7 +1022,7 @@ mlx5_mr_flush_local_cache(struct mlx5_mr_ctrl *mr_ctrl)
* part of the DPDK memory segments.
*
* @param pd
- * Pointer to ibv_pd of a device (net, regex, vdpa,...).
+ * Pointer to pd of a device (net, regex, vdpa,...).
* @param addr
* Starting virtual address of memory.
* @param len
@@ -1034,7 +1034,7 @@ mlx5_mr_flush_local_cache(struct mlx5_mr_ctrl *mr_ctrl)
* Pointer to MR structure on success, NULL otherwise.
*/
struct mlx5_mr *
-mlx5_create_mr_ext(struct ibv_pd *pd, uintptr_t addr, size_t len, int socket_id)
+mlx5_create_mr_ext(void *pd, uintptr_t addr, size_t len, int socket_id)
{
struct mlx5_mr *mr = NULL;
diff --git a/drivers/common/mlx5/mlx5_common_mr.h b/drivers/common/mlx5/mlx5_common_mr.h
index 4ea47cd..7add4da 100644
--- a/drivers/common/mlx5/mlx5_common_mr.h
+++ b/drivers/common/mlx5/mlx5_common_mr.h
@@ -122,7 +122,7 @@ void mlx5_mr_btree_free(struct mlx5_mr_btree *bt);
__rte_internal
void mlx5_mr_btree_dump(struct mlx5_mr_btree *bt __rte_unused);
__rte_internal
-uint32_t mlx5_mr_addr2mr_bh(struct ibv_pd *pd, struct mlx5_mp_id *mp_id,
+uint32_t mlx5_mr_addr2mr_bh(void *pd, struct mlx5_mp_id *mp_id,
struct mlx5_mr_share_cache *share_cache,
struct mlx5_mr_ctrl *mr_ctrl,
uintptr_t addr, unsigned int mr_ext_memseg_en);
@@ -148,11 +148,11 @@ mlx5_mr_lookup_list(struct mlx5_mr_share_cache *share_cache,
struct mr_cache_entry *entry, uintptr_t addr);
__rte_internal
struct mlx5_mr *
-mlx5_create_mr_ext(struct ibv_pd *pd, uintptr_t addr, size_t len,
+mlx5_create_mr_ext(void *pd, uintptr_t addr, size_t len,
int socket_id);
__rte_internal
uint32_t
-mlx5_mr_create_primary(struct ibv_pd *pd,
+mlx5_mr_create_primary(void *pd,
struct mlx5_mr_share_cache *share_cache,
struct mr_cache_entry *entry, uintptr_t addr,
unsigned int mr_ext_memseg_en);
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index d020c10..30678aa 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -494,7 +494,7 @@ struct mlx5_dev_ctx_shared {
uint32_t devx:1; /* Opened with DV. */
uint32_t max_port; /* Maximal IB device port index. */
void *ctx; /* Verbs/DV/DevX context. */
- struct ibv_pd *pd; /* Protection Domain. */
+ void *pd; /* Protection Domain. */
uint32_t pdn; /* Protection Domain number. */
uint32_t tdn; /* Transport Domain number. */
char ibdev_name[IBV_SYSFS_NAME_MAX]; /* IB device name. */
--
2.8.4
next prev parent reply other threads:[~2020-06-03 15:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 15:05 [dpdk-dev] [PATCH v1 0/8] mlx5 PMD multi OS support Ophir Munk
2020-06-03 15:05 ` [dpdk-dev] [PATCH v1 1/8] net/mlx5: rename mlx5 ibv shared struct Ophir Munk
2020-06-03 15:05 ` [dpdk-dev] [PATCH v1 2/8] net/mlx5: add mlx5 Linux specific file with getter functions Ophir Munk
2020-06-08 11:20 ` Ferruh Yigit
2020-06-09 8:40 ` Ophir Munk
2020-06-09 8:43 ` Ferruh Yigit
2020-06-03 15:05 ` Ophir Munk [this message]
2020-06-03 15:05 ` [dpdk-dev] [PATCH v1 4/8] net/mlx5: remove attributes dependency on ibv and dv Ophir Munk
2020-06-03 15:05 ` [dpdk-dev] [PATCH v1 5/8] net/mlx5: remove umem field dependency on dv Ophir Munk
2020-06-03 15:06 ` [dpdk-dev] [PATCH v1 6/8] net/mlx5: refactor PCI probing under Linux Ophir Munk
2020-06-03 15:06 ` [dpdk-dev] [PATCH v1 7/8] net/mlx5: add mlx5 header file specific to Linux Ophir Munk
2020-06-08 11:31 ` Ferruh Yigit
2020-06-09 8:44 ` Ophir Munk
2020-06-09 11:48 ` Ferruh Yigit
2020-06-09 14:49 ` Ophir Munk
2020-06-03 15:06 ` [dpdk-dev] [PATCH v1 8/8] net/mlx5: remove ibv dependency in spawn struct Ophir Munk
2020-06-07 8:49 ` [dpdk-dev] [PATCH v1 0/8] mlx5 PMD multi OS support Raslan Darawsheh
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=20200603150602.4686-4-ophirmu@mellanox.com \
--to=ophirmu@mellanox.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=rasland@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).