From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 01E3E3250 for ; Tue, 11 Jul 2017 17:05:58 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 71B8020774; Tue, 11 Jul 2017 11:05:58 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 11 Jul 2017 11:05:58 -0400 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:x-sasl-enc; s=mesmtp; bh=HdHTzOnQ7ll8wtG OLc4V6WdrArx7rGKiVFQjaYQiTA8=; b=KtnTk5rDd/oSjXvYiP0mRDQoJR6EFLm 5apuUwN+nZQcmXncFCZpXBjluH07nKDeqdfc5iOBT0MEUOXW1LuDAHzoLC9iTnPh drG8D53Vj99PAhCY8cdd0o+GIJhzk1rylR92/shs2pW/BWdo/7MdAQIiG/z8/glQ 5oqMB6JOPxaU= 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:x-sasl-enc; s= fm1; bh=HdHTzOnQ7ll8wtGOLc4V6WdrArx7rGKiVFQjaYQiTA8=; b=DJz+u89W zR3HfjPNXldA5Dqn4VFS5GTU5WnC971zR6jPcz81Z28z0rEQZxEuZRhyoojXXYv2 fLf1dm9IT2yOKt81JBTYHT4EFSfDisYu7SwMQJ6SUaHZBDKUAhjkUKG3HIV1601D UmqNXWueMj5MeOVmnzyNQR+tw7Hh8ePhejdDq8bphTCZlwdo/8PR5BOZHKEyqPT5 AU/UxlNgkpFOULiGhIQgRydns9YQXJ5ixHOgMbt4T4XErl3S2Z0HaJHrgCi7+PlX GMt7Mfqs59E7SmNOnftqHbJ642zsTZFycDDOScfrAORS5lGQwFA4nJ4wxQIzIfLz wz8W3K4dj6ZIdg== X-ME-Sender: X-Sasl-enc: 2hqnOQzeedYIXBBviMTL2nHx61Fpw1OzSvDhPLtBpIRE 1499785558 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1493B248EC; Tue, 11 Jul 2017 11:05:58 -0400 (EDT) From: Thomas Monjalon To: Morten =?ISO-8859-1?Q?Br=F8rup?= Cc: dev@dpdk.org, "Wiles, Keith" , Olivier Matz , "Wang, Zhihong" , Yuanhan Liu , "Ananyev, Konstantin" , "Richardson, Bruce" , "Chilikin, Andrey" , Jan Blunck , nelio.laranjeiro@6wind.com, arybchenko@solarflare.com, jerin.jacob@caviumnetworks.com Date: Tue, 11 Jul 2017 17:05:57 +0200 Message-ID: <53564501.0VCaTE2lYi@xps> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC359EB27E@smartserver.smartshare.dk> References: <1488966121-22853-1-git-send-email-olivier.matz@6wind.com> <130C769A-180F-4C74-A974-EA51E7FAD1EC@intel.com> <98CBD80474FA8B44BF855DF32C47DC359EB27E@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [dpdk-dev] [PATCH v2 6/8] mbuf: use 2 bytes for port and nb segments 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: Tue, 11 Jul 2017 15:05:59 -0000 11/07/2017 15:30, Morten Br=F8rup: > Morten Br=F8rup wrote: > > Olivier Matz wrote: > > > As I said in a previous message, I think a good first step would be to > > > introduce a typedef for the port number: rte_eth_port_num_t. > > > It can still be uint8_t for now, and can be switched to 16 bits in one > > > step when everyone uses this new type. > >=20 > > I think that DPDK follows the Linux tradition of exposing the variable > > types, as opposed to hiding them behind typedefs. This has the > > unfortunate consequence that when a variable type changes, it has to be > > changed everywhere. > >=20 > > Introducing a rte_eth_port_num_t will require changing the same files > > at the same locations everywhere, so not even as a temporary solution > > will it be beneficial. [...] > What I was trying to communicate with my long argument about type definit= ions was: When the type changed from 8 bit to 16 bit, the type needs to cha= nge from uint8_t to uint16_t everywhere too, including in the ethdev APIs. >=20 > Don't start breaking coding conventions here by hiding the type of this v= ariable. So, Morten, you are against the typedef, right? Because we need to change it everywhere anyway, right? Note: I have no strong opinion.