From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from rsa59-2-82-233-193-189.fbx.proxad.net ([82.233.193.189] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fXiZe-0003hC-Df; Tue, 26 Jun 2018 09:39:40 +0200 Received: by droids-corp.org (sSMTP sendmail emulation); Tue, 26 Jun 2018 09:39:04 +0200 Date: Tue, 26 Jun 2018 09:39:04 +0200 From: Olivier Matz To: Dan Gora Cc: dev@dpdk.org Message-ID: <20180626073904.nsieqomdqq3xmr62@platinum> References: <20180618233534.21611-1-dg@adax.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180618233534.21611-1-dg@adax.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v2 1/4] mbuf: add accessor function for private data area 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: , X-List-Received-Date: Tue, 26 Jun 2018 07:39:08 -0000 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