From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 713A1A00C5; Thu, 7 May 2020 13:31:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB2771DB7B; Thu, 7 May 2020 13:31:29 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10048.outbound.protection.outlook.com [40.107.1.48]) by dpdk.org (Postfix) with ESMTP id CEA341DAC1 for ; Thu, 7 May 2020 13:31:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IKGS69RVcuOehUZm9ePmgAMOoIJq6Abc8oGCfOIDcZahnDTEzFK7SIw7OtfVWJRZYn1cPpWiXBcom49r//Fgsi+Ub/lgRRtLW8Cm+dewUco4UUZ3j/2NABSElwG6NjoYZ0jU3rqeaos9Tb5pzfxYttSlNetpQZVGVSuOFXiHwcbTPezoTboBhLNo4XihMkP/r6WHyngTMuq9SL7txNXzJnxVa5cBOIZQj7TF3qdJkorcjZlREI1w/JY6vOdMnzAIm5GQlTQBDCeIfRbKh4EKFhy6ngXVPH193OehtmSctzgdbcym8hgRGjyHAsIZl1DQFhN57gyL1j+lRAucqcZbPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FPOR3hya+kfCaVkHxFtDcuS6oKSKshQwEcH1XoF/rJQ=; b=N/0yKm3UPmkCAY8CvM8Frb/dZ5mXHKRt4xVycaHRnuY+fTwBb+FKg5AGf0h+ifE/es51zt7jjB6hjtabqOjB3Sfgi3m510CFkqLWk6FjHowBOhTDe99nYofc6OpF9wBZ+WKyotmBjKKw3EEpxv1ApG1bmY0QLtl3UkDTan70SmYEVvbK6/U8SJ1EEEshd478UkEKWWfen33rlzGS4t316U2BabfZo70zvE/QGX/OpPLWKDV0u/0pa1g5pHP3s8KbrrHydaBJ4vs1HdQyxARJ9AvZ9DTLTnBciB0mcj+4RZkBLiDpHMXVDnHAay3H0G1z63MuKKfTIPtOGeIJfLzIkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FPOR3hya+kfCaVkHxFtDcuS6oKSKshQwEcH1XoF/rJQ=; b=Bzy1drlitTlqjW51huuaxg6vcR7iBsj1JWQcgeYu0PGiuOyC5aDIJXo13gwk9b224fRazwovP7a0+fVQVCEciS6/uz+geQETt4kCByTXX5BoBCZPaJfLQml/vKXfJx+Ko1Z8CvFrGw6wSOw1a+PLniWWVWtAN26BaT+gzel2YL0= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB4209.eurprd05.prod.outlook.com (2603:10a6:208:61::22) by AM0PR05MB4289.eurprd05.prod.outlook.com (2603:10a6:208:66::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Thu, 7 May 2020 11:31:26 +0000 Received: from AM0PR05MB4209.eurprd05.prod.outlook.com ([fe80::1068:89a9:41d3:b14a]) by AM0PR05MB4209.eurprd05.prod.outlook.com ([fe80::1068:89a9:41d3:b14a%3]) with mapi id 15.20.2958.034; Thu, 7 May 2020 11:31:26 +0000 From: Ophir Munk To: dev@dpdk.org, David Marchand Cc: Ray Kinsella , Matan Azrad , Raslan Darawsheh , Thomas Monjalon , Ophir Munk Date: Thu, 7 May 2020 11:31:13 +0000 Message-Id: <20200507113113.18431-2-ophirmu@mellanox.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20200507113113.18431-1-ophirmu@mellanox.com> References: <20200507085634.9589-1-ophirmu@mellanox.com> <20200507113113.18431-1-ophirmu@mellanox.com> Content-Type: text/plain X-ClientProxiedBy: PR1PR01CA0030.eurprd01.prod.exchangelabs.com (2603:10a6:102::43) To AM0PR05MB4209.eurprd05.prod.outlook.com (2603:10a6:208:61::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mellanox.com (37.142.13.130) by PR1PR01CA0030.eurprd01.prod.exchangelabs.com (2603:10a6:102::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28 via Frontend Transport; Thu, 7 May 2020 11:31:25 +0000 X-Mailer: git-send-email 2.8.4 X-Originating-IP: [37.142.13.130] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 39dbca32-ba6e-4763-83de-08d7f27a2d73 X-MS-TrafficTypeDiagnostic: AM0PR05MB4289:|AM0PR05MB4289: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:486; X-Forefront-PRVS: 03965EFC76 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0AYiUFw0S9+jBuWulf44cHQHMpWD/FbZIVwVMhU0Jw2ZiA+mN0GDqzaV+aM456q/xZ16/lbMCWABvfhyD8bjeyxT/kSxWdVWU+JcOuLJTMt/mavrJSMuDNEjhzweRoS/WaWVWxg/ey6d6Q7KRNTuqy72RAX04CdyXHkuDFKTnTab+fAao8XkCCBou5iGm3nsTG227WES8r2V7jKwFyhEmAnKSu+zVAsms+hl3iSczhWou8onz9eC54CXbvTWtGztAmb8F3TGRDnpHwozsElP9FhJdh0E/Kc35M+yLiHj0Tj2PzNQB6S4fATYeaKdlTuITo9YV2uKOt1ponyGGKZozs638hHU/ZHWWZqjkmL9p3N6bbwH4VeM6yEDvvMUYcMmp1X1aRiUyEMxjVvUK+79ieO2JXJyQ6gbgbMP5RsxUlNhPsid7r4EfbF/Jga7euFpSOOBsHNT2yKurgTbE5FOU933cH077g0iy43MazWcGql5vPnKlpBIfyPGVLKMUfJB+9K2plmLCOm6GsM/cKFP2g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB4209.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(396003)(346002)(376002)(366004)(39860400002)(33430700001)(478600001)(8676002)(36756003)(6916009)(33440700001)(5660300002)(83280400001)(8886007)(316002)(6666004)(1076003)(8936002)(54906003)(86362001)(2906002)(2616005)(83310400001)(956004)(83320400001)(30864003)(66946007)(66476007)(66556008)(7696005)(55016002)(52116002)(26005)(83300400001)(186003)(16526019)(83290400001)(107886003)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Hz9JXXG3Gu2ECKATkuwnjRI4nECzQhEXjKFuPVx84NOFsunxdB/Cxd5N+k0tLYNLYL6z5Id3WJYPZCquSkSDPXLJqKO0RiMEyNT9uidA4tHuUBwD8edolZLWY48f+v/9eIZ/CsM7m3SAe/YQPneqXrAce/dGEV/79CYSGh7qus/5hzxQo6pJ99nMgE35kFWLFE8pbWOyDAQ3JSZaJkfqNMGlBGp1TmvucU4ym08KPbbRqTciJDCSYrU8Mj+Z6shetM+/xA7sWQjqz0OXiecV37lPmYkLw1LG4hHpyiet5j6/w01JDix68Gu3DdbYqlUC13Oy0sXvNmRtWLYauOISFnfBbDjYo47tBfLuCW8ckDpAQta+loOVwruGQCPGbv1Nwg+pbmB1KkZK1fyj6M3DfjSwqyEwVda5DEexBgl7G6uwFQ2dzBn5g+vHBW1se7w6Ydf5cKiCUkY97iYLF71W+HpmQs5N4iDI9IZZjiM8yqHSKK6bon5cWDkhqAJiX9YHw+P+Y0oW7LcX7FeYdD1O0gfQqfY6d2GxjtZs3EjrcO9xz+d+HLsQTYfKUTJBIBinnjkKX5gr6hQ8J5LBusApm2DDKKiXS+kMtBBwQdASeLadSUNWB/tzJdkJ1TYu4ZucrZg9Y1YygQa2PBBk/q4bgBRXVykZXc3zmm0PO+ixhXlKdcyk4CTtyBlTRareEyddBQnIV7EJQvKc6yG9HZXPjTdXUD6YA3EZKxdUCddN5y1ApF1ba5j+wEW5q8QguNqpHFoewDOVo5YTaPtBexSb1Xjvp6i+L7wM1H3BpUuSTPE= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39dbca32-ba6e-4763-83de-08d7f27a2d73 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2020 11:31:26.0640 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8dN6HfbVjKCaeWDSCtE7DREAMmI4b7NKgF+gPy0gvT+K22do7tLl/U3ApI4I/i6YYEOGr/hvrDi0alyxrAV17A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4289 Subject: [dpdk-dev] [PATCH v4 2/2] common/mlx5: remove devx dependency on ibv and DV X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Matan Azrad --- 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 67c8a8c..230ac58 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}; @@ -815,7 +815,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. * @@ -823,7 +823,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; @@ -917,7 +917,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 @@ -927,7 +927,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}; @@ -1019,7 +1019,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. * @@ -1027,7 +1027,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}; @@ -1066,13 +1066,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}; @@ -1143,7 +1142,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. * @@ -1151,7 +1150,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}; @@ -1201,7 +1200,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. * @@ -1209,7 +1208,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}; @@ -1370,7 +1369,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. * @@ -1378,7 +1377,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 6dc27da..ac10687 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. */ }; @@ -301,7 +301,7 @@ struct mlx5_devx_qp_attr { /* mlx5_devx_cmds.c */ __rte_internal -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); __rte_internal int mlx5_devx_cmd_destroy(struct mlx5_devx_obj *obj); @@ -310,51 +310,51 @@ 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); __rte_internal -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); __rte_internal -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); __rte_internal int mlx5_devx_get_out_command_status(void *out); __rte_internal -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); __rte_internal -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); __rte_internal int mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq, struct mlx5_devx_modify_rq_attr *rq_attr); __rte_internal -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); __rte_internal -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); __rte_internal -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); __rte_internal int mlx5_devx_cmd_modify_sq(struct mlx5_devx_obj *sq, struct mlx5_devx_modify_sq_attr *sq_attr); __rte_internal -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); __rte_internal -struct mlx5_devx_obj *mlx5_devx_cmd_create_td(struct ibv_context *ctx); +struct mlx5_devx_obj *mlx5_devx_cmd_create_td(void *ctx); __rte_internal int mlx5_devx_cmd_flow_dump(void *fdb_domain, void *rx_domain, void *tx_domain, FILE *file); __rte_internal -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); __rte_internal -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); __rte_internal int mlx5_devx_cmd_modify_virtq(struct mlx5_devx_obj *virtq_obj, @@ -363,7 +363,7 @@ __rte_internal int mlx5_devx_cmd_query_virtq(struct mlx5_devx_obj *virtq_obj, struct mlx5_devx_virtq_attr *attr); __rte_internal -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); __rte_internal int mlx5_devx_cmd_modify_qp_state(struct mlx5_devx_obj *qp, -- 2.8.4