From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 326AAA0A04; Fri, 15 Jan 2021 19:43:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F5AA140D57; Fri, 15 Jan 2021 19:43:46 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id C3930140D19 for ; Fri, 15 Jan 2021 19:43:44 +0100 (CET) IronPort-SDR: 9jOurefwYd/hNddQtE/rVQwi5hkGVNphRUxLi/5I7NknpYAUmN9UCIxIdCzxFni3j1JPvGG5Mc Pq3I4xqcX/YQ== X-IronPort-AV: E=McAfee;i="6000,8403,9865"; a="240134792" X-IronPort-AV: E=Sophos;i="5.79,350,1602572400"; d="scan'208";a="240134792" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 10:43:43 -0800 IronPort-SDR: q+wdS6c3It3f/DuqGo+N1YNGOfSbj5bTWCinhk5aToKCKRiAHZwTppOZa5HY8Xb2UXYHmoEfCV uM84jpIlcxyA== X-IronPort-AV: E=Sophos;i="5.79,350,1602572400"; d="scan'208";a="354400009" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.221.206]) ([10.213.221.206]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 10:43:42 -0800 To: yongwang@vmware.com Cc: Dheemanth Mallikarjun , dev@dpdk.org References: <20210104194308.24228-1-dheemanthm@vmware.com> From: Ferruh Yigit Message-ID: <91bba3fd-147b-0481-75f0-2c585e7a7200@intel.com> Date: Fri, 15 Jan 2021 18:43:40 +0000 MIME-Version: 1.0 In-Reply-To: <20210104194308.24228-1-dheemanthm@vmware.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 1/4/2021 7:43 PM, Dheemanth Mallikarjun wrote: > The vmxnet3 driver didn't have the dev_reset function > pointer set. Hence, provided the necessary function > pointer so that DPDK developers can use the rte_eth_dev_reset > API to reset the vmxnet3 device data. > > Signed-off-by: Dheemanth Mallikarjun > --- > drivers/net/vmxnet3/vmxnet3_ethdev.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c > index 23a2ebbef..814ccfa79 100644 > --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c > +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c > @@ -67,6 +67,7 @@ static int vmxnet3_dev_configure(struct rte_eth_dev *dev); > static int vmxnet3_dev_start(struct rte_eth_dev *dev); > static int vmxnet3_dev_stop(struct rte_eth_dev *dev); > static int vmxnet3_dev_close(struct rte_eth_dev *dev); > +static int vmxnet3_dev_reset(struct rte_eth_dev *dev); > static void vmxnet3_dev_set_rxmode(struct vmxnet3_hw *hw, uint32_t feature, int set); > static int vmxnet3_dev_promiscuous_enable(struct rte_eth_dev *dev); > static int vmxnet3_dev_promiscuous_disable(struct rte_eth_dev *dev); > @@ -112,6 +113,7 @@ static const struct eth_dev_ops vmxnet3_eth_dev_ops = { > .dev_start = vmxnet3_dev_start, > .dev_stop = vmxnet3_dev_stop, > .dev_close = vmxnet3_dev_close, > + .dev_reset = vmxnet3_dev_reset, > .promiscuous_enable = vmxnet3_dev_promiscuous_enable, > .promiscuous_disable = vmxnet3_dev_promiscuous_disable, > .allmulticast_enable = vmxnet3_dev_allmulticast_enable, > @@ -913,6 +915,18 @@ vmxnet3_dev_close(struct rte_eth_dev *dev) > return ret; > } > > +static int > +vmxnet3_dev_reset(struct rte_eth_dev *dev) > +{ > + int ret; > + > + ret = eth_vmxnet3_dev_uninit(dev); > + if (ret) > + return ret; > + ret = eth_vmxnet3_dev_init(dev); > + return ret; > +} > + > static void > vmxnet3_hw_tx_stats_get(struct vmxnet3_hw *hw, unsigned int q, > struct UPT1_TxStats *res) > Hi Yong, Can you please review this patch? Thanks, ferruh