DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Peng, Yuan" <yuan.peng@intel.com>
To: "Su, Simei" <simei.su@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Ye, Xiaolong" <xiaolong.ye@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Cao, Yahui" <yahui.cao@intel.com>,
	"Su, Simei" <simei.su@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule
Date: Thu, 30 Apr 2020 06:25:38 +0000	[thread overview]
Message-ID: <BY5PR11MB3893BF4170444AE2BBD48D85FEAA0@BY5PR11MB3893.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1588052959-296702-1-git-send-email-simei.su@intel.com>

Test-by Peng, Yuan <yuan.peng@intel.com>

-----Original Message-----
From: dev <dev-bounces@dpdk.org> On Behalf Of Simei Su
Sent: Tuesday, April 28, 2020 1:49 PM
To: Zhang, Qi Z <qi.z.zhang@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
Cc: dev@dpdk.org; Cao, Yahui <yahui.cao@intel.com>; Su, Simei <simei.su@intel.com>
Subject: [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule

After VF reset, FDIR rule still takes effect. To solve the issue, this patch adds to flush all flows before flow uninit. VIRTCHNL sends message to PF by Admin Queue, so flow flush should be implemented before Admin Queue shut down.

Fixes: c6ea8bd9f11f ("net/iavf: support generic flow")

Signed-off-by: Simei Su <simei.su@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c       | 1 +
 drivers/net/iavf/iavf_generic_flow.c | 4 +---  drivers/net/iavf/iavf_generic_flow.h | 2 ++
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 117fbc5..e09efff 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1431,6 +1431,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 
 	iavf_dev_stop(dev);
+	iavf_flow_flush(dev, NULL);
 	iavf_shutdown_adminq(hw);
 	/* disable uio intr before callback unregister */
 	rte_intr_disable(intr_handle);
diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c
index bca1ffe..8c66ac8 100644
--- a/drivers/net/iavf/iavf_generic_flow.c
+++ b/drivers/net/iavf/iavf_generic_flow.c
@@ -34,8 +34,6 @@ static struct rte_flow *iavf_flow_create(struct rte_eth_dev *dev,  static int iavf_flow_destroy(struct rte_eth_dev *dev,
 		struct rte_flow *flow,
 		struct rte_flow_error *error);
-static int iavf_flow_flush(struct rte_eth_dev *dev,
-		struct rte_flow_error *error);
 static int iavf_flow_query(struct rte_eth_dev *dev,
 		struct rte_flow *flow,
 		const struct rte_flow_action *actions, @@ -966,7 +964,7 @@ struct iavf_pattern_match_item *
 	return ret;
 }
 
-static int
+int
 iavf_flow_flush(struct rte_eth_dev *dev,
 		struct rte_flow_error *error)
 {
diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h
index c41ca1b..978d071 100644
--- a/drivers/net/iavf/iavf_generic_flow.h
+++ b/drivers/net/iavf/iavf_generic_flow.h
@@ -306,6 +306,8 @@ struct iavf_flow_parser_node {  void iavf_register_flow_engine(struct iavf_flow_engine *engine);  int iavf_flow_init(struct iavf_adapter *ad);  void iavf_flow_uninit(struct iavf_adapter *ad);
+int iavf_flow_flush(struct rte_eth_dev *dev,
+		struct rte_flow_error *error);
 int iavf_register_parser(struct iavf_flow_parser *parser,
 			 struct iavf_adapter *ad);
 void iavf_unregister_parser(struct iavf_flow_parser *parser,
--
1.8.3.1


      parent reply	other threads:[~2020-04-30  6:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28  5:49 Simei Su
2020-04-29  7:31 ` Ye Xiaolong
2020-04-30  6:25 ` Peng, Yuan [this message]

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=BY5PR11MB3893BF4170444AE2BBD48D85FEAA0@BY5PR11MB3893.namprd11.prod.outlook.com \
    --to=yuan.peng@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=simei.su@intel.com \
    --cc=xiaolong.ye@intel.com \
    --cc=yahui.cao@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).