From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wiles, Keith" Subject: Re: [RFC v3] /net: memory interface (memif) Date: Fri, 14 Dec 2018 16:12:23 +0000 Message-ID: <119DE381-6748-4C84-8B0F-1D4BDABA8033@intel.com> References: <20181213133051.18779-1-jgrajcia@cisco.com> <20181213100709.2df8f718@xeon-e3> <20181214093958.GA16664@bricha3-MOBL.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Stephen Hemminger , Jakub Grajciar , "dev@dpdk.org" To: "Richardson, Bruce" Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 741481B700 for ; Fri, 14 Dec 2018 17:12:27 +0100 (CET) In-Reply-To: <20181214093958.GA16664@bricha3-MOBL.ger.corp.intel.com> Content-Language: en-US Content-ID: <4080819C3A882E41AE501766D9E37144@intel.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" > On Dec 14, 2018, at 3:39 AM, Bruce Richardson wrote: >=20 > On Thu, Dec 13, 2018 at 10:07:09AM -0800, Stephen Hemminger wrote: >> On Thu, 13 Dec 2018 14:30:51 +0100 >> Jakub Grajciar wrote: >>=20 >>> + >>> +typedef uint16_t memif_region_index_t; >>> +typedef uint32_t memif_region_offset_t; >>> +typedef uint64_t memif_region_size_t; >>> +typedef uint16_t memif_ring_index_t; >>> +typedef uint32_t memif_interface_id_t; >>> +typedef uint16_t memif_version_t; >>> +typedef uint8_t memif_log2_ring_size_t; >>> + >>=20 >> Seems very typedef heavy to me. Having more typedefs >> does not improve the readability. >>=20 >=20 > +1 > Our coding guidelines generally recommend against using typedefs, though > they generally refer to structure typedefs rather than typedefs for basic > types. The guide lines do suggest not to use typedefs, but here is a PMD which is = self contained in that the headers are not normally used outside of the PMD= . This means to me that typedefs in this give case to reasonable. Plus it i= s a suggestion in the guide lines and the cases talked about in the guide s= eem to be all related to headers that are more globally used. I suggest he can keep these typedefs in this case, as we have done a someth= ing much more wide scope with port id typedef. >=20 > /Bruce Regards, Keith