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 DBAF4A04A4; Wed, 3 Jun 2020 17:06:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F5821D573; Wed, 3 Jun 2020 17:06:12 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2067.outbound.protection.outlook.com [40.107.20.67]) by dpdk.org (Postfix) with ESMTP id 646A21D533 for ; Wed, 3 Jun 2020 17:06:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MX3/0xUxlWJuJixmmAMEdySRebjKK0N0AGNRWCm1XAd8bm7qWqNP/aLqdrjdCr5EiofJRYLAwZhdeoBbxSCR1d+9bCKUyl9SDKklRzrJj4yKgK8IJ4pxMh93/QZKU0Rdj5G4W97cl6oHWRP5wrJpBwpH40HBd8IBTrq1ntl7W70RGrwAk5h0Nimx2Jq8X9KHtLXoDp5SPmCy4bBeWe0QTgo7SVgaOI55RVb4iknaleRC5NWObRuJ8ZJYLw1zWI1TKDJqWDqKhViqK+h9xYfNceCSqDzUlV/6oue7QYVR2OJAmAZPRJqLuiWqTb0v6XfYZbhDWMOUNDFZkXemFaMvVA== 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=q/2siiDXKEjj/4wkrxBK6+kJQqp4Egs+PnRj2gRlVVk=; b=dQ27TD0T5oYU/bNPA8RptJTYDne6HThpYya+oakSudkBxRsTtaEh7r4LUzVk2jIxBR328wiseQ1ZEn9RYJQjENlyTD8IhpqXmrhx+BgllfA6jTgXpCMvN239CH32pVE0bEubksYVxGsbtfLf9XlxyqalHsyB4v78eS8bLyvcEJOT+yJeRKFz18J7rvr+7Mge7c5RB5fmfAW0yvz/bucZi96r9Xuy0P8PPDYPBzoywQymR/ss6Mjm20h8aJ7nt+MDDzeICVARN5GwMFzuh3u03VZ0krYbSbOvYZ0+xsEhLvv0yWPnhEaaVRZULjTIOLyuzFYR9DBm8+qcH4ix1GGsAg== 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=q/2siiDXKEjj/4wkrxBK6+kJQqp4Egs+PnRj2gRlVVk=; b=Ra4HJgK611HZ50PEvhZy1Kq3R8o/OlrwhlYqbihfoSjjv2b2x10qC80bjEx+O2qxt+Y2Uo6e7ljNrYbz+zaBVwl7MsMD0Q1nKq/izGEsm8ii0W+aKPWn2FVKaAYGEps1ux/LZUoXC8KRRzqIklLlLasbvp5nlR4nFfBjXSSE3L0= 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 AM0PR05MB5235.eurprd05.prod.outlook.com (2603:10a6:208:f5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Wed, 3 Jun 2020 15:06:09 +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.018; Wed, 3 Jun 2020 15:06:09 +0000 From: Ophir Munk To: dev@dpdk.org, Matan Azrad , Raslan Darawsheh Cc: Ophir Munk Date: Wed, 3 Jun 2020 15:05:55 +0000 Message-Id: <20200603150602.4686-2-ophirmu@mellanox.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20200603150602.4686-1-ophirmu@mellanox.com> References: <20200603150602.4686-1-ophirmu@mellanox.com> Content-Type: text/plain X-ClientProxiedBy: AM4PR0302CA0033.eurprd03.prod.outlook.com (2603:10a6:205:2::46) 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 AM4PR0302CA0033.eurprd03.prod.outlook.com (2603:10a6:205:2::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.19 via Frontend Transport; Wed, 3 Jun 2020 15:06:08 +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: be29d903-dca7-40e1-95f0-08d807cfa54e X-MS-TrafficTypeDiagnostic: AM0PR05MB5235: 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:153; X-Forefront-PRVS: 04238CD941 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aDU1zsDBehYpSVpsS62yyn1D2rjFOHc39gY18EznNG8foemZBxk5rhRTidxodZ0wlkHXMSh0t+CqZIt5oTIK2rBErMoE3SaVSlt9SVnSEcnof7r1+7ePZF+qh2HdgM/1y1bcLYLjcO02yPvhiAyqCt9cnmboTzXOtTMbnYSU++8StOmJRL77gzTIBzS0HReGWmzf1i6J3rKFAk7ONfAZBILQqF0H15ACn1FQx/lGtbu3AL4zszRjl634DDOOAoSf03aF4ZjXunhXU4i8LVs/gCdR+aIf1sY62+paJavQCwH1nuhm2xAWhMdX8k3kZpc5MxHzT7HKjsGfggkwc0KkxA== 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)(396003)(366004)(136003)(346002)(39860400002)(376002)(26005)(4326008)(186003)(478600001)(316002)(8676002)(16526019)(8886007)(6666004)(2906002)(66476007)(8936002)(66946007)(956004)(66556008)(2616005)(55016002)(107886003)(86362001)(83380400001)(36756003)(6636002)(7696005)(5660300002)(1076003)(52116002)(110136005)(30864003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: f/iGV/CdFRDr09IfV2MkLFKymxbS07R1xwuIE2ADk6428yX/XYWu5nvttOIvL52tngg6OUawx6Bg9Rju61Ua3wDP0YYkGfLBpy/QpjwpZwigBBSFo5k6SfBO2qxWmnLnvx09slp+TSLEFdxTVfxCKpIVT609TpjJTrkP4yrR5+QoezaLpMNx1PNzimQM3Cpr94XEh5i8ehcMSRZ0ZytJknz69/lOUMyfYOBXYfw8HV73sp9gCJNLwyXIXHeCY28S4rt4LA02Rp20HRYltYYEFu9kewD48fZpphR4DkdKq4tWwFh5FGA8KN6YzWz16F2L2NX1/60BNZarE/IWWEo30npeWrSXpduQ0zwGNN0avFmyJ+Tu4fO02iqaKQRmIugnikMl+Isy9Zb3GxoX332RkdJXoLw5ATLff5H1Md8Rt3C/zrYoqJc4XbWqlsRLtoc0oSMCQlMbslXR7dX9JHa2/WiC0i1MULDbgdf/QIQU7fcP1Hay73oo3NbOO+rnmFui X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: be29d903-dca7-40e1-95f0-08d807cfa54e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2020 15:06:08.8639 (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: R8Qs5ov9k3F//iJM8fq6npy61+HjTixBXCRfBsZJ00ENn2RbEA3aMGscnIdsRbg90OtxKpQzvx9ir+Bav8Fq2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5235 Subject: [dpdk-dev] [PATCH v1 1/8] net/mlx5: rename mlx5 ibv 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 all 'mlx5_ibv_shared' appearances with 'mlx5_dev_ctx_shared'. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.c | 58 ++++++++++++++++++++--------------------- drivers/net/mlx5/mlx5.h | 14 +++++----- drivers/net/mlx5/mlx5_ethdev.c | 6 ++--- drivers/net/mlx5/mlx5_flow.c | 20 +++++++------- drivers/net/mlx5/mlx5_flow_dv.c | 26 +++++++++--------- drivers/net/mlx5/mlx5_mr.c | 10 +++---- 6 files changed, 67 insertions(+), 67 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 95a0f33..f942f92 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -199,7 +199,7 @@ struct mlx5_dev_spawn_data { struct rte_pci_device *pci_dev; /**< Backend PCI device. */ }; -static LIST_HEAD(, mlx5_ibv_shared) mlx5_ibv_list = LIST_HEAD_INITIALIZER(); +static LIST_HEAD(, mlx5_dev_ctx_shared) mlx5_ibv_list = LIST_HEAD_INITIALIZER(); static pthread_mutex_t mlx5_ibv_list_mutex = PTHREAD_MUTEX_INITIALIZER; static struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = { @@ -445,10 +445,10 @@ mlx5_flow_id_release(struct mlx5_flow_id_pool *pool, uint32_t id) * Initialize the shared aging list information per port. * * @param[in] sh - * Pointer to mlx5_ibv_shared object. + * Pointer to mlx5_dev_ctx_shared object. */ static void -mlx5_flow_aging_init(struct mlx5_ibv_shared *sh) +mlx5_flow_aging_init(struct mlx5_dev_ctx_shared *sh) { uint32_t i; struct mlx5_age_info *age_info; @@ -466,10 +466,10 @@ mlx5_flow_aging_init(struct mlx5_ibv_shared *sh) * Initialize the counters management structure. * * @param[in] sh - * Pointer to mlx5_ibv_shared object to free + * Pointer to mlx5_dev_ctx_shared object to free */ static void -mlx5_flow_counters_mng_init(struct mlx5_ibv_shared *sh) +mlx5_flow_counters_mng_init(struct mlx5_dev_ctx_shared *sh) { int i; @@ -502,10 +502,10 @@ mlx5_flow_destroy_counter_stat_mem_mng(struct mlx5_counter_stats_mem_mng *mng) * Close and release all the resources of the counters management. * * @param[in] sh - * Pointer to mlx5_ibv_shared object to free. + * Pointer to mlx5_dev_ctx_shared object to free. */ static void -mlx5_flow_counters_mng_close(struct mlx5_ibv_shared *sh) +mlx5_flow_counters_mng_close(struct mlx5_dev_ctx_shared *sh) { struct mlx5_counter_stats_mem_mng *mng; int i; @@ -560,12 +560,12 @@ mlx5_flow_counters_mng_close(struct mlx5_ibv_shared *sh) * Initialize the flow resources' indexed mempool. * * @param[in] sh - * Pointer to mlx5_ibv_shared object. + * Pointer to mlx5_dev_ctx_shared object. * @param[in] sh * Pointer to user dev config. */ static void -mlx5_flow_ipool_create(struct mlx5_ibv_shared *sh, +mlx5_flow_ipool_create(struct mlx5_dev_ctx_shared *sh, const struct mlx5_dev_config *config __rte_unused) { uint8_t i; @@ -591,10 +591,10 @@ mlx5_flow_ipool_create(struct mlx5_ibv_shared *sh, * Release the flow resources' indexed mempool. * * @param[in] sh - * Pointer to mlx5_ibv_shared object. + * Pointer to mlx5_dev_ctx_shared object. */ static void -mlx5_flow_ipool_destroy(struct mlx5_ibv_shared *sh) +mlx5_flow_ipool_destroy(struct mlx5_dev_ctx_shared *sh) { uint8_t i; @@ -668,10 +668,10 @@ mlx5_restore_doorbell_mapping_env(int value) * between multiple ports of single IB device. * * @param sh - * Pointer to mlx5_ibv_shared object. + * Pointer to mlx5_dev_ctx_shared object. */ static void -mlx5_dev_shared_handler_install(struct mlx5_ibv_shared *sh) +mlx5_dev_shared_handler_install(struct mlx5_dev_ctx_shared *sh) { int ret; int flags; @@ -724,10 +724,10 @@ mlx5_dev_shared_handler_install(struct mlx5_ibv_shared *sh) * between multiple ports of single IB device. * * @param dev - * Pointer to mlx5_ibv_shared object. + * Pointer to mlx5_dev_ctx_shared object. */ static void -mlx5_dev_shared_handler_uninstall(struct mlx5_ibv_shared *sh) +mlx5_dev_shared_handler_uninstall(struct mlx5_dev_ctx_shared *sh) { if (sh->intr_handle.fd >= 0) mlx5_intr_callback_unregister(&sh->intr_handle, @@ -758,14 +758,14 @@ mlx5_dev_shared_handler_uninstall(struct mlx5_ibv_shared *sh) * Pointer to device configuration structure. * * @return - * Pointer to mlx5_ibv_shared object on success, + * Pointer to mlx5_dev_ctx_shared object on success, * otherwise NULL and rte_errno is set. */ -static struct mlx5_ibv_shared * +static struct mlx5_dev_ctx_shared * mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn, const struct mlx5_dev_config *config) { - struct mlx5_ibv_shared *sh; + struct mlx5_dev_ctx_shared *sh; int dbmap_env; int err = 0; uint32_t i; @@ -787,7 +787,7 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn, /* No device found, we have to create new shared context. */ MLX5_ASSERT(spawn->max_port); sh = rte_zmalloc("ethdev shared ib context", - sizeof(struct mlx5_ibv_shared) + + sizeof(struct mlx5_dev_ctx_shared) + spawn->max_port * sizeof(struct mlx5_ibv_shared_port), RTE_CACHE_LINE_SIZE); @@ -933,15 +933,15 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn, * all allocated resources and close handles. * * @param[in] sh - * Pointer to mlx5_ibv_shared object to free + * Pointer to mlx5_dev_ctx_shared object to free */ static void -mlx5_free_shared_ibctx(struct mlx5_ibv_shared *sh) +mlx5_free_shared_ibctx(struct mlx5_dev_ctx_shared *sh) { pthread_mutex_lock(&mlx5_ibv_list_mutex); #ifdef RTE_LIBRTE_MLX5_DEBUG /* Check the object presence in the list. */ - struct mlx5_ibv_shared *lctx; + struct mlx5_dev_ctx_shared *lctx; LIST_FOREACH(lctx, &mlx5_ibv_list, next) if (lctx == sh) @@ -997,7 +997,7 @@ mlx5_free_shared_ibctx(struct mlx5_ibv_shared *sh) static void mlx5_free_table_hash_list(struct mlx5_priv *priv) { - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_tbl_data_entry *tbl_data; union mlx5_flow_tbl_key table_key = { { @@ -1054,7 +1054,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv) static int mlx5_alloc_table_hash_list(struct mlx5_priv *priv) { - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; char s[MLX5_HLIST_NAMESIZE]; int err = 0; @@ -1139,7 +1139,7 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv) static int mlx5_alloc_shared_dr(struct mlx5_priv *priv) { - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; char s[MLX5_HLIST_NAMESIZE]; int err = 0; @@ -1249,7 +1249,7 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv) static void mlx5_free_shared_dr(struct mlx5_priv *priv) { - struct mlx5_ibv_shared *sh; + struct mlx5_dev_ctx_shared *sh; if (!priv->dr_shared) return; @@ -2154,7 +2154,7 @@ static void mlx5_set_metadata_mask(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; uint32_t meta, mark, reg_c0; reg_c0 = ~priv->vport_meta_mask; @@ -2356,7 +2356,7 @@ static int mlx5_dev_check_sibling_config(struct mlx5_priv *priv, struct mlx5_dev_config *config) { - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_dev_config *sh_conf = NULL; uint16_t port_id; @@ -2413,7 +2413,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, struct mlx5_dev_config config) { const struct mlx5_switch_info *switch_info = &spawn->info; - struct mlx5_ibv_shared *sh = NULL; + struct mlx5_dev_ctx_shared *sh = NULL; struct ibv_port_attr port_attr; struct mlx5dv_context dv_attr = { .comp_mask = 0 }; struct rte_eth_dev *eth_dev = NULL; diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 8e60897..4f2ca15 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -76,7 +76,7 @@ enum mlx5_reclaim_mem_mode { #define MLX5_MP_NAME "net_mlx5_mp" -LIST_HEAD(mlx5_dev_list, mlx5_ibv_shared); +LIST_HEAD(mlx5_dev_list, mlx5_dev_ctx_shared); /* Shared data between primary and secondary processes. */ struct mlx5_shared_data { @@ -488,8 +488,8 @@ struct mlx5_flow_id_pool { * Shared Infiniband device context for Master/Representors * which belong to same IB device with multiple IB ports. **/ -struct mlx5_ibv_shared { - LIST_ENTRY(mlx5_ibv_shared) next; +struct mlx5_dev_ctx_shared { + LIST_ENTRY(mlx5_dev_ctx_shared) next; uint32_t refcnt; uint32_t devx:1; /* Opened with DV. */ uint32_t max_port; /* Maximal IB device port index. */ @@ -500,7 +500,7 @@ struct mlx5_ibv_shared { char ibdev_name[IBV_SYSFS_NAME_MAX]; /* IB device name. */ char ibdev_path[IBV_SYSFS_PATH_MAX]; /* IB device path for secondary */ struct ibv_device_attr_ex device_attr; /* Device properties. */ - LIST_ENTRY(mlx5_ibv_shared) mem_event_cb; + LIST_ENTRY(mlx5_dev_ctx_shared) mem_event_cb; /**< Called by memory event callback. */ struct mlx5_mr_share_cache share_cache; /* Shared DV/DR flow data section. */ @@ -552,7 +552,7 @@ TAILQ_HEAD(mlx5_flow_meters, mlx5_flow_meter); struct mlx5_priv { struct rte_eth_dev_data *dev_data; /* Pointer to device data. */ - struct mlx5_ibv_shared *sh; /* Shared IB device context. */ + struct mlx5_dev_ctx_shared *sh; /* Shared device context. */ uint32_t ibv_port; /* IB device port number. */ struct rte_pci_device *pci_dev; /* Backend PCI device. */ struct rte_ether_addr mac[MLX5_MAX_MAC_ADDRESSES]; /* MAC addresses. */ @@ -817,9 +817,9 @@ int mlx5_ctrl_flow(struct rte_eth_dev *dev, struct rte_flow *mlx5_flow_create_esw_table_zero_flow(struct rte_eth_dev *dev); int mlx5_flow_create_drop_queue(struct rte_eth_dev *dev); void mlx5_flow_delete_drop_queue(struct rte_eth_dev *dev); -void mlx5_flow_async_pool_query_handle(struct mlx5_ibv_shared *sh, +void mlx5_flow_async_pool_query_handle(struct mlx5_dev_ctx_shared *sh, uint64_t async_id, int status); -void mlx5_set_query_alarm(struct mlx5_ibv_shared *sh); +void mlx5_set_query_alarm(struct mlx5_dev_ctx_shared *sh); void mlx5_flow_query_alarm(void *arg); uint32_t mlx5_counter_alloc(struct rte_eth_dev *dev); void mlx5_counter_free(struct rte_eth_dev *dev, uint32_t cnt); diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index b837ce6..6919911 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -1237,7 +1237,7 @@ mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) * Infiniband device shared context. */ static void -mlx5_dev_interrupt_device_fatal(struct mlx5_ibv_shared *sh) +mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh) { uint32_t i; @@ -1269,7 +1269,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_ibv_shared *sh) void mlx5_dev_interrupt_handler(void *cb_arg) { - struct mlx5_ibv_shared *sh = cb_arg; + struct mlx5_dev_ctx_shared *sh = cb_arg; struct ibv_async_event event; /* Read all message from the IB device and acknowledge them. */ @@ -1426,7 +1426,7 @@ mlx5_dev_interrupt_handler_devx(void *cb_arg) (void)cb_arg; return; #else - struct mlx5_ibv_shared *sh = cb_arg; + struct mlx5_dev_ctx_shared *sh = cb_arg; union { struct mlx5dv_devx_async_cmd_hdr cmd_resp; uint8_t buf[MLX5_ST_SZ_BYTES(query_flow_counter_out) + diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index f2c3cf9..e375b10 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -5794,13 +5794,13 @@ mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt, * Get number of all validate pools. * * @param[in] sh - * Pointer to mlx5_ibv_shared object. + * Pointer to mlx5_dev_ctx_shared object. * * @return * The number of all validate pools. */ static uint32_t -mlx5_get_all_valid_pool_count(struct mlx5_ibv_shared *sh) +mlx5_get_all_valid_pool_count(struct mlx5_dev_ctx_shared *sh) { int i; uint32_t pools_n = 0; @@ -5815,10 +5815,10 @@ mlx5_get_all_valid_pool_count(struct mlx5_ibv_shared *sh) * the counter pools. * * @param[in] sh - * Pointer to mlx5_ibv_shared object. + * Pointer to mlx5_dev_ctx_shared object. */ void -mlx5_set_query_alarm(struct mlx5_ibv_shared *sh) +mlx5_set_query_alarm(struct mlx5_dev_ctx_shared *sh) { uint32_t pools_n, us; @@ -5843,7 +5843,7 @@ mlx5_set_query_alarm(struct mlx5_ibv_shared *sh) void mlx5_flow_query_alarm(void *arg) { - struct mlx5_ibv_shared *sh = arg; + struct mlx5_dev_ctx_shared *sh = arg; struct mlx5_devx_obj *dcs; uint16_t offset; int ret; @@ -5928,12 +5928,12 @@ mlx5_flow_query_alarm(void *arg) * Check and callback event for new aged flow in the counter pool * * @param[in] sh - * Pointer to mlx5_ibv_shared object. + * Pointer to mlx5_dev_ctx_shared object. * @param[in] pool * Pointer to Current counter pool. */ static void -mlx5_flow_aging_check(struct mlx5_ibv_shared *sh, +mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh, struct mlx5_flow_counter_pool *pool) { struct mlx5_priv *priv; @@ -5993,14 +5993,14 @@ mlx5_flow_aging_check(struct mlx5_ibv_shared *sh, * query. This function is probably called by the host thread. * * @param[in] sh - * The pointer to the shared IB device context. + * The pointer to the shared device context. * @param[in] async_id * The Devx async ID. * @param[in] status * The status of the completion. */ void -mlx5_flow_async_pool_query_handle(struct mlx5_ibv_shared *sh, +mlx5_flow_async_pool_query_handle(struct mlx5_dev_ctx_shared *sh, uint64_t async_id, int status) { struct mlx5_flow_counter_pool *pool = @@ -6161,7 +6161,7 @@ mlx5_flow_dev_dump(struct rte_eth_dev *dev, struct rte_flow_error *error __rte_unused) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; return mlx5_devx_cmd_flow_dump(sh->fdb_domain, sh->rx_domain, sh->tx_domain, file); diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index e481831..4dec57d 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -285,7 +285,7 @@ static void flow_dv_shared_lock(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; if (sh->dv_refcnt > 1) { int ret; @@ -300,7 +300,7 @@ static void flow_dv_shared_unlock(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; if (sh->dv_refcnt > 1) { int ret; @@ -2560,7 +2560,7 @@ flow_dv_encap_decap_resource_register struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_dv_encap_decap_resource *cache_resource; struct mlx5dv_dr_domain *domain; uint32_t idx = 0; @@ -2697,7 +2697,7 @@ flow_dv_port_id_action_resource_register struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_dv_port_id_action_resource *cache_resource; uint32_t idx = 0; @@ -2772,7 +2772,7 @@ flow_dv_push_vlan_action_resource_register struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_dv_push_vlan_action_resource *cache_resource; struct mlx5dv_dr_domain *domain; uint32_t idx = 0; @@ -3946,7 +3946,7 @@ flow_dv_modify_hdr_resource_register struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_dv_modify_hdr_resource *cache_resource; struct mlx5dv_dr_domain *ns; uint32_t actions_len; @@ -4104,7 +4104,7 @@ static struct mlx5_counter_stats_mem_mng * flow_dv_create_counter_stat_mem_mng(struct rte_eth_dev *dev, int raws_n) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_devx_mkey_attr mkey_attr; struct mlx5_counter_stats_mem_mng *mem_mng; volatile struct flow_counter_stats *raw_data; @@ -7206,7 +7206,7 @@ flow_dv_tbl_resource_get(struct rte_eth_dev *dev, struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_tbl_resource *tbl; union mlx5_flow_tbl_key table_key = { { @@ -7291,7 +7291,7 @@ flow_dv_tbl_resource_release(struct rte_eth_dev *dev, struct mlx5_flow_tbl_resource *tbl) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_tbl_data_entry *tbl_data = container_of(tbl, struct mlx5_flow_tbl_data_entry, tbl); @@ -7336,7 +7336,7 @@ flow_dv_matcher_register(struct rte_eth_dev *dev, struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_dv_matcher *cache_matcher; struct mlx5dv_flow_matcher_attr dv_attr = { .type = IBV_FLOW_ATTR_NORMAL, @@ -7435,7 +7435,7 @@ flow_dv_tag_resource_register struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_dv_tag_resource *cache_resource; struct mlx5_hlist_entry *entry; @@ -7499,7 +7499,7 @@ flow_dv_tag_release(struct rte_eth_dev *dev, uint32_t tag_idx) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_dv_tag_resource *tag; tag = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_TAG], tag_idx); @@ -9147,7 +9147,7 @@ flow_dv_prepare_mtr_tables(struct rte_eth_dev *dev, uint32_t color_reg_c_idx) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_flow_dv_match_params mask = { .size = sizeof(mask.buf), }; diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c index 2b4b3e2..c91d6a4 100644 --- a/drivers/net/mlx5/mlx5_mr.c +++ b/drivers/net/mlx5/mlx5_mr.c @@ -57,7 +57,7 @@ struct mr_update_mp_data { * Size of freed memory. */ static void -mlx5_mr_mem_event_free_cb(struct mlx5_ibv_shared *sh, +mlx5_mr_mem_event_free_cb(struct mlx5_dev_ctx_shared *sh, const void *addr, size_t len) { const struct rte_memseg_list *msl; @@ -145,7 +145,7 @@ void mlx5_mr_mem_event_cb(enum rte_mem_event event_type, const void *addr, size_t len, void *arg __rte_unused) { - struct mlx5_ibv_shared *sh; + struct mlx5_dev_ctx_shared *sh; struct mlx5_dev_list *dev_list = &mlx5_shared_data->mem_event_cb_list; /* Must be called from the primary process. */ @@ -259,7 +259,7 @@ mlx5_mr_update_ext_mp_cb(struct rte_mempool *mp, void *opaque, struct mr_update_mp_data *data = opaque; struct rte_eth_dev *dev = data->dev; struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_ibv_shared *sh = priv->sh; + struct mlx5_dev_ctx_shared *sh = priv->sh; struct mlx5_mr_ctrl *mr_ctrl = data->mr_ctrl; struct mlx5_mr *mr = NULL; uintptr_t addr = (uintptr_t)memhdr->addr; @@ -339,7 +339,7 @@ mlx5_dma_map(struct rte_pci_device *pdev, void *addr, struct rte_eth_dev *dev; struct mlx5_mr *mr; struct mlx5_priv *priv; - struct mlx5_ibv_shared *sh; + struct mlx5_dev_ctx_shared *sh; dev = pci_dev_to_eth_dev(pdev); if (!dev) { @@ -386,7 +386,7 @@ mlx5_dma_unmap(struct rte_pci_device *pdev, void *addr, { struct rte_eth_dev *dev; struct mlx5_priv *priv; - struct mlx5_ibv_shared *sh; + struct mlx5_dev_ctx_shared *sh; struct mlx5_mr *mr; struct mr_cache_entry entry; -- 2.8.4