From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 40397A0096 for ; Wed, 10 Apr 2019 18:46:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2EF3A1B136; Wed, 10 Apr 2019 18:46:08 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 739C91B105 for ; Wed, 10 Apr 2019 18:46:06 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD4863082E4D; Wed, 10 Apr 2019 16:46:05 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-94.ams2.redhat.com [10.36.117.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id B26D75D961; Wed, 10 Apr 2019 16:46:04 +0000 (UTC) From: Kevin Traynor To: Viacheslav Ovsiienko Cc: Shahaf Shuler , dpdk stable Date: Wed, 10 Apr 2019 17:44:09 +0100 Message-Id: <20190410164411.10546-61-ktraynor@redhat.com> In-Reply-To: <20190410164411.10546-1-ktraynor@redhat.com> References: <20190410164411.10546-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 10 Apr 2019 16:46:05 +0000 (UTC) Subject: [dpdk-stable] patch 'net/mlx5: fix flow priorities probing error path' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/16/19. 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. Thanks. Kevin Traynor --- >From dc25766efa7158d4e0611821f5a4ae9dc7646d18 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Thu, 21 Feb 2019 09:02:16 +0000 Subject: [PATCH] net/mlx5: fix flow priorities probing error path [ upstream commit 4fb27c1dfe054972bec62fdeb6fc91680ccb3f3c ] The mlx5 PMD probes the Verbs flow priorities supported with ibv_create_flow() function. If rdma-core or kernel fails for some reason, the returned error causes the drop queue is not destroyed, and pd is locked by not freed resource. Also the mlx5_flow_discover_priorities() returned negative value as error, and this code was reported "as is", without sign changing (eventually causing assert(err > 0)). Fixes: 2815702baea7 ("net/mlx5: replace verbs priorities by flow") Signed-off-by: Viacheslav Ovsiienko Acked-by: Shahaf Shuler --- drivers/net/mlx5/mlx5.c | 4 +++- drivers/net/mlx5/mlx5_flow.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 40b32492b..80a27da89 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1234,6 +1234,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, /* Supported Verbs flow priority number detection. */ err = mlx5_flow_discover_priorities(eth_dev); - if (err < 0) + if (err < 0) { + err = -err; goto error; + } priv->config.flow_prio = err; /* diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 39ef2524c..5bf7d7ba4 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -351,4 +351,5 @@ mlx5_flow_discover_priorities(struct rte_eth_dev *dev) priority = vprio[i]; } + mlx5_hrxq_drop_release(dev); switch (priority) { case 8: @@ -362,8 +363,7 @@ mlx5_flow_discover_priorities(struct rte_eth_dev *dev) DRV_LOG(ERR, "port %u verbs maximum priority: %d expected 8/16", - dev->data->port_id, vprio[i]); + dev->data->port_id, priority); return -rte_errno; } - mlx5_hrxq_drop_release(dev); DRV_LOG(INFO, "port %u flow maximum priority: %d", dev->data->port_id, priority); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-04-10 14:06:12.546553703 +0100 +++ 0061-net-mlx5-fix-flow-priorities-probing-error-path.patch 2019-04-10 14:06:08.028290489 +0100 @@ -1,8 +1,10 @@ -From 4fb27c1dfe054972bec62fdeb6fc91680ccb3f3c Mon Sep 17 00:00:00 2001 +From dc25766efa7158d4e0611821f5a4ae9dc7646d18 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Thu, 21 Feb 2019 09:02:16 +0000 Subject: [PATCH] net/mlx5: fix flow priorities probing error path +[ upstream commit 4fb27c1dfe054972bec62fdeb6fc91680ccb3f3c ] + The mlx5 PMD probes the Verbs flow priorities supported with ibv_create_flow() function. If rdma-core or kernel fails for some reason, the returned error causes the drop queue is not @@ -13,7 +15,6 @@ changing (eventually causing assert(err > 0)). Fixes: 2815702baea7 ("net/mlx5: replace verbs priorities by flow") -Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko Acked-by: Shahaf Shuler @@ -23,10 +24,10 @@ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c -index 9706e351a..740c5e273 100644 +index 40b32492b..80a27da89 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c -@@ -1244,6 +1244,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, +@@ -1234,6 +1234,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, /* Supported Verbs flow priority number detection. */ err = mlx5_flow_discover_priorities(eth_dev); - if (err < 0) @@ -37,7 +38,7 @@ priv->config.flow_prio = err; /* diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c -index 9314e3a86..dea38e260 100644 +index 39ef2524c..5bf7d7ba4 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -351,4 +351,5 @@ mlx5_flow_discover_priorities(struct rte_eth_dev *dev)