From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0046.outbound.protection.outlook.com [104.47.42.46]) by dpdk.org (Postfix) with ESMTP id A8D0323A for ; Thu, 12 Oct 2017 06:51:48 +0200 (CEST) Received: from BN3PR03CA0115.namprd03.prod.outlook.com (10.174.66.33) by BN6PR03MB2692.namprd03.prod.outlook.com (10.173.144.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 12 Oct 2017 04:51:46 +0000 Received: from BY2FFO11FD045.protection.gbl (2a01:111:f400:7c0c::174) by BN3PR03CA0115.outlook.office365.com (2603:10b6:400:4::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Thu, 12 Oct 2017 04:51:46 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD045.mail.protection.outlook.com (10.1.15.177) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Thu, 12 Oct 2017 04:51:45 +0000 Received: from [10.232.133.65] (B10814-12.ap.freescale.net [10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v9C4pgtu001008; Wed, 11 Oct 2017 21:51:43 -0700 To: References: <1504690460-30616-1-git-send-email-hemant.agrawal@nxp.com> CC: "dev@dpdk.org" , From: Hemant Agrawal Message-ID: <712c481a-6813-9889-4faa-e4472bc66210@nxp.com> Date: Thu, 12 Oct 2017 10:21:42 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1504690460-30616-1-git-send-email-hemant.agrawal@nxp.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131522575059795864; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(376002)(39380400002)(39860400002)(346002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(377454003)(199003)(24454002)(189002)(106466001)(2950100002)(6916009)(189998001)(8936002)(2906002)(81166006)(316002)(81156014)(2351001)(305945005)(83506001)(85426001)(54356999)(230700001)(53546010)(229853002)(65806001)(76176999)(77096006)(23746002)(8676002)(97736004)(65956001)(50986999)(47776003)(53936002)(6246003)(50466002)(33646002)(64126003)(104016004)(8656003)(31696002)(58126008)(498600001)(54906003)(4326008)(65826007)(105606002)(356003)(5660300001)(36756003)(68736007)(86362001)(31686004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2692; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD045; 1:5OonQXSbYh20Jj2hBZkNsBN5tPdjJ1pSn00oUjjYwXMCMo++iCfySD8wKnmo8y03Lkgq1epr8CnFPQ4YCSFDXC4Oxb30AzbdLJ0khvh7oyFUP7PgJllstRBHQ9cpnybC X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 40febc83-0bc6-4e07-d341-08d5112cf0c3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:BN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4:fxTkfqSWhIyOCNakxvNDMosoT2orjM9YQ77sQ9xKPTB3SPLmaMBslNyFiAB9+CY3WaVypZjaylTuMa932j8F/1AGiEYBS32rGd9vgHVLHYHlL354tqYxklO5jBLcGyHGwuH/srLveAqENhjUXt87odlIx/70Pr/oplYyTrbNQFCWT7gWWvE7+AASbiSvWVvGAO44gxN4ecVbJ2LGA8uQoTLhjRJFJU2EI2eDW+zipSBu3u7nHZFaXPvq/rZlxEvk+PoFYipQ+KwsjXX88H4zzmSrPmUNvGALXKs/b22Tl7s= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123563025)(20161123561025)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR03MB2692; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR03MB2692; X-Forefront-PRVS: 04583CED1A X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN6PR03MB2692; 23:FKBuCZivH6Hni2cdjBGKAdRKztaO1ZM0Bazl5?= =?Windows-1252?Q?vyfmXYfuYfvEjzSphS3YKqxetVQX9OpTM88H06/o3onM/pbXj9XgMPVU?= =?Windows-1252?Q?/f+fAGYgs26feomch0z+b0B2LHxMtuQHwOVDr5EW2TewrMb4YiK/9E5o?= =?Windows-1252?Q?YLjLgGnqgfU7F8ja5BE3/SankbFq/3H34UWIHr7qCAH3MUv/3hkZ3gNf?= =?Windows-1252?Q?L+1V2rJTLOIagC7xKVedikfMYljewPa9BROID77V3opQgKQnQMM1QPKj?= =?Windows-1252?Q?V8YUdbXgDO3u/6BVmqZk/hDX2uc6She8Q6si6GZMj272RPcAcyQU/plP?= =?Windows-1252?Q?oaeB4CuAsBLCouCFMnfF3v32vbpkGAao9cI4Zm6IMvL+RW4AQpolmXoz?= =?Windows-1252?Q?QY2XqWNyY+fv3eOM5V3d2Tk9mtoJuu3zSXDxk//WIh1P5LnZwiiuqF5O?= =?Windows-1252?Q?CXLFwlXTV8J77WgTebguZ6MfYLmhr5aomRJdVdxMbzrFAoEQ1aUB3QD4?= =?Windows-1252?Q?ATbLWUvu5Lsj4N20riHKXlrwirvuyrlxlc7081sHB4e4TOWAoTvFV1J3?= =?Windows-1252?Q?7O2KF6+sHD9J6BUtWhg5mGHAKkniLgFARiZNsUKRxx2CSXznlPjw1/CT?= =?Windows-1252?Q?zCZMp96uV4b8jZzUdl4DGIdCKZ9OXthrSfqEZQmk4L4z2WIZZjJQ9poW?= =?Windows-1252?Q?EWoJU2RfDvgzqNX4s/obHhQb+YiWMUXQiEq1xs1cY7FD1IrX0IvM27o9?= =?Windows-1252?Q?n8X+N2q2kBba0kpDDUeJSNvM38cGb5tgaHuyd9Wo9rw8nmoxB19Wsio0?= =?Windows-1252?Q?vY8c7YulXEHhmQTF3P/U/xu+THCfLxrvdWl8nKheTEX6SGQI1GYbspC7?= =?Windows-1252?Q?RFjVA3ADH+fekSRh8lKjsuxh1Wkm/7pXAJsaTx+Kmf2wR0hIdlbGbOXn?= =?Windows-1252?Q?EWEZnGZERlU5UPQotNLos0mXPjvCwxfaBcOSMmHywEVomreZpmKgkk6+?= =?Windows-1252?Q?Z5u47+tcNOZiowDEKG+jhIC/Q9cyaXr3uGG5vJW3BeGqic+WfcOu1981?= =?Windows-1252?Q?1YQxLBzMHO3qPFlR3rmwgqmgRqC22TjN84m+tsxcxxa/LznguGolSe33?= =?Windows-1252?Q?o7EGphWaaGr7ABr3WDqe2PZV2CzLp8z4EbyrvmTgrq+wHJHG+aawTpK5?= =?Windows-1252?Q?d0IZkLHzAGURc/kVlYgs8eq1Kv7kj7u0n7YmH0HbsK69KBdk3b5FxM55?= =?Windows-1252?Q?mppDy2MxWHblNwZo2myBZiG1LYvnw7mquMiUI+aWyNR5rIe+/nFOTKmm?= =?Windows-1252?Q?dpbrqtNPVpMfLVV/pxUXDOw4gyDoMtO5a/1UCpKAQPoU6TSn2IZ/a9pZ?= =?Windows-1252?Q?V047689TEKRLhK2+cyI3dx47C3rnSbKx5VavVScWxuJ1ze8uz52aa8yE?= =?Windows-1252?Q?4zOG543tW/CxspAXeUWJJl6Ho2u1TutzzzoVZ4dH8TuFdH+RDoI1ko2F?= =?Windows-1252?Q?fdogKyW0cOQQ7OUKd5zAD6Btbm1N3AFVIg9PETskIGaVKevAQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2692; 6:igP8kPGmea606qywMJ0TerjiOuFMnYPqee4nNdtBqpXnfd8LnhuJ4gPCmfWEeszG+OuTPbHYtjY6lHe3iq6su9Eq4U1CkO5cKmv8utSbXp4PyapebH/tbYA5N/G7gnaopTMtGtYVzboMpzFwQqvfw3+pBZps3AyjKFOgVkJ+TtY6CJuh9DiR92bQbMkbEKMp2aDr4RB4w9LRpQNRl2KUDab8AVSNQO7ywmuHSNX0yT99DM5sQ7pspKHyjPjzxNe8T+jcmTzz2kP4tLJKkLjvj96yzxJ21OcESnls10SRH2NRkQwrC01Fc4eLjeSIyjpYcfthMvYuQudU1D3j10eNHg==; 5:C85DvYXoH+N5l+awZraXwdIkVr08Z93QCnDFYFuF87AH/vxEIJf0v+Cf6kHfGCq3bisI1r64r/NPQYC34CiM9Ap6yN3arj+ecZRldAuDi8JpcNpJfaFY7nj3+aTUGYkZabahVg2ghl30ZXr1idg+Cw==; 24:VB8d+Z6/lbLKtcbVRZVjqVFFSdIJz1LveFN5NAwpkR3D9g5gMSE/oQPxGJrAE5K1Avf7cXMA55GB+92OBoYvfCKP+zh0/otGR2pz21hHJOk=; 7:lyn74W1K/5KReIQl43P6w+Gyf3zCG6GtUgwkkbHsL76YkjCbZR2RwhIm4I0AltTHSBxP5ivTEaUuxM5S78z5BnCWVINZL+HZZKO/LhV+CGAF9Thvx2W6lafvDJcJeFTO6hWQryR342E3HnL4EfH+34J1aWKyNgnTAA403fg1xLrwkkwes216QphJqlLKujj83ayHDwGHTR9z5M2aGaVE2fGxAA2R4oRO+6txwKTndlg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2017 04:51:45.6519 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2692 Subject: Re: [dpdk-dev] [PATCH] examples/ip_reassembly: use pktmbuf to create pool 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: Thu, 12 Oct 2017 04:51:49 -0000 Hi Konstantin, Please review? Regards, Hemant On 9/6/2017 3:04 PM, Hemant Agrawal wrote: > From: Ashish Jain > > Use of rte_mempool_create() with the helper provided in > librte_mbuf: rte_pktmbuf_pool_create(). > This is the preferred way to create a mbuf pool else > it may not work on implementation using the HW buffer pool > > Signed-off-by: Ashish Jain > --- > examples/ip_reassembly/main.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c > index e62636c..20caeb3 100644 > --- a/examples/ip_reassembly/main.c > +++ b/examples/ip_reassembly/main.c > @@ -84,8 +84,7 @@ > #define MAX_JUMBO_PKT_LEN 9600 > > #define BUF_SIZE RTE_MBUF_DEFAULT_DATAROOM > -#define MBUF_SIZE \ > - (BUF_SIZE + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) > +#define MBUF_DATA_SIZE RTE_MBUF_DEFAULT_BUF_SIZE > > #define NB_MBUF 8192 > > @@ -909,11 +908,11 @@ setup_queue_tbl(struct rx_queue *rxq, uint32_t lcore, uint32_t queue) > > snprintf(buf, sizeof(buf), "mbuf_pool_%u_%u", lcore, queue); > > - if ((rxq->pool = rte_mempool_create(buf, nb_mbuf, MBUF_SIZE, 0, > - sizeof(struct rte_pktmbuf_pool_private), > - rte_pktmbuf_pool_init, NULL, rte_pktmbuf_init, NULL, > - socket, MEMPOOL_F_SP_PUT | MEMPOOL_F_SC_GET)) == NULL) { > - RTE_LOG(ERR, IP_RSMBL, "mempool_create(%s) failed", buf); > + rxq->pool = rte_pktmbuf_pool_create(buf, nb_mbuf, 0, 0, > + MBUF_DATA_SIZE, socket); > + if (rxq->pool == NULL) { > + RTE_LOG(ERR, IP_RSMBL, > + "rte_pktmbuf_pool_create(%s) failed", buf); > return -1; > } > >