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 9615EA00C5; Thu, 7 May 2020 09:37:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 43C001DA87; Thu, 7 May 2020 09:37:22 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60057.outbound.protection.outlook.com [40.107.6.57]) by dpdk.org (Postfix) with ESMTP id 53D151DA72 for ; Thu, 7 May 2020 09:37:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kyj8YpoVnAZLCyWrqnBzCrCNAvynLGbdKBO/YprGdvd2CIOJKsaULoZ2ysPYh7+6I/gXMgov7NgWXUFstScW6oI8XTn+logL9yktxuO86EIZfNSHxSShq6GKVVEZ5xXpgLAluBAnq/O4HCg/u6HRQAzzsxN9O4YOjtyaC7AAsYz5J8G9X4aOkRxPoW5hes9UKGQz0hmxNz1IWu3WrQITPmdXMpbnlq4hwFfIVAJe0jY6696v0OtQNh9PjgCulMfJuH8EU2A0w5KuIErSyOlND3n7/nQrbph9llP73fBkk6pn03/Tk0DM3mPdzGiLHwCMo1gnG7Q7p2+5bm+lcpkX4Q== 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=Y9mw8wzPmvMPjEHO05zSV21z2sm7TkLzSEEVyBYDgWElwLxD7bKVEcwUxR8nOW6AZY+9cfOawHRhHmoSosJRYepTMBzqqSvgYTPkkbrmCRlA8vGJmdBps747qwd734zRX5usvHz21jBHBOIt0070skgigvOopFYPKDaG+LMUyKwvq0GMRZ/D0M7UyWcjs7bj4Toofm/OSgKH9HZn8FSn89C/X5ViHWggqazLoc9JpJwNx60RB7n5yAPX6NVUH2Ko/7LkB/7715v7rIGXdeKO8jS2QNgk+e7MSHNpsh469KN0wQzB/+ly7SW+A6CgL6pDndFPiYCkaNWDw0vsGi5ohA== 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=q4xurClrlWDBxIGk7aINavkdblcS06a59tY4DtQmNe3h3+geDO7bktJYxhXJWpmX93iqqv5Ox1daXOEpFgPVe9pbpodDVSMbOmrJVHs1iMhXdoZsnKnPg1boJKZ8kTV6HEvEXsGqJCvy2B1k0GPZAI8hiG62A3ZERViJuTUt0fI= 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 AM0PR05MB5714.eurprd05.prod.outlook.com (2603:10a6:208:114::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.27; Thu, 7 May 2020 07:37:18 +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 07:37:18 +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 07:37:02 +0000 Message-Id: <20200507073702.4047-3-ophirmu@mellanox.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20200507073702.4047-1-ophirmu@mellanox.com> References: <20200505112057.20901-1-ophirmu@mellanox.com> <20200507073702.4047-1-ophirmu@mellanox.com> Content-Type: text/plain X-ClientProxiedBy: PR0P264CA0153.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1b::21) 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 PR0P264CA0153.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26 via Frontend Transport; Thu, 7 May 2020 07:37:17 +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: 50d85b4a-2337-47cf-93fb-08d7f2597852 X-MS-TrafficTypeDiagnostic: AM0PR05MB5714:|AM0PR05MB5714: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,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: CE3j/P3KzKaNIe4uXtRMprMcuusgvKDaM/TYDTUzYaONgyuyihjGVGkdcmmLkmd0d0BgPJ2ZkpXefi2AlmBYrFbfzu2HzEym+e2wvxCa/+oLLSupgfzkczq6GSN+RzdDXrGYC6ipjJeBu3KXhZPNvCwug1KOgLtvpwWdLkINMU5n81vEWT78pFYImkv9Jd30axbV2K7dv2SGyXu8NlsZ9745GY6YxmagI/88kDa2zv48lmDinPzPZStVc9tT7FsdAGzCX6oIRCJyIojSh5JGNZAls0jwVvx6172MiOPLaM6qGJLoLR/AUWy4scHtItEGyUOQKoKoijf/jT72cPUxV1q+5RC5kBZXnpL/5Hh9sWEnu8jZdjPS1+HAAt4DPnWDUJsYFKsYT9JhcG4aWqtu8lPq1or4FnVw6xa4EOjT4WDsKqDsK+bRQLVunsAfMln7csPphQrYk37JwDA3x/igyVP5ZUbmi5ckTP04btYfwl27X92WjsXNg6r7zBMrrWbKCVPfqj3/FRdstC8+1uXmvw== 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)(346002)(136003)(366004)(39860400002)(376002)(396003)(33430700001)(5660300002)(316002)(6666004)(86362001)(1076003)(186003)(478600001)(83300400001)(83290400001)(83310400001)(83320400001)(107886003)(6916009)(16526019)(83280400001)(26005)(30864003)(54906003)(2906002)(55016002)(7696005)(8886007)(8676002)(52116002)(4326008)(36756003)(8936002)(956004)(33440700001)(66946007)(2616005)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: onGsy86mblm4YfPJXDHHmQdSMMNGsrbvcc8L4crnzSF4h34WOJIsSRv7FGtWps0+wd2nc5/EcKezjhXmEz9j/DamlCgACNaYFzErFloVZRJ2zTdQyz9MQYoUogbkcXOitSZE+s0bS9oNkidAp++ay7dbsMxbFynljRBz6jUwNxtYPyXRP7ayYHZmU6OlFlx32umGpk+wdD+MRBce1s0fViNLn8WdXMim3ypimMK1sZvtFkQgzNKSsXZ2SFxPkuWG/5gZPX4jQTp1ZF9VMhHiPBF/kktguzxavwnnMddmsdDTrn6h2BZtdv6lYe1GzhLnSoC10I4oegtKCr6XPXsjxdv5+SQhdfUIIF31TxrLj+WqOZIUlNBvsacQo6W7cO4/D8FJuh6lERbuXaXansapirTtf3U4ZXF4iSubmUfUAx/Bt09YLbm4ajaTrytrTM/4boOk4af3dwzgI7PCATQrozdSnd9UawvqLQ6CeS1INZZEV7CNYo96b5ML6cV5TfVJPxsiq45B5apqMpfAo4/eEzL3QW69hhjBsQOnkYdhe5uZh+qXQGH3AsT0bxwDdnnzPE+k/5k3o7pvbS0+hV/oc5Z1fA06bOhcD8qeV1CXMBueXxVF4WM3fodajvXNJEur+IBimgxt2UBoWa2sHRgEzlugRzX8d2D60DpuIJIscNR34nlLLjvBgA2s7x/bQmxvXo+1Vf6R9lYHUlamZmtI9yM4gxGigC41aaeMpcUqfk8wAyA5pPyZ2ETVsPYXOjj+pCl8in0KZIpw4OvviR2VEWnOg/bOremCuNW2J3QIczs= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50d85b4a-2337-47cf-93fb-08d7f2597852 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2020 07:37:18.3491 (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: 9rjnyaFPVueKxdaI278z4rtX3TU+v/L/5UKgETKhkHk7qzVl82aCHbSnxs1GIjpunJs1dX296WRiAV3Td01NtA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5714 Subject: [dpdk-dev] [PATCH v2 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