From patchwork Mon Apr 3 10:11:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96608 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp28475qgd; Mon, 3 Apr 2017 03:18:16 -0700 (PDT) X-Received: by 10.55.167.17 with SMTP id q17mr2226438qke.193.1491214695729; Mon, 03 Apr 2017 03:18:15 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u127si11511568qkd.249.2017.04.03.03.18.15; Mon, 03 Apr 2017 03:18:15 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 26E9363D4A; Mon, 3 Apr 2017 10:18:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2702763CC7; Mon, 3 Apr 2017 10:18:06 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 49166634E4; Mon, 3 Apr 2017 10:18:04 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0135.outbound.protection.outlook.com [104.47.0.135]) by lists.linaro.org (Postfix) with ESMTPS id DAD5B634E4 for ; Mon, 3 Apr 2017 10:17:18 +0000 (UTC) Received: from VI1PR07CA0094.eurprd07.prod.outlook.com (10.165.229.148) by VI1PR07MB3376.eurprd07.prod.outlook.com (10.175.244.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8; Mon, 3 Apr 2017 10:17:17 +0000 Received: from VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::202) by VI1PR07CA0094.outlook.office365.com (2a01:111:e400:7a52::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8 via Frontend Transport; Mon, 3 Apr 2017 10:17:17 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by VE1EUR03FT056.mail.protection.outlook.com (10.152.19.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Mon, 3 Apr 2017 10:17:16 +0000 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v33AB1aP025569 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 3 Apr 2017 13:11:01 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v33AB1qN025500 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Mon, 3 Apr 2017 13:11:01 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Mon, 3 Apr 2017 13:11:00 +0300 Message-ID: <1491214261-7177-1-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39840400002)(39860400002)(39850400002)(39410400002)(39400400002)(2980300002)(199003)(189002)(9170700003)(77096006)(106466001)(2351001)(33646002)(86362001)(22756006)(305945005)(8936002)(356003)(110136004)(38730400002)(50226002)(189998001)(8676002)(81166006)(5660300001)(6916009)(105596002)(2906002)(50986999)(53936002)(5003940100001)(36756003)(48376002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB3376; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT056; 1:9/VmxuRngpwutLPQxYkyCTMdwuT3nBKdSD8QTCnVqF6NmKpH5efylw9Rt9bdVMOuP/uwB0+ZvIWkHFdTSot+SEWMAquwVZAPRgFQ6w0bikpn8siS0ZYERxmNAXo7s0w32Ab0fwz5mHBOXufLUQBx80RXs6CA/mpcA96Ri+gRgzf6CTMqv8w5nrG7xJNL9SSydrVYckJf6AvKSNKKIMA+99oNx5gS3PgKU6KpJr+aF+4nqHn0y5v90bauL73I4iJXvnGKW/oHybNZzYS7lex61JklWIjQet/58OUihqimr7U/IeMRiwVSTkz6yvRxSXShp8ubAgAJgsKc/9/cKXDoorE9upRLDeGNs2JebgMMnQW2a2h4Ot3bpMMkfhKn65vfr6oWFtUo3aP/vqOBA0ms6JiR5yxzC4WqoAJhgYkP0E/a715OA7ciM/FuB59pdiqUNHa2azmioHpTsSCyDvKNzldKw+jqX1anyUU2u4NCVGckEyshsOA9W7WSfNGvfbS2n2wIrG+9loiQiw+yOcd4Jw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 8b92d4f3-e182-498f-f338-08d47a7a9ad4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:VI1PR07MB3376; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB3376; 3:jjiOAANtwVqOTGbkvunkyGzMtQHvyVqX6e/fbLSJus/vMdfCks3G8eno5nRUFSJS5DfsfoMfgaQ8+nxg/vm1bs6REXmv1D88H1yJbemErLzzNIU/MBC1LYEa4RB50Z7eJbIEgLcBoIEq3CFKdBPKd83BnEbfXF+2/TUfhL7QkZJ1gPgJsxsc9BfYDYW3PRlii4g0NR5Art0Y3RJyrGiPqAeoTvas4Abh5rixbbpyokoQ4IY6Am63uM92ePlQaLHABLMUFoAg3eD6ImIYp36l963gmcg4jXEEYCdLEn4eB8MFOl00WvUMkfHdLl2oul5oOWxz+/iHe88XZKMWjHnQym2e/Y9XW7iWVvCa9F6Lmk7Wzgi3n1awZGdwocLX4ppINwgvO/n2vyZ08ApVj1j4TUwmHe39IvFqCNin3J5P6h3exYD52egIQpFWsltbdaw3BdfwrbMW26UIOqVJML3i1hb9NuAd8DYVu9pTKKBLXiOxgdDW0JYFjRoAzbn04aGy X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB3376; 25:IKXcA7QKIvPnf0oD805KEQ64WGldiTBhXL1KyOpVEnQiazPF/t2qeMJpDrIAWyfCL8kwFzlAkOMgjbLzwb/MrKrSTwwqIQDi7VTpr1cXy8Wu3foM9g4S3NrJysyWhQ7ikfzBp2jzTf1+ATv5T2psHH1gjjOBL+UHsiU/KYeoa7epP0+qfS996gcjNEME+wJ7F1WY2fg44OapyCb27IrmUNMEnlMLsRfbv2GLmmdOkcqOFcEljbWDgUHayQuyp2s63yuSpY+/x7rE9yfLmafeq3UO7Le1bY+dmbC2J/LDerxP/QOLluT10wzexlinO5vwwnyJR8iEYxK4a1WM0d5rt2BcW6KSSrK29fOiqbWDce8SNhIdcSun0gblHXkanbr9FKGNkKRQnLN/8t3MQFig4sZ2Hrct/G3FVDnP1oop+qsipCpp0BkvJGEDBpXNDnbOVwn2vZoiL2hufcIuq7N9Yw==; 31:q2zq99vmKcFMn0Xo51t++U5weRkXLPbyTKFMeDK+kCZ3518kFpHvHaf3mL0PBzsJAfImH7ONPFNk87FlNZQOwiiRiDkCDz++BgzRozBJ3uOAAxfsYFt4m+5aFh/yKittsOBEs6HQOFknO4jPOr+H7BDaIqxe3us8iag3ZrOk08RL1vnNpVy531rj0aCYLEg8whbTnA+EIaSvrbAcuuK6pwyJdjbo8UkDBAbArKTbsK+qULhy2Hk8CTGKQnlMVETqIDBv+plS6ft3sZNAiP6HJrKl1+4GxWAMk4YPWn43LsI= X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB3376; 20:RYT9266kHXMtYTSEe2ZdaX3MgJ5OAcnJB50UGJjTJcG1/0Tliud/H4bRigrX8hZeUQ9INJ3Is17fWo9S7RwiTKSJ7e50yuUuzcoYa0cRAYEHP/cXSPhAPnOzCbjx4tlDUPMhLsLqq1pe/05LrIb/rphRhin5KhcQ4LVXLdzHXBqLK7EQkxwJsvPlbOBSBE7uAzWN2j54wX81pI5QtUl7/uKxGp3c/TONVCot0f2PD3fRT0AVOirKKuDxnvIOfmSNiGzAEwnjQQsZsLJEJXBF920bzt5iX80ciOhuxqxtYMewYp6q3iAvj+Mtj0NVS1saXA66swHkDwoSfd6UxvaOlUffkjYZG2bJ64nUPiUf5ldFZvyf8gNkLi6BoFeQufAbSrphDbTZLAd5j14HRHvAajuVkR5rJ15LE+goI793CswwjQ5LaY9UFVA5oyIFDQDtkVP6JEWEVdFt2OJsnR/9xzmW+EF3aqOjymk0GluxL5N5H9olHHAwOV5enZPitH4feA4Cvnjc8cm9vnt84X6c6/bHSVP/t+ixyo0zVsmE2EKgNvrRU5rWoSGVixjkT3Yf7g7oFCIlwcpFRngHzhTxBPk19R7V4Zac0PBb9DmcKNg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(13013025)(5005006)(13023025)(13021025)(10201501046)(3002001)(93006095)(93003095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:VI1PR07MB3376; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB3376; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB3376; 4:TI813lqk+n8xA56sn8oyQ0X9r55f8WYBu6l/eGZypRDPF+Kr1f2ObrBVWzEaAevnmi7U31l4ntwm+BmSk6YQvI3TiTQ7PElHHlzwfvbNobXmV2HOVaW5fIaoDzT4FqYnqx1eJd7gAOTRhRnL6FfjtyklK9bfjiymU4ZEKjuis+L6UmjSSc1SIrSCWSAjvyarkmDNESukbi6qDWdBpgrgS2QNUar1sxs7sVVWSPBkH5hwD0wbhDH9VB3ZV1euAQkvZuSblLq63ao9Lt/IWrP6l7I5lMGg1bDoR8YNwTDauN1qvU+jANS0XwU1jPTmVg5CX+P/TlqGZMdnIzzRWN6/8BmiB3pDFWOMuaQA3HD5oZGYeHUEiy+/DcbxybTnIyNg6LNhw2S/rT67PA/05drSOuQ7J9T9QSk0Kf6nR1xcmj7R4BMGLQ7izF4fBKhInjUnI+Gr5xV8jSpMlTBO6BuJ10flsfD6Kwcl4W3Ou1dgLvDAQ8n0q2dx9gAZ8VteR5RpAiQbmHDwyI5LfLDNrHxjr0unEi0KlWx3uebmTR+bmEmfEew19cPByPWCPv8luo2MIU0/tWMVt7RAdWQratVMK+LHGO09p1a7ZfwOnhUK9BV4K7u7QPL5bEFEzvzWFsVu/5q86/2CTjvv20C9u2f3Y6lbbte0ePvI4XIByOTza3rVENUyiRakTnmC3KlauRSlCHKeyiR2pUSLPXwhL3Q+JNXxAnUQu9hi17wKOaoX8CqgroD4y+Ly1fGTBGlXAz0ePWi2m+75tK5G6hL2395Om5tY+w6NOz7EX6iwyC09vRY=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/kq0hadMoNQ== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2017 10:17:16.6610 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.240]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB3376 Subject: [lng-odp] [PATCH v3 1/2] api: queue: added queue size param X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Added capability information about maximum number of queues and queue sizes. Both are defined per queue type, since plain and scheduled queues may have different implementations (e.g. one uses HW while the other is SW). Added queue size parameter, which specifies how large storage size application requires in minimum. Signed-off-by: Petri Savolainen --- include/odp/api/spec/queue.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) -- 2.8.1 diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 7972fea..9c83322 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -100,7 +100,9 @@ typedef enum odp_queue_op_mode_t { * Queue capabilities */ typedef struct odp_queue_capability_t { - /** Maximum number of event queues */ + /** Maximum number of event queues of any type. Use this in addition to + * queue type specific 'max_num', if both queue types are used + * simultaneously. */ uint32_t max_queues; /** Maximum number of ordered locks per queue */ @@ -112,6 +114,28 @@ typedef struct odp_queue_capability_t { /** Number of scheduling priorities */ unsigned sched_prios; + /** Plain queue capabilities */ + struct { + /** Maximum number of a plain queues. */ + uint32_t max_num; + + /** Maximum number of events a plain queue can store + * simultaneously. The value of zero means unlimited. */ + uint32_t max_size; + + } plain; + + /** Scheduled queue capabilities */ + struct { + /** Maximum number of a scheduled queues. */ + uint32_t max_num; + + /** Maximum number of events a scheduled queue can store + * simultaneously. The value of zero means unlimited. */ + uint32_t max_size; + + } sched; + } odp_queue_capability_t; /** @@ -165,6 +189,15 @@ typedef struct odp_queue_param_t { * The implementation may use this value as a hint for the number of * context data bytes to prefetch. Default value is zero (no hint). */ uint32_t context_len; + + /** Queue size + * + * The queue must be able to store at minimum this many events + * simultaneously. The value must not exceed 'max_size' queue + * capability. The value of zero means implementation specific + * default size. */ + uint32_t size; + } odp_queue_param_t; /** From patchwork Mon Apr 3 10:11:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96607 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp26475qgd; Mon, 3 Apr 2017 03:11:42 -0700 (PDT) X-Received: by 10.200.2.150 with SMTP id p22mr16837922qtg.197.1491214302311; Mon, 03 Apr 2017 03:11:42 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y30si11520620qtb.55.2017.04.03.03.11.41; Mon, 03 Apr 2017 03:11:42 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B5E2363D0E; Mon, 3 Apr 2017 10:11:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 752E9634D8; Mon, 3 Apr 2017 10:11:37 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 148DF63CC7; Mon, 3 Apr 2017 10:11:35 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0136.outbound.protection.outlook.com [104.47.2.136]) by lists.linaro.org (Postfix) with ESMTPS id A472762286 for ; Mon, 3 Apr 2017 10:11:33 +0000 (UTC) Received: from DB6PR07CA0011.eurprd07.prod.outlook.com (2603:10a6:6:2d::21) by AM2PR07MB0802.eurprd07.prod.outlook.com (2a01:111:e400:8428::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8; Mon, 3 Apr 2017 10:11:31 +0000 Received: from AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::209) by DB6PR07CA0011.outlook.office365.com (2603:10a6:6:2d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8 via Frontend Transport; Mon, 3 Apr 2017 10:11:30 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by AM5EUR03FT054.mail.protection.outlook.com (10.152.16.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Mon, 3 Apr 2017 10:11:30 +0000 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v33AB1sl025600 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 3 Apr 2017 13:11:01 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v33AB1qO025500 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Mon, 3 Apr 2017 13:11:01 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Mon, 3 Apr 2017 13:11:01 +0300 Message-ID: <1491214261-7177-2-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1491214261-7177-1-git-send-email-petri.savolainen@linaro.org> References: <1491214261-7177-1-git-send-email-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(979002)(6009001)(39400400002)(39850400002)(39860400002)(39840400002)(39450400003)(39410400002)(2980300002)(189002)(199003)(9170700003)(189998001)(50226002)(77096006)(97736004)(105596002)(5003940100001)(106466001)(8936002)(2351001)(110136004)(8676002)(38730400002)(53936002)(86362001)(76176999)(81166006)(50986999)(5660300001)(2906002)(33646002)(22756006)(2950100002)(6916009)(305945005)(47776003)(50466002)(48376002)(356003)(36756003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM2PR07MB0802; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT054; 1:FwmOuXnN2qLO8Hw0e/ar3/pD//vEP/tY1hdogYRMihE1CHWmFA2Ix2DkzQmfmzc+P43TqpZ2p7jQ9Mk4fvQuu7MEwWFNS7V4MBIz3QBJ5byBjknhupCzJUGTtVQo1ep79cRwim7PoTYtTGAQo30oxX4DU/65DSPc9Hi/RaTe+rfSmwn7yGv0S9JjPXsqSmgjCP5tLnND2AjhDnjmy9Iy1XS3YMgqCUyo+pDQokLiAFhsOAqPDNDiJJJf3nV9opw16TgJ3xx4ocmTOFKzt/EVi+C5+enbUgReucqejkZhn08vKRNVU8ChERsYztuf/FjlRol3lw3aFCyfPHq0NPisqU+dheeYFG0n0JGBrfZ9GBodTSGOVkSkla7QRfcy9xgM9JK+I1SHGKDJW7LRb/YH3PO4SI/AoMoJVMzkmHSBhU5Do+vdYgujTkRmlQzlOfExErUkl/lbz5i6M0CxzC0tc78bX6EU44iGGCPAkovEYqiOJTXTCAREWZYG7i+VUJWQd0ucrqQHn9E9LDBmQUMdfg== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 94d7674d-f53c-4a40-e0b1-08d47a79cc75 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:AM2PR07MB0802; X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0802; 3:yNLv9ThzwZ1Tb3sdmd3U2A6WsvAJPwr/xg33mziR1tcTIhMoGZ0JKekTXZ0BnWeetiJeAXOorqFdDDEDMIZKOoS4KrIfS0jSUlpr8WGxs8snDc7Yxjyw3WLWxgs/PbwIkBE7yVTWnMKZDJvwtAHjuRXKKn/QOoq78/qY7dC0KygTnw5MjihhvbAD9iDy11K32DHCIXwRSeKWVC4ces5qfPZMQxAsBb0N54SUHzd/ws4aDsBulgRstDdGDmNj4GJo5WnO2HQKVPb+xD2UmSd3xmyxOOvv+IfO+N33T93TEB5LVokdZwgXeVN3T/iXirjs64tEFAtddyEPPaiGhzKfqeIubRb3J0Jy4+/Tg1FCBsvHmIPZTuwXbiVXr1a6iF3caxAtoaQK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zNpCBosEuTKvKerr3z682Zy1xQ7LTV8e3zA6Dr5dYzf2Od0vQ1+SiJIg9bJOuk7OzG7YqeVOepG3GI7vysTXgNikM7FGF/ZB+Ufk6vV/I4MtfzxmLllmy7vna4PpNAhEh01EQFpkS9uKnwQmNcNs5GzaKC2RAg8fGOxG540nRZAX9Uj642ddi2IsW+c9UKpt/Xc5m7t6R2dtBt4npc7MXyEOqTD1WrcbE/Od6FwMpDfKzMhc6fQ5kSsZ+de/Vpo3zAiR7sF5WuSb1Hfu1UIVeMl5665oegW48pO/N567Eb2KbNyjnA5R6XR4Jz5UmO4a8HyYK1GwwHSArZuR1EaHOpOB8VdmmbTp6HYX2c2NinqWcbwgrZrLny+KA0ZksX5SzUL0nQppLuRRxxqV8qsKKAttM/TEWtyPkQ5bi21yQcAUFvMqlPzZoO1kp1WWFoCczJj6sdx/yq6MsvO1as= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13013025)(13021025)(13023025)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93003095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6072148); SRVR:AM2PR07MB0802; BCL:0; PCL:0; RULEID:; SRVR:AM2PR07MB0802; X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0802; 4:fYQqEe7SHuVquyqoAsG0iz8jZVI65cGG0FMV0a7dK5Nk+/Ooi5OaJHUW59CLqxoI2OtR6fjwEomKkIsTRu2jvKtKcx3UB5LEE2HQaftZvqHXJFY0R7NUkGzJCFLNRLPfRmlJrwK0rY6iNe48Qh1DI2t8ravZDO5huYe30Q6daWgBMIIRWdZKNaCfXDQkeA4kMZ038ZlSLQzH6ajfdvcWxmCL95Brwu/B5xsM2OD7v0fDZ33NItX6bli0+rjV4J1B9jo0A+ttyg92T0AqL3RKXrhTCpZMOAEozy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zjr7Z00Owdyu3m3rq6K24V/wb4qkGGAzPUDXR0uQkxxevKtpQa1IY=; 5:i6bG5jRUfRk48af2YYcMB9/mi/2EtnbqIHABFU48gvt4V/WQ7GZU+LEFKJ1Tf4Ox73aEgDkysCRVI0T2vpIFLKZDtNcfwfZ+TOYvoj2AhBy0zLsQ1UOlP32ekzc1lF+e0LoKc3PAuZc17TXgH0S1zw==; 24:mO+AW+bq2pfVOtzmHZU9VD3i87c78Ti99XkryLtZ3jdWF9D9TZnNw/y7jqcoMqS1Ri3NnZSXQD3uZYXA43qaTMa/68Q+DwNqr8mnI1Bm/PI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0802; 7:wGGu5rx/4zWJMkobtx4TsebdpiDmxnFjPrTQzBmCGGtoHM6o9v6ZPd7vML9IXz5FEFNkqbwNnzxwHlQMgs9uL51cEL+QuvGNmapS1Xb4A2joUZUDuvTpVtKj5qvD0i3KJ676mrg8psTnlHjmU6QVYTnXicqhPA81xUCd5V0Whl18K0BEr6GszQkA+wsjZm5HM2G6TNVIVM1CH5uFjgkjzIXOaDkV8FQrX7VYiu6D2Ig3YFqe5DqcyQfGpJSwA5GrQWeNof1OiWCB++UoK3pBzGVvK5t/BBIjUWGXWjVqDdNKXRK5N2t5BZO1/CW3WDkrxbdOmXRe/IwR7OC82etiqw== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2017 10:11:30.4428 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.240]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR07MB0802 Subject: [lng-odp] [PATCH v3 2/2] validation: queue: test queue max_num per type X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Updated implementation and test with type specific number of queues. Signed-off-by: Petri Savolainen --- platform/linux-generic/odp_queue.c | 2 ++ test/common_plat/validation/api/queue/queue.c | 49 +++++++++++++++++---------- 2 files changed, 34 insertions(+), 17 deletions(-) -- 2.8.1 diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index fcf4bf5..1114c95 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -175,6 +175,8 @@ int odp_queue_capability(odp_queue_capability_t *capa) capa->max_ordered_locks = sched_fn->max_ordered_locks(); capa->max_sched_groups = sched_fn->num_grps(); capa->sched_prios = odp_schedule_num_prio(); + capa->plain.max_num = capa->max_queues; + capa->sched.max_num = capa->max_queues; return 0; } diff --git a/test/common_plat/validation/api/queue/queue.c b/test/common_plat/validation/api/queue/queue.c index 1f7913a..6a13c00 100644 --- a/test/common_plat/validation/api/queue/queue.c +++ b/test/common_plat/validation/api/queue/queue.c @@ -56,7 +56,7 @@ void queue_test_capa(void) odp_queue_param_t qparams; char name[ODP_QUEUE_NAME_LEN]; odp_queue_t queue[MAX_QUEUES]; - uint32_t num_queues, i; + uint32_t num_queues, min, i, j; memset(&capa, 0, sizeof(odp_queue_capability_t)); CU_ASSERT(odp_queue_capability(&capa) == 0); @@ -65,34 +65,49 @@ void queue_test_capa(void) CU_ASSERT(capa.max_ordered_locks != 0); CU_ASSERT(capa.max_sched_groups != 0); CU_ASSERT(capa.sched_prios != 0); + CU_ASSERT(capa.plain.max_num != 0); + CU_ASSERT(capa.sched.max_num != 0); + + min = capa.plain.max_num; + if (min > capa.sched.max_num) + min = capa.sched.max_num; + + CU_ASSERT(capa.max_queues >= min); for (i = 0; i < ODP_QUEUE_NAME_LEN; i++) name[i] = 'A' + (i % 26); name[ODP_QUEUE_NAME_LEN - 1] = 0; - if (capa.max_queues > MAX_QUEUES) - num_queues = MAX_QUEUES; - else - num_queues = capa.max_queues; - odp_queue_param_init(&qparams); - for (i = 0; i < num_queues; i++) { - generate_name(name, i); - queue[i] = odp_queue_create(name, &qparams); + for (j = 0; j < 2; j++) { + if (j == 0) { + num_queues = capa.plain.max_num; + } else { + num_queues = capa.sched.max_num; + qparams.type = ODP_QUEUE_TYPE_SCHED; + } + + if (num_queues > MAX_QUEUES) + num_queues = MAX_QUEUES; - if (queue[i] == ODP_QUEUE_INVALID) { - CU_FAIL("Queue create failed"); - num_queues = i; - break; + for (i = 0; i < num_queues; i++) { + generate_name(name, i); + queue[i] = odp_queue_create(name, &qparams); + + if (queue[i] == ODP_QUEUE_INVALID) { + CU_FAIL("Queue create failed"); + num_queues = i; + break; + } + + CU_ASSERT(odp_queue_lookup(name) != ODP_QUEUE_INVALID); } - CU_ASSERT(odp_queue_lookup(name) != ODP_QUEUE_INVALID); + for (i = 0; i < num_queues; i++) + CU_ASSERT(odp_queue_destroy(queue[i]) == 0); } - - for (i = 0; i < num_queues; i++) - CU_ASSERT(odp_queue_destroy(queue[i]) == 0); } void queue_test_mode(void)