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 57E72A00E6 for ; Thu, 11 Jul 2019 09:36:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35D7A397D; Thu, 11 Jul 2019 09:36:41 +0200 (CEST) Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 1B0C83772 for ; Thu, 11 Jul 2019 09:36:40 +0200 (CEST) Received: from core.dev.6wind.com (unknown [10.0.0.1]) by proxy.6wind.com (Postfix) with ESMTPS id EDDEF2E51A2; Thu, 11 Jul 2019 09:36:39 +0200 (CEST) Received: from [10.16.0.195] (helo=6wind.com) by core.dev.6wind.com with smtp (Exim 4.84_2) (envelope-from ) id 1hlTd8-0002am-TT; Thu, 11 Jul 2019 09:36:39 +0200 Received: by 6wind.com (sSMTP sendmail emulation); Thu, 11 Jul 2019 09:36:38 +0200 Date: Thu, 11 Jul 2019 09:36:38 +0200 From: Olivier Matz To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: <20190711073638.64ljp526pengnwga@glumotte.dev.6wind.com> References: <20190710092907.5565-1-olivier.matz@6wind.com> <20190710104917.73bc9201@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190710104917.73bc9201@hermes.lan> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [RFC] mbuf: support dynamic fields and flags 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 Wed, Jul 10, 2019 at 10:49:17AM -0700, Stephen Hemminger wrote: > On Wed, 10 Jul 2019 11:29:07 +0200 > Olivier Matz wrote: > > > /** > > * Indicate that the metadata field in the mbuf is in use. > > @@ -738,6 +741,8 @@ struct rte_mbuf { > > */ > > struct rte_mbuf_ext_shared_info *shinfo; > > > > + uint64_t dynfield1; /**< Reserved for dynamic fields. */ > > + uint64_t dynfield2; /**< Reserved for dynamic fields. */ > > } __rte_cache_aligned; > > Growing mbuf is a fundamental ABI break and this needs > higher level approval. The size of the mbuf is still 128, I used the last 16 bytes that were unused. Later, we can think about removing existing fields and replace them by a dynfield area, which can be anywhere in the structure (even if it is in a 1 byte hole). > Why not one pointer? A pointer to what? > It looks like you are creating something like FreeBSD m_tag. > Why not use that? My implementation targets performance (accessing to *(mbuf + offset) should be nearly as fast as accessing to a static field), at the price of less flexibility compared to something like FreeBSD m_tag.