From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0F8AA053D; Fri, 17 Jul 2020 17:01:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FD2A1BEE6; Fri, 17 Jul 2020 17:01:06 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 5B7391BEE4 for ; Fri, 17 Jul 2020 17:01:04 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id CBAA95C00B5; Fri, 17 Jul 2020 11:01:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 17 Jul 2020 11:01:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= bV+Qse3yyEVZgs2831GavjBbQQbcJApRoKIkwqUe13I=; b=E1cpSXQfgRaI5T8r miznSRcNdK9jc9XGM/h5Rqd+D/CDFRZxGiy9JrMzMEbrBncjxSJgrltvJaPYkEuT USH3YsJD0isXxKd4bD9LMjX/F8JtZAhETbjsJrilX/htGkxlvLskx2IL5pXmyGaI 6c4KB4tAWOgtMaKk5x5+ZxkI+PVCQpjCPDENJgvnS+B4o/DVtfNsIRnNtPZ/f+Ou RHLswWe9miVQSFeqU48rWbB+BCKmoWqiEVn0D5Lew1di2KDP3DTNX4nfZBRI8dDO aD7dxQrBaxLDvdAx/2nRwxc0VOW0nc/ZLeuRIKXd5vnpYQlTd+x915PvqDLZ4StD PIMtXg== 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=bV+Qse3yyEVZgs2831GavjBbQQbcJApRoKIkwqUe1 3I=; b=J+gJFVpTVdjgTfjqx7eITeCk35HSFbAHfh4QgukMslb8Gdjp+iLNalFWy m5o25+TD15nf+gNQXTdZKwQjWa9tvCvUlzISJnCekGIe9bIHkfhDh4Oajh4zY4Nk x0lTPmiwcKzPO348b60BNv9tpL579NGGRmkmnTTwAWaeTBvsNvnQZh2lhOsxSJCz Sr6JgNdrWdfKrZXNlLImbOYxg69aSiRmGK4owJLEWVJTajVkpNrgF0A4LYY54sqd JOeATY67hNvP93PtMv2RzstbsWTjyB/Vg05KkMHHULXnOx0yI03hmz9VXXWqbDBD sXSwIjQ2kgFWwvt7m3199SszX17ow== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrfeeigdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4A4833280073; Fri, 17 Jul 2020 11:01:01 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: maryam.tahhan@intel.com, reshma.pattan@intel.com, hemant.agrawal@nxp.com, dev@dpdk.org Date: Fri, 17 Jul 2020 17:01:00 +0200 Message-ID: <9275553.NR17kIY6SJ@thomas> In-Reply-To: <20200715212228.28010-7-stephen@networkplumber.org> References: <20200506193741.24117-1-stephen@networkplumber.org> <20200715212228.28010-1-stephen@networkplumber.org> <20200715212228.28010-7-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 6/7] app/proc-info: provide way to request info on owned ports 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 15/07/2020 23:22, Stephen Hemminger: > --- a/app/proc-info/Makefile > +++ b/app/proc-info/Makefile > +CFLAGS += -DALLOW_EXPERIMENTAL_API not needed in app/ > +CFLAGS += -O3 > CFLAGS += $(WERROR_FLAGS) > +CFLAGS += -Wno-deprecated-declarations Which deprecated function is used? We must not use deprecated functions. > + /* If no port mask was specified, one will be provided */ Would be nice to help the user by printing a port mask of owned and unowned ports. > + if (enabled_port_mask == 0) { > + RTE_ETH_FOREACH_DEV(i) { > + enabled_port_mask |= 1u << i; > } > } > > + for (port_mask = enabled_port_mask; port_mask != 0; > + port_mask &= ~(1u << i)) { Please would be good to help drunk or sleepy readers with few comments. > + /* ffs() first bit is 1 not 0 */ > + i = ffs(port_mask) - 1; > + > + if (i >= RTE_MAX_ETHPORTS) > + break; This check is already done in rte_eth_dev_is_valid_port(). > + > + if (!rte_eth_dev_is_valid_port(i)) > + continue;