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; From patchwork Wed Aug 1 05: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: 143232 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp400494ljj; Tue, 31 Jul 2018 22:00:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe9uVFFRtaya5Yz8wGigeLk+tNweLYfIgDziwqL40xrOUzqfAZ5m8Ocv7aagIZcDurHLbaN X-Received: by 2002:ac8:4402:: with SMTP id j2-v6mr23923314qtn.233.1533099645663; Tue, 31 Jul 2018 22:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533099645; cv=none; d=google.com; s=arc-20160816; b=vvH3BRzLB/fd5IpsKYYHIsw9LEMWId51cMMuGGn5Au/9vBYnO3phG+Wo1jin/jQBwf PSj6/MDVLUXC+Wf1/TygZwiGYq6YylGzL5RgPf46aZJvs6VXNdttsEbFImY+l0TeQ9Gq Z1iiAJb7UU7GcZlhL6PrGe4nsGfvpov9+eB3vcNaSLRFM+kIF2VTw3wZqC5zMF6E56wG 8SCEY9UOLqbaDGIyH/7/o8oJz7e2jCyLINB/008sZW9AE4HA1eDTxSIgE135GfNOoFm3 n+GEK7CmJ/Tm/02zu+Q0TBf+WM52CT943pDHgUqCE91TD/6+YSA4enDAsk+5fqHD4z2k HzWw== 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=VLlCEmoI4Jp7uU3/aRKIIeD9SMunTHz2FAVm5AvVYAw=; b=PfB/n5GnGvd+mS8+QO1DolakIRy0qyKUjrBqVaD0/rvOLk99x+EL2Tx1qOP71ncCk1 u0pV4kWTSoEqKhYA1uudvTs3KZNnFZj0VG8w3JxIx0GGJjNzVoHdLahbH9reLsTq1kbW YKtug+qsVGdhd4+33olPRHT7n/1cJQwBFEin5eCzGd2B+nVP7Uxzl24esklN/n5x8H6s FflMLPiy09QOPzPBnL+x7fB4ddV9yibIzVVpva2XGE33vraLcZPb+9IvYs05zdpK3mvl jbBDg/xX6e49b1tVjO0KDW2ybusiYt6MLne9+VgAy/OCIqtDFhSu89BqlAEHPrHzbfSB CCHQ== 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 r18-v6si10311654qtc.108.2018.07.31.22.00.45; Tue, 31 Jul 2018 22:00:45 -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 5D11C685F8; Wed, 1 Aug 2018 05:00:45 +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 099B7685F6; Wed, 1 Aug 2018 05:00:19 +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 8F88D685ED; Wed, 1 Aug 2018 05:00:15 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTP id BEA36685ED for ; Wed, 1 Aug 2018 05:00:10 +0000 (UTC) Received: from mxback5j.mail.yandex.net (mxback5j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10e]) by forward101p.mail.yandex.net (Yandex) with ESMTP id DCE914E843B4 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 mxback5j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KWywDgTxJD-09mKSQrV; Wed, 01 Aug 2018 08:00:09 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0qmTDpIZWm-09xSKVo1; Wed, 01 Aug 2018 08: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: Wed, 1 Aug 2018 05:00:06 +0000 Message-Id: <1533099606-17502-3-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 2/2] linux-gen: pktio: implement per queue pktin 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 Enables advanced usecases where heterogeneous settings are needed on input queues of the same interface. 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 **/ platform/linux-generic/odp_packet_io.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 7759f83e4..094e34f2b 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -1470,11 +1470,20 @@ int odp_pktin_queue_config(odp_pktio_t pktio, snprintf(name, sizeof(name), "odp-pktin-%i-%i", pktio_id, i); - if (param->classifier_enable) + if (param->classifier_enable) { odp_queue_param_init(&queue_param); - else - memcpy(&queue_param, ¶m->queue_param, - sizeof(odp_queue_param_t)); + } else { + const odp_queue_param_t *qparam; + + if (param->queue_param_mode == + ODP_PKTIN_QUEUE_PARAM_MODE_BASIC) + qparam = ¶m->queue_param; + else + qparam = param->queue_params + i; + + odp_memcpy(&queue_param, qparam, + sizeof(odp_queue_param_t)); + } queue_param.type = ODP_QUEUE_TYPE_PLAIN;