From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0056.outbound.protection.outlook.com [104.47.37.56]) by dpdk.org (Postfix) with ESMTP id E433A2BB2 for ; Wed, 6 Sep 2017 11:34:45 +0200 (CEST) Received: from MWHPR03CA0047.namprd03.prod.outlook.com (10.174.173.164) by CY4PR03MB3318.namprd03.prod.outlook.com (10.171.246.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Wed, 6 Sep 2017 09:34:44 +0000 Received: from BY2FFO11OLC008.protection.gbl (2a01:111:f400:7c0c::142) by MWHPR03CA0047.outlook.office365.com (2603:10b6:301:3b::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Wed, 6 Sep 2017 09:34:44 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BY2FFO11OLC008.mail.protection.outlook.com (10.1.14.255) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Wed, 6 Sep 2017 09:34:43 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v869Yef9007441; Wed, 6 Sep 2017 02:34:41 -0700 From: Hemant Agrawal To: CC: , Date: Wed, 6 Sep 2017 15:04:20 +0530 Message-ID: <1504690460-30616-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131491640835116838; (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)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(36756003)(54906002)(8676002)(2351001)(106466001)(105606002)(8656003)(5003940100001)(4326008)(50986999)(81166006)(50226002)(47776003)(104016004)(626005)(68736007)(8936002)(81156014)(498600001)(2906002)(110136004)(53936002)(50466002)(189998001)(48376002)(33646002)(5660300001)(86362001)(77096006)(356003)(6916009)(85426001)(6666003)(97736004)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB3318; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC008; 1:SHTnCiUCg5Jk9mkps59uZmvI5JcqFiwmK1PC8u435Fmv0Tf8jGZlTnwy9x6BUArSnwb175Zoyg2E8korh29f/66pJvs+HE6V4AUzulUhfjeEPHpv9ZIuhlc1YwLOriQm MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fdf07ac8-b017-4957-0f26-08d4f50a8160 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR03MB3318; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB3318; 3:UcvjfynbXexAuX7ZUiq7Cu52nMHpBc0sk5UEMw8CctW/mUZpFMO1W1k96OOfWzPlnfaUlXpqy/oDM2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rniqDXwPkZd3DPUK1oBKQkMr6O3LrulxzyHMQw9ATJ0M6E10HXbMbGXHNxvAYbOk3orjcrpoQ/O18Yn2FRMBoHXCxHqwQ0lL+k5nEkO31ijtcBbPvbY1ZVZttoW7Zhh8jkDcjP1zQUxJBXO53OXlOa1Cvzm4= 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)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(20161123563025)(20161123556025)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123559100)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB3318; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB3318; X-Forefront-PRVS: 0422860ED4 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB3318; 23:sHrgO6Lg/HJdsDWhsal3wfwcH4YUFNPCsZTV0nqzC?= =?us-ascii?Q?0DpB/z4KuY1OrtvioDyH1V1DmGWHr5lm4Gb0ZGkilO55A2feqGQgd/g5EMhD?= =?us-ascii?Q?Mydf24D5os46NFYqYq4joKZ8k+4rkWOo4xNMao6hZeItE/tM9krQ5uOimCID?= =?us-ascii?Q?Hs9C+iN79Se1RNPRErBMTfUqqRh3G45K8Z2zuBfiQiZMHaI8TXngfUeZfs6e?= =?us-ascii?Q?8xMJ8FX+eR5DWYjuy3scZs84XiHj6Fb0nwY2edjW3IOUdVEMAkZHFEJUzNHY?= =?us-ascii?Q?KzTwJLk2/wFKbKha2VlhsUk2oKu94wcmtQ8mucalXK0eTf9dSo8wN9av0A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vHRizo8V32tCzZvblpKG42W74JeLRLWFnVOjJiAXFZbpZ3Z23pMSGsVWapB66C5jwTqk61A8TGzUqoPKhwrcAncG3kIAYmr2vIdnmAliR3dOtol80ynXJdG2DS4+eZzdSTf+OmK2tgg02QLdqanlLHH1PmVIeXzVVSjvEnTGtNmY3GQeOIahqQILx8suYdU/PnPUG3y7cRQEdMKtWSLxGWmi9ERzceoJ/APH5Q==; 5:6lmNVH7rJElgCAi6YrdB79d0366XdCQlIO7rWuZFx/ETYabzO6rPoi/sg6llVsfz9fWvZ179X5B1MfqrJFVrWReXRlM89wFb5GRQlulLdRgEYsRV/BSjCmfld970BPqe7IjnqjUVrOxG9otPUr/dJA==; 24:sPEqTs0tYdOn6gOHXIBuEvHfxbEWrvqXnd09+Z6WQIiDpz3+df4YbWuMNbJucWuumMB5ePa+GJDMk0fmDKVSk3CWfDuT2T842vMxqRkS0wo=; 7:rngEgluj4ROUSEKn8+rGdkhl0fMscCoHlsiTlp2SZ9ac9MqtJmefXnM7IyuH0UbrFrljvUzzvxYL2VOMksYu9iXOIf/0KDTnKJQjznH1XHXw9q7y9ZIX9yjb/d5ZV3rBWyqa34G55LwdnpIHltWwwEtaZgKhu0lsAJN/lJn8cwKRzdwa1puRmEFRzNe16GQdevHLhYXrLe5LoufaAR8yOQ4GFNGGksuYGZClycHHEkw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2017 09:34:43.3245 (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: CY4PR03MB3318 Subject: [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: Wed, 06 Sep 2017 09:34:46 -0000 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; } -- 2.7.4