From patchwork Fri Sep 15 07:00:07 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: 112676 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp290620qgf; Fri, 15 Sep 2017 00:01:39 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAU/kYDtvYkKZFU0Et5KKz39YXyI7VDn8Wf/+J2oFHiafigcQeVXtPuCla7RTddHrwHy1jo X-Received: by 10.55.116.134 with SMTP id p128mr6423862qkc.50.1505458898931; Fri, 15 Sep 2017 00:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505458898; cv=none; d=google.com; s=arc-20160816; b=l08Nk2zaoP8IFjowh8+EAgnYIXgRB7ynRVBZHfsFuiYPoa3hCR14Qv+H9i4RXxwF+Z P+EugnWY3rTvfmLZul6gMUrmMXADji4dibjyQ5mehtQzs3QcGE9GbvG8uvXoq0k1fDfP gmOLVvZD6FKNW0tEsq4ird12mqkmL/EMqe8nM9sRMS5iCWV0wVzuYeNGI14nQeLGGs9n Rfjtggx+M94CfCq3Cfb+0hq+U50zneLz6g+6+Mrcme7ugn+AVsRKgDZN1kzQavceQth1 sWk/Am8g8RPHvI5ZmLnAz9gGSdY0HQeFAhJMzqLEMjiB4Vv7Rn8Ispjff180mZlkkKlW F6cQ== 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=wG8l2WefV511WTZQXcn5GJZhRWsX1/bpc5SnLSIo5xU=; b=m2JfCrM2KumdxRd4akx1DUjUs1j0rkGP5AFiwsYeQm7Ij+tHFcB05mznupM7HhuUqG cPgzfeKEFBc2X2wz/zYiP4tYrVMI3Kq4i5UUM5vGmKgMl14+sJxvIPVjKFhvRPsZCGM2 sx59eWstgnIcrGAdhFWX/VrPRpmA1XvqCpKLUzujPbbPPlwWOp7NlSgU5EKJ34thS7aS Cl9gdjRIt86+4pQyO4mKObWT5be2rPUVG8V3c9VHkyc5KizN6gNmbpDytj8XK8owdXK5 3xxazQBwwR74cjo+/Myucc+i8WC9iBejxW1jm6mkQnCHoI6GqS6FWjSKcudDGGP9mkEB 0XKg== 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 k2si298100qtb.61.2017.09.15.00.01.38; Fri, 15 Sep 2017 00:01:38 -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 9A7E560BE9; Fri, 15 Sep 2017 07:01:38 +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 836B36098D; Fri, 15 Sep 2017 07:00:48 +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 C3BD360988; Fri, 15 Sep 2017 07:00:35 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 06839608C4 for ; Fri, 15 Sep 2017 07:00:31 +0000 (UTC) Received: from mxback10g.mail.yandex.net (mxback10g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:171]) by forward103j.mail.yandex.net (Yandex) with ESMTP id 31AFA34C419E for ; Fri, 15 Sep 2017 10:00:29 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback10g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id RxkyLBiuEF-0TaCRr5e; Fri, 15 Sep 2017 10:00:29 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lLHR2ftQSF-0St87P7O; Fri, 15 Sep 2017 10:00:28 +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 10:00:07 +0300 Message-Id: <1505458814-11509-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> References: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v12 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: 8654cc5ecbcd8f0299a0c56a1e2ff23ba87c1d67 **/ 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..23261de2b 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 07:00:08 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: 112681 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp293399qgf; Fri, 15 Sep 2017 00:04:57 -0700 (PDT) X-Google-Smtp-Source: AOwi7QClG9tZolrmwdU5nQcuhq5tRsPr9/ZxbnueuSb+lTM10/ZFYzxcIMkVlGosNIjVLAT45lm8 X-Received: by 10.200.63.98 with SMTP id w31mr24330194qtk.174.1505459097797; Fri, 15 Sep 2017 00:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505459097; cv=none; d=google.com; s=arc-20160816; b=AY/AXA99eCnQHpXG2TYFkzzIvEEUQcXjmkn4v4cawcojSghpIrGMa841jrGNCPgA4X 66+qnftsNLUpeU0ey1Au0XzRT8pyobyot6LjHXNbHvbyHzKx8QaKc9CnRevf+SrO8TVp GY+eQwsU9d/ZzGuOKVLrRhTVHaFxEPSWK10PBvLMhIugXDBIZjlIMg65dZJgN3CFWx4e AHvrhmOgwI/q7SOBE/ns1nHGZREKxJpv5OxUmO1YBUCcMzK8XgtpxEoA7VEIMaMJzIDn eXzKtjfS00TitSioKbtkNOvVvZpqNr/22aRqgV5piSqnrX1kuu3END4gTpLhXoUZcWZF bb4A== 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=sisma6JcFvKhb5xbJzukdPF9beLzpr801bDu5MpATcA=; b=zMe9ir2DHwlyyd6520wtCPtCduPz7RMTMMT02mxKCDzjEfro9VrVJnt3wDfSr9Ttl8 0FcwxAajQUyZ5bhgQgrnHbzzTyMcjVmSEsdemsz/EPv8wuqQd1Xf0WEoUtvCWhJQBfeg PkH1SuUCtjFszdPxXr72SNIJVThQO44ANYCY+i/pxb6fGPiTwZJebjWCuDaGjwxvxLvQ R47Yk5MKYt3LZ6p9bLhi8cIPGvmdScdMUOCC1k3zCgWAk4UrmcDnREw1lS935qsrXIZS f46ktSUTKlH4X45AC8uN2UQfSbsoLjqQfb/26ya6Q7FVGA6mBA1/BLAV87BoygHx4ss5 KC6A== 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 p41si297102qtb.84.2017.09.15.00.04.57; Fri, 15 Sep 2017 00:04:57 -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 7625A609DB; Fri, 15 Sep 2017 07:04:57 +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 2A848609FF; Fri, 15 Sep 2017 07:01:09 +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 16C9A60924; Fri, 15 Sep 2017 07:00:41 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 3C862608DD for ; Fri, 15 Sep 2017 07:00:31 +0000 (UTC) Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward100p.mail.yandex.net (Yandex) with ESMTP id AFE6451028FB for ; Fri, 15 Sep 2017 10:00:29 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id QlsnF3NwyD-0TYOUnS1; Fri, 15 Sep 2017 10:00:29 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lLHR2ftQSF-0Tt8PAfn; Fri, 15 Sep 2017 10:00:29 +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 10:00:08 +0300 Message-Id: <1505458814-11509-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> References: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v12 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: 8654cc5ecbcd8f0299a0c56a1e2ff23ba87c1d67 **/ 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 07:00:09 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: 112680 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp292961qgf; Fri, 15 Sep 2017 00:04:25 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBw7/sXbeK9erfz8ePjhphchab3xMYJJTdhqEX60o+RyJKYt79Vo3brvN5d/PyHUv4Wh+OA X-Received: by 10.55.166.10 with SMTP id p10mr6059581qke.8.1505459064987; Fri, 15 Sep 2017 00:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505459064; cv=none; d=google.com; s=arc-20160816; b=KY4WzfA5zB/Snw4g3azDCWa+SHn62DXwP7/A4Oe4s8rBbWpZf6QJKnddIo57kS/JwO WXFRomWsbbSFipLsJF8jFQH2TSMg0YGCbufMxqwCp0T3mr6sfp/6IWXpgy7ewgGAq4uP O2sW8pM4QthB2BbIVQqe6PfStbw5oO6DjsBE4dZL7EtZ2Li/xefJWg03hRb14i7bWXKK JeHoFUTyzd5kp9pvamQS7zGUq7gBP2xkrQCRPVYa9y4TpPah2hmZkJ9nhbAa6kGVQk+e w0WATikE2U8iMTtV8yt5SEHoVKQn+0uU69CsI0D9KA57HZeHVO92H1HAqMKaudcw0bFg gHXQ== 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=pFGc/h/7G1a1hY2URsmkd4TCS3BvIFOhktPK0ZYajvA=; b=IHP0FgRDlLD4jsC8K52ZsudgPBmVjH7ur7sHGqXjVgxM9cBqC7+HGLTAGRM0TRwg4m 9FtkgJI3i58wmqrjsJXDYoDL34pbVOBXDRY/fxRuQQcNnjeOQIWebGkX51J5+m1+r5yk SuRbEHIhvrY57nLSdwmTL6oXWq2vM6JV0wL5B4rr8OBBrxf/mhsjIvgBJFn775X/qt35 umxblcimYHZ5wjeDAB2YIN3bdclRe+fL8080IlM/UJrkpEvIQU42KzbMqqVGWsrCfnw/ 3CtohiLoc/2i6yjInmVVzEHSo+ofpp3k59ORhMrvI0ht8m/2nR74vNBPuFt1WwTLs1hC 7FrA== 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 u79si295586qku.7.2017.09.15.00.04.24; Fri, 15 Sep 2017 00:04:24 -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 A29F460B4F; Fri, 15 Sep 2017 07:04:24 +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, RCVD_IN_MSPIKE_H4, 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 DAA2C609DB; Fri, 15 Sep 2017 07:01:01 +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 02EDB6097F; Fri, 15 Sep 2017 07:00:41 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id E504560924 for ; Fri, 15 Sep 2017 07:00:31 +0000 (UTC) Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 4E3F05D858D0 for ; Fri, 15 Sep 2017 10:00:30 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id DqO6HXnnrt-0UI0KRnO; Fri, 15 Sep 2017 10:00:30 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lLHR2ftQSF-0TtSr0VX; Fri, 15 Sep 2017 10:00:29 +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 10:00:09 +0300 Message-Id: <1505458814-11509-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> References: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v12 3/8] api: schedule: add 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 Adds 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: 8654cc5ecbcd8f0299a0c56a1e2ff23ba87c1d67 **/ include/odp/api/spec/schedule.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index e2abf990b..fe2300db0 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -371,6 +371,27 @@ void odp_schedule_order_lock(uint32_t lock_index); void odp_schedule_order_unlock(uint32_t lock_index); /** + * Release existing ordered context lock and acquire a new lock + * + * This call is valid only when holding an ordered synchronization context. + * Release a previously locked ordered context lock and acquire a new ordered + * context lock. The operation is equivalent to application calling first + * odp_schedule_order_unlock(unlock_index) and then + * odp_schedule_order_lock(lock_index). The same constraints apply with this + * call as with those two. + * + * @param unlock_index Index of the acquired ordered lock in the current + * context to be released. + * @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. + * + * @see odp_schedule_order_lock(), odp_schedule_order_unlock() + * + */ +void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index); + +/** * @} */ From patchwork Fri Sep 15 07:00:10 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: 112677 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp291150qgf; Fri, 15 Sep 2017 00:02:13 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD3PQVviIxOGeWhlnV3oB/TcofFk8RqLzOLLSMl672r0lMlj5NCfs48OId+eST7zC6+eiud X-Received: by 10.107.17.207 with SMTP id 76mr6901498ior.195.1505458933505; Fri, 15 Sep 2017 00:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505458933; cv=none; d=google.com; s=arc-20160816; b=Rgn4Z0m0arNjk+RYq44830Q5lcnJhz8e/d7DRdZbw2kDCCpsEs6407Em5EzK5JItwV BtBM4Rg5+ZL79C9X4rmqqtP74ZpAVy8VRNp6Jbq+U1XjqlnN0lVpyF4nmdSrXgbA/wxm zpoynTO72eCEAqnyP7rUTet/bG6bvUJO0eBj6fvACGjhxvSokQNecTsb7xKVUPGBMQ0s hNg+sJ3BMMGd07FStIachwPKttgn5QwCJqtTNkNi1UzanhJDzlqlLcD+NMNnd0NjyEcO QrmQf+xqgNf2V/M0FQrLanbL7v2KyYo2WKFMNR+p76Vv91e3XcbXMkKdIltnIQc9TCcW 6b4w== 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=gw28ncc9I5s7mW1jtxsz3SOhrmwL3yRaH61/xAjmwEM=; b=Hvmp92/NHDckMuZhK4gUUPDYjUXjj6zlON1paKvL9ssVk0gLT0mXhmMLqCenyRHuJG 0b+CU3NqakMV5ODC7DYThepgyjm7dxYTGVaXZURjX9q5rpAAJ64kowFPOTdJngnWft46 3w/V0Dzm2yWjRfO4CiBJ4OBsKCp+0WlE8DSauFJCNgv9avCYz78gyiYSK1Iv8w/dHbZa cmhyeHOWgSbivPoxepRZWgyvCREP75Ad6PeN7dhJlYZpOF1y/Vf4c/Mns43tMUsOAzvx 8w2N0B1cdD+y2+fIzmnWAd0vysJpgcKrIo9ykO26hoqRUu3bISjfluKOOds53KFvv2Ak aSXQ== 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 186si237351iox.106.2017.09.15.00.02.13; Fri, 15 Sep 2017 00:02:13 -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 044A860BE9; Fri, 15 Sep 2017 07:02:13 +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 E838D60993; Fri, 15 Sep 2017 07:00:51 +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 7954960988; Fri, 15 Sep 2017 07:00:37 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id B85CD60976 for ; Fri, 15 Sep 2017 07:00:32 +0000 (UTC) Received: from mxback10g.mail.yandex.net (mxback10g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:171]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 023956A854CD for ; Fri, 15 Sep 2017 10:00:31 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback10g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7FxzDwpG7F-0UaCgKk3; Fri, 15 Sep 2017 10:00:30 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lLHR2ftQSF-0UtWYW8V; Fri, 15 Sep 2017 10: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 10:00:10 +0300 Message-Id: <1505458814-11509-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> References: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v12 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: 8654cc5ecbcd8f0299a0c56a1e2ff23ba87c1d67 **/ 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..6901b3a6b 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; + (int)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..3612bd647 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; + (int)queue->s.param.sched.lock_count : 0; } static odp_queue_t queue_create(const char *name, From patchwork Fri Sep 15 07:00:11 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: 112683 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp294409qgf; Fri, 15 Sep 2017 00:06:10 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA8eInEwo+AaZ9WIKr5GeFRLnMQkP3YdHYHG46Ti1eA3nbqqBLsKQMRquDtKpGQvIofstDt X-Received: by 10.107.163.9 with SMTP id m9mr6132202ioe.230.1505459170460; Fri, 15 Sep 2017 00:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505459170; cv=none; d=google.com; s=arc-20160816; b=YjLqGCKNK/odbAz3OpbhEKAoGOriWsPicct1ONLENBdB2Fpzog6TrH30QweOZMLITa Zs+rh+vsgxeu7W8ae9nrzVHdA1VhjJzgZVIOK32rxo1t64bshZ8GJqHOeF7tW5FX4VBN yvxOiG3jkyLbBIiJS/B4EsR+SEjPDSfjWO5s0IOfdjtiF5Nw5rhNvWwSMO2OSvgJScnI +/04UireVJwy13BV25rtHwbgQPLkMJVPUwv/Dm/u+WHIA7R2lrLJczNTgb4aQOsV5OTx 7XxhckH4/H+fmlmlH6swjzfD87GnNEo16wm7spf5jD6OTiSqFLWdHsbgOhpCLN3MF4D1 7ncA== 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=kUyYfQOX4T86Ti9dk9ivU3lv9pn2newa176E7vDPk7g=; b=duRkTlNZBlSqvEjbMwYc4+HXAXisGo4SpmL6PAo/NWWj/Uh8TMAFYZ892NXpW/MsBJ 2eGT3LkVUc74Wao1jh1XnYesiYQsmM4hbJRTWt6sLtaXizclHuy7Z5V3TmBsRwDb4u+/ DJgxXxPP37MIQ69UQKgMeYeCJQN0IQGAIu18iKZvC36zDpftMG12aXHf1LHUMoJhFx4i 1Qwq0zh1s/RETIXMr7bjKQuymHE5RcCXvCyDFbAYtoG05Ys7er812Ovt+nFIvGOl3+rg H/EsHKcJiqEoWMqs3YVxTRWwqF1ZdNnL68TSkqj4yC3Mc6Di1uUpCUjpQMrIg7tHDIKe uM9A== 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 v185si214673iof.272.2017.09.15.00.06.10; Fri, 15 Sep 2017 00:06: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 02293609EB; Fri, 15 Sep 2017 07:06:10 +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 9BE346071F; Fri, 15 Sep 2017 07:01:19 +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 4E7FC60976; Fri, 15 Sep 2017 07:00:43 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 358D76097C for ; Fri, 15 Sep 2017 07:00:33 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 8D5D32A22941 for ; Fri, 15 Sep 2017 10:00:31 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 2iAqcHBXuv-0VVa6ilS; Fri, 15 Sep 2017 10:00:31 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lLHR2ftQSF-0VtqaZCe; Fri, 15 Sep 2017 10:00:31 +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 10:00:11 +0300 Message-Id: <1505458814-11509-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> References: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v12 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: 8654cc5ecbcd8f0299a0c56a1e2ff23ba87c1d67 **/ platform/linux-generic/include/odp_schedule_if.h | 6 +++--- .../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 | 15 +++++++++++---- 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, 29 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..850c5d8b7 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,14 @@ 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 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; } 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 07:00:12 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: 112678 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp291806qgf; Fri, 15 Sep 2017 00:02:58 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDcnVqWqPH4IPbVD0W9Vtqn8sfGTiukXFYNGH8r+kM1uI6vsULn7dQSS22O4cAS+zfL7O4E X-Received: by 10.107.131.234 with SMTP id n103mr6009228ioi.236.1505458978036; Fri, 15 Sep 2017 00:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505458978; cv=none; d=google.com; s=arc-20160816; b=SWlj93AT7mIA592ecbRtcFEsBBuCk7ElbVuurPeqMYr2LE87AdsbswOfODY/+QVs9c Xw2ly+Wm9Tg4YQ4dFD7JEpDEKoNGoOztQ/WEAs/rWsZbc0EfJPGJreg+qQ8J3WPJ0I5C DwQ4hGHO7JIR70Cwv3R7yYv3bBHeWhD5nOLwhg5IHcODzbwD2aY3+k+oWWegHX6r9rv0 TxmFWdIiZWnVXMXztFXOR9OySHf0tIyVTxYb2cANKGOnkY71extgVe1/4ny1YxsgUs+w Yn9XUOcBXcl7/rbgufGLVJePqXxdgXB6YYpaTgX5o6iNmvj/bZgVIf+6f0EixVk77jME azFQ== 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=PypXnPNgjXcmk2z9yU54cYO54WYyEYpADHPdgV8Oa+s=; b=EMspwUjSGds+GyYA+OtzpppgK3b5UnQqLgbbY8HECGpWyNuAO9ufB9XisLGL+XMOVg cvBTnqyB1FlJJyPNHVLQ4GrBWmtK0LI/qwvQp7pFct04V1/jJ15seuq+ar1u8ArtPbci AaFGVEQQsYVXqZbYDmLubTj0Fpnr0gVPHEG3APncsxwOenSyk2qFiLLZkmr3/YvEOY2N GoAfX5GycGN4zy0Kh5qMZaCZ+GdoLwDtziLMNUhLF8kc3x3H6EFQ04ud5EnYF0OhxHRu bcP67WzY31WC0uL0k8ExfAVuUfoznzhpVNLkQnEbD73TCrRw+KdBnrUV3vENFN9PTSo7 UJcQ== 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 c133si529880itb.181.2017.09.15.00.02.57; Fri, 15 Sep 2017 00:02:58 -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 900C6609DA; Fri, 15 Sep 2017 07:02:57 +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 4353B609A2; Fri, 15 Sep 2017 07:00:54 +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 955BF60993; Fri, 15 Sep 2017 07:00:39 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 224F06097F for ; Fri, 15 Sep 2017 07:00:34 +0000 (UTC) Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1f]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 53467186377 for ; Fri, 15 Sep 2017 10:00:32 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback5o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id IK3c5kfske-0WSOM1oN; Fri, 15 Sep 2017 10:00:32 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lLHR2ftQSF-0VtGU1aG; Fri, 15 Sep 2017 10:00:31 +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 10:00:12 +0300 Message-Id: <1505458814-11509-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> References: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v12 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: 8654cc5ecbcd8f0299a0c56a1e2ff23ba87c1d67 **/ 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 | 3 ++- platform/linux-generic/odp_schedule_scalable.c | 8 ++++++++ platform/linux-generic/odp_schedule_sp.c | 10 +++++++++- 6 files changed, 36 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 850c5d8b7..e6be5d3c7 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1375,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 07:00:13 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: 112682 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp293926qgf; Fri, 15 Sep 2017 00:05:36 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAmsqX8465D1uHxZMTIzb3xW8gti6pcSKYAzw2tp1r+/F5Lv0yiHJ1Mm0Y8WYnjJ4FEB8It X-Received: by 10.200.25.78 with SMTP id g14mr33877922qtk.48.1505459136801; Fri, 15 Sep 2017 00:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505459136; cv=none; d=google.com; s=arc-20160816; b=JJk3F3DLOOPp5IbYuZI8s4M8uj5Q2RAa1NqEowdwKX/g1JgevkdzdGsjnvy/dYDF3v Rz2bJYzbkTQWTqyl6sRWikLAsvGuoxsHjJIlAVjsnG0EJmvOAheOwB3QLuOpRFhiwRJJ SK71ZhvMkH1k0AFAm1mFGhB/TU7/XX1zrL4YHbvoXPouKT3oidzF9ZYfVa4CJxXxuUl6 ZgzRLvJV/EeEP0AMGAaSKC1+n+hIId+vkbUs2/7BvJlyq/dCqHaJYM5ri9xNjK0zvTtd bk1FpQAxWDk5Jcz5lXtBHPspL608L/NPU8fI5zjW0Xagrlh4gWDulnZZWpFBY4DXxFaj cdag== 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=CXD7eqnXyNSrx2lJPqceTK+UavJ4pNjY++sCbj9R+Qc=; b=xVz+d+7M5SE5APE6sZsWkUAGw810q7rWZzgb1YX8UIvSVyIM6heI/lECnqV4BtGXfS Ak30vrEw5gPCzh/s7qTN7WaW5aKbnRp1pCP1XkYFYlJWOyXGn9vkOBL791bTw/b8onFW c8kk7D61csmjHkGhYvPTXDaMBR6gvRkCTAc+CZE9dMrvHTAiIRrkNosM4Ro2YnV23SL5 6IBtENT1v8LZpJC1rQyIlmbZXxzVltRC8lqlnNbVnX/zU3jVZOMgrE2UiYYelkexbRKK GzM39DEKTRvAIe6aS5W2KHYwAW3a5W7OBa5x7psPJwTKri4T+7fJI3QZYj7TsiSXrOLA J5KA== 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 p64si281910qkc.349.2017.09.15.00.05.36; Fri, 15 Sep 2017 00:05:36 -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 70601609FF; Fri, 15 Sep 2017 07:05:36 +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 57C3D60A6D; Fri, 15 Sep 2017 07:01:12 +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 53F4960924; Fri, 15 Sep 2017 07:00:42 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 0A7D46097D for ; Fri, 15 Sep 2017 07:00:34 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward101p.mail.yandex.net (Yandex) with ESMTP id EEE906A869DB for ; Fri, 15 Sep 2017 10:00:32 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id mKBWJYHBkY-0WjW5UXb; Fri, 15 Sep 2017 10:00:32 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lLHR2ftQSF-0WtihmKK; Fri, 15 Sep 2017 10: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 10:00:13 +0300 Message-Id: <1505458814-11509-8-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> References: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v12 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: 8654cc5ecbcd8f0299a0c56a1e2ff23ba87c1d67 **/ 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 07: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: 112679 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp292461qgf; Fri, 15 Sep 2017 00:03:45 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCWu8MPf4QjTchq3jQ5UcW3S8djIIte6xZVO3SFDffe8zcT3TI0iSAIM4UnEtugaZmyveBv X-Received: by 10.36.142.134 with SMTP id h128mr3626641ite.129.1505459025797; Fri, 15 Sep 2017 00:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505459025; cv=none; d=google.com; s=arc-20160816; b=AMjcH6/MnSLc5az0VELSeDiahylynCzcID7XPHjOCeSjBYKR1mxNNbKf9KN8VxmRZz Z3FNwP2xcuOLm3JXxAaIVaGm9f8/DYfvCNvc21S3FdNNd5amzba38UeC6KKHW6MKIAjj j3EyTKwtxooNbSyJYje7Ihbpuu6AdeoTGX+AQuCogpLxPaRgsaUX27QpLUlwNIFJCulE FcjwWYNNX5LQ9XMP17Iiv0GZdHKYDxlLqHktPxXZR7VROTj+C72b3g2+xIw5yKqZZX8B 1OhFznaTOwefKy4encSszr+OJbb9N6x+i+84zVUpXOrloZW03R/KGZhaBFc6qQCW223a hhbw== 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=j4xBFtL3ofzLsRvz8EkOS+7rt4N7rhqeFlQTClNZrUQ=; b=gQ92aI3tSS/Kh+dDOsNF4fbU/AgIi+1fwrlobOGVwNFOfMora8YZXu4xhO6cOQihMw UYJKSnaUGapJRqvEksKqu8CywBvOpblmpwz8FmSRn8+n4k6vVSRXCndvvnaU5LYh4psU FRfMSPrrmwohABZL9H4AZMHoSMkcMLSmOs6l3z0c3xm/rKvU48+0JcQXEIGOYjuowELO NGUxLS2Jbh6cwv0dqt0MEcTmLEXLxmbfQ6nKI7fYHCOCzXl1pERqmwsoFOXH0vvQS+3m gZC1OC+cpb/UIsxgYl8AlM3NOf3GMtiP/hZrVAqumjKTIVIxKN7Xmv4H5TdHashAd708 6Cbw== 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 f11si244054iod.156.2017.09.15.00.03.45; Fri, 15 Sep 2017 00:03:45 -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 4D34D60B4E; Fri, 15 Sep 2017 07:03: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 919C5609B5; Fri, 15 Sep 2017 07:00:56 +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 B6AEC6098D; Fri, 15 Sep 2017 07:00:40 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 4FED3608B8 for ; Fri, 15 Sep 2017 07:00:35 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 9B68C78628F for ; Fri, 15 Sep 2017 10:00:33 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id SU37K84QmD-0XEGJm5u; Fri, 15 Sep 2017 10:00:33 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lLHR2ftQSF-0XtSxNm4; Fri, 15 Sep 2017 10:00:33 +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 10:00:14 +0300 Message-Id: <1505458814-11509-9-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> References: <1505458814-11509-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v12 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: 8654cc5ecbcd8f0299a0c56a1e2ff23ba87c1d67 **/ .../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),