Skip to contentSkip to conversation

net/ixgbe: fix parsing fdir vxlan issue

PATCH Applied Wei Zhao 3 participants 3 messages Feb 3, 2017 – Feb 14, 2017 Network drivers

lore
Share & tools
lore

Wei Zhao

author
#0 lore raw

PATCH 1/1 net/ixgbe: fix parsing fdir vxlan issue

VNI of VXLAN is parsed wrongly. The root cause is that array vni in item VXLAN also uses network byte ordering.

Fixes 11777435c727 ("net/ixgbe: parse flow director filter")
---
 drivers/net/ixgbe/ixgbe_flow.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/ixgbe/ixgbe_flow.c +4 -3
index 82aceed..ce96880 100644
@@ -2132,15 +2132,16 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 
 		rte_memcpy(&rule->mask.tunnel_id_mask, vxlan_mask->vni,
 			RTE_DIM(vxlan_mask->vni));
-		rule->mask.tunnel_id_mask <<= 8;
 
 		if (item->spec) {
 			rule->b_spec = TRUE;
 			vxlan_spec = (const struct rte_flow_item_vxlan *)
 					item->spec;
-			rte_memcpy(&rule->ixgbe_fdir.formatted.tni_vni,
+			rte_memcpy(((uint8_t *)
+				&rule->ixgbe_fdir.formatted.tni_vni + 1),
 				vxlan_spec->vni, RTE_DIM(vxlan_spec->vni));
-			rule->ixgbe_fdir.formatted.tni_vni <<= 8;
+			rule->ixgbe_fdir.formatted.tni_vni = rte_be_to_cpu_32(
+				rule->ixgbe_fdir.formatted.tni_vni);
 		}
 	}
 
Signature · 1 line
2.5.5
Applied
#1 lore raw
Quoted 6 lines · Wei Zhao

VNI of VXLAN is parsed wrongly. The root cause is that array vni in item VXLAN also uses network byte ordering.

Fixes 11777435c727 ("net/ixgbe: parse flow director filter")

Applied to dpdk-next-net/master, thanks.

#2 lore raw
Quoted 9 lines · Ferruh Yigit
Quoted 6 lines · Wei Zhao

VNI of VXLAN is parsed wrongly. The root cause is that array vni in item VXLAN also uses network byte ordering.

Fixes 11777435c727 ("net/ixgbe: parse flow director filter")

It fixed an issue introduced in this release, thus it's not a candidate for a stable release. Dropped.

	--yliu
Quoted 2 lines

Applied to dpdk-next-net/master, thanks.