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 2616B48A44 for ; Fri, 31 Oct 2025 15:36:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1EC3E40669; Fri, 31 Oct 2025 15:36:57 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 786FE40150 for ; Fri, 31 Oct 2025 15:36:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761921415; 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=SADVNQ2bYc20TPiB38MY4/rp7ixRaL4iX0rm7AW/YLQ=; b=OnQa9IGz/OuBsTIwrjZb3lscXwiArKnUpiIrpQo36Yj+QK6/OTTOfFKCGJb28yhMcrDRjP lTBoGhZvfKYXadcwRI/nbx8unBW0ANU/E5qOePiYsZmAYLOAPqw7EbBAvXq/wjlGtbPD3N liZv5uAFfWC5s+Nl/OSWEH2Z9XIyquU= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-473-21_phtUwPaGFXfJOvCmesg-1; Fri, 31 Oct 2025 10:36:48 -0400 X-MC-Unique: 21_phtUwPaGFXfJOvCmesg-1 X-Mimecast-MFC-AGG-ID: 21_phtUwPaGFXfJOvCmesg_1761921407 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 73E351956053; Fri, 31 Oct 2025 14:36:47 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.50]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E93A2180044F; Fri, 31 Oct 2025 14:36:45 +0000 (UTC) From: Kevin Traynor To: Gregory Etelson Cc: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix non-template RSS expansion' has been queued to stable release 24.11.4 Date: Fri, 31 Oct 2025 14:32:40 +0000 Message-ID: <20251031143421.324432-38-ktraynor@redhat.com> In-Reply-To: <20251031143421.324432-1-ktraynor@redhat.com> References: <20251031143421.324432-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: vHIkEENUY2Dluar3QrmGCTJlGKiTTKpLDtfnhPupRtE_1761921407 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/05/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/e07bd381439a464938bd6f4c3b508f277aeffac9 Thanks. Kevin --- >From e07bd381439a464938bd6f4c3b508f277aeffac9 Mon Sep 17 00:00:00 2001 From: Gregory Etelson Date: Tue, 12 Aug 2025 13:07:16 +0300 Subject: [PATCH] net/mlx5: fix non-template RSS expansion [ upstream commit ee60f50fbbf57e8173282c5cdd7d66cd9090103e ] The PMD checked flow pointer for NULL value after a call to flow_hw_create_flow(). The function API does not define flow pointer value if the function call has failed. The patch fixes error verification after flow_hw_create_flow() returned - a calling function must check flow_hw_create_flow() return value. Fixes: f74914c9956e ("net/mlx5: fix non-template IPv6 flow RSS hash") Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_nta_rss.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/net/mlx5/mlx5_nta_rss.c b/drivers/net/mlx5/mlx5_nta_rss.c index 781eaf5e99..ee38f233e1 100644 --- a/drivers/net/mlx5/mlx5_nta_rss.c +++ b/drivers/net/mlx5/mlx5_nta_rss.c @@ -68,5 +68,5 @@ mlx5_nta_ptype_rss_flow_create(struct mlx5_nta_rss_ctx *ctx, MLX5_FLOW_ITEM_PTYPE, MLX5_FLOW_ACTION_RSS, ctx->external, &flow, ctx->error); - if (flow) { + if (ret == 0) { SLIST_INSERT_HEAD(ctx->head, flow, nt2hws->next); if (dbg_log) { @@ -276,4 +276,5 @@ mlx5_hw_rss_ptype_create_miss_flow(struct rte_eth_dev *dev, struct rte_flow_error *error) { + int ret; struct rte_flow_hw *flow = NULL; const struct rte_flow_attr miss_attr = { @@ -300,8 +301,8 @@ mlx5_hw_rss_ptype_create_miss_flow(struct rte_eth_dev *dev, }; - flow_hw_create_flow(dev, MLX5_FLOW_TYPE_GEN, &miss_attr, - miss_pattern, miss_actions, 0, MLX5_FLOW_ACTION_RSS, - external, &flow, error); - return flow; + ret = flow_hw_create_flow(dev, MLX5_FLOW_TYPE_GEN, &miss_attr, + miss_pattern, miss_actions, 0, + MLX5_FLOW_ACTION_RSS, external, &flow, error); + return ret == 0 ? flow : NULL; } @@ -316,5 +317,5 @@ mlx5_hw_rss_ptype_create_base_flow(struct rte_eth_dev *dev, struct rte_flow_error *error) { - int i = 0; + int ret, i = 0; struct rte_flow_hw *flow = NULL; struct rte_flow_action actions[MLX5_HW_MAX_ACTS]; @@ -346,7 +347,7 @@ mlx5_hw_rss_ptype_create_base_flow(struct rte_eth_dev *dev, action_flags &= ~MLX5_FLOW_ACTION_RSS; action_flags |= MLX5_FLOW_ACTION_JUMP; - flow_hw_create_flow(dev, flow_type, attr, pattern, actions, - item_flags, action_flags, external, &flow, error); - return flow; + ret = flow_hw_create_flow(dev, flow_type, attr, pattern, actions, + item_flags, action_flags, external, &flow, error); + return ret == 0 ? flow : NULL; } @@ -426,4 +427,5 @@ flow_nta_create_single(struct rte_eth_dev *dev, struct rte_flow_error *error) { + int ret; struct rte_flow_hw *flow = NULL; struct rte_flow_action copy[MLX5_HW_MAX_ACTS]; @@ -457,8 +459,7 @@ flow_nta_create_single(struct rte_eth_dev *dev, } end: - flow_hw_create_flow(dev, flow_type, attr, items, - _actions, item_flags, action_flags, - external, &flow, error); - return flow; + ret = flow_hw_create_flow(dev, flow_type, attr, items, _actions, + item_flags, action_flags, external, &flow, error); + return ret == 0 ? flow : NULL; } -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-31 13:53:53.438408377 +0000 +++ 0038-net-mlx5-fix-non-template-RSS-expansion.patch 2025-10-31 13:53:52.098083857 +0000 @@ -1 +1 @@ -From ee60f50fbbf57e8173282c5cdd7d66cd9090103e Mon Sep 17 00:00:00 2001 +From e07bd381439a464938bd6f4c3b508f277aeffac9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ee60f50fbbf57e8173282c5cdd7d66cd9090103e ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 1d2940a370..1785425bb5 100644 +index 781eaf5e99..ee38f233e1 100644 @@ -34 +35 @@ -@@ -277,4 +277,5 @@ mlx5_hw_rss_ptype_create_miss_flow(struct rte_eth_dev *dev, +@@ -276,4 +276,5 @@ mlx5_hw_rss_ptype_create_miss_flow(struct rte_eth_dev *dev, @@ -40 +41 @@ -@@ -301,8 +302,8 @@ mlx5_hw_rss_ptype_create_miss_flow(struct rte_eth_dev *dev, +@@ -300,8 +301,8 @@ mlx5_hw_rss_ptype_create_miss_flow(struct rte_eth_dev *dev, @@ -53 +54 @@ -@@ -317,5 +318,5 @@ mlx5_hw_rss_ptype_create_base_flow(struct rte_eth_dev *dev, +@@ -316,5 +317,5 @@ mlx5_hw_rss_ptype_create_base_flow(struct rte_eth_dev *dev, @@ -60 +61 @@ -@@ -347,7 +348,7 @@ mlx5_hw_rss_ptype_create_base_flow(struct rte_eth_dev *dev, +@@ -346,7 +347,7 @@ mlx5_hw_rss_ptype_create_base_flow(struct rte_eth_dev *dev, @@ -71 +72 @@ -@@ -427,4 +428,5 @@ flow_nta_create_single(struct rte_eth_dev *dev, +@@ -426,4 +427,5 @@ flow_nta_create_single(struct rte_eth_dev *dev, @@ -77 +78 @@ -@@ -458,8 +460,7 @@ flow_nta_create_single(struct rte_eth_dev *dev, +@@ -457,8 +459,7 @@ flow_nta_create_single(struct rte_eth_dev *dev,