Skip to contentSkip to conversation

net/ixgbe: fix tci mask check in fdir pasrer

PATCH Applied Wei Zhao 2 participants 2 messages Feb 10, 2017 Network drivers

lore
Share & tools
lore

Wei Zhao

author
#0 lore raw

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")

---
 drivers/net/ixgbe/ixgbe_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ixgbe/ixgbe_flow.c +2 -2
index d64cfd1..5a634d3 100644
@@ -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
Applied
#1 lore raw
Quoted 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 check

in fdir parser")

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.