From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 4/7] ethdev: synchronize port allocation Date: Thu, 18 Jan 2018 21:43:47 +0100 Message-ID: <1777810.s1WQivID2Y@xps> 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Gaetan Rivet , Jingjing Wu , dev@dpdk.org, Neil Horman , Bruce Richardson , Konstantin Ananyev To: Matan Azrad 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) In-Reply-To: <1516293317-30748-5-git-send-email-matan@mellanox.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" 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".