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;