It must use big endian when check on the tci mask of vlan
and vxlan parser in fdir filter rule pattern parser.Because
rte layer send out tci mask using big endian mode.

Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")
Fixes: cc83320af286 ("net/ixgbe: add tci mask check
in fdir parser")

Signed-off-by: Wei Zhao <wei.zh...@intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index d64cfd1..5a634d3 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. */
 
                /**
@@ -2361,7 +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;
+               rule->mask.vlan_tci_mask &= rte_cpu_to_be_16(0xEFFF);
                /* More than one tags are not supported. */
 
                /**
-- 
2.5.5

Reply via email to