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 <wei.zhao1@intel.com>
This commit is contained in:
Wei Zhao 2017-02-10 09:37:58 +08:00 committed by Ferruh Yigit
parent 26dda4604f
commit 37192bf2b4

View File

@ -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. */
/**