From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 35A9A1B4B7 for ; Thu, 29 Nov 2018 14:21:49 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 955CE3005163; Thu, 29 Nov 2018 13:21:48 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 58AAF1001F50; Thu, 29 Nov 2018 13:21:47 +0000 (UTC) From: Kevin Traynor To: Rahul Lakkireddy Cc: dpdk stable Date: Thu, 29 Nov 2018 13:20:08 +0000 Message-Id: <20181129132128.7609-8-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 29 Nov 2018 13:21:48 +0000 (UTC) Subject: [dpdk-stable] patch 'net/cxgbe: fix check for redefined match items' has been queued to stable release 18.08.1 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: , X-List-Received-Date: Thu, 29 Nov 2018 13:21:49 -0000 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 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 --- 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 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@dpdk.org Signed-off-by: Rahul Lakkireddy --- @@ -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 @@