From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f47.google.com (mail-pg0-f47.google.com [74.125.83.47]) by dpdk.org (Postfix) with ESMTP id EFFB91BA17 for ; Thu, 10 May 2018 22:40:59 +0200 (CEST) Received: by mail-pg0-f47.google.com with SMTP id i194-v6so1458452pgd.0 for ; Thu, 10 May 2018 13:40:59 -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=GFHc3d924+PyhhSRi+rswIh9B2u3WCQkvytbJaxzGfs=; b=rOg15V2pR+dBCOLVXKiO9LpR76zYE2DAPAwt/oXTex649QGf79JWTIxNADhRO4X3Ap LxctCY7uMOt1MqQBNqmLfhPL5RKVRE2Hvxb7lnr6CcGcrPwFGfiCgp9J4RLByO/2nA75 0GTeBt5CqLpzCg/XWGhW0nPCYII7OdujuoISk3IOLH1u4/rV5lcRdp+6Ks1CE2VfmSTl BHOwyuOBAMDS2BKgrFNfTHjVpEB25KahqOJ/UxZhyqhupkK4S+30C55ltOurAyfK+Wsd 2V9Ju6wqYodcmyRZY9qVau2AxobIRCWrtLSnjnbASiPMAZNB2CsDxqsQIMc5Z9E2goZa f/Ug== 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=GFHc3d924+PyhhSRi+rswIh9B2u3WCQkvytbJaxzGfs=; b=RnINt95Zmwk/uLYVRv+FknkLMxsObzRq7V+CfBEvwCxo7qkzp4Zy7aN8lX/sKbrgVq lkPCNmJfvZ9/nJtt8PxwvJlKv0nUIen62+bBC/000KYVjAPjw/IQtW8/7LWjpHmMsaph kw9hjT3SGN+tUKUvwEzomNZKGNhyuvELeZ+wAG/zRGQCoQbQihUSKA6NWjKQeIlw0mq0 +pRvFiVwjhD/LS8la4JNP6CY9yVCzMTA5EOZxEV8KXUj96OvPNM1CcNwIziue44h9jMt soANIXIwFQ1ArgunyWziImT30XVxpilEn9hkReHeBufncGwaI8MnyO4t5p6B8b3rNryB G+sA== X-Gm-Message-State: ALKqPwf5YgeyQY46x1hL8tlUw6R3QxB7zSJzt/EArd0tB3EwAf3FOEA4 sEzi9pX10epOXyelPO1qDomMvjVNoWk= X-Google-Smtp-Source: AB8JxZoK4mxquahJtJBJ0BFK2pYSknHqNhM+S60L/+YJsdzBdFrjdjh0SCKYqjrYYSZr3z88mqzE6g== X-Received: by 2002:a62:e04c:: with SMTP id f73-v6mr2759116pfh.88.1525984859086; Thu, 10 May 2018 13:40:59 -0700 (PDT) Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id a10-v6sm2880653pfo.55.2018.05.10.13.40.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 13:40:59 -0700 (PDT) Date: Thu, 10 May 2018 13:40:56 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, stable@dpdk.org, Matan Azrad Message-ID: <20180510134056.455d97dc@xeon-e3> In-Reply-To: <20180509094337.26112-9-thomas@monjalon.net> References: <20180509094337.26112-1-thomas@monjalon.net> <20180509094337.26112-9-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 08/11] ethdev: fix port visibility before initialization X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 20:41:00 -0000 On Wed, 9 May 2018 11:43:34 +0200 Thomas Monjalon wrote: > The port was set to the state ATTACHED during allocation. > The consequence was to iterate over ports which are not initialized. > > The state ATTACHED is now set as the last step of probing. > > The uniqueness of port name is now checked before the availability > of a port id for allocation (order reversed). > > As the state is not set on allocation anymore, it is also not checked > in the function telling whether a port is allocated or not. > The name of the port is set on allocation, so it is enough as a check. > > Fixes: 5588909af21b ("ethdev: add device iterator") > Cc: stable@dpdk.org > > Signed-off-by: Thomas Monjalon > Signed-off-by: Matan Azrad Could these states be described somewhere in the documentation. Maybe some doc/guides? Maybe even exposed in API under rte_eth_dev_info. Ideally, the device states could be aligned to the SNMP MIB for interfaces (RFC2863) which defines complex state model appropriate for devices and tunnels.