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;