DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix flex payload rule conflict issue
@ 2020-12-29  5:46 beilei.xing
  2020-12-29  6:17 ` [dpdk-dev] [PATCH v2] " beilei.xing
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: beilei.xing @ 2020-12-29  5:46 UTC (permalink / raw)
  To: jia.guo, dev; +Cc: Beilei Xing, Chenmin Sun

From: Beilei Xing <beilei.xing@intel.com>

With the following commands, the second flow can't
be created successfully.

1. flow create 0 ingress pattern eth / ipv4 / udp /
   raw relative is 1 pattern is 0102030405 / end
   actions drop / end
2. flow destroy 0 rule 0
3. flow create 0 ingress pattern eth / ipv4 / udp /
   raw relative is 1 pattern is 010203040506 / end
   actions drop / end

The root cause is that a flag for flex pit isn't reset.

Reported-by: Chenmin Sun<chenmin.sun@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index b09ff6590d..3a68274a23 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -5284,6 +5284,7 @@ i40e_flow_destroy(struct rte_eth_dev *dev,
 	enum rte_filter_type filter_type = flow->filter_type;
 	struct i40e_fdir_info *fdir_info = &pf->fdir;
 	int ret = 0;
+	int i;
 
 	switch (filter_type) {
 	case RTE_ETH_FILTER_ETHERTYPE:
@@ -5299,9 +5300,10 @@ i40e_flow_destroy(struct rte_eth_dev *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)) {
 			i40e_fdir_rx_proc_enable(dev, 0);
+			for (i = 0; i < I40E_MAX_FLXPLD_LAYER; i++)
+				pf->fdir.flex_pit_flag[i] = 0;
 		}
 		break;
 	case RTE_ETH_FILTER_HASH:
@@ -5515,6 +5517,9 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
 			pf->fdir.flex_mask_flag[pctype] = 0;
 		}
 
+		for (i = 0; i < I40E_MAX_FLXPLD_LAYER; i++)
+			pf->fdir.flex_pit_flag[i] = 0;
+
 		/* Disable FDIR processing as all FDIR rules are now flushed */
 		i40e_fdir_rx_proc_enable(dev, 0);
 	}
-- 
2.26.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-01-05 12:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29  5:46 [dpdk-dev] [PATCH] net/i40e: fix flex payload rule conflict issue beilei.xing
2020-12-29  6:17 ` [dpdk-dev] [PATCH v2] " beilei.xing
2020-12-28  7:15   ` Guo, Jia
2021-01-01  4:03 ` [dpdk-dev] [PATCH v3] " beilei.xing
2020-12-31  6:07   ` Guo, Jia
2021-01-05  2:36     ` Xing, Beilei
2021-01-05  3:12 ` [dpdk-dev] [PATCH v5] " beilei.xing
2021-01-05  3:39   ` Guo, Jia
2021-01-05 12:33     ` Zhang, Qi Z
2021-01-06  2:51 ` [dpdk-dev] [PATCH v4] " beilei.xing

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).