From: Steve Yang <stevex.yang@intel.com>
To: stable@dpdk.org
Cc: beilei.xing@intel.com, jia.guo@intel.com,
Guinan Sun <guinanx.sun@intel.com>
Subject: [dpdk-stable] [DPDK 18.11] net/i40e: fix recreating flexible flow director rule
Date: Fri, 11 Dec 2020 09:01:05 +0000 [thread overview]
Message-ID: <20201211090105.28432-5-stevex.yang@intel.com> (raw)
In-Reply-To: <20201211090105.28432-1-stevex.yang@intel.com>
From: Guinan Sun <guinanx.sun@intel.com>
[ upstream commit 0acf70d473072fd77b667a0419f8b9ab70b35b39 ]
This patch fixes the failure of recreate flexible fdir rule.
The root cause is that the flex_mask_flag is not reset during
flow destroy and flow flush.
Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")
Cc: stable@dpdk.org
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
drivers/net/i40e/i40e_fdir.c | 6 ++++++
drivers/net/i40e/i40e_flow.c | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 35be846fbd..fc58647998 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1626,6 +1626,12 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
rte_free(fdir_filter);
} else {
ret = i40e_sw_fdir_filter_del(pf, &node->fdir.input);
+ if (ret < 0) {
+ PMD_DRV_LOG(ERR,
+ "Error deleting fdir rule from hash table!");
+ return -EINVAL;
+ }
+ pf->fdir.flex_mask_flag[pctype] = 0;
}
return ret;
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 2198473411..6e3e6b8447 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4965,8 +4965,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
}
for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
- pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)
+ pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
pf->fdir.inset_flag[pctype] = 0;
+ pf->fdir.flex_mask_flag[pctype] = 0;
+ }
}
return ret;
--
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 ` [dpdk-stable] [DPDK 18.11] net/i40e: fix flow director initialisation Steve Yang
2020-12-11 9:46 ` 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 ` Steve Yang [this message]
2020-12-11 9:47 ` [dpdk-stable] [DPDK 18.11] net/i40e: fix recreating flexible flow director rule 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-5-stevex.yang@intel.com \
--to=stevex.yang@intel.com \
--cc=beilei.xing@intel.com \
--cc=guinanx.sun@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).