From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 07B1F7E6A for ; Wed, 17 Dec 2014 17:46:23 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 17 Dec 2014 08:44:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,594,1413270000"; d="scan'208,217";a="639091267" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga001.fm.intel.com with ESMTP; 17 Dec 2014 08:44:16 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.144]) by IRSMSX106.ger.corp.intel.com ([169.254.8.18]) with mapi id 14.03.0195.001; Wed, 17 Dec 2014 16:44:16 +0000 From: "Kavanagh, Mark B" To: "dev@dpdk.org" Thread-Topic: mbuf: how to set data to NULL? Thread-Index: AdAaGLFf9AHMOhYQSC+f0gYZzu+G5A== Date: Wed, 17 Dec 2014 16:44:15 +0000 Message-ID: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] mbuf: how to set data to NULL? 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: Wed, 17 Dec 2014 16:46:24 -0000 Hi, DPDK 1.8.0 removes the data pointer from the mbuf structure, such that the = start of the data in the segment buffer must be calculated (i.e. buf_addr += data_off =3D 'data'). Given this, what is the best approach to set the mbuf data to NULL (previou= sly mbuf.data =3D NULL)? As I see it, given an initialized mbuf, such that buf_addr is non-null, and= data_off =3DRTE_PKTMBUF_HEADROOM, is it fair to say that the best solution= is to memset to 0 from location (buf_addr + data_off) for a length of (dat= a_len - data_off)? Thanks in advance, Mark