From patchwork Tue Nov 21 14: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: 119363 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp5134000edl; Tue, 21 Nov 2017 06:03:55 -0800 (PST) X-Google-Smtp-Source: AGs4zMaPfAWVZ8ax7W6PJ7jHHDq0eoxq8m/SNsGbmAMHO2Et90AuN0VoTBgjQ4XXnPg/NTqPyCv1 X-Received: by 10.55.104.135 with SMTP id d129mr26712118qkc.349.1511273035271; Tue, 21 Nov 2017 06:03:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511273035; cv=none; d=google.com; s=arc-20160816; b=wFHFVs7dDYxinUzbnhduAB+qaNOToVFEViWFSG51vTjyHamF0KEnwWzdd7UClSa8YC Ok9/IeNFc4iOiFWWy0eMvb54tJ55wZamKZEXCkMMHQ6fQwbGxo8DqIgPq+CW96L6iERu sAVlLFgX+aoQkbM5pvZ5g+ASu8D3psSrXFNWKUnOT8lSYC+K0r5Ce0JX2GBHd0FEWxGA zhoRXMZ1JQ0Tli4raX/53z43JNnkBfyEh8mJsUHZH6C+6sT4wOIqcflBxCT6sbQG6Vvz dGkU8cVtOuOeVsGTJqtwBSCcGZKPuQYNw7DHyrMBz2jn91H7v7K2J/+xfMMYIerIIyyq hoKQ== 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=HxIWc1+wnb1QeR7dOmMGF1775YyruOf+WQZ5SjVLfZ4=; b=CqdkFh/KLty6ggp7MuKBmDRrnw+66IuDsHnY3bwKDNgIydMaRK5tymzLEQZSvNY9VE 6LZEkNCqHukzJthn5Ud8I3HVwDRp4YJ/caU9KbYBLBa/DOX6T/owQZNZecSt58WF+djK b4ksCUt2NG/YMWFV/7yC0QIh+mpMZl63JWxNeYwe5BotTWggo/lbWMfJxDJqjRBtCGfW u7lRIoaIZv2vNY9IK50uBjEcH0EeqNYNQYawuUqNSfr9sjO3c4uolOG/6IhjAyCooeLS nNk6g7BLZ8d5PDRqO8IrRTA3GOamHu8EOCK3JzdOhvtOxHAmoGegjTkBpLMtkvuSSBah fz/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id r11si1122686qtc.154.2017.11.21.06.03.54; Tue, 21 Nov 2017 06:03:55 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 A864F609A6; Tue, 21 Nov 2017 14:03:54 +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 F0E2F6088C; Tue, 21 Nov 2017 14:01:21 +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 797EF608DF; Tue, 21 Nov 2017 14:01:06 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 349A160879 for ; Tue, 21 Nov 2017 14:00:14 +0000 (UTC) Received: from mxback4j.mail.yandex.net (mxback4j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10d]) by forward100o.mail.yandex.net (Yandex) with ESMTP id CE16E2A227DE for ; Tue, 21 Nov 2017 17:00:12 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback4j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Nk9nJibm4h-0ClqHekf; Tue, 21 Nov 2017 17:00:12 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 9eiNlUBoJ2-0CvCWMHL; Tue, 21 Nov 2017 17:00:12 +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: Tue, 21 Nov 2017 17:00:09 +0300 Message-Id: <1511272811-6276-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511272811-6276-1-git-send-email-odpbot@yandex.ru> References: <1511272811-6276-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 302 Subject: [lng-odp] [PATCH API-NEXT v1 1/3] api: queue: blocking level parameter 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: Petri Savolainen Add queue parameter and capability to indicate queue operation blocking level. This guarantee of non-blocking is important for real-time applications. HW based implementations may be always non-blocking. Where as, SW based implementation need to trade-off between block freedom and performance. Signed-off-by: Petri Savolainen --- /** Email created from pull request 302 (psavol:next-lockfree-queue) ** https://github.com/Linaro/odp/pull/302 ** Patch: https://github.com/Linaro/odp/pull/302.patch ** Base sha: d4b364849c4abb4c71e0c5260e1a793ebb8dc97d ** Merge commit sha: fc00736d09bd0388db2bde3a9177edfd995eec67 **/ include/odp/api/spec/queue.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 73598be06..7f2d7cb2e 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -96,6 +96,32 @@ typedef enum odp_queue_op_mode_t { } odp_queue_op_mode_t; +/** + * Blocking level + * + * Blocking level tells how operations behave when one of the threads using + * the same resource suspends. A blocking implementation may block other threads + * using the same resource for the entire time that one of the threads remain + * suspended. On the contrary, a lock-free implementation allows other threads + * to make progress while a thread is suspended. Blocking levels are listed from + * the weakest to the strongest guarantee of block freedom. + * + * Performance of non-blocking operations may be lower than blocking ones, but + * can be used safely e.g. between threads of real-time and non real-time parts + * of an application. + */ +typedef enum odp_blocking_level_t { + /** Operations may block. Other threads may be blocked while a thread + * is suspended. This is the lowest blocking level (no block freedom + * guarantees). */ + ODP_BLOCKING = 0, + + /** Lock-free operation. Other threads can make progress while a thread + * is suspended. */ + ODP_LOCKFREE + +} odp_blocking_level_t; + /** * Queue capabilities */ @@ -125,6 +151,10 @@ typedef struct odp_queue_capability_t { * store all available events. */ uint32_t max_size; + /** The strongest guarantee of block freedom that is supported + * for plain queues. */ + odp_blocking_level_t blocking_level; + } plain; /** Scheduled queue capabilities */ @@ -138,6 +168,10 @@ typedef struct odp_queue_capability_t { * store all available events. */ uint32_t max_size; + /** The strongest guarantee of block freedom that is supported + * for scheduled queues. */ + odp_blocking_level_t blocking_level; + } sched; } odp_queue_capability_t; @@ -178,6 +212,13 @@ typedef struct odp_queue_param_t { * ODP_QUEUE_TYPE_SCHED. */ odp_schedule_param_t sched; + /** Blocking level + * + * Queue implementation must guarantee at least this level of block + * freedom for queue enqueue and dequeue/schedule operations. + * The default value is ODP_BLOCKING. */ + odp_blocking_level_t blocking_level; + /** Queue context pointer * * User defined context pointer associated with the queue. The same From patchwork Tue Nov 21 14: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: 119365 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5308812qgn; Tue, 21 Nov 2017 06:05:44 -0800 (PST) X-Google-Smtp-Source: AGs4zMYDl0JX9CPIuP7hvfWzoZT4BA9mYCcCkBpBH31N3UpbvyKrmvqiEt7A2yeRForMFh9gKAZI X-Received: by 10.55.220.195 with SMTP id v186mr26912694qki.324.1511273144388; Tue, 21 Nov 2017 06:05:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511273144; cv=none; d=google.com; s=arc-20160816; b=TW2EV++FgcOsYP9MRU/HiZ0L7OrEDu72DbNU2T8WUJqTPfzbUZpvS4ZpTY6xTK/rH2 xQLAri8ZLpKMlMl3fd53OW/+tO38T+EKjVsfMH4SEOejXBtninR6N9uu7FYjoPk8HVuZ 7OGuCZzeDNJvtS5keuKf+DRfOzqdXYumrGDr6lub5WgiUuDKnoSuPvI64YcWcDETRtWe JU+KBdR/9yQ6eYsoesEaThyWwyUVnNhaJEOlyoumQjsUzIh/y/jlrNVNsbl5cVzFNuFm 6AB0mMVB6rX3+pNWDhKCO6EY+W/i+6v7ISKjJZCdj2BPnsNp1iA6/MxqJKkHVuBiBCQ1 Xb6A== 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=kqbQpXM/29SVXjA84aCeCqKYQ0ghnPMZVj8mh+qMlSw=; b=KO2TUXzTJfwCnVC9/OKtzDmkJtUZiurCiQd0ycrvYYr1/NxAdgceDcV3qubN79zop2 0zx3sEUjm6H10UOmvsHHPTmBsDwIUyvWw1qBcMlsWykRwT8lAF9j0dzb/khP17GGyueZ CUknVFrGJ+0Mxw64LcBC/O5/ihsAeMbx7p6NFw3W5SN1mg5o7lLwCZokhSK5uZOn7Vg3 JOehv1ljZS6A1k5r78ulX7DXYOu4gjBUjlV9y3+1/8J6gwnDtBoVSPCHl9gJIOIF3OmJ 21SZm7IZsV9uiKnrIlAgXY22aS6Idix7dIQImAb2qgpjIczOeziO3H5AWSbW2H0uBFhT xESQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id f27si1100842qki.129.2017.11.21.06.05.44; Tue, 21 Nov 2017 06:05:44 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 00D8A608F6; Tue, 21 Nov 2017 14:05:43 +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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 8F966608FD; Tue, 21 Nov 2017 14:01:30 +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 3025160888; Tue, 21 Nov 2017 14:01:10 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id 5B5A56087F for ; Tue, 21 Nov 2017 14:00:15 +0000 (UTC) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 3531D2D82853 for ; Tue, 21 Nov 2017 17:00:13 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 5vpvXjfA4x-0DTe92Sn; Tue, 21 Nov 2017 17:00:13 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 9eiNlUBoJ2-0CvCrSeX; Tue, 21 Nov 2017 17:00:12 +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: Tue, 21 Nov 2017 17:00:10 +0300 Message-Id: <1511272811-6276-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511272811-6276-1-git-send-email-odpbot@yandex.ru> References: <1511272811-6276-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 302 Subject: [lng-odp] [PATCH API-NEXT v1 2/3] linux-gen: queue: fill blocking capa 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: Petri Savolainen Currently, only blocking queues are implemented. Signed-off-by: Petri Savolainen --- /** Email created from pull request 302 (psavol:next-lockfree-queue) ** https://github.com/Linaro/odp/pull/302 ** Patch: https://github.com/Linaro/odp/pull/302.patch ** Base sha: d4b364849c4abb4c71e0c5260e1a793ebb8dc97d ** Merge commit sha: fc00736d09bd0388db2bde3a9177edfd995eec67 **/ platform/linux-generic/odp_queue.c | 15 +++++++++------ platform/linux-generic/odp_queue_scalable.c | 18 ++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 3f355e695..ca8ce16b3 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -145,12 +145,14 @@ static int queue_capability(odp_queue_capability_t *capa) memset(capa, 0, sizeof(odp_queue_capability_t)); /* Reserve some queues for internal use */ - capa->max_queues = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; - capa->max_ordered_locks = sched_fn->max_ordered_locks(); - capa->max_sched_groups = sched_fn->num_grps(); - capa->sched_prios = odp_schedule_num_prio(); - capa->plain.max_num = capa->max_queues; - capa->sched.max_num = capa->max_queues; + capa->max_queues = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; + capa->max_ordered_locks = sched_fn->max_ordered_locks(); + capa->max_sched_groups = sched_fn->num_grps(); + capa->sched_prios = odp_schedule_num_prio(); + capa->plain.max_num = capa->max_queues; + capa->plain.blocking_level = ODP_BLOCKING; + capa->sched.max_num = capa->max_queues; + capa->sched.blocking_level = ODP_BLOCKING; return 0; } @@ -601,6 +603,7 @@ static void queue_param_init(odp_queue_param_t *params) params->type = ODP_QUEUE_TYPE_PLAIN; params->enq_mode = ODP_QUEUE_OP_MT; params->deq_mode = ODP_QUEUE_OP_MT; + params->blocking_level = ODP_BLOCKING; params->sched.prio = ODP_SCHED_PRIO_DEFAULT; params->sched.sync = ODP_SCHED_SYNC_PARALLEL; params->sched.group = ODP_SCHED_GROUP_ALL; diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c index 07201ce7b..87165195b 100644 --- a/platform/linux-generic/odp_queue_scalable.c +++ b/platform/linux-generic/odp_queue_scalable.c @@ -309,14 +309,16 @@ static int queue_capability(odp_queue_capability_t *capa) memset(capa, 0, sizeof(odp_queue_capability_t)); /* Reserve some queues for internal use */ - capa->max_queues = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; - capa->max_ordered_locks = sched_fn->max_ordered_locks(); - capa->max_sched_groups = sched_fn->num_grps(); - capa->sched_prios = odp_schedule_num_prio(); - capa->plain.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; - capa->plain.max_size = 0; - capa->sched.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; - capa->sched.max_size = 0; + capa->max_queues = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; + capa->max_ordered_locks = sched_fn->max_ordered_locks(); + capa->max_sched_groups = sched_fn->num_grps(); + capa->sched_prios = odp_schedule_num_prio(); + capa->plain.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; + capa->plain.max_size = 0; + capa->plain.blocking_level = ODP_BLOCKING; + capa->sched.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; + capa->sched.max_size = 0; + capa->sched.blocking_level = ODP_BLOCKING; return 0; } From patchwork Tue Nov 21 14: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: 119367 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5312364qgn; Tue, 21 Nov 2017 06:08:11 -0800 (PST) X-Google-Smtp-Source: AGs4zMZtreu/SLSMgjINqUAm006AtKaiPPk+EBAZ7cU9vo0ePkqXK9tiSylQpWcodSnSsqLu6lb1 X-Received: by 10.200.37.3 with SMTP id 3mr24386508qtm.21.1511273291702; Tue, 21 Nov 2017 06:08:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511273291; cv=none; d=google.com; s=arc-20160816; b=X0C3Rmg3+vVxFwwQ0yZvaPVEXXkQh6YiSq3sslwfSvEp+Za/UgQdcNlEFjWQqki5Ky hOI1E+l0wenIg4VM6gCzdN/dOsWh6EcreAe+CsKRT2qxYtA9WBxJclhqyJPKag9iOKvW DRZjSaU3gRjqt1w4WgsN/WZCQa1/gBrkRPYl8Pu8zxqpshJSr+nwcDCQ1ssuYKWuw59a jLvvFqcYaB7kbSC9IxS2q4V28glJxuaEG+liARnpr9tDXkHe3o0cpxqwrRk34xvrMt33 eQK74mAKjVXpogBPUh07YaVYcCWwvqv1rvVN712eVATyzJ2dojeywuSW5v5a/25+y7R6 eElg== 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=ioYRShx1MRkUs6bXHjIuCVDDrjQ3VPNoCpuPBl/gWbU=; b=xALOi8XdJsuDiu09mMyNNacJEstPEfogzA/l5vJDWl0f41baJnoC+6CNKf6ygr/5cq bAX417ooFuHuawvMk/EyIC5GeHHKD7lorMq4YC1Sa74D+yRjuQVI5b09W9lryKzG8PzQ 1G+Wuf8FnAsY1wTu8NmGYtsOlhH/ron2fwH3HBPV7xONSFy4XY1c9JanMq2cR8uRKSsg D+vJRaxejobMKsx2r+E3CL0CZvkRTnRRfwPyz2MzALxcRUimJ5rUweUbkVpk5nS2iFW9 r33CldulxcHp+WmuxxnifWVk/+Hdhzp0MQRYy2oE/DPOs/IkerpxEzUfvPKPkkWockBZ o3zQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id d31si6094298qte.345.2017.11.21.06.08.11; Tue, 21 Nov 2017 06:08:11 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 46E1A60907; Tue, 21 Nov 2017 14:08:11 +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 6D0FE60949; Tue, 21 Nov 2017 14:02: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 D60346087F; Tue, 21 Nov 2017 14:01:12 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 1FF41605D7 for ; Tue, 21 Nov 2017 14:00:15 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 9516D134449C for ; Tue, 21 Nov 2017 17:00:13 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 3NiRgYwmb5-0DJCKYjT; Tue, 21 Nov 2017 17:00:13 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 9eiNlUBoJ2-0DvCWQc4; Tue, 21 Nov 2017 17:00:13 +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: Tue, 21 Nov 2017 17:00:11 +0300 Message-Id: <1511272811-6276-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511272811-6276-1-git-send-email-odpbot@yandex.ru> References: <1511272811-6276-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 302 Subject: [lng-odp] [PATCH API-NEXT v1 3/3] validation: queue: refer to blocking level 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: Petri Savolainen Refer to the new blocking level capability and parameter fields to check that those exist. Signed-off-by: Petri Savolainen --- /** Email created from pull request 302 (psavol:next-lockfree-queue) ** https://github.com/Linaro/odp/pull/302 ** Patch: https://github.com/Linaro/odp/pull/302.patch ** Base sha: d4b364849c4abb4c71e0c5260e1a793ebb8dc97d ** Merge commit sha: fc00736d09bd0388db2bde3a9177edfd995eec67 **/ test/validation/api/queue/queue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/validation/api/queue/queue.c b/test/validation/api/queue/queue.c index 1ec05b1fc..6b4877d9a 100644 --- a/test/validation/api/queue/queue.c +++ b/test/validation/api/queue/queue.c @@ -69,6 +69,8 @@ void queue_test_capa(void) CU_ASSERT(capa.sched_prios != 0); CU_ASSERT(capa.plain.max_num != 0); CU_ASSERT(capa.sched.max_num != 0); + CU_ASSERT(capa.plain.blocking_level >= ODP_BLOCKING); + CU_ASSERT(capa.sched.blocking_level >= ODP_BLOCKING); min = capa.plain.max_num; if (min > capa.sched.max_num) @@ -82,6 +84,7 @@ void queue_test_capa(void) name[ODP_QUEUE_NAME_LEN - 1] = 0; odp_queue_param_init(&qparams); + CU_ASSERT(qparams.blocking_level == ODP_BLOCKING); for (j = 0; j < 2; j++) { if (j == 0) {