From patchwork Tue Jan 17 16:28:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Trofimov X-Patchwork-Id: 91694 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp523393obz; Tue, 17 Jan 2017 08:32:15 -0800 (PST) X-Received: by 10.36.116.202 with SMTP id o193mr20048853itc.96.1484670735769; Tue, 17 Jan 2017 08:32:15 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 204si12766156itv.80.2017.01.17.08.32.15; Tue, 17 Jan 2017 08:32:15 -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 Received: by lists.linaro.org (Postfix, from userid 109) id 4E87760954; Tue, 17 Jan 2017 16:32:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 6E6B760EDA; Tue, 17 Jan 2017 16:29:15 +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 B413B6094F; Tue, 17 Jan 2017 16:28:57 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0069.outbound.protection.outlook.com [104.47.0.69]) by lists.linaro.org (Postfix) with ESMTPS id AF8F060513 for ; Tue, 17 Jan 2017 16:28:53 +0000 (UTC) Received: from e109786-lin.cambridge.arm.com (217.140.96.140) by AM5PR0801MB1746.eurprd08.prod.outlook.com (10.169.247.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Tue, 17 Jan 2017 16:28:51 +0000 From: Sergei Trofimov To: Date: Tue, 17 Jan 2017 16:28:40 +0000 Message-ID: <1484670521-28503-5-git-send-email-sergei.trofimov@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484670521-28503-1-git-send-email-sergei.trofimov@arm.com> References: <1484670521-28503-1-git-send-email-sergei.trofimov@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: DB6PR0301CA0004.eurprd03.prod.outlook.com (10.168.49.14) To AM5PR0801MB1746.eurprd08.prod.outlook.com (10.169.247.12) X-MS-Office365-Filtering-Correlation-Id: 40b5e862-66d7-47c4-4413-08d43ef5ec77 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:AM5PR0801MB1746; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1746; 3:gUuNiqRj+dHyxAIeB4hQnBHhpVRDS7PVmp3Oir5SNgKCm7jCPXk2DAXEG+VHbp+LZMmHHy/msp2qd4Gqfyt7tEum+KzaSSmD02AOIyOmcoTtdAp0IUDk36hNnLqQqkS1t0Lheo+70E7k+Erkxx4gWXFE8Sq0b3lJwNATRygIGa9oOpAhubAgdUMZuF28dSEM8fBClsWjmWp5iPw8eGoT2xd5806KU9dxibXBt9Nnwo10/Eg3XxuJBOKzGpHhnsqPChGRYE7Yv6kBtGgtWudiQQ== X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1746; 25:GhtTL2kyPDmO0WE4oxvVTRVlz4utmgmafSdlncDxnHKFVU9iQzWnT35PrdXoJhk+zLY9zPiWcBmwYR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v69fuJ39lGIaTLjKjMJNCGkzO/+/caM12hnSMBjalQh/R0aTCB1f41Lpvkuh83jOjKqZFqxhah09h+U= NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:AM5PR0801MB1746; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1746; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1746; 4:mGuFOWWtTdBITbDfxyY0cy/nMFJipS8d9TVviw7ijKQBTrbsLRpz13Ilh+TgfNjC8o+n4fqT1LjxAIIytoYjcag/kq1wZ/DgMo8vILdh+cPXDAKWNo8PCVk1bEolhfv5nH3Wn5/9fBew1gzkLNgSr92NvyNaY0EzR5m4YBTC3S6fnnqHcXATesw2sPuxs9JqFFZ2MRSNTTTHlfbYbLpTmec74siZykmu31XN8VG0FCT+jS8NoQtMJj6BEFJv+FlelbSY7Zg9xE8CSK4I0C8eCp50B4zmEPuLGGYbzjJaX6ogjICxPV5ALry4VygBxghV4y2Lm1cAhXMmmtl2DTXbuqQgMdJuBY0cdaXypvQRYAcacLAISEUgbfDz7Jy7f/qmRKDAu8VatvGBs2rwhpY+rSwGx4qjUYTcI7huLoE0qsT3XLHQI7St+B7vglORvmYK0vsWaU5Oc/HFfGa9Hn7s9TDvZqZxYkNgZP8uUbwrWqmzW+LCUCB1ahyQvSkzbNpv4YtuobbnonQDfQqWlDEzVj/oEbXiStdvKS42cGIfpfQ3MiVavqU/rUVMrNAE3nOadRjuFeEM5rPa6Nzg5tH69htapY+o+fpXypXRVn/W6KOWCZX8lZmN0K4X30GaWRZx X-Forefront-PRVS: 01901B3451 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(39840400002)(39410400002)(39860400002)(39850400002)(199003)(189002)(6666003)(81166006)(8676002)(50226002)(81156014)(305945005)(450100001)(7736002)(38730400001)(2950100002)(6116002)(97736004)(92566002)(6916009)(47776003)(2906002)(3846002)(54906002)(33646002)(66066001)(48376002)(50466002)(50986999)(189998001)(4326007)(76176999)(25786008)(36756003)(6486002)(110136003)(106356001)(105586002)(5660300001)(101416001)(68736007)(42186005)(2351001)(86362001)(5003940100001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB1746; H:e109786-lin.cambridge.arm.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1746; 23:yR/SOzR+ttzy8c9uPUq5AyX6mHmu/BkLUL+d6Bt?= iltv1kxeUW1OVp1R7aPa59t5S02rnYV9WJai0Zp9m+440SSGzBWhT7jsHB7kyPkWTMMchNZJ7rYhWXL3RJKcGqf+mC+9pAgf7Q7uZ7p/p4a7+QCuHN6YT6VkLwN1O7ZzlU+7E5BebhnmKDjnAi9fMR+RldaoSu2S2o8WR5+AJD3dAKA91qdKmQAxV+jCOB1k+Pv5PjVDm8DKRamjuowErfg3zW5GQ/4rhPzV3+h+5yJFFyPxEDmtnzRFyQ46NZzX1p1U4QiyBfcjdNR+ILmcrHs0GaruCIrex15XdeFkzFWSEKKQkmNbzPewpF07oWGQeLaAQCNoLMAH2BAGRoMYpHnQ7SgCuXUlVcdUGEUt8/bR5KznhLLsjUc18g8/17K5+J+9xvY7+2i0cjjFwuOsfw8CLaJUqQ7sL+RqMXXZZ+nJELzqcXTR/+/HgGuSfivb8cN4CUsRfmnfSGpJvy7LzeetHc+F54Cd2TkFWVFnkh3X0XnL3fUtlXa4+4NzDNXX4/GvZEIKwCuECRnzJye9qoNcxscJmLRt+8em/XSDpw4BmCGMmKr53b5CtrhtEJjyA6/yLM9hQPC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aaowwgswD3xETPPIoTQhBSPBNHp+/i4Bw==; 5:wEpit2vYzV7c0Yyc0hTsi6D0OrjYx9asp/QuBhd46V5cazjodhyCciN3RncmqjUYB9yRbSDd5Nt17vpf4FdrUXID+Y5P34tM6Nd9cQFljAJuYUfbwHcpo112u1vLxXJght6KWBtSFS+o6+DsL3OMuQ==; 24:W3A+C+IBHkjT97jJQNBnONbuN28PYUnjLV56mCbGGPtJA/DkYFCW5dKbDklAs0xhxc48ysc8/0Pqo3jsbzAag3msqL6MJkzFu4Gqr61QQl0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1746; 7:SZ6MWdFth1osvLH4IfMrYaWLxgsWaHgp4KKrE+1E9THB6gLrnQaY4BJZVa2uBonHPfg9zdLcl7pyhZcUUyX4EKjJn48nt5n69G9mj+LcHb27/7OsvVsB3f2f4dJF9rNA2xdCe3mutOSDONATy9G6PA3bsTzDN49RVBdsPdvoZC0YIZqRsVDz1vXAQRrL1XWcopdenj6LksjZ+M0Y4zVBjvXRnrbrJy7lh+H73m1GCLz/UYP5dICieA8fggqbxtFWkwLIqNucbXuIgy85eRb9okk9E2k55UBlnXhjjdKmWNB1I4Y8Ok7kWPbFwv2IHIpLtO9pBXvnK4ml3cUJ6nCmGy1b2ZyaIfoepY9Og/lsCJz104mA+1m4J6nc75g+4Pmt5BqQhA3NtQpuZfohMUitRx3Px7hLmqRTcF/JOtqBAto+TX4uIVbz0rtKTdnwjQT5pS1AF9fQapdB4bFMb90pkw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 16:28:51.9209 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1746 Cc: nd@arm.com Subject: [lng-odp] [API-NEXT PATCH 4/5] queue: adding depth threshold trigger 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" This adds an ability to set a depth threshold for a queue. When the threshold is exceeded, an event will be enqueued on another queue as notification of the fact that the threshold has been exceeded. Signed-off-by: Sergei Trofimov --- include/odp/api/spec/queue.h | 33 ++++++ .../linux-generic/include/odp_queue_internal.h | 8 +- platform/linux-generic/odp_queue.c | 117 +++++++++++++++++++++ 3 files changed, 157 insertions(+), 1 deletion(-) -- 1.9.1 diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 5af676b..e72ae87 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -445,6 +445,39 @@ int odp_queue_info(odp_queue_t queue, odp_queue_info_t *info); int odp_queue_depth(odp_queue_t queue); /** + * + * Sets the queue depth threshold. When the threshold is reached, a + * notification event (if one has been armed) will be sent to the notification + * queue when the threshold is exceeded. + * + * @param queue Queue whose notification threshold will be set. + * @param threshold Number of the events in the queue on which to trigger. + * @param notifq Notification queue to be triggered on reaching the number + * of events. This queue must be of type ODP_QUEUE_TYPE_NOTIF. + * + */ +int odp_queue_threshold_set(odp_queue_t queue, int threshold, odp_queue_t notifq); + +/** + * + * Reset a previously set queue threshold. + * @param queue Queue whose threshold is to be reset. + * + */ +int odp_queue_threshold_reset(odp_queue_t queue); + +/** + * Resets a notification queue. A notification queue must be "armed" with an event + * before it can be triggered. It is the responsibility of the notification listener to + * reset the notification queue + * + * @param notif Notification queue to be reset This queue must be of + * type ODP_QUEUE_TYPE_NOTIF. + * @param event An event to reset the queue with. + */ +int odp_queue_threshold_arm(odp_queue_t queue, odp_event_t event); + +/** * @} */ diff --git a/platform/linux-generic/include/odp_queue_internal.h b/platform/linux-generic/include/odp_queue_internal.h index fb78124..02bee9f 100644 --- a/platform/linux-generic/include/odp_queue_internal.h +++ b/platform/linux-generic/include/odp_queue_internal.h @@ -79,8 +79,12 @@ struct queue_entry_s { odp_pktout_queue_t pktout; char name[ODP_QUEUE_NAME_LEN]; - int depth; + int depth; + int depth_threshold; + odp_queue_t threshold_queue; + sem_t notif_sem; + odp_event_t notif_event; }; union queue_entry_u { @@ -100,6 +104,8 @@ int queue_deq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num); void queue_lock(queue_entry_t *queue); void queue_unlock(queue_entry_t *queue); +int queue_trigger(odp_queue_t handle); + static inline uint32_t queue_to_id(odp_queue_t handle) { return _odp_typeval(handle) - 1; diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 82fe794..83e6545 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -93,6 +93,8 @@ static int queue_init(queue_entry_t *queue, const char *name, if (param->type == ODP_QUEUE_TYPE_NOTIF) sem_init(&queue->s.notif_sem, 0, 0); + queue->s.notif_event = ODP_EVENT_INVALID; + queue->s.type = queue->s.param.type; queue->s.enqueue = queue_enq; @@ -389,6 +391,32 @@ odp_queue_t odp_queue_lookup(const char *name) return ODP_QUEUE_INVALID; } +int queue_trigger(odp_queue_t handle) +{ + queue_entry_t *queue = queue_to_qentry(handle); + + ODP_ASSERT(queue->s.type == ODP_QUEUE_TYPE_NOTIF); + + LOCK(&queue->s.lock); + + if (queue->s.notif_event == ODP_EVENT_INVALID) { + UNLOCK(&queue->s.lock); + return 0; + } + + odp_event_t event = queue->s.notif_event; + queue->s.notif_event = ODP_EVENT_INVALID; + + UNLOCK(&queue->s.lock); + + int ret = odp_queue_enq(handle, event); + + if (ret != 0) + free(event); + + return ret; +} + static inline int enq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num) { @@ -453,6 +481,11 @@ static inline int enq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], queue->s.tail = tail; queue->s.depth += num; + if (queue->s.threshold_queue != ODP_QUEUE_INVALID && + queue->s.depth >= queue->s.depth_threshold) { + queue_trigger(queue->s.threshold_queue); + } + if (queue->s.status == QUEUE_STATUS_NOTSCHED) { queue->s.status = QUEUE_STATUS_SCHED; sched = 1; /* retval: schedule queue */ @@ -832,3 +865,87 @@ int odp_queue_depth(odp_queue_t handle) return depth; } + +int odp_queue_threshold_set(odp_queue_t handle, int threshold, odp_queue_t destq) +{ + uint32_t queue_id; + queue_entry_t *queue; + + queue_id = queue_to_id(handle); + + if (odp_unlikely(queue_id >= ODP_CONFIG_QUEUES)) { + ODP_ERR("Invalid queue handle:%" PRIu64 "\n", + odp_queue_to_u64(handle)); + return 0; + } + + queue = get_qentry(queue_id); + + LOCK(&queue->s.lock); + + queue->s.depth_threshold = threshold; + queue->s.threshold_queue = destq; + + UNLOCK(&queue->s.lock); + + return 0; +} + +int odp_queue_threshold_reset(odp_queue_t handle) +{ + uint32_t queue_id; + queue_entry_t *queue; + + queue_id = queue_to_id(handle); + + if (odp_unlikely(queue_id >= ODP_CONFIG_QUEUES)) { + ODP_ERR("Invalid queue handle:%" PRIu64 "\n", + odp_queue_to_u64(handle)); + return -1; + } + + queue = get_qentry(queue_id); + + LOCK(&queue->s.lock); + + queue->s.depth_threshold = 0; + queue->s.threshold_queue = ODP_QUEUE_INVALID; + + if (queue->s.notif_event != ODP_EVENT_INVALID) { + odp_event_free(queue->s.notif_event); + queue->s.notif_event = ODP_EVENT_INVALID; + } + + UNLOCK(&queue->s.lock); + + return 0; +} + +int odp_queue_threshold_arm(odp_queue_t handle, odp_event_t event) +{ + uint32_t queue_id; + queue_entry_t *queue; + + queue_id = queue_to_id(handle); + + if (odp_unlikely(queue_id >= ODP_CONFIG_QUEUES)) { + ODP_ERR("Invalid queue handle:%" PRIu64 "\n", + odp_queue_to_u64(handle)); + return -1; + } + + queue = get_qentry(queue_id); + + if (odp_unlikely(queue->s.type != ODP_QUEUE_TYPE_NOTIF)) + return -1; + + LOCK(&queue->s.lock); + + if (queue->s.notif_event != ODP_EVENT_INVALID) { + odp_event_free(queue->s.notif_event); + } + + queue->s.notif_event = event; + UNLOCK(&queue->s.lock); + return 0; +}