From patchwork Wed Aug 1 05:00:05 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: 143233 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp400925ljj; Tue, 31 Jul 2018 22:01:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfHzF1ez9r3bcqfgTgRMd5qk4ZXx6gp5MWltsDViM1KAGMKqBP/cEv3JBMSkmWyUf/PUURQ X-Received: by 2002:ac8:6055:: with SMTP id k21-v6mr24442315qtm.204.1533099670744; Tue, 31 Jul 2018 22:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533099670; cv=none; d=google.com; s=arc-20160816; b=xduLFEUeVaIzKnOUUA0PI90O+3lyBkTwwDI1/y99jDE1egtPKSko4Kn9fQJQLaXqRO YqythxQsZ6ZgfCmJrlwIBsD8UC/PZMa+tIhzQBVq8CSrM2IqfmyLCfH1flc2S5Pq8KQP IGcMHgJ76kk3Waeo0y2M8oaCEKi9WcWy9dKBZrmgM+ebYNJzjAh4e6w3r/+XB1AURmeX VxNHpczgu7WiSFe9RZ0o+mm6BFdSRM/DHTI1gtK4O7OdItrfuolaejrM+VltlHVWObhz TLwsWEs1UTjkUKZYK7Mjov6u7/PthJKU+Vuzw80HH3jAAKJ9RwIBgW04jzNiVtyYxq9S me3Q== 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=WkMuvCYzHd4mv4eA4oK5lM26aUpvYsuPb75jEiQO6ik=; b=n9QpDNnMBPOMAa2mM35UTeKN0h9PGLSayrZ61zkYleeBJR3gq+U6FLuNvuDnAbJr7n 8/iD+E2iVcjQFEzUgqfRxCmqO5c94EM329SRnaTSC1r4Ci/YQR0eDIzwnZzqtLLqbaEm 4sQyB/5Ur7nq1PYpNOmxBQf2QZeVvhNqgJaLUaA2UB/JnPYtLsVE1RPkmmrjbFjtcl4N fJawVGjhW9DpVDs/jjHW8Ftx1ASk87sIr5ej0gzAU+tlZBjAlni4wwm7JLwkfsxxclIl pE/WzK9g5nJg5VR49sjaimODVqzaT+w9RusAO4FxBsO/27PerQNnJUKGfce755WwECn1 GTpw== 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 i58-v6si15699107qvi.285.2018.07.31.22.01.10; Tue, 31 Jul 2018 22:01:10 -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 4F348685F9; Wed, 1 Aug 2018 05:01:10 +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 638AC685D8; Wed, 1 Aug 2018 05:00:23 +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 51CFD685F0; Wed, 1 Aug 2018 05:00:16 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 36B38685F0 for ; Wed, 1 Aug 2018 05:00:11 +0000 (UTC) Received: from mxback7j.mail.yandex.net (mxback7j.mail.yandex.net [IPv6:2a02:6b8:0:1619::110]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 288C94307315 for ; Wed, 1 Aug 2018 08:00:09 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback7j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id oK9WrcawOE-09q4xCw0; Wed, 01 Aug 2018 08:00:09 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0qmTDpIZWm-08xuTbsA; Wed, 01 Aug 2018 08:00:08 +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: Wed, 1 Aug 2018 05:00:05 +0000 Message-Id: <1533099606-17502-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533099606-17502-1-git-send-email-odpbot@yandex.ru> References: <1533099606-17502-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 660 Subject: [lng-odp] [PATCH API-NEXT v1 1/2] api: pktio: extend odp_pktin_queue_param_t to support per queue configuration 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: Bogdan Pricope Per queue configuration enables advanced usecases where input queues of the same interface may belong to different scheduler groups or have different multithread safe modes. Signed-off-by: Bogdan Pricope --- /** Email created from pull request 660 (bogdanPricope:api_next_pktin_queue_pr) ** https://github.com/Linaro/odp/pull/660 ** Patch: https://github.com/Linaro/odp/pull/660.patch ** Base sha: 9b2b5a9695ad66977c964c83691cd2fef4c45b85 ** Merge commit sha: da35db9bd3845097376d2b1ba5459bd8a88f0199 **/ include/odp/api/spec/packet_io.h | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index a55c2678f..324b18edb 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -148,6 +148,22 @@ typedef enum odp_pktio_op_mode_t { } odp_pktio_op_mode_t; +/** + * Packet input queue configuration mode + */ +typedef enum odp_pktin_queue_param_mode_t { + /** Single parameter set for all queues + * + * Pktin queues share the same configuration. */ + ODP_PKTIN_QUEUE_PARAM_MODE_BASIC = 0, + + /** Per queue parameter set + * + * Each pktin queue is configured with an idependent set + * of parameters. */ + ODP_PKTIN_QUEUE_PARAM_MODE_MULTI +} odp_pktin_queue_param_mode_t; + /** * Packet input queue parameters */ @@ -193,6 +209,12 @@ typedef struct odp_pktin_queue_param_t { * Queue type is defined by the input mode. The default value is 1. */ unsigned num_queues; + /** Queues configuration mode + * + * Input queues share the same configuration parameter set or + * use a parameter set per queue. */ + odp_pktin_queue_param_mode_t queue_param_mode; + /** Queue parameters * * These are used for input queue creation in ODP_PKTIN_MODE_QUEUE @@ -201,7 +223,22 @@ typedef struct odp_pktin_queue_param_t { * odp_queue_param_t documentation. * When classifier is enabled in odp_pktin_queue_config() this * value is ignored. */ - odp_queue_param_t queue_param; + union { + /** Single parameter set for all queues + * + * Coresponds to ODP_PKTIN_QUEUE_PARAM_MODE_BASIC + * queue_param_mode. + */ + odp_queue_param_t queue_param; + + /** Per queue parameter set + * + * Coresponds to ODP_PKTIN_QUEUE_PARAM_MODE_MULTI + * queue_param_mode. + * queue_params must point to an array with num_queues + * elements. */ + odp_queue_param_t *queue_params; + }; } odp_pktin_queue_param_t;