DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule
@ 2020-04-28  5:49 Simei Su
  2020-04-29  7:31 ` Ye Xiaolong
  2020-04-30  6:25 ` Peng, Yuan
  0 siblings, 2 replies; 3+ messages in thread
From: Simei Su @ 2020-04-28  5:49 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, jingjing.wu; +Cc: dev, yahui.cao, simei.su

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


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

* Re: [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule
  2020-04-28  5:49 [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule Simei Su
@ 2020-04-29  7:31 ` Ye Xiaolong
  2020-04-30  6:25 ` Peng, Yuan
  1 sibling, 0 replies; 3+ messages in thread
From: Ye Xiaolong @ 2020-04-29  7:31 UTC (permalink / raw)
  To: Simei Su; +Cc: qi.z.zhang, jingjing.wu, dev, yahui.cao

On 04/28, Simei Su wrote:
>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
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel, Thanks.

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

* Re: [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule
  2020-04-28  5:49 [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule Simei Su
  2020-04-29  7:31 ` Ye Xiaolong
@ 2020-04-30  6:25 ` Peng, Yuan
  1 sibling, 0 replies; 3+ messages in thread
From: Peng, Yuan @ 2020-04-30  6:25 UTC (permalink / raw)
  To: Su, Simei, Zhang, Qi Z, Ye, Xiaolong, Wu, Jingjing
  Cc: dev, Cao, Yahui, Su, Simei

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


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

end of thread, other threads:[~2020-04-30  6:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28  5:49 [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule Simei Su
2020-04-29  7:31 ` Ye Xiaolong
2020-04-30  6:25 ` Peng, Yuan

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git