From patchwork Thu Nov 30 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: 120132 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp513474qgn; Thu, 30 Nov 2017 03:02:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ5m8g2O8iVKWmxvOX74nrJv2D2kHXtn8oNqmKHkbcmkNCOavmTg50Hqk5j6mCCBzGPIbvS X-Received: by 10.200.1.20 with SMTP id e20mr2572014qtg.97.1512039721463; Thu, 30 Nov 2017 03:02:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512039721; cv=none; d=google.com; s=arc-20160816; b=ugsWengMx+k1GwBgbWtWZBlv3MhHXCRCyXtNOKeT2wZrztYiULeIHoGrzAzUgFcLKO KMbdZ+D3rD2Fht+9i4UlAh5BpZ1bhzz7zpeXeLuEaOONbxu8eWGyVHqwjLPaitQfugZt bZPKI3FboaGA1ai/rRTmt++hb+bvZDtU3tCBjQT8jbxUfFyL/E6p4c2bKmoyE/58URzz NR3xXTA5I4v4sZt1TLSNnKXpXUrVWOTmUDnEuJq8r/qR7rWerjTIFfUdtqC0ojV8EMDV mrWXfHGPaxT7Jk4Nhyq2Ru4iYApXScGz0WTvl8K/PrTcN21xZVwpb2z6koxC7vDqqJno 2PFg== 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=WUtDlQ1L2YlkPt+K07EGhjRFvOVH6hNpyWmpOd9Y1Ng=; b=ONu/GD3ep/jwdNVIPWNBghxSX0O552/wgXD9mWKYYX58tR2uf4V3pTWP/2yMhpffoN REQ5cWIRixwIdKszu9YuJf2QxNu70N7V6ISpj9hSCt2PylnEnGg4MlRmB8irkdCdrK4Z Zr6XrMDZG57L+CJ85SLV0fgTKrBPc9INEYXhqOa99CU/pFwR03rOwb1Wslea5qupJV4o 3eXbsvpVlRFgSSGjXh+/uWJnD4E72gWpC3JEBd/mEIBiBHGT9fEjewNIad3iCuhk3sqw ZaO7dZS5SWxZkIBK670dJfEBwZbsfls0DUWxMpvRaWB1ETxHPrSEiW2E9AeZmHuinULS Q5GA== 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 r7si3036853qtd.259.2017.11.30.03.02.01; Thu, 30 Nov 2017 03:02:01 -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 16DB960676; Thu, 30 Nov 2017 11:02:01 +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 EE49460927; Thu, 30 Nov 2017 11:00:36 +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 EBD3E6092C; Thu, 30 Nov 2017 11:00:25 +0000 (UTC) Received: from forward105j.mail.yandex.net (forward105j.mail.yandex.net [5.45.198.248]) by lists.linaro.org (Postfix) with ESMTPS id 3B1A060905 for ; Thu, 30 Nov 2017 11:00:17 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward105j.mail.yandex.net (Yandex) with ESMTP id DFA6718643F for ; Thu, 30 Nov 2017 14:00:15 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id LiXjK55aaN-0FYaDA9S; Thu, 30 Nov 2017 14:00:15 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id TjYY9mZD4X-0E2q7iuX; Thu, 30 Nov 2017 14:00:14 +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: Thu, 30 Nov 2017 14:00:11 +0300 Message-Id: <1512039613-7090-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512039613-7090-1-git-send-email-odpbot@yandex.ru> References: <1512039613-7090-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 302 Subject: [lng-odp] [PATCH API-NEXT v2 1/3] api: queue: non-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: 4cb02e1caccb9179575e95448fd46979e17d0905 ** Merge commit sha: 2fb581ec76ff776f788da097894cb3f6b63ae23d **/ include/odp/api/spec/queue.h | 63 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 73598be06..8069cf08d 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -96,6 +96,54 @@ typedef enum odp_queue_op_mode_t { } odp_queue_op_mode_t; +/** + * Non-blocking level + * + * A non-blocking level defines implementation guarantees for application + * progress when multiple threads operate on the same resource (e.g. a queue) + * simultaneously. The first level (ODP_BLOCKING) does not have any block + * freedom guarantees, but a suspending thread may block the other threads for + * the entire time it remains suspended (infinitely if crashed). + * On the contrary, actual non-blocking levels provide guarantees of progress: + * + * ODP_NONBLOCKING_LF: A non-blocking and lock-free implementation guarantees + * that at least one of the threads successfully completes + * its operations, regardless of what other threads do. + * Application progress is guaranteed, but individual + * threads may starve while trying to execute their + * operations on the shared resource. + * + * ODP_NONBLOCKING_WF: A non-blocking and wait-free implementation guarantees + * application progress with starvation freedom. All + * threads are guaranteed to complete their operations in + * a bounded number of steps, regardless of what other + * threads do. + * + * Non-blocking levels are listed from the weakest to the strongest guarantee of + * block freedom. Performance of a non-blocking implementation may be lower than + * the blocking one. Non-blocking guarantees are important e.g. for real-time + * applications when real-time and non real-time threads share a resource. + */ +typedef enum odp_nonblocking_t { + /** Blocking implementation. A suspeding thread may block all other + * threads, i.e. no block freedom guarantees. This is the lowest level. + */ + ODP_BLOCKING = 0, + + /** Non-blocking and lock-free implementation. Other threads can make + * progress while a thread is suspended. Starvation freedom is not + * guaranteed. + */ + ODP_NONBLOCKING_LF, + + /** Non-blocking and wait-free implementation. Other threads can make + * progress while a thread is suspended. Starvation freedom is + * guaranteed. + */ + ODP_NONBLOCKING_WF + +} odp_nonblocking_t; + /** * Queue capabilities */ @@ -125,6 +173,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_nonblocking_t nonblocking; + } plain; /** Scheduled queue capabilities */ @@ -138,6 +190,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_nonblocking_t nonblocking; + } sched; } odp_queue_capability_t; @@ -178,6 +234,13 @@ typedef struct odp_queue_param_t { * ODP_QUEUE_TYPE_SCHED. */ odp_schedule_param_t sched; + /** Non-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_nonblocking_t nonblocking; + /** Queue context pointer * * User defined context pointer associated with the queue. The same From patchwork Thu Nov 30 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: 120131 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp512505qgn; Thu, 30 Nov 2017 03:01:15 -0800 (PST) X-Google-Smtp-Source: AGs4zMYLbrh7vl80XlmzvxmOcVhdvy0Yfu4658Np+DDDBbv7cLBPE9llNy/kut/qvb29Ghnmi0rs X-Received: by 10.55.18.134 with SMTP id 6mr2102376qks.136.1512039675025; Thu, 30 Nov 2017 03:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512039675; cv=none; d=google.com; s=arc-20160816; b=MgKmvdbYUCcEom806luamQ11LDg6KJ2XdTDGrREeie/vQtGULoAKR5IQoD6Aw3xDo8 rtWeDRw1KjS1nbphA086CcNqGlui6Jn5PxnQh6IsNsUWAtTy7r/39FysvTNwj/GcsEhq 7tU9HIB3dneULFZ02uWMSJhu+Sxd16uxVdSafq0mon9R9TOdJ9v9TegM9dX/vL2O+rJB iKnj5Thu6K5eDx5qBx/dPidbP2Oj4k1dYs1HHP9Lrc9ehk2sEUImCy27xEG9lT4AEsS6 +saDVFtO7bwztb1dwHyvJdTCkcSVmQN1ATAD5yjaizWXZeV1Jv3s/8ndTWVR/lZXONk9 GwMw== 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=j9NkLru5uS3Awa12cN6mM2U1Fh7Qgsxacy2P27H7kkM=; b=LIxMPWAkrJY/Xu9OwHkNA1ZOqYYlX5QW1sWsCGwI9db0pqBuNFd/nZZvxHGIN46zTI gr72L6f+DarC1xVCIzC5hbp5BIeWpghsHvxpH9QTNzzCfpjgE+NSYs2wnCrpx9Qd/+uN xtHiqcB7TdwaGdiaFw5IcdvnXpbS13oe2LTvCAmGaT1LwN6wl4EZqH64TlrAtsBZYeWi 3m4mtoSw5ToxPokbPToOFKousR4JpcDf5S+B19LCkbIrz5z3lFdCA0w72wPGvSIV+t8o 9fBwYl+jNec0kOnUaSE8A0auhbqQQE8TFCeN+26SNyEpQfU5tjaqYv2Zkga3TcHj5QS8 fOeg== 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 y9si141729qtf.388.2017.11.30.03.01.14; Thu, 30 Nov 2017 03:01:15 -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 F2D706074A; Thu, 30 Nov 2017 11:01: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=-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 8A74960667; Thu, 30 Nov 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 2CB62607FB; Thu, 30 Nov 2017 11:00:22 +0000 (UTC) Received: from forward102o.mail.yandex.net (forward102o.mail.yandex.net [37.140.190.182]) by lists.linaro.org (Postfix) with ESMTPS id CD4AB60927 for ; Thu, 30 Nov 2017 11:00:18 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward102o.mail.yandex.net (Yandex) with ESMTP id E2C745A03CA4 for ; Thu, 30 Nov 2017 14:00:16 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id lynxsvySbc-0GGGYijE; Thu, 30 Nov 2017 14:00:16 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id TjYY9mZD4X-0F24cQbT; Thu, 30 Nov 2017 14:00:15 +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: Thu, 30 Nov 2017 14:00:12 +0300 Message-Id: <1512039613-7090-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512039613-7090-1-git-send-email-odpbot@yandex.ru> References: <1512039613-7090-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 302 Subject: [lng-odp] [PATCH API-NEXT v2 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: 4cb02e1caccb9179575e95448fd46979e17d0905 ** Merge commit sha: 2fb581ec76ff776f788da097894cb3f6b63ae23d **/ platform/linux-generic/odp_queue.c | 3 +++ platform/linux-generic/odp_queue_scalable.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 3f355e695..58103930c 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -150,7 +150,9 @@ static int queue_capability(odp_queue_capability_t *capa) capa->max_sched_groups = sched_fn->num_grps(); capa->sched_prios = odp_schedule_num_prio(); capa->plain.max_num = capa->max_queues; + capa->plain.nonblocking = ODP_BLOCKING; capa->sched.max_num = capa->max_queues; + capa->sched.nonblocking = 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->nonblocking = 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..88a5a8c27 100644 --- a/platform/linux-generic/odp_queue_scalable.c +++ b/platform/linux-generic/odp_queue_scalable.c @@ -315,8 +315,10 @@ static int queue_capability(odp_queue_capability_t *capa) capa->sched_prios = odp_schedule_num_prio(); capa->plain.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; capa->plain.max_size = 0; + capa->plain.nonblocking = ODP_BLOCKING; capa->sched.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; capa->sched.max_size = 0; + capa->sched.nonblocking = ODP_BLOCKING; return 0; } @@ -861,6 +863,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->nonblocking = ODP_BLOCKING; params->sched.prio = ODP_SCHED_PRIO_DEFAULT; params->sched.sync = ODP_SCHED_SYNC_PARALLEL; params->sched.group = ODP_SCHED_GROUP_ALL; From patchwork Thu Nov 30 11: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: 120133 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp514879qgn; Thu, 30 Nov 2017 03:03:08 -0800 (PST) X-Google-Smtp-Source: AGs4zMaqr3yC/n/V0iI+Fo+ZpT8fR/tRmKUXZ1Y+8SKPo/w7u/XWKJRLD/wHC1dwpR/uvCRZ8yqG X-Received: by 10.55.129.134 with SMTP id c128mr1935683qkd.162.1512039788335; Thu, 30 Nov 2017 03:03:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512039788; cv=none; d=google.com; s=arc-20160816; b=0MpTK4StDcErpxMz2NvTVBzzWiYbapaHQG1MJqt+/U8mPoqfqvYK2Mb8M8LrGmbJyc 00riN5163gWBdxAWqaFTOxCVbeE9WKx0iFNlrC04AKgbfsKinFIU02NL7/h88PbNeUDM wismbIu9nvkP9WiRoVtQugPTIOaMnMdmSdJVl9BXGgwu4SrSLWf+qwW2dQiAfj3GVWa8 u9ww70dkth7fSIJlkVm5ROzPqWwZ5dkGzEcQyyDj1L8BPE4B4q9WASfpS7myXQmYjeb6 /pWqn2L+/yIyUW9+XM0a2Qr/YwcGugEwHg+J7KgyTJE1nJAx2WjYKNWLeuy0Ptt0BK6C FDLg== 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=51wolfc/jHjozWnU9IL/KfhNe3TOLL2l7Wx5toeg8gk=; b=q9kT3Qfg0rCxcQt+Q5RbNzmvqvQnoe3F7xWHwbQgg4iJ8rpQKZUqiszm2qqWMFYjix EzaAAKytsPVOFJG3sG+pdefqxIBKopckd5N1D+bWDE2mrBMumV6ALnsTcQYKM56Sr1Kx Z7GKOMBmxGn0Frcn0XWvADjbLnFV1+lb8S4aozsmMzW6axAYsHH74mBRjJKhii4wKS3r CqKdzRSrkY3NENkPkU74Ff3S9dWYcFm4nobCqqwujCvgZW0fYClRCvjw4thFgUeVU1sK DD52VtR9yGDkK+JSvCN+1tR0rj7r3ZB3dkZhxFgWfUhIYEOY+fkikR2sC/DtdLZBWUoY pimg== 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 p187si4003070qkc.386.2017.11.30.03.03.07; Thu, 30 Nov 2017 03:03:08 -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 C9B8460943; Thu, 30 Nov 2017 11:03:07 +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 61AF26074A; Thu, 30 Nov 2017 11:01:16 +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 EFE1960958; Thu, 30 Nov 2017 11:01:06 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id 3312560905 for ; Thu, 30 Nov 2017 11:00:27 +0000 (UTC) Received: from mxback6g.mail.yandex.net (mxback6g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:167]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 99743218595F for ; Thu, 30 Nov 2017 14:00:17 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback6g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 2KDjamFMhG-0H1q2ml7; Thu, 30 Nov 2017 14:00:17 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id TjYY9mZD4X-0G2qbE14; Thu, 30 Nov 2017 14:00:16 +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: Thu, 30 Nov 2017 14:00:13 +0300 Message-Id: <1512039613-7090-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512039613-7090-1-git-send-email-odpbot@yandex.ru> References: <1512039613-7090-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 302 Subject: [lng-odp] [PATCH API-NEXT v2 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: 4cb02e1caccb9179575e95448fd46979e17d0905 ** Merge commit sha: 2fb581ec76ff776f788da097894cb3f6b63ae23d **/ 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..3c6db33ab 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.nonblocking >= ODP_BLOCKING); + CU_ASSERT(capa.sched.nonblocking >= 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.nonblocking == ODP_BLOCKING); for (j = 0; j < 2; j++) { if (j == 0) {