From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AA3712C50 for ; Mon, 20 Feb 2017 00:45:57 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2017 15:45:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,183,1484035200"; d="scan'208";a="60281098" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga004.jf.intel.com with ESMTP; 19 Feb 2017 15:45:55 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.38]) by IRSMSX101.ger.corp.intel.com ([169.254.1.112]) with mapi id 14.03.0248.002; Sun, 19 Feb 2017 23:45:54 +0000 From: "Ananyev, Konstantin" To: Olivier Matz CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC 0/8] mbuf: structure reorganization Thread-Index: AQHSdlXOvL8VQlbyOU+/T85mDKip26FcYNGAgA9pHoCAAhdR4A== Date: Sun, 19 Feb 2017 23:45:53 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772583F11955A@irsmsx105.ger.corp.intel.com> References: <1485271173-13408-1-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB9772583F111A29@irsmsx105.ger.corp.intel.com> <20170216144807.7add2c71@platinum> In-Reply-To: <20170216144807.7add2c71@platinum> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC 0/8] mbuf: structure reorganization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2017 23:45:58 -0000 Hi Olivier, >=20 > > > - m->next, m->nb_segs, and m->refcnt are always initialized for > > > mbufs in the pool, avoiding the need of setting m->next (located in > > > the 2nd cache line) in the Rx path for mono-segment packets. > > > - change port and nb_segs to 16 bits > > > > Not that I am completely against it, > > but changing nb_segs to 16 bits seems like an overkill to me. > > I think we can keep and extra 8bits for something more useful in > > future. >=20 > In my case, I use the m->next field to chain more than 256 segments for > L4 socket buffers. It also updates nb_seg that can overflow. It's not > a big issue since at the end, nb_seg is decremented for each segment. > On the other hand, if I enable some sanity checks on mbufs, it > complains because the number of segments is not equal to nb_seg. I still have a hard time imaging some practical use-case for packet that spawns over 256 segments. But might that is just my poor imagination, so ok if you guys believe there are some real-world use cases - I wouldn't object here. Konstantin