From patchwork Tue Apr 4 18:47:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Brooks X-Patchwork-Id: 96756 Delivered-To: patch@linaro.org Received: by 10.182.246.10 with SMTP id xs10csp361769obc; Tue, 4 Apr 2017 11:50:16 -0700 (PDT) X-Received: by 10.55.41.218 with SMTP id p87mr19311594qkp.110.1491331816086; Tue, 04 Apr 2017 11:50:16 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t21si15784600qta.36.2017.04.04.11.50.15; Tue, 04 Apr 2017 11:50:15 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B776963FE9; Tue, 4 Apr 2017 18:50:15 +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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 D552363FF7; Tue, 4 Apr 2017 18:48:44 +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 9109863FF0; Tue, 4 Apr 2017 18:48:32 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by lists.linaro.org (Postfix) with ESMTP id E5D8963FEA for ; Tue, 4 Apr 2017 18:48:29 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9E40015BF; Tue, 4 Apr 2017 11:48:29 -0700 (PDT) Received: from localhost.localdomain (unknown [10.119.48.139]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 631123F4FF; Tue, 4 Apr 2017 11:48:29 -0700 (PDT) From: Brian Brooks To: lng-odp@lists.linaro.org Date: Tue, 4 Apr 2017 13:47:56 -0500 Message-Id: <20170404184808.59470-5-brian.brooks@arm.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170404184808.59470-1-brian.brooks@arm.com> References: <20170404184808.59470-1-brian.brooks@arm.com> Cc: Ola Liljedahl Subject: [lng-odp] [API-NEXT PATCH v2 04/16] helper: cuckootable: Specify queue ring_size 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: Ola Liljedahl The cuckoo code may enqueue a million events onto a queue. When queues are implemented as bounded buffers, a default queue size can be used during queue create, otherwise this information needs to be passed down from the application. The reverse information flow, default queue size passed up to the application via capabilities, currently has no known use case. Signed-off-by: Ola Liljedahl Reviewed-by: Brian Brooks Reviewed-by: Honnappa Nagarahalli --- helper/cuckootable.c | 1 + 1 file changed, 1 insertion(+) -- 2.12.2 diff --git a/helper/cuckootable.c b/helper/cuckootable.c index 80ff4989..d3d1563c 100644 --- a/helper/cuckootable.c +++ b/helper/cuckootable.c @@ -256,6 +256,7 @@ odph_cuckoo_table_create( /* initialize free_slots queue */ odp_queue_param_init(&qparam); qparam.type = ODP_QUEUE_TYPE_PLAIN; + qparam.ring_size = capacity; snprintf(queue_name, sizeof(queue_name), "fs_%s", name); queue = odp_queue_create(queue_name, &qparam);