From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Mickael Guerin Subject: Re: [PATCH 2/2] ixgbe: don't override mbuf buffer length Date: Thu, 04 Dec 2014 18:11:41 +0100 Message-ID: <548095CD.5080607@6wind.com> References: <1417703181-23093-1-git-send-email-jean-mickael.guerin@6wind.com> <20141204151500.GC9300@bricha3-MOBL3> <2601191342CEEE43887BDE71AB977258213BCA80@IRSMSX105.ger.corp.intel.com> <4349408.QROSJAq1DS@xps13> <2601191342CEEE43887BDE71AB977258213BCAE4@IRSMSX105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258213BCB11@IRSMSX105.ger.corp.intel.com> <20141204165847.GA7732@bricha3-MOBL3> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Bruce Richardson , "Ananyev, Konstantin" Return-path: In-Reply-To: <20141204165847.GA7732@bricha3-MOBL3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" >> Which makes me think, that we probably shouldn't overwrite buf_len by rxq->mbuf_initializer. >> > I believe that it is perfectly safe to do so. All buffers from a mempool are meant > to be the same size, therefore reading the length of one buffer should tell you > what size all buffers are. If we do hit a scenario where we do need to support > variable size buffers from a single mempool, we can do that via the older unoptimized > code paths, I think, since it's a definite edge case. > I agree, and there is a place to store some values unique for all mbufs in a pool: struct rte_pktmbuf_pool_private { uint16_t mbuf_data_room_size; /**< Size of data space in each mbuf.*/ }; We could add a new field mbuf_buf_len here, it looks definitely better than new callbacks in rte_mempool. What do you think?