From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: mbuf changes Date: Tue, 25 Oct 2016 11:39:15 +0200 Message-ID: <20161025093915.GJ5733@6wind.com> References: <98CBD80474FA8B44BF855DF32C47DC359EA8B1@smartserver.smartshare.dk> <7910CF2F-7087-4307-A9AC-DE0287104185@intel.com> <20161024162538.GA34988@bricha3-MOBL3.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: "Wiles, Keith" , Morten =?utf-8?Q?Br=C3=B8rup?= , "dev@dpdk.org" , Olivier Matz , Oleg Kuporosov To: Bruce Richardson Return-path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 75D1758EC for ; Tue, 25 Oct 2016 11:39:22 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id d128so16327725wmf.1 for ; Tue, 25 Oct 2016 02:39:22 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20161024162538.GA34988@bricha3-MOBL3.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Oct 24, 2016 at 05:25:38PM +0100, Bruce Richardson wrote: > On Mon, Oct 24, 2016 at 04:11:33PM +0000, Wiles, Keith wrote: [...] > > > On Oct 24, 2016, at 10:49 AM, Morten Brørup wrote: [...] > > > 5. > > > > > > And here’s something new to think about: > > > > > > m->next already reveals if there are more segments to a packet. Which purpose does m->nb_segs serve that is not already covered by m->next? > > It is duplicate info, but nb_segs can be used to check the validity of > the next pointer without having to read the second mbuf cacheline. > > Whether it's worth having is something I'm happy enough to discuss, > though. Although slower in some cases than a full blown "next packet" pointer, nb_segs can also be conveniently abused to link several packets and their segments in the same list without wasting space. > One other point I'll mention is that we need to have a discussion on > how/where to add in a timestamp value into the mbuf. Personally, I think > it can be in a union with the sequence number value, but I also suspect > that 32-bits of a timestamp is not going to be enough for many. > > Thoughts? If we consider that timestamp representation should use nanosecond granularity, a 32-bit value may likely wrap around too quickly to be useful. We can also assume that applications requesting timestamps may care more about latency than throughput, Oleg found that using the second cache line for this purpose had a noticeable impact [1]. [1] http://dpdk.org/ml/archives/dev/2016-October/049237.html -- Adrien Mazarguil 6WIND