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 A353CA0517; Wed, 10 Jun 2020 11:33:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 115082BF7; Wed, 10 Jun 2020 11:33:04 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2049.outbound.protection.outlook.com [40.107.22.49]) by dpdk.org (Postfix) with ESMTP id A98F4255 for ; Wed, 10 Jun 2020 11:33:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bkbyDDrZT6X21pHm2R6MDa+fnOBAV9ZOcSNrZ8AfLM0VvFeHn/7z1+xJwZJQlQ1HdU0lENmLY8K2jeM7b8h80wKHpWeShEfZhvlFkBxEB0ju28VflcHaDF6PHDFaHlYahln11OhCNCV39khPi8fJPfyCH2mHkaIIYfohd8/4UHp8+4NWFOAcf5odc089L7UDdsdd6vdb8kZi3RjgCB9flcn0FzfZYPIS2V7Q5fn+U71gXSWUgVKdOq3gYCqehx8FX3M93LOYN0EUJI1K2aO0cN8xW9ZmJn+mHVwn2JG/bPOrEqq9zufkWeGhqhklZwCmkssdiNCCtOamY0xjv/Frww== 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=xUOPN/T/bquG9i2ICa+ERpbWdF+1+Jv0uxjZITud8C8=; b=JVPZkzWotkClEcZCh6O75ksGfNPtU+qC0JDSjz2+ZKvXh1Of95Srt4JeoNrbymw4heqb+C90tja0Z14GZvgP/78Q1xjY71fpNK+BYdA4rnxBAtsO7dhWgnTLLiVCXFpamzILU99lBthdHJp02NNg+VUbt8zTjtZBF04LSBkSJZ3pqoI4kJAKG9ZiEJfeaF4K+i/oxjafotM9b86yhp1inyFIBvJ9PPO9JY7/aAU5eEPZUuZFcl8yqWc5Uhk6oLwQynrbIfSXkg1nNzq/cKy4DWI5Iw9FkYd8DwUXxQAH0RVi9D3bcMyUG/VimgvPGir33IsOcUgOgKmLWzHmVqUSMg== 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=xUOPN/T/bquG9i2ICa+ERpbWdF+1+Jv0uxjZITud8C8=; b=HvpnJA0YscH7pbZSdGfRsSuLARBmItfxSN9nfyAKMqDDgjNC4MVdQ3/11TvtR8vG+vedzqTXXMqxzaW8PFCUwccx+B6yNz+CYtVQjT3KPZQBtQwvetTmIgcEylWWyxYD7WkpUd7WnTLVKN5eCBIOq9nBASnYMKvcDSE/Y3EtjxY= 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 AM0PR05MB4545.eurprd05.prod.outlook.com (2603:10a6:208:b9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.20; Wed, 10 Jun 2020 09:33:01 +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.3066.023; Wed, 10 Jun 2020 09:33:01 +0000 From: Ophir Munk To: dev@dpdk.org, Matan Azrad , Raslan Darawsheh Cc: Ophir Munk Date: Wed, 10 Jun 2020 09:32:26 +0000 Message-Id: <20200610093233.23902-2-ophirmu@mellanox.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20200610093233.23902-1-ophirmu@mellanox.com> References: <20200610093233.23902-1-ophirmu@mellanox.com> Content-Type: text/plain X-ClientProxiedBy: MRXP264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:15::15) 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 MRXP264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:15::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Wed, 10 Jun 2020 09:33:00 +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: 6fb9fc77-fb7c-4752-c19b-08d80d214487 X-MS-TrafficTypeDiagnostic: AM0PR05MB4545: 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:6108; X-Forefront-PRVS: 0430FA5CB7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P6jIBIWz/pgHAIRJpyicabwLD33fFDgZXCWMoGGV0MI1YjJSYgJOiY6QJ4wkpcjrkmFHx7rd3CBN5U6gFS8Ar7q2u+kHqJJ/wrHxFyHNJqfqDJ4I3yKAy1BUoDf10mVLwglBSSqDubJwMf4LKJ+t7g8yXXlkD/OrmHpmHY6vzXUJlopsSID9P0U2Cvrsn3rO962wao4LSEvnZMGroGPbcL4lX561LSPdXPOReUryDtJk1oSUk9UOe8KIjzm3USIdTyl8eV13tzOqR92QX8pIp3rtIRPZTx6bURWL0lEzyxSB1R3+63WTSMQzMQ8TOzMhMmQaJjXArI6cMsm3O3/ttA== 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)(376002)(39860400002)(396003)(366004)(136003)(6666004)(478600001)(26005)(186003)(8676002)(5660300002)(8886007)(66476007)(66556008)(36756003)(66946007)(2906002)(956004)(2616005)(55016002)(52116002)(7696005)(8936002)(6636002)(110136005)(1076003)(16526019)(83380400001)(316002)(86362001)(107886003)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: vVPQjrOTXqukCjxD/fHCB0LGl+UxZL+DADbjxWSMEjoOKuuQNTDup9P861IYC1lIf86q23czlzcFbHvDdhJIZ5Wjwg0XDprMHOU+94Q42p47aszXijZayVyD9ymNncJLUitT4qiiXy5aa4N96wZpV4pvs3YAlfEubdTko84377nbWtM6PGJab0khIgXuhEHOu3jJ8akICOR0ONHFYyMGwJpgoIgA6UPxqzjV/Y5ODA4z+yKYJivFME12yklm3udYzRfxjFbqEmnjHCnrAmYvGB3hLQqCVRzXxYNtJVWo6nFpwCEuynTQJv3Fl03EVizQ2fTuOVnXAw/XpjhVdGuLmWNZoQvhKzEpMR2o+GWvtXM2EQlcY3NgpfX2vLR9ffEo5GEVHCjtqlBKK2Pg6H4jM+stSCuwVtU/BCrJuFUJLlbiy2uyYNXyJFJXU5WsQiFUGbOwNpMaHk2dR6NMp6iHOgy/f3BZBkC6L/fouAuiNxUCFDKmDIjKugJMspeDxIiJ X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fb9fc77-fb7c-4752-c19b-08d80d214487 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2020 09:33:01.0073 (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: efC5GuZHxS4P3PcUWH5oiwwoaByqhiVhElWJA5yVVKTvgGwUb4sMkubg26bnzbkyAnDmW/2rYn/gtiSU9a2nVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4545 Subject: [dpdk-dev] [PATCH v1 1/8] net/mlx5: remove dv dependency in mlx5_dev_ctx_shared struct 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" Replace 'struct mlx5dv_devx_cmd_comp *' with 'void *' in 'struct mlx5_dev_ctx_shared'. Signed-off-by: Ophir Munk --- drivers/net/mlx5/linux/mlx5_os.c | 12 +++++++----- drivers/net/mlx5/mlx5.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 92422db..21eff38 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1944,19 +1944,21 @@ mlx5_os_dev_shared_handler_install(struct mlx5_dev_ctx_shared *sh) if (sh->devx) { #ifdef HAVE_IBV_DEVX_ASYNC sh->intr_handle_devx.fd = -1; - sh->devx_comp = mlx5_glue->devx_create_cmd_comp(sh->ctx); - if (!sh->devx_comp) { + sh->devx_comp = + (void *)mlx5_glue->devx_create_cmd_comp(sh->ctx); + struct mlx5dv_devx_cmd_comp *devx_comp = sh->devx_comp; + if (!devx_comp) { DRV_LOG(INFO, "failed to allocate devx_comp."); return; } - flags = fcntl(sh->devx_comp->fd, F_GETFL); - ret = fcntl(sh->devx_comp->fd, F_SETFL, flags | O_NONBLOCK); + flags = fcntl(devx_comp->fd, F_GETFL); + ret = fcntl(devx_comp->fd, F_SETFL, flags | O_NONBLOCK); if (ret) { DRV_LOG(INFO, "failed to change file descriptor" " devx comp"); return; } - sh->intr_handle_devx.fd = sh->devx_comp->fd; + sh->intr_handle_devx.fd = devx_comp->fd; sh->intr_handle_devx.type = RTE_INTR_HANDLE_EXT; if (rte_intr_callback_register(&sh->intr_handle_devx, mlx5_dev_interrupt_handler_devx, sh)) { diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 8c4b234..d624740 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -567,7 +567,7 @@ struct mlx5_dev_ctx_shared { /* Shared interrupt handler section. */ struct rte_intr_handle intr_handle; /* Interrupt handler for device. */ struct rte_intr_handle intr_handle_devx; /* DEVX interrupt handler. */ - struct mlx5dv_devx_cmd_comp *devx_comp; /* DEVX async comp obj. */ + void *devx_comp; /* DEVX async comp obj. */ struct mlx5_devx_obj *tis; /* TIS object. */ struct mlx5_devx_obj *td; /* Transport domain. */ struct mlx5_flow_id_pool *flow_id_pool; /* Flow ID pool. */ -- 2.8.4