From patchwork Thu Apr 13 14:40:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 97372 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp749501qgf; Thu, 13 Apr 2017 07:41:32 -0700 (PDT) X-Received: by 10.55.6.7 with SMTP id 7mr3309470qkg.62.1492094492732; Thu, 13 Apr 2017 07:41:32 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g4si10293995qkd.213.2017.04.13.07.41.32; Thu, 13 Apr 2017 07:41:32 -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 BE2C1648CC; Thu, 13 Apr 2017 14:41:31 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id A995D635A6; Thu, 13 Apr 2017 14:41:29 +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 9C01964811; Thu, 13 Apr 2017 14:41:28 +0000 (UTC) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30113.outbound.protection.outlook.com [40.107.3.113]) by lists.linaro.org (Postfix) with ESMTPS id 4A9EF62EB7 for ; Thu, 13 Apr 2017 14:41:26 +0000 (UTC) Received: from HE1PR0701CA0089.eurprd07.prod.outlook.com (10.168.122.33) by HE1PR0701MB1897.eurprd07.prod.outlook.com (10.167.247.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.5; Thu, 13 Apr 2017 14:41:24 +0000 Received: from VE1EUR03FT018.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::200) by HE1PR0701CA0089.outlook.office365.com (2603:10a6:3:64::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.5 via Frontend Transport; Thu, 13 Apr 2017 14:41:24 +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 VE1EUR03FT018.mail.protection.outlook.com (10.152.18.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1019.14 via Frontend Transport; Thu, 13 Apr 2017 14:41:23 +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 v3DEepDH007283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 13 Apr 2017 17:40:51 +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 v3DEepRV007277 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 13 Apr 2017 17:40:51 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 13 Apr 2017 17:40:50 +0300 Message-ID: <20170413144051.22456-1-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.11.0 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)(39850400002)(39410400002)(39450400003)(39860400002)(39840400002)(39400400002)(2980300002)(199003)(189002)(9170700003)(105596002)(36756003)(5003940100001)(106466001)(2906002)(575784001)(86362001)(305945005)(33646002)(47776003)(189998001)(6916009)(8676002)(81166006)(77096006)(8936002)(50986999)(22756006)(2351001)(356003)(38730400002)(110136004)(50466002)(53936002)(1076002)(48376002)(5660300001)(50226002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0701MB1897; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT018; 1:brC22xQFo9mfBpnH4/3S2p3g/h6bFm+6NvvO13oe7/wW/EU4Rnl0vHvOdau0Oy6GOm0DmJ5KIYiDNjfV4dYM43F5zyGhLC2RbSx3GDUSeDnl+e5akHFT5rSNBkQSlbeBK4cxboGQnJ9QPcTFU8GUVs4P5rmePHEJGpnVLCWADQEkByMj78wGPArIZCFxd20LAfEjLlVCHFOiE2C2iJV7ffDvAqkVDz0B4S5n3bY/EdlRQlhAjDA2GxmXBrxHzk+5pO2t4hukrjx+cdAv9mhUx87HJW+jMjQ9YkryfZFavndTkGHMjtybtHxMgAku/BOJUgBxOx2PtW/jvc//c9FQzvqjbYDUCuxO/1eT/IL3NguH0DOD6n1GIRUMvj7m4vWOwQWZcBhMPuyg9qQ1BvLae1M3UaqoJfuc40/GpOERlAElbs0OMBReHJ9aVtslO1pycVMvYidQpxVCtwqLxzxXjlwgZnvjlcG8dhnSZhenF2tJwoYm4G2YfBIKJM6AL0nQJt/8vMzARGZJhT40yBSlIQ== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 4596b65d-638a-409d-c09c-08d4827b28b1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:HE1PR0701MB1897; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB1897; 3:k7Z5HMcgP3sJ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qMdrPl8gJyGm274uvVZPnNNRrFoktU7JO+tanc/MJVAAwFc3575bJiv2fhMEmogzVuskqnhKc2HQnc0bpFrwu4lpR29VPtOZJgnp+FMigp09IS1qqM0M1Ny+lnNBikZdwEg8Bn7E8cwnlQkxsW3X+fakHsFtS4GZll7SeNaq2YraCz2I6SGassQomx9GXV0Ds5Q7s/9xg= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB1897; 20:XT7UG/o+llf86lJ14hSVrIU1YXBGNSPS6+P7ImNDW4akuew+drPPf+vbZZYfRRKgnw+DuLF3wTYZNDta2UfL2Spb/fobkxYRpikYJSsuxkXgfrURHFvWR+Lkruhgj2TiLTnITO7vuvnsxfV8e6DJSVgns6arrrjn3vrc6uOYGYCa2bCUo3cPoovXcnyvFbHmQ6Z06mH4txm/TDdnJf/V0rzzJBr/w9eYfF+P6DSKxlezzofny+6RGSuxl0F7TgZRFRHlePutnbVhIyku5n8FQDM6slOEJmV24teN2kGHu4eOpWXVPLZpXTv8T38HwfTqePTuk9zyMriwa6gioGrMp3j22egLPXplN0EG2vUgsmS+3/57V7ia+7Bmoj/VVARDCtP1WAY1VBd7TIDRfGGXvEJnO4mSn6JdVCHijVCXGZPrkw/wM4OQAew6NKDqklLrCm1MCRnJRi8nqnn9uv6rM4MFhDmRfex1IzULpTttoi4BSulKkyXBbqEzPLbuL7V0hcyv1sLdE4jp7bpsS4CEp11jb+E99CIrCTi2+kPjjIJmwk+WaNwNhzfkcVGELzVmYn6CWIO/86dpW6MMeowie/jTv5ddDjX7AU7h1swJaTA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(13021025)(13013025)(13023025)(3002001)(10201501046)(93006095)(93003095)(6055026)(6041248)(20161123564025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(6072148); SRVR:HE1PR0701MB1897; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0701MB1897; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB1897; 4:Ejr4NkNkdAsWO6iSVi3C3Tvq3DHkrnw9L2ePEeZWfsexpSX06xq+/KCNzOcUNvjhInpd7UBoj6W6/qQQ2dymHhbESEHbGalCBPuCuX69brsTfTjdvL2qAgmR+bCd2rQc5QawTbyT+BOkQM+kL1twF0JVMivxiO2JylEv8nB449uakEBnBH/OifFcO1uFEmXGehXWmd6LGnNkKLCkVPnM2QRJupFVbRVzF5o0C6CV1V9p1iC0Y6Q8LIldZ5mhuJxSw5d6Ez51I/OwzLoMiK5f5wsHmn5pb5oI77f9OU90sVVie7CjPIQmU+fETZrpfETKVsjdCfBtB2nOHONcVaNI2naHv1KXhxq+LMDpxmhamfY8dh7jOCjiN7Yzl+pHFAVlRoHUkCoU8S5WosPmWD/m//xMIyCfmyzMteW12hNG/v3BugqQTh3R5uFXrr/Xvs0+TloaCe2ckLXi6TQv/GWXe2bCA1L/Bvz3CDUu8yfOIFh4l0slIAtjZLxLn1EPwivpcwdHV65B0QZ7b/O5NYMNM4oJQEqj/XcrOwi1g5xLbKClbNfpK+mjvjTbrVwYjke8iTbWDX23cV/xQdudzimt+HSeJn01BEqP46zm3Yb7KZvgzMju6v3GV5ARul20QBf589i0EvGSw89XsWsKZsDACnxC48ymzLsC59jfzcrLj7UJ5IkSGYWtxaVIpQ1zTcAeX6akYYG3+BKQiyWJtFqTzfmLSFEBiWT9lOeBOeBM8ao0d6QeqnQd6euWTPLfa35AubvfxoEXFNOTYMWdpbyQeJ/bR57hcTGo8IjOTLq3Puo= X-Forefront-PRVS: 02760F0D1C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0701MB1897; 23:bXF07Hcdz3XR1izq98S0vdzsdru1s+KHH+T/ikU?= A55hvS6u1LYsB/cFIppdVzgFNnDvyBCJNm9RCVE0FWI9Cr7szB+zZWd0VqUMSk9uI+YUPl8XGbLhP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okia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2017 14:41:23.9533 (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: HE1PR0701MB1897 Subject: [lng-odp] [API-NEXT PATCH v4 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 | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) -- 2.11.0 Reviewed-by: Balasubramanian Manoharan diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 7972feac..9dd0a561 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 (default size). 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,32 @@ typedef struct odp_queue_capability_t { /** Number of scheduling priorities */ unsigned sched_prios; + /** Plain queue capabilities */ + struct { + /** Maximum number of plain queues of the default size. */ + uint32_t max_num; + + /** Maximum number of events a plain queue can store + * simultaneously. The value of zero means that plain + * queues do not have a size limit, but a single queue can + * store all available events. */ + uint32_t max_size; + + } plain; + + /** Scheduled queue capabilities */ + struct { + /** Maximum number of scheduled queues of the default size. */ + uint32_t max_num; + + /** Maximum number of events a scheduled queue can store + * simultaneously. The value of zero means that scheduled + * queues do not have a size limit, but a single queue can + * store all available events. */ + uint32_t max_size; + + } sched; + } odp_queue_capability_t; /** @@ -165,6 +193,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; /**