DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix parsing fdir vxlan issue
@ 2017-02-03  8:44 Wei Zhao
  2017-02-03 22:53 ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Zhao @ 2017-02-03  8:44 UTC (permalink / raw)
  To: dev; +Cc: 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")

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

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 82aceed..ce96880 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -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);
 		}
 	}
 
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH] net/ixgbe: fix parsing fdir vxlan issue
  2017-02-03  8:44 [dpdk-dev] [PATCH] net/ixgbe: fix parsing fdir vxlan issue Wei Zhao
@ 2017-02-03 22:53 ` Ferruh Yigit
  2017-02-14  7:32   ` Yuanhan Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2017-02-03 22:53 UTC (permalink / raw)
  To: Wei Zhao, dev

On 2/3/2017 8:44 AM, Wei Zhao wrote:
> 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")
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

Cc: stable@dpdk.org

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

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

* Re: [dpdk-dev] [PATCH] net/ixgbe: fix parsing fdir vxlan issue
  2017-02-03 22:53 ` Ferruh Yigit
@ 2017-02-14  7:32   ` Yuanhan Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Yuanhan Liu @ 2017-02-14  7:32 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Wei Zhao, dev

On Fri, Feb 03, 2017 at 10:53:29PM +0000, Ferruh Yigit wrote:
> On 2/3/2017 8:44 AM, Wei Zhao wrote:
> > 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")
> > 
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> 
> Cc: stable@dpdk.org

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

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

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

* [dpdk-dev] [PATCH] net/ixgbe: fix parsing fdir vxlan issue
@ 2017-02-03  8:41 Wei Zhao
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Zhao @ 2017-02-03  8:41 UTC (permalink / raw)
  To: dev; +Cc: zhao wei, Wei Zhao

From: zhao wei <wei.zhao1@gmail.com>

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

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

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 82aceed..ce96880 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -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);
 		}
 	}
 
-- 
2.5.5

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

end of thread, other threads:[~2017-02-14  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-03  8:44 [dpdk-dev] [PATCH] net/ixgbe: fix parsing fdir vxlan issue Wei Zhao
2017-02-03 22:53 ` Ferruh Yigit
2017-02-14  7:32   ` Yuanhan Liu
  -- strict thread matches above, loose matches on Subject: below --
2017-02-03  8:41 Wei Zhao

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