From patchwork Fri Sep 15 10:00:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112695 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp426432qgf; Fri, 15 Sep 2017 03:04:10 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCUTrlN6/ibcrjqc3f/gZTs9pjjaE/ATMEt0dTSSdalqAEjHnfcgjHUK0zR6YuDhIJ7mlwO X-Received: by 10.55.43.234 with SMTP id r103mr6756458qkr.334.1505469850485; Fri, 15 Sep 2017 03:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505469850; cv=none; d=google.com; s=arc-20160816; b=ZcfUVW4GiUXXsfFn9wTe/xLU3wD8UMU+9Gl4/2qJznnWgAoNX2KpPVe1zK2K5iqJNA LUv792sSJ1fvlZMaq1b4yDclYtY0k6Z1MIQEdjoKsMYC4BpuA1pYCugusu8rkSzzraIU OvZ2kIosPvQDXfLMVtfHUwO5/zGjqNSto1nt63FEEd1ujvrQ+gJt86W5zfPabYJyupUi rkgLR08NYKGJCguRm4W5sEAwcLZW8D8dEwZbdgXAu4RtwJhk3H/+wE2KwD2FiKqtLeZG YHy+CtOKNmySJzA2StP1nNr38xIGPtvduk9omsGdluwH7KgGexq+abygam/g9hEwV9jz nEZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=rh+sxSSFQ/qv+Ece5OQLP/8NCV5y9sDOZS7+PKVqp7U=; b=jzePsSd2JZ5y96SXM28NLKWS1MlJFZ/d5ijT5L+oZrgl+lIvDrYhzrbS5ex3W0wYvk s4s5AdujShElkMQbI0xgRh0yIJ7crPGTdCkdR/kLhemzPDPSlETA6CBwoInoh0lsjPLN m2ReRTcahlJPG4bHgZCFsCu4jtKuYl3lCW5EGjZKlO2+HQ3ZoiH/iZ+NOd1pg3QAHiK5 EFKtbyLp+VX11eB04bBu4mOFh598IJsOm/t2sIJ4wpwVFOjKVPeSbAOX8Obj+lYCWGup YSUbEZQbzM9JtjmcURNzIwow278EM22+W4Fx/WzslOWabJzLTSPJoSSoggpmCwZm9BxE aN4g== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w3si568048qtc.415.2017.09.15.03.04.10; Fri, 15 Sep 2017 03:04:10 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 01C8A60AF1; Fri, 15 Sep 2017 10:04:09 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 8E88960B4F; Fri, 15 Sep 2017 10:00:46 +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 99BC360A38; Fri, 15 Sep 2017 10:00:39 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 71A2A609A2 for ; Fri, 15 Sep 2017 10:00:33 +0000 (UTC) Received: from mxback2o.mail.yandex.net (mxback2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1c]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 0A8D06A82E60 for ; Fri, 15 Sep 2017 13:00:32 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback2o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id PHPfngOdOy-0Vo4DLBZ; Fri, 15 Sep 2017 13:00:31 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id clr2IsS8eV-0UT08LSZ; Fri, 15 Sep 2017 13:00:30 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 15 Sep 2017 13:00:14 +0300 Message-Id: <1505469621-12939-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> References: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v14 1/8] api: queue: change order lock count data 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" From: Balasubramanian Manoharan change order lock count data type from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 236aa5fbfddcbccd5bf62c87fea274b272bfec72 **/ include/odp/api/spec/queue.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 9dd0a5618..73598be06 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -106,7 +106,7 @@ typedef struct odp_queue_capability_t { uint32_t max_queues; /** Maximum number of ordered locks per queue */ - unsigned max_ordered_locks; + uint32_t max_ordered_locks; /** Maximum number of scheduling groups */ unsigned max_sched_groups; @@ -393,10 +393,11 @@ odp_schedule_group_t odp_queue_sched_group(odp_queue_t queue); * * @param queue Queue handle * - * @return Number of ordered locks associated with this ordered queue - * @retval <0 Specified queue is not ordered + * @return Number of ordered locks associated with this ordered queue + * @retval 0 Specified queue is not ordered or no ordered lock associated + * with the ordered queue. */ -int odp_queue_lock_count(odp_queue_t queue); +uint32_t odp_queue_lock_count(odp_queue_t queue); /** * Get printable value for an odp_queue_t From patchwork Fri Sep 15 10:00:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112696 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp427627qgf; Fri, 15 Sep 2017 03:05:29 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCxpgvma02W4LGi0byli53fXEueDZ4V0QT7YRH1kL0NyZgzBaJHow4exGPWlZF9S91ARTB7 X-Received: by 10.200.24.214 with SMTP id o22mr34866776qtk.123.1505469929788; Fri, 15 Sep 2017 03:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505469929; cv=none; d=google.com; s=arc-20160816; b=rL1w0cFY4wwFbQzRpWo2lg7UQslqY/sx+B7ws1JOExkjzUuDiheNihXvJ7HOEXPwGe Q902tqZ3MIk1Wd6fZJMb2HkQQetsvcFpQnZRoR8PeDwEd7oXGETJtkRVfOFH/CJseLOd 1GjFHYfOkzKMjTxnFOW7QFEQxQcPmlH3l2PSQLFwzgrM6rxwQNMfFpaoAhCK166x+9Wv 9dsuzGvJ8xKg8S65xs5BsLFW8nBJBItOtMyQPpTp9RHnYoe6A+40pqBvkE4HAVv3OigQ dOITwlJ2zMvyU7ZRIcnPjzpGAvc2rG6VPRXD4dHF51PfKlvb3EUC4L5nViR79pMoI5y8 /tDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=kIQ7EPIZJweI0m+ZAKiB8Zyma2d6AT68+frFyrB0eKw=; b=eMknHYaysYAd5jOr36ET9ilt0dbeVXn1o1CrZJfZWoH6NBmX9zeL5+/iKDdWxJQrsa 5AltfnF1v8VgMo75p6ZBFEdDua2CKxkIvTVfbEUUzMb28g+SR1VgjRvf3DfS5fqDDkot n47lU+yrAoI+fO9MPJDZEb9UIxPttw6R8i8OrLWmTkamqLujrObbe1mK8DMJQURMtRur c50vyfEIPO7djefn3XV0r4Ws5TQwcy7ZPGa+jP+qVewYBax0clFcl6ZGrk39lHr/F7ZT FL2DPCCQiCGxnGpy2YZCJcmlqlyKBLqYPP4ckNmFHRCF2sHNg0HmH8J7L6ZG26Ayby8Z 6AUQ== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l65si548585qkf.163.2017.09.15.03.05.29; Fri, 15 Sep 2017 03:05:29 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 64C3D60B59; Fri, 15 Sep 2017 10:05:29 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 54CAB60BFA; Fri, 15 Sep 2017 10:01:43 +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 56D61609AC; Fri, 15 Sep 2017 10:01:32 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 885B6609C9 for ; Fri, 15 Sep 2017 10:00:35 +0000 (UTC) Received: from mxback17j.mail.yandex.net (mxback17j.mail.yandex.net [IPv6:2a02:6b8:0:1619::93]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 1742D5103C8D for ; Fri, 15 Sep 2017 13:00:33 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback17j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id qDvniqtn6H-0WqSebhU; Fri, 15 Sep 2017 13:00:32 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id clr2IsS8eV-0WTaTfYH; Fri, 15 Sep 2017 13:00:32 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 15 Sep 2017 13:00:15 +0300 Message-Id: <1505469621-12939-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> References: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v14 2/8] api: schedule: remove support for nested ordered lock 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" From: Balasubramanian Manoharan removes support for nested ordered lock use-case changes function param signature from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 236aa5fbfddcbccd5bf62c87fea274b272bfec72 **/ include/odp/api/spec/schedule.h | 7 +++++-- include/odp/api/spec/schedule_types.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index 8244746d7..e2abf990b 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -347,12 +347,15 @@ int odp_schedule_group_info(odp_schedule_group_t group, * be protected by its own ordered lock. This promotes maximum parallelism by * allowing order to maintained on a more granular basis. If an ordered lock * is used multiple times in the same ordered context results are undefined. + * Only one ordered lock can be active in an ordered context at any given time. + * Results are undefined when multiple ordered locks are acquired in nested + * fashion within the same ordered context. * * @param lock_index Index of the ordered lock in the current context to be * acquired. Must be in the range 0..odp_queue_lock_count() * - 1 */ -void odp_schedule_order_lock(unsigned lock_index); +void odp_schedule_order_lock(uint32_t lock_index); /** * Release ordered context lock @@ -365,7 +368,7 @@ void odp_schedule_order_lock(unsigned lock_index); * hold this lock. Must be in the range * 0..odp_queue_lock_count() - 1 */ -void odp_schedule_order_unlock(unsigned lock_index); +void odp_schedule_order_unlock(uint32_t lock_index); /** * @} diff --git a/include/odp/api/spec/schedule_types.h b/include/odp/api/spec/schedule_types.h index 8a4e42c64..397f98fcd 100644 --- a/include/odp/api/spec/schedule_types.h +++ b/include/odp/api/spec/schedule_types.h @@ -146,7 +146,7 @@ typedef struct odp_schedule_param_t { /** Ordered lock count for this queue * * Default value is 0. */ - unsigned lock_count; + uint32_t lock_count; } odp_schedule_param_t; /** From patchwork Fri Sep 15 10:00:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112698 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp429304qgf; Fri, 15 Sep 2017 03:07:10 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAz6pgBiL9vaeQTd/Tnj0uPyY50BE1HqvBMqo7T/kldMecQe/f+3olg960wHD3wEUd4FLq7 X-Received: by 10.55.4.141 with SMTP id 135mr6408293qke.86.1505470029994; Fri, 15 Sep 2017 03:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505470029; cv=none; d=google.com; s=arc-20160816; b=xwo8Jcu2OCZBUVYeSA2YVQZUKIw4euMumnT8y8BLZ7wsbKcH8m+X2eTXNwzfmm0grJ 8gtNc7BJQYvdVCtY4WgF1ICTC28BzcVxD0IxcN3QPARhuxx7Yf82PFm4jYyT+adsgQAq 29mJ36mo184cErPBwH33j/OBbpBNHGkCXISZFvovXd0ZTtjwPMKvLl+F0D+LGL4pwhOV PVFuQC9wAF02nS4iyjRZxkFGhfF1L4JEiLxJ0jQJYnJR3DYliXSl9G41D/6hf2bAlbsz K34qYI/NQepVUfTYKmH0y55n/vxxa5xHJVS2ds7nqasw9t+oi3cpoR4CtPRNX8YGu7uD V14Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=9kskm//Ive/mRtv8b848Qt3HFLrH/g8GC89+Quiy1is=; b=TecyYo8VkKxnYUbRTzGFDdE+mNjPWZZz63xAoSdvSsGKSqJjlY3p2Dc2V/OoM09SA6 UZso09jQSiC4EH7ApfN9Z6UXwI+Q3Bs6lWw0Wu1duxwsFWsC7VLxuMdk+/6qLbQaH0Rb icZ36zx3BdyEDpZqLTG5ANLtZ6At66QFoS6KftwhjRHK4bHon0ouQX0K2KicPQQnkjEP xXc/Rl77Du1i+xnAG4uUzjrAlCYT3jvy5RMvUQtJ2jFcNAQDvlEObhmTkGAFLCMgUD8w ayaHM/JwUc0x4yWlwS7/1tMb+QJkOy+WRJTswE7VPNdhPTd41nKT3sQc0sdqUvQTDW41 Yx2Q== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 92si572051qkx.463.2017.09.15.03.07.09; Fri, 15 Sep 2017 03:07:09 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id A9E5E60988; Fri, 15 Sep 2017 10:07:09 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 39414609D6; Fri, 15 Sep 2017 10:02:07 +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 EE380609D6; Fri, 15 Sep 2017 10:01:58 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 58D41609DA for ; Fri, 15 Sep 2017 10:00:37 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward104p.mail.yandex.net (Yandex) with ESMTP id B2926182EFC for ; Fri, 15 Sep 2017 13:00:34 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7hM2NCZLS4-0YVSgHKu; Fri, 15 Sep 2017 13:00:34 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id clr2IsS8eV-0YTmrISG; Fri, 15 Sep 2017 13:00:34 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 15 Sep 2017 13:00:17 +0300 Message-Id: <1505469621-12939-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> References: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v14 4/8] linux-generic: queue: change order lock count data 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" From: Balasubramanian Manoharan change order lock count data type from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 236aa5fbfddcbccd5bf62c87fea274b272bfec72 **/ platform/linux-generic/include/odp_queue_if.h | 2 +- platform/linux-generic/odp_queue.c | 4 ++-- platform/linux-generic/odp_queue_if.c | 2 +- platform/linux-generic/odp_queue_scalable.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/linux-generic/include/odp_queue_if.h b/platform/linux-generic/include/odp_queue_if.h index 410c6b796..ed8d6ca99 100644 --- a/platform/linux-generic/include/odp_queue_if.h +++ b/platform/linux-generic/include/odp_queue_if.h @@ -38,7 +38,7 @@ typedef struct { odp_schedule_sync_t (*queue_sched_type)(odp_queue_t queue); odp_schedule_prio_t (*queue_sched_prio)(odp_queue_t queue); odp_schedule_group_t (*queue_sched_group)(odp_queue_t queue); - int (*queue_lock_count)(odp_queue_t queue); + uint32_t (*queue_lock_count)(odp_queue_t queue); uint64_t (*queue_to_u64)(odp_queue_t hdl); void (*queue_param_init)(odp_queue_param_t *param); int (*queue_info)(odp_queue_t queue, odp_queue_info_t *info); diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index d941accc2..3f355e695 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -175,12 +175,12 @@ static odp_schedule_group_t queue_sched_group(odp_queue_t handle) return handle_to_qentry(handle)->s.param.sched.group; } -static int queue_lock_count(odp_queue_t handle) +static uint32_t queue_lock_count(odp_queue_t handle) { queue_entry_t *queue = handle_to_qentry(handle); return queue->s.param.sched.sync == ODP_SCHED_SYNC_ORDERED ? - (int)queue->s.param.sched.lock_count : -1; + queue->s.param.sched.lock_count : 0; } static odp_queue_t queue_create(const char *name, diff --git a/platform/linux-generic/odp_queue_if.c b/platform/linux-generic/odp_queue_if.c index 44fda0d68..969b0d3cb 100644 --- a/platform/linux-generic/odp_queue_if.c +++ b/platform/linux-generic/odp_queue_if.c @@ -92,7 +92,7 @@ odp_schedule_group_t odp_queue_sched_group(odp_queue_t queue) return queue_api->queue_sched_group(queue); } -int odp_queue_lock_count(odp_queue_t queue) +uint32_t odp_queue_lock_count(odp_queue_t queue) { return queue_api->queue_lock_count(queue); } diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c index bcda21953..b6275eb70 100644 --- a/platform/linux-generic/odp_queue_scalable.c +++ b/platform/linux-generic/odp_queue_scalable.c @@ -333,12 +333,12 @@ static odp_schedule_group_t queue_sched_group(odp_queue_t handle) return qentry_from_int(queue_from_ext(handle))->s.param.sched.group; } -static int queue_lock_count(odp_queue_t handle) +static uint32_t queue_lock_count(odp_queue_t handle) { queue_entry_t *queue = qentry_from_int(queue_from_ext(handle)); return queue->s.param.sched.sync == ODP_SCHED_SYNC_ORDERED ? - (int)queue->s.param.sched.lock_count : -1; + queue->s.param.sched.lock_count : 0; } static odp_queue_t queue_create(const char *name, From patchwork Fri Sep 15 10:00:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112697 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp428585qgf; Fri, 15 Sep 2017 03:06:23 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD6FPmUqYZkArnJlJNevlMXIYXde+isJG2viDaRPIp7EQQsKNIPpaLCjhl32kQffp+I0W5J X-Received: by 10.200.33.235 with SMTP id 40mr18445003qtz.185.1505469983311; Fri, 15 Sep 2017 03:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505469983; cv=none; d=google.com; s=arc-20160816; b=ypRz4abo5pVfSTqpnfyarpplFvnCmamBb7REAh/oxrAEORAt4Lp2QPncEIDrmAO3WE GJE0gowC9roMyFygQ2WdPNeUKrggitcW/2WqcDLf/j2VHq+W8vW2zsePpvN/EsVUAMJ0 SV+E0l7on6xhFvrl0P3N9Cx7WBgu6bUZsEaGUXya/Kl2sD7eUzEncH84RSdHZnCinXG4 QKIbkWaWXZYB3TKKOvni+juTLcrE6JiNU4zK1qyXIyhrahPM6PIEdILIzNk1HfYiLa5i 07i/HSEInFEAXJrVd5G/1OpV9U0iFznkAVLVmr9OImyComKzXaIpyULU7mc8X3npI//6 7oqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=W6AKq3b4a03Nc2Df8tTl2FA+XQmv9URWiPNbbDy3wLM=; b=Td26cG3RE1EGSU7qKumRPO4xZfrx3GneimJ49nu9mhthy5+3+GSSh7k5hpfo5U8OMy wFbPo34o64z/xLtZqwI+/21re0RiF+MbTsg0iCEg6arsw2dGSiPI7TI5k6zkwbE5vJN3 AM73E15l3hlvrrGpUUyo+CZ0XGDcKbB0cAc6kCTQTck3pK9xCm5PXJ+pxzmvf8LxU0Ds aXOQRRvOC9lyQ365e92Z89qTF2+1MQnj9DPng6+9/H5zf/iZya5BU6COULw8E0qco6MU CWColNt0hnMQGil1adLxdyps0BM3lQKSzmUzeUmEeDKniTMVgtyHhTgYuSRO91RkMsfu 58Vg== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c100si596859qkh.446.2017.09.15.03.06.23; Fri, 15 Sep 2017 03:06:23 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 0656C607C6; Fri, 15 Sep 2017 10:06:23 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 DFA5E609DA; Fri, 15 Sep 2017 10:01:59 +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 DED2760C3E; Fri, 15 Sep 2017 10:01:52 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 7F57F609D6 for ; Fri, 15 Sep 2017 10:00:36 +0000 (UTC) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 61B354301C70 for ; Fri, 15 Sep 2017 13:00:35 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 4LYGH0QobK-0Z8i61nR; Fri, 15 Sep 2017 13:00:35 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id clr2IsS8eV-0YTqxt6P; Fri, 15 Sep 2017 13:00:34 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 15 Sep 2017 13:00:18 +0300 Message-Id: <1505469621-12939-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> References: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v14 5/8] linux-generic: schedule: change order lock function signature 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" From: Balasubramanian Manoharan change function param signature from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 236aa5fbfddcbccd5bf62c87fea274b272bfec72 **/ platform/linux-generic/include/odp_schedule_if.h | 6 +++--- platform/linux-generic/include/odp_schedule_scalable_ordered.h | 2 +- platform/linux-generic/odp_schedule.c | 10 +++++----- platform/linux-generic/odp_schedule_if.c | 4 ++-- platform/linux-generic/odp_schedule_iquery.c | 8 ++++---- platform/linux-generic/odp_schedule_scalable.c | 6 +++--- platform/linux-generic/odp_schedule_scalable_ordered.c | 2 +- platform/linux-generic/odp_schedule_sp.c | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h index 657993b13..3815a27e6 100644 --- a/platform/linux-generic/include/odp_schedule_if.h +++ b/platform/linux-generic/include/odp_schedule_if.h @@ -34,7 +34,7 @@ typedef int (*schedule_init_local_fn_t)(void); typedef int (*schedule_term_local_fn_t)(void); typedef void (*schedule_order_lock_fn_t)(void); typedef void (*schedule_order_unlock_fn_t)(void); -typedef unsigned (*schedule_max_ordered_locks_fn_t)(void); +typedef uint32_t (*schedule_max_ordered_locks_fn_t)(void); typedef void (*schedule_save_context_fn_t)(uint32_t queue_index); typedef struct schedule_fn_t { @@ -93,8 +93,8 @@ typedef struct { int (*schedule_group_thrmask)(odp_schedule_group_t, odp_thrmask_t *); int (*schedule_group_info)(odp_schedule_group_t, odp_schedule_group_info_t *); - void (*schedule_order_lock)(unsigned); - void (*schedule_order_unlock)(unsigned); + void (*schedule_order_lock)(uint32_t); + void (*schedule_order_unlock)(uint32_t); } schedule_api_t; diff --git a/platform/linux-generic/include/odp_schedule_scalable_ordered.h b/platform/linux-generic/include/odp_schedule_scalable_ordered.h index 1c365a2b0..f88f973c6 100644 --- a/platform/linux-generic/include/odp_schedule_scalable_ordered.h +++ b/platform/linux-generic/include/odp_schedule_scalable_ordered.h @@ -79,7 +79,7 @@ typedef struct reorder_window { uint32_t tail; uint32_t turn; uint32_t olock[CONFIG_QUEUE_MAX_ORD_LOCKS]; - uint16_t lock_count; + uint32_t lock_count; /* Reorder contexts in this window */ reorder_context_t *ring[RWIN_SIZE]; } reorder_window_t; diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 5b9407624..e6fbd5c65 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -250,7 +250,7 @@ typedef struct { int prio; int queue_per_prio; int sync; - unsigned order_lock_count; + uint32_t order_lock_count; } queue[ODP_CONFIG_QUEUES]; struct { @@ -465,7 +465,7 @@ static inline int grp_update_tbl(void) return num; } -static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } @@ -699,7 +699,7 @@ static inline void ordered_stash_release(void) static inline void release_ordered(void) { uint32_t qi; - unsigned i; + uint32_t i; qi = sched_local.ordered.src_queue; @@ -1100,7 +1100,7 @@ static void order_unlock(void) { } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1127,7 +1127,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index e56e3722b..ff664420f 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -120,12 +120,12 @@ int odp_schedule_group_info(odp_schedule_group_t group, return sched_api->schedule_group_info(group, info); } -void odp_schedule_order_lock(unsigned lock_index) +void odp_schedule_order_lock(uint32_t lock_index) { return sched_api->schedule_order_lock(lock_index); } -void odp_schedule_order_unlock(unsigned lock_index) +void odp_schedule_order_unlock(uint32_t lock_index) { return sched_api->schedule_order_unlock(lock_index); } diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c index b81e5dab1..974a950f2 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1150,7 +1150,7 @@ static inline void ordered_stash_release(void) static inline void release_ordered(void) { uint32_t qi; - unsigned i; + uint32_t i; qi = thread_local.ordered.src_queue; @@ -1252,7 +1252,7 @@ static void order_unlock(void) { } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1279,7 +1279,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1296,7 +1296,7 @@ static void schedule_order_unlock(unsigned lock_index) odp_atomic_store_rel_u64(ord_lock, thread_local.ordered.ctx + 1); } -static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 765326e8e..86018b0a2 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -990,7 +990,7 @@ static int _schedule(odp_queue_t *from, odp_event_t ev[], int num_evts) /******************************************************************************/ -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { struct reorder_context *rctx = sched_ts->rctx; @@ -1010,7 +1010,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { struct reorder_context *rctx; @@ -1936,7 +1936,7 @@ static void order_unlock(void) { } -static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } diff --git a/platform/linux-generic/odp_schedule_scalable_ordered.c b/platform/linux-generic/odp_schedule_scalable_ordered.c index 80ff2490b..9396cd031 100644 --- a/platform/linux-generic/odp_schedule_scalable_ordered.c +++ b/platform/linux-generic/odp_schedule_scalable_ordered.c @@ -220,7 +220,7 @@ static inline void olock_unlock(const reorder_context_t *rctx, static void olock_release(const reorder_context_t *rctx) { reorder_window_t *rwin; - int i; + uint32_t i; rwin = rctx->rwin; diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 05241275d..62efe1bb8 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -243,7 +243,7 @@ static int term_local(void) return 0; } -static unsigned max_ordered_locks(void) +static uint32_t max_ordered_locks(void) { return NUM_ORDERED_LOCKS; } @@ -809,12 +809,12 @@ static int schedule_group_info(odp_schedule_group_t group, return 0; } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { (void)lock_index; } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { (void)lock_index; } From patchwork Fri Sep 15 10:00:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112699 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp430104qgf; Fri, 15 Sep 2017 03:07:59 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD0lGrFAfSvR+VOpTB3ONAbwUAY0EgqTf0D/Od+F7OB2DHgvhjYL3uUqOk0HJfFSreyAY9k X-Received: by 10.36.0.215 with SMTP id 206mr4347714ita.84.1505470079274; Fri, 15 Sep 2017 03:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505470079; cv=none; d=google.com; s=arc-20160816; b=fi6uRC98YnyrgRUafzNfUGNieFytC4K5N0AmzMQjxBxr1FJtSVlrs0WUC53pbdbcLf EPw3Y+CPGt3hwwyVKdxXkpE56FyOBgXxeXbml7Q7n9YaNq08iJspypcP2XoVv7nCJnPE FcxZGM/0XIMFDbwc0unjEBq7tzsrUku+FmbpCORTUV+4U23jDGRvBeVYxSCgWsh1L1L1 5jl9auqzD83zdNaxmhf2GTiHdQJImoQ5y/lVYzO24siS3xoBiDLU1xsdran4kJOgvrTP AI9eyIs2Bs6o3LzgwNL2SQIwQ8Odjcmd4x9pHrVDyhe48ZEm5HJ2vTFCFxweAeB50K25 v1Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=JrLOQA6dhPS/TDVoezlBEZ/hFobRlV5vXVhKkwmLJkg=; b=vy1qemwHQy9zcvgDnYUv82w7rypiM/koE6qkfyZcIZU3KEl+sNaV8vAhGapzQYRmBV z6Lxd1eCU9V0YAuIBEJB8UdCCXWollD4hhqNgYKsDaeG6/hnMv9Ue00YiPqLRtlCF4V5 aSEElkJE69yj5dhz+TzQY1+xn+U9bF3LhXsYvcIktXSeYzpp1vYfBeEi0Cf1O0O+07AO ut5Kuul8DOwBsZ1lPGTrzJ58L/W6mi823hw6rwZbCT9iq8jf0y1Y6XG618lzbmqXGgkq q7R6s0UgeBLMnZG6nHRbJ34nePi7oz+mupRYGu51Nx79ceYtIOZQHAkVKdVuOOSXCjDF jNDQ== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 33si469251ios.358.2017.09.15.03.07.58; Fri, 15 Sep 2017 03:07:59 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id BCD7A609D6; Fri, 15 Sep 2017 10:07:58 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 64ED5609E5; Fri, 15 Sep 2017 10:02:13 +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 7725660C60; Fri, 15 Sep 2017 10:02:07 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 84F35609E8 for ; Fri, 15 Sep 2017 10:00:37 +0000 (UTC) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward105o.mail.yandex.net (Yandex) with ESMTP id E082344427F3 for ; Fri, 15 Sep 2017 13:00:35 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id apgIjnd45q-0ZeGXEE0; Fri, 15 Sep 2017 13:00:35 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id clr2IsS8eV-0ZTekvY6; Fri, 15 Sep 2017 13:00:35 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 15 Sep 2017 13:00:19 +0300 Message-Id: <1505469621-12939-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> References: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v14 6/8] linux-generic: schedule: implement schedule order unlock lock api 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" From: Balasubramanian Manoharan Implements odp_schedule_order_unlock_lock() api. This api combines schedule order unlock and lock into a single api for performance optimization in HW. Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 236aa5fbfddcbccd5bf62c87fea274b272bfec72 **/ platform/linux-generic/include/odp_schedule_if.h | 3 +++ platform/linux-generic/odp_schedule.c | 10 +++++++++- platform/linux-generic/odp_schedule_if.c | 5 +++++ platform/linux-generic/odp_schedule_iquery.c | 10 +++++++++- platform/linux-generic/odp_schedule_scalable.c | 8 ++++++++ platform/linux-generic/odp_schedule_sp.c | 10 +++++++++- 6 files changed, 43 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h index 3815a27e6..2384f15b3 100644 --- a/platform/linux-generic/include/odp_schedule_if.h +++ b/platform/linux-generic/include/odp_schedule_if.h @@ -34,6 +34,7 @@ typedef int (*schedule_init_local_fn_t)(void); typedef int (*schedule_term_local_fn_t)(void); typedef void (*schedule_order_lock_fn_t)(void); typedef void (*schedule_order_unlock_fn_t)(void); +typedef void (*schedule_order_unlock_lock_fn_t)(void); typedef uint32_t (*schedule_max_ordered_locks_fn_t)(void); typedef void (*schedule_save_context_fn_t)(uint32_t queue_index); @@ -53,6 +54,7 @@ typedef struct schedule_fn_t { schedule_term_local_fn_t term_local; schedule_order_lock_fn_t order_lock; schedule_order_unlock_fn_t order_unlock; + schedule_order_unlock_lock_fn_t order_unlock_lock; schedule_max_ordered_locks_fn_t max_ordered_locks; /* Called only when status_sync is set */ @@ -95,6 +97,7 @@ typedef struct { odp_schedule_group_info_t *); void (*schedule_order_lock)(uint32_t); void (*schedule_order_unlock)(uint32_t); + void (*schedule_order_unlock_lock)(uint32_t, uint32_t); } schedule_api_t; diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index e6fbd5c65..1071f83de 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -1144,6 +1144,13 @@ static void schedule_order_unlock(uint32_t lock_index) odp_atomic_store_rel_u64(ord_lock, sched_local.ordered.ctx + 1); } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static void schedule_pause(void) { sched_local.pause = 1; @@ -1429,5 +1436,6 @@ const schedule_api_t schedule_default_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock }; diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index ff664420f..08ca813a9 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -129,3 +129,8 @@ void odp_schedule_order_unlock(uint32_t lock_index) { return sched_api->schedule_order_unlock(lock_index); } + +void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index) +{ + sched_api->schedule_order_unlock_lock(unlock_index, lock_index); +} diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c index 974a950f2..e6be5d3c7 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1296,6 +1296,13 @@ static void schedule_order_unlock(uint32_t lock_index) odp_atomic_store_rel_u64(ord_lock, thread_local.ordered.ctx + 1); } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; @@ -1368,7 +1375,8 @@ const schedule_api_t schedule_iquery_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock }; static void thread_set_interest(sched_thread_local_t *thread, diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 86018b0a2..37be471c6 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -1028,6 +1028,13 @@ static void schedule_order_unlock(uint32_t lock_index) rctx->olock_flags |= 1U << lock_index; } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static void schedule_release_atomic(void) { sched_scalable_thread_state_t *ts; @@ -1978,4 +1985,5 @@ const schedule_api_t schedule_scalable_api = { .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock, }; diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 62efe1bb8..9db587e26 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -819,6 +819,13 @@ static void schedule_order_unlock(uint32_t lock_index) (void)lock_index; } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + (void)unlock_index; + (void)lock_index; +} + static void order_lock(void) { } @@ -868,5 +875,6 @@ const schedule_api_t schedule_sp_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock }; From patchwork Fri Sep 15 10:00:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112700 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp430858qgf; Fri, 15 Sep 2017 03:08:46 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAJu/lcSbyUWGJppGsubn0jdIQVVaLQNI/sCOLDYB7g4Hngru0Ps5zajwTG+78O2n7mCL5x X-Received: by 10.107.168.98 with SMTP id r95mr6665059ioe.158.1505470126466; Fri, 15 Sep 2017 03:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505470126; cv=none; d=google.com; s=arc-20160816; b=uMbXbROfDYmeVWRkZHkqZxvKrrncJ77SCkFksQ3/497Is/GhD/gVoBelcvbZvacybq qq12EOapUyMzfSJfTOfR11QE4fqoh3JM2odWlLgrDi3vjwRpH+4K/nyyVzGwbAYPCYQR 8X8SUSc2u77Ht4KdQLTd5svmkIemRxAEb+2uAAi0K3AyOOc9d2sTYRtK1IQdLZBnZQA0 bZb7Ee4vmLTDV3tgAkTZd6Th5zqa/Q9Ofd8aXzdT/Onf9+sD9Qjhb5F+D7O34OlP/wrl NR6tPpECN4knUNzhjP1Xs3nfEoJYN4JUSzOHjyq7QVsDmw5jJywXPqu8sKiOIr8YXNiu 190g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=IVL6oDAqZ8N0zsvH/II5zZXfG4Nk1XtITpnnpBWceow=; b=yOn+P+vucM9ho0kd8Iy49e72yKxIrhFocOAtFGiXfNeRqU8yU2TuzpDtsbwrcHfAp3 ORfYWP1a20nIpsIPSbWQ8c1Nx972fbhq8xuMYtwTGBzEv16aTtaKjQnpeu/ZHCQUUHwH 0Zsiteqkf2/vRJa/h00Wx85OtO2zhPAujSnBGh1Ajxtu2VhMTOhZ5vM+a/oy/eW/Oqsu EGPkokDtYMnAJ0BnsZSxAbhURHcO583RvU4B463NF+ISwH347kTD+417bVh6gJ4PSBZY YwJk2oh9EhX5hIbTVArK0u8oL6KXofyUaTudkY0QYHZSpHPSvPTBQTLfcTaI1Y3KnWCW 5RAA== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h21si497973iof.62.2017.09.15.03.08.46; Fri, 15 Sep 2017 03:08:46 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id F1D4460B4E; Fri, 15 Sep 2017 10:08:45 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 B525D60C61; Fri, 15 Sep 2017 10:02:14 +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 467D0609E5; Fri, 15 Sep 2017 10:02:11 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id B444D609EB for ; Fri, 15 Sep 2017 10:00:37 +0000 (UTC) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 6A3C65606988 for ; Fri, 15 Sep 2017 13:00:36 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id FZX27Qn5Eo-0a8WFcYe; Fri, 15 Sep 2017 13:00:36 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id clr2IsS8eV-0ZTq6idn; Fri, 15 Sep 2017 13:00:35 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 15 Sep 2017 13:00:20 +0300 Message-Id: <1505469621-12939-8-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> References: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v14 7/8] test: validation: queue: change order lock data 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" From: Balasubramanian Manoharan change oder lock count data type from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 236aa5fbfddcbccd5bf62c87fea274b272bfec72 **/ test/common_plat/validation/api/queue/queue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common_plat/validation/api/queue/queue.c b/test/common_plat/validation/api/queue/queue.c index 94d0a2fd8..1ec05b1fc 100644 --- a/test/common_plat/validation/api/queue/queue.c +++ b/test/common_plat/validation/api/queue/queue.c @@ -267,9 +267,9 @@ void queue_test_info(void) odp_queue_capability_t capability; char q_plain_ctx[] = "test_q_plain context data"; char q_order_ctx[] = "test_q_order context data"; - unsigned lock_count; + uint32_t lock_count; char *ctx; - int ret; + uint32_t ret; /* Create a plain queue and set context */ q_plain = odp_queue_create(nq_plain, NULL); @@ -314,8 +314,8 @@ void queue_test_info(void) CU_ASSERT(info.param.sched.sync == odp_queue_sched_type(q_order)); CU_ASSERT(info.param.sched.group == odp_queue_sched_group(q_order)); ret = odp_queue_lock_count(q_order); - CU_ASSERT(ret >= 0); - lock_count = (unsigned)ret; + CU_ASSERT(ret > 0); + lock_count = ret; CU_ASSERT(info.param.sched.lock_count == lock_count); CU_ASSERT(odp_queue_destroy(q_plain) == 0); From patchwork Fri Sep 15 10:00:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112701 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp431820qgf; Fri, 15 Sep 2017 03:09:54 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA2HKY7sb6pneZ6q+oCxyGUNfvaE6G1Xzge7jUhZgu/Pe49Gmips9UqC1r+kobxTLwTYXpT X-Received: by 10.55.150.71 with SMTP id y68mr6613906qkd.36.1505470194194; Fri, 15 Sep 2017 03:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505470194; cv=none; d=google.com; s=arc-20160816; b=xP8VbaWER7bPEg2915mBdGKSYKtkM8GldrJ74lxHl8D8t1BXHqYXyu8G1MAIbmfnxq OLVFib4veeKo3r1XDX1+ibIB4zH8CMZraD8n9qE27pFb0snzKNkftoEnCHpfZIro+7Oh exhGckxIfJW87D3yAICs7Kg/Gji7nxmR9haULfmvQlZNMNPsvu+F5declULOcOE99MXa T0boyhDkPukT7V0Ngbks3DjGx9IzpcQP12LJQcNc1zbVHrO7iMXcO6csV8GrTXSHzn3R 7hqiJgE1K92DjodzGiwo5uEn63J4m2mH9ULPNzQKwWMOIyetr5cYCkD4XM3c8pHeDPFz cEQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=i5s8JAvsHs280rNDjG4eaCMf2gPs4LzqbI1UjTTjsIk=; b=yudwMsut8GyOb+g89L9ua5icPkohUzVAT9XyqXE7CUGw95eMxbrLEMVquRBBnpZOBK /X0zkWBvAgmMeQurXoQoWxr6vvSQfYls495+8yCtUYujPlU4FzNeQA+Ws4QKEZeuTEPn g9E+upUei8zbXEu4MW9L55NhSCSI0cHrTCGyieSnoJhI4KkIJhFhcsGsLpff8ELa5KhG 9lgVAuo1rpm8NggJI8g2E3LhQK8I9AXpCew9HN0URwOGjXHaS/FubD0GPZqR7uUc4UNW XKt5XlsArC/sUmJn0yU+HiTlcwW+JiA5DjQfOmaSPH8sObGTVzhlFYZE6NgmxlmsWn3t W8tA== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y2si627457qtf.393.2017.09.15.03.09.54; Fri, 15 Sep 2017 03:09:54 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id DD37D60AF1; Fri, 15 Sep 2017 10:09:53 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 4B71A60D3D; Fri, 15 Sep 2017 10:02:22 +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 E5BDE60C88; Fri, 15 Sep 2017 10:02:17 +0000 (UTC) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [37.140.190.177]) by lists.linaro.org (Postfix) with ESMTPS id 570D6609ED for ; Fri, 15 Sep 2017 10:00:38 +0000 (UTC) Received: from mxback4o.mail.yandex.net (mxback4o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1e]) by forward103o.mail.yandex.net (Yandex) with ESMTP id EF6255882AF9 for ; Fri, 15 Sep 2017 13:00:36 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback4o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pUIW3bCEST-0awK5P37; Fri, 15 Sep 2017 13:00:36 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id clr2IsS8eV-0aTeemuH; Fri, 15 Sep 2017 13:00:36 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 15 Sep 2017 13:00:21 +0300 Message-Id: <1505469621-12939-9-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> References: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v14 8/8] test: validation: schduler: change order lock function signature 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" From: Balasubramanian Manoharan change order lock function param signature from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 236aa5fbfddcbccd5bf62c87fea274b272bfec72 **/ .../common_plat/validation/api/scheduler/scheduler.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/common_plat/validation/api/scheduler/scheduler.c b/test/common_plat/validation/api/scheduler/scheduler.c index 963275be5..2c0d44100 100644 --- a/test/common_plat/validation/api/scheduler/scheduler.c +++ b/test/common_plat/validation/api/scheduler/scheduler.c @@ -730,12 +730,12 @@ static int schedule_common_(void *arg) continue; if (sync == ODP_SCHED_SYNC_ORDERED) { - int ndx; - int ndx_max; + uint32_t ndx; + uint32_t ndx_max; int rc; ndx_max = odp_queue_lock_count(from); - CU_ASSERT_FATAL(ndx_max >= 0); + CU_ASSERT_FATAL(ndx_max > 0); qctx = odp_queue_context(from); @@ -781,12 +781,12 @@ static int schedule_common_(void *arg) buf = odp_buffer_from_event(ev); num = 1; if (sync == ODP_SCHED_SYNC_ORDERED) { - int ndx; - int ndx_max; + uint32_t ndx; + uint32_t ndx_max; int rc; ndx_max = odp_queue_lock_count(from); - CU_ASSERT_FATAL(ndx_max >= 0); + CU_ASSERT_FATAL(ndx_max > 0); qctx = odp_queue_context(from); bctx = odp_buffer_addr(buf); @@ -996,11 +996,11 @@ static void reset_queues(thread_args_t *args) for (k = 0; k < args->num_bufs; k++) { queue_context *qctx = odp_queue_context(queue); - int ndx; - int ndx_max; + uint32_t ndx; + uint32_t ndx_max; ndx_max = odp_queue_lock_count(queue); - CU_ASSERT_FATAL(ndx_max >= 0); + CU_ASSERT_FATAL(ndx_max > 0); qctx->sequence = 0; for (ndx = 0; ndx < ndx_max; ndx++) qctx->lock_sequence[ndx] = 0; @@ -1436,7 +1436,7 @@ static int create_queues(void) return -1; } if (odp_queue_lock_count(q) != - (int)capa.max_ordered_locks) { + capa.max_ordered_locks) { printf("Queue %" PRIu64 " created with " "%d locks instead of expected %d\n", odp_queue_to_u64(q),