From: Wang Ying A <ying.a.wang@intel.com>
To: qabuild@intel.com
Cc: Wang Ying A <ying.a.wang@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [DPDK] net/ice: add flow ipv6 tc support
Date: Thu, 18 Jul 2019 09:26:58 +0800 [thread overview]
Message-ID: <1563413218-373420-1-git-send-email-ying.a.wang@intel.com> (raw)
When set flow ipv6 tc rule, ice_get_flow_field will set error.
This patch fixes this issue.
Fixes: d76116a4678f ("net/ice: add generic flow API")
Cc: stable@dpdk.org
Signed-off-by: Wang Ying A <ying.a.wang@intel.com>
---
drivers/net/ice/ice_generic_flow.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 2c57276..5725bff 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -282,8 +282,7 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
if (!(ipv6_spec && ipv6_mask))
break;
- if (ipv6_mask->hdr.payload_len ||
- ipv6_mask->hdr.vtc_flow) {
+ if (ipv6_mask->hdr.payload_len) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
item,
@@ -317,6 +316,11 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
input_set |= ICE_INSET_IPV6_PROTO;
if (ipv6_mask->hdr.hop_limits == UINT8_MAX)
input_set |= ICE_INSET_IPV6_HOP_LIMIT;
+ if ((ipv6_mask->hdr.vtc_flow &
+ rte_cpu_to_be_32(RTE_IPV6_HDR_TC_MASK))
+ == rte_cpu_to_be_32
+ (RTE_IPV6_HDR_TC_MASK))
+ input_set |= ICE_INSET_IPV6_TOS;
}
break;
@@ -486,7 +490,7 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
item,
- "Invalid mask no exist");
+ "Invalid pattern");
break;
}
}
--
1.8.3.1
reply other threads:[~2019-07-18 1:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1563413218-373420-1-git-send-email-ying.a.wang@intel.com \
--to=ying.a.wang@intel.com \
--cc=qabuild@intel.com \
--cc=stable@dpdk.org \
/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).