From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0040.outbound.protection.outlook.com [104.47.34.40]) by dpdk.org (Postfix) with ESMTP id 1A682592B for ; Mon, 11 Sep 2017 14:40:54 +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=S57F1UI7yceZNF+BU4MkPj04EdYqoFj5vEeFKLKZwTg=; b=XvSAVNQFqaBX9rEygWt3LY08cYnTGY8xI4jz2hHCxJsvfj5QfnVguTjJzGrcVPqLmvdmidJLFCPx/gwAcaKVQpGXUv7swf0sT8Di3Th7OJZxTCxZvZfs+m6BO5Z3cxHI+D8jW3EHYUljYINVQMTCwDGvymR3MwUarwtjpFR6MaY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [10.160.0.46] (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 12:40:49 +0000 To: Olivier MATZ , Hemant Agrawal References: <20170720070613.18211-2-santosh.shukla@caviumnetworks.com> <20170815080717.9413-1-santosh.shukla@caviumnetworks.com> <20170815080717.9413-3-santosh.shukla@caviumnetworks.com> <20170904121113.jdilonuhw77c4vx7@neon> <5fc11fd6-3741-ae25-d5e1-3bc8a643661c@caviumnetworks.com> <0df45c69-6e54-5e6a-354e-e5c2ba6d578e@nxp.com> <08aaa47a-b2e2-4b02-a9c3-6e3638503f1f@caviumnetworks.com> <4cfc26cb-18bf-76b3-af3c-5dacd86cd52e@caviumnetworks.com> <8e66eab5-51a5-af0c-8b0c-3879c516364c@nxp.com> <20170911093333.7tt3zdzdam3tshra@neon> Cc: dev@dpdk.org, thomas@monjalon.net, jerin.jacob@caviumnetworks.com From: santosh Message-ID: Date: Mon, 11 Sep 2017 18:10:36 +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: <20170911093333.7tt3zdzdam3tshra@neon> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0015.INDPRD01.PROD.OUTLOOK.COM (10.174.214.153) To DM5PR07MB3100.namprd07.prod.outlook.com (10.172.85.10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27c67f95-cff8-47fb-5111-08d4f9125692 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:zl1x6n+84ccnhUNT3SRe9mYLt67bJSDQHZdkF7SNlY3RbtIfq/BWQ9EiNavHDi+yKZ2+YFDI55hNU8cISTlXDbqhaT1ldnxZUtEqWRUy9Kou69moyNltbLaR0+ypl6ZOr2X9/cl2xLetzwxskaOEXCqfVfKWFVGzjE++3L/ng1dtsrl5+X5K9fNute1Yljo0IwB4GqTPH4Sqmi5CvSVINy7qVxNdhs//znsMqh3nxXaxWxa62ifYlUsmmCRPl4NY; 25:fsOZH+KKxHALVP+1o+FqRSMR0CO7jE2A/ElkaMN4HsuCmjANIhcoSrpOrtLoNo6Ydpp+BCvG/I8dxnw542tccfQbZnn4ZlK7kpfCM8X8NDlxnWkoPy8rYlbx6Hhk7xnVzImrf7xkj4SIj1O4uxXmIyp7p8EVePGqMZtTZSyhdv0uNIWPzQCyionsorSjYsh/Z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5Yi0j7j3rMK5k5bZyjYcX5zVln3w20eZJnsG0I5LVAMYw9dO8zISsHKTs+lx4WcmhJDK/aF81Hkj/npCTiTIinQ4PjX83N644yFF5lIRvjOmeSrZJSvYS4Z9NM8QgnYkrdzoYDe8WdaLanfE6oCwNG4ZZaitn6npcUhMQFxTtYHqx8iUPuqgMUQYhsdUA1BU+74izYBgrh8nagiYkVx7gRsz5qRYepl+LQbQXhtEvYE5PrvS1JuNQXqbPRcH8 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)(6009001)(6049001)(377454003)(199003)(189002)(24454002)(51444003)(93886005)(64126003)(230700001)(5009440100003)(229853002)(68736007)(105586002)(106356001)(42882006)(6666003)(33646002)(2950100002)(25786009)(53546010)(478600001)(6246003)(189998001)(4326008)(53936002)(72206003)(107886003)(8656003)(83506001)(6116002)(3846002)(2906002)(50466002)(23746002)(65956001)(97736004)(31696002)(66066001)(81156014)(5660300001)(47776003)(65806001)(86152003)(305945005)(8936002)(7736002)(81166006)(8676002)(65826007)(90366009)(77096006)(6486002)(31686004)(4001350100001)(42186005)(50986999)(54356999)(76176999)(101416001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3100; H:[10.160.0.46]; 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; DM5PR07MB3100; 23:X51Lta2voikn3bEgnuE9lUz4m0jI55pJLnQl5?= =?Windows-1252?Q?T1YjlgIlPo7FSayc61ttTHpdoo/fHjLRVP3G0n46tNUkXfAlliqeeqrT?= =?Windows-1252?Q?YNl0M5nDcdDUjOvYvtpr1AN72ctFgua+Yt/igfDnqKFAYYyNeUo4/Jbo?= =?Windows-1252?Q?05kSwRLa6j/kUGwkLkeT7yYAgGpqrmLZ3d2QgG90Khtnd75Jbn3R4Pre?= =?Windows-1252?Q?NSQesPo6T8x3aTcmS/SQKUAxISx7TwGz8wQl7Z0IvyfiDQ8iY4TOxLY2?= =?Windows-1252?Q?fuA8XpGHIwEZwCcLKCb3nbvdbLBbNdx+4WLbdA8Re0CAk3ke4G1hqRVo?= =?Windows-1252?Q?bxcj2fRR5wZ7lkvhRd0OSCueObGgUpF9eYbV25I09D0UUuaLTmzwDnsT?= =?Windows-1252?Q?bJR+Oi6svPbGX16DzfWusJAcOwaGI0kTwwOp78ZCEjnPMO4LQec0A28K?= =?Windows-1252?Q?Df2JN2fQLcnSrqYkRAMaj41ki5GbjCSPBnbg5gXOLO6RgX0S/d7ViEJo?= =?Windows-1252?Q?jOFpdZ9ZhQ4a+FUzJYioNMQhsYMSpI1MXIylgF4C1tANqX/hIFQrOw+L?= =?Windows-1252?Q?d5JogtMTk03lfZhELOELthZ4KF7tq68bh6UOz3h7heM+Lp2Y2WAIfM6d?= =?Windows-1252?Q?Q0ZpAY+4sYPNtbb0q1teTCGyogWHzp9zxB/YiSCr4vldvOsYMoBChAQd?= =?Windows-1252?Q?g7HWyzjtzAE/Y3CwTdmvaB2WZO6A6eEtGsSeiEp9kdVuLywmH/qOY5k8?= =?Windows-1252?Q?Z5OnodsSG2/OP1tDyOZuMegbVNYU+J+suSJXxeMKoftDC0Tot86bUZwU?= =?Windows-1252?Q?OzCTQL7xxXExlawQvv++Z7ATlavZZPqfHOzVI9+VihATgAmzfnkX2zay?= =?Windows-1252?Q?SGSE9K9VYtMEkMKdJnMo6+/K3gi3QgFc7QXaeEDbYf1D7kMCQPRrhuTC?= =?Windows-1252?Q?dwBgEvQ0msMFCmoOZfyUpNn9aPNpxd+P9xHx4VPsND9yDN4ZG1XoJp52?= =?Windows-1252?Q?t1tFEnF7clTYNFrdbABWpZmu8uMm7grtdMiI3zV77cNxU6g1VFsdJ7Nw?= =?Windows-1252?Q?MQJb3ysAN7xkcAXk3OL2KBcB4IIdnR/TN244CFIechkSOwKULyZAQ8Dj?= =?Windows-1252?Q?ztbDK2AwkjO+HKXGJtjozhJReJkhTjmZhKTahBr4u/Kq248D7MKxESK8?= =?Windows-1252?Q?WOnWEPKaZEeMSKHoHGtRPs+MhYRaWYo+uZIaTmQlTQfdWHmuyBxIG7TW?= =?Windows-1252?Q?h57J3/Ee9AEmZcmpZCv0/bGW5ECwxtuTDQSlYuVufd8I/JjPTnwJB3pN?= =?Windows-1252?Q?dKumi41whW7VYaFglT20rBe/T3D8pWw2mjTQqvvb+s2CuxHQF9xVprTS?= =?Windows-1252?Q?Yjyf58oxJpPiyztMmK03smCT15pI9Ta1k93LNxr9iE1wjjVBuylOsUO1?= =?Windows-1252?Q?y7jdXmMllIww1T7R4fuWCj42sbdvaepMMDS5XuWlyitoS0duZm3A+chQ?= =?Windows-1252?Q?Q7eGQW5JwzMZWRmuW2/DJPcktfWvL+FPnjm1EmSOq3HD3mvtavWMkUe1?= =?Windows-1252?Q?0ogt3AZ5Eg9Cv8=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3100; 6:5RQqxJSb4Tv1DMR7yfP60goEzdiTNuiykyhhjATtnWrIqU1ZhawKR0aOngqaHTGV11ZoWankWNrNtEaTnZvXMbWoIZcrVz8Bc6GXDcLA784LWkq3eI7jyrINZgZQcwlYOeDC7We8aEWr0/RKorKp/oXzUCr57iZeazdyJDWTtTG3yUVb4h8q95zqXz1SyelR+zAAGMgUmPI+TC1lKdv8P+L7zZm8nVlkSSYufPnfT2HTRX/Rj+kE3k+njz8oY2n7TstBG+s2JIOw7+R0k7n1rP+iMIoT45JzQOPuIzG9pMr5rNWHhNcHOnYtX6f6a9DU8IUiiHhIJP4+vZOenmhq4A==; 5:Pg8y15hTV/WLDjcFiU18/GPG80wTgab1kCukVk+Nid63jQOVD7dCzDzyX7RVxViFkVVqaQRk2tcHH/iQTzJsppRubO/rxcYYS4E8VUz6u64Ke69uOxFhAMXy/rI62oS//coXNEsHv0sAhdKLNO0RaA==; 24:tay5GIoQSN/Ys+7dWtoYSwNNAC7VfLK0HANtdrSlsAcmkO7TlvxjhuNo9JmcmdcajQyNR4FunAPrHFookOCAp2MK9n4rTFgy6SHqG2uc1ag=; 7:u63V2k87iqQK3h5BBWqmaLHK6uQZrcXi+4bwX5bHMCRE4TGb/2Q907KxJBUtR6xDYxpQa49Xs4ZA4t72VAMFun9NBrp+vxBlJ0t8QoQ+K2EQM0HG8bsXXUQJP450lr9nZOV1jlnstNc5yB5q9nw7URt3ERmXDWmawdnvJXDbEQ/IIyQyMNDU+k4gje6LVhjIcw8kWdy6zkExcJ0kK8mnkxKw6D7xrkS8q06FNXOsBKw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2017 12:40:49.8864 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3100 Subject: Re: [dpdk-dev] [PATCH v3 2/2] ethdev: allow pmd to advertise 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: Mon, 11 Sep 2017 12:40:55 -0000 Hi Olivier, On Monday 11 September 2017 03:03 PM, Olivier MATZ wrote: > On Thu, Sep 07, 2017 at 04:38:39PM +0530, Hemant Agrawal wrote: >> On 9/7/2017 3:41 PM, santosh wrote: >>> Sorry for the font, resending proposed API: >>> >>> /** >>> * Get list of supported pools for a port >>> * @param port_id [in] >>> * Pointer to port identifier of the device. >>> * @param pools [out] >>> * Pointer to the list of supported pools for that port. >>> * Returns with array of pool ops name handler of size >>> * RTE_MEMPOOL_OPS_NAMESIZE. >>> * @return >>> * >=0: Success; PMD has updated supported pool list. >>> * <0: Failure; >>> */ >>> >>> int rte_eth_dev_pools_ops_supported(uint8_t port_id, char **pools) >>> >>> Hemant, Olivier: Does above api make sense? Pl. confirm. Thanks. >>> >> looks ok to me. > I think that returning a list is harder to use in an application, instead of an > api that just returns an int (priority): > > int rte_eth_dev_pool_ops_supported(uint8_t port_id, const char *pool) > > The possible returned values are: > ENOTSUP: mempool ops not supported > < 0: any other error > 0: best mempool ops choice for this pmd > 1: this mempool ops are supported > > Let's take an example. Our application wants to select ops that > will match all pmds. The pseudo code would be like this: > > best_score = -1 > best_ops = NULL > for ops in mempool_ops: > score = 0 > for p in ports: > ret = rte_eth_dev_pools_ops_supported(p, ops.name) > if ret < 0: > score = -1 > break > score += ret > if score == -1: > continue > if best_score == -1 || score < best_score: > best_score = score > best_ops = ops > if best_score == -1: > print "no matching mempool ops" > else: > print "selected ops: %s", best_ops.name > > > You can do the exercise with the API you are proposing, but I think > it would be harder. > > Olivier Proposed model looks okay and I'll implement _pool_ops_supported() api. But I cant promise the testpmd related changes with this series, Since rc1 is closing so let the api go in -rc1 release and testpmd changes will follow then. is it ok with you? Thanks.