From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0040.outbound.protection.outlook.com [104.47.42.40]) by dpdk.org (Postfix) with ESMTP id 37F2E592B for ; Mon, 11 Sep 2017 17:19:19 +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=Z5vYFW23sOV0IaQppWm9lNkoUmrdWgxrlNwsFYi2BHk=; b=VLKx0NRCEF88+MF+RmnTjDguADDVdG9gAIjX8qp94CEeY2To8XHpWO5FyXnerVqhorJLlzTklY2qRIPHtg2UxvvB0XnoEie7z0+ayINh2s1Z9LmY6aMSITGG0Hzsnr9r7YVWGAAR5zpW7brBfHDYMr62hz/SPAcX6cNF7Q9TamI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3100.namprd07.prod.outlook.com (10.172.85.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9; Mon, 11 Sep 2017 15:19:14 +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: Mon, 11 Sep 2017 20:48:35 +0530 Message-Id: <20170911151837.25092-1-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170815080717.9413-1-santosh.shukla@caviumnetworks.com> References: <20170815080717.9413-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0011.INDPRD01.PROD.OUTLOOK.COM (10.174.214.149) To DM5PR07MB3100.namprd07.prod.outlook.com (10.172.85.10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8b1ed257-5601-44d0-b949-08d4f92877f8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR07MB3100; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3100; 3:MttGYA7zmcysXfRESPwscp0SWU6JAdGdM3EiHqVpDW/RfNvPgILNOR45Sta6Km4oeDwBMufvss7qIAQAUlAGU/KbAEfKoTtP7BGD9QWFda1iRZgAzpIkclSlyCk7cPppD8cdSD1kpSoqgZCR8Yu6OsVF3WRbZFqxdKpLD+LYtEeGxEgleU6NvUWjDC3s6T/zeWXGatJWTqORRAXEeCHHlsNxELcnTc8vRZ1uVLIZszXTSYMZIJI9hw0t8rT4xGw+; 25:CCHqjty2cFABYHAqv/8kvyGMdPphsb+qRHKNab/H7RSL0kyyUyuiowV0ObRbGlFb5SZr5yHrZ6FGlLSh4rPh+l+TmzOQTkmBSEc+FpiWAdI/P190/eoEFeiLDmcvncQyfzXsSLdCH/Fr7ZfJI6JrFPTSiTltCq19VPtdWZHFeE3z7iSHU1FPzCyaY5U/8Bkn5ggyUBtmzHPN/i+YLlbuJ3pIT7pCAxxdZk4uXZCGgqno0fMUUanZDyznLIWmmgW9SAz1+STVmAg39QtswMord7m7eXY5Dv659qVMeEcZDDUy32QvSED6vJ0rzRYXDAr/wiAi5q0gFBDaELPsbt2IeQ==; 31:ScJh6e2xyk+xf+8rnWQpO8isWthlOdul3xL60INlMD2xrNkLNkAbRNUojVlCxLKTYMZ+xg41ZbmiKcxWlf2UfLjT7iUkqD2E4J4/uVQG/uPTk/gK5g5mnmDlcIU6bNYzmROebJ9VhtV9qQUmtZSdhT1ASSqOACgZNEZxxV5X5ZH8an8Z8nPNuXdgqoNLfn1m3N4hBwW3Lntj5eOHEIHEmgBXm2rTHB61g0NwYaCZsB8= X-MS-TrafficTypeDiagnostic: DM5PR07MB3100: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3100; 20:8UGjT2Y1aiy9k6ub/U+gHqDfFQzaRi33U/UK3E5boJIEs3kMnvhscSaVt79VKzguNBj5EgCA0comn+vVfIRMBpd0gJeE9KjigqL8JfMpRYZR/nW3cltSdArtaFQ3IWEzCYw3ZdF0oYJXaRwo3mq2I5jm9cWzLKxrT2HOdK5pJa7pv8cgbvHQirvNF7K2YdqVx2aSiZlvnwAsZLLbK20ji9LGxIYwszWOE/ujj6jys10oxP3NQUrvlXo7tkBcS5gIZDs7YgaMoc+UGFF5VQlYIl/nmY/+WktIa6G+/8Vwd2KXf6HxhHukvOJUXmcizdPa+XJnutjvWnr7CctTNk32jdW0lErlb5SQY/mRarPHr00HDCFea19pvMfNbc6NvYELUAmf/Fv4S3jTm7Gm87cRIexLarBhL1WFOULcBPKKmw5OiYXHOG37OiRn67amMfUAKLGxXkgCnOvncIRh/GIQl4U/D2EqOAwKIHIcnIpRwKdYB/2S8wIxE4G1w2g+U+wFugea4fxZRhpR7ZLxxEfM6sMswO19ynFqj0+4a2C5n5nRhkZyywukNtERcp771GJiUno5wzPBeqw4SS+04g1ElPoCJqd7WjA2w7XlydvmhSM=; 4:vCo6YfmCXiboaF3ArJ8a7/vepDnWkSrUvEZKEziQt6+mB/7eUyAGm6ZuvJOblj6inU+dhrXZX7IiR10dzdMga6Ob3ME+QUvqLJDt0xp0i77oQ7LNOSgiCe2TRgnxfUSLM8qzCpuW+KEehKcZzRBEKKeAivwKdf2paD17DgRUTq1LKdfELwGGbNmxsiA/Ymage058RgJiBGjOwpvq8c8cy3PzHKLk6eyvygSuI9jLLHclpa3wj9fOgCVggYmIEHt6 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)(2401047)(5005006)(8121501046)(10201501046)(100000703101)(100105400095)(93006095)(3002001)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3100; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3100; X-Forefront-PRVS: 04270EF89C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(189002)(199003)(47776003)(5660300001)(81156014)(81166006)(6306002)(6512007)(7736002)(8936002)(8676002)(50226002)(305945005)(97736004)(66066001)(42186005)(101416001)(76176999)(36756003)(50986999)(6506006)(6486002)(105586002)(106356001)(68736007)(2950100002)(33646002)(42882006)(6666003)(1076002)(5003940100001)(4743002)(5009440100003)(6116002)(3846002)(50466002)(48376002)(2906002)(8656003)(966005)(25786009)(478600001)(72206003)(53936002)(107886003)(189998001)(110136004)(53376002)(4326008)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3100; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DM5PR07MB3100; 23:azXyKMUc6IQdEcLmvRBvl1DKmTFZ2bz93qmDPbUkH?= =?us-ascii?Q?1b6vk9w53X/3MxXBtTzKH3puK3oo9Ati4dhG0aLZ2OeQIYNu6eoPetNEMofo?= =?us-ascii?Q?vY026Chlz6XJU77cs++9ThKE1L7oCV/y97ZuajlNtis2kGYkT61XDwIrBOZA?= =?us-ascii?Q?7/d7DyN+/ssh9jnL+S5ucUn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awFhzzilApnLqpfBtDFg4Zsb1O48dlqaAqZI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2017 15:19:14.5848 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3100 Subject: [dpdk-dev] [PATCH v4 0/2] Dynamically configure mempool 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: Mon, 11 Sep 2017 15:19:19 -0000 v4: - Includes v3 review coment changes. Patches rebased on 06791a4bce: ethdev: get the supported pools for a port v3: - Rebased on top of v17.11-rc0 - Updated version.map entry to v17.11. v2: DPDK has support for hw and sw mempool. Those mempool can work optimal for specific PMD's. Example: sw ring based PMD for Intel NICs. HW mempool manager dpaa2 for dpaa2 PMD. HW mempool manager fpa for octeontx PMD. There could be a use-case where different vendor NIC's used on the same platform and User like to configure mempool in such a way that each of those NIC's should use their preferred mempool(For performance reasons). Current mempool infrastrucure don't support such use-case. This patchset tries to address that problem in 2 steps: 0) Allowing user to dynamically configure mempool handle by passing pool handle as eal arg to `--mbuf-pool-ops=`. 1) Allowing PMD's to advertise their pool capability to an application. >>From an application point of view: - The application must ask to PMD about supported pools. - PMD will advertise his pool capability in priority order '0' - Best match mempool ops for _that_ port (highest priority) '1' - PMD support this mempool ops. - Based on those i/p from PMD, application to chose pool-hdl and do pool create. Change History: v3 --> v4: - Removed RTE_MBUF_XXX_POOL_NAMESIZE macro and replaced mbuf_pool_name with const. (Suggested by Olivier) - Added eal arg info in doc guide. - Removed _preferred_pool() api and replaced with rte_eth_dev_pools_ops_supported() api (Suggested by Olivier) v2 --> v3: - Changed version.map from DPDK_17.08 to DPDK_17.11. v1 --> v2: - Renamed rte_eal_get_mempool_name to rte_eal_mbuf_default_mempool_ops(). (suggested by Olivier) - Renamed _get_preferred_pool to _get_preferred_pool_ops(). - Updated API description and changes return val from -EINVAL to -ENOTSUP. (Suggested by Olivier) * Specific details on v1-->v2 change summary described in each patch. Checkpatch status: - None. Work History: * Refer [1] for v1. Thanks. [1] http://dpdk.org/ml/archives/dev/2017-June/067022.html Santosh Shukla (2): eal: allow user to override default pool handle ethdev: get the supported pools for a port doc/guides/freebsd_gsg/build_sample_apps.rst | 3 +++ doc/guides/linux_gsg/build_sample_apps.rst | 3 +++ doc/guides/testpmd_app_ug/run_app.rst | 4 ++++ lib/librte_eal/bsdapp/eal/eal.c | 10 ++++++++++ lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +++++++ lib/librte_eal/common/eal_common_options.c | 3 +++ lib/librte_eal/common/eal_internal_cfg.h | 2 +- lib/librte_eal/common/eal_options.h | 2 ++ lib/librte_eal/common/include/rte_eal.h | 9 +++++++++ lib/librte_eal/linuxapp/eal/eal.c | 11 +++++++++++ lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +++++++ lib/librte_ether/rte_ethdev.c | 24 ++++++++++++++++++++++++ lib/librte_ether/rte_ethdev.h | 24 ++++++++++++++++++++++++ lib/librte_ether/rte_ethdev_version.map | 7 +++++++ lib/librte_mbuf/rte_mbuf.c | 5 +++-- 15 files changed, 118 insertions(+), 3 deletions(-) -- 2.14.1