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 658D4A0517; Wed, 10 Jun 2020 11:33:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A1E432C54; Wed, 10 Jun 2020 11:33:06 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2079.outbound.protection.outlook.com [40.107.22.79]) by dpdk.org (Postfix) with ESMTP id 065362BF1 for ; Wed, 10 Jun 2020 11:33:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZlHnmcZwoyQ8Woh3MQMqIGLYkanaRX0at1sokoScxeNhhIdtLqw6n9MUYW/3DDgVVICCt+fk4YaEWXxGOChqCTwT62kwxrPhtV48EH+nwp57duEguz5yrmFzKmJ98+c1lw3s22Y4eqno3sUGJqWny5j+KNfVFf4O5KucHpj/E10EoVSa1czAskxuGhaSjB5wggdWOErN00NQYA3W7itXlYemQcvKmCKPrQjhEztmEIG9IaOqOLY1mJOX/2MSMfSikiMQZwU3Eb8BnuYH80CD4PT9uOMzEOlUlzZJGcCSdzaBs6n9cadR4xDmtcYXaGzef4O1PhZ+tCQhpcFLN4jj5A== 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=0W68zJWOWWum6bqX8VWw3Ob/9Q0WFukX1YbGZ17OLnE=; b=ZGFMIXoeyNunQIsQ4xbjC+oJHnEk2UnF348j9XjocTFzjhOhGyOrUIc1jts8NVtIjDCLWHjLTIArWlmYnpLDYfSXLpALGx3ErRcTXjXp6rziOHIuXIuSim1fMGKqyVzdzN3hccPEqjY0CYoqhDO+FXSg+2qOK2mp25pjaF8IKSTmyjgSzxBvKoHCYd45GgRLFrxS/BI0VxTbNmkArtg0rZFyx98dtrpPuzb2yFTdW2aZoBMFTNJL1TGwKp4APcLZVFyP/tzJMX4fZ89AzJv8cFdfOiIrogrQKTh2tB3GJnfHdosByPWjpPnWFfbChpfjdxVKzrMtCp6mBQWhMNaZZw== 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=0W68zJWOWWum6bqX8VWw3Ob/9Q0WFukX1YbGZ17OLnE=; b=CtjlSSeT0FkXbkLMewdnZ/gAqBOlKe49YjhJJLTVyqrgK8liZKWOVdHiC6dFL9VPJvPZ69km0y+5MfeYYh74I4Dh3ccFdNdnCRN5bR0EUs2GQ8Ax7eb7wDaTE0mIbXaTFY/z0JHMHWMsvCywHRSfBtziVUSWgnv4lB4wm8eVZAg= 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:02 +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:02 +0000 From: Ophir Munk To: dev@dpdk.org, Matan Azrad , Raslan Darawsheh Cc: Ophir Munk Date: Wed, 10 Jun 2020 09:32:27 +0000 Message-Id: <20200610093233.23902-3-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:01 +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: df114305-c099-4383-d167-08d80d214514 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:113; X-Forefront-PRVS: 0430FA5CB7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7DehpxdqREqi8PssR8Os4OtbNf9FgYsF7bgx0l+gN03p1xHHr+ySE9hh76OcfJBGa5/jEfxHHmUb/GFEPZjHd/f7eEJ5xDksp7uh95zYXZraB9b5QKUteYJqXkqOqE6KjI+mnwxaBJPKEi8xKG+WtG4LI8QmlQu4Gj8CkONnW7RF5uam1Yhn2ygmGEGjfyD7v/BBcXEc0VjXAqY2WYeaKayQjvaeWn7MePi4GgdplizwLG3CuodPXxG88EOZ+DBnkxEdqoPorak3orPj6A9zcRTkmsuW3HbxtZNRIl6GPDityKsdaMezBl3wWqLJ91Ez 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)(30864003)(86362001)(107886003)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: QVvb/hUIRS+J1BHNWXCbuE3WwZRBk8fFIT+ZkgRFek/ll3yOd3kab95OHjHGPoIFtU8tUe1fF2+yRwvTCMTj9mbGc56z2quiK8chto7D2rFrwyYegvO9XCCXLBjhRYpTlUdSoBWR+htOrdS6v2uKWZuWmIBY4kp/cQUpr0kW7DjIZpwWu+2e4MO13p8NBwUUbd8dUhBVuXO53sQiZGSoysbtE6iDdLssbYVb5fuUKS4yNi1nfovjbVbCpnrAVS3IFMDNdz7c3RUEqql2ku+bAYqK1QBle6Tz5m9dbXwGFqsF7sPeg/blL98cbV1WhCxKwAR/hOPSXJTLCBjVvBK7y06Y60ndvjVr/NsQBXyYMfdrnCb4E6YAQW9ajOoadR8atzmPzItXyEWY2YOAYKsIx1d8jYnbZEFel13ccxrq+aqsM1D3/Vk8nAAVV/HIRbsZgiWRsyd/ifLkiHHkWk+FbqVSLnXgd8H2C5LgD9Q93gS/9k47cmucC0lwEhNNG4EU X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: df114305-c099-4383-d167-08d80d214514 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2020 09:33:02.0147 (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: xDXvBA0QRR3uw4PDzsfb7GQ8w3NkOFD1j3zb63X9piSLQQF0zFVsLWIJYcPrOG0c3ya5jScCZq9XzMI3AL13lw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4545 Subject: [dpdk-dev] [PATCH v1 2/8] net/mlx5: rename ib in names 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" Renames in this commit: mlx5_ibv_list -> mlx5_dev_ctx_list mlx5_alloc_shared_ibctx -> mlx5_alloc_shared_dev_ctx mlx5_free_shared_ibctx -> mlx5_free_shared_dev_ctx mlx5_ibv_shared_port -> mlx5_dev_shared_port ibv_port -> dev_port Signed-off-by: Ophir Munk --- drivers/net/mlx5/linux/mlx5_os.c | 6 +++--- drivers/net/mlx5/mlx5.c | 41 +++++++++++++++++++------------------- drivers/net/mlx5/mlx5.h | 14 ++++++------- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 4 ++-- drivers/net/mlx5/mlx5_flow_verbs.c | 2 +- drivers/net/mlx5/mlx5_rxtx.c | 2 +- drivers/net/mlx5/mlx5_stats.c | 2 +- drivers/net/mlx5/mlx5_trigger.c | 8 ++++---- drivers/net/mlx5/mlx5_txq.c | 2 +- 10 files changed, 42 insertions(+), 41 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 21eff38..abe9b04 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -563,7 +563,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, strerror(rte_errno)); goto error; } - sh = mlx5_alloc_shared_ibctx(spawn, &config); + sh = mlx5_alloc_shared_dev_ctx(spawn, &config); if (!sh) return NULL; config.devx = sh->devx; @@ -693,7 +693,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, goto error; } priv->sh = sh; - priv->ibv_port = spawn->phys_port; + priv->dev_port = spawn->phys_port; priv->pci_dev = spawn->pci_dev; priv->mtu = RTE_ETHER_MTU; priv->mp_id.port_id = port_id; @@ -1188,7 +1188,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, rte_eth_dev_release_port(eth_dev); } if (sh) - mlx5_free_shared_ibctx(sh); + mlx5_free_shared_dev_ctx(sh); MLX5_ASSERT(err > 0); rte_errno = err; return NULL; diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 7c5e23d..f07386d 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -176,8 +176,9 @@ static struct mlx5_local_data mlx5_local_data; /** Driver-specific log messages type. */ int mlx5_logtype; -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 LIST_HEAD(, mlx5_dev_ctx_shared) mlx5_dev_ctx_list = + LIST_HEAD_INITIALIZER(); +static pthread_mutex_t mlx5_dev_ctx_list_mutex = PTHREAD_MUTEX_INITIALIZER; static struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = { #ifdef HAVE_IBV_FLOW_DV_SUPPORT @@ -579,18 +580,18 @@ mlx5_flow_ipool_destroy(struct mlx5_dev_ctx_shared *sh) } /** - * Allocate shared IB device context. If there is multiport device the + * Allocate shared device context. If there is multiport device the * master and representors will share this context, if there is single - * port dedicated IB device, the context will be used by only given + * port dedicated device, the context will be used by only given * port due to unification. * - * Routine first searches the context for the specified IB device name, + * Routine first searches the context for the specified device name, * if found the shared context assumed and reference counter is incremented. * If no context found the new one is created and initialized with specified - * IB device context and parameters. + * device context and parameters. * * @param[in] spawn - * Pointer to the IB device attributes (name, port, etc). + * Pointer to the device attributes (name, port, etc). * @param[in] config * Pointer to device configuration structure. * @@ -599,8 +600,8 @@ mlx5_flow_ipool_destroy(struct mlx5_dev_ctx_shared *sh) * otherwise NULL and rte_errno is set. */ struct mlx5_dev_ctx_shared * -mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn, - const struct mlx5_dev_config *config) +mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn, + const struct mlx5_dev_config *config) { struct mlx5_dev_ctx_shared *sh; int err = 0; @@ -610,9 +611,9 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn, MLX5_ASSERT(spawn); /* Secondary process should not create the shared context. */ MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY); - pthread_mutex_lock(&mlx5_ibv_list_mutex); + pthread_mutex_lock(&mlx5_dev_ctx_list_mutex); /* Search for IB context by device name. */ - LIST_FOREACH(sh, &mlx5_ibv_list, next) { + LIST_FOREACH(sh, &mlx5_dev_ctx_list, next) { if (!strcmp(sh->ibdev_name, mlx5_os_get_dev_device_name(spawn->phys_dev))) { sh->refcnt++; @@ -624,7 +625,7 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn, sh = rte_zmalloc("ethdev shared ib context", sizeof(struct mlx5_dev_ctx_shared) + spawn->max_port * - sizeof(struct mlx5_ibv_shared_port), + sizeof(struct mlx5_dev_shared_port), RTE_CACHE_LINE_SIZE); if (!sh) { DRV_LOG(ERR, "shared context allocation failure"); @@ -713,12 +714,12 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn, sh, mem_event_cb); rte_rwlock_write_unlock(&mlx5_shared_data->mem_event_rwlock); /* Add context to the global device list. */ - LIST_INSERT_HEAD(&mlx5_ibv_list, sh, next); + LIST_INSERT_HEAD(&mlx5_dev_ctx_list, sh, next); exit: - pthread_mutex_unlock(&mlx5_ibv_list_mutex); + pthread_mutex_unlock(&mlx5_dev_ctx_list_mutex); return sh; error: - pthread_mutex_unlock(&mlx5_ibv_list_mutex); + pthread_mutex_unlock(&mlx5_dev_ctx_list_mutex); MLX5_ASSERT(sh); if (sh->tis) claim_zero(mlx5_devx_cmd_destroy(sh->tis)); @@ -744,14 +745,14 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn, * Pointer to mlx5_dev_ctx_shared object to free */ void -mlx5_free_shared_ibctx(struct mlx5_dev_ctx_shared *sh) +mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh) { - pthread_mutex_lock(&mlx5_ibv_list_mutex); + pthread_mutex_lock(&mlx5_dev_ctx_list_mutex); #ifdef RTE_LIBRTE_MLX5_DEBUG /* Check the object presence in the list. */ struct mlx5_dev_ctx_shared *lctx; - LIST_FOREACH(lctx, &mlx5_ibv_list, next) + LIST_FOREACH(lctx, &mlx5_dev_ctx_list, next) if (lctx == sh) break; MLX5_ASSERT(lctx); @@ -793,7 +794,7 @@ mlx5_free_shared_ibctx(struct mlx5_dev_ctx_shared *sh) mlx5_flow_id_pool_release(sh->flow_id_pool); rte_free(sh); exit: - pthread_mutex_unlock(&mlx5_ibv_list_mutex); + pthread_mutex_unlock(&mlx5_dev_ctx_list_mutex); } /** @@ -1193,7 +1194,7 @@ mlx5_dev_close(struct rte_eth_dev *dev) * mlx5_nl_mac_addr_flush() uses ibdev_path for retrieveing * ifindex if Netlink fails. */ - mlx5_free_shared_ibctx(priv->sh); + mlx5_free_shared_dev_ctx(priv->sh); if (priv->domain_id != RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID) { unsigned int c = 0; uint16_t port_id; diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index d624740..abe5099 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -446,7 +446,7 @@ struct mlx5_flow_counter_mng { #define MLX5_AGE_GET(age_info, BIT) \ ((age_info)->flags & (1 << (BIT))) #define GET_PORT_AGE_INFO(priv) \ - (&((priv)->sh->port[(priv)->ibv_port - 1].age_info)) + (&((priv)->sh->port[(priv)->dev_port - 1].age_info)) /* Aging information for per port. */ struct mlx5_age_info { @@ -456,7 +456,7 @@ struct mlx5_age_info { }; /* Per port data of shared IB device. */ -struct mlx5_ibv_shared_port { +struct mlx5_dev_shared_port { uint32_t ih_port_id; uint32_t devx_ih_port_id; /* @@ -571,7 +571,7 @@ struct mlx5_dev_ctx_shared { 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. */ - struct mlx5_ibv_shared_port port[]; /* per device port data array. */ + struct mlx5_dev_shared_port port[]; /* per device port data array. */ }; /* Per-process private structure. */ @@ -593,7 +593,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_dev_ctx_shared *sh; /* Shared device context. */ - uint32_t ibv_port; /* IB device port number. */ + uint32_t dev_port; /* Device port number. */ struct rte_pci_device *pci_dev; /* Backend PCI device. */ struct rte_ether_addr mac[MLX5_MAX_MAC_ADDRESSES]; /* MAC addresses. */ BITFIELD_DECLARE(mac_own, uint64_t, MLX5_MAX_MAC_ADDRESSES); @@ -697,9 +697,9 @@ void mlx5_dev_close(struct rte_eth_dev *dev); port_id = mlx5_eth_find_next(port_id + 1, pci_dev)) int mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs); struct mlx5_dev_ctx_shared * -mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn, - const struct mlx5_dev_config *config); -void mlx5_free_shared_ibctx(struct mlx5_dev_ctx_shared *sh); +mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn, + const struct mlx5_dev_config *config); +void mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh); void mlx5_free_table_hash_list(struct mlx5_priv *priv); int mlx5_alloc_table_hash_list(struct mlx5_priv *priv); void mlx5_set_min_inline(struct mlx5_dev_spawn_data *spawn, diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index e375b10..0e0b0fb 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -509,7 +509,7 @@ mlx5_flow_discover_priorities(struct rte_eth_dev *dev) } flow_attr = { .attr = { .num_of_specs = 2, - .port = (uint8_t)priv->ibv_port, + .port = (uint8_t)priv->dev_port, }, .eth = { .type = IBV_FLOW_SPEC_ETH, diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 81f5bd4..a323356 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -2725,7 +2725,7 @@ flow_dv_port_id_action_resource_register *cache_resource = *resource; /* * Depending on rdma_core version the glue routine calls - * either mlx5dv_dr_action_create_dest_ib_port(domain, ibv_port) + * either mlx5dv_dr_action_create_dest_ib_port(domain, dev_port) * or mlx5dv_dr_action_create_dest_vport(domain, vport_id). */ cache_resource->action = @@ -7557,7 +7557,7 @@ flow_dv_translate_action_port_id(struct rte_eth_dev *dev, * This parameter is transferred to * mlx5dv_dr_action_create_dest_ib_port(). */ - *dst_port_id = priv->ibv_port; + *dst_port_id = priv->dev_port; #else /* * Legacy mode, no LAG configurations is supported. diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index c266e56..150f6bb 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -1755,7 +1755,7 @@ flow_verbs_translate(struct rte_eth_dev *dev, /* Other members of attr will be ignored. */ dev_flow->verbs.attr.priority = mlx5_flow_adjust_priority(dev, priority, subpriority); - dev_flow->verbs.attr.port = (uint8_t)priv->ibv_port; + dev_flow->verbs.attr.port = (uint8_t)priv->dev_port; return 0; } diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 6a17a9a..22cdf15 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -946,7 +946,7 @@ mlx5_queue_state_modify_primary(struct rte_eth_dev *dev, container_of(txq, struct mlx5_txq_ctrl, txq); struct ibv_qp_attr mod = { .qp_state = IBV_QPS_RESET, - .port_num = (uint8_t)priv->ibv_port, + .port_num = (uint8_t)priv->dev_port, }; struct ibv_qp *qp = txq_ctrl->obj->qp; diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index b4ca692..7999c5f 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -149,7 +149,7 @@ mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat) if (priv->sh) { MKSTR(path, "%s/ports/%d/hw_counters/%s", priv->sh->ibdev_path, - priv->ibv_port, + priv->dev_port, ctr_name); fd = open(path, O_RDONLY); if (fd != -1) { diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index f123193..a9af2e6 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -342,7 +342,7 @@ mlx5_dev_start(struct rte_eth_dev *dev) /* Enable datapath on secondary process. */ mlx5_mp_req_start_rxtx(dev); if (priv->sh->intr_handle.fd >= 0) { - priv->sh->port[priv->ibv_port - 1].ih_port_id = + priv->sh->port[priv->dev_port - 1].ih_port_id = (uint32_t)dev->data->port_id; } else { DRV_LOG(INFO, "port %u starts without LSC and RMV interrupts.", @@ -351,7 +351,7 @@ mlx5_dev_start(struct rte_eth_dev *dev) dev->data->dev_conf.intr_conf.rmv = 0; } if (priv->sh->intr_handle_devx.fd >= 0) - priv->sh->port[priv->ibv_port - 1].devx_ih_port_id = + priv->sh->port[priv->dev_port - 1].devx_ih_port_id = (uint32_t)dev->data->port_id; return 0; error: @@ -394,8 +394,8 @@ mlx5_dev_stop(struct rte_eth_dev *dev) /* All RX queue flags will be cleared in the flush interface. */ mlx5_flow_list_flush(dev, &priv->flows, true); mlx5_rx_intr_vec_disable(dev); - priv->sh->port[priv->ibv_port - 1].ih_port_id = RTE_MAX_ETHPORTS; - priv->sh->port[priv->ibv_port - 1].devx_ih_port_id = RTE_MAX_ETHPORTS; + priv->sh->port[priv->dev_port - 1].ih_port_id = RTE_MAX_ETHPORTS; + priv->sh->port[priv->dev_port - 1].devx_ih_port_id = RTE_MAX_ETHPORTS; mlx5_txq_stop(dev); mlx5_rxq_stop(dev); } diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index f7b548f..507febf 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -684,7 +684,7 @@ mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx, /* Move the QP to this state. */ .qp_state = IBV_QPS_INIT, /* IB device port number. */ - .port_num = (uint8_t)priv->ibv_port, + .port_num = (uint8_t)priv->dev_port, }; ret = mlx5_glue->modify_qp(tmpl.qp, &attr.mod, (IBV_QP_STATE | IBV_QP_PORT)); -- 2.8.4