DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix tci mask check in fdir pasrer
@ 2017-02-10  1:37 Wei Zhao
  2017-02-10 11:25 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Zhao @ 2017-02-10  1:37 UTC (permalink / raw)
  To: dev; +Cc: 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")

Signed-off-by: Wei Zhao <wei.zhao1@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-10 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-10  1:37 [dpdk-dev] [PATCH] net/ixgbe: fix tci mask check in fdir pasrer Wei Zhao
2017-02-10 11:25 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).