From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 07/11] ethdev: add lock to port allocation check Date: Thu, 10 May 2018 13:35:16 -0700 Message-ID: <20180510133516.6552e936@xeon-e3> References: <20180509094337.26112-1-thomas@monjalon.net> <20180509094337.26112-8-thomas@monjalon.net> <20180509122116.ljistjpz3dfljdqo@bidouze.vm.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Thomas Monjalon , dev@dpdk.org, Matan Azrad , stable@dpdk.org To: =?UTF-8?B?R2HDq3Rhbg==?= Rivet Return-path: Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by dpdk.org (Postfix) with ESMTP id 05A491B831 for ; Thu, 10 May 2018 22:35:19 +0200 (CEST) Received: by mail-pg0-f68.google.com with SMTP id z4-v6so1440665pgu.13 for ; Thu, 10 May 2018 13:35:18 -0700 (PDT) In-Reply-To: <20180509122116.ljistjpz3dfljdqo@bidouze.vm.6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 9 May 2018 14:21:17 +0200 Ga=C3=ABtan Rivet 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. >=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. Personally, used to the convention of: rte_eth_dev_find(name) and _rte_eth_dev_find(name) The _ implies internal version without lock. Also allocated to me implies a boolean test only.