From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E04094541E for ; Thu, 13 Jun 2024 14:46:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA63D402F0; Thu, 13 Jun 2024 14:46:31 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2089.outbound.protection.outlook.com [40.107.102.89]) by mails.dpdk.org (Postfix) with ESMTP id 67E16402CB; Thu, 13 Jun 2024 14:46:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gTxM2aCE28UsEIJyoBBlrNb19P54qeriRn5qiqURZ3kNeq/QyW4Tjfpw/phJlxoUOupoJKGXroeEpM7MSLWqXJMAJ6hLuBLA9p4w1VnlBjkcFO1EG9hdymQXUZDiBCAWFGnBcfhDrUb2dJqX3k2tIN98rzZ0/7sLL+gmhfQx2DWFHsFbAvx74adtC8T917OnwEDkxFKjmwflpgNfVWXuL7rxbxxMNMpKcttyNhuUccC2TuvYwKiwDTBqJQQMoUcBsPNESIZvJP8LBkkemnPYXKgw0S3X9slpV0dKRfD7OYrwMPgeW6qrMJGx0grWPwSldLHYEro+p0bFQc0Nme603Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6f23xcOP//WZcGBvtguktr9Z5dsV24+f1/H6R0BRW9s=; b=k40p9wBLQeEQcUgD8br/FYRp9qBHIQjHOKiQXGu9Vgte3dy5kDQpYYeEJyBWvHWw6hc0Nrs41FY6zMJfVqLMQw3RcZ7pP9GhoxoJQa7HNVcP4ZSvqKKtWO7Cu2jXtQFXL7o/pq/i5lclhSxANxF5loeV+u89quFI85zd6PRSduIbbYwohz74BrfaC5Jl1Z4EBWHXYgiui0AJG3c4N9gD6PiWgD90KjvMRw8IjVk8PqQjD/7YMDFkVoL+SkIgPsVbl4/miJSLNKolmzDZ1BUvnRENHwEP36DMOfbrOYR0BXqVkFzfPG69PxFkBSFuyc/OJVUwpAf4zvvG1oPiJnEq9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6f23xcOP//WZcGBvtguktr9Z5dsV24+f1/H6R0BRW9s=; b=d2ZLrD93021LNNxB42kS/+VMV7HAamHF5kk/SncSpfeDaLr6zB+YQc4Ziy4nGFQdLu1mOs1W1rlkPGUbxgxpCL0NDB5DbRGLi5DqD3bnMsCk4bzAXjpdhA2MiC5R8WusFtYSIamdoRPxYuVTXT7219TylIZaFTZZ3EhxMEh1RX3bwyXwqN9x7D+as1rmz+PmdDWARBeHCNjGNajMUG8xbRbguawvYxTWxoiWPug4hgpRVgNeYa21v5U6cE2paWoDFvnxXdVJCP99Z23+KuvFtiLVFdUQ/zGA/iUWALcJEm1IydPKZdJWLqims3mEEGcmdCSBPER2kLRYi8QFM/0kJw== Received: from CH5P221CA0015.NAMP221.PROD.OUTLOOK.COM (2603:10b6:610:1f2::9) by MW3PR12MB4393.namprd12.prod.outlook.com (2603:10b6:303:2c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Thu, 13 Jun 2024 12:46:27 +0000 Received: from DS3PEPF0000C37A.namprd04.prod.outlook.com (2603:10b6:610:1f2:cafe::7f) by CH5P221CA0015.outlook.office365.com (2603:10b6:610:1f2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.21 via Frontend Transport; Thu, 13 Jun 2024 12:46:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS3PEPF0000C37A.mail.protection.outlook.com (10.167.23.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Thu, 13 Jun 2024 12:46:26 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 13 Jun 2024 05:46:01 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 13 Jun 2024 05:45:58 -0700 From: Bing Zhao To: , , CC: , , , , Rongwei Liu , , Subject: [PATCH] net/mlx5: fix mlx5 device start failure Date: Thu, 13 Jun 2024 15:45:28 +0300 Message-ID: <20240613124528.547952-1-bingz@nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF0000C37A:EE_|MW3PR12MB4393:EE_ X-MS-Office365-Filtering-Correlation-Id: 3be6b9f5-88d1-429d-a922-08dc8ba6d6e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230035|82310400021|376009|36860700008|1800799019; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?uwylvZ0SN5uNg3UccFf0yq8wEwpHe9+RTe6AAuwTxI2W4DZNtI7E+UrGjzui?= =?us-ascii?Q?Z0d8AYyavSXz5VoGAigJCNPsAoFhqb6Wn8w/t656VhJmFjja5AIHNafZ85A+?= =?us-ascii?Q?xqyirK+0pWlcjli70njKGAALRXliDukjMthvQha9zglu2aZFu5xZ4EAO993u?= =?us-ascii?Q?aoYxQHpJ+GLAf7VIfuHM2wlTS8kM86Y1SuuEHBcK2OEG+pNPh5xme55yxiNa?= =?us-ascii?Q?DR4YMHgTAxUkm6OdrVqDL6jl6DhlRSJIwgahJjhdb5xK72XgLAUdD8QxwRgw?= =?us-ascii?Q?IYVrFj8KPsfQ0IBKliyQE+by2poyfxS4xJ48sL7FxmNPcfntN0x53OpeL8c7?= =?us-ascii?Q?hyxr3RF4c+Tof12eRRzcIh5Fo6m1AbwjpXMvrvOEZavePD/2YwegMdXY+nrQ?= =?us-ascii?Q?GeWn8D940w1STtmtqODMYEV5GclQhYS7qsqLE+Gd/fQx8kK0WUXz4IDkjvK+?= =?us-ascii?Q?OmV8uFsB3W42/8bI36eT4fGBR54Z+eR20m3f4MBeweeozL8Ug+iCURwWYy/X?= =?us-ascii?Q?qw9uBrFehC8zOFAXneUNrlL4d2+ypgnYRFVURhIRIo2U5o44d5GbyFuKK7Xr?= =?us-ascii?Q?p8SCV6naNUupA15/uKwu7f4cE5HRaJgLUNvcUjmuLi8IA40ZkLIpTmnbQtRu?= =?us-ascii?Q?RTaofEKpNf9THe0kgFBKkkhQ3/Kgwpbjz7nYW8z1gFxBRYVcu18KVscOcqnI?= =?us-ascii?Q?rpZYYZZVL3KN6sBD+SF/AXkQlW0BsP9lRUzXvBp5bnLqhGdgQwSYHDIUNZqC?= =?us-ascii?Q?weOxLzli/njnT/O3c6WOC1A5V1ruOeHOfuTcom/Jtzk2K2RKOYT8v9A68Iac?= =?us-ascii?Q?RHZXgbw2/3DXAtBW/c6utNYaehH2RZ9iYeH9rSYYIxUpcBeX+ejmSKW1wq5e?= =?us-ascii?Q?nsAQDF0FMYFVZ+oWkam/GvpJuOMzKp5ruMFGhYsKvDjNKyzAMsBzStNz+Yzh?= =?us-ascii?Q?l6d2v+rCMqCsUHvvfY+U0qrye/lsggDKIeLM3L5Ya9gqiQWLw34xLQibE8v2?= =?us-ascii?Q?vV4sA3UKNGnt6ldc+gIY9dg3QI095K7/f82I/+jK2MonRmfw/Xm8BgnxdyPS?= =?us-ascii?Q?x6n7STkow0m2H+6DadwVPtTZDZ22UwQycDVkXQrF0oSiocpz8cRaLjYRuGLH?= =?us-ascii?Q?DANHY5kkzQ1cqkMspaTwLNCr6qEehAKHgeWDJ0/B9pDg1VJSnPdoeNo7M+vj?= =?us-ascii?Q?kXthp0xKtUPjJW0YEdfYl6M3e67t08CqHYKfRhSP4m7yeyNFXJR/630K5fcN?= =?us-ascii?Q?ftrRnSiys/B2bMqOyetWM20K8wJACJ7v/KAv4hkx58weg8ur4mNJhUx7tdIm?= =?us-ascii?Q?5hWJ95O7ZAjfG3+CI9xQQnpjlsjpChjQ6Hcl3qiE5F55CcI0P2V9+CIYxTH2?= =?us-ascii?Q?12DsG27MfWhJTVbMM1dWMZq74N77GBWGLaXiPTy9fHRxML4QuA=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230035)(82310400021)(376009)(36860700008)(1800799019); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2024 12:46:26.4413 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3be6b9f5-88d1-429d-a922-08dc8ba6d6e5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF0000C37A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4393 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Rongwei Liu When devargs "allow_duplicate_pattern=0" is specified, PMD won't allow duplicated flows to be inserted and return EEXIST as rte_errno. The queue/RSS split table is shared globally by all representors and PMD didn't prepend port information into it, so all the following ports tries to insert the same flows and cause PMD insertion failure. Using the hash list to manage it can solve the issue. Fixes: ddb68e473 ("net/mlx5: add extended metadata mode for HWS") Cc: bingz@nvidia.com Cc: stable@dpdk.org Signed-off-by: Rongwei Liu Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/linux/mlx5_os.c | 106 +++++++++++++++++-------------- drivers/net/mlx5/mlx5.c | 2 - drivers/net/mlx5/mlx5.h | 4 +- drivers/net/mlx5/mlx5_flow.c | 16 ++--- 4 files changed, 67 insertions(+), 61 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 1753acd050..50f4810bff 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -467,15 +467,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv) * Routine checks the reference counter and does actual * resources creation/initialization only if counter is zero. * - * @param[in] priv - * Pointer to the private device data structure. + * @param[in] eth_dev + * Pointer to the device. * * @return * Zero on success, positive error code otherwise. */ static int -mlx5_alloc_shared_dr(struct mlx5_priv *priv) +mlx5_alloc_shared_dr(struct rte_eth_dev *eth_dev) { + struct mlx5_priv *priv = eth_dev->data->dev_private; struct mlx5_dev_ctx_shared *sh = priv->sh; char s[MLX5_NAME_SIZE] __rte_unused; int err; @@ -590,6 +591,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv) err = errno; goto error; } + + if (sh->config.dv_flow_en == 1) { + /* Query availability of metadata reg_c's. */ + if (!priv->sh->metadata_regc_check_flag) { + err = mlx5_flow_discover_mreg_c(eth_dev); + if (err < 0) { + err = -err; + goto error; + } + } + if (!mlx5_flow_ext_mreg_supported(eth_dev)) { + DRV_LOG(DEBUG, + "port %u extensive metadata register is not supported", + eth_dev->data->port_id); + if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) { + DRV_LOG(ERR, "metadata mode %u is not supported " + "(no metadata registers available)", + sh->config.dv_xmeta_en); + err = ENOTSUP; + goto error; + } + } + if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY && + mlx5_flow_ext_mreg_supported(eth_dev) && sh->dv_regc0_mask) { + sh->mreg_cp_tbl = mlx5_hlist_create(MLX5_FLOW_MREG_HNAME, + MLX5_FLOW_MREG_HTABLE_SZ, + false, true, eth_dev, + flow_dv_mreg_create_cb, + flow_dv_mreg_match_cb, + flow_dv_mreg_remove_cb, + flow_dv_mreg_clone_cb, + flow_dv_mreg_clone_free_cb); + if (!sh->mreg_cp_tbl) { + err = ENOMEM; + goto error; + } + } + } #endif if (!sh->tunnel_hub && sh->config.dv_miss_info) err = mlx5_alloc_tunnel_hub(sh); @@ -674,6 +713,10 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv) mlx5_list_destroy(sh->dest_array_list); sh->dest_array_list = NULL; } + if (sh->mreg_cp_tbl) { + mlx5_hlist_destroy(sh->mreg_cp_tbl); + sh->mreg_cp_tbl = NULL; + } return err; } @@ -771,6 +814,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv) mlx5_list_destroy(sh->dest_array_list); sh->dest_array_list = NULL; } + if (sh->mreg_cp_tbl) { + mlx5_hlist_destroy(sh->mreg_cp_tbl); + sh->mreg_cp_tbl = NULL; + } } /** @@ -1572,13 +1619,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, } /* Create context for virtual machine VLAN workaround. */ priv->vmwa_context = mlx5_vlan_vmwa_init(eth_dev, spawn->ifindex); - if (sh->config.dv_flow_en) { - err = mlx5_alloc_shared_dr(priv); - if (err) - goto error; - if (mlx5_flex_item_port_init(eth_dev) < 0) - goto error; - } if (mlx5_devx_obj_ops_en(sh)) { priv->obj_ops = devx_obj_ops; mlx5_queue_counter_id_prepare(eth_dev); @@ -1629,6 +1669,13 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, goto error; } rte_rwlock_init(&priv->ind_tbls_lock); + if (sh->config.dv_flow_en) { + err = mlx5_alloc_shared_dr(eth_dev); + if (err) + goto error; + if (mlx5_flex_item_port_init(eth_dev) < 0) + goto error; + } if (sh->phdev->config.ipv6_tc_fallback == MLX5_IPV6_TC_UNKNOWN) { sh->phdev->config.ipv6_tc_fallback = MLX5_IPV6_TC_OK; if (!sh->cdev->config.hca_attr.modify_outer_ipv6_traffic_class || @@ -1715,43 +1762,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, err = -err; goto error; } - /* Query availability of metadata reg_c's. */ - if (!priv->sh->metadata_regc_check_flag) { - err = mlx5_flow_discover_mreg_c(eth_dev); - if (err < 0) { - err = -err; - goto error; - } - } - if (!mlx5_flow_ext_mreg_supported(eth_dev)) { - DRV_LOG(DEBUG, - "port %u extensive metadata register is not supported", - eth_dev->data->port_id); - if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) { - DRV_LOG(ERR, "metadata mode %u is not supported " - "(no metadata registers available)", - sh->config.dv_xmeta_en); - err = ENOTSUP; - goto error; - } - } - if (sh->config.dv_flow_en && - sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY && - mlx5_flow_ext_mreg_supported(eth_dev) && - priv->sh->dv_regc0_mask) { - priv->mreg_cp_tbl = mlx5_hlist_create(MLX5_FLOW_MREG_HNAME, - MLX5_FLOW_MREG_HTABLE_SZ, - false, true, eth_dev, - flow_dv_mreg_create_cb, - flow_dv_mreg_match_cb, - flow_dv_mreg_remove_cb, - flow_dv_mreg_clone_cb, - flow_dv_mreg_clone_free_cb); - if (!priv->mreg_cp_tbl) { - err = ENOMEM; - goto error; - } - } rte_spinlock_init(&priv->shared_act_sl); mlx5_flow_counter_mode_config(eth_dev); mlx5_flow_drop_action_config(eth_dev); @@ -1770,8 +1780,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, priv->sh->config.dv_esw_en) flow_hw_destroy_vport_action(eth_dev); #endif - if (priv->mreg_cp_tbl) - mlx5_hlist_destroy(priv->mreg_cp_tbl); if (priv->sh) mlx5_os_free_shared_dr(priv); if (priv->nl_socket_route >= 0) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 997b02c571..e482f7f0e5 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -2394,8 +2394,6 @@ mlx5_dev_close(struct rte_eth_dev *dev) mlx5_devx_cmd_destroy(priv->q_counters); priv->q_counters = NULL; } - if (priv->mreg_cp_tbl) - mlx5_hlist_destroy(priv->mreg_cp_tbl); mlx5_mprq_free_mp(dev); mlx5_os_free_shared_dr(priv); #ifdef HAVE_MLX5_HWS_SUPPORT diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index c9a3837bd2..bd149b43e5 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -1542,6 +1542,8 @@ struct mlx5_dev_ctx_shared { struct mlx5_hlist *flow_tbls; /* SWS flow table. */ struct mlx5_hlist *groups; /* HWS flow group. */ }; + struct mlx5_hlist *mreg_cp_tbl; + /* Hash table of Rx metadata register copy table. */ struct mlx5_flow_tunnel_hub *tunnel_hub; /* Direct Rules tables for FDB, NIC TX+RX */ void *dr_drop_action; /* Pointer to DR drop action, any domain. */ @@ -1968,8 +1970,6 @@ struct mlx5_priv { int nl_socket_rdma; /* Netlink socket (NETLINK_RDMA). */ int nl_socket_route; /* Netlink socket (NETLINK_ROUTE). */ struct mlx5_nl_vlan_vmwa_context *vmwa_context; /* VLAN WA context. */ - struct mlx5_hlist *mreg_cp_tbl; - /* Hash table of Rx metadata register copy table. */ struct mlx5_mtr_config mtr_config; /* Meter configuration */ uint8_t mtr_sfx_reg; /* Meter prefix-suffix flow match REG_C. */ struct mlx5_legacy_flow_meters flow_meters; /* MTR list. */ diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 7bcbbc74b5..9ccbbecc50 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -5178,8 +5178,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id, }; /* Check if already registered. */ - MLX5_ASSERT(priv->mreg_cp_tbl); - entry = mlx5_hlist_register(priv->mreg_cp_tbl, mark_id, &ctx); + MLX5_ASSERT(priv->sh->mreg_cp_tbl); + entry = mlx5_hlist_register(priv->sh->mreg_cp_tbl, mark_id, &ctx); if (!entry) return NULL; return container_of(entry, struct mlx5_flow_mreg_copy_resource, @@ -5218,10 +5218,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev, return; mcp_res = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_MCP], flow->rix_mreg_copy); - if (!mcp_res || !priv->mreg_cp_tbl) + if (!mcp_res || !priv->sh->mreg_cp_tbl) return; MLX5_ASSERT(mcp_res->rix_flow); - mlx5_hlist_unregister(priv->mreg_cp_tbl, &mcp_res->hlist_ent); + mlx5_hlist_unregister(priv->sh->mreg_cp_tbl, &mcp_res->hlist_ent); flow->rix_mreg_copy = 0; } @@ -5243,14 +5243,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev) uint32_t mark_id; /* Check if default flow is registered. */ - if (!priv->mreg_cp_tbl) + if (!priv->sh->mreg_cp_tbl) return; mark_id = MLX5_DEFAULT_COPY_ID; ctx.data = &mark_id; - entry = mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id, &ctx); + entry = mlx5_hlist_lookup(priv->sh->mreg_cp_tbl, mark_id, &ctx); if (!entry) return; - mlx5_hlist_unregister(priv->mreg_cp_tbl, entry); + mlx5_hlist_unregister(priv->sh->mreg_cp_tbl, entry); } /** @@ -5288,7 +5288,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev, */ mark_id = MLX5_DEFAULT_COPY_ID; ctx.data = &mark_id; - if (mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id, &ctx)) + if (mlx5_hlist_lookup(priv->sh->mreg_cp_tbl, mark_id, &ctx)) return 0; mcp_res = flow_mreg_add_copy_action(dev, mark_id, error); if (!mcp_res) -- 2.34.1