From patchwork Fri Feb 3 08:43:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 20145 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 5308F2C08; Fri, 3 Feb 2017 09:49:41 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id EB2AD2BF5 for ; Fri, 3 Feb 2017 09:49:39 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 03 Feb 2017 00:49:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,328,1477983600"; d="scan'208";a="929715098" Received: from dpdk1.bj.intel.com ([172.16.182.84]) by orsmga003.jf.intel.com with ESMTP; 03 Feb 2017 00:49:26 -0800 From: Wei Zhao To: dev@dpdk.org Cc: Wei Zhao Date: Fri, 3 Feb 2017 16:43:57 +0800 Message-Id: <1486111437-32778-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" 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. */ /**