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 16AC6A00C2 for ; Thu, 3 Nov 2022 10:30:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1300340694; Thu, 3 Nov 2022 10:30:49 +0100 (CET) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mails.dpdk.org (Postfix) with ESMTP id B1A0940693 for ; Thu, 3 Nov 2022 10:30:47 +0100 (CET) Received: by mail-wm1-f54.google.com with SMTP id 5so699856wmo.1 for ; Thu, 03 Nov 2022 02:30:47 -0700 (PDT) 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=WS6hT44lmexjrTCU1wCqcs6llb9lXQvjxyIv2x7rGzA=; b=nqMxDgY1uJEbK6n8kYZOowsRbl9FOdsqgADzBfFC67k6MpQsn07yBAOXfBiRUEvm0Q MjN3dlsPgOLGKfND3o+3SfdvyvABnYvRFiscsJ9749JChhyG7PEGGdDMNXU13E+quAcq ma1epHoxGji34dFpoUrgJ2kKHGd9SXHQwo6YLSt8KLOF1K0NRWMOza/QRru9sub26KUQ hF3iZQZB+HPuv5MpoLdaJQUYBC9KX3Zw4ybjjz+O5Hvzz4q4l2VM94RHlscyXLwf2qNb OxfXfWCt/Du7QDEhmnX59ehLNGzjy5gQYGF12WCdTXzZdqYB+f2W6JDEnmp1hFw2PDnd dJ6Q== 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=WS6hT44lmexjrTCU1wCqcs6llb9lXQvjxyIv2x7rGzA=; b=gUEsMKyOXTGcWxb5N5o2hVpgWAj27/wUPhpjtp7qFYOUKghJw+GVt60IcZkuENEMS6 XfDvouSrZONsoL7YOhudbA69tAxRZGipDV3z4FoiT/1biTwEakEUMKmcvbpw245fSBw3 eKBz7dGMz2lII5uxxNochwIExwdnfPETfVI9ExLZUMD0gzypLJo0A8L+C7HcAKFcEllK 2ZpOowHwGJK7ChAkag4bHVVaUUeWQTXoydC570alNbbqEtDj86gGQ0lEOUfN6dbVRzCH Emhqf45mcw4aVx5muKD9tjacHSKHl6cztdMSNmgSd/g8crrBRYZosmZd3vNwrOrfHirk 01pA== X-Gm-Message-State: ACrzQf07iWdnkxR2nWAkMXeEBtj7f8DcRHGllXdXr3oN5apstwSmP20k mgpZqZ+WdzQcf+SA42mo2Mt3GTRqIkR/5Eam X-Google-Smtp-Source: AMsMyM68e9XgirAzer91TAiNGIJzUNEGhyFNdGFTUe6gm5RMJDvjHwFbWLSp9b3R8IJD7xXj1p4WZQ== X-Received: by 2002:a05:600c:230d:b0:3c4:2975:321a with SMTP id 13-20020a05600c230d00b003c42975321amr28746855wmo.155.1667467847420; Thu, 03 Nov 2022 02:30:47 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id t9-20020a05600c198900b003c701c12a17sm5448582wmq.12.2022.11.03.02.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:30:46 -0700 (PDT) From: luca.boccassi@gmail.com To: Shun Hao Cc: Matan Azrad , dpdk stable Subject: patch 'net/mlx5: fix meter profile delete after disable' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:07 +0000 Message-Id: <20221103092758.1099402-49-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-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/05/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/897dcb70d3bfc168276f13f74f4c192aaa9ba5d3 Thanks. Luca Boccassi --- >From 897dcb70d3bfc168276f13f74f4c192aaa9ba5d3 Mon Sep 17 00:00:00 2001 From: Shun Hao Date: Sun, 18 Sep 2022 03:58:02 +0300 Subject: [PATCH] net/mlx5: fix meter profile delete after disable [ upstream commit 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 ] If a meter's profile is changed after meter disabled, there's an issue that will fail when deleting the old profile. This patch fixes this by adding the correct process to decrease the old profile's reference count when changing profile. Fixes: 63ffeb2ff2 ("net/mlx5: support meter profile update") Signed-off-by: Shun Hao Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_meter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c index 058d94c9cf..9a7a781584 100644 --- a/drivers/net/mlx5/mlx5_flow_meter.c +++ b/drivers/net/mlx5/mlx5_flow_meter.c @@ -942,7 +942,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, fm->profile = fmp; /* Update meter params in HW (if not disabled). */ if (fm->active_state == MLX5_FLOW_METER_DISABLE) - return 0; + goto dec_ref_cnt; ret = mlx5_flow_meter_action_modify(priv, fm, &fm->profile->srtcm_prm, modify_bits, fm->active_state); if (ret) { @@ -952,6 +952,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, NULL, "Failed to update meter" " parameters in hardware."); } +dec_ref_cnt: old_fmp->ref_cnt--; fmp->ref_cnt++; return 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.408948740 +0000 +++ 0049-net-mlx5-fix-meter-profile-delete-after-disable.patch 2022-11-03 09:27:25.449423912 +0000 @@ -1 +1 @@ -From 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 Mon Sep 17 00:00:00 2001 +From 897dcb70d3bfc168276f13f74f4c192aaa9ba5d3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 7c0d84907a..d4aafe4eea 100644 +index 058d94c9cf..9a7a781584 100644 @@ -25 +26 @@ -@@ -1656,7 +1656,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, +@@ -942,7 +942,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, @@ -32 +33 @@ - modify_bits, fm->active_state, 1); + modify_bits, fm->active_state); @@ -34 +35 @@ -@@ -1666,6 +1666,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, +@@ -952,6 +952,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,