From patchwork Fri Feb 3 11:50:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Agarwal X-Patchwork-Id: 93148 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp458398qgi; Thu, 2 Feb 2017 22:24:48 -0800 (PST) X-Received: by 10.55.129.71 with SMTP id c68mr11542584qkd.195.1486103088282; Thu, 02 Feb 2017 22:24:48 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f15si18626633qtg.276.2017.02.02.22.24.47; Thu, 02 Feb 2017 22:24:48 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4ED1F60F3B; Fri, 3 Feb 2017 06:24:47 +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.1 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DATE_IN_FUTURE_03_06, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id D428C60EEA; Fri, 3 Feb 2017 06:24:41 +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 6E96360F0D; Fri, 3 Feb 2017 06:24:39 +0000 (UTC) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0081.outbound.protection.outlook.com [104.47.34.81]) by lists.linaro.org (Postfix) with ESMTPS id 63C6860970 for ; Fri, 3 Feb 2017 06:24:37 +0000 (UTC) Received: from CY1PR03CA0001.namprd03.prod.outlook.com (10.174.128.11) by CY1PR0301MB0732.namprd03.prod.outlook.com (10.160.159.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Fri, 3 Feb 2017 06:24:34 +0000 Received: from BL2FFO11FD018.protection.gbl (2a01:111:f400:7c09::129) by CY1PR03CA0001.outlook.office365.com (2603:10b6:600::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Fri, 3 Feb 2017 06:24:34 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 192.88.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD018.mail.protection.outlook.com (10.173.161.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.874.2 via Frontend Transport; Fri, 3 Feb 2017 06:24:33 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v136OVeE011021 for ; Thu, 2 Feb 2017 23:24:32 -0700 From: Nikhil Agarwal To: Date: Fri, 3 Feb 2017 17:20:45 +0530 Message-ID: <20170203115045.19750-1-nikhil.agarwal@linaro.org> X-Mailer: git-send-email 2.9.3 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131305766741212306; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(336005)(39410400002)(39450400003)(39840400002)(39380400002)(39400400002)(39850400002)(39860400002)(2980300002)(199003)(189002)(38730400001)(68736007)(8676002)(97736004)(50466002)(626004)(81166006)(81156014)(106466001)(48376002)(107886002)(356003)(53936002)(50226002)(50986999)(105596002)(5003940100001)(2351001)(47776003)(104016004)(450100001)(8936002)(2906002)(305945005)(110136003)(6666003)(36756003)(5660300001)(86362001)(6916009)(189998001)(92566002)(33646002)(77096006)(1076002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0732; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD018; 1:PR9Y8V9gEItECinoAJvrPOtbuFkQR+P6XWtOoYgQoxHK97xsmvDamF9MuaYCtDP69PzgzWaqM/+Td+VqIbK8mfnu1GxJozq/6dJZAioxWKeduJ++R+yHm+thQlBXyVQwGCkmoqf8Yug+z71L9PPmZ4yAPYJulo+Ve6PU8p6kS5R+k1bLmTNqUCMrSiCIZ/KEhynjhP5FeOKc/k2rC8zjaU8wcYbR4ZZKffQTXNAZUz1i5tP7q3a9GZlIAF1QZaqlGHxEg0ds9BAPrzmW0Cgjkq36tZ6VLcBnCoWQExmfF9IowSCnsx6DuGQH7BA/PyIe5KuzSjxm/1MtpJUasLvdIzP4BNDJrAspmmaBnhLjoyu1Dh+ClvQv4HTyDY+1+wvajx24bkCI0I+JxZ6vD31AWjfp46rfttQfbSTolKOAQ1DKCmbTDR4MwttCGFi9uP7l+TCI8lMK/kEn2F/kXyAuxXyGHJI0YS5t/kDdMB1vIyzMF5qgBTZjLIYHWFtD3XfSC2A6dx6qYqtwpMbqF8CO/AqdZ5Fb6VmjEQJpK8sfydU= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 108cd789-d564-4d1d-9b31-08d44bfd5206 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0301MB0732; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301M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AZNsMehW/lhtDkairNq5Bl0yonfd2auUFy+tjTL8exx3pnvGcV3q8mzNt45ODlqpGkYrqXsdgIKlnTwzyboYpdZG0v5MY67UAOht7Vt0CiA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13024025)(5005006)(13023025)(13017025)(13015025)(13018025)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:CY1PR0301MB0732; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB0732; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0732; 4:fylIzgMZ2IpkQUbEPcqYGgNE1eJx+nRIu5KJXxeoKejdKywHaHYQLM2o6zTEPgvrHvSeisxJFTXeP699lHHURekdz4A487zNqj90L9hgSC80CRx/rvnHCVe4kLefEdg0tmSFhmBWeUuji/ICdEiehQ7Thbjj2syUHYDG4jP1MtxrE7TlS168K8RVGYFIeFxyYO6dYXoKNqMmJMB5EUu7JmHx1SY3qzKkTYLek54kj6KVhH2N4sjjb8aX9NO5LYPPvQEf/hKr3ylea+RVn6IgHggCMMQTK8/ukk0HtIYoOXbcOvdLmPCVwFOBS+nITfBhnKHD6tHgfkUiBOV26n8tSZYZtVShw+d7NpM8fbARs8EY7HM/yfBUcbOK4V69qbRMjw4WYLYnI/w2TEBrsN/GqsEv5Gv2bpWqPOhAPywa/SE+tmmKRfwI3ZOazm++rZ/07IGwr2k63AY1ZutFLyrhgyysb2HqLc0bY2Dxc96waqAABFdlt1Vsd/vLDKSaeL18bYXUXPCIoHzHS6wQAbJczSSEZKpY0Q7o++4+a8yQca+rkv8X3pzpfSqAuZ/YTzXwhQgVEyqdCo4eYGjnJQTny6wZcHNtMNmYx0IJlGh+doBHSLpLBn98S7NEVLjNzo116JkjiqsQRssMIcxs5sLUoDpdU3xMth38ZUhF55lrSJK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8FyrGn/dHuph9GjvTx97v6tg3T0EO9AXhCgN+Ra4346AH45d5hNK9pu45BySPJ72KGaIX/Dlbye4dSdw5VTYfbsU/U2FlaVpKDt0d3pUGszQC3hneWPSDzD3c2KC2kDP6jOyj7uZKYNBklF3PGzmMOCClQ8Pyg0qvfTXVrVqHMmqJZMU97dNQOwWLEuK/thtZVWeSzfXOka+t6bQW7S/voiQeH9TjCeiAP89vi9iJ/pk= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0732; 6:KnH1EWC1xxr7N+CFqDX00ytaPY8Vn+mumJfUjqfGEDUGSH06D9TOap6XjKS4uJKDDRe0KE/XrRlt+SIu3+lq22Irly2Squ9rUVgX3sa/jzhPOiFbJFEeOxkIEcFF6oYeomZAVCkaikQKSvSK1YH5r/a0oHktNMO9d+O6izsvaqu1OfpbFgp/wPVXlBRBE7eQIYcqMLz0OkbX5lQPvHCWwJkUgDP3Y4IyJl9IlOgub0FZBIgeqovL5LlDSOoW+36VF9NU6ARY7hoPHvchHx9PmVrAmLE5RLIFZVQxDqK3z1+fGhOQHQI6IkDTvy++HnITFHwplHKzDWq92z5CLpIPiXck277DeZ4goNOa7OIg3BLimeUKz0BT+X2rbXQ3AR8AwzdEf/tRwZ0JRehF9g9YuMk0q+6nC5I6v19semSR/3c=; 5:9or1gydSMnvOwszLvZsYXSkNCGUd0bhA08Yxu2QnuufWGVj+D7MZzVP0U3UYv0BAY+IoT34g+RIH2jMl+ppyic1mhNQPC84p9+ULntW1IGtZeHrBDGa0BplkfBPNLRK9rOOBGMdOC8QLUFfzIOFVIgtPSP85fgXN9zhZGCBZ7Eobw1958mn7GHkZu2zoWAhF; 24:Y6YuBevXdz2HyLDmQLNMeBgEuuLUCLRLQ3JS3HimjdXEStLnMNjtNsI55paI2Z9lcWOCC4cluHTOUbV4grNxdbsfn4vM2XyTjXcb7Lepndk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0732; 7:Gy8bcALurElKjZCkFjfnnK0rdNrMXb5NW2+osEyKoMi3uqkThA3wOEQgND+SGnik1RC57ZMHBnuTlzFtJ6RQORLsAjHcykgSzMA/CfQdKDRKsV1AiixsTOZyf2YpZbN+NzxzBKwuxyDvhLJS43LSGqcGvkNLyJCV9CUpAk9I+5Y43/I9agsmoSdljbmGFRtsXnihc8Wf3tp7DEx1755Y4oUQQWYM2WkQ1I28zQi0HPs55iuTsCr7A6ekn8blhMzWNns2sMB7314lKgz5sx/QVckExjXynQDBkVxNNLuUJ5hQ40tI/r3UMg+hdRDPtSdMrAAiwBpOYQmFyhQnQND3BRjLncIxvd1MLq9SZNzvegJ45vXwhKffSDExjzX1/p/20HvTlgizscW8oC5c+eexBrhcqIL4dbbfvaQBwrMLYjANwW+tdj8gV3FwZPavUHjW+A7SzWJ0mTjKYI/HxvyiGtq7ouqZr52RJrAdhn5f6spLMEIecHTYjTehRC3ileJfFAHKzmRXEbJzOgQ0T+iPzg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2017 06:24:33.9028 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0732 Subject: [lng-odp] [PATCH] [RFC] API:update odp_schedle_multi to return events from multiple queues. 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" Signed-off-by: Nikhil Agarwal --- include/odp/api/spec/schedule.h | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) -- 2.9.3 diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index f8fed17..6e8d759 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -118,8 +118,8 @@ odp_event_t odp_schedule(odp_queue_t *from, uint64_t wait); * originate from the same source queue and share the same scheduler * synchronization context. * - * @param from Output parameter for the source queue (where the event was - * dequeued from). Ignored if NULL. + * @param from Output parameter for the source queues array (where the event + * were dequeued from). Ignored if NULL. * @param wait Minimum time to wait for an event. Waits infinitely, if set to * ODP_SCHED_WAIT. Does not wait, if set to ODP_SCHED_NO_WAIT. * Use odp_schedule_wait_time() to convert time to other wait @@ -129,7 +129,7 @@ odp_event_t odp_schedule(odp_queue_t *from, uint64_t wait); * * @return Number of events outputted (0 ... num) */ -int odp_schedule_multi(odp_queue_t *from, uint64_t wait, odp_event_t events[], +int odp_schedule_multi(odp_queue_t from[], uint64_t wait, odp_event_t events[], int num); /** @@ -170,6 +170,17 @@ void odp_schedule_resume(void); void odp_schedule_release_atomic(void); /** + * Release the atomic context associated with the events specified by evnets[]. + * + * This call is similar to odp_schedule_release_atomic call which releases context + * associated with the events defined by events. + * @param events Input event array for which atomic context is to be released + * @param num Number of events + * + */ +void odp_schedule_release_atomic_contexts(odp_event_t events[], num); + +/** * Release the current ordered context * * This call is valid only for source queues with ordered synchronization. It @@ -187,6 +198,17 @@ void odp_schedule_release_atomic(void); void odp_schedule_release_ordered(void); /** + * Release the ordered context associated with the events specified by evnets[]. + * + * This call is similar to odp_schedule_release_ordered call which releases context + * associated with the events defined by events. + * @param events Input event array for which ordered context is to be released + * @param num Number of events + * + */ +void odp_schedule_release_ordered_contexts(odp_event_t events[], num); + +/** * Prefetch events for next schedule call * * Hint the scheduler that application is about to finish processing the current @@ -348,11 +370,13 @@ int odp_schedule_group_info(odp_schedule_group_t group, * 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. * + * @param source_queue Queue handle from which event is recieved and lock to be + * aquired. * @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(odp_queue_t source_queue, unsigned lock_index); /** * Release ordered context lock @@ -360,12 +384,14 @@ void odp_schedule_order_lock(unsigned lock_index); * This call is valid only when holding an ordered synchronization context. * Release a previously locked ordered context lock. * + * @param source_queue Queue handle from which event is recieved and lock to be + * aquired. * @param lock_index Index of the ordered lock in the current context to be * released. Results are undefined if the caller does not * 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(odp_queue_t source_queue, unsigned lock_index); /** * @}