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+/Tg1FCBsvHmIPZTuwXbiVXr1a6iF3caxAtoaQKql/0J2GjwOjpW7XuJKeIVbUH0X38551ZX+dVxxPcLY1OSLQ3bDyRtjtNuBi9oPFwesz+aB2aNdEP6uVfpi5iUWAmIGj/fVoNA/XZU6wME2ss/NRQX3CDF4gD X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0802; 25:3S7peaxBIzNlj3W2bFvvgRudpypfLuu2l/UsFz+kgvhc5SoxbiQroHb5jHZplUyM4ijG5L2S1woVbBdbG04cnHtT1b9LfKuyhUTZBlEKYHI1Qsmi6zAyewxHVbUXHH4PzTOmMPhD94jyce344DHU3HWF6oIUDwEJLaOr8t+jX37CI81JHTlaNOj1yN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R1EaHOpOB8VdmmbTp6HYX2c2NinqWcbwgrZrLny+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+PBytZHRPrhGQg6bhGA04Lla+yyUHPci1X75oGOF91U0Dx9Yp+iGV/MGi1q+uLAh5OLij3U9K/LI7Nt23ROTG5J8kIAA+NI0VOoVK3I8MqZnbWnd1DZDZqX2NOmxscayroOoOpunHqViW2rGVDG07g3T+qLpdP3IlaYcR55Fv9DdusgXjsq99qobyy0z8R6aVaZJ+ptRV/SyhlphG/DwhBVSIJ6r6fj/Boscw0LeRDRPvmXmLK7syV7LZF/GTnRN8UZobhptKxD9BeRH2bRul0UonsTunnkuyEip10QFUNEb1tyPBh3RfnTs7eX51D3OHB7yofmdwg0f6kqH2JA4DvW13LD1Ln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utput: 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)