[dpdk-dev] [PATCH v4 1/3] lib/librte_ether: add support for port reset

Zhao1, Wei wei.zhao1 at intel.com
Thu Apr 13 10:55:22 CEST 2017


Hi,  Konstantin

> -----Original Message-----
> From: Ananyev, Konstantin
> Sent: Thursday, April 6, 2017 5:03 PM
> To: Zhao1, Wei <wei.zhao1 at intel.com>; Thomas Monjalon
> <thomas.monjalon at 6wind.com>
> Cc: Mcnamara, John <john.mcnamara at intel.com>; dev at dpdk.org; Lu,
> Wenzhuo <wenzhuo.lu at intel.com>
> Subject: RE: [dpdk-dev] [PATCH v4 1/3] lib/librte_ether: add support for port
> reset
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Zhao1, Wei
> > Sent: Thursday, April 6, 2017 9:53 AM
> > To: Thomas Monjalon <thomas.monjalon at 6wind.com>
> > Cc: Mcnamara, John <john.mcnamara at intel.com>; dev at dpdk.org; Lu,
> > Wenzhuo <wenzhuo.lu at intel.com>
> > Subject: Re: [dpdk-dev] [PATCH v4 1/3] lib/librte_ether: add support
> > for port reset
> >
> > Hi, Thomas
> >
> > > -----Original Message-----
> > > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> > > Sent: Thursday, April 6, 2017 3:11 PM
> > > To: Zhao1, Wei <wei.zhao1 at intel.com>
> > > Cc: Mcnamara, John <john.mcnamara at intel.com>; dev at dpdk.org; Lu,
> > > Wenzhuo <wenzhuo.lu at intel.com>
> > > Subject: Re: [dpdk-dev] [PATCH v4 1/3] lib/librte_ether: add support
> > > for port reset
> > >
> > > 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.
> 
> 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_reset,
we add specific function do store and restore of some of the important  parameters  listed above.


> 
> > > > 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.
> >
> > Yes, I have add that explanation in v5 which has been commit to dpdk.org.


More information about the dev mailing list