From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5509DA0545; Fri, 13 Nov 2020 08:05:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 141785AB7; Fri, 13 Nov 2020 08:05:42 +0100 (CET) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id CCF5156A3 for ; Fri, 13 Nov 2020 08:05:39 +0100 (CET) From: Bing Zhao To: viacheslavo@nvidia.com, matan@nvidia.com Cc: dev@dpdk.org, orika@nvidia.com, rasland@nvidia.com Date: Fri, 13 Nov 2020 15:05:33 +0800 Message-Id: <1605251133-325948-1-git-send-email-bingz@nvidia.com> X-Mailer: git-send-email 2.5.5 Subject: [dpdk-dev] [PATCH] net/mlx5: fix wrong function of hairpin unbind X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In the implementation of mlx5_hairpin_unbind, a copy-paste error was inside. If a single peer Rx port needed to be unbound, it would be bound again by mistake. All the hardware resources were released when stopping the device and no mess of the configuration was introduced. But when trying to unbind the ports again, the issue would appear. The typo of the function call is fixed. If there is no hairpin queue bound between two ports, the unbinding process should be considered successful. Fixes: 37cd4501e873 ("net/mlx5: support two ports hairpin mode") Signed-off-by: Bing Zhao 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 46e4191..bd02915 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -934,7 +934,7 @@ return ret; } else - ret = mlx5_hairpin_bind_single_port(dev, rx_port); + ret = mlx5_hairpin_unbind_single_port(dev, rx_port); return ret; } -- 1.8.3.1