From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH v2 1/4] mbuf: add accessor function for private data area Date: Tue, 26 Jun 2018 09:39:04 +0200 Message-ID: <20180626073904.nsieqomdqq3xmr62@platinum> References: <20180618233534.21611-1-dg@adax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Dan Gora Return-path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 99D165F2B for ; Tue, 26 Jun 2018 09:39:08 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20180618233534.21611-1-dg@adax.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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