DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Simei Su <simei.su@intel.com>
Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com, dev@dpdk.org,
	yahui.cao@intel.com
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule
Date: Wed, 29 Apr 2020 15:31:42 +0800	[thread overview]
Message-ID: <20200429073141.GF6502@intel.com> (raw)
In-Reply-To: <1588052959-296702-1-git-send-email-simei.su@intel.com>

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.

  reply	other threads:[~2020-04-29  7:39 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 [this message]
2020-04-30  6:25 ` Peng, Yuan

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=20200429073141.GF6502@intel.com \
    --to=xiaolong.ye@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=simei.su@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).