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 6F80542800 for ; Wed, 22 Mar 2023 01:42:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6AF7D40F18; Wed, 22 Mar 2023 01:42:36 +0100 (CET) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mails.dpdk.org (Postfix) with ESMTP id 2CD1140F18 for ; Wed, 22 Mar 2023 01:42:34 +0100 (CET) Received: by mail-wm1-f45.google.com with SMTP id o40-20020a05600c512800b003eddedc47aeso4984334wms.3 for ; Tue, 21 Mar 2023 17:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679445754; 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=JR1sodEfOtzeGgrB7d1UhQDpVuQVFAKnX/c2SzfQPio=; b=OqRn3kRHQOEl45AW5hrW9E1+TKrxbeB/toRttNYRjSq5GGPN2b9pmliXvuiMa2p/TD b7I+iFim1j6hCJfu1J8my2Z0fdRPSPfIf3fqfVpzE1qDBWrTEyk852X08Y7QhVF+1hNQ m0YquZ+p1N6j0QpTxUQqsguitSL+JXM8ygIi0sa/HvYMFG3FlFoxjjB1hJuHVFqQPMV1 Fa3SF1dyB9gLxnTs7OCmeZlMDKHVlDVaXgOIS46loXsb9hZhQnXz94Ixrtkk4oD8Rd9n goecoaNmaLwR0ZACEMc5WZJzneHbfaG0wu5Bh9J+jG3t2xeX3uQkEBUaYCKSm3n18VFt k0nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679445754; 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=JR1sodEfOtzeGgrB7d1UhQDpVuQVFAKnX/c2SzfQPio=; b=W0xK1eTJF8G8Uo0jT5exllG2ZLX71vw1NMrlPLvltCkW3GJfeZiC5DrsBATAZhniZ0 sh9H5bhMxiMhXJKpoCjmAOS7EsP0rwHpnUu7yLtOVdGFry8z4a/3qz88tQiFiG2UUUJM 3bQ8wI1rAxCj8NQVH8VIFxtZJPgBiYi0i+uDw36k6JtXnKLCunqFyouHJTjZHDDDS+0y 07cUtogST+w4xh8Z/2xq89aBJaYu6Xk3ql9w82jDzGXJDgNKwBMJ+SeiUhJyeOlEDFDU m1BBHViHqMrIApEomMMIQ2UBxd6D/3tRtFcWPeT7u5/ZWW3ewr2R5Zm2snPCkVpPDBnx g9Aw== X-Gm-Message-State: AO0yUKXuMtw1vf4fJKtj/coY1KhDV4rbmeB8+1IXlbiOwhGmdKUFgSUY jshKbMNaSmplILGbdA/KBvHPlxFCZpg= X-Google-Smtp-Source: AK7set/gIVZa8qK/mqEx8iPnQpXSkhDRy+FO78hS87wMdhTahmH0AQqV9AqdxA0fTkQOUOaFu5Kl6w== X-Received: by 2002:a05:600c:378a:b0:3ed:4b0f:5378 with SMTP id o10-20020a05600c378a00b003ed4b0f5378mr4007393wmr.27.1679445753817; Tue, 21 Mar 2023 17:42:33 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id m20-20020a05600c3b1400b003dc434b39c7sm298217wms.0.2023.03.21.17.42.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 17:42:33 -0700 (PDT) From: luca.boccassi@gmail.com To: Bing Zhao Cc: Matan Azrad , Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix hairpin Tx queue reference count' has been queued to stable release 20.11.8 Date: Wed, 22 Mar 2023 00:41:51 +0000 Message-Id: <20230322004155.2333903-15-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322004155.2333903-1-luca.boccassi@gmail.com> References: <20230315224631.1025649-39-luca.boccassi@gmail.com> <20230322004155.2333903-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 03/23/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/d865e79f75b78496901fd4cd62126a348c25cb38 Thanks. Luca Boccassi --- >From d865e79f75b78496901fd4cd62126a348c25cb38 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Tue, 7 Mar 2023 12:31:08 +0200 Subject: [PATCH] net/mlx5: fix hairpin Tx queue reference count [ upstream commit 9284987a85b07e168b165fc258523a3a4fde58e2 ] When calling the haipin unbind interface, all the hairpin Tx queues of the port will be unbound from the peer Rx queues. If one of the Tx queue is working in the auto bind mode, the interface will return directly. Only when the Tx and peer Rx ports are the same, the auto bind mode is supported. In this condition branch, the Tx queue release is missed and the reference count is not decreased. Then in the port stop stage, the hardware resources of this Tx queue won't be freed. There would be some assertion or failure when starting the port again. With this commit, the reference count will be operated correctly. Fixes: 37cd4501e873 ("net/mlx5: support two ports hairpin mode") Signed-off-by: Bing Zhao Acked-by: Matan Azrad Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 3440947f3e..93181d6c93 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -871,11 +871,11 @@ mlx5_hairpin_unbind_single_port(struct rte_eth_dev *dev, uint16_t rx_port) } /* Indeed, only the first used queue needs to be checked. */ if (txq_ctrl->hairpin_conf.manual_bind == 0) { + mlx5_txq_release(dev, i); if (cur_port != rx_port) { rte_errno = EINVAL; DRV_LOG(ERR, "port %u and port %u are in" " auto-bind mode", cur_port, rx_port); - mlx5_txq_release(dev, i); return -rte_errno; } else { return 0; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-21 21:56:37.652897966 +0000 +++ 0015-net-mlx5-fix-hairpin-Tx-queue-reference-count.patch 2023-03-21 21:56:37.084807300 +0000 @@ -1 +1 @@ -From 9284987a85b07e168b165fc258523a3a4fde58e2 Mon Sep 17 00:00:00 2001 +From d865e79f75b78496901fd4cd62126a348c25cb38 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9284987a85b07e168b165fc258523a3a4fde58e2 ] + @@ -21 +22,0 @@ -Cc: stable@dpdk.org @@ -31 +32 @@ -index 3457bf65d3..bbaa7d2aa0 100644 +index 3440947f3e..93181d6c93 100644 @@ -34 +35 @@ -@@ -896,11 +896,11 @@ mlx5_hairpin_unbind_single_port(struct rte_eth_dev *dev, uint16_t rx_port) +@@ -871,11 +871,11 @@ mlx5_hairpin_unbind_single_port(struct rte_eth_dev *dev, uint16_t rx_port)