From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC v3] /net: memory interface (memif) Date: Thu, 13 Dec 2018 10:07:09 -0800 Message-ID: <20181213100709.2df8f718@xeon-e3> References: <20181213133051.18779-1-jgrajcia@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: To: Jakub Grajciar Return-path: Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by dpdk.org (Postfix) with ESMTP id 160A01B565 for ; Thu, 13 Dec 2018 19:07:14 +0100 (CET) Received: by mail-pf1-f172.google.com with SMTP id c73so1470084pfe.13 for ; Thu, 13 Dec 2018 10:07:13 -0800 (PST) In-Reply-To: <20181213133051.18779-1-jgrajcia@cisco.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 Thu, 13 Dec 2018 14:30:51 +0100 Jakub Grajciar wrote: > + > +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; > + Seems very typedef heavy to me. Having more typedefs does not improve the readability. > +typedef struct __attribute__ ((packed)) { Use __rte_packed rather than attributes directly. > +typedef struct __attribute__ ((packed)) { > + uint8_t if_name[32]; > +} memif_msg_connect_t; > + Why magic constant 32? Better to use something like #define MEMIF_NAMESZ 32 Also, I am confused about how this relates to DPDK device names and Linux network device names (if at all).