From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=UG04wwivlBpD1MuomApiRrxKGBa7/brpl4MHHQ2igpw=; b=1KJ/C4hJb8yJsENtHbv/xX+MRv2WW/CUBrlNUcjc0WlTrf/T/bOZA1RYYr1eKgjiTn D2VSZaYDn76eVLq4u8+5PmvnS3GZWKlISDIcE434DpoqldfBT0dQbJDZPzXxku1Ao51L 5WYjvBIgPZ60zpb+gzTjImtsq9XxjJZ29NmQpjBUOZxG+gvLy7uuhAat1JDOS13qHlrl 8nYh5Pj7ssI1MtgCBUiZ3PeE/gSiRL3++EvzYLMO7fXB4i0IyyiR8icbhvqcJMMbQULp AWd3dlsiNPDEKJKtpMi0MTQx4W6YazGJnSKMtbHzkufXF39U/xVJSBtNw+4jrMAkx6B3 C5ag== 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=UG04wwivlBpD1MuomApiRrxKGBa7/brpl4MHHQ2igpw=; b=aFlRiSZEZZzKMOaS1E5e0FrBsrMrbTphDIu2zX3zmQAGwh3UFDZ/8NeJ+xuO3yoyYB AVamc0HSQW0JYuworFhYHggMf3QwioUYLRtKuEPcmdvmAW03RcaAvgkLhJQNWfmqo6tP fF38JjkO4rqpQOINNgaNQvWTKWdxVBe3hzLxkTznHUqHhEt17I1V0PpQjyRQakhjk9RP Rk1YEG3h6Up0uIY0BLW4FOyTxJjwzSObGXPzp8NLRtYjpPsCVNjnLQV6gocln52I0qf0 q/p9rQo5QffZ4+eu0eGKXq9FIx+u3Q0zOwa5W+y72Mp5XnNu/6KwazY/1kax7edcPOAS VF/A== X-Gm-Message-State: AA+aEWbtS0Brcqzm5j1dBM8NbkazHHC1jYLjWGhtKM0uajeF2aDJJM6c u7CfeENft3Dg4htpWDGSBSfOag== X-Google-Smtp-Source: AFSGD/WsXiJUt1MwO2H4+0aYIHuFx6zrIvVAYKwdz3GS3cHQubdk3643l2k9FTEZ06REHqr70Bh5MA== X-Received: by 2002:a63:484c:: with SMTP id x12mr22484548pgk.375.1544724433091; Thu, 13 Dec 2018 10:07:13 -0800 (PST) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z9sm7409614pfd.99.2018.12.13.10.07.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Dec 2018 10:07:13 -0800 (PST) Date: Thu, 13 Dec 2018 10:07:09 -0800 From: Stephen Hemminger To: Jakub Grajciar Cc: Message-ID: <20181213100709.2df8f718@xeon-e3> In-Reply-To: <20181213133051.18779-1-jgrajcia@cisco.com> References: <20181213133051.18779-1-jgrajcia@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC v3] /net: memory interface (memif) 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: Thu, 13 Dec 2018 18:07:14 -0000 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).