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 C30FE8D93 for ; Wed, 5 Oct 2016 14:02:28 +0200 (CEST) Received: from lfbn-1-5996-232.w90-110.abo.wanadoo.fr ([90.110.195.232] helo=[192.168.1.13]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1brkx3-0001Oh-7Q; Wed, 05 Oct 2016 14:05:38 +0200 To: Maxime Coquelin , dev@dpdk.org References: <1475582724-5202-1-git-send-email-maxime.coquelin@redhat.com> Cc: stephen@networkplumber.org, mst@redhat.com, yuanhan.liu@linux.intel.com From: Olivier Matz Message-ID: Date: Wed, 5 Oct 2016 14:02:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: <1475582724-5202-1-git-send-email-maxime.coquelin@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/2] mbuf: add rte_pktmbuff_reset_headroom function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 12:02:28 -0000 Hi Maxime, On 10/04/2016 02:05 PM, Maxime Coquelin wrote: > Some application use rte_mbuf_raw_alloc() function to improve > performance by not resetting mbuf's fields to their default state. > > This can be however problematic for mbuf consumers that need some > headroom, meaning that data_off field gets decremented after > allocation. When the mbuf is re-used afterwards, there might not > be enough room for the consumer to prepend anything, if the data_off > field is not reset to its default value. > > This patch adds a new rte_pktmbuf_reset_headroom() function that > applications can call to reset the data_off field. > This patch also replaces current data_off affectations in the mbuf > lib with a call to this function. > > Signed-off-by: Maxime Coquelin Series: Acked-by: Olivier Matz Thanks