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 CC7B741D4F for ; Thu, 23 Feb 2023 10:40:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C932E43158; Thu, 23 Feb 2023 10:40:01 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id 61C3C43164 for ; Thu, 23 Feb 2023 10:40:00 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id t15so10246310wrz.7 for ; Thu, 23 Feb 2023 01:40:00 -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=e4OySi7x/arkPnRelziBQ1n0tOqljMnw6PnQ0iCR39Y=; b=ocddokC6XQVTKsYAcvQ1E4DyXELedXBCHIwGF7HbaleypDH7dqiTFBVGdtljt0wYDh 3bwHk7EfdDUB4tByk3UjnvAxFaifuKRJg+VIwSJt4OZAWhX2kkfmaKTn4RgkZ+ShGqOw pGOBq9yX6w2Rpvm3JDMgv31dFMl1IMb2yhwSd3DpHcca7dAFCUI/6kx0E/uAZntpq5JF BEFLg9J4O2zR80hF3PuqbyB5RH9/TTFqmWK5xHU0kmrmhLRyq+6nCrnpZwXTE19gBJTH gsThcAppQflMK7PTePomMrIL7vAbfiohFWeoOZz1y6P3yjjP5u47sF4RVy5RiDZ2/+Gm jcJg== 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=e4OySi7x/arkPnRelziBQ1n0tOqljMnw6PnQ0iCR39Y=; b=y9FHjkjOYXGpOoNImwFSUUA81BmxZrxl+bfRyqfzyR3g9V8+bfDfNwBLnJ+CbDy2/q bltsvbugOQmsaJ4/jA9O5hlYaheL+WC/u1w6aGYkRmmV+K+mx7ZAEANOOsxwduSoKIP2 moA8EsKbhcA9dQfWPcXAUfGxUInDma+0m4P7UG6QnllqMUYtuQDyj0w4+F5uxh6ktfvW r0TePC3fnh4stKOWKYhrYtSBlGnm4vtxfsELX/MgdjroF6lKVoYn1UMkRbw0h/xkhdRA rYb/5qQSitwBYnfSYfkNdTbEgqg0CWMTNuZfB5eD7J4NDnhQJEgFSUr4MkHdv/A9mmUf tLSw== X-Gm-Message-State: AO0yUKUOZOrCUIRESP5ZJRzzS+QyyE6SG+cy8ug58XzBjChnN4whrto7 8rQT5WQKfUIuah4UCWQNmrHbOXwy+GJbHA== X-Google-Smtp-Source: AK7set9DIeiVKKDFJPgQTMyzbuSwo5XNqujt6pX6OlEozCKq449mI2hymx4GhWJQG8CV5TbKC5XmmA== X-Received: by 2002:a05:6000:1091:b0:2c5:5d11:fa52 with SMTP id y17-20020a056000109100b002c55d11fa52mr10596507wrw.15.1677145200175; Thu, 23 Feb 2023 01:40:00 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id 1-20020a05600c274100b003dfe549da4fsm11200533wmw.18.2023.02.23.01.39.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:39:59 -0800 (PST) From: luca.boccassi@gmail.com To: Jiawei Wang Cc: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix flow sample with ConnectX-5' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:36:55 +0000 Message-Id: <20230223093715.3926893-51-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-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.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/23. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/5286c2391c6714374b3da8123f0fcb00e62ba0fd Thanks. Luca Boccassi --- >From 5286c2391c6714374b3da8123f0fcb00e62ba0fd Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Fri, 9 Dec 2022 16:34:06 +0200 Subject: [PATCH] net/mlx5: fix flow sample with ConnectX-5 [ upstream commit 7aa6d7998a9e59dc510e4e5706f675493855ff27 ] The sample flow tried to get the reserved metadata register for the match implicitly, and if the reserved metadata register was invalid then back to use the application tag. The assertion failure was caused while getting registered due to the reserved metadata regC is invalid on CX-5 trusted device(VF/SF). This patch adds the checking for reserved metadata register before getting the register, to avoid assertion failure. Fixes: 9a726360dd30 ("net/mlx5: fix sample flow action on trusted device") Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 87d55fc6be..ad11611027 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -4821,13 +4821,14 @@ flow_sample_split_prep(struct rte_eth_dev *dev, if (!fdb_tx) { /* Prepare the prefix tag action. */ set_tag = (void *)(actions_pre + actions_n + 1); - ret = mlx5_flow_get_reg_id(dev, MLX5_SAMPLE_ID, 0, error); /* Trust VF/SF on CX5 not supported meter so that the reserved * metadata regC is REG_NON, back to use application tag * index 0. */ - if (unlikely(ret == REG_NON)) + if (unlikely(priv->mtr_color_reg == REG_NON)) ret = mlx5_flow_get_reg_id(dev, MLX5_APP_TAG, 0, error); + else + ret = mlx5_flow_get_reg_id(dev, MLX5_SAMPLE_ID, 0, error); if (ret < 0) return ret; set_tag->id = ret; -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:30.268107363 +0000 +++ 0051-net-mlx5-fix-flow-sample-with-ConnectX-5.patch 2023-02-23 09:36:28.302171339 +0000 @@ -1 +1 @@ -From 7aa6d7998a9e59dc510e4e5706f675493855ff27 Mon Sep 17 00:00:00 2001 +From 5286c2391c6714374b3da8123f0fcb00e62ba0fd Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7aa6d7998a9e59dc510e4e5706f675493855ff27 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 51547aa78f..ea2016598e 100644 +index 87d55fc6be..ad11611027 100644 @@ -29 +30,2 @@ -@@ -6186,13 +6186,14 @@ flow_sample_split_prep(struct rte_eth_dev *dev, +@@ -4821,13 +4821,14 @@ flow_sample_split_prep(struct rte_eth_dev *dev, + if (!fdb_tx) { @@ -31,2 +33 @@ - append_index++; - set_tag = (void *)(actions_pre + actions_n + append_index); + set_tag = (void *)(actions_pre + actions_n + 1); @@ -45 +46 @@ - mlx5_ipool_malloc(priv->sh->ipool + set_tag->id = ret;