From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 1/3] lib/librte_ether: add support for port reset Date: Thu, 06 Apr 2017 09:11:22 +0200 Message-ID: <2978037.PdPlo8nOdn@xps13> References: <1490866456-52241-1-git-send-email-wei.zhao1@intel.com> <2969664.trJitADFWx@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: "Mcnamara, John" , dev@dpdk.org, "Lu, Wenzhuo" To: "Zhao1, Wei" Return-path: Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) by dpdk.org (Postfix) with ESMTP id 1B5A1CFD6 for ; Thu, 6 Apr 2017 09:11:24 +0200 (CEST) Received: by mail-wr0-f178.google.com with SMTP id w11so44136382wrc.3 for ; Thu, 06 Apr 2017 00:11:24 -0700 (PDT) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 reset. > > > + * 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. > Maybe , I should add this explanation in the patch comments or function comments? Yes it must be explain in the doxygen part of the function.