From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 378F71B343 for ; Thu, 18 Jan 2018 21:44:22 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B785A20D38; Thu, 18 Jan 2018 15:44:21 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 18 Jan 2018 15:44:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=TRKfI9zKYr0WO1b2XkjfKULU/e JHZmJrNlo0lIcEF+c=; b=Ic+VcvRgUcu+z6YIYIxOAR/hDgl8j2wRNgBgT6+t8R mNoQq4hBcNkEOV7Q4RsRtX2zuNandkuGl+dfZqINh0GSAWRcr83tcEWnkikTD2+J 09itFSlDiSCyHrlCJvG/UjhjRabA5tPVLGYWAyLtH8oT96NveuAN5iePTop4G9yI M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=TRKfI9 zKYr0WO1b2XkjfKULU/eJHZmJrNlo0lIcEF+c=; b=bhhn5TzfjYCKSztZtNR4gx 3O0MswoeRnL0P9umF+2xAGc7Avmb2xGiP/J9OOOgFXRQtrigG/1+ZjNxOppkC32b lxMGmBCUTzAl/v5bcY2YnDCrf5g81UerwZQH6JQKh63vlU/LxGlTE5J9dm7d1Tcm VPS5D4F1iyFKYRe++CFWQgDcuct0muiWvJJglAbsEB4xqvP9hOR5PHgDJsG6gkqM 5Q9YGRXc+LVIc8bPZG/SeiVNnPcfCbrKrB4YOgEuYzV8VgATau5ZTvOR2TM5DNdM 7uVu5+fB8uqEpaTOgInDI4tmNbX2lDZ2taXSEmIrGBZPEpHuKF6TUdPzcg6vXa0w == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 664417E1BE; Thu, 18 Jan 2018 15:44:21 -0500 (EST) From: Thomas Monjalon To: Matan Azrad Cc: Gaetan Rivet , Jingjing Wu , dev@dpdk.org, Neil Horman , Bruce Richardson , Konstantin Ananyev Date: Thu, 18 Jan 2018 21:43:47 +0100 Message-ID: <1777810.s1WQivID2Y@xps> In-Reply-To: <1516293317-30748-5-git-send-email-matan@mellanox.com> References: <1515318351-4756-1-git-send-email-matan@mellanox.com> <1516293317-30748-1-git-send-email-matan@mellanox.com> <1516293317-30748-5-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 4/7] ethdev: synchronize port allocation 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, 18 Jan 2018 20:44:22 -0000 18/01/2018 17:35, Matan Azrad: > rte_eth_dev_allocate(const char *name) > { > uint16_t port_id; > - struct rte_eth_dev *eth_dev; > + struct rte_eth_dev *eth_dev = NULL; > + > + /* Synchronize share data one time allocation between local threads. */ I don't understand the "one time" part of this comment. Please could you try to rephrase it? > + rte_spinlock_lock(&rte_eth_share_data_alloc); > + if (rte_eth_dev_share_data == NULL) > + rte_eth_dev_share_data_alloc(); > + rte_spinlock_unlock(&rte_eth_share_data_alloc); I think the correct wording is "shared data", instead of "share data".