From patchwork Tue Aug 21 13:00:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 144715 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5243037ljj; Tue, 21 Aug 2018 06:00:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZn7hD12l/H0ObB+Q4XWtiMisXleAII9zKgkAOUcTFtCQimFK3LRYSWy5Krp0ldObDG/SRO X-Received: by 2002:ac8:302b:: with SMTP id f40-v6mr5287201qte.217.1534856436289; Tue, 21 Aug 2018 06:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534856436; cv=none; d=google.com; s=arc-20160816; b=Ye3PWmIrVdiLOroh6pNK6axQSAhLndfq9t1jovAgYRSVMiLB9Rf+MzAprTMeaeFiQK udTZ6xRo4IstR4iLYjDjUC7iZqZ88QfQnUnefqmGi14OOabdzb5ntPPDE56stb9hzfZs tbbJTjDLn9Ib//lpyvsZvt84b1jNftwi7s04/ebiTE8y4FjnVDECMlazlLpwHfrJ43+0 eCaARRe7ftWTcGXX1csdRiRNKDsNYshmT5KLVEvck7Al6bied/mmbF571Xy90mI7duDy /KeqSkYIXIXnvrpfNIRiLov08/L/HcfZejmC735epHKXngCdRmC8poOS3dlkD2mPG9Yl 6rfw== 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=ZYKtGg0uSftiOGYPPv69eVOxEQU7Y7xJm2PshwPdVyQ=; b=l92CNtXJotUKUCpmqxUNrMyqK4nItHeuB6RF/j7txDNxAalpREw9tAOyNiNfx3wECZ EfbxKXJJ9nckej6pt+N+ZT5wSxXDeueMRrL5Jw3/8j5iTEqjLRQ8oyuijaisY4IeUWU6 vsEkqL65sYAS3hcgvr0khw7jtqEDUKaji3gFcM/nV8EYKMJGtaX3Lw762ILS5cLJ7A95 NbBER9XP+Lf8o4gWZhh2AN8HiuYnk7BgJGjJDrdbmdOpULJioJvLTRHad25d7OYOLkml 5nCI9YPYM4h9UdveuucZzquWyaDkZkKxvyD6WAwuosc+qrNegaulzZ89yoJB0fE693ku 22NQ== 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 j3-v6si8906266qtc.98.2018.08.21.06.00.35; Tue, 21 Aug 2018 06:00:36 -0700 (PDT) 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 776FA607F1; Tue, 21 Aug 2018 13:00:35 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW 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 D22B760676; Tue, 21 Aug 2018 13:00:31 +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 04BEF60676; Tue, 21 Aug 2018 13:00:20 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id B7D6C60676 for ; Tue, 21 Aug 2018 13:00:17 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward103j.mail.yandex.net (Yandex) with ESMTP id 1DFCA34C3E39 for ; Tue, 21 Aug 2018 16:00:16 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id aTS8tCBthT-0Ah4eK5F; Tue, 21 Aug 2018 16:00:10 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Nq7oZkTddg-09k00jxv; Tue, 21 Aug 2018 16:00:09 +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 Aug 2018 13:00:06 +0000 Message-Id: <1534856407-17971-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534856407-17971-1-git-send-email-odpbot@yandex.ru> References: <1534856407-17971-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 676 Subject: [lng-odp] [PATCH v1 1/2] linux-gen: queue: fix ordered queue issue 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 Also plain queue enqueue needs to call scheduler ordered enqueue function, so that scheduler can check re-ordering needs. Signed-off-by: Petri Savolainen --- /** Email created from pull request 676 (psavol:master-queue-fix-ordered) ** https://github.com/Linaro/odp/pull/676 ** Patch: https://github.com/Linaro/odp/pull/676.patch ** Base sha: 912e026c108d7a496ac7467e953dea77dadaaa57 ** Merge commit sha: a997e012a8edc13ce577c8aa49683fc9d722c2ec **/ platform/linux-generic/odp_queue_basic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_queue_basic.c b/platform/linux-generic/odp_queue_basic.c index 22a76b935..e5d915643 100644 --- a/platform/linux-generic/odp_queue_basic.c +++ b/platform/linux-generic/odp_queue_basic.c @@ -489,13 +489,16 @@ static inline int _plain_queue_enq_multi(odp_queue_t handle, odp_buffer_hdr_t *buf_hdr[], int num) { queue_entry_t *queue; - int num_enq; + int ret, num_enq; ring_st_t *ring_st; uint32_t buf_idx[num]; queue = qentry_from_handle(handle); ring_st = &queue->s.ring_st; + if (sched_fn->ord_enq_multi(handle, (void **)buf_hdr, num, &ret)) + return ret; + buffer_index_from_buf(buf_idx, buf_hdr, num); LOCK(queue); From patchwork Tue Aug 21 13:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 144716 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5245042ljj; Tue, 21 Aug 2018 06:01:52 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyeQE5zOalP0v4z7S++MiiVBGqlwOcgvVxX1X47FlfnuMfyi4hui41e923ASWUUWIheCyu4 X-Received: by 2002:a0c:aa06:: with SMTP id d6-v6mr45266447qvb.26.1534856512310; Tue, 21 Aug 2018 06:01:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534856512; cv=none; d=google.com; s=arc-20160816; b=JbBx4R8GejqQqJ5kETZDh31/XYFcd7I22GCzkkldjbdglJz+0bo+dT4Br3MLSOsTpt ZoZM7GDT3c1Z6IzIxb69W8WrdHwx6h5FPQU/U6jb/lu+veES/ZIwLZsUx+YqmJTiv8pV 2AEfHop+IYiFrM48wyoGCGmQ3tNYXe+80ow2DSKWGuyBUuYtt1ZsIXiCvQSflU22BOx9 nSyC0JKEgmWwfsRD9rWUhouar8VYN2J0noTHjXzV3zzJhLyJmeiZqxXbyY7eSTtHI8eY dQb6c8ICrGGxWLVS07lWU0jKbkR6QqSrFrv+D8j7hrnogTyMRexzbPCT6M+sMHqkGyho 4BLw== 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=C5CrjdTHQfWL1yJLSZqe+QGKag4U2obDTGwTuVgRkFk=; b=f+rjk3dDmupbfHZmF/JhI+ijzu9y9RiPXIeuzlamVCgurOzbVneL0uoGlMtvZZKprx ff36LdQDCSHzA3YaPJzfyV49UYbJT7cOJoNRTWx774XeYgx16oD8c5+wOTwYTffh8b6Q KLbfr+o01Wig32t8Ddcb4rlvs2e0n49QvSP4RP1MoPB0fbcrJ0n2jH2PL80jd0TULUz5 a+MOH75hapN/bK6784gQuXTudub0vUTj5V0o1pD33fxb8AFCC8SodmFBtAgg+WmCZmXn /zc/dl3q1EuZyAwcF2PkxLMJvf4uayVF6MF9xT72yXWPP1IWDpaejl+wpi+QAT3FHUa4 528w== 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 r14-v6si3690137qtn.77.2018.08.21.06.01.52; Tue, 21 Aug 2018 06:01:52 -0700 (PDT) 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 F2D7B60851; Tue, 21 Aug 2018 13:01:51 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW 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 07CAD60676; Tue, 21 Aug 2018 13:00:42 +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 34556607C7; Tue, 21 Aug 2018 13:00:27 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id DBEAA60676 for ; Tue, 21 Aug 2018 13:00:20 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward100j.mail.yandex.net (Yandex) with ESMTP id E9C975D81FE6 for ; Tue, 21 Aug 2018 16:00:16 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id bgGpE92YYS-0Ge41r7c; Tue, 21 Aug 2018 16:00:16 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Nq7oZkTddg-0GkW31rv; Tue, 21 Aug 2018 16: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: Tue, 21 Aug 2018 13:00:07 +0000 Message-Id: <1534856407-17971-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534856407-17971-1-git-send-email-odpbot@yandex.ru> References: <1534856407-17971-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 676 Subject: [lng-odp] [PATCH v1 2/2] test: queue_perf: handle max queue size capability zero 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 Queue size capability value of zero means that there is not limit. Signed-off-by: Petri Savolainen --- /** Email created from pull request 676 (psavol:master-queue-fix-ordered) ** https://github.com/Linaro/odp/pull/676 ** Patch: https://github.com/Linaro/odp/pull/676.patch ** Base sha: 912e026c108d7a496ac7467e953dea77dadaaa57 ** Merge commit sha: a997e012a8edc13ce577c8aa49683fc9d722c2ec **/ test/performance/odp_queue_perf.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/test/performance/odp_queue_perf.c b/test/performance/odp_queue_perf.c index d5ff254db..1ca639ebc 100644 --- a/test/performance/odp_queue_perf.c +++ b/test/performance/odp_queue_perf.c @@ -110,6 +110,7 @@ static int test_queue(test_options_t *test_options) odp_pool_t pool; odp_event_t ev; uint32_t i, j, rounds; + uint32_t max_size; uint64_t c1, c2, diff, ops, nsec; odp_time_t t1, t2; uint64_t num_retry = 0; @@ -152,9 +153,9 @@ static int test_queue(test_options_t *test_options) return -1; } - if (num_event > queue_capa.plain.max_size) { - printf("Max queue size supported %u\n", - queue_capa.plain.max_size); + max_size = queue_capa.plain.max_size; + if (max_size && num_event > max_size) { + printf("Max queue size supported %u\n", max_size); return -1; } } else if (nonblock == ODP_NONBLOCKING_LF) { @@ -169,9 +170,10 @@ static int test_queue(test_options_t *test_options) return -1; } - if (num_event > queue_capa.plain.lockfree.max_size) { + max_size = queue_capa.plain.lockfree.max_size; + if (max_size && num_event > max_size) { printf("Max lockfree queue size supported %u\n", - queue_capa.plain.lockfree.max_size); + max_size); return -1; } } else if (nonblock == ODP_NONBLOCKING_WF) { @@ -186,9 +188,10 @@ static int test_queue(test_options_t *test_options) return -1; } - if (num_event > queue_capa.plain.waitfree.max_size) { + max_size = queue_capa.plain.waitfree.max_size; + if (max_size && num_event > max_size) { printf("Max waitfree queue size supported %u\n", - queue_capa.plain.waitfree.max_size); + max_size); return -1; } } else {