From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: zhao wei <wei.zhao1@gmail.com>, Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix parsing fdir vxlan issue
Date: Fri, 3 Feb 2017 16:41:01 +0800 [thread overview]
Message-ID: <1486111261-32187-1-git-send-email-wei.zhao1@intel.com> (raw)
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
next reply other threads:[~2017-02-03 8:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 8:41 Wei Zhao [this message]
2017-02-03 8:44 Wei Zhao
2017-02-03 22:53 ` Ferruh Yigit
2017-02-14 7:32 ` Yuanhan Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1486111261-32187-1-git-send-email-wei.zhao1@intel.com \
--to=wei.zhao1@intel.com \
--cc=dev@dpdk.org \
--cc=wei.zhao1@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).