From patchwork Fri Feb 3 08:42:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 20144 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id D8FB76CB4; Fri, 3 Feb 2017 09:47:46 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 8E5AB6CB4 for ; Fri, 3 Feb 2017 09:47:44 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 03 Feb 2017 00:47:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,328,1477983600"; d="scan'208";a="816586625" Received: from dpdk1.bj.intel.com ([172.16.182.84]) by FMSMGA003.fm.intel.com with ESMTP; 03 Feb 2017 00:47:36 -0800 From: Wei Zhao To: dev@dpdk.org Cc: zhao wei , Wei Zhao Date: Fri, 3 Feb 2017 16:42:07 +0800 Message-Id: <1486111327-32426-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dpdk-dev] [PATCH] net/ixgbe: add tci mask check in fdir pasrer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: zhao wei Add more check on the tci mask of vlan and vxlan parser in fdir filter rule pattern parser.If do not add such check, it maybe cause error in fdir configuration set check. Fixes: 11777435c727 ("net/ixgbe: parse flow director filter") Signed-off-by: Wei Zhao --- drivers/net/ixgbe/ixgbe_flow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 82aceed..d64cfd1 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -1400,7 +1400,7 @@ ixgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr, * ETH dst_addr {0xAC, 0x7B, 0xA1, {0xFF, 0xFF, 0xFF, 0x2C, 0x6D, 0x36} 0xFF, 0xFF, 0xFF} - * MAC VLAN tci 0x2016 0xFFFF + * MAC VLAN tci 0x2016 0xEFFF * tpid 0x8100 0xFFFF * END * Other members in mask and spec should set to 0x00. @@ -1617,6 +1617,7 @@ ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr, return -rte_errno; } rule->mask.vlan_tci_mask = vlan_mask->tci; + rule->mask.vlan_tci_mask &= 0xEFFF; /* More than one tags are not supported. */ /** @@ -2360,6 +2361,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, return -rte_errno; } rule->mask.vlan_tci_mask = vlan_mask->tci; + rule->mask.vlan_tci_mask &= 0xEFFF; /* More than one tags are not supported. */ /**