From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 2FAEE1B173 for ; Wed, 24 Jan 2018 16:39:19 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6B910226BA; Wed, 24 Jan 2018 10:39:19 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:39:19 -0500 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=fm1; bh=iOnzFD61ro3PK81hk QxdrU9MySmFlXwey0FSFiBBtEU=; b=V0lpbe4bCeW9HIqkJ6CuQjwm04Cyjbi9l Qi8bHjoyIunoR2nsng59Amsb1Pq1g3e/787j2xQJ7lY1YHEStfrEMaUx22EYXIWG Vwc9TFTroTB5JhPZjrzzjhdJrzlgyWSxgjm8kQHveTU66AFSyN2YmJIfP5HQMUtR gcCHc3Ng6mFp1ECWlOfNh/wMce56ykXthkNLcHMbXefEMMOqs+HBbVcAiDAeRtqP tx0oEr+c5QPKJZU4T1H+EyjWj8ljP8Ag8MXyEBgak5/jF/zhuR9T8D9IvkvuRP+u F+kFrq99vNPGejKdewS9HRtCkrMUA0IawYU8xxkPsrm3PChwbbGNw== 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= fm1; bh=iOnzFD61ro3PK81hkQxdrU9MySmFlXwey0FSFiBBtEU=; b=Os/s8gVx nqf2tTbPGNqe4WAWMbQ90rxEGgG3Kq7usfifO+h9SVwnYaB3WSzNDkE8SO43yS1C gVWKHi/b1JDqO9MYLwylPfjJ2snnRULeSTQT6B9s4EbCZhOK/5/a+ZS0v+6KhsWz JZKAuuJw4yOs5CKqpXO56k2Xv/Ga4+lN6U/d4rP0BsPOt4eJJTHe9Zfcq3qQbwVg XQtd03ZnquuAepWrmVZZmvuga7yNEg4PQZOPIbZpaTJb8aFCXxnRGSlIJyXopQFN 4cuiZdarsSpfHVFykzMiy6arDEEru23w4JPXr9mTXCEqI6XRvB8QEqhNIqhz/2Sr mGXesN6uoGGWwA== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id E32277E43A; Wed, 24 Jan 2018 10:39:16 -0500 (EST) From: Yuanhan Liu To: Wei Zhao Cc: Qi Zhang , Wenzhuo Lu , dpdk stable Date: Wed, 24 Jan 2018 23:32:24 +0800 Message-Id: <1516808026-25523-76-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/ixgbe: fix parsing FDIR NVGRE issue' has been queued to LTS release 17.11.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: Wed, 24 Jan 2018 15:39:20 -0000 Hi, FYI, your patch has been queued to LTS release 17.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 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 295d54a58d5854413f20926593a0c551a76fce60 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Fri, 22 Dec 2017 13:45:59 +0800 Subject: [PATCH] net/ixgbe: fix parsing FDIR NVGRE issue [ upstream commit cdcd6b686ef1a759b730afb1e2ebbf878f7a8953 ] This patch fixes the issue of mask check in NVGRE parser for flow API. Fixes: 11777435c727 ("net/ixgbe: parse flow director filter") Signed-off-by: Wei Zhao Acked-by: Qi Zhang Acked-by: Wenzhuo Lu --- drivers/net/ixgbe/ixgbe_flow.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 19c2d47..07abb34 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -2466,8 +2466,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, item, "Not supported by fdir filter"); return -rte_errno; } - if (nvgre_mask->c_k_s_rsvd0_ver != - rte_cpu_to_be_16(0x3000) || + if (nvgre_mask->protocol && nvgre_mask->protocol != 0xFFFF) { memset(rule, 0, sizeof(struct ixgbe_fdir_rule)); rte_flow_error_set(error, EINVAL, @@ -2475,6 +2474,15 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, item, "Not supported by fdir filter"); return -rte_errno; } + if (nvgre_mask->c_k_s_rsvd0_ver && + nvgre_mask->c_k_s_rsvd0_ver != + rte_cpu_to_be_16(0xFFFF)) { + memset(rule, 0, sizeof(struct ixgbe_fdir_rule)); + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ITEM, + item, "Not supported by fdir filter"); + return -rte_errno; + } /* TNI must be totally masked or not. */ if (nvgre_mask->tni[0] && ((nvgre_mask->tni[0] != 0xFF) || @@ -2496,7 +2504,15 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, nvgre_spec = (const struct rte_flow_item_nvgre *)item->spec; if (nvgre_spec->c_k_s_rsvd0_ver != - rte_cpu_to_be_16(0x2000) || + rte_cpu_to_be_16(0x2000) && + nvgre_mask->c_k_s_rsvd0_ver) { + memset(rule, 0, sizeof(struct ixgbe_fdir_rule)); + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ITEM, + item, "Not supported by fdir filter"); + return -rte_errno; + } + if (nvgre_mask->protocol && nvgre_spec->protocol != rte_cpu_to_be_16(NVGRE_PROTOCOL)) { memset(rule, 0, sizeof(struct ixgbe_fdir_rule)); -- 2.7.4