From patchwork Fri Apr 7 04:07:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 97009 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp111663qgd; Thu, 6 Apr 2017 21:07:37 -0700 (PDT) X-Received: by 10.200.57.71 with SMTP id t7mr36538233qtb.99.1491538057133; Thu, 06 Apr 2017 21:07:37 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r48si3568786qte.38.2017.04.06.21.07.36; Thu, 06 Apr 2017 21:07:37 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4E53E62DA5; Fri, 7 Apr 2017 04:07:36 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 B3B6162D79; Fri, 7 Apr 2017 04:07:32 +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 0C18E62D85; Fri, 7 Apr 2017 04:07:30 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by lists.linaro.org (Postfix) with ESMTPS id 4C3F662D68 for ; Fri, 7 Apr 2017 04:07:28 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id b187so73886517oif.0 for ; Thu, 06 Apr 2017 21:07:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NbWNbWADQ6bv892do4G3yuyHPm1Zkrb+omjTGrmIu0U=; b=EzYBrc5fJBASv/0xL0SpktfHl209QTTsA5wPrjoXpsGHzbmu8bUE3S+8x6EAk+M8Me kZj2NdsjMAo7my0MouJKSGUuA8HEXrRtat+6LcPcUTs0G/ntGq3NxWRVprguL8sCLmeO 2LaTU45tGXq2MuEC94S0TIlt0xzgNHOyQDIB2niu8NoogS7Xt6NZpdPi7NtEu4Mr38to 4vvHfCEeXudltUAqQBd8tAux8YoDBVNpZxqYRpv2cAfBMqkYe6fJngKvAj7T3xFSv+xs GLJ3WXtIt0gi/kKBb6CXq2Wm5d+GWWAQnFYNpdukiSCcAjI2tFR5mRsI/CQ7wJlPei4T cuog== X-Gm-Message-State: AFeK/H0NWcS0lfw6pr1wf3Te82QRRRsDrRmijTI+mYgTIRKQ9V5giG4HPq4FTrhDKyF7TssDFdk= X-Received: by 10.202.6.129 with SMTP id 123mr18344297oig.198.1491538047708; Thu, 06 Apr 2017 21:07:27 -0700 (PDT) Received: from localhost.localdomain (cpe-70-113-26-109.austin.res.rr.com. [70.113.26.109]) by smtp.gmail.com with ESMTPSA id v49sm1638587otb.13.2017.04.06.21.07.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Apr 2017 21:07:27 -0700 (PDT) From: Honnappa Nagarahalli To: lng-odp@lists.linaro.org Date: Thu, 6 Apr 2017 23:07:03 -0500 Message-Id: <1491538024-112904-1-git-send-email-honnappa.nagarahalli@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [lng-odp] [PATCH 1/2] add queue size param and related capability 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" Added size parameter indicating the maximum number of events in the queue and the corresponding queue capability changes. Signed-off-by: Honnappa Nagarahalli --- include/odp/api/spec/queue.h | 12 ++++++++++++ platform/linux-generic/odp_queue.c | 1 + 2 files changed, 13 insertions(+) -- 2.7.4 diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 7972fea..ccb6fb8 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -112,6 +112,12 @@ typedef struct odp_queue_capability_t { /** Number of scheduling priorities */ unsigned sched_prios; + /** Maximum number of events in the queue. + * + * Value of zero indicates the size is limited only by the available + * memory in the system. */ + unsigned max_size; + } odp_queue_capability_t; /** @@ -124,6 +130,12 @@ typedef struct odp_queue_param_t { * the queue type. */ odp_queue_type_t type; + /** Queue size + * + * Maximum number of events in the queue. Value of 0 chooses the + * default configuration of the implementation. */ + uint32_t size; + /** Enqueue mode * * Default value for both queue types is ODP_QUEUE_OP_MT. Application diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index fcf4bf5..5a50a57 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -175,6 +175,7 @@ int odp_queue_capability(odp_queue_capability_t *capa) 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->max_size = 0; return 0; } From patchwork Fri Apr 7 04:07:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 97010 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp111770qgd; Thu, 6 Apr 2017 21:08:04 -0700 (PDT) X-Received: by 10.55.24.219 with SMTP id 88mr16064457qky.249.1491538084246; Thu, 06 Apr 2017 21:08:04 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p13si3567894qtg.6.2017.04.06.21.08.04; Thu, 06 Apr 2017 21:08:04 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E5DD162D79; Fri, 7 Apr 2017 04:08:03 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 40BDB62D85; Fri, 7 Apr 2017 04:08:00 +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 687E162D68; Fri, 7 Apr 2017 04:07:58 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by lists.linaro.org (Postfix) with ESMTPS id CB16D62D68 for ; Fri, 7 Apr 2017 04:07:36 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id r203so73674385oib.3 for ; Thu, 06 Apr 2017 21:07:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oS+CsSkBJ4y45GnKf8OZV0D3IEb7COq3j8HH7AbqS0M=; b=o54Wn/cTzGs5O55CtWiWubIAVdw1Xa10tFOJJlyKY0SmYCOxBdwljpwDqFLy2vMjWF 85sHcog5fvsjFp9wOUecvgLMcTTnvPztFWtkG7HUoAQCuPE81ksaivWDvFOtZtajPYNv xHtcHPKNXGAyMYh4DI4Tdsa9reJEvSomJaLtrdi6vqK3vdNKIZBlB10wEJ3cVjvWn757 aXvnKsGHUOrItXBc+nAoZg9bywqVIuKChagp2lVd3GZojgdykh63JYy9+GjxvxljYMRh 73uGhTYykP7ei8Bx6sm6M/twvAp8/qQUVVgBe6n4TGmuPmJzh9JbbYxtF9/PSWUegNep muRw== X-Gm-Message-State: AFeK/H1/f22iRrpnRNwIBa6ko8orlMouKJww79+vvgaCwyRz6dDZiiAIPSkW3yR6K8q2m7lpgRWe76z6 X-Received: by 10.157.84.42 with SMTP id j42mr22808427oth.80.1491538056059; Thu, 06 Apr 2017 21:07:36 -0700 (PDT) Received: from localhost.localdomain (cpe-70-113-26-109.austin.res.rr.com. [70.113.26.109]) by smtp.gmail.com with ESMTPSA id v49sm1638587otb.13.2017.04.06.21.07.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Apr 2017 21:07:35 -0700 (PDT) From: Honnappa Nagarahalli To: lng-odp@lists.linaro.org Date: Thu, 6 Apr 2017 23:07:04 -0500 Message-Id: <1491538024-112904-2-git-send-email-honnappa.nagarahalli@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491538024-112904-1-git-send-email-honnappa.nagarahalli@linaro.org> References: <1491538024-112904-1-git-send-email-honnappa.nagarahalli@linaro.org> Subject: [lng-odp] [PATCH 2/2] add queue size config to cuckoo table 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" Some queue implementations in ODP take queue size input. Cuckoo table is modified to provide the queue size input while creating the queue. Signed-off-by: Honnappa Nagarahalli --- helper/cuckootable.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 Reviewed-by: Bill Fischofer diff --git a/helper/cuckootable.c b/helper/cuckootable.c index 80ff498..0d46300 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.size = capacity; snprintf(queue_name, sizeof(queue_name), "fs_%s", name); queue = odp_queue_create(queue_name, &qparam);