From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 2/7] ethdev: fix used portid allocation Date: Thu, 18 Jan 2018 18:00:43 +0100 Message-ID: <1997166.TLSYLWaGZv@xps> References: <1515318351-4756-1-git-send-email-matan@mellanox.com> <1516293317-30748-1-git-send-email-matan@mellanox.com> <1516293317-30748-3-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 , stable@dpdk.org To: Matan Azrad Return-path: In-Reply-To: <1516293317-30748-3-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_find_free_port() found a free port by state checking. > The state field are in local process memory, so other DPDK processes > may get the same port ID because their local states may be different. > > Replace the state checking by the ethdev port name checking, > so, if the name is an empty string the port ID will be detected as > unused. > > Fixes: d948f596fee2 ("ethdev: fix port data mismatched in multiple process model") > Cc: stable@dpdk.org > > Suggested-by: Konstantin Ananyev > Signed-off-by: Matan Azrad Acked-by: Thomas Monjalon