From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 07/11] ethdev: add lock to port allocation check Date: Fri, 11 May 2018 00:13:29 +0200 Message-ID: <8877388.Xvcb3uZcyi@xps> References: <20180509094337.26112-1-thomas@monjalon.net> <20180509122116.ljistjpz3dfljdqo@bidouze.vm.6wind.com> <20180510133516.6552e936@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: =?ISO-8859-1?Q?Ga=EBtan?= Rivet , dev@dpdk.org, Matan Azrad To: Stephen Hemminger Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 72CEB1B787 for ; Fri, 11 May 2018 00:13:32 +0200 (CEST) In-Reply-To: <20180510133516.6552e936@xeon-e3> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 10/05/2018 22:35, Stephen Hemminger: > On Wed, 9 May 2018 14:21:17 +0200 > Ga=EBtan Rivet wrote: >=20 > > 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. > >=20 > > I would suggest > >=20 > > * rte_eth_dev_allocated_nolock > > or > > * rte_eth_dev_allocated_lockless > > (or even rte_eth_lockless_dev_allocated) > >=20 > > instead. >=20 > Personally, used to the convention of: > rte_eth_dev_find(name) > and > _rte_eth_dev_find(name) >=20 > The _ implies internal version without lock. It is a matter of taste. We have chosen "nolock" in v2, and I think it is explicit. > Also allocated to me implies a boolean test only. Yes, the name is a bit strange. But it is old and out of the scope of this patch. If we want to change it, it is an API deprecation.