From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0047.outbound.protection.outlook.com [104.47.41.47]) by dpdk.org (Postfix) with ESMTP id 1C8603777 for ; Mon, 4 Sep 2017 16:44:57 +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=hevILqfZhP80zdXcipDmX1PtGRlFeMbzecbayFGJOiA=; b=mSMEhH1J4RPAEM66O+HZZKOnQhE7w7TL1TqmLgTEHFzwu8QPqKWYpDkilvhh7FOx+2CtjJnLqKn0qzaMydH0IJKC45dfGJ/qPzixZ9Ycuj+zOR65P+93OOIhVjTw3+eY3lUPCDCs25H3vQN/fuyId6S0GwZQSli6CSaMLUPgQyI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [10.89.1.1] (14.140.2.178) by BN6PR07MB3090.namprd07.prod.outlook.com (10.172.105.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.13.10; Mon, 4 Sep 2017 14:44:54 +0000 To: Olivier MATZ References: <20170720134759.4680-1-santosh.shukla@caviumnetworks.com> <20170815060743.21076-1-santosh.shukla@caviumnetworks.com> <20170815060743.21076-5-santosh.shukla@caviumnetworks.com> <20170904143206.uoc5mniecpb3v744@neon> Cc: dev@dpdk.org, thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com From: santosh Message-ID: Date: Mon, 4 Sep 2017 20:14:39 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170904143206.uoc5mniecpb3v744@neon> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BM1PR01CA0075.INDPRD01.PROD.OUTLOOK.COM (10.174.208.143) To BN6PR07MB3090.namprd07.prod.outlook.com (10.172.105.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 781d107f-2907-4bf3-d20a-08d4f3a38298 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN6PR07MB3090; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3090; 3:DkpRLVLl0ZgTO1SLw0HjEeNvW7sJ9twYKcMAegMFGHnueFjq1rsM34dVaapCu1IdXowLx/AfK8zP7zPVoyZB/x2zf4IPh5Rh4OVbs7UKWLj0yoj0BqHkRAy53+si1Q4HnhhpTJU49fRxqtFBTLvMEZFKXgNTRQ01v5wUtDt8i/IlWYibQsEkJSLkGj7wE0NEIjUYT04P6sBwXBkZzrxUiHz8ZpGUlmQwoL2JKDyB1UWXGQQKPOCWM1SJ01/kgHnU; 25:InMPYVZRMbIrnYj+dkNPHG8fVvgQP9kfVjrDXiN6CFXS81u9o9MbfQtWrA28eHxu4KdmgFgd159DBj4jjErQu1/dk4ZWLRFIpACIMbH3zf8ga5IC5CZyrCemuJCt8cchSSVadKZpyr0ZxpZUN+S5Xe6FdUwHFfFam8QtmdPezprLTKRJS7ZsOG9+3mdCLV1EY0uL+Hefls0Bij0rV401kEocObmPdd4kv+mLeVYJ5Wqy3afxWj1+LPPxrbwSkf3evKYxk4YYSehlFWzjygZ92M1FMbyOMifx6S1SvfvlhWXUU+ZbBvysQ1iN/G68hAAyTSvMjbo8tR89UlyroUDBlA==; 31:f+eY7+UinMr3V+1GzR4tWxsl4M+NLfIOPULiwj4r/M1xrNws8bn19YC6C4QALdSZOU+wC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U8BUZJPSgH6Jt2olBS0n9ZPbHZGPW/aNaQK 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)(8121501046)(5005006)(93006095)(10201501046)(3002001)(100000703101)(100105400095)(6041248)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3090; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3090; X-Forefront-PRVS: 0420213CCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(6009001)(199003)(189002)(24454002)(377454003)(6916009)(6246003)(42186005)(305945005)(50986999)(76176999)(31696002)(2950100002)(54356999)(4001350100001)(105586002)(106356001)(25786009)(93886005)(8936002)(229853002)(8676002)(110136004)(53936002)(478600001)(97736004)(7736002)(86152003)(81156014)(81166006)(6666003)(42882006)(101416001)(31686004)(64126003)(33646002)(83506001)(189998001)(8656003)(36756003)(230700001)(77096006)(50466002)(90366009)(5009440100003)(68736007)(72206003)(6486002)(23746002)(65956001)(5660300001)(66066001)(65806001)(2906002)(4326008)(47776003)(3846002)(6116002)(65826007)(110426004)(15583001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3090; H:[10.89.1.1]; 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: =?Windows-1252?Q?1; BN6PR07MB3090; 23:ib9TakHAq/eUw1Zgqlfi4+Y10yDcvtUcciBjq?= =?Windows-1252?Q?4cVEgWNXPrR4dt05P9uu6ikNgjKR5Eu1g16IZMqHshW5Ey9UyDiSFysW?= =?Windows-1252?Q?NIadmKIbes5FrScboX/v0uxqSY3c1d/NK7LJLQYwSsFIKjj8K8OGkaBu?= =?Windows-1252?Q?Gad9nbf60ixpZQwBExYDHRYgsTHZUZAV0G8wGLS3jB8PCx+F2Cn07NuP?= =?Windows-1252?Q?7N9T9CGZ0tsBCJEYNDOMWHG8vK0w3jysKF/w512ORfB39Oow2DI4oUJv?= =?Windows-1252?Q?8DOk9/gpO7GuXldhPsNeCUV88iGc2s2sM6VaAXiroL4YR3qKsuJE4pb6?= =?Windows-1252?Q?9wonPWD/pKrORJ25rXMM7xNOWmKdeTg+2SgyXeZOeqFhOZCMLgyfQOkW?= =?Windows-1252?Q?Wiojgvy5Vla4R3O8cRXOTJsb/M4n2UF03f9DBYwohHti3swmpq/cPC8K?= =?Windows-1252?Q?IHmCp8k0yge+Nxgn23NH4OZ8+pQLWg5ItMSJp5mwHzHQnUD8ukwSIcFv?= =?Windows-1252?Q?nJObZOF7buNGLKV/hSKr8PEUOWfwwTFLUBT7FCR232nwIAELK7Sy4Yb3?= =?Windows-1252?Q?wEitzvOxzPF1YcqQ459fCJM/lmtDsQTChYp9zqPzZj6gk6S4wEtjlN1F?= =?Windows-1252?Q?GDZ3T6IoRtYx8IFRLy+kY9GhhZrmr4PG9ciRqLFwpn0RMVsXDHbBGuhL?= =?Windows-1252?Q?9grDi0seoCPftPtaSqxdwLN5zv1HHvHfpq5+yNTdhNIO9bLf5iYJStBI?= =?Windows-1252?Q?EZY4cvAfzc2Dwmict/X4S58DTXP7lhM/pc4ikDRYkn+HIFuLg60XDZJk?= =?Windows-1252?Q?Il7umxrUvqv2fZinkENQOwNemNWJCEPlVw8R8etjngEeJ/7rXlHOx/vw?= =?Windows-1252?Q?r1Ii5wiTsRS6qI0yFXeZkxGzziLAIQCknWbmktWWPreSk2eLTgwSdLLi?= =?Windows-1252?Q?LQ2oq33ftARGRMB7jmn+m/ohqcmKsXDhw8N3FaFO9SzyRCV9TMxVsix+?= =?Windows-1252?Q?C0eoRaIL9zWkZwr/8dksaDBWo6959W92fROO/nC5DDfiZd60eDCYuGkK?= =?Windows-1252?Q?y1ussWTllbLbYe/UYc+s9w6AIMB5B+rAdHBMRMPoj+Ua2CWFV7bcLsft?= =?Windows-1252?Q?3rfiBf06kG2SqAQE9z2lEbkGN1d1cuCe5TF6ATnqHqkhmWuJXBSDVHfA?= =?Windows-1252?Q?XE8mzLl04CKOhoNgSFgPjmC4aG+rHL+G7MqaQrnoxul5tnZTCf8qA0f4?= =?Windows-1252?Q?X1RtRmgQs8uL+NRmBETmGnkYEUC4UahHMsz1P3sDfSgf35FzMNmn+vAP?= =?Windows-1252?Q?8jIJhd7qMGXV1hnIKhKxTJq290qg+2UdTTJh0wlbNK7yQeUIHnHKS68z?= =?Windows-1252?Q?Xw9/Dee8YZ3GNd3G0W6DWX5/ufs2hRgLyqfrXvL7FFooLiYL5e8lJBgd?= =?Windows-1252?Q?4zbbmQ2yXhT8nqQ9xOSA2Bv5Z5q8to/FUY2sVnD/4pcnwFuI87ZSFw28?= =?Windows-1252?Q?UJAL2kz6cPhUPxlAa4sPrpDomD/c2yq1CwotmJK9IR2LQYEy0jg1o1g3?= =?Windows-1252?Q?BKK4Q85MMl4LE4J2pz9F1+P6zSe2l0E9sXY?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3090; 6:CcAL/qBIXp29gnMy82Fik9eIARAQ5wsyK9yQZKq7uhpBJ8To5RJ42DWkr319jyCEvROWgLIxj9NXLSufJJ6OkQ2SZxjSDz7/clYpRP7xS8P9vKRGAWd55WvXKBThQwzu05ZqzLVG9YzIp7Xtr6p2HVBcf9Wh2dYjeU+XIvHV4bFL+bOQOX/GBjA1fZ7umErQpWHehSzR5SrKSxWssXSREjbaf0BAJ8cFI6ruJxwVy/ILr0Z6PMVaSSAFFXLdd84ai1KfqCeUHF7dS2XuipdOn4k6SEdRYmcoX6ySGxev1ruGAwpe3ONHfU3mcmp3M5JUOu2u+qWdqwQvLE3TL2pujQ==; 5:LWnK5rrltiv/QHZUKzZh82gqsOQnfXZhwJ4wbRlDxp6l2d+5+7AA8E/poul3llmYqdJWQqqkeL3fLtrDkpnKmnUd8x5IdHRuiKVIX++C9Pd5c7WE4rUb+U3xV8DSw3QQHFdB2HVMFCVhzcvbety1CA==; 24:OfKgtJnsn7jYjwtuDhHTRgxLh0Dp/CEUSu6cXS6pqktb8SStqMeW1KAo3qZ0y9Mx7sxm21N59L0I4x2sHIDngqtOUZU25w8giozIJStYMiM=; 7:tEkqcSHQ+Zj1/qiRIN5xq+9EJvFDp+aX8dWQSqEp16sqlz/8LbB0I4a5YWq2h3zKuIitbRgIEbZWnpes5jXn7CiPd/gbB3txOrXNtnmj731bR3dsB1q2wkUrn6V2QW2qXvmkv456TtFfJ3pl+Pu8YEXQX6ouiiRNFX53mWF8fnfk0sMwsZOe+ED9W/enlEK4pyoLd3IILRldrUMFhSl423mQfaWJev6ZF0GjeGKyTJ8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2017 14:44:54.5010 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3090 Subject: Re: [dpdk-dev] [PATCH v4 4/7] mempool: get the mempool capability 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, 04 Sep 2017 14:44:58 -0000 Hi Olivier, On Monday 04 September 2017 08:02 PM, Olivier MATZ wrote: > On Tue, Aug 15, 2017 at 11:37:40AM +0530, Santosh Shukla wrote: >> Allow mempool to advertise its capability. >> A handler been introduced called rte_mempool_ops_get_capabilities. >> - Upon ->get_capabilities call, mempool driver will advertise >> capability by updating to 'mp->flags'. >> >> Signed-off-by: Santosh Shukla >> Signed-off-by: Jerin Jacob >> --- >> lib/librte_mempool/rte_mempool.c | 5 +++++ >> lib/librte_mempool/rte_mempool.h | 20 ++++++++++++++++++++ >> lib/librte_mempool/rte_mempool_ops.c | 14 ++++++++++++++ >> lib/librte_mempool/rte_mempool_version.map | 7 +++++++ >> 4 files changed, 46 insertions(+) >> >> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c >> index f95c01c00..d518c53de 100644 >> --- a/lib/librte_mempool/rte_mempool.c >> +++ b/lib/librte_mempool/rte_mempool.c >> @@ -529,6 +529,11 @@ rte_mempool_populate_default(struct rte_mempool *mp) >> if (mp->nb_mem_chunks != 0) >> return -EEXIST; >> >> + /* Get mempool capability */ >> + ret = rte_mempool_ops_get_capabilities(mp); >> + if (ret) >> + RTE_LOG(DEBUG, MEMPOOL, "get_capability not supported for %s\n", mp->name); >> + > there is probably a checkpatch error here (80 cols) for debug, line over 80 char warning acceptable, right? anyways, I will reduce verbose to less than 80 in v5. >> +/** >> + * @internal wrapper for mempool_ops get_capabilities callback. >> + * >> + * @param mp >> + * Pointer to the memory pool. >> + * @return >> + * - 0: Success; Capability updated to mp->flags >> + * - <0: Error; code of capability function. >> + */ >> +int >> +rte_mempool_ops_get_capabilities(struct rte_mempool *mp); >> + > What does "Capability updated to mp->flags" mean? it says that external mempool driver has updated his pool capability in mp->flags. I'll reword in v5. > Why not having instead: > int rte_mempool_ops_get_capabilities(struct rte_mempool *mp, > unsigned int *flags); > > ? No strong opinion, But Since we already passing mempool as param why not update flag info into mp->flag. However I see your, I guess you want explicitly highlight flag as capability update {action} in second param, in that case how about keeping first mempool param 'const' like below: int rte_mempool_ops_get_capabilities(const struct rte_mempool *mp, unsigned int *flags); are you ok with const change in above API. queued for v5 after you ack/nack on above const change. Thanks.