net/ixgbe: fix tci mask check in fdir pasrer
PATCH 1/1 net/ixgbe: fix tci mask check in fdir pasrer
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 <[email protected]>
--- drivers/net/ixgbe/ixgbe_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ixgbe/ixgbe_flow.c +2 -2
@@ -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. */ /**
Signature · 1 line
2.5.5
Ferruh Yigit
AppliedQuoted 9 lines · Wei Zhao
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 checkin fdir parser")
Signed-off-by Wei Zhao <[email protected]>
net/ixgbe: fix VLAN mask TCI in flow rule parser
Fixes 11777435c727 ("net/ixgbe: parse flow director filter")
Fixes c7753a7e6968 ("net/ixgbe: add tci mask check in fdir parser")
Applied to dpdk-next-net/master, thanks.