From patchwork Wed Sep 13 11: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: 112435 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp805659qgf; Wed, 13 Sep 2017 04:02:10 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBxSzwpb7q5YgzM3d8SSBrjT+dH/HhhL1Mt27MeKvGr9iGjWDd2FeBnDNMprPRQlGz0usWf X-Received: by 10.237.62.58 with SMTP id l55mr3283596qtf.30.1505300530275; Wed, 13 Sep 2017 04:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505300530; cv=none; d=google.com; s=arc-20160816; b=hq8aeqI1KqgrcguYWptp/OMzCkUzRzvFoCcbE9M8C9iqJEVJK/tAqO8DE/V/VaxJxg qNebfx5qLbBMufFFcR0HjuDJtL7GZXiVgXEfdRqs/PL9O5Os36S/veRZ1Bn32QwDzMJ8 Q/h/18Zpo+zRnTOsAymfKEf4Uj86ABXiuzEZA5cqQ4aHGR7TG8y8FPxHhgNULWXaeiJ5 aaUwD2Tee0fW7F84fA5DBqRzz/+QmnyQqUlsYNnvclfhaLk3Xr1bj4BXLq07gT6AwGe7 IIouPSHf0VjaYoB8Z9wsjZKyXkqHs+G/mD6GlyAd4bCYLSPbF5NpUyvRzx33F2OiWuep jUhA== 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=dvxsi/iQN+LM6QC0pwyoY2ABYIwvWNMLVGe+zzgQ0HU=; b=gmpcBaes5x7fNlUm2D4LekuhqRzTCwvlokrS2OXbE23KQvE07HuWkLRRpaj23Yovyb f6W1G60ozGk5omn2rOH9Z8RYmUE971JcqyPazKoQ4mpTD15XyPqqMNrTPbojDwoqVN2U VZcGFx2hIXyEMJT2ctKrI57V6C1snMgUTpjeV3qxVEeEXzf6jtQWsU/pjrN3qO8Qb6Az 4ZC0E0I6zncCh2PGUXY4qqCd6j8scwl9392fiskb1mKuVLNUHOJM0ve7hsYWsBNUyvhj DJsquW0AypDPAeQKSEGeoApaGndQSUsjbG+bXld3A+4iBpwePFJQTtPBBsWoGORxO2Zt dN9w== 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 q14si14946969qtf.25.2017.09.13.04.02.10; Wed, 13 Sep 2017 04:02: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 EB3E262CED; Wed, 13 Sep 2017 11:02: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 0C47260BE8; Wed, 13 Sep 2017 11:00:34 +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 AD13460BDB; Wed, 13 Sep 2017 11:00:24 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id D7F4660B4F for ; Wed, 13 Sep 2017 11:00:20 +0000 (UTC) Received: from mxback11j.mail.yandex.net (mxback11j.mail.yandex.net [IPv6:2a02:6b8:0:1619::84]) by forward101j.mail.yandex.net (Yandex) with ESMTP id DEF831242A44 for ; Wed, 13 Sep 2017 14:00:18 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback11j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id BFUukDBbkO-0IESJc3p; Wed, 13 Sep 2017 14:00:18 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Dgs1Bh6pX6-0HcuQSUY; Wed, 13 Sep 2017 14:00:17 +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: Wed, 13 Sep 2017 14:00:09 +0300 Message-Id: <1505300412-17241-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505300412-17241-1-git-send-email-odpbot@yandex.ru> References: <1505300412-17241-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v10 1/4] 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: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ include/odp/api/spec/schedule.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 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); /** * @} From patchwork Wed Sep 13 11: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: 112433 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp803487qgf; Wed, 13 Sep 2017 04:00:30 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBJ6y8S5S1z0XaBS7pcavdDDUYC2pkHMPb3B99O/EAkZJXm9XG0x1nhKb/ut0nK6idYGlb0 X-Received: by 10.55.64.136 with SMTP id n130mr4299959qka.10.1505300430568; Wed, 13 Sep 2017 04:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505300430; cv=none; d=google.com; s=arc-20160816; b=VMN49WvohTW1izicA1c3e4tAUE3PlRd7njABSefomW7pGMN1SpzNv+Y3fAPFemIZ/s S8xtlZx2/73SY6a1QiYa2h5M9cafrY512iRvcE9rFPblkxWJeL91gsBUja15D5UhKv+6 IPjhGpZPgeChzdQe3UpP//1gyssRLio1hgMbrkzciQjAuWh4pQYXeKyK8VFzM2t57oAf v+RCW5b8tTB5BClnx3VVWKWAvVfwMkguzMtQk7ICIye22IeA2w7qXA39QBNsl30ahOMw ScGFor/3ODNBIihvy6c4ilet8s6IBQ8VMp0x75LGatEyqWjsMc1yFTfRvqOsEPrZZozS 2QfQ== 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=wP/ShYHIQSIHKlqsQ82hv8FoccqQR1EXyCwUh5BSzKQ=; b=iux6sb0J+6PQwpVllGYXR5D8N1j3PSravcTz/zA1iOvmYhCcAbWLx5yy2Uyvawvyah 2n0tV3ts/aQq59Bl03n7+LqA4KGAaz45kUrmV7ysiu+FZh8c/kzSHo2BfQFZxMOSfwPf LvPmUzREeJZxHmjYrl1aSo27v7N+o2u7nbdwUIrtzsK+sC/7aUnQTPUZCTwSg3NOx18w 44alTOb3uq+8FYUjq2xqJQX+0iC13DNXoKotUru4k8e0bz4xyJA/pRGxixmhSKbMjd4v 0JjdgCUA+FLsBQg+xN67R+wclSb2WW8w++LPGupldOKl+uSsyOgthrWBquWjgoDTicuK v/Dw== 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 h3si13763240qkc.496.2017.09.13.04.00.29; Wed, 13 Sep 2017 04:00:30 -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 7EBF360B4F; Wed, 13 Sep 2017 11:00: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,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 484CD60B59; Wed, 13 Sep 2017 11:00:25 +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 E5D1760BE3; Wed, 13 Sep 2017 11:00:21 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 7F05960B4E for ; Wed, 13 Sep 2017 11:00:20 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 72DC46A82AF5 for ; Wed, 13 Sep 2017 14:00:19 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id yoIXlLj7TZ-0JVm4eT6; Wed, 13 Sep 2017 14:00:19 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Dgs1Bh6pX6-0IcKMpVO; Wed, 13 Sep 2017 14:00:18 +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: Wed, 13 Sep 2017 14:00:10 +0300 Message-Id: <1505300412-17241-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505300412-17241-1-git-send-email-odpbot@yandex.ru> References: <1505300412-17241-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v10 2/4] 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: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ 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..b42a0db14 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 to this call + * similar to calling these two calls in sequence. + * + * @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 Wed Sep 13 11: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: 112434 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp804735qgf; Wed, 13 Sep 2017 04:01:24 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA1mT12tMFClTD0vAoqCHbz20/Tm525YHA5ZfQhsYkKLHhECiRS+iCxZvJL6olHn3xZ+oZw X-Received: by 10.55.31.211 with SMTP id n80mr25051114qkh.324.1505300484365; Wed, 13 Sep 2017 04:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505300484; cv=none; d=google.com; s=arc-20160816; b=zr4IC8JAubRLMqu7RD+1Mb9qbNGdXmPcbYbVkYJ2x4bihDVUX71fEDTbnWlGLPXrPJ GWzlwCy1EqaUpDc3pQ125KP3kRKaINoTQjsFbnESapusF7P+EmnDIl5XEeWb2jy9wZIf hQzBcUdSt6RshZ/Y7dV+Bjlo6muYxomXEKM8ciLmqesKpQyYPkKvjaOnhP53lucjzboE uAHFAyson2+uRVlfbcrNWMC6qqrOfSpxMg/+Q5ecyxCuc/ZPRo4UPDyw/9W2lr7LimbS O5v1XGLBsxlPo3hebWMkpp3foWH1nyxw5RMeJslN7q/0Wwtpiw4DCxJwUwmU6Rgc6vvE lYLg== 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=RNp3jYkm/rz3PHNBneNmuUkrXU0LrCXXLtosLYNLk/c=; b=NVbCbgXz0MoAAPqLhIykQhdhliAA0D07BexmQyXxY2NUlAY1avpVJEEVfINTneDk1w 29ja5nvjgaBuN/FcpbC9VUPvjs+Gtco3BNDpSNPxzzdo6YndcWgt6S5xh1QCQZaBpAAJ y6Cnn0xqgDWLJWQCCK1M93/Ny6Qli3FySkp6ZjVZLYlWJGEV71PZ4/hViWXS8v9l+aXi NvaFedvCDr1b21z7dthx7HY5OsG6cACSxI6MTMX57Wvhi39nKOprnBwHG6HajUF3apiH 7E57olUfL7c1wG8Z19hw7YkHTNyAasHcH6q0NjgwL6dpcD+PuzEEuZBWhH6kEy8EXQ9B jtDQ== 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 s3si13861233qkf.542.2017.09.13.04.01.24; Wed, 13 Sep 2017 04:01: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 013286064E; Wed, 13 Sep 2017 11:01: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=-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 A30EE60BE9; Wed, 13 Sep 2017 11:00:29 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B92BD60BE3; Wed, 13 Sep 2017 11:00:23 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id B4BBC60B59 for ; Wed, 13 Sep 2017 11:00:21 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 3BCCC2D84A7D for ; Wed, 13 Sep 2017 14:00:20 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id oggXwSDdvD-0KjOjx87; Wed, 13 Sep 2017 14:00:20 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Dgs1Bh6pX6-0Jc8H9Lh; Wed, 13 Sep 2017 14:00:19 +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: Wed, 13 Sep 2017 14:00:11 +0300 Message-Id: <1505300412-17241-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505300412-17241-1-git-send-email-odpbot@yandex.ru> References: <1505300412-17241-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v10 3/4] 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: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ platform/linux-generic/odp_schedule.c | 4 ++-- platform/linux-generic/odp_schedule_if.c | 4 ++-- platform/linux-generic/odp_schedule_iquery.c | 4 ++-- platform/linux-generic/odp_schedule_scalable.c | 4 ++-- platform/linux-generic/odp_schedule_sp.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 5b9407624..7040e3c48 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -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..f720a48b1 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -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; diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 765326e8e..d08c46116 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; diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 05241275d..10da80e37 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -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 Wed Sep 13 11: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: 112436 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp806631qgf; Wed, 13 Sep 2017 04:03:00 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDlrUN8eCOOGFSejlPgrm72aYJ0cvueiCxCvHaNFSPoTtrVhW7Pr/yJEv7VHmLN4z0AWegX X-Received: by 10.200.42.99 with SMTP id l32mr25873617qtl.121.1505300580728; Wed, 13 Sep 2017 04:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505300580; cv=none; d=google.com; s=arc-20160816; b=HmKiiWmkHef31BBBIqvIaPSkQg/mW1rtPuni5w6wTsaCS08LQL5I2OcG22aD0275RQ cSr3CUJBVMje4Y7EYT27rzuoYtcslai9CDeJJF0n0GKzkA1MOLXtIppS+I4NDOEj6UHW C7hbh15IHGChPbLymbTFiQho8POqmXTEO7/SW0+93Rka9ZJdFNAM4pi7JoqQY6lYKUty OCC5jDQl+NuccDmHRCgwKHUUFaoRyocO1V1I95ZRcV5BbYLAsbIqSPv/BbRxF01ONRh5 9DS2gASffcfZyXNqB7helbzSz6z+HnpHJzF0hmVRzMUKHD6hyzTIMSJV3XajTnVoVtST b//Q== 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=Dj3+HV0VcuRdgfeP3dXhU0nEQ5e5DMegL6+5qAKcH4s=; b=fWpANuT0/NSuRc0hdzoTfnjx+P9f5d/FBiD63gAezD+j4ZDdrRJm8E3l+U01Nv3xCp np8tGPJ5f9LYPClYORV41/zPhPM73zQDf7iOB1XDiNeGm0+jxhvB6p8bxjVg7RIu1xUF hdUDzTyBMIAKUKAaWDOk342DRTLrMclzKQKj76od6yVro3sbbBGL2zEXFteNAoCtRd9W GHRMwZPljNiwPcn+LxyfLyggceWEQDE03Y/N+gpbrY0ABnvzVB8BJWkCHjteIHmZlAPO 1pjsnyLvLszxk4drcYSL3xrJfQeYeU65+qLyJSAgb1Zxo7LIsX3QRlNviLjx1txYrAYK OCKg== 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 k19si6400674qtk.147.2017.09.13.04.03.00; Wed, 13 Sep 2017 04:03:00 -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 6BEBC61C9E; Wed, 13 Sep 2017 11:03:00 +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 5AD18622F0; Wed, 13 Sep 2017 11:00:40 +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 CB5D160C0A; Wed, 13 Sep 2017 11:00:27 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id 570B060B4E for ; Wed, 13 Sep 2017 11:00:23 +0000 (UTC) Received: from mxback6o.mail.yandex.net (mxback6o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::20]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 10C685D85738 for ; Wed, 13 Sep 2017 14:00:22 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback6o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id AG27CSayjr-0L2COe3K; Wed, 13 Sep 2017 14:00:22 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Dgs1Bh6pX6-0LcKPJ5a; Wed, 13 Sep 2017 14:00:21 +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: Wed, 13 Sep 2017 14:00:12 +0300 Message-Id: <1505300412-17241-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505300412-17241-1-git-send-email-odpbot@yandex.ru> References: <1505300412-17241-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v10 4/4] 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: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ platform/linux-generic/include/odp_schedule_if.h | 1 + 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, 41 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h index 657993b13..bf999adf4 100644 --- a/platform/linux-generic/include/odp_schedule_if.h +++ b/platform/linux-generic/include/odp_schedule_if.h @@ -95,6 +95,7 @@ typedef struct { odp_schedule_group_info_t *); void (*schedule_order_lock)(unsigned); void (*schedule_order_unlock)(unsigned); + 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 7040e3c48..597e561fa 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 f720a48b1..ba81b46d6 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 unsigned 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 d08c46116..100cb0b24 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 10da80e37..11d2a1f73 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 };