From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 42328A00BE; Wed, 29 Apr 2020 09:39:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 15EEF1D934; Wed, 29 Apr 2020 09:39:04 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 673D71D933 for ; Wed, 29 Apr 2020 09:39:02 +0200 (CEST) IronPort-SDR: EAz/Nm36sHnjv+EppYlOG2VLo3r3cbEp6qRDMPQ4Dp//qKXod+Gxphj9pPxMx8L/fNQPt3LLey 4LUbhsam5hEw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 00:39:01 -0700 IronPort-SDR: kL6eQT26R/4nRPO6nepzb0RosSoXtKSZfdIaiqHOGbW+SOW8Ie/HG+iprKqz42fYTXLOudBr+x ZfJ2BdbX49Iw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,330,1583222400"; d="scan'208";a="249390515" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.116.183]) by fmsmga008.fm.intel.com with ESMTP; 29 Apr 2020 00:38:59 -0700 Date: Wed, 29 Apr 2020 15:31:42 +0800 From: Ye Xiaolong To: Simei Su Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com, dev@dpdk.org, yahui.cao@intel.com Message-ID: <20200429073141.GF6502@intel.com> References: <1588052959-296702-1-git-send-email-simei.su@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1588052959-296702-1-git-send-email-simei.su@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix VF reset issue for FDIR rule X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 >--- > 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 Applied to dpdk-next-net-intel, Thanks.