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 766D2A00C4 for ; Fri, 18 Nov 2022 00:10:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72AD34067B; Fri, 18 Nov 2022 00:10:08 +0100 (CET) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mails.dpdk.org (Postfix) with ESMTP id 1AEB64021F for ; Fri, 18 Nov 2022 00:10:07 +0100 (CET) Received: by mail-wr1-f52.google.com with SMTP id g12so6336651wrs.10 for ; Thu, 17 Nov 2022 15:10:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FeuLaSzT7aXMkwpVd2MlYzvM8FxCsbWWsr/yPYg9Au8=; b=aoJipMx83V8kSGqGPq9LxGuNCns8KUNd5eOh/xNYZZ1P/3bZjgBHPk0Ib/nsGhMSlU qS6xQdGepJ+smsARAXBqAwX5rpAyMs7BHaNk0TNBKziFaBibXWnnh/nZhXsgMwnL9PTN kNH8FsueavOWA5awKrF1kkheGdJR/qJ+8bbHVuutwuj7KBdJHl+L2qPZ3qF1RdloET1x cnbKAvIRv3RMegIfGIF0vJOvQb4JbcNWcISRsO9hGYtSqvc0uFjJMaWRfhEOBJnierUV Ld41ZLD1NAPi2m1xOq26FVn2MAbA+LK73O2Gc1RjAJvQRxyY6/DWmbajvDiBj03/6/bj L+kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FeuLaSzT7aXMkwpVd2MlYzvM8FxCsbWWsr/yPYg9Au8=; b=IQ9+haKRn57ArnXz4UOS55Y4IqrCHfFUk5nuitFh/Z+vYVgkzqI1DXUdE3jyCSclya VgyJFh/ctkvnUADVmcdC0B9bsRE99XlaPh7v+FmzrU5PHBUmbmAFXOphiLaftOhPvj5d bxHQieHgPbKlDv8UMszvrNbyWg10we2ySdRNP/dcfB6q9wGyaeohIow4ROU735WB32l2 64VQyoqKbQv5EeNPmRhCM183FC/Tu7GN1G+HCYaqA63tqdzpfr2M0HSGbmMxyfTd7Z65 OQz0gTAy32BaYZesW6LA8xYKvndhj9MZ+a/O6EU0EuIrgUcL0m6gztJpQkQWtdK5PRpV ZvNA== X-Gm-Message-State: ANoB5plm1mF040OgVZaNzzXLWRnpKr+SXli29P8wK1BK4ikojl6Effeh urPfJ6e43DW9Q0ZKSjE/Ct/47qWcjDM= X-Google-Smtp-Source: AA0mqf5ycKwr3aL7J2ngzqSioSKcvY1caQnH1u1Ay5g7A5Ws018BVDdX9bpLJj0OeLYFTzTnwNFX7A== X-Received: by 2002:a5d:65cd:0:b0:22e:3e28:f8db with SMTP id e13-20020a5d65cd000000b0022e3e28f8dbmr2804254wrw.380.1668726606712; Thu, 17 Nov 2022 15:10:06 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id i7-20020a05600c354700b003cf4eac8e80sm3652108wmq.23.2022.11.17.15.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 15:10:05 -0800 (PST) From: luca.boccassi@gmail.com To: Shun Hao Cc: Matan Azrad , dpdk stable Subject: patch 'net/mlx5: fix drop action validation' has been queued to stable release 20.11.7 Date: Thu, 17 Nov 2022 23:08:41 +0000 Message-Id: <20221117230859.611465-17-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221117230859.611465-1-luca.boccassi@gmail.com> References: <20221105171146.1520039-47-luca.boccassi@gmail.com> <20221117230859.611465-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.7 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/19/22. 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/1f22dd064c5df53f43d04c08af61340f48faa931 Thanks. Luca Boccassi --- >From 1f22dd064c5df53f43d04c08af61340f48faa931 Mon Sep 17 00:00:00 2001 From: Shun Hao Date: Thu, 10 Nov 2022 08:59:21 +0200 Subject: [PATCH] net/mlx5: fix drop action validation [ upstream commit e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 ] Currently there's limitation for Drop action that can only co-exist with Count action. Sample and Age actions are also able to exist with Drop within the same flow, and this patch includes them in the Drop action validation. Fixes: 70faf9ae0a29 ("net/mlx5: unify validation of drop action") Signed-off-by: Shun Hao Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.h | 3 +++ drivers/net/mlx5/mlx5_flow_dv.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 090cc7c77f..156dadde6b 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -217,6 +217,9 @@ enum mlx5_feature_name { #define MLX5_FLOW_ACTION_TUNNEL_SET (1ull << 37) #define MLX5_FLOW_ACTION_TUNNEL_MATCH (1ull << 38) +#define MLX5_FLOW_DROP_INCLUSIVE_ACTIONS \ + (MLX5_FLOW_ACTION_COUNT | MLX5_FLOW_ACTION_SAMPLE | MLX5_FLOW_ACTION_AGE) + #define MLX5_FLOW_FATE_ACTIONS \ (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | \ MLX5_FLOW_ACTION_RSS | MLX5_FLOW_ACTION_JUMP | \ diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 1705e2a1f0..c60aabf075 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -6155,18 +6155,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, /* * Validate the drop action mutual exclusion with other actions. * Drop action is mutually-exclusive with any other action, except for - * Count action. + * Count/Sample/Age actions. * Drop action compatibility with tunnel offload was already validated. */ if (action_flags & (MLX5_FLOW_ACTION_TUNNEL_MATCH | MLX5_FLOW_ACTION_TUNNEL_MATCH)); else if ((action_flags & MLX5_FLOW_ACTION_DROP) && - (action_flags & ~(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_COUNT))) + (action_flags & ~(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_DROP_INCLUSIVE_ACTIONS))) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, NULL, "Drop action is mutually-exclusive " "with any other action, except for " - "Count action"); + "Count/Sample/Age action"); /* Eswitch has few restrictions on using items and actions */ if (attr->transfer) { if (!mlx5_flow_ext_mreg_supported(dev) && -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.232855751 +0000 +++ 0017-net-mlx5-fix-drop-action-validation.patch 2022-11-17 23:07:55.504330637 +0000 @@ -1 +1 @@ -From e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 Mon Sep 17 00:00:00 2001 +From 1f22dd064c5df53f43d04c08af61340f48faa931 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 955383dd07..94e0ac99b9 100644 +index 090cc7c77f..156dadde6b 100644 @@ -26,3 +27,3 @@ -@@ -304,6 +304,9 @@ enum mlx5_feature_name { - #define MLX5_FLOW_ACTION_INDIRECT_COUNT (1ull << 43) - #define MLX5_FLOW_ACTION_INDIRECT_AGE (1ull << 44) +@@ -217,6 +217,9 @@ enum mlx5_feature_name { + #define MLX5_FLOW_ACTION_TUNNEL_SET (1ull << 37) + #define MLX5_FLOW_ACTION_TUNNEL_MATCH (1ull << 38) @@ -37 +38 @@ -index d79dd8d5f0..bc9a75f225 100644 +index 1705e2a1f0..c60aabf075 100644 @@ -40 +41 @@ -@@ -8103,18 +8103,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, +@@ -6155,18 +6155,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,