[dpdk-stable] patch 'net/sfc: ignore spec bits not covered by mask' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Apr 30 16:53:59 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.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 05/02/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 7598c6bf9d84398a13a44cf6095e6bdbd01cd7b7 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko at solarflare.com>
Date: Wed, 25 Apr 2018 18:18:34 +0100
Subject: [PATCH] net/sfc: ignore spec bits not covered by mask

[ upstream commit c43e0f690413fc7233b735e641f22e8eb47c50c0 ]

mask is a simple bit-mask applied before interpreting the contents
of spec and last.

Fixes: a9825ccf5bb8 ("net/sfc: support flow API filters")

Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
Reviewed-by: Andy Moreton <amoreton at solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov at oktetlabs.ru>
---
 drivers/net/sfc/sfc_flow.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 93cdf8f4c..58adcbca3 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -85,7 +85,6 @@ sfc_flow_parse_init(const struct rte_flow_item *item,
 	const uint8_t *spec;
 	const uint8_t *mask;
 	const uint8_t *last;
-	uint8_t match;
 	uint8_t supp;
 	unsigned int i;
 
@@ -146,12 +145,11 @@ sfc_flow_parse_init(const struct rte_flow_item *item,
 		return -rte_errno;
 	}
 
-	/* Check that mask and spec not asks for more match than supp_mask */
+	/* Check that mask does not ask for more match than supp_mask */
 	for (i = 0; i < size; i++) {
-		match = spec[i] | mask[i];
 		supp = ((const uint8_t *)supp_mask)[i];
 
-		if ((match | supp) != supp) {
+		if (~supp & mask[i]) {
 			rte_flow_error_set(error, ENOTSUP,
 					   RTE_FLOW_ERROR_TYPE_ITEM, item,
 					   "Item's field is not supported");
-- 
2.14.2



More information about the stable mailing list