[dpdk-dev] [PATCH v6 1/4] lib/librte_ether: support device reset

Lu, Wenzhuo wenzhuo.lu at intel.com
Thu Jun 23 02:39:30 CEST 2016


Hi Thomas,


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Wednesday, June 22, 2016 5:18 PM
> To: Lu, Wenzhuo; Jerin Jacob
> Cc: dev at dpdk.org; Ananyev, Konstantin; Stephen Hemminger; Richardson,
> Bruce; Chen, Jing D; Liang, Cunming; Wu, Jingjing; Zhang, Helin
> Subject: Re: [dpdk-dev] [PATCH v6 1/4] lib/librte_ether: support device reset
> 
> 2016-06-22 08:25, Lu, Wenzhuo:
> > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> > > 2016-06-22 13:29, Jerin Jacob:
> > > > Thomas,
> > > > As a librte_ether maintainer any comments on this?
> > >
> > > +1 for adding details and make sure naming is good.
> > > I don't really need to comment here because I have already done this
> > > comment
> > > earlier:
> > > 	http://dpdk.org/ml/archives/dev/2016-June/041845.html
> > > Thank you for insisting.
> > I've add some details in this patch set. If it's not enough, please let me know.
> > And I think this discussion is about what the API name should be like. Actually I
> think all the existing name is describing what is done by the API not when and
> where it should be used, like dev_start/stop.
> 
> You're right, I overlooked it:
> 
> + * The API will stop the port, clear the rx/tx queues, re-setup the
> + rx/tx
> + * queues, restart the port.
> 
> Jerin, which detail do you think is needed?
> 
> Wenzhuo, why this function is needed?
As you said below and discussed before, it's a wrapper of the existing functions. The benefit is helping the users avoid the complex implementation when they want to stop and re-start the device.

> All these actions are already possible independently.
> When looking at ixgbe implementation, I see:
> 	ixgbevf_dev_stats_reset() which is not documented in the API
> 	rte_delay_ms(1000);
> 	do {} while
> It looks to be some hacks.
> If you really need some workarounds to handle some tricky situations, maybe
> that the API is not detailed enough.
Yes, you're right. Still something left. I'll add more detail.

> 
> > But anyway I'm open for changing the name. Is the name process_reset_intr
> you prefer? Thanks.
> 
> Not sure.
> If you really intend to add a generic reset, maybe rte_eth_dev_reset() is a good
> name. We just need more justification.
> After reading the doc, the user can understand it is just a wrapper of existing
> functions. But it appears in the code that it does more and can help in some
> situations.
I'll add more info. Thanks.


More information about the dev mailing list