From: Steve Yang <stevex.yang@intel.com>
To: stable@dpdk.org
Cc: beilei.xing@intel.com, jia.guo@intel.com,
Bernard Iremonger <bernard.iremonger@intel.com>
Subject: [dpdk-stable] [DPDK 18.11] net/i40e: fix flow director initialisation
Date: Fri, 11 Dec 2020 09:01:02 +0000 [thread overview]
Message-ID: <20201211090105.28432-2-stevex.yang@intel.com> (raw)
In-Reply-To: <20201211090105.28432-1-stevex.yang@intel.com>
From: Bernard Iremonger <bernard.iremonger@intel.com>
[ upstream commit ae08c73e6f55e62e402fcdbfa6e8e967bf4bc5cc ]
Remove references to struct rte_fdir_conf which is deprecated,
in i40e_flow_parse_fdir_filter(), i40e_flow_destroy() and
i40e_flow_add_del_fdir_filter().
Fixes: c3be43817cfb ("net/i40e: fix unexpected skip FDIR setup")
Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically")
Fixes: 4149825bbdb9 ("net/i40e: finish integration FDIR with generic flow API")
Cc: stable@dpdk.org
Acked-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
drivers/net/i40e/i40e_fdir.c | 4 ++--
drivers/net/i40e/i40e_flow.c | 11 +----------
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 35be846fbd..314cb2ae5e 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1549,8 +1549,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
struct i40e_fdir_filter check_filter; /* Check if the filter exists */
int ret = 0;
- if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT) {
- PMD_DRV_LOG(ERR, "FDIR is not enabled, please check the mode in fdir_conf.");
+ if (pf->fdir.fdir_vsi == NULL) {
+ PMD_DRV_LOG(ERR, "FDIR is not enabled");
return -ENOTSUP;
}
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 2198473411..c04dfe79fc 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -3191,8 +3191,7 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
cons_filter_type = RTE_ETH_FILTER_FDIR;
- if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT ||
- pf->fdir.fdir_vsi == NULL) {
+ if (pf->fdir.fdir_vsi == NULL) {
/* Enable fdir when fdir flow is added at first time. */
ret = i40e_fdir_setup(pf);
if (ret != I40E_SUCCESS) {
@@ -3208,8 +3207,6 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
NULL, "Failed to configure fdir.");
goto err;
}
-
- dev->data->dev_conf.fdir_conf.mode = RTE_FDIR_MODE_PERFECT;
}
return 0;
@@ -4771,12 +4768,6 @@ i40e_flow_destroy(struct rte_eth_dev *dev,
case RTE_ETH_FILTER_FDIR:
ret = i40e_flow_add_del_fdir_filter(dev,
&((struct i40e_fdir_filter *)flow->rule)->fdir, 0);
-
- /* If the last flow is destroyed, disable fdir. */
- if (!ret && TAILQ_EMPTY(&pf->fdir.fdir_list)) {
- dev->data->dev_conf.fdir_conf.mode =
- RTE_FDIR_MODE_NONE;
- }
break;
case RTE_ETH_FILTER_HASH:
ret = i40e_config_rss_filter_del(dev,
--
2.17.1
next prev parent reply other threads:[~2020-12-11 9:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 9:01 [dpdk-stable] [DPDK 18.11] net/i40e: fix filter pctype Steve Yang
2020-12-11 9:01 ` Steve Yang [this message]
2020-12-11 9:46 ` [dpdk-stable] [DPDK 18.11] net/i40e: fix flow director initialisation Kevin Traynor
2020-12-11 9:01 ` [dpdk-stable] [DPDK 18.11] net/i40e: fix link status Steve Yang
2020-12-11 9:46 ` Kevin Traynor
2020-12-11 9:01 ` [dpdk-stable] [DPDK 18.11] net/i40e: fix queue region in RSS flow Steve Yang
2020-12-11 9:44 ` Kevin Traynor
2020-12-11 9:01 ` [dpdk-stable] [DPDK 18.11] net/i40e: fix recreating flexible flow director rule Steve Yang
2020-12-11 9:47 ` Kevin Traynor
2020-12-11 9:46 ` [dpdk-stable] [DPDK 18.11] net/i40e: fix filter pctype Kevin Traynor
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=20201211090105.28432-2-stevex.yang@intel.com \
--to=stevex.yang@intel.com \
--cc=beilei.xing@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=jia.guo@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).