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 ECCABA0544 for ; Fri, 11 Nov 2022 12:40:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E85254014F; Fri, 11 Nov 2022 12:40:28 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 3574C40141 for ; Fri, 11 Nov 2022 12:40:27 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (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 smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id BBEF242240 for ; Fri, 11 Nov 2022 11:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166826; bh=XWu32qYV1YC8L5+3zze0DC6qK4q6oHxtxyWqHZx3ZXI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HZThEO1NJ3YhiPa9jSqxPAiCVVQKZiR6l/y9uqqTTFkX/P3+Jngfw1Va0rrKuznZ7 +JpApZirxu7EIYFf9hUjq21eLzapSeOquXrehJHRPmUUfnbnTk0bPfso7guG89m9Dx LPa5Qgqk6FLg9Skq6uB7NxCxnEStBka+boo5HMWmDyuWJiHtYW+g6y3J9mgGCXGH+U sXtBoKUk7cdawwiL2m3UwZ/OWWoQk1wNcXWAPvFa0x9YBqv3+3w17QRE9unbwARWQP i3lQR31favR3mWwTbpKc9obx6LgHT/twIESHPx8Ma8pLsKJjgTPqsImHS4e3q/Oqt6 ZWb/JzjMPdS0g== Received: by mail-ed1-f70.google.com with SMTP id z9-20020a05640235c900b0046358415c4fso3439532edc.9 for ; Fri, 11 Nov 2022 03:40:26 -0800 (PST) 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=XWu32qYV1YC8L5+3zze0DC6qK4q6oHxtxyWqHZx3ZXI=; b=wnXcQHhZfs99FBOkY9ka/TXDaJdHFLso5P2qT2Q21g1RcTUxEPf7i5sAgFT0tVMiD6 0eSuYJr0M8iBV9Ntjzve/BW1o2/+GSLq8zoVMPqZyWZhPIZqAFUlKk3DIB1ElJ/zHiyV I4I9zkMGDTuIlUXG49lPFY0i1rakBmKE8dnsFIiMdN1LQS9aLs+eK10jqL6thbb+gmiD Tju0nI1e653z7HO9H9MRqjtOEalLTwpiQLmDTe3xH3BCYCFEzLirUHCl+SSiq9PEzQ4f E20UCm2zKkmCEzlYMqe/JPpCQPtEZGSxvkXxO1U1WTKMsOLF0yfOyN2b2K8igknSe7nS aHeA== X-Gm-Message-State: ANoB5pndQj2/BLSnXuN8ZNvrMtKCiRDPg4t56qv1C7lYSnuGggSPzuav T+DeK+/tI0HY9w8k7wHPBTEqWrBYUv2aMe/cndjqrX6zRzMZ/XpQFjj04coYfNnhG7OsI4HnuI9 TXIsSK40WQn35Tgm3YTEGh9mb X-Received: by 2002:a17:906:3a94:b0:7ac:c5a4:70e7 with SMTP id y20-20020a1709063a9400b007acc5a470e7mr1615652ejd.13.1668166826468; Fri, 11 Nov 2022 03:40:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf7v3U/MrooY8pGvM/qLYGMbQrD3HFqolVX695tnuZh+gzGEJhQTgpt7+sCp+sJ3jDstxN6Nyg== X-Received: by 2002:a17:906:3a94:b0:7ac:c5a4:70e7 with SMTP id y20-20020a1709063a9400b007acc5a470e7mr1615640ejd.13.1668166826255; Fri, 11 Nov 2022 03:40:26 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id n23-20020a170906701700b0078db18d7972sm777713ejj.117.2022.11.11.03.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:40:25 -0800 (PST) From: christian.ehrhardt@canonical.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 19.11.14 Date: Fri, 11 Nov 2022 12:38:41 +0100 Message-Id: <20221111113904.1549618-24-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> References: <20221111113904.1549618-1-christian.ehrhardt@canonical.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 19.11.14 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/18/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/b77ca4fb51acaca866310d227eadb423f5b89faf Thanks. Christian Ehrhardt --- >From b77ca4fb51acaca866310d227eadb423f5b89faf 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 e51a85b477..f38dd2c357 100644 --- a/drivers/net/mlx5/mlx5_flow_meter.c +++ b/drivers/net/mlx5/mlx5_flow_meter.c @@ -935,7 +935,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) { @@ -945,6 +945,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, NULL, "Failed to update meter" " parmeters in hardware."); } +dec_ref_cnt: old_fmp->ref_cnt--; fmp->ref_cnt++; return 0; -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 12:35:05.648731460 +0100 +++ 0024-net-mlx5-fix-meter-profile-delete-after-disable.patch 2022-11-11 12:35:04.765192018 +0100 @@ -1 +1 @@ -From 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 Mon Sep 17 00:00:00 2001 +From b77ca4fb51acaca866310d227eadb423f5b89faf 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 e51a85b477..f38dd2c357 100644 @@ -25 +26 @@ -@@ -1656,7 +1656,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, +@@ -935,7 +935,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, +@@ -945,6 +945,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, @@ -36 +37 @@ - " parameters in hardware."); + " parmeters in hardware.");