From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 3221A11DE for ; Thu, 16 Mar 2017 04:41:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489635678; x=1521171678; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=xScq6vmJVre5aeesZRiuun97YgfQJVykKWySM149ofA=; b=uSOfo40LErkck818bCOYh11Z3UH6HMR04L+TSf2lUAu9JMGuarZTdaa5 LeIqmcD0cGJ57GDblOxZ4N6wM4+7/Q==; Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2017 20:41:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,170,1486454400"; d="scan'208";a="835176993" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 15 Mar 2017 20:41:15 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 15 Mar 2017 20:41:15 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.172]) by fmsmsx158.amr.corp.intel.com ([169.254.15.247]) with mapi id 14.03.0248.002; Wed, 15 Mar 2017 20:41:15 -0700 From: "Wiles, Keith" To: Mike Shang CC: "users@dpdk.org" Thread-Topic: [dpdk-users] manually construct mbuf Thread-Index: AQHSngVoWFYjMwsn2UmEphRBier6F6GXR6AA Date: Thu, 16 Mar 2017 03:41:14 +0000 Message-ID: <1645CF06-8334-4E53-85DB-DE4D566B5D6E@intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.192.118] Content-Type: text/plain; charset="us-ascii" Content-ID: <628118C389F29D4FA6AB1F0AAE3AD9E1@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] manually construct mbuf 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: , X-List-Received-Date: Thu, 16 Mar 2017 03:41:18 -0000 > On Mar 16, 2017, at 11:28 AM, Mike Shang wrote: >=20 > Is it possible to construct mbuf manually instead getting one from > mempool ? I've got a situation that needs to handle a relatively small > number of jumbo frames, we keep a mempool of objects of regular size and > wanted to construct mbuf ourselves for jumbo frames as one segment using > rte_malloc. I have searched the dpdk source code a bit but can't find suc= h > use case. Is it doable with dpdk ? Or it's recommended to keep a separate > mempool for objects of larger size ? You could try to construct your own mbuf, but when the system attempts to f= ree the mbuf you would need to build a lot more then just the mbuf as the m= empool pointer is hiding in the data/mbuf and it expects to point to a vali= d mempool. What I would do is just allocate a couple jumbo mbuf in a new mempool alloc= ation and use those mbufs when you want to send jumbo frames. Trying to cre= ate a special mbuf is not going to super simple, just create a new mempool = with N number of mbufs. >=20 > Thanks, > Mike Regards, Keith