From: Jeff Guo <jia.guo@intel.com>
To: helin.zhang@intel.com, jingjing.wu@intel.com
Cc: dev@dpdk.org, jia.guo@intel.com
Subject: [dpdk-dev] [PATCH] drivers/i40e: Add FD PCTYPE translation for x722
Date: Fri, 26 Aug 2016 05:25:05 -0400 [thread overview]
Message-ID: <1472203505-76527-2-git-send-email-jia.guo@intel.com> (raw)
In-Reply-To: <1472203505-76527-1-git-send-email-jia.guo@intel.com>
Before the filter is programmed, the PCTYPE in
the FD programming descriptor need to use
GLQF_FD_PCTYPE table to translate into Second PCTYPE.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 11 +++++++++++
drivers/net/i40e/i40e_fdir.c | 17 +++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index aee8f40..7824704 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -7736,7 +7736,9 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
PMD_DRV_LOG(ERR, "invalid flow_type input.");
return -EINVAL;
}
+
pctype = i40e_flowtype_to_pctype(conf->flow_type);
+
ret = i40e_parse_input_set(&input_set, pctype, conf->field,
conf->inset_size);
if (ret) {
@@ -7805,7 +7807,16 @@ i40e_fdir_filter_inset_select(struct i40e_pf *pf,
PMD_DRV_LOG(ERR, "invalid flow_type input.");
return -EINVAL;
}
+
+#ifdef X722_SUPPORT
+ /* get translated pctype value in fd pctype register */
+ pctype = i40e_read_rx_ctl(hw,
+ I40E_GLQF_FD_PCTYPES(i40e_flowtype_to_pctype(
+ conf->flow_type)));
+#else
pctype = i40e_flowtype_to_pctype(conf->flow_type);
+#endif
+
ret = i40e_parse_input_set(&input_set, pctype, conf->field,
conf->inset_size);
if (ret) {
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index f65c411..d91df96 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -664,7 +664,14 @@ i40e_fdir_configure(struct rte_eth_dev *dev)
i40e_set_flx_pld_cfg(pf, &conf->flex_set[i]);
/* configure flex mask*/
for (i = 0; i < conf->nb_flexmasks; i++) {
+#ifdef X722_SUPPORT
+ /* get translated pctype value in fd pctype register */
+ pctype = i40e_read_rx_ctl(hw,
+ I40E_GLQF_FD_PCTYPES(i40e_flowtype_to_pctype(
+ conf->flex_mask[i].flow_type)));
+#else
pctype = i40e_flowtype_to_pctype(conf->flex_mask[i].flow_type);
+#endif
i40e_set_flex_mask_on_pctype(pf, pctype, &conf->flex_mask[i]);
}
@@ -1012,6 +1019,7 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
const struct rte_eth_fdir_filter *filter,
bool add)
{
+ struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
unsigned char *pkt = (unsigned char *)pf->fdir.prg_pkt;
enum i40e_filter_pctype pctype;
@@ -1044,7 +1052,16 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR, "construct packet for fdir fails.");
return ret;
}
+
+#ifdef X722_SUPPORT
+ /* get translated pctype value in fd pctype register */
+ pctype = i40e_read_rx_ctl(hw,
+ I40E_GLQF_FD_PCTYPES(i40e_flowtype_to_pctype(
+ filter->input.flow_type)));
+#else
pctype = i40e_flowtype_to_pctype(filter->input.flow_type);
+#endif
+
ret = i40e_fdir_filter_programming(pf, pctype, filter, add);
if (ret < 0) {
PMD_DRV_LOG(ERR, "fdir programming fails for PCTYPE(%u).",
--
1.9.3
next prev parent reply other threads:[~2016-08-26 9:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-26 9:25 [dpdk-dev] [PATCH] drivers/i40e: Add new PCTYPE for x722 hardware driver Jeff Guo
2016-08-26 9:25 ` Jeff Guo [this message]
2016-09-05 5:40 ` [dpdk-dev] [PATCH] drivers/i40e: Add FD PCTYPE translation for x722 Wu, Jingjing
2016-09-07 9:38 ` [dpdk-dev] [PATCH v2 2/2] drivers/i40e: Add FD PCTYPE translation for device x722 Jeff Guo
2016-09-08 2:25 ` Wu, Jingjing
2016-09-19 14:57 ` Bruce Richardson
2016-09-05 5:44 ` [dpdk-dev] [PATCH] drivers/i40e: Add new PCTYPE for x722 hardware driver Wu, Jingjing
2016-09-07 9:38 ` [dpdk-dev] [PATCH v2 1/2] drivers/i40e: Add new PCTYPEs for device x722 Jeff Guo
2016-09-08 2:24 ` Wu, Jingjing
2016-09-19 14:56 ` Bruce Richardson
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=1472203505-76527-2-git-send-email-jia.guo@intel.com \
--to=jia.guo@intel.com \
--cc=dev@dpdk.org \
--cc=helin.zhang@intel.com \
--cc=jingjing.wu@intel.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).