From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0062.outbound.protection.outlook.com [104.47.40.62]) by dpdk.org (Postfix) with ESMTP id ACFB8200 for ; Mon, 18 Dec 2017 10:36:26 +0100 (CET) Received: from BN6PR03CA0019.namprd03.prod.outlook.com (2603:10b6:404:23::29) by SN2PR03MB2367.namprd03.prod.outlook.com (2603:10b6:804:e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Mon, 18 Dec 2017 09:36:25 +0000 Received: from BN1AFFO11FD029.protection.gbl (2a01:111:f400:7c10::178) by BN6PR03CA0019.outlook.office365.com (2603:10b6:404:23::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.323.15 via Frontend Transport; Mon, 18 Dec 2017 09:36:24 +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 BN1AFFO11FD029.mail.protection.outlook.com (10.58.52.184) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.302.6 via Frontend Transport; Mon, 18 Dec 2017 09:36:13 +0000 Received: from [10.232.133.65] ([10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBI9aLmd022758; Mon, 18 Dec 2017 02:36:22 -0700 To: Jerin Jacob References: <1499170968-23016-1-git-send-email-hemant.agrawal@nxp.com> <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1513333483-4372-2-git-send-email-hemant.agrawal@nxp.com> <20171218085507.GA20578@jerin> CC: , , From: Hemant Agrawal Message-ID: <85485fb0-f602-78af-c40a-7bfb4bda561e@nxp.com> Date: Mon, 18 Dec 2017 15:06:21 +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: <20171218085507.GA20578@jerin> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131580633736145619; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(39380400002)(39860400002)(376002)(346002)(396003)(2980300002)(1109001)(1110001)(339900001)(24454002)(13464003)(199004)(189003)(105606002)(8936002)(2906002)(10710500007)(85426001)(50466002)(68736007)(81156014)(104016004)(97736004)(230700001)(36756003)(106466001)(8676002)(31696002)(966005)(7110500001)(76176011)(67846002)(498600001)(86362001)(59450400001)(31686004)(6306002)(83506002)(6246003)(53546011)(4326008)(316002)(305945005)(53936002)(93886005)(65956001)(65806001)(77096006)(23746002)(81166006)(356003)(15650500001)(2420400007)(47776003)(229853002)(5660300001)(6916009)(2950100002)(65826007)(64126003)(54906003)(53376002)(58126008); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2367; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD029; 1:7WinGwUUQXTysDjDTdo35/cNH/5j0cG8HHl6MZAP8F+pA6vc11tKLx9o1A4n5oPhHBO70huNL/O4oO71waUKdHrx6jq5AE0EEgfT0LcjHONOClRusQ6uP0mfduWOHGGd X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a37b3a74-80f9-4377-ead3-08d545fac7a0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:SN2PR03MB2367; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 3:4wInyRAzegotb4qifl3vVnBbU0itZBK9QZQDTBdqVknxLLb+1WFruz6Jer6ZEKBu33db0GW2Su94CDNFXVz2Dq6LwYuThTQ8hu5EmSqfj20nyxOKaIcFHKCWMS5GFIdmL/uBqrfTsUPX/Tx6YuBtS2T+jsn/z5hJnBeGSESydAn/79/biN1wGYaIo0JmTHkiygbwHmDj6617Dc9H7Y+sUBjWJRhymmRx4aRzsws0WqRGUGgh/J/77iiOoGOYz5SFJUEhThQ/fUk2mu7XQfGkrQYbp8fgKMS6a57ETOlsxU/gnuuc1o66M4ukIRfCTKgewNqKxA8f2KBMQFHeO9c4tGjZJWZfDahS0VdPcUMt1Yw=; 25:FH+iOaCsKSNZN8rJvrQNmKDJjSC0Gwc18pNf12ud3Dcj01lglbT/OG2lgAc3TI9gnEKYDRMDv/177gycJphg1KBvC/pqf7Q4JWdfGL3I7ZeKJCE21q+OHPz4FoNelgiHFnO8TEOZQVozXzC/Hb7xWd8KHXHeWvTHM4jKIy1C6Ry9xL9TorM7VRV86/wtHa4xq14c/QC7MARQWNzf5n/LLrFGajHwMIuOOKIVhMtQLGdv+N8XMivy3pRzKUhiSYHVCQh+ttgZgyja4lA4/yaUC0/aUJcrWj2sE/E+CnYZVBytCyaWRL4/FM9QNxEnQjrGRDMoAQ7VFjHFtKABLiELvw== X-MS-TrafficTypeDiagnostic: SN2PR03MB2367: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 31:aRuNKCRnw8iyRPI20rMLtjqexFWQ2Ci6iSlTaVm2MFYffVXyEj91LxdjEJAzpYlvbdiVJUl40xUzKCuO6oKcSCn+cHMLai8OQ7FuJZVTfDPLUH6JOKZNqu0y1oasa+Z/PE0xRZ5Yw1Z/3V5V2ZbsrYof43KDK5Yys/qy0xrFd6PWrNWf3Rx7vvU9QCewnDsrEPJcc+fosPMZJ/8UmFg8mHbIwEb9wWg1ySuC1p9+/ns=; 4:4VoCfcwVfKCVnkrFBYdaveVu5ORqn0NoUmLkCJpc7EFLPv8sH1QfxBthq6s2+7uWEhOf6EIJ/cijWFad6Tm3nv7Xk0Evz5LQslcnQvAKRDL0ys5iUyU9rRmTDdrAyUCVaqwITQr5uduhjcd0A4lJa3S/nla0/33IGGhscg6Lcjub6H32/lg9y4iFxktlhN0jtet7YtaTteYx/wr/yKtpI/3fDhswkpOb3WIPmugaCuuW3iTXQSPq/b+vNW+6oeHgZqKBpDhikH+8I2bQk4zZam+nW/aY8XPZ6Uq/q21Wj7ht/BhtI50BBOUTZc5xCkd1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231023)(3002001)(6055026)(6096035)(20161123561025)(20161123556025)(20161123565025)(20161123563025)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(201708071742011); SRVR:SN2PR03MB2367; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2367; X-Forefront-PRVS: 0525BB0ADF X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; SN2PR03MB2367; 23:Jsq5u8df82fPzLZbVVsjorEFHmOQQhXzL5ueK?= =?Windows-1252?Q?CBvEcke4m5m4oOhvi3TRnhOvvA+LPNeDCZ5LxYqnZNPXwMw+V6Ra7S39?= =?Windows-1252?Q?b/NM3a87QUCNSmAVhll028iuF5dAVspt3seyI/gIlht7PlP/npHFHtSB?= =?Windows-1252?Q?JTx0B5s3SnP00Kcof2NLKdd10xmkNDew418sQk69/gLzjsDPerqJz136?= =?Windows-1252?Q?/y9OdT4ixKxBzqeeMox+MLwe0XMoRGGet8mTUbeuQXafLdJb1OnKIgWy?= =?Windows-1252?Q?RGv2C0I6cLAiLuFFkrrWB4TtjcPG8gEhgnZShO0eF2+N9WPXkHxx1ncT?= =?Windows-1252?Q?O9mngn6Amd1ijEKc8Usnqt1wAx6aE9htyTCA83p0wXBlDF/fkD7i0HJH?= =?Windows-1252?Q?UBAnv32ipymSWA6iQca0XVZCJ0ekvCyxTUkloMseOr4MhntVa1MtQo/U?= =?Windows-1252?Q?huoai5+f03ekhx0ZMQEQ7RJK0JKPa780AiQzTvGFoUodJ87hTTRo6EBP?= =?Windows-1252?Q?gnmuSqUHoyNAJ15WAMQst0na1eGkt14BI19NbaVHxP7LkW6eWNPeTWD5?= =?Windows-1252?Q?iRkF069wfTgNSW8TOu37ZPpK6Adw+ofhtj5Pz7xCYz6tc6hXaXQJxqLc?= =?Windows-1252?Q?uxB7kEoAJiPbFVe2V+VOgOvGZ4uA8lFxi/siKggmHTKkP6HQ0faoX+z5?= =?Windows-1252?Q?gOXSUBcP0I2EpUFU+3cDPc417l7JYPhADdQGGHWnSAUj+4FYZjcrkTD0?= =?Windows-1252?Q?Pe5t8btsZ9rbrOAq+9S4L7cmeRWtgE74FKIGwhl6Qhlzv2u3rzHRXVGY?= =?Windows-1252?Q?bS90h/rU+pG0gITREpzWRTdCA/pxhJkzGoA7FAX7/1Rc3C2Gf0lXYbJn?= =?Windows-1252?Q?w4tBQ6vlgxV8fW8C89DEInJLLVglGww4imJWAMC6m39OEfaEZMM5rxZM?= =?Windows-1252?Q?LAqUNh9+81WY8gNlBz0gQWRIpRwFFAnEuETEBlYpWgYyqbo6XMIXqoji?= =?Windows-1252?Q?dmFfFQTzCJoZZTH7FFnZfEwu5PCNX4nXF0MzhkQAGR/Qb3H/4+kDNMF7?= =?Windows-1252?Q?iDhDkD204cWgjZS7bs5KA3TxAkiFUr3XFbkKNroguewUB5iF5jcgBxn8?= =?Windows-1252?Q?XNREAAHR7+tTBDCZ89Q+odgr8zHazorAf4AiSEjAJEsbGbp9P/XhmIWw?= =?Windows-1252?Q?2xElQqTHkxf/gVntfO8kfDBKcUzU8V4SIhjGaMBuWwQ/Sutf87csDWX7?= =?Windows-1252?Q?Vnz6flMcNV1AMZbkeqlOYfyCAxTkMdUY0cO3Bn9LKgdxlZ5w/HLhmnzY?= =?Windows-1252?Q?0/i2KGAhLJW/0LifankSO8/3VHFPZEqe2Ompri6/N4buY1S0Wk9jfAAM?= =?Windows-1252?Q?x7W2olOC8O21BgC9XIo3xcAhcM52XNAcjKxQLHkPhIOPBWgwzDNOTFcY?= =?Windows-1252?Q?M4uVDPz3OsIeGsx3lk8J/eAs2pA8rlSctewK1dAB9Wc8fma3vWmqq7fa?= =?Windows-1252?Q?0MkFjcn7CVaNVrpe6f5TXjwpsdBBDg5PwekZ2hs5jNcSsA2eOox2K621?= =?Windows-1252?Q?GK4/cxLji4axBGgb6OW6s/hwRt5TMqxe6noAPoksBS354+ZCztQyzyYg?= =?Windows-1252?B?UT09?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 6:RwDSxW1YB0zILaTpd26NmJItWVAHkLzRWdfkKBEdH0kxvGg+HQ1R753Mn/BwEaQY1M6CW67RCji7D/UtThbMn5qh98zwg5Wv+XaoCW29f9IWKpSS/NQAScW7VvuQgKVgSigmUArwHoysZ2tNBKP/61qC/C1DJsDsmJib6tc8ig+Z/ZyrEtEo6dBFEOha5Z6QtSpUE2mh5Ng24qCGcx4A1lMXZ9ejBYsZRpAoX5FTewmKHypdT/HBuBgA+pH6nq4Dyfr3HJdpN3FW+Qwk1v/ySGB9ajn4maI6tjiqzA3BRMXnQeQ8s+fgTEEWyobsWj7JCCKt1qADkPkXCiBwJ6N677MaFNH4fv+uDGvYVnR9xf8=; 5:IXp2RLn3eL7xkWMuAirD5c7T6q8PrbWYSf7I13+jv9yVYSHhHH98N5ZGq0PIKRkCS56jXItR7RAHbFPRJqad0onlZGe5T9D+xCeYkeb+rizuii8+VM+7baFrG9MhFTfES8j+Twh0wTvxZCvM4DgAFwzp6/T0IOFC/+rrJZg3iYA=; 24:PxYe+XyvKiBvDGL6WQhEUjop0452RE9JSQ88nZU6KbL+gmW9NQunZu19WV5KLpRBc98bGR1URY1SGvNOGmov//jADyNdarkS6wOKlsIMmHc=; 7:7RbyHPpVucWosYpI+JnQ5ef5c4d/lYqCzT4K2K8naf+tjLqzzmvUlRnB7cvLPUQNvtw/EMmHJjgjADDTSOeX20UtxwI0RtgINeDlzqyZDrOgXXc4R6/21s5WyWA7ebx7a0Unh1aQtD5AHcSsSzMKi0ynxPrnrGkWTcyFAI/o0BDtDYLPCOKOYizVSKIbDZ8PAWMG9QJC5W63Qnz7p+iXk+wSG6dBFq+wc488TEZQJYENfzcHsDoSH7PPrOCccril SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 09:36:13.4429 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a37b3a74-80f9-4377-ead3-08d545fac7a0 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: SN2PR03MB2367 Subject: Re: [dpdk-dev] [PATCH 1/2] mbuf: update default Mempool ops with HW active 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: Mon, 18 Dec 2017 09:36:27 -0000 On 12/18/2017 2:25 PM, Jerin Jacob wrote: > -----Original Message----- >> Date: Fri, 15 Dec 2017 15:54:42 +0530 >> From: Hemant Agrawal >> To: olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com >> CC: dev@dpdk.org >> Subject: [dpdk-dev] [PATCH 1/2] mbuf: update default Mempool ops with HW >> active pool >> X-Mailer: git-send-email 2.7.4 >> >> With this patch the specific HW mempool are no longer required to be >> specified in the config file at compile. A default active hw mempool >> can be detected dynamically and published to default mempools ops >> config at run time. Only one type of HW mempool can be active default. > > For me, it looks very reasonable approach as it caters the basic use > case without any change in the application nor the additional(--mbuf-pool-ops-name) > EAL command line scheme to select different mempool ops. > Though, this option will not enough cater all the use case. I think, we can have > three options and the following order of precedence to select the mempool ops > > 1) This patch(update active mempool based on the device probe()) > 2) Selection of mempool ops though --mbuf-pool-ops-name= EAL commandline argument. > Which can overridden the scheme(1) > 3) More sophisticated mempool section based on > a) The ethdev PMD capability exposed through existing rte_eth_dev_pool_ops_supported() > b) Add mempool ops option in rte_pktmbuf_pool_create() > http://dpdk.org/ml/archives/dev/2017-December/083985.html > c) Use (a) and (b) to select the update the mempool ops with > some "weight" based algorithm like > http://dpdk.org/dev/patchwork/patch/32245/ > Yes! We need more options to fine tune control over the mempool uses, specially when dealing with HW mempools. Once the above mentioned mechanisms will be in place, it will be much easier and flexible. >> >> Signed-off-by: Hemant Agrawal >> --- >> lib/librte_mbuf/rte_mbuf.c | 33 ++++++++++++++++++++++++++++++++- >> lib/librte_mbuf/rte_mbuf.h | 13 +++++++++++++ >> 2 files changed, 45 insertions(+), 1 deletion(-) >> >> diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c >> index 7543662..e074afa 100644 >> --- a/lib/librte_mbuf/rte_mbuf.c >> +++ b/lib/librte_mbuf/rte_mbuf.c >> @@ -148,6 +148,37 @@ rte_pktmbuf_init(struct rte_mempool *mp, >> m->next = NULL; >> } >> >> +static const char *active_mbuf_pool_ops_name; > > Global variable will create issue in multi process case. > >> + >> +int >> +rte_pktmbuf_reg_active_mempool_ops(const char *ops_name) >> +{ >> + if (active_mbuf_pool_ops_name == NULL) { >> + active_mbuf_pool_ops_name = ops_name; > > I think, if we could update "internal_config.mbuf_pool_ops_name" value then > we don't need any extra global variable. > > That is a good suggestion. Also, We may need additional variable in internal config to indicate that this is a application provided ops_name - so that it should not be overwritten.