From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from insanity1.niometrics.com (insanity.niometrics.com [173.255.214.239]) by dpdk.org (Postfix) with ESMTP id 088CD694A for ; Tue, 18 Feb 2014 15:18:24 +0100 (CET) Received: from [10.0.1.4] (cm142.sigma148.maxonline.com.sg [218.212.148.142]) (authenticated bits=0) by insanity1.niometrics.com (8.13.8/8.13.8) with ESMTP id s1IEJbQC018486 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 18 Feb 2014 22:19:42 +0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) From: Periklis Akritidis In-Reply-To: <20140218102749.270040@gmx.com> Date: Tue, 18 Feb 2014 22:19:36 +0800 Content-Transfer-Encoding: quoted-printable Message-Id: <78841534-98AB-4845-9FAF-CAC975D15D3A@niometrics.com> References: <20140218102749.270040@gmx.com> To: Mario Gianni X-Mailer: Apple Mail (2.1827) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] problem with rte_pktmbuf_prepend (possible bug?) 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: Tue, 18 Feb 2014 14:18:25 -0000 Hi Mario, Are you passing rte_pktmbuf_init as the obj_init argument to = rte_mempool_create? It is called when the mbuf if freed and it will reset the fields. I = vaguely remember I had the same issue at some point and resolved it = somehow. This comes to mind. Cheers, Periklis On 18 Feb, 2014, at 6:27 pm, Mario Gianni wrote: > Hi all, I'm experimenting some code with DPDK v1.5.0 and I have the = following problem: >=20 > I have a thread that receives packets from NIC, once I received a = packet I want to prepend some data to it and I try to do so through the = function rte_pktmbuf_prepend() > then the packet is enqueued in a ring buffer where it will be used by = a client thread before being dropped through the function = rte_pktmbuf_free() called by the client thread. >=20 > Now, if I try to send packets to this program I have the following = behaviour: > In a first time it seems to work correctly, then after a certain = number of received packets (approximately the same number as the number = of mbufs present in the mempool) if I call the rte_pktmbuf_headroom it = returns that the headroom is shrinking more than the expected, until = after a certain number of packets the headroom goes to zero. >=20 > It seems like that when I call the rte_pktmbuf_free() function it = doesn't reset the data position inside the mbuf, so when I call for a = second time the mbuf the headroom continues to shrink until it finishes. >=20 >=20 > Do you have any idea of this strange behaviour?Could it be a bug in = the prepend/free function? >=20 >=20 > Thank you, >=20 > Mario