From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 07FA92A6C for ; Sun, 6 May 2018 08:38:15 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A909F21AF0; Sun, 6 May 2018 02:38:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 06 May 2018 02:38:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=jLAl6gTOVEy3kxU2m X6Vy6Mb8Z0vgRBPBcsS2ruml8I=; b=Nr6Wq6Dcop7sjyIfPr49pmEWZxzr0qlY7 ybqbY5Z0ZVe7Zx1SvbnpSOeW4x+QYnOo1DXILiKXmNgdjhNEU1abcK+jK55nd5rQ 1HXsXWG7MmoeDZCY0hwtTvMbYb4CtJaxIXweWCcfVclvtrzmuSxIcFJKq6IEhC/F oAcb/9HigboVLqsDcmPpNSnBH8pzZxseqG21lEcN5/r3Q6MyKhA+KxQh9g6Tcwh5 VCfftWaAED8UQvUQMKm+nAL5fPKTbz8+b5jrTimukZfVRl93B3HY7C6zMrS+jo5O bhs5QrXnZFeesN4st+RlBgosfzG00UK1WiyKGt1KwHoHx3wu9n7VQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=jLAl6gTOVEy3kxU2mX6Vy6Mb8Z0vgRBPBcsS2ruml8I=; b=XLQ6pR6C 2g69Zl59vFaQTv9UkKfKbd3S+arhl1UAlfSRoJSkKjexh5Sh12m4kXS3ViN2wAkz BbjiPrXEqTChBdLOeNj9Z7rJKGjYpQm4wJ1aRvQzwcqaUlSOjnUklvugfIcIqkv2 Zd3ImWXjqDiSxtZAgjpQQmuyZyoWJJFHQhzRd7rvXTpWuo2fIGksBp4c5f9VwDhe l9HFr0dK/EBidacZA5mbkB0+bvtnPeH0nl6bFyOmYLrudq2mUX7WifhpWt/yK9Rn Rt4yfAE2gVn8Uxs10GULeJkCfcnZ2d03tEP7ooQtWHwz59kcOp3i+PXvPTUARWA9 jiJ8UcRDFhKcpw== X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.102]) by mail.messagingengine.com (Postfix) with ESMTPA id 9074810253; Sun, 6 May 2018 02:38:12 -0400 (EDT) From: Yuanhan Liu To: Andrew Rybchenko Cc: Andy Moreton , Roman Zhukov , dpdk stable Date: Sun, 6 May 2018 14:36:39 +0800 Message-Id: <20180506063639.23196-26-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180506063639.23196-1-yliu@fridaylinux.org> References: <20180506063639.23196-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/sfc: ignore spec bits not covered by mask' has been queued to LTS release 17.11.3 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: Sun, 06 May 2018 06:38:15 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.3 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/09/18. So please shout if anyone has objections. Thanks. --yliu --- >>From c3ec08aed095f45c21ebd4cb6d9d920d57e0ccdf Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko 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 Reviewed-by: Andy Moreton Reviewed-by: Roman Zhukov --- 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 e770b98e8..fddc6706b 100644 --- a/drivers/net/sfc/sfc_flow.c +++ b/drivers/net/sfc/sfc_flow.c @@ -107,7 +107,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; @@ -168,12 +167,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.11.0