[dpdk-stable] patch 'net/cxgbe: fix check for redefined match items' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Thu Nov 29 14:20:08 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.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 12/08/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 5612f0c10f8ed8319e823e46b1321fc732ec0560 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
Date: Fri, 9 Nov 2018 13:26:25 +0530
Subject: [PATCH] net/cxgbe: fix check for redefined match items

[ upstream commit 15fb77f62cc819b998b191d885d3b15091a40bad ]

Fix issue where ethertype is set to 0x800 for IPv4 by ether match
item and IPv4 match item also inherently sets ethertype to 0x800.

Current logic returns error when IPv4 match item is parsed. So, fix
by only bailing if the redefined match items have different values.

Fixes: ee61f5113b17 ("net/cxgbe: parse and validate flows")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
---
 drivers/net/cxgbe/cxgbe_flow.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 038d479d6..9b3222147 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -8,12 +8,10 @@
 #define __CXGBE_FILL_FS(__v, __m, fs, elem, e) \
 do { \
-	if (!((fs)->val.elem || (fs)->mask.elem)) { \
-		(fs)->val.elem = (__v); \
-		(fs)->mask.elem = (__m); \
-	} else { \
+	if ((fs)->mask.elem && ((fs)->val.elem != (__v))) \
 		return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, \
-					  NULL, "a filter can be specified" \
-					  " only once"); \
-	} \
+					  NULL, "Redefined match item with" \
+					  " different values found"); \
+	(fs)->val.elem = (__v); \
+	(fs)->mask.elem = (__m); \
 } while (0)
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 13:11:35.228539655 +0000
+++ 0007-net-cxgbe-fix-check-for-redefined-match-items.patch	2018-11-29 13:11:34.000000000 +0000
@@ -1,8 +1,10 @@
-From 15fb77f62cc819b998b191d885d3b15091a40bad Mon Sep 17 00:00:00 2001
+From 5612f0c10f8ed8319e823e46b1321fc732ec0560 Mon Sep 17 00:00:00 2001
 From: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
 Date: Fri, 9 Nov 2018 13:26:25 +0530
 Subject: [PATCH] net/cxgbe: fix check for redefined match items
 
+[ upstream commit 15fb77f62cc819b998b191d885d3b15091a40bad ]
+
 Fix issue where ethertype is set to 0x800 for IPv4 by ether match
 item and IPv4 match item also inherently sets ethertype to 0x800.
 
@@ -10,7 +12,6 @@
 by only bailing if the redefined match items have different values.
 
 Fixes: ee61f5113b17 ("net/cxgbe: parse and validate flows")
-Cc: stable at dpdk.org
 
 Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
 ---
@@ -18,7 +19,7 @@
  1 file changed, 5 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
-index 54ec7e595..a8f076e6c 100644
+index 038d479d6..9b3222147 100644
 --- a/drivers/net/cxgbe/cxgbe_flow.c
 +++ b/drivers/net/cxgbe/cxgbe_flow.c
 @@ -8,12 +8,10 @@


More information about the stable mailing list