From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0054.outbound.protection.outlook.com [104.47.32.54]) by dpdk.org (Postfix) with ESMTP id A2168968 for ; Thu, 7 Sep 2017 11:25:47 +0200 (CEST) Received: from CY1PR03CA0022.namprd03.prod.outlook.com (10.174.128.32) by BN3PR03MB2260.namprd03.prod.outlook.com (10.166.74.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Thu, 7 Sep 2017 09:25:46 +0000 Received: from BN1BFFO11FD020.protection.gbl (2a01:111:f400:7c10::1:184) by CY1PR03CA0022.outlook.office365.com (2603:10b6:600::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12 via Frontend Transport; Thu, 7 Sep 2017 09:25:46 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; caviumnetworks.com; dkim=none (message not signed) header.d=none; caviumnetworks.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 BN1BFFO11FD020.mail.protection.outlook.com (10.58.144.83) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Thu, 7 Sep 2017 09:25: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 v879PfOD016750; Thu, 7 Sep 2017 02:25:42 -0700 To: Santosh Shukla , , References: <20170720070613.18211-2-santosh.shukla@caviumnetworks.com> <20170815080717.9413-1-santosh.shukla@caviumnetworks.com> <20170815080717.9413-2-santosh.shukla@caviumnetworks.com> CC: , From: Hemant Agrawal Message-ID: <8db675e6-9918-288d-d4e5-14b4b22c9ef7@nxp.com> Date: Thu, 7 Sep 2017 14:55:41 +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: <20170815080717.9413-2-santosh.shukla@caviumnetworks.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131492499458483188; (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)(1109001)(1110001)(339900001)(199003)(24454002)(43544003)(189002)(377454003)(105606002)(36756003)(8676002)(4001350100001)(498600001)(31686004)(189998001)(4326008)(97736004)(68736007)(2201001)(83506001)(23746002)(8936002)(356003)(53936002)(81166006)(81156014)(6246003)(626005)(54906002)(85426001)(33646002)(53546010)(31696002)(305945005)(2906002)(86362001)(77096006)(50986999)(65826007)(230700001)(229853002)(50466002)(65806001)(76176999)(54356999)(106466001)(65956001)(104016004)(47776003)(5660300001)(64126003)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2260; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD020; 1:DOrRYSYWJkV1GRuW6aaVOwvf5oD26JZQYA2FI+FtIv+J0eMoH72k+ojNtnT2Nxb6tQMJ+7ATJ8Nc8K5q0WdaLFG86EZUbveLMF2vhxOchg7JbZzM8ZPEKRsZNhyt4NOO X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1528d6cd-cada-438e-8295-08d4f5d26b4e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR03MB2260; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2260; 3:WtGzKF3QVoBDAur+obrhzEYfem/cK+vjjGQKLPxOwOy9pDvRdfn7yDGZkwcLz9N4RMaLHeDx4yXZgXiCro00nvMPKLNXfz4bY9VvNeTqhASjvE52p+GkCOp3NYmtfPH4C2K68254ao2XTzy4kxD6YY/hR6bJlCoOnxuxfB18unm4ABAmZkJgdclNFrh7BXRy/QGYg2iHDOrTAyOll/ik9qYhiNl43izY67M5lg7QzwdCQOwSNsVTelnpPgmoqehrhsBVhrV5Uf2H4nChQ0BFeKW7xt7OTjDihS+OiBZyUq64ZYHDYzFFgkmTlaJiUFwGZZatbEmWsnDBUj14KEdV+gjPi3cocRY1ZfM/sm/a+Ls=; 25:S8Lx+8nmY+6Mw7pdTPejE4OD8M5D4NNMmXi+Txj6Kezn36HSoiAIvO1NSTcrhLo8JU0+WzO0tjll1YCpYVzRxCpafcgXKROwyZezeyySUGsGK6/YNta0SNx7Fsm4nHnhyWVJtuA2S4T3gIk26BrMeOymQxfuQwGQ/E3lXGgdjXMk6iTnIst3kDgiOXYNzFv15bt3LIIzd62s1mvR/HFSNVoXfI5E/fDZkXbvLgooaBNzSqSwWfshtOtPewI7EHw7cRpx4AOahzsxRNHdd625kbD/cOZpXuzzpgh2hWocr0ZpWkgrTO7GEqDJdJxGm1xoJ+V5c+1rNLuXfxZGpxgFKw== X-MS-TrafficTypeDiagnostic: BN3PR03MB2260: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2260; 31:nqzuDGMeuOh10d2d7m+8H5SDCcbSutF6XT/8VDLcnzvDL/P1dtYe4hgNM3gzZOEAOWbE7GXhLWhMGk2wWkM3iBebuwH1bMlkV6030Y4RptZCxqdGB11sxQRttMES/fDVDneRhZIPjvw831KKBpeOgpcW0MH+UhJ8FgmCgxQZXZ8aFmwGPDDkoFjHFBrp0upIL6sEQQn3kb4VMD4aEWuWhoKHiN5DV1LMdPbFTskVKQw=; 4:bkK4GGpaFA9NHQ3PFBq0lyeP0+OjJqu3uW4+0xKytolbicdqHU/rSut70n424vHwzw+E+nVCRrslHCMiwlydJ00VHjrfuPZ2s0TUJYgZk5FWEriGXmHi9dTuQRurVQ8IEMPUYa/mam1CV9YGqOB6X3EP6VaTtLyKuQZtQq9zNZ8Zmt4kIqwXVY3xB4x+dOVOO0so9QntUe5Uf+Mqc2bebHYex8TGIGcRZx6ROBTP6PbazKQzpgCvMo5oYaKEkK9/w3OlD4b7MXtL/+D31VdV27gQ7rRgTf900faP94Mk5is= 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)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123561025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123559100)(20161123565025)(20161123556025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR03MB2260; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR03MB2260; X-Forefront-PRVS: 04238CD941 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN3PR03MB2260; 23:zfV/T9s9+4d+7bSzs1JTfmVBuKoUUVEgS26rW?= =?Windows-1252?Q?USuGACuP+OlBvZLOxVAvR8M7wtuyib5vlnMswoEpE+OAQgY8mUVTj+96?= =?Windows-1252?Q?CCKI1VErgphEIPt+H33r/z13T/IvvGQIoLszH2OGA9XnzQWuYZ2aPRcU?= =?Windows-1252?Q?WNJfCam4K4JxaRTt40psi1JVkWhWcdOraFIm3UQiqEkPDVdGCyNfvSr7?= =?Windows-1252?Q?K/D4EhHmWy2mCk9Z49Ij1vc1b+kIVq2gCnFQpSNNyXMcG85CKjAG8BvT?= =?Windows-1252?Q?p8wg2l7g4z22o4Dv/G69mp7yudQmi5j8+2unaY6ZDgtpgJr8bIf7VUl1?= =?Windows-1252?Q?mOUCN3Jfl/FzcFm84egaiwGVlqjCZzN7wpqNmqJpCHehHuV4UUUYGifE?= =?Windows-1252?Q?08qVjqtYly5Rj7s42Z/mOVjqTbjML3+39mVgpZYpqz7WXIPpso5doX96?= =?Windows-1252?Q?eF+vas4p2q2druCitv+aHh8gMdWgWeI1EN5RvKnSh2LfT5AMPFTakGgV?= =?Windows-1252?Q?qjpPX49AOZ9FnY87T2UXujGzffvv456IhuYVmgnlSV5CCB0QrkMakQaX?= =?Windows-1252?Q?whvNA8bmT1fvH+/eE3rhZ8d3rxUWB21op2T/5HzE/dp6aSK/NeFCCTJo?= =?Windows-1252?Q?trecU1ACVSjkcNcBOD6oAg0XBK3Oz0UPzf/87zwhAguH+CP4wVChYRmz?= =?Windows-1252?Q?Hh2xUQI0jR5KDg3g/HbVZSw5wylOpaDWaxQSS8A7Kgj9m9pkfvzqxu+m?= =?Windows-1252?Q?2IFcLn2lWCZt+VBTomesBmOqTbCxpsKClX4ZRsDED+1DjZMUaI9qWeuc?= =?Windows-1252?Q?yXbC9KSJobEoFOqwzRGy3LnyNs2vRoJWP6VOtDVIyeqvO2s2vCdPOu9l?= =?Windows-1252?Q?wqy0SeJoCeUfDT7/se07zx497X2+RjGlA8vfjLsHwgNBa1t8zVMZvWmZ?= =?Windows-1252?Q?pFkL5hn1I+bL+BvBfsFwOUwJ7OSIU/Qq2fhCHk3Jo59CLWOX+jkkEkX/?= =?Windows-1252?Q?iE+23SKnbJtnMQu12w9K65iWdgQblmdmuhk458dzAqDc7NPaui4u2AXE?= =?Windows-1252?Q?5YsbEHIfKSuMYjvL+cAe10g9O3q5E2ismKH6lz/QXfvd+0WOHAXDBhaX?= =?Windows-1252?Q?lKcnidILEL4t/hNGHecEmtKrS7h6RtC2oOQQW362Sa0rx3EvzIokq2qP?= =?Windows-1252?Q?Ybsk23LdnIA4uinORnmo4ZcGCthx3ETFXCGeMCx0MtBWgObiFBIsiFWp?= =?Windows-1252?Q?dtFmYDwvOOYo5ERuOo4eAoPYfo8JHp5RdGzw9mvNQZz/OOvpMb/I2rk2?= =?Windows-1252?Q?TqdvCX38ObXxyjaY6YR3Y+8nzrrCFxzGy2f75HNh98e17BBITOpLURbs?= =?Windows-1252?Q?jE9uVDppcdqcd4n6lxT1xhn2S6oqDPLdeACR0MjcY35P9wZtrqTLRWLM?= =?Windows-1252?Q?R9ZuEXiJuwbtV/DLtZan1ENfFVS1EpgOouYys902g=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2260; 6:cJx8AFddth8xqe5L2lP9pfHTCqw4iWu9YBWYlgkhGFsE+foNC+wp1m66ccaE9nzOfVwxGdSsndV84A4xVXSRj7SPvtp3P7702GPu4zjCSpX2Z5FP0YSMFwmLCVRvla0x85+8gF0SrcT8k20tObzkemssBOYlO39OVfBY5ZZxQqflLxzoEIcLoQPuDt70hjnHnZL9QN3e/8BVSsXMKEizSlvAUuHrKji0XarDau7sgPBfAtfjpbfvMHNxRJSIkNB+PoUJuXDKSzuKfrTeqdJb4JnA3+TxrKW+mWICnN2k6cHthe0sHQdFiniLj8IQiUbMpxgjhVIUmxtC107LRVp4ZQ==; 5:uKWT7CB2o/TlpAAdDfay0BDel21nitqEYGfoh2+VASNRa41tqzefBE3gBQVY5pBygl2McRfNYI1ZB0a/TGpMeiLv+cjw7tC9GXpFPi9JhjsbZl4M2sh8mhts8sb98IDN4A95sxzlg9ivWuYsrBtOwg==; 24:jjgiGFec/nQCnT5fEHO9XfUEAa8+RsHBQbIp6oDUMp5Gsp6UYIouH2Oui6Pi50DAB560Artzp7QwG4nJuEAcMpXIVddWgtnqNS2HRP/ty8Q=; 7:nd6zq6Egtuv7tanQDvnhbsaYsL7P+ff7S5QXafBoQvOhsIo2Y/0DQquz1amiQxIyzX8u+u7PhamNKlsoB6u+cdeHCEZHCLP8JxMMqSZXsq+13eELfXszMbFYZrI57adHylHoL8F7kcvOWRUGaCkwOgvCtgTg14W/gDYAtWUEX4x+rWoRBrGKEvHqxgFmEa4PsjuKdjzYxlT6PC9Iue6F1YAj6Jc05Uh8Nc6NIHKQhRw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2017 09:25:45.5519 (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: BN3PR03MB2260 Subject: Re: [dpdk-dev] [PATCH v3 1/2] eal: allow user to override default pool handle 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, 07 Sep 2017 09:25:48 -0000 On 8/15/2017 1:37 PM, Santosh Shukla wrote: > DPDK has support for both sw and hw mempool and > currently user is limited to use ring_mp_mc pool. > In case user want to use other pool handle, > need to update config RTE_MEMPOOL_OPS_DEFAULT, then > build and run with desired pool handle. > > Introducing eal option to override default pool handle. > > Now user can override the RTE_MEMPOOL_OPS_DEFAULT by passing > pool handle to eal `--mbuf-pool-ops=""`. > > Signed-off-by: Santosh Shukla > --- > v2 --> v3: > - Updated version.map entry to v17.11. > > v1 --> v2: > (Changes per review feedback from Olivier) > - Renamed rte_eal_get_mempool_name to rte_eal_mbuf_default_mempool_ops(). > - Added support in bsdapp too. > > Few changes considered while working on v2 like: > - Choosing eal arg name 'mbuf-pool-ops' out of 3 proposed names by Olivier. > Initialy thought to use eal arg 'mbuf-default-mempool-ops' But > since its way too long and user may find difficult to use it. That's why > chose 'mbuf-pool-ops', As that name very close to api name and #define. > - Adding new RTE_ for NAMESIZE in rte_eal.h called > 'RTE_MBUF_DEFAULT_MEMPOOL_OPS'. > > lib/librte_eal/bsdapp/eal/eal.c | 17 +++++++++++++++++ > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +++++++ > lib/librte_eal/common/eal_common_options.c | 5 +++++ > lib/librte_eal/common/eal_internal_cfg.h | 1 + > lib/librte_eal/common/eal_options.h | 2 ++ > lib/librte_eal/common/include/rte_eal.h | 11 +++++++++++ > lib/librte_eal/linuxapp/eal/eal.c | 18 ++++++++++++++++++ > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +++++++ > lib/librte_mbuf/rte_mbuf.c | 5 +++-- > 9 files changed, 71 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c > index 5fa598842..1def123be 100644 > --- a/lib/librte_eal/bsdapp/eal/eal.c > +++ b/lib/librte_eal/bsdapp/eal/eal.c > @@ -112,6 +112,13 @@ struct internal_config internal_config; > /* used by rte_rdtsc() */ > int rte_cycles_vmware_tsc_map; > > +/* Return mbuf pool name */ > +const char * > +rte_eal_mbuf_default_mempool_ops(void) > +{ > + return internal_config.mbuf_pool_name; > +} > + > /* Return a pointer to the configuration structure */ > struct rte_config * > rte_eal_get_configuration(void) > @@ -385,6 +392,16 @@ eal_parse_args(int argc, char **argv) > continue; > > switch (opt) { > + case OPT_MBUF_POOL_OPS_NUM: > + ret = snprintf(internal_config.mbuf_pool_name, > + sizeof(internal_config.mbuf_pool_name), > + "%s", optarg); > + if (ret < 0 || (uint32_t)ret >= > + sizeof(internal_config.mbuf_pool_name)) { > + ret = -1; > + goto out; > + } > + break; > case 'h': > eal_usage(prgname); > exit(EXIT_SUCCESS); > diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map > index aac6fd776..172a28bbf 100644 > --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map > +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map > @@ -237,3 +237,10 @@ EXPERIMENTAL { > rte_service_unregister; > > } DPDK_17.08; > + > +DPDK_17.11 { > + global: > + > + rte_eal_mbuf_default_mempool_ops; > + > +} DPDK_17.08; > diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c > index 1da185e59..78db639e2 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -98,6 +98,7 @@ eal_long_options[] = { > {OPT_VFIO_INTR, 1, NULL, OPT_VFIO_INTR_NUM }, > {OPT_VMWARE_TSC_MAP, 0, NULL, OPT_VMWARE_TSC_MAP_NUM }, > {OPT_XEN_DOM0, 0, NULL, OPT_XEN_DOM0_NUM }, > + {OPT_MBUF_POOL_OPS, 1, NULL, OPT_MBUF_POOL_OPS_NUM}, > {0, 0, NULL, 0 } > }; > > @@ -220,6 +221,9 @@ eal_reset_internal_config(struct internal_config *internal_cfg) > #endif > internal_cfg->vmware_tsc_map = 0; > internal_cfg->create_uio_dev = 0; > + snprintf(internal_cfg->mbuf_pool_name, > + sizeof(internal_cfg->mbuf_pool_name), "%s", > + RTE_MBUF_DEFAULT_MEMPOOL_OPS); > } > > static int > @@ -1309,5 +1313,6 @@ eal_common_usage(void) > " --"OPT_NO_PCI" Disable PCI\n" > " --"OPT_NO_HPET" Disable HPET\n" > " --"OPT_NO_SHCONF" No shared config (mmap'd files)\n" > + " --"OPT_MBUF_POOL_OPS" Pool ops name for mbuf to use\n" > "\n", RTE_MAX_LCORE); > } > diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h > index 7b7e8c887..e8a770a42 100644 > --- a/lib/librte_eal/common/eal_internal_cfg.h > +++ b/lib/librte_eal/common/eal_internal_cfg.h > @@ -83,6 +83,7 @@ struct internal_config { > const char *hugefile_prefix; /**< the base filename of hugetlbfs files */ > const char *hugepage_dir; /**< specific hugetlbfs directory to use */ > > + char mbuf_pool_name[RTE_MBUF_POOL_OPS_NAMESIZE]; /**< mbuf pool name */ > unsigned num_hugepage_sizes; /**< how many sizes on this system */ > struct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES]; > }; > diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h > index 439a26104..9c893aa2d 100644 > --- a/lib/librte_eal/common/eal_options.h > +++ b/lib/librte_eal/common/eal_options.h > @@ -83,6 +83,8 @@ enum { > OPT_VMWARE_TSC_MAP_NUM, > #define OPT_XEN_DOM0 "xen-dom0" > OPT_XEN_DOM0_NUM, > +#define OPT_MBUF_POOL_OPS "mbuf-pool-ops" > + OPT_MBUF_POOL_OPS_NUM, > OPT_LONG_MAX_NUM > }; > > diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h > index 0e7363d77..fcd212843 100644 > --- a/lib/librte_eal/common/include/rte_eal.h > +++ b/lib/librte_eal/common/include/rte_eal.h > @@ -54,6 +54,8 @@ extern "C" { > > /* Maximum thread_name length. */ > #define RTE_MAX_THREAD_NAME_LEN 16 > +/* Maximum length of mbuf pool ops name. */ > +#define RTE_MBUF_POOL_OPS_NAMESIZE 32 > > /** > * The lcore role (used in RTE or not). > @@ -287,6 +289,15 @@ static inline int rte_gettid(void) > return RTE_PER_LCORE(_thread_id); > } > > +/** > + * Ops to get default pool name for mbuf > + * > + * @return > + * returns default pool name. > + */ > +const char * > +rte_eal_mbuf_default_mempool_ops(void); > + > #define RTE_INIT(func) \ > static void __attribute__((constructor, used)) func(void) > > diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c > index 48f12f44c..99c2a14d4 100644 > --- a/lib/librte_eal/linuxapp/eal/eal.c > +++ b/lib/librte_eal/linuxapp/eal/eal.c > @@ -121,6 +121,13 @@ struct internal_config internal_config; > /* used by rte_rdtsc() */ > int rte_cycles_vmware_tsc_map; > > +/* Return mbuf pool name */ > +const char * > +rte_eal_mbuf_default_mempool_ops(void) > +{ > + return internal_config.mbuf_pool_name; > +} > + > /* Return a pointer to the configuration structure */ > struct rte_config * > rte_eal_get_configuration(void) > @@ -610,6 +617,17 @@ eal_parse_args(int argc, char **argv) > internal_config.create_uio_dev = 1; > break; > > + case OPT_MBUF_POOL_OPS_NUM: > + ret = snprintf(internal_config.mbuf_pool_name, > + sizeof(internal_config.mbuf_pool_name), > + "%s", optarg); > + if (ret < 0 || (uint32_t)ret >= > + sizeof(internal_config.mbuf_pool_name)) { > + ret = -1; > + goto out; > + } > + break; > + > default: > if (opt < OPT_LONG_MIN_NUM && isprint(opt)) { > RTE_LOG(ERR, EAL, "Option %c is not supported " > diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > index 3a8f15406..5b48fcd37 100644 > --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map > +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > @@ -242,3 +242,10 @@ EXPERIMENTAL { > rte_service_unregister; > > } DPDK_17.08; > + > +DPDK_17.11 { > + global: > + > + rte_eal_mbuf_default_mempool_ops; > + > +} DPDK_17.08; > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index 26a62b8e1..e1fc90ef3 100644 > --- a/lib/librte_mbuf/rte_mbuf.c > +++ b/lib/librte_mbuf/rte_mbuf.c > @@ -157,6 +157,7 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, > { > struct rte_mempool *mp; > struct rte_pktmbuf_pool_private mbp_priv; > + const char *mp_name; > unsigned elt_size; > int ret; > > @@ -176,8 +177,8 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, > if (mp == NULL) > return NULL; > > - ret = rte_mempool_set_ops_byname(mp, > - RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL); > + mp_name = rte_eal_mbuf_default_mempool_ops(); > + ret = rte_mempool_set_ops_byname(mp, mp_name, NULL); > if (ret != 0) { > RTE_LOG(ERR, MBUF, "error setting mempool handler\n"); > rte_mempool_free(mp); > I guess you will take care of Olivier's comments. With that, Acked-by: Hemant Agrawal