From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 1/4] mbuf: add accessor function for private data area Date: Fri, 13 Jul 2018 23:10:29 +0200 Message-ID: <2026591.7TBDLejgCm@xps> References: <20180618233534.21611-1-dg@adax.com> <20180626073904.nsieqomdqq3xmr62@platinum> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Olivier Matz To: Dan Gora Return-path: Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by dpdk.org (Postfix) with ESMTP id 9AC922B86 for ; Fri, 13 Jul 2018 23:10:32 +0200 (CEST) In-Reply-To: <20180626073904.nsieqomdqq3xmr62@platinum> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 26/06/2018 09:39, Olivier Matz: > Hi Dan, > > On Mon, Jun 18, 2018 at 04:35:34PM -0700, Dan Gora wrote: > > Add an inline accessor function to return the starting address of > > the private data area in the supplied mbuf. > > > > This allows applications to easily access the private data area between > > the struct rte_mbuf and the data buffer in the specified mbuf without > > creating private macros or accessor functions. > > > > No checks are made to ensure that a private data area actually exists > > in the buffer. > > > > Signed-off-by: Dan Gora > > Thank you for this patch. > > Few (late) comments to your previous questions: > > - about rte_mbuf vs rte_pktmbuf, as Andrew said pktmbuf was used in > the past when there was a ctrlmbuf. This one has been removed now, so > mbuf should be used. > > - I agree that removing the test (m->priv_size == 0) is better for > the reasons mentionned, and also because it would add a test in the > dataplane area, which would sometimes be useless: the application create > the mbuf pools, so it can know that all mbufs have a priv area. > > > Acked-by: Olivier Matz Series applied