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; }