net/ixgbe: fix VLAN mask TCI in flow rule parser
authorWei Zhao <wei.zhao1@intel.com>
Fri, 10 Feb 2017 01:37:58 +0000 (09:37 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 10 Feb 2017 11:25:50 +0000 (12:25 +0100)
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>
drivers/net/ixgbe/ixgbe_flow.c

index 7747831..546c592 100644 (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. */
 
                /**