From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DqttN2rBw9SLn7EZ3QLSo8DUSFsBaX1d3BUxn7274FQ=; b=i4zYp42GB3eqI9SszcsDgAgjCcAkHi3vdTXiDiIV2AHQS31v9fzx50ZKWJNa9ZnSUS e+CNuR35f1QdiR/Ftj8RbiYvBxaA359NPVkcEqMNUUv/JFBx/lw5XLAdSGECmkU+kTlW leMfS08dkLJEtp88RwoP0ZSMI75pr6OVxARsNTHFhA7vhK+yXKj/+insEgA6pJ/JQetV VVTmybL8yGmzDtlQEXB6635oUZHHquwMUCRJb8Snba4lx8TEcfWrQ+O4Z47oev3rv9E6 p/wodrkKAB+sUUKo58HSrGOvd3xqLsrnGwQpWeEGLzKWccfPJWnNHkH0ypgi99Ijpnpn yHyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DqttN2rBw9SLn7EZ3QLSo8DUSFsBaX1d3BUxn7274FQ=; b=az+JEmBm1pxmNjByfNDBQ6tcyun0Q+GpjONuHDwwTu9IPYifFWEdd/IHGtSN1O+UfK rbaDikWnhT0JFo9pe5Zd2FGiAev2Z6DEREIEZyepkgnhSGN8XTL/uENFHf7CK1Ai4Ci5 R4pAqIwSU7mQo9jbLW67pwa9adDcVFfmETZkY4xw3hgv57feVkelwvz75JF0ZwanbKAW iFia2a0BlceGkHGdJ8grG+h4CHCgDZJrVRJ6KMUizjxdJeW5oN3DpYbIS6MxyciYAwQo iqPcz8KpsEihMQSYlDcMf4n9DFIeYSHFHo92N5PnKWVNQ1qD3ngEBKVtG6YMM8EVRJtj cMUg== X-Gm-Message-State: ALKqPweNibZaraXj4IyIwO0/r+1iOgG6du2i8yCxmSYLurba64xIZdDF IHRg+GvDGSw5pXzVKzLGXHGkwg== X-Google-Smtp-Source: AB8JxZqoapjTUKra3kVsSkEDRt4Rt+F9gfn/ESadS7M1vwr2toyLvQ72vtUdJ4UcqI76V3h8qWlwxA== X-Received: by 2002:a62:6642:: with SMTP id a63-v6mr2727731pfc.162.1525984518181; Thu, 10 May 2018 13:35:18 -0700 (PDT) Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id z131-v6sm3877372pgz.86.2018.05.10.13.35.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 13:35:18 -0700 (PDT) Date: Thu, 10 May 2018 13:35:16 -0700 From: Stephen Hemminger To: =?UTF-8?B?R2HDq3Rhbg==?= Rivet Cc: Thomas Monjalon , dev@dpdk.org, Matan Azrad , stable@dpdk.org Message-ID: <20180510133516.6552e936@xeon-e3> In-Reply-To: <20180509122116.ljistjpz3dfljdqo@bidouze.vm.6wind.com> 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 Subject: Re: [dpdk-dev] [PATCH 07/11] ethdev: add lock to port allocation check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 20:35:19 -0000 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.