[dpdk-dev] [PATCH 07/11] ethdev: add lock to port allocation check
Thomas Monjalon
thomas at monjalon.net
Fri May 11 01:47:11 CEST 2018
11/05/2018 00:13, Thomas Monjalon:
> 10/05/2018 22:35, Stephen Hemminger:
> > On Wed, 9 May 2018 14:21:17 +0200
> > Gaëtan Rivet <gaetan.rivet at 6wind.com> wrote:
> >
> > > A suggestion about the naming here.
> > > Reading subsequent patches, we can see this function being used during
> > > ethdev allocation routines. The _lock_free suffix is a little
> > > misleading, as for an instant one can think that there is something
> > > being freed about an allocated ethdev lock.
> > >
> > > I would suggest
> > >
> > > * rte_eth_dev_allocated_nolock
> > > or
> > > * rte_eth_dev_allocated_lockless
> > > (or even rte_eth_lockless_dev_allocated)
> > >
> > > instead.
> >
> > Personally, used to the convention of:
> > rte_eth_dev_find(name)
> > and
> > _rte_eth_dev_find(name)
> >
> > The _ implies internal version without lock.
>
> It is a matter of taste.
> We have chosen "nolock" in v2, and I think it is explicit.
After a second thought, I have decided to follow the underscore convention:
_rte_eth_dev_allocated
More information about the dev
mailing list