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 502F5A0597; Wed, 8 Apr 2020 08:50:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E8F51BF9D; Wed, 8 Apr 2020 08:50:53 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1739E1BF90 for ; Wed, 8 Apr 2020 08:50:50 +0200 (CEST) IronPort-SDR: 6ayTpfE0mDJiZVAd+GzN7ZUC8gbHiK4Mwaog+xMdHWJtwPyoaKw/R4CXB/9VWLGaHp8wVaLCtH iqOIFutKMQXg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 23:50:50 -0700 IronPort-SDR: W3nffmijDVaiCEP0ajUFF1xe5kYL+MOSfDoxgOA+j9fIfdezfpdjNtEylKojIk1jEDGBRT089n BhzOtrZKYTHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,357,1580803200"; d="scan'208";a="243971656" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga008.fm.intel.com with ESMTP; 07 Apr 2020 23:50:48 -0700 Date: Wed, 8 Apr 2020 14:47:03 +0800 From: Ye Xiaolong To: Lunyuan Cui Cc: dev@dpdk.org, Qiming Yang , Jingjing Wu Message-ID: <20200408064703.GF114503@intel.com> References: <20200325024758.132253-1-lunyuanx.cui@intel.com> <20200401071214.109641-1-lunyuanx.cui@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200401071214.109641-1-lunyuanx.cui@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v2] net/iavf: enable port reset 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/01, Lunyuan Cui wrote: >This patch is intended to add iavf_dev_reset ops, enable iavf to support >"port reset all". > >Signed-off-by: Lunyuan Cui >Acked-by: Jingjing Wu >--- > drivers/net/iavf/iavf_ethdev.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c >index 7a8bec9c9..382530a43 100644 >--- a/drivers/net/iavf/iavf_ethdev.c >+++ b/drivers/net/iavf/iavf_ethdev.c >@@ -32,6 +32,7 @@ static int iavf_dev_configure(struct rte_eth_dev *dev); > static int iavf_dev_start(struct rte_eth_dev *dev); > static void iavf_dev_stop(struct rte_eth_dev *dev); > static void iavf_dev_close(struct rte_eth_dev *dev); >+static int iavf_dev_reset(struct rte_eth_dev *dev); > static int iavf_dev_info_get(struct rte_eth_dev *dev, > struct rte_eth_dev_info *dev_info); > static const uint32_t *iavf_dev_supported_ptypes_get(struct rte_eth_dev *dev); >@@ -91,6 +92,7 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { > .dev_start = iavf_dev_start, > .dev_stop = iavf_dev_stop, > .dev_close = iavf_dev_close, >+ .dev_reset = iavf_dev_reset, > .dev_infos_get = iavf_dev_info_get, > .dev_supported_ptypes_get = iavf_dev_supported_ptypes_get, > .link_update = iavf_dev_link_update, >@@ -1419,6 +1421,21 @@ iavf_dev_uninit(struct rte_eth_dev *dev) > return 0; > } > >+/* >+ * Reset VF device only to re-initialize resources in PMD layer >+ */ >+static int >+iavf_dev_reset(struct rte_eth_dev *dev) >+{ >+ int ret; >+ >+ ret = iavf_dev_uninit(dev); >+ if (ret) >+ return ret; >+ >+ return iavf_dev_init(dev); >+} >+ > static int > iavf_dcf_cap_check_handler(__rte_unused const char *key, > const char *value, __rte_unused void *opaque) >-- >2.17.1 > Acked-by: Xiaolong Ye Applied to dpdk-next-net-intel, Thanks.