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 000F3A00E6 for ; Thu, 11 Jul 2019 11:25:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C768B4C8E; Thu, 11 Jul 2019 11:25:01 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by dpdk.org (Postfix) with ESMTP id 90EFD3772 for ; Thu, 11 Jul 2019 11:25:00 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 957B24CC; Thu, 11 Jul 2019 05:24:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 11 Jul 2019 05:24:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=76ukE/wYdwyMzJH5hA3siI/v2y7eBdQYqdkuFcY45os=; b=BGdGuFHCZxLD QLsgeRZHLYVmoqeFdf7OmzdrAIBJOa/gyBfP9WkwGjBvTZWtjMCR3NYhvVoX7xZX tvdMznOdhGXldjIui/GM5CDSisUT3CZSNcDpEyViML148V+pgZMTD7GC2AHRFWLT b/jXifHTwOjqKTaaFlgt+UI/WhKDEmA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=76ukE/wYdwyMzJH5hA3siI/v2y7eBdQYqdkuFcY45 os=; b=MRjaXOa6sjO9Bom68Hlx7xfC0RJJ/YYTf4lDkK+wyvcjqytmvkBxCp2O9 hmKGHXOHGbx8MWR8a8pm6PQNN1Jru3oP/QJghraTuo11i7LvM5OKaqwofAfsbdca qCvtvIRtlWGueydFatt8wnlJHnC1/Cz+oGE78K/pDe/TT1mGRDZqA9k5Ne7jx8sM 6WnawBtsDTd359uGfWQOpMWm72OmcDvmpgCzzV5c+sTRfO03987LOByqh+e8VwOq FPH+NvAwS3JWYWf30mDLt130LjCvRBMO1DTqJ0edzX3I3JF+GMya8HZdIPcvt+yS clr8kxgo6IZkfypVcH3xyNngKk6xQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrgeekgdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 38755380074; Thu, 11 Jul 2019 05:24:58 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Olivier Matz Date: Thu, 11 Jul 2019 11:24:56 +0200 Message-ID: <3271755.RraMFotM2p@xps> In-Reply-To: <20190710092907.5565-1-olivier.matz@6wind.com> References: <20190710092907.5565-1-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 10/07/2019 11:29, Olivier Matz: > Many features require to store data inside the mbuf. As the room in mbuf > structure is limited, it is not possible to have a field for each > feature. Also, changing fields in the mbuf structure can break the API > or ABI. > > This commit addresses these issues, by enabling the dynamic registration > of fields or flags: > > - a dynamic field is a named area in the rte_mbuf structure, with a > given size (>= 1 byte) and alignment constraint. > - a dynamic flag is a named bit in the rte_mbuf structure. > > The typical use case is a PMD that registers space for an offload > feature, when the application requests to enable this feature. As > the space in mbuf is limited, the space should only be reserved if it > is going to be used (i.e when the application explicitly asks for it). > > The registration can be done at any moment, but it is not possible > to unregister fields or flags for now. > > Signed-off-by: Olivier Matz I fully support this solution. It will give a lot of space for new features and will solve the ABI stability problem. Next step, I would like to move some existing mbuf fields to this dynamic model. It will increase the free space in mbuf to be used by dynamic fields. By converting some fields which are currently union'ed, we can also fix the issue of these features being exclusive. Acked-by: Thomas Monjalon