From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E1C98A04AB; Fri, 8 Nov 2019 04:41:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 85A721BF49; Fri, 8 Nov 2019 04:41:44 +0100 (CET) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id C6E641BF2C for ; Fri, 8 Nov 2019 04:41:42 +0100 (CET) Received: by mail-pg1-f193.google.com with SMTP id k13so3220613pgh.3 for ; Thu, 07 Nov 2019 19:41:42 -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=qUae1FxqgZdYbzxT3qQ3rVuEY2XZnVna4jhD8IdRt04=; b=1vhOrEnya2eWpMPbV22cf8b4Pg+3rp3Jx9pZgPr0YoRL1UtwQxLP2YC7SEaqyYGIb5 gAVGSqAesVPO9iMyIGjt0pfMP+ID5BaAOc2VeaPzf8gli75EFmWu/+RigGVd5/ImxUhL R6TjwckcJagZ+nm1+DQxZoU930XhwsP5DUDgL8INIsuvcFEwwU/Y6Ah3rS30QysW1Iup Mjz0QDQWMirvSirYWQI28cyCHJU/DWdZFP50q5Dk0SSUWZkuMLSBzbk4moyB6WgsRuX7 MzVaApYT+SUruRlP31Y4BhZP2ZcEhkt0TAZ4wkmO4npMvyBoWeRsZJbE9tijepCCpeVD 45Yw== 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=qUae1FxqgZdYbzxT3qQ3rVuEY2XZnVna4jhD8IdRt04=; b=V/l3u5uLcaMGvsVSRS/SD/MVD+wft8b4P1BGvNAGRPzdxGGH5ddn8f2pmeU+R3+8hc 9whnqmYaUliQ1EzS9tnykzmnBMdMcBQ0f5mW7E6wc5fDT3saTm/t3ZC3S94+Venw16Ms pfm6IG4CevBHUA9DtHkLdlEQa7D4QQ5thhPqY+jrqkCfijqA4wzVeD4eHnL7z3uq5rsm /pUbRz47g196cK+7760oS8dl+YB31T9MbWeqSYIz2X13sFjFjXQXoRNoSreKcfdaS2Er OI4wL6Y06tgSOAaWApJ6Ji/JTz6W8P/gsNfanRqHC1bbsMYz/g6p2gR/L6St3olsks1S 9S8g== X-Gm-Message-State: APjAAAU/tx9hl3lXR/1F0+msxvGMrocUxI3jDriOf81wUwFSdCkrFwHN wTeD+acsVJuaA6sEwqa5VgFtWB+gy7JnAQ== X-Google-Smtp-Source: APXvYqxczUz5TV6njumvIG+Z0D6Tv9gRQfjSMMAJRH9kOc+WafNS3fnTttyL8OvHA2jhbemoOQ/I8A== X-Received: by 2002:a62:a50a:: with SMTP id v10mr8692481pfm.222.1573184501854; Thu, 07 Nov 2019 19:41:41 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id a25sm3952990pff.50.2019.11.07.19.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 19:41:41 -0800 (PST) Date: Thu, 7 Nov 2019 19:41:33 -0800 From: Stephen Hemminger To: Thomas Monjalon Cc: Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org Message-ID: <20191107194133.7db88620@hermes.lan> In-Reply-To: <20191107221524.23205-1-thomas@monjalon.net> References: <20191107221524.23205-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] ethdev: reserve space in main structs for extension 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, 7 Nov 2019 23:15:24 +0100 Thomas Monjalon wrote: > The struct rte_eth_dev and rte_eth_dev_data are supposed > to be used internally only, but there is a chance that > increasing their size would break ABI for some applications. > In order to allow smooth addition of features without breaking > ABI compatibility, some space is reserved. > > Signed-off-by: Thomas Monjalon > --- > lib/librte_ethdev/rte_ethdev_core.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h > index 392aea8e6b..ea8dd1d9ba 100644 > --- a/lib/librte_ethdev/rte_ethdev_core.h > +++ b/lib/librte_ethdev/rte_ethdev_core.h > @@ -698,6 +698,9 @@ struct rte_eth_dev { > struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT]; > enum rte_eth_dev_state state; /**< Flag indicating the port state */ > void *security_ctx; /**< Context for security ops */ > + > + uint64_t reserved_64s[4]; /**< Reserved for future fields */ > + void *reserved_ptrs[4]; /**< Reserved for future fields */ > } __rte_cache_aligned; > > struct rte_eth_dev_sriov; > @@ -764,6 +767,9 @@ struct rte_eth_dev_data { > /**< Switch-specific identifier. > * Valid if RTE_ETH_DEV_REPRESENTOR in dev_flags. > */ > + > + uint64_t reserved_64s[4]; /**< Reserved for future fields */ > + void *reserved_ptrs[4]; /**< Reserved for future fields */ > } __rte_cache_aligned; > > /** Void * is 32 bits on 32 bit architectures is that helpful or not?