From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0086.outbound.protection.outlook.com [104.47.33.86]) by dpdk.org (Postfix) with ESMTP id E7E8D90FB for ; Tue, 15 Aug 2017 10:07:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2O37+iH3tNcjn6hGWAyz2RUaGMUqr6gMx7TUxDfvRPg=; b=Yn/jpt5wEmpZ0h72vqv9TJRkRiOaD/VQjXkL6QWO1jm9e6TxDfDk3e5q/xCLFm+1VQF6f2+lX/IkLdU8qNbry6/raIKoNCULDRMHgYhPymjii3sQgCpZZ22p3GDvpicXk8AjpNhWnXRzeKbdH1p9114MxqamZApsnLj5Q0W4XrU= Received: from localhost.localdomain (14.140.2.178) by MWHPR07MB3102.namprd07.prod.outlook.com (10.172.95.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.21; Tue, 15 Aug 2017 08:07:52 +0000 From: Santosh Shukla To: olivier.matz@6wind.com, dev@dpdk.org Cc: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, Santosh Shukla Date: Tue, 15 Aug 2017 13:37:16 +0530 Message-Id: <20170815080717.9413-2-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170815080717.9413-1-santosh.shukla@caviumnetworks.com> References: <20170720070613.18211-2-santosh.shukla@caviumnetworks.com> <20170815080717.9413-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BMXPR01CA0016.INDPRD01.PROD.OUTLOOK.COM (10.174.214.154) To MWHPR07MB3102.namprd07.prod.outlook.com (10.172.95.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5fdfc6b3-8474-480c-96f1-08d4e3b4bbf8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR07MB3102; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3102; 3:88l4XsWt8jVj1a1g6dHvhLB9dd4NpbM2mo4ErXajOLHTRIlZZ61enFV2usDGnAremYGJ6q/Oo/vMVr4u3XsTTS4AFGnZlK6and+ZO4i098Sr8FEqolc7cTDYI/JRjOudUBKSys2lut9v5tsWrXF7ofPpzUqjuOLhUTSBtq8maWHtr88ZDtSkDqZ4gMjqICKc4hsngcRpoYII3GJGUx6JOD/IRIIo1ek1pl7kqLC8OwdBwLWHw0469YmZh4l20vy4; 25:yKwxFanGETZm0XzuFvudCZ3zClC9A6ooIl8av+TSTqFWQU0K1/MBLPTAqau9q7teMV4IFgbJf4FcIN8FdmnsQHyZ58OEy/wDvUDoENIG0GRn0aWUTqX/+rRVwnvP+uaVsSRuuwxRQycgcJwCLNucBYuIpAAfro+LZmwHoOFA7welveNETtaVVaSWKk/rvH4314J9TyAffp4OJikosOl0zY/mbF8/cKDgtxSVV6KD3vDnk0p7pFRG66Y7Avu33sdRSG11nQVYyosKYgvkgmAY2bkpmNuJ9e8eJ1xIDaCQ31fWzwpY92ZL1cIie8uxJJpJ6qEo523MvM8w09RStoY8LA==; 31:3WkdoD/2ejTF38qHtt8cu58icZfT7xYsrkFMRNmYEiM1WKZV9gs5PrOiyIlllfQ0/ej0rOfOWB3QUEsEc22CaG7m0EtFOoehBLguFTilen0dlU+evQ3XM98dNOJoF38kFm26tEryoGuATpTrGrOfpgQadABcrzs3N0YD7PrbSEUsTKJWgA4pyRHoK+XfaAwAoEaaceJULa11XF8XXSg10Md0E6u7idoy6/1vCnu5/Dw= X-MS-TrafficTypeDiagnostic: MWHPR07MB3102: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3102; 20:iJDS8zlnkc/62yhE4wO4BxMy+9as9ldIHK2pCWr9MDcYa5dVbfFW1nrnmUqVMISIkZQnD4qFQMvwAgK7LODNuJfC/I5FkF8quu/b45lBjDv3M7HwZ4PSFaq4H2W3QxrvU37Ft7+TgyEpkflM8n2hqvyYJQLJcdzPu6GSEj1oOjjUIPbcD4IPOSUVEV2K+8KeLki5xJxEWCcrJr5BS3CEXYjBavjt6yLuc+3hJiSZVd6wEvXtSm9pjlG14quvnkr15SNxnWsroTsgcXv+qdo7LWSX0tZhYv+811olruMxEQujPG6zQecqRrK7fSe0hZmqYu5PgZNG8hKtgh9iyE95z5dz6MzUAHDWXaq7RoubeyFtEl+rWB7LLrgelEmKnTE67hYsz+DlA+lf1UhcvbA0fRjwW661y8jK9ydZO1r6R4p0ezGNZA/MQx9d7ycxcVdN43S8fwpGz8m9cqMfUuYEiqXz8jiURQtbbmLWnK+gJpzA/CKLHBR5ojJS8NsHQlPAVbejg7Ga3wgFP+y/m7O/0z+8Ixz9Oia2DZSqgIKQxznSaECd+du96+sV+TocD1Sa3yvX5OPnd1ybBYfUzjmdc/adCMGzSjmAApnccVo0/fc=; 4:46pRV+n3bUb7lFxGGkpT7G7Cjt1oYz9+UVZgIM34KZxhAVe9VsLbFmVyQ9b/m2kUYx8qLSmrptgttspaculD+866Q55VF+YIM/K0yZqUiyoUHzPSP9Kp5U3VYjzwQO7ErW2HavJ5uX3IjK7maBKEoYhhnIgPDxYkmuGIu69ThhhcI4H9OgoK31H5gYhw0D2FMXXad+NP5+BfTSye1mzJfzzSkJjQQW0Hvdbp9HfPADGD/h1Oafj+d7URlLiyxokq X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123555025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3102; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3102; X-Forefront-PRVS: 04004D94E2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6069001)(6009001)(199003)(189002)(6116002)(81156014)(6512007)(81166006)(305945005)(66066001)(6486002)(50986999)(50226002)(76176999)(47776003)(8676002)(68736007)(50466002)(48376002)(101416001)(33646002)(36756003)(6506006)(7736002)(53936002)(8656003)(106356001)(42186005)(2950100002)(6666003)(5003940100001)(105586002)(5009440100003)(97736004)(42882006)(107886003)(7350300001)(25786009)(4326008)(110136004)(3846002)(72206003)(5660300001)(1076002)(2906002)(478600001)(189998001)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3102; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3102; 23:EZTfkuRD+ErueJUm7zlLlHN9e9Ae0rBRPP9tXBEm8?= =?us-ascii?Q?E4eKjd7ptSanCoObB0FmjGR9n1XeIXHgV2QpsMsZicZnGYTC+VW4K1pUBoDk?= =?us-ascii?Q?tXYoeVtuK9GHxlKDGGtBlM4/V44b/Q0dmM+u2+VenA4iwdxfF03+I7DIuxC1?= =?us-ascii?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rgnlzyafRF7fBwRDtHNcKDwtMAWnuiH5tIqQQe3GW1RkarkB4FQf3ju0HQmL4yMcEoFpSdE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2017 08:07:52.2706 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3102 Subject: [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: Tue, 15 Aug 2017 08:07:57 -0000 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); -- 2.11.0