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 F3A4348B69 for ; Fri, 21 Nov 2025 12:24:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE2A4402ED; Fri, 21 Nov 2025 12:24:52 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id A57CA4026F for ; Fri, 21 Nov 2025 12:24:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nAhr+709SExGohCNf8OkHIAd8JtznWGP79frBeidmCU=; b=BZ9VP/j7udTgQf8uOBdXVIusxC/w5QX5dV7ml8m782eHSR7xXGOsLP2lP/6aAKG5ySeGd3 13AoUTAjFkXInVk4AYxULqWv/zIeA5Ik1NOL6vikalZv43WN7UfamwDoeYXHN5rHR7cf7M GgFUQxdQn/Bo5rLevmnIl3hVcpUjDRY= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-502-bIL8CXvuOrKrJeRtw_fwTg-1; Fri, 21 Nov 2025 06:24:48 -0500 X-MC-Unique: bIL8CXvuOrKrJeRtw_fwTg-1 X-Mimecast-MFC-AGG-ID: bIL8CXvuOrKrJeRtw_fwTg_1763724287 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 070541800650; Fri, 21 Nov 2025 11:24:47 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2838D30044DB; Fri, 21 Nov 2025 11:24:44 +0000 (UTC) From: Kevin Traynor To: Nupur Uttarwar Cc: Bing Zhao , Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: skip Rx control flow tables in isolated mode' has been queued to stable release 24.11.4 Date: Fri, 21 Nov 2025 11:21:18 +0000 Message-ID: <20251121112128.485623-94-ktraynor@redhat.com> In-Reply-To: <20251121112128.485623-1-ktraynor@redhat.com> References: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fNuZ24mfWzIu5CA5C4dR5bPb1ZjL94sDWfVXbY9b4Q8_1763724287 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 Hi, FYI, your patch has been queued to stable release 24.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/26/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/d288d0f9a1919f6c676573408bdbec9115102b03 Thanks. Kevin --- >From d288d0f9a1919f6c676573408bdbec9115102b03 Mon Sep 17 00:00:00 2001 From: Nupur Uttarwar Date: Mon, 17 Nov 2025 07:05:57 +0200 Subject: [PATCH] net/mlx5: skip Rx control flow tables in isolated mode [ upstream commit 327682174e1a282c1351c83aacd2b9e8f8d352f2 ] If flow isolation is enabled, then skip flow_hw_create_ctrl_rx_tables because these are not used with flow isolation. This is used to save the unneeded resource allocation and also speed up the device startup time. Fixes: 9fa7c1cddb85 ("net/mlx5: create control flow rules with HWS") Signed-off-by: Nupur Uttarwar Signed-off-by: Bing Zhao Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_flow.h | 2 ++ drivers/net/mlx5/mlx5_flow_hw.c | 17 ++++------------- drivers/net/mlx5/mlx5_trigger.c | 14 +++++++++++++- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index bb11ad204e..ee6ad206b8 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -2998,4 +2998,6 @@ struct mlx5_flow_hw_ctrl_fdb { int mlx5_flow_hw_ctrl_flows(struct rte_eth_dev *dev, uint32_t flags); +int mlx5_flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev); +void mlx5_flow_hw_cleanup_ctrl_rx_tables(struct rte_eth_dev *dev); /** Create a control flow rule for matching unicast DMAC with VLAN (Verbs and DV). */ diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 11ea9ae152..9bd237b82a 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -10990,6 +10990,6 @@ flow_hw_create_vlan(struct rte_eth_dev *dev) } -static void -flow_hw_cleanup_ctrl_rx_tables(struct rte_eth_dev *dev) +void +mlx5_flow_hw_cleanup_ctrl_rx_tables(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; @@ -11276,6 +11276,6 @@ flow_hw_create_ctrl_rx_pattern_template } -static int -flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev) +int +mlx5_flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; @@ -11313,6 +11313,4 @@ flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev) err: ret = rte_errno; - flow_hw_cleanup_ctrl_rx_tables(dev); - rte_errno = ret; return -ret; } @@ -11508,5 +11506,4 @@ __flow_hw_resource_release(struct rte_eth_dev *dev, bool ctx_close) flow_hw_cleanup_ctrl_fdb_tables(dev); flow_hw_cleanup_tx_repr_tagging(dev); - flow_hw_cleanup_ctrl_rx_tables(dev); flow_hw_action_template_drop_release(dev); grp = LIST_FIRST(&priv->flow_hw_grp); @@ -11865,10 +11862,4 @@ __flow_hw_configure(struct rte_eth_dev *dev, if (ret) goto err; - ret = flow_hw_create_ctrl_rx_tables(dev); - if (ret) { - rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, - "Failed to set up Rx control flow templates"); - goto err; - } /* Initialize quotas */ if (port_attr->nb_quotas || (host_priv && host_priv->quota_ctx.devx_obj)) { diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index e2a94ca14c..dbb34ee2f2 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -1539,4 +1539,10 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev) if (priv->isolated) return 0; + ret = mlx5_flow_hw_create_ctrl_rx_tables(dev); + if (ret) { + DRV_LOG(ERR, "Failed to set up Rx control flow templates for port %u, %d", + dev->data->port_id, -ret); + goto error; + } if (dev->data->promiscuous) flags |= MLX5_CTRL_PROMISCUOUS; @@ -1552,4 +1558,5 @@ error: ret = rte_errno; mlx5_flow_hw_flush_ctrl_flows(dev); + mlx5_flow_hw_cleanup_ctrl_rx_tables(dev); rte_errno = ret; return -rte_errno; @@ -1786,6 +1793,11 @@ mlx5_traffic_disable(struct rte_eth_dev *dev) struct mlx5_priv *priv = dev->data->dev_private; - if (priv->sh->config.dv_flow_en == 2) + if (priv->sh->config.dv_flow_en == 2) { + /* Device started flag was cleared before, this is used to derefer the Rx queues. */ + priv->hws_rule_flushing = true; mlx5_flow_hw_flush_ctrl_flows(dev); + mlx5_flow_hw_cleanup_ctrl_rx_tables(dev); + priv->hws_rule_flushing = false; + } else #endif -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-21 11:05:12.494490215 +0000 +++ 0094-net-mlx5-skip-Rx-control-flow-tables-in-isolated-mod.patch 2025-11-21 11:05:09.631201886 +0000 @@ -1 +1 @@ -From 327682174e1a282c1351c83aacd2b9e8f8d352f2 Mon Sep 17 00:00:00 2001 +From d288d0f9a1919f6c676573408bdbec9115102b03 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 327682174e1a282c1351c83aacd2b9e8f8d352f2 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 8159008504..d7c9d4d0ea 100644 +index bb11ad204e..ee6ad206b8 100644 @@ -27 +28 @@ -@@ -3055,4 +3055,6 @@ struct mlx5_flow_hw_ctrl_nic { +@@ -2998,4 +2998,6 @@ struct mlx5_flow_hw_ctrl_fdb { @@ -35 +36 @@ -index 2695d047c7..c60f836de4 100644 +index 11ea9ae152..9bd237b82a 100644 @@ -38 +39 @@ -@@ -11184,6 +11184,6 @@ flow_hw_create_vlan(struct rte_eth_dev *dev) +@@ -10990,6 +10990,6 @@ flow_hw_create_vlan(struct rte_eth_dev *dev) @@ -47 +48 @@ -@@ -11470,6 +11470,6 @@ flow_hw_create_ctrl_rx_pattern_template +@@ -11276,6 +11276,6 @@ flow_hw_create_ctrl_rx_pattern_template @@ -56 +57 @@ -@@ -11507,6 +11507,4 @@ flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev) +@@ -11313,6 +11313,4 @@ flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev) @@ -63,2 +64,2 @@ -@@ -11707,5 +11705,4 @@ __flow_hw_resource_release(struct rte_eth_dev *dev, bool ctx_close) - flow_hw_cleanup_ctrl_nic_tables(dev); +@@ -11508,5 +11506,4 @@ __flow_hw_resource_release(struct rte_eth_dev *dev, bool ctx_close) + flow_hw_cleanup_ctrl_fdb_tables(dev); @@ -69 +70 @@ -@@ -12065,10 +12062,4 @@ __flow_hw_configure(struct rte_eth_dev *dev, +@@ -11865,10 +11862,4 @@ __flow_hw_configure(struct rte_eth_dev *dev, @@ -81 +82 @@ -index 9aa36ae9a8..028844e45d 100644 +index e2a94ca14c..dbb34ee2f2 100644 @@ -84 +85 @@ -@@ -1677,4 +1677,10 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev) +@@ -1539,4 +1539,10 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev) @@ -95 +96 @@ -@@ -1690,4 +1696,5 @@ error: +@@ -1552,4 +1558,5 @@ error: @@ -101 +102 @@ -@@ -1930,6 +1937,11 @@ mlx5_traffic_disable(struct rte_eth_dev *dev) +@@ -1786,6 +1793,11 @@ mlx5_traffic_disable(struct rte_eth_dev *dev)