From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by dpdk.org (Postfix) with ESMTP id 503F75933 for ; Mon, 12 May 2014 19:13:13 +0200 (CEST) Received: by mail-pa0-f41.google.com with SMTP id lj1so8932851pab.14 for ; Mon, 12 May 2014 10:13:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=6YCROQeetOMcTCNFmrklygTCHqvOV6F9LOMYlcxcB/c=; b=Z+AZyRQ9jJcTjj5furEwxSfOWmRpSCHXT9l6rn47u5HJNJHKwX0NS79er9R7K3jl3x jgHpyZQDE8FqZw+uUl32se38DiTf77mCS9j61lDjRk4FSUOBWlDlhvfdUy8K9Lb6MzMJ ZwRvCAF1SHEAqMPzjLFrbQhOChrgTSAM6rQcqk3t3qJllVlRWxQFzBt63c4vTX1I2l80 JocYuTqMJbBF1eqGe5l0mLjNALVjiVtRbNzUBgDtB8fJLQ3L2m+hHvJWgf5ko+VcWLhf u0rNlIFxHEv2n1B+6PRmNzJpV0Qr+/KtvhuppjLXVNUMx6JJ+9EinWMBOsZ0C8hVa8IH Ywqw== X-Gm-Message-State: ALoCoQnT6YTZtLLcWG53TeL3IaSdNtGKHlA/x7U8RCb+W3WAEtu88v8TO6mkHl3WR3JeyD1S4Krf X-Received: by 10.66.148.230 with SMTP id tv6mr9464647pab.155.1399914799807; Mon, 12 May 2014 10:13:19 -0700 (PDT) Received: from nehalam.linuxnetplumber.net (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id au16sm50719156pac.27.2014.05.12.10.13.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 12 May 2014 10:13:19 -0700 (PDT) Date: Mon, 12 May 2014 10:13:16 -0700 From: Stephen Hemminger To: Olivier MATZ Message-ID: <20140512101316.0c0d2824@nehalam.linuxnetplumber.net> In-Reply-To: <5370F326.8070206@6wind.com> References: <1399647038-15095-1-git-send-email-olivier.matz@6wind.com> <1399647038-15095-7-git-send-email-olivier.matz@6wind.com> <3144526.CGFdr4BbI8@xps13> <1FD9B82B8BF2CF418D9A1000154491D9740A92B8@ORSMSX102.amr.corp.intel.com> <20140512144108.GB21298@hmsreliant.think-freely.org> <5370E397.7000706@6wind.com> <20140512085924.20a29cad@nehalam.linuxnetplumber.net> <5370F326.8070206@6wind.com> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH RFC 06/11] mbuf: replace data pointer by an offset 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: Mon, 12 May 2014 17:13:13 -0000 On Mon, 12 May 2014 18:13:26 +0200 Olivier MATZ wrote: > Hi Stephen, > > On 05/12/2014 05:59 PM, Stephen Hemminger wrote: > > There is one case which this case might make problematic. > > Right now it is possible to clone an mbuf and in the cloned mbuf > > use the associated data buffer as private meta data store. > > This is convenient (like skb->cb in Linux) and avoids addtional > > allocation. > > I don't get your point. Why using rte_pktmbuf_mtod(m, char *) > wouldn't work in your case? In cloned mbuf rte_pktmbuf_mtod(m, char *) points to the original data. RTE_MBUF_TO_BADDR(m) points to buffer in the mbuf which we use for metadata (timestamp).