From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08FB1A0514 for ; Wed, 15 Jan 2020 19:29:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 645E41C246; Wed, 15 Jan 2020 19:29:38 +0100 (CET) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by dpdk.org (Postfix) with ESMTP id 7E58E1C244 for ; Wed, 15 Jan 2020 19:29:37 +0100 (CET) Received: by mail-pj1-f48.google.com with SMTP id m13so307094pjb.2 for ; Wed, 15 Jan 2020 10:29:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LsrKiKBovmzZuvpImwidfmPk4iefRXjG/Y/hJvt8YE4=; b=ccL9HoBLBLhzneb2/Dyas9Z11CPmT1WjHN393l9nnHNhF938trJWs6UUN1wCQ7UR2F v/ea1zpIkA8/cxr32fHfO2Nly13xDyi1905bFqBil9y2gRD/wWaxM79ULcqYijn+sKTp 21/mh8e+yfPQHlVeDclFmavjmKq80oP5im6gVN7Hq+Thpj6ILTO9E9PghgkgXHn5GeGR hGsCgCaZNV/gaBAql5ROH5Yg+7j6rPizVmsNwaZcn7EaNr0WeQOJATPJMa3ANfre+5nQ g7cJA7LEllZjpK/YI2Z3w6N9gtN4RN5WR+tKg8Ck+0CMqHpO3wee1my9wHN3iUD3qSo9 I0PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LsrKiKBovmzZuvpImwidfmPk4iefRXjG/Y/hJvt8YE4=; b=pOHsLuGc4Qkrh8bufSb+VeRfwHlN+La60/afgqspe9Rn1JhArmxOgTYyrzMKHkJIRS IoVavcMddDF+XUFMET8ct6aSJEaimD8eew2RlMxddkHJies8ffkw7cEiMZsF99n2kbW3 EF202PEeRH+7cFZY5WFn4eyDf2gb4HtI8lgWjtxR00SdedcufhNIK4EW0/Ywnk2YjJFK MCOIdqI1B4WNZhdvdrwUQyi1C5kYhPVJ66cNy4r8njmoBakiCf2LGlYZQrMppHllkssu hBluJNawEOsww0i3QP9An0rs8agqp0GcTZNg+uI/S2X6j+g254wDDR4le7oo3F0hbl4v C9Bw== X-Gm-Message-State: APjAAAVMMFvRwqsNo+N+Qhl4Rv0hC0fF+ppJig4KmkwSq5ExaYaXdabR RZ/B+vtu5OMn5SDl22Su7zN+ug== X-Google-Smtp-Source: APXvYqwZxUIB0m3wS08+cohye/Z+rDUPVfVsQG7fz30TJDII8QZ8fLAfyz0utw00XkYGjoKc5AdCkw== X-Received: by 2002:a17:90a:858a:: with SMTP id m10mr1379697pjn.117.1579112976608; Wed, 15 Jan 2020 10:29:36 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z16sm23262739pff.125.2020.01.15.10.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 10:29:36 -0800 (PST) Date: Wed, 15 Jan 2020 10:29:28 -0800 From: Stephen Hemminger To: "Girard, Guillaume" Cc: "users@dpdk.org" Message-ID: <20200115102928.64c865da@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] rte_pktmbuf_free does not reset headroom X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Wed, 15 Jan 2020 16:40:47 +0000 "Girard, Guillaume" wrote: > Hi, > > From my experiments prepending data to an mbuf, rte_pktmbuf_free() does not reset the headroom. Is that intended? > > Thanks, > Guillaume > > Intel Deutschland GmbH > Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Gary Kershaw > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928 > Free doesn't need to do anything to the mbuf. After free the state of the mbuf is indeterminate (ie. it can be what ever rte_mbuf code wants). The headroom is reset in rte_pktmbuf_reset() which is called by rte_pktmbuf_alloc().