From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 4FC912BAE for ; Fri, 21 Apr 2017 11:28:39 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E349520D31; Fri, 21 Apr 2017 05:28:38 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 21 Apr 2017 05:28:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=h6NOa2OOPOI0PLz J0MWyKsC+Xgpti4hG0okYjCh++ns=; b=oTDWUebgML+sS4Mu/RXnWWfIb/2royN O2zuTTwRB1IY+AQV1tPyD7D4EYCr3wyClcwMnGa3ouuKWxTEfK/D1bEUNbZptAix eWDZgqmZtPKVRrfqiE2N5qpP3oE9gvv4E1Bk7OxtSI8n8lXqOowkwphijnwKFcJN ukQij3svLPfU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=h6NOa2OOPOI0PLzJ0MWyKsC+Xgpti4hG0okYjCh++ns=; b=OTjYIb9L 9CoH/v8lFhuVi0f7NZP50ytJJe/wK1ozoEfsLhksMOCSFqhRc4tFNZgEw7x8+t3t FKBqB2IOW/qYz+BYhJgwD10rxb8+b9DDZZtIjliKdGN1daIOx8Ssl0ipQeM4Ig0Q aM/4mAWFrd3G3ZkBw6WRcYAmzLmNRM6ffdsZPyhiWVGoGw3cqFZYh3YdfhA+2f5O vD1HU1RCPx5vORitkq3rzE4rroQihHib9f3ACQQMxIZ8A3/ORCfHwi4RpH0Ephh7 lYG75uYj+5jaQgi74TAC9YzUd2zBGu/y4D/xn13N1sEkA2osvjXWkLIt4rsXq+B7 3lSc0brB97pQDg== X-ME-Sender: X-Sasl-enc: vNw+yy9EUsAWEMs86pluFLd33u+gNcH9oJuZWgI2a1vL 1492766918 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8BF3A241ED; Fri, 21 Apr 2017 05:28:38 -0400 (EDT) From: Thomas Monjalon To: "Zhao1, Wei" Cc: dev@dpdk.org, Yuanhan Liu , "Ananyev, Konstantin" , "Mcnamara, John" , "Lu, Wenzhuo" , "Liu, Yu Y" Date: Fri, 21 Apr 2017 11:28:37 +0200 Message-ID: <7495505.68D2QY7hX0@xps> In-Reply-To: References: <1490866456-52241-1-git-send-email-wei.zhao1@intel.com> <1581788.2CBIGuQB5e@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 1/3] lib/librte_ether: add support for 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: , X-List-Received-Date: Fri, 21 Apr 2017 09:28:39 -0000 21/04/2017 10:59, Zhao1, Wei: > Hi, thomas > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 21/04/2017 04:27, Yuanhan Liu: > > > On Thu, Apr 20, 2017 at 09:17:24AM +0000, Zhao1, Wei wrote: > > > > > > > Please explain exactly the responsibility of this function, > > > > > > > and how it is different from calling stop/configure/start. > > > > > > > > > > > > In this reset feature, reset function can do the calling > > > > > > stop/configure/start process, but also It can also do some > > > > > > restore work for the port, for example, it can restore the added > > > > > > parameters of > > > > > > > > > > vlan, mac_addrs, promisc_unicast_enabled falg and > > > > > promisc_multicast_enabled flag. > > > > > > > > > > > Maybe , I should add this explanation in the patch comments or > > > > > > function > > > > > > > > > > comments? > > > > > > > > > > I'm curious why we have to do save & restore for a reset operation. > > > > > Why some configures have to be saved and restored? Doesn't "reset" > > > > > literally means reset everything? > > > > > > > > Users maybe do not want to do a second configuration operation to > > > > waste time after reset which lost all previous configuration. But he > > > > still want these configuration valid after reset. > > > > So, save & restore can help them to save this process time and effort. > > > > > > > > > Even though, how do you tell what kind of configures need be > > > > > restored and what should not? Again, even though, will all PMDs > > > > > supports restoring the same set of configurations? > > > > > > > > Yes, this is hard to say what may be need and what may be not for > > > > user. > > > > Now, the kinds of supported is list in patch set comment. And only > > > > i40e NIC support this feature. > > > > > > Why it's the configurations listed in patch 2? Because they are > > > requested by customers? > > > > > > Is that all could be saved? If not, are you going to save & restore > > > all possible configurations? > > > > > > Assuming the configurations saved & restored may differ from different > > > PMD drivers, how could you keep the consistency then? And judging that > > > the application has no idea about the difference (yet it knows nothing > > > about what kind of configurations will be saved), how could the > > > application know that some configurations are not saved & restored by > > > the driver that it has to do re-configuration by itself? > > > > > > > > While looking at your reset implementation for i40e, it looks more > > > > > complex than necessary: just thinking we have to call > > > > > "xxx_queue_setup" > > > > > for all PMDs. > > > > > > > > > > I'm thinking a simple hardware reset might be enough? > > > > > > > > > > /* literally reset the hardware: reset everything */ > > > > > rte_eth_reset(port) > > > > > { > > > > > > > > > > eth_dev->ops->reset(); > > > > > > > > > > } > > > > > > > > You mean just do a reset and do not restore any configuration? > > > > That may not meet the need for this feature from customer? > > > > > > Right, I'm just aware of the configuration might be done by PF (but > > > not only by the application), that the VF port may be not aware of > > > those configurations. So the save & restore is needed. I don't quite > > > like how it is done in this patch set though. I also don't think the > > > API is well named: as said, reset should literally reset everything. > > > > > > We may need think how to do it properly. > > > > > > Thomas, Konstantin, what do you guys think of it? > > > > I have the same concerns. > > I think we should better document the current status of start/stop and > > which configuration parameters are lost or saved. > > Maybe I should add some words in doc\guides\nics\i40e.rst to Record which > configurations are saved and restored by the PMD driver in reset > function. Which not list in that are recognized as not saved and restored > by default. OTHER NIC for this feature can add similar record in their > xxx.rst. No, when defining a generic API in ethdev, we must define the same behaviour for every drivers. Please check how to make the behaviour consistent and documented in ethdev. We may need to document your new function and start/stop also.