From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 9AE88A00E6 for ; Thu, 16 May 2019 17:25:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3A5095F51; Thu, 16 May 2019 17:25:51 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by dpdk.org (Postfix) with ESMTP id 0B4475F1C for ; Thu, 16 May 2019 17:25:50 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id n19so2041207pfa.1 for ; Thu, 16 May 2019 08:25:49 -0700 (PDT) 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=R7DeyplsnfnP1u8z01qfRXXZxy5NMvX1zV+hArY3QSE=; b=jkjP/nZUB/mFwkKTg9tNPdzKf+q81GN/138dzO4KirsT+bZFXy8vbtY6XoV6rS7cHh M4fRC2O2pWCN0AoDb9N7kN5uGyJdE7gT/zhyXEYWZl2ZpyC9Y5s6tEg82bGbqoBYnhii +/WFXO5PYxlWZw6CpMJ74vHB4AKyeWWsmyT3hU3TO0VDLkAxbkZSO10PZHAHXBausevu AE4kEAI+oUKwlli1vbRS5ZWy3D94sgbFB17s16nz6W1se82FSwiRDmJCm6jmfplKEPwF eBRM/vdkoFF6EE+5hosw8QYnIIDh1j1lKT+H8ICKMDfu9EjYlBwyg+TYjy4Ek9OuckrV tDzQ== 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=R7DeyplsnfnP1u8z01qfRXXZxy5NMvX1zV+hArY3QSE=; b=d/VFQApMa2W7OkU5kFGK7khMFT8xgBSrygoAOG5Ej+SZ0zJvCiwVBrfK9/Tq7KqCfT lbicr6f6dP6g+8Zi3SFN4LSXpoXD0caUKOt+XUi7q1qR8mskJ9Pbky2DIBC4fqFbbAA/ 02/q6uTcQrYiMJRFUaOdKD2F8FHkgF5Fpm0py1yHqNssiwiMbYnzlrwi4wYsoE07edll TAfR9Z9K3EM5/yGKtmB/mLnpWr+FeQAaUslsrbd3AQeZHnOG/YZTK8dUvGz8dHpCKjt2 mu4KXcQJGEvvU/w7YHOH+hq2PZnOfGVPO/oNAGUMiBAv8oNsRnHLlVdVbqbzASmht96O +8bA== X-Gm-Message-State: APjAAAU74Jb35uUxXbwheK1mZUXDbfL3PWt/qb14ISp3BAblLGoK3ZVt RAwn6TG5t+plvGYL35QmTKtvFg== X-Google-Smtp-Source: APXvYqx5JN4bLXxuUx1VBDLVkXm8nQb/RyEpzlvQmaWRjjhjcNSKWAykqkFs/L61kwm+pLowcVXM0g== X-Received: by 2002:aa7:925a:: with SMTP id 26mr53847228pfp.152.1558020349020; Thu, 16 May 2019 08:25:49 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id h14sm6399291pgj.8.2019.05.16.08.25.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 May 2019 08:25:48 -0700 (PDT) Date: Thu, 16 May 2019 08:25:42 -0700 From: Stephen Hemminger To: Jakub Grajciar Cc: Message-ID: <20190516082542.460aad54@hermes.lan> In-Reply-To: <20190516114658.29102-1-jgrajcia@cisco.com> References: <20190513104552.27843-1-jgrajcia@cisco.com> <20190516114658.29102-1-jgrajcia@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC v8] /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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 16 May 2019 13:46:58 +0200 Jakub Grajciar wrote: > + /* remote info */ > + char remote_name[64]; /**< remote app name */ > + char remote_if_name[64]; Hard coding magic string sizes has future potential for disaster. Could you at least add a #define. > +typedef struct __rte_packed { > + uint8_t name[MEMIF_NAME_SZ]; /**< Client app name. In this case DPDK version */ > + memif_version_t min_version; /**< lowest supported memif version */ > + memif_version_t max_version; /**< highest supported memif version */ > + memif_region_index_t max_region; /**< maximum num of regions */ > + memif_ring_index_t max_m2s_ring; /**< maximum num of M2S ring */ > + memif_ring_index_t max_s2m_ring; /**< maximum num of S2M rings */ > + memif_log2_ring_size_t max_log2_ring_size; /**< maximum ring size (as log2) */ > +} memif_msg_hello_t; Why is name a uint8_t not char? Are end up having to cast it. Maybe it is because it UTF-8 or you have some subsystem where sizeof(char) != sizeof(uint8_t)?