path: root/drivers/net/mlx5/mlx5.h
diff options
authorDekel Peled <>2019-07-22 14:52:15 +0000
committerFerruh Yigit <>2019-07-23 14:31:36 +0200
commitb9d86122bf3bb8c3ea46c2aa46fac333d9503e69 (patch)
tree56e8ba4477cb06525892b4b3ab286084a798b96c /drivers/net/mlx5/mlx5.h
parent84537d3c3517fd9ef6617948b8224624934a07ec (diff)
net/mlx5: store protection domain number on create
Function mlx5_alloc_shared_ibctx() allocates Protection Domain using verbs API, as part of shared IB device context. This patch adds reading and storing of pdn value from the created PD object, using DV API. The pdn value is required when creating WQ using DevX API. This patch also updates function flow_dv_create_counter_stat_mem_mng() which uses the pdn value as well. Signed-off-by: Dekel Peled <> Acked-by: Matan Azrad <> Acked-by: Viacheslav Ovsiienko <>
Diffstat (limited to 'drivers/net/mlx5/mlx5.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index b080064..b98c406 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -525,6 +525,7 @@ struct mlx5_ibv_shared {
uint32_t max_port; /* Maximal IB device port index. */
struct ibv_context *ctx; /* Verbs/DV context. */
struct ibv_pd *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. */
char ibdev_path[IBV_SYSFS_PATH_MAX]; /* IB device path for secondary */