[dpdk-stable] patch 'net/bnxt: fix flow creation' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:21:16 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. 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.

Luca Boccassi

---
>From 7303a6f5ab19523204d055ae34ce32c623189401 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Thu, 16 Jan 2020 18:34:46 +0530
Subject: [PATCH] net/bnxt: fix flow creation

[ upstream commit 9356d01d5fca23ce0f6617b1aab5e74da862808b ]

If flow create fails due to not enough filter resources,
driver does not populate the rte_flow_error using
rte_flow_error_set().

Since "rte_errno" could have garbage value and is not reliable,
it could cause a segfault in the stack in port_flow_complain().

Fix it to set rte_flow_error using rte_flow_error_set()
when flow create fails due to not enough filter resources.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index c694367300..c11c0c969d 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1673,7 +1673,9 @@ bnxt_flow_create(struct rte_eth_dev *dev,
 
 	filter = bnxt_get_unused_filter(bp);
 	if (filter == NULL) {
-		PMD_DRV_LOG(ERR, "Not enough resources for a new flow.\n");
+		rte_flow_error_set(error, ENOSPC,
+				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+				   "Not enough resources for a new flow");
 		goto free_flow;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:43.227512249 +0000
+++ 0130-net-bnxt-fix-flow-creation.patch	2020-02-11 11:17:38.624005536 +0000
@@ -1,8 +1,10 @@
-From 9356d01d5fca23ce0f6617b1aab5e74da862808b Mon Sep 17 00:00:00 2001
+From 7303a6f5ab19523204d055ae34ce32c623189401 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Date: Thu, 16 Jan 2020 18:34:46 +0530
 Subject: [PATCH] net/bnxt: fix flow creation
 
+[ upstream commit 9356d01d5fca23ce0f6617b1aab5e74da862808b ]
+
 If flow create fails due to not enough filter resources,
 driver does not populate the rte_flow_error using
 rte_flow_error_set().
@@ -14,7 +16,6 @@
 when flow create fails due to not enough filter resources.
 
 Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
-Cc: stable at dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
@@ -23,10 +24,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index cde1fa41c4..5564c53637 100644
+index c694367300..c11c0c969d 100644
 --- a/drivers/net/bnxt/bnxt_flow.c
 +++ b/drivers/net/bnxt/bnxt_flow.c
-@@ -1702,7 +1702,9 @@ bnxt_flow_create(struct rte_eth_dev *dev,
+@@ -1673,7 +1673,9 @@ bnxt_flow_create(struct rte_eth_dev *dev,
  
  	filter = bnxt_get_unused_filter(bp);
  	if (filter == NULL) {


More information about the stable mailing list