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 01:47:11 +0200 Message-ID: <4197647.NnQ7NCaPt5@xps> References: <20180509094337.26112-1-thomas@monjalon.net> <20180510133516.6552e936@xeon-e3> <8877388.Xvcb3uZcyi@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, =?ISO-8859-1?Q?Ga=EBtan?= Rivet , 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 E891D1BB5F for ; Fri, 11 May 2018 01:47:13 +0200 (CEST) In-Reply-To: <8877388.Xvcb3uZcyi@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 11/05/2018 00:13, Thomas Monjalon: > 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. >=20 > 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