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 2D56C46BAE for ; Fri, 18 Jul 2025 21:34:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2879840611; Fri, 18 Jul 2025 21:34:26 +0200 (CEST) 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 A8D9740E42 for ; Fri, 18 Jul 2025 21:34:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867264; 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=AiHeikIkkjgLDtsEaZJ80fKL4hRpg/zPOx0ptKDeHWc=; b=Ny5EyKndFgbrM0ZYtY3HcFYF4ckNTBSFxYUpsefw/vQ7xZyvPjhe/0Q30EINxoiFzOXtIl 1v7yDNI9q1cfJHe3AfP2ftqfDtJ9QZ4oQtgoTHbbcBGT+w2WqwvYySMFdEn8OeGLNMvDfQ CqB9kDP+Fuc1JGR5UP6eC+2SZhKddMs= 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-52-4EUyodUhNtqfKkGrMy-9cA-1; Fri, 18 Jul 2025 15:33:55 -0400 X-MC-Unique: 4EUyodUhNtqfKkGrMy-9cA-1 X-Mimecast-MFC-AGG-ID: 4EUyodUhNtqfKkGrMy-9cA_1752867234 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 6F30E180028D; Fri, 18 Jul 2025 19:33:54 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 01A5E180049D; Fri, 18 Jul 2025 19:33:52 +0000 (UTC) From: Kevin Traynor To: Maayan Kashani Cc: Bing Zhao , dpdk stable Subject: patch 'net/mlx5: fix validation for GENEVE options' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:29:22 +0100 Message-ID: <20250718193247.1008129-28-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: UTX7lD8qpNFAxe-eQcs4K5fvFgxdU8a7yua4oaZpdOQ_1752867234 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/23/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/43f59d7fb7f68bf7025d6d9cf2365392fd8ee06f Thanks. Kevin --- >From 43f59d7fb7f68bf7025d6d9cf2365392fd8ee06f Mon Sep 17 00:00:00 2001 From: Maayan Kashani Date: Sun, 27 Apr 2025 14:22:56 +0300 Subject: [PATCH] net/mlx5: fix validation for GENEVE options [ upstream commit 3d7dae0878a36c4956084c1b5d01e225c170c1c3 ] For non-template API on top of HWS, geneve options parser is created by the pmd and not by the user, therefore during validation , the parser is not yet created. The fix is to ignore the validation of geneve options in case the rule is a non-template rule. The parser will be created later during rule create. Fixes: 80c676259a04 ("net/mlx5: validate HWS template items") Signed-off-by: Maayan Kashani Acked-by: Bing Zhao --- drivers/net/mlx5/mlx5_flow_hw.c | 35 ++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 3d04d86911..3183efe94b 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -8362,8 +8362,9 @@ struct mlx5_hw_pattern_validation_ctx { static int -flow_hw_pattern_validate(struct rte_eth_dev *dev, +__flow_hw_pattern_validate(struct rte_eth_dev *dev, const struct rte_flow_pattern_template_attr *attr, const struct rte_flow_item items[], uint64_t *item_flags, + bool nt_flow, struct rte_flow_error *error) { @@ -8533,8 +8534,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev, { last_item = MLX5_FLOW_LAYER_GENEVE_OPT; - ret = mlx5_flow_geneve_tlv_option_validate(priv, item, - error); - if (ret < 0) - return ret; + /* + * For non template the parser is internally created before + * the flow creation. + */ + if (!nt_flow) { + ret = mlx5_flow_geneve_tlv_option_validate(priv, item, + error); + if (ret < 0) + return ret; + } break; } @@ -8792,4 +8799,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev, } +static int +flow_hw_pattern_validate(struct rte_eth_dev *dev, + const struct rte_flow_pattern_template_attr *attr, + const struct rte_flow_item items[], + uint64_t *item_flags, + struct rte_flow_error *error) +{ + return __flow_hw_pattern_validate(dev, attr, items, item_flags, false, error); +} + /* * Verify that the tested flow patterns fits STE size limit in HWS group. @@ -14011,6 +14028,6 @@ static uintptr_t flow_hw_list_create(struct rte_eth_dev *dev, /* Validate application items only */ - ret = flow_hw_pattern_validate(dev, &pattern_template_attr, items, - &item_flags, error); + ret = __flow_hw_pattern_validate(dev, &pattern_template_attr, items, + &item_flags, true, error); if (ret < 0) return 0; @@ -15138,6 +15155,6 @@ flow_hw_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, if (external) { /* Validate application items only */ - ret = flow_hw_pattern_validate(dev, &pattern_template_attr, items, - &item_flags, error); + ret = __flow_hw_pattern_validate(dev, &pattern_template_attr, items, + &item_flags, true, error); if (ret < 0) return -rte_errno; -- 2.50.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-18 20:29:12.064855843 +0100 +++ 0028-net-mlx5-fix-validation-for-GENEVE-options.patch 2025-07-18 20:29:10.859907113 +0100 @@ -1 +1 @@ -From 3d7dae0878a36c4956084c1b5d01e225c170c1c3 Mon Sep 17 00:00:00 2001 +From 43f59d7fb7f68bf7025d6d9cf2365392fd8ee06f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3d7dae0878a36c4956084c1b5d01e225c170c1c3 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index cbe6bd3ef9..b5e78b1588 100644 +index 3d04d86911..3183efe94b 100644 @@ -27 +28 @@ -@@ -8487,8 +8487,9 @@ struct mlx5_hw_pattern_validation_ctx { +@@ -8362,8 +8362,9 @@ struct mlx5_hw_pattern_validation_ctx { @@ -38 +39 @@ -@@ -8658,8 +8659,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev, +@@ -8533,8 +8534,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev, @@ -57 +58 @@ -@@ -8925,4 +8932,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev, +@@ -8792,4 +8799,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev, @@ -72 +73 @@ -@@ -14264,6 +14281,6 @@ static uintptr_t flow_hw_list_create(struct rte_eth_dev *dev, +@@ -14011,6 +14028,6 @@ static uintptr_t flow_hw_list_create(struct rte_eth_dev *dev, @@ -81 +82 @@ -@@ -15403,6 +15420,6 @@ flow_hw_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, +@@ -15138,6 +15155,6 @@ flow_hw_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,