From: Wei Zhao Date: Fri, 10 Feb 2017 01:37:58 +0000 (+0800) Subject: net/ixgbe: fix VLAN mask TCI in flow rule parser X-Git-Tag: spdx-start~4515 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=37192bf2b4f9cd7968062fe9248f074f5176433c;p=dpdk.git net/ixgbe: fix VLAN mask TCI in flow rule parser Use vlan_mask->tci as big endian since this is how rte flow defines it. Fixes: 11777435c727 ("net/ixgbe: parse flow director filter") Fixes: 37ed39b4e67d ("net/ixgbe: add TCI mask check for flow director") Signed-off-by: Wei Zhao --- diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 7747831b9f..546c592929 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -1617,7 +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; + rule->mask.vlan_tci_mask &= rte_cpu_to_be_16(0xEFFF); /* More than one tags are not supported. */ /** @@ -2362,7 +2362,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; + rule->mask.vlan_tci_mask &= rte_cpu_to_be_16(0xEFFF); /* More than one tags are not supported. */ /**