From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 67E715323 for ; Fri, 14 Apr 2017 03:29:20 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Apr 2017 18:29:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,195,1488873600"; d="scan'208";a="1119253352" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by orsmga001.jf.intel.com with ESMTP; 13 Apr 2017 18:29:18 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.175]) by PGSMSX104.gar.corp.intel.com ([169.254.3.113]) with mapi id 14.03.0319.002; Fri, 14 Apr 2017 09:29:17 +0800 From: "Zhao1, Wei" To: Thomas Monjalon CC: "Ananyev, Konstantin" , "Mcnamara, John" , "dev@dpdk.org" , "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH v4 1/3] lib/librte_ether: add support for port reset Thread-Index: AQHSqTm8K6Xc/Z+bh0WPnxNjoB7PqKGtRo6AgAplLjD//8WxAIAAoiDg//98+ICAC4Ha0P//kFEAADCuSMA= Date: Fri, 14 Apr 2017 01:29:16 +0000 Message-ID: References: <1490866456-52241-1-git-send-email-wei.zhao1@intel.com> <2601191342CEEE43887BDE71AB9772583FAE5871@IRSMSX109.ger.corp.intel.com> <4157272.TqMeIE0yWW@xps13> In-Reply-To: <4157272.TqMeIE0yWW@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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, 14 Apr 2017 01:29:21 -0000 Hi, Thomas Monjalon > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Thursday, April 13, 2017 6:07 PM > To: Zhao1, Wei > Cc: Ananyev, Konstantin ; Mcnamara, John > ; dev@dpdk.org; Lu, Wenzhuo > > Subject: Re: [dpdk-dev] [PATCH v4 1/3] lib/librte_ether: add support for = port > reset >=20 > 2017-04-13 08:55, Zhao1, Wei: > > From: Ananyev, Konstantin > > > From: Zhao1, Wei > > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > > 2017-04-06 02:57, Zhao1, Wei: > > > > > > > /** > > > > > > > > + * Reset an ethernet device when it's not working. One > > > > > > > > + scenario is, after PF > > > > > > > > + * port is down and up, the related VF port should be rese= t. > > > > > > > > + * The API will stop the port, clear the rx/tx queues, > > > > > > > > + re-setup the rx/tx > > > > > > > > + * queues, restart the port. > > > > > > > > > > > > > > s/The API/This function/ > > > > > > > > > > > > > > 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. > > > > > > Ok, but why start/stop can't do these things? > > > Konstantin > > > > This is because in i40e PMD code, start and stop process do not have > > the process of store and restore the added key parameters. Not only > > i40e but also other PMD code. So, in the function pointed to by dev_res= et, > we add specific function do store and restore of some of the important > parameters listed above. >=20 > Why store and restore cannot be implemented in start/stop functions? Because reset and start/stop are used for two purposes, for example: Some user maybe just start/stop the port and he do not care what key param= eters has been configuration last time, and even worse when he want to clear all = the configuration last time , if we add specific function do store and restore in that two function, it = is useless for them, and may cause a result that user do not expect.