DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
@ 2020-03-29 22:32 Ophir Munk
  2020-03-31  6:29 ` Matan Azrad
  2020-04-01  9:59 ` Raslan Darawsheh
  0 siblings, 2 replies; 9+ messages in thread
From: Ophir Munk @ 2020-03-29 22:32 UTC (permalink / raw)
  To: dev, Matan Azrad
  Cc: Thomas Monjalon, Olga Shern, Raslan Darawsheh, Ophir Munk, Asaf Penso

File mlx5_devx_cmds.c should contain pure DevX calls. It must be OS
agnostic and not include any references to ibv or dv structs (defined in
ibverbs and rdma-core linux libraries).  This commit replaces all ibv and
dv references with 'void *'.  Specifically, the following struct were
replaced:
1. struct ibv_context *
2. struct ibv_qp *
3. struct mlx5dv_devx_cmd_comp *

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 59 ++++++++++++++++++------------------
 drivers/common/mlx5/mlx5_devx_cmds.h | 30 +++++++++---------
 2 files changed, 44 insertions(+), 45 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 1157a44..15b91ca 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -15,7 +15,7 @@
  * Allocate flow counters via devx interface.
  *
  * @param[in] ctx
- *   ibv contexts returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param dcs
  *   Pointer to counters properties structure to be filled by the routine.
  * @param bulk_n_128
@@ -26,7 +26,7 @@
  *   rte_errno is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_flow_counter_alloc(struct ibv_context *ctx, uint32_t bulk_n_128)
+mlx5_devx_cmd_flow_counter_alloc(void *ctx, uint32_t bulk_n_128)
 {
 	struct mlx5_devx_obj *dcs = rte_zmalloc("dcs", sizeof(*dcs), 0);
 	uint32_t in[MLX5_ST_SZ_DW(alloc_flow_counter_in)]   = {0};
@@ -81,7 +81,7 @@ mlx5_devx_cmd_flow_counter_query(struct mlx5_devx_obj *dcs,
 				 int clear, uint32_t n_counters,
 				 uint64_t *pkts, uint64_t *bytes,
 				 uint32_t mkey, void *addr,
-				 struct mlx5dv_devx_cmd_comp *cmd_comp,
+				 void *cmd_comp,
 				 uint64_t async_id)
 {
 	int out_len = MLX5_ST_SZ_BYTES(query_flow_counter_out) +
@@ -130,7 +130,7 @@ mlx5_devx_cmd_flow_counter_query(struct mlx5_devx_obj *dcs,
  * Create a new mkey.
  *
  * @param[in] ctx
- *   ibv contexts returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param[in] attr
  *   Attributes of the requested mkey.
  *
@@ -139,7 +139,7 @@ mlx5_devx_cmd_flow_counter_query(struct mlx5_devx_obj *dcs,
  *   is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_mkey_create(struct ibv_context *ctx,
+mlx5_devx_cmd_mkey_create(void *ctx,
 			  struct mlx5_devx_mkey_attr *attr)
 {
 	struct mlx5_klm *klm_array = attr->klm_array;
@@ -279,7 +279,7 @@ mlx5_devx_cmd_destroy(struct mlx5_devx_obj *obj)
  *   0 on success, a negative value otherwise.
  */
 static int
-mlx5_devx_cmd_query_nic_vport_context(struct ibv_context *ctx,
+mlx5_devx_cmd_query_nic_vport_context(void *ctx,
 				      unsigned int vport,
 				      struct mlx5_hca_attr *attr)
 {
@@ -321,12 +321,12 @@ mlx5_devx_cmd_query_nic_vport_context(struct ibv_context *ctx,
  * Query NIC vDPA attributes.
  *
  * @param[in] ctx
- *   ibv contexts returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param[out] vdpa_attr
  *   vDPA Attributes structure to fill.
  */
 static void
-mlx5_devx_cmd_query_hca_vdpa_attr(struct ibv_context *ctx,
+mlx5_devx_cmd_query_hca_vdpa_attr(void *ctx,
 				  struct mlx5_hca_vdpa_attr *vdpa_attr)
 {
 	uint32_t in[MLX5_ST_SZ_DW(query_hca_cap_in)] = {0};
@@ -402,7 +402,7 @@ mlx5_devx_cmd_query_hca_vdpa_attr(struct ibv_context *ctx,
  * is having the required capabilities.
  *
  * @param[in] ctx
- *   ibv contexts returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param[out] attr
  *   Attributes device values.
  *
@@ -410,7 +410,7 @@ mlx5_devx_cmd_query_hca_vdpa_attr(struct ibv_context *ctx,
  *   0 on success, a negative value otherwise.
  */
 int
-mlx5_devx_cmd_query_hca_attr(struct ibv_context *ctx,
+mlx5_devx_cmd_query_hca_attr(void *ctx,
 			     struct mlx5_hca_attr *attr)
 {
 	uint32_t in[MLX5_ST_SZ_DW(query_hca_cap_in)] = {0};
@@ -570,7 +570,7 @@ mlx5_devx_cmd_query_hca_attr(struct ibv_context *ctx,
  *   0 on success, a negative value otherwise.
  */
 int
-mlx5_devx_cmd_qp_query_tis_td(struct ibv_qp *qp, uint32_t tis_num,
+mlx5_devx_cmd_qp_query_tis_td(void *qp, uint32_t tis_num,
 			      uint32_t *tis_td)
 {
 	uint32_t in[MLX5_ST_SZ_DW(query_tis_in)] = {0};
@@ -637,7 +637,7 @@ devx_cmd_fill_wq_data(void *wq_ctx, struct mlx5_devx_wq_attr *wq_attr)
  * Create RQ using DevX API.
  *
  * @param[in] ctx
- *   ibv_context returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param [in] rq_attr
  *   Pointer to create RQ attributes structure.
  * @param [in] socket
@@ -647,7 +647,7 @@ devx_cmd_fill_wq_data(void *wq_ctx, struct mlx5_devx_wq_attr *wq_attr)
  *   The DevX object created, NULL otherwise and rte_errno is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_create_rq(struct ibv_context *ctx,
+mlx5_devx_cmd_create_rq(void *ctx,
 			struct mlx5_devx_create_rq_attr *rq_attr,
 			int socket)
 {
@@ -746,7 +746,7 @@ mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq,
  * Create TIR using DevX API.
  *
  * @param[in] ctx
- *   ibv_context returned from mlx5dv_open_device.
+ *  Context returned from mlx5 open_device() glue function.
  * @param [in] tir_attr
  *   Pointer to TIR attributes structure.
  *
@@ -754,7 +754,7 @@ mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq,
  *   The DevX object created, NULL otherwise and rte_errno is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_create_tir(struct ibv_context *ctx,
+mlx5_devx_cmd_create_tir(void *ctx,
 			 struct mlx5_devx_tir_attr *tir_attr)
 {
 	uint32_t in[MLX5_ST_SZ_DW(create_tir_in)] = {0};
@@ -818,7 +818,7 @@ mlx5_devx_cmd_create_tir(struct ibv_context *ctx,
  * Create RQT using DevX API.
  *
  * @param[in] ctx
- *   ibv_context returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param [in] rqt_attr
  *   Pointer to RQT attributes structure.
  *
@@ -826,7 +826,7 @@ mlx5_devx_cmd_create_tir(struct ibv_context *ctx,
  *   The DevX object created, NULL otherwise and rte_errno is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_create_rqt(struct ibv_context *ctx,
+mlx5_devx_cmd_create_rqt(void *ctx,
 			 struct mlx5_devx_rqt_attr *rqt_attr)
 {
 	uint32_t *in = NULL;
@@ -920,7 +920,7 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
  * Create SQ using DevX API.
  *
  * @param[in] ctx
- *   ibv_context returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param [in] sq_attr
  *   Pointer to SQ attributes structure.
  * @param [in] socket
@@ -930,7 +930,7 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
  *   The DevX object created, NULL otherwise and rte_errno is set.
  **/
 struct mlx5_devx_obj *
-mlx5_devx_cmd_create_sq(struct ibv_context *ctx,
+mlx5_devx_cmd_create_sq(void *ctx,
 			struct mlx5_devx_create_sq_attr *sq_attr)
 {
 	uint32_t in[MLX5_ST_SZ_DW(create_sq_in)] = {0};
@@ -1022,7 +1022,7 @@ mlx5_devx_cmd_modify_sq(struct mlx5_devx_obj *sq,
  * Create TIS using DevX API.
  *
  * @param[in] ctx
- *   ibv_context returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param [in] tis_attr
  *   Pointer to TIS attributes structure.
  *
@@ -1030,7 +1030,7 @@ mlx5_devx_cmd_modify_sq(struct mlx5_devx_obj *sq,
  *   The DevX object created, NULL otherwise and rte_errno is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_create_tis(struct ibv_context *ctx,
+mlx5_devx_cmd_create_tis(void *ctx,
 			 struct mlx5_devx_tis_attr *tis_attr)
 {
 	uint32_t in[MLX5_ST_SZ_DW(create_tis_in)] = {0};
@@ -1069,13 +1069,12 @@ mlx5_devx_cmd_create_tis(struct ibv_context *ctx,
  * Create transport domain using DevX API.
  *
  * @param[in] ctx
- *   ibv_context returned from mlx5dv_open_device.
- *
+ *   Context returned from mlx5 open_device() glue function.
  * @return
  *   The DevX object created, NULL otherwise and rte_errno is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_create_td(struct ibv_context *ctx)
+mlx5_devx_cmd_create_td(void *ctx)
 {
 	uint32_t in[MLX5_ST_SZ_DW(alloc_transport_domain_in)] = {0};
 	uint32_t out[MLX5_ST_SZ_DW(alloc_transport_domain_out)] = {0};
@@ -1146,7 +1145,7 @@ mlx5_devx_cmd_flow_dump(void *fdb_domain __rte_unused,
  * Create CQ using DevX API.
  *
  * @param[in] ctx
- *   ibv_context returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param [in] attr
  *   Pointer to CQ attributes structure.
  *
@@ -1154,7 +1153,7 @@ mlx5_devx_cmd_flow_dump(void *fdb_domain __rte_unused,
  *   The DevX object created, NULL otherwise and rte_errno is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_create_cq(struct ibv_context *ctx, struct mlx5_devx_cq_attr *attr)
+mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr)
 {
 	uint32_t in[MLX5_ST_SZ_DW(create_cq_in)] = {0};
 	uint32_t out[MLX5_ST_SZ_DW(create_cq_out)] = {0};
@@ -1204,7 +1203,7 @@ mlx5_devx_cmd_create_cq(struct ibv_context *ctx, struct mlx5_devx_cq_attr *attr)
  * Create VIRTQ using DevX API.
  *
  * @param[in] ctx
- *   ibv_context returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param [in] attr
  *   Pointer to VIRTQ attributes structure.
  *
@@ -1212,7 +1211,7 @@ mlx5_devx_cmd_create_cq(struct ibv_context *ctx, struct mlx5_devx_cq_attr *attr)
  *   The DevX object created, NULL otherwise and rte_errno is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_create_virtq(struct ibv_context *ctx,
+mlx5_devx_cmd_create_virtq(void *ctx,
 			   struct mlx5_devx_virtq_attr *attr)
 {
 	uint32_t in[MLX5_ST_SZ_DW(create_virtq_in)] = {0};
@@ -1373,7 +1372,7 @@ mlx5_devx_cmd_query_virtq(struct mlx5_devx_obj *virtq_obj,
  * Create QP using DevX API.
  *
  * @param[in] ctx
- *   ibv_context returned from mlx5dv_open_device.
+ *   Context returned from mlx5 open_device() glue function.
  * @param [in] attr
  *   Pointer to QP attributes structure.
  *
@@ -1381,7 +1380,7 @@ mlx5_devx_cmd_query_virtq(struct mlx5_devx_obj *virtq_obj,
  *   The DevX object created, NULL otherwise and rte_errno is set.
  */
 struct mlx5_devx_obj *
-mlx5_devx_cmd_create_qp(struct ibv_context *ctx,
+mlx5_devx_cmd_create_qp(void *ctx,
 			struct mlx5_devx_qp_attr *attr)
 {
 	uint32_t in[MLX5_ST_SZ_DW(create_qp_in)] = {0};
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 20bb294..5bd5ec2 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -11,7 +11,7 @@
 
 /* devX creation object */
 struct mlx5_devx_obj {
-	struct mlx5dv_devx_obj *obj; /* The DV object. */
+	void *obj; /* The DV object. */
 	int id; /* The object ID. */
 };
 
@@ -300,49 +300,49 @@ struct mlx5_devx_qp_attr {
 
 /* mlx5_devx_cmds.c */
 
-struct mlx5_devx_obj *mlx5_devx_cmd_flow_counter_alloc(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_flow_counter_alloc(void *ctx,
 						       uint32_t bulk_sz);
 int mlx5_devx_cmd_destroy(struct mlx5_devx_obj *obj);
 int mlx5_devx_cmd_flow_counter_query(struct mlx5_devx_obj *dcs,
 				     int clear, uint32_t n_counters,
 				     uint64_t *pkts, uint64_t *bytes,
 				     uint32_t mkey, void *addr,
-				     struct mlx5dv_devx_cmd_comp *cmd_comp,
+				     void *cmd_comp,
 				     uint64_t async_id);
-int mlx5_devx_cmd_query_hca_attr(struct ibv_context *ctx,
+int mlx5_devx_cmd_query_hca_attr(void *ctx,
 				 struct mlx5_hca_attr *attr);
-struct mlx5_devx_obj *mlx5_devx_cmd_mkey_create(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_mkey_create(void *ctx,
 					      struct mlx5_devx_mkey_attr *attr);
 int mlx5_devx_get_out_command_status(void *out);
-int mlx5_devx_cmd_qp_query_tis_td(struct ibv_qp *qp, uint32_t tis_num,
+int mlx5_devx_cmd_qp_query_tis_td(void *qp, uint32_t tis_num,
 				  uint32_t *tis_td);
-struct mlx5_devx_obj *mlx5_devx_cmd_create_rq(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_create_rq(void *ctx,
 				       struct mlx5_devx_create_rq_attr *rq_attr,
 				       int socket);
 int mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq,
 			    struct mlx5_devx_modify_rq_attr *rq_attr);
-struct mlx5_devx_obj *mlx5_devx_cmd_create_tir(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_create_tir(void *ctx,
 					   struct mlx5_devx_tir_attr *tir_attr);
-struct mlx5_devx_obj *mlx5_devx_cmd_create_rqt(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_create_rqt(void *ctx,
 					   struct mlx5_devx_rqt_attr *rqt_attr);
-struct mlx5_devx_obj *mlx5_devx_cmd_create_sq(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_create_sq(void *ctx,
 				      struct mlx5_devx_create_sq_attr *sq_attr);
 int mlx5_devx_cmd_modify_sq(struct mlx5_devx_obj *sq,
 			    struct mlx5_devx_modify_sq_attr *sq_attr);
-struct mlx5_devx_obj *mlx5_devx_cmd_create_tis(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_create_tis(void *ctx,
 					   struct mlx5_devx_tis_attr *tis_attr);
-struct mlx5_devx_obj *mlx5_devx_cmd_create_td(struct ibv_context *ctx);
+struct mlx5_devx_obj *mlx5_devx_cmd_create_td(void *ctx);
 int mlx5_devx_cmd_flow_dump(void *fdb_domain, void *rx_domain, void *tx_domain,
 			    FILE *file);
-struct mlx5_devx_obj *mlx5_devx_cmd_create_cq(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_create_cq(void *ctx,
 					      struct mlx5_devx_cq_attr *attr);
-struct mlx5_devx_obj *mlx5_devx_cmd_create_virtq(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_create_virtq(void *ctx,
 					     struct mlx5_devx_virtq_attr *attr);
 int mlx5_devx_cmd_modify_virtq(struct mlx5_devx_obj *virtq_obj,
 			       struct mlx5_devx_virtq_attr *attr);
 int mlx5_devx_cmd_query_virtq(struct mlx5_devx_obj *virtq_obj,
 			      struct mlx5_devx_virtq_attr *attr);
-struct mlx5_devx_obj *mlx5_devx_cmd_create_qp(struct ibv_context *ctx,
+struct mlx5_devx_obj *mlx5_devx_cmd_create_qp(void *ctx,
 					      struct mlx5_devx_qp_attr *attr);
 int mlx5_devx_cmd_modify_qp_state(struct mlx5_devx_obj *qp,
 				  uint32_t qp_st_mod_op, uint32_t remote_qp_id);
-- 
2.8.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
  2020-03-29 22:32 [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv Ophir Munk
@ 2020-03-31  6:29 ` Matan Azrad
  2020-04-01  9:59 ` Raslan Darawsheh
  1 sibling, 0 replies; 9+ messages in thread
From: Matan Azrad @ 2020-03-31  6:29 UTC (permalink / raw)
  To: Ophir Munk, dev
  Cc: Thomas Monjalon, Olga Shern, Raslan Darawsheh, Ophir Munk, Asaf Penso



From: Ophir Munk
> File mlx5_devx_cmds.c should contain pure DevX calls. It must be OS agnostic
> and not include any references to ibv or dv structs (defined in ibverbs and
> rdma-core linux libraries).  This commit replaces all ibv and dv references with
> 'void *'.  Specifically, the following struct were
> replaced:
> 1. struct ibv_context *
> 2. struct ibv_qp *
> 3. struct mlx5dv_devx_cmd_comp *
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
  2020-03-29 22:32 [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv Ophir Munk
  2020-03-31  6:29 ` Matan Azrad
@ 2020-04-01  9:59 ` Raslan Darawsheh
  2020-04-08 17:10   ` Ferruh Yigit
  1 sibling, 1 reply; 9+ messages in thread
From: Raslan Darawsheh @ 2020-04-01  9:59 UTC (permalink / raw)
  To: Ophir Munk, dev, Matan Azrad
  Cc: Thomas Monjalon, Olga Shern, Ophir Munk, Asaf Penso

Hi,

> -----Original Message-----
> From: Ophir Munk <ophirmu@mellanox.com>
> Sent: Monday, March 30, 2020 1:32 AM
> To: dev@dpdk.org; Matan Azrad <matan@mellanox.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>; Olga Shern
> <olgas@mellanox.com>; Raslan Darawsheh <rasland@mellanox.com>; Ophir
> Munk <ophirmu@mellanox.com>; Asaf Penso <asafp@mellanox.com>
> Subject: [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
> 
> File mlx5_devx_cmds.c should contain pure DevX calls. It must be OS
> agnostic and not include any references to ibv or dv structs (defined in
> ibverbs and rdma-core linux libraries).  This commit replaces all ibv and
> dv references with 'void *'.  Specifically, the following struct were
> replaced:
> 1. struct ibv_context *
> 2. struct ibv_qp *
> 3. struct mlx5dv_devx_cmd_comp *
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
  2020-04-01  9:59 ` Raslan Darawsheh
@ 2020-04-08 17:10   ` Ferruh Yigit
  2020-04-09  6:21     ` Ray Kinsella
  2020-04-09  7:24     ` David Marchand
  0 siblings, 2 replies; 9+ messages in thread
From: Ferruh Yigit @ 2020-04-08 17:10 UTC (permalink / raw)
  To: David Marchand
  Cc: Raslan Darawsheh, Ophir Munk, dev, Matan Azrad, Thomas Monjalon,
	Olga Shern, Asaf Penso, Kinsella, Ray, Neil Horman

On 4/1/2020 10:59 AM, Raslan Darawsheh wrote:
> Hi,
> 
>> -----Original Message-----
>> From: Ophir Munk <ophirmu@mellanox.com>
>> Sent: Monday, March 30, 2020 1:32 AM
>> To: dev@dpdk.org; Matan Azrad <matan@mellanox.com>
>> Cc: Thomas Monjalon <thomas@monjalon.net>; Olga Shern
>> <olgas@mellanox.com>; Raslan Darawsheh <rasland@mellanox.com>; Ophir
>> Munk <ophirmu@mellanox.com>; Asaf Penso <asafp@mellanox.com>
>> Subject: [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
>>
>> File mlx5_devx_cmds.c should contain pure DevX calls. It must be OS
>> agnostic and not include any references to ibv or dv structs (defined in
>> ibverbs and rdma-core linux libraries).  This commit replaces all ibv and
>> dv references with 'void *'.  Specifically, the following struct were
>> replaced:
>> 1. struct ibv_context *
>> 2. struct ibv_qp *
>> 3. struct mlx5dv_devx_cmd_comp *
>>
>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> 
> Patch applied to next-net-mlx,
> 

Hi David,

This patch is failing in the travis for ABI checks [1], since mlx has APIs now
[2], are they public APIs or internal ones, and are they part of the ABI policy,
can you please check this?

@Thomas, please don't pull from next-net until this resolved, since this patch
is merged into next-net.

Thanks,
ferruh



[1]
  [C]'function mlx5_devx_obj* mlx5_devx_cmd_create_cq(ibv_context*,
mlx5_devx_cq_attr*)' at mlx5_devx_cmds.c:1153:1 has some indirect sub-type changes:
    parameter 1 of type 'ibv_context*' changed:
      in pointed to type 'struct ibv_context':
        entity changed from 'struct ibv_context' to 'void'
        type size changed from 2624 to 0 (in bits)

<multiple similar warnings>

[2]
https://git.dpdk.org/dpdk/tree/drivers/common/mlx5/rte_common_mlx5_version.map?h=v20.02#n6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
  2020-04-08 17:10   ` Ferruh Yigit
@ 2020-04-09  6:21     ` Ray Kinsella
  2020-04-09  7:24     ` David Marchand
  1 sibling, 0 replies; 9+ messages in thread
From: Ray Kinsella @ 2020-04-09  6:21 UTC (permalink / raw)
  To: Ferruh Yigit, David Marchand
  Cc: Raslan Darawsheh, Ophir Munk, dev, Matan Azrad, Thomas Monjalon,
	Olga Shern, Asaf Penso, Kinsella, Ray, Neil Horman



On 08/04/2020 18:10, Ferruh Yigit wrote:
> On 4/1/2020 10:59 AM, Raslan Darawsheh wrote:
>> Hi,
>>
>>> -----Original Message-----
>>> From: Ophir Munk <ophirmu@mellanox.com>
>>> Sent: Monday, March 30, 2020 1:32 AM
>>> To: dev@dpdk.org; Matan Azrad <matan@mellanox.com>
>>> Cc: Thomas Monjalon <thomas@monjalon.net>; Olga Shern
>>> <olgas@mellanox.com>; Raslan Darawsheh <rasland@mellanox.com>; Ophir
>>> Munk <ophirmu@mellanox.com>; Asaf Penso <asafp@mellanox.com>
>>> Subject: [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
>>>
>>> File mlx5_devx_cmds.c should contain pure DevX calls. It must be OS
>>> agnostic and not include any references to ibv or dv structs (defined in
>>> ibverbs and rdma-core linux libraries).  This commit replaces all ibv and
>>> dv references with 'void *'.  Specifically, the following struct were
>>> replaced:
>>> 1. struct ibv_context *
>>> 2. struct ibv_qp *
>>> 3. struct mlx5dv_devx_cmd_comp *
>>>
>>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
>>
>> Patch applied to next-net-mlx,
>>
> 
> Hi David,
> 
> This patch is failing in the travis for ABI checks [1], since mlx has APIs now
> [2], are they public APIs or internal ones, and are they part of the ABI policy,
> can you please check this?
> 
> @Thomas, please don't pull from next-net until this resolved, since this patch
> is merged into next-net.
> 
> Thanks,
> ferruh
> 

So these were added in the 20.02 release.
http://inbox.dpdk.org/dev/1579539790-3882-16-git-send-email-matan@mellanox.com/

Assuming that they are public?
They have the appearance of APIs that perhaps should have been added as experimental in 20.02?

> 
> [1]
>   [C]'function mlx5_devx_obj* mlx5_devx_cmd_create_cq(ibv_context*,
> mlx5_devx_cq_attr*)' at mlx5_devx_cmds.c:1153:1 has some indirect sub-type changes:
>     parameter 1 of type 'ibv_context*' changed:
>       in pointed to type 'struct ibv_context':
>         entity changed from 'struct ibv_context' to 'void'
>         type size changed from 2624 to 0 (in bits)
> 
> <multiple similar warnings>
> 
> [2]
> https://git.dpdk.org/dpdk/tree/drivers/common/mlx5/rte_common_mlx5_version.map?h=v20.02#n6
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
  2020-04-08 17:10   ` Ferruh Yigit
  2020-04-09  6:21     ` Ray Kinsella
@ 2020-04-09  7:24     ` David Marchand
  2020-04-16 17:35       ` Ferruh Yigit
  1 sibling, 1 reply; 9+ messages in thread
From: David Marchand @ 2020-04-09  7:24 UTC (permalink / raw)
  To: Ferruh Yigit, Matan Azrad, Raslan Darawsheh, Thomas Monjalon
  Cc: Ophir Munk, dev, Olga Shern, Asaf Penso, Kinsella, Ray,
	Neil Horman, Kevin Laatz

Hello,

On Wed, Apr 8, 2020 at 7:12 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 4/1/2020 10:59 AM, Raslan Darawsheh wrote:
> > Hi,
> >
> >> -----Original Message-----
> >> From: Ophir Munk <ophirmu@mellanox.com>
> >> Sent: Monday, March 30, 2020 1:32 AM
> >> To: dev@dpdk.org; Matan Azrad <matan@mellanox.com>
> >> Cc: Thomas Monjalon <thomas@monjalon.net>; Olga Shern
> >> <olgas@mellanox.com>; Raslan Darawsheh <rasland@mellanox.com>; Ophir
> >> Munk <ophirmu@mellanox.com>; Asaf Penso <asafp@mellanox.com>
> >> Subject: [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
> >>
> >> File mlx5_devx_cmds.c should contain pure DevX calls. It must be OS
> >> agnostic and not include any references to ibv or dv structs (defined in
> >> ibverbs and rdma-core linux libraries).  This commit replaces all ibv and
> >> dv references with 'void *'.  Specifically, the following struct were
> >> replaced:
> >> 1. struct ibv_context *
> >> 2. struct ibv_qp *
> >> 3. struct mlx5dv_devx_cmd_comp *
> >>
> >> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> >
> > Patch applied to next-net-mlx,
> >
>
> Hi David,
>
> This patch is failing in the travis for ABI checks [1], since mlx has APIs now
> [2], are they public APIs or internal ones, and are they part of the ABI policy,
> can you please check this?

- What I see on patchwork and test-report ml for this patch:
http://patchwork.dpdk.org/patch/67367/

Ophir proposed a patch on 03/30.

The robot reported an issue on 03/30, and I suppose Ophir got a report.
https://mails.dpdk.org/archives/test-report/2020-March/122623.html
https://travis-ci.com/github/ovsrobot/dpdk/jobs/308057800#L2337

Matan acked the patch on 03/31.

Rasland merged the patch on 04/01.

I understand that the abi checks are not perfect, and people need help
with the new abi checks.
Prove me wrong, but here, I get the feeling that it was just ignored
by 3 people in a row.


- On the question if these should be public API or internal, that is
not for me to reply/investigate.
This is a question for Mellanox.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
  2020-04-09  7:24     ` David Marchand
@ 2020-04-16 17:35       ` Ferruh Yigit
  2020-04-16 20:00         ` Thomas Monjalon
  0 siblings, 1 reply; 9+ messages in thread
From: Ferruh Yigit @ 2020-04-16 17:35 UTC (permalink / raw)
  To: Matan Azrad, Raslan Darawsheh, Ophir Munk
  Cc: David Marchand, Thomas Monjalon, dev, Olga Shern, Asaf Penso,
	Kinsella, Ray, Neil Horman, Kevin Laatz

On 4/9/2020 8:24 AM, David Marchand wrote:
> Hello,
> 
> On Wed, Apr 8, 2020 at 7:12 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 4/1/2020 10:59 AM, Raslan Darawsheh wrote:
>>> Hi,
>>>
>>>> -----Original Message-----
>>>> From: Ophir Munk <ophirmu@mellanox.com>
>>>> Sent: Monday, March 30, 2020 1:32 AM
>>>> To: dev@dpdk.org; Matan Azrad <matan@mellanox.com>
>>>> Cc: Thomas Monjalon <thomas@monjalon.net>; Olga Shern
>>>> <olgas@mellanox.com>; Raslan Darawsheh <rasland@mellanox.com>; Ophir
>>>> Munk <ophirmu@mellanox.com>; Asaf Penso <asafp@mellanox.com>
>>>> Subject: [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
>>>>
>>>> File mlx5_devx_cmds.c should contain pure DevX calls. It must be OS
>>>> agnostic and not include any references to ibv or dv structs (defined in
>>>> ibverbs and rdma-core linux libraries).  This commit replaces all ibv and
>>>> dv references with 'void *'.  Specifically, the following struct were
>>>> replaced:
>>>> 1. struct ibv_context *
>>>> 2. struct ibv_qp *
>>>> 3. struct mlx5dv_devx_cmd_comp *
>>>>
>>>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
>>>
>>> Patch applied to next-net-mlx,
>>>
>>
>> Hi David,
>>
>> This patch is failing in the travis for ABI checks [1], since mlx has APIs now
>> [2], are they public APIs or internal ones, and are they part of the ABI policy,
>> can you please check this?
> 
> - What I see on patchwork and test-report ml for this patch:
> http://patchwork.dpdk.org/patch/67367/
> 
> Ophir proposed a patch on 03/30.
> 
> The robot reported an issue on 03/30, and I suppose Ophir got a report.
> https://mails.dpdk.org/archives/test-report/2020-March/122623.html
> https://travis-ci.com/github/ovsrobot/dpdk/jobs/308057800#L2337
> 
> Matan acked the patch on 03/31.
> 
> Rasland merged the patch on 04/01.
> 
> I understand that the abi checks are not perfect, and people need help
> with the new abi checks.
> Prove me wrong, but here, I get the feeling that it was just ignored
> by 3 people in a row.
> 
> 
> - On the question if these should be public API or internal, that is
> not for me to reply/investigate.
> This is a question for Mellanox.
> 
> 

Hi Matan, Raslan, Ophir,

First can you please clarify if these APIs are internal or public?

And later if the ABI break issue is not clarified I may need to drop these
patches. Right now they fail in travis!


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
  2020-04-16 17:35       ` Ferruh Yigit
@ 2020-04-16 20:00         ` Thomas Monjalon
  2020-04-17 16:19           ` Ferruh Yigit
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2020-04-16 20:00 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Matan Azrad, Raslan Darawsheh, Ophir Munk, David Marchand, dev,
	Olga Shern, Asaf Penso, Kinsella, Ray, Neil Horman, Kevin Laatz,
	hemant.agrawal, Haiyue Wang, Sunil Kumar Kori

16/04/2020 19:35, Ferruh Yigit:
> On 4/9/2020 8:24 AM, David Marchand wrote:
> > On Wed, Apr 8, 2020 at 7:12 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >> On 4/1/2020 10:59 AM, Raslan Darawsheh wrote:
> >>> From: Ophir Munk <ophirmu@mellanox.com>
> >>>>
> >>>> File mlx5_devx_cmds.c should contain pure DevX calls. It must be OS
> >>>> agnostic and not include any references to ibv or dv structs (defined in
> >>>> ibverbs and rdma-core linux libraries).  This commit replaces all ibv and
> >>>> dv references with 'void *'.  Specifically, the following struct were
> >>>> replaced:
> >>>> 1. struct ibv_context *
> >>>> 2. struct ibv_qp *
> >>>> 3. struct mlx5dv_devx_cmd_comp *
> >>>>
> >>>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> >>>
> >>> Patch applied to next-net-mlx,
> >>>
> >>
> >> Hi David,
> >>
> >> This patch is failing in the travis for ABI checks [1], since mlx has APIs now
> >> [2], are they public APIs or internal ones, and are they part of the ABI policy,
> >> can you please check this?
> > 
> > - What I see on patchwork and test-report ml for this patch:
> > http://patchwork.dpdk.org/patch/67367/
> > 
> > Ophir proposed a patch on 03/30.
> > 
> > The robot reported an issue on 03/30, and I suppose Ophir got a report.
> > https://mails.dpdk.org/archives/test-report/2020-March/122623.html
> > https://travis-ci.com/github/ovsrobot/dpdk/jobs/308057800#L2337
> > 
> > Matan acked the patch on 03/31.
> > 
> > Rasland merged the patch on 04/01.
> > 
> > I understand that the abi checks are not perfect, and people need help
> > with the new abi checks.
> > Prove me wrong, but here, I get the feeling that it was just ignored
> > by 3 people in a row.
> > 
> > - On the question if these should be public API or internal, that is
> > not for me to reply/investigate.
> > This is a question for Mellanox.
> > 
> 
> Hi Matan, Raslan, Ophir,
> 
> First can you please clarify if these APIs are internal or public?

As most of common drivers, some functions are exported to be
used by some PMDs. So they are not part of the API/ABI and should be skipped
by ABI checks.

> And later if the ABI break issue is not clarified I may need to drop these
> patches. Right now they fail in travis!

Yes, it fails and could it be avoided with some libabigail config.
But the real solution is to mark internal symbols, and we are waiting
for rte_internal patchset to be completed and merged.

Ferruh, please let's not bloat libabigail config,
and reject any patch failing ABI checks.

As a consequence, this patch must be dropped until it uses rte_internal.
Thanks



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv
  2020-04-16 20:00         ` Thomas Monjalon
@ 2020-04-17 16:19           ` Ferruh Yigit
  0 siblings, 0 replies; 9+ messages in thread
From: Ferruh Yigit @ 2020-04-17 16:19 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Matan Azrad, Raslan Darawsheh, Ophir Munk, David Marchand, dev,
	Olga Shern, Asaf Penso, Kinsella, Ray, Neil Horman, Kevin Laatz,
	hemant.agrawal, Haiyue Wang, Sunil Kumar Kori

On 4/16/2020 9:00 PM, Thomas Monjalon wrote:
> 16/04/2020 19:35, Ferruh Yigit:
>> On 4/9/2020 8:24 AM, David Marchand wrote:
>>> On Wed, Apr 8, 2020 at 7:12 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>> On 4/1/2020 10:59 AM, Raslan Darawsheh wrote:
>>>>> From: Ophir Munk <ophirmu@mellanox.com>
>>>>>>
>>>>>> File mlx5_devx_cmds.c should contain pure DevX calls. It must be OS
>>>>>> agnostic and not include any references to ibv or dv structs (defined in
>>>>>> ibverbs and rdma-core linux libraries).  This commit replaces all ibv and
>>>>>> dv references with 'void *'.  Specifically, the following struct were
>>>>>> replaced:
>>>>>> 1. struct ibv_context *
>>>>>> 2. struct ibv_qp *
>>>>>> 3. struct mlx5dv_devx_cmd_comp *
>>>>>>
>>>>>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
>>>>>
>>>>> Patch applied to next-net-mlx,
>>>>>
>>>>
>>>> Hi David,
>>>>
>>>> This patch is failing in the travis for ABI checks [1], since mlx has APIs now
>>>> [2], are they public APIs or internal ones, and are they part of the ABI policy,
>>>> can you please check this?
>>>
>>> - What I see on patchwork and test-report ml for this patch:
>>> http://patchwork.dpdk.org/patch/67367/
>>>
>>> Ophir proposed a patch on 03/30.
>>>
>>> The robot reported an issue on 03/30, and I suppose Ophir got a report.
>>> https://mails.dpdk.org/archives/test-report/2020-March/122623.html
>>> https://travis-ci.com/github/ovsrobot/dpdk/jobs/308057800#L2337
>>>
>>> Matan acked the patch on 03/31.
>>>
>>> Rasland merged the patch on 04/01.
>>>
>>> I understand that the abi checks are not perfect, and people need help
>>> with the new abi checks.
>>> Prove me wrong, but here, I get the feeling that it was just ignored
>>> by 3 people in a row.
>>>
>>> - On the question if these should be public API or internal, that is
>>> not for me to reply/investigate.
>>> This is a question for Mellanox.
>>>
>>
>> Hi Matan, Raslan, Ophir,
>>
>> First can you please clarify if these APIs are internal or public?
> 
> As most of common drivers, some functions are exported to be
> used by some PMDs. So they are not part of the API/ABI and should be skipped
> by ABI checks.
> 
>> And later if the ABI break issue is not clarified I may need to drop these
>> patches. Right now they fail in travis!
> 
> Yes, it fails and could it be avoided with some libabigail config.
> But the real solution is to mark internal symbols, and we are waiting
> for rte_internal patchset to be completed and merged.
> 
> Ferruh, please let's not bloat libabigail config,
> and reject any patch failing ABI checks.
> 
> As a consequence, this patch must be dropped until it uses rte_internal.
> Thanks
> 
> 

dropped the patch from next-net and updated its patchwork status.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-17 16:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-29 22:32 [dpdk-dev] [PATCH v1] common/mlx5: remove devx depndency on ibv and dv Ophir Munk
2020-03-31  6:29 ` Matan Azrad
2020-04-01  9:59 ` Raslan Darawsheh
2020-04-08 17:10   ` Ferruh Yigit
2020-04-09  6:21     ` Ray Kinsella
2020-04-09  7:24     ` David Marchand
2020-04-16 17:35       ` Ferruh Yigit
2020-04-16 20:00         ` Thomas Monjalon
2020-04-17 16:19           ` Ferruh Yigit

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).