From patchwork Fri Aug 10 09:00:12 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: 143899 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3098031ljj; Fri, 10 Aug 2018 02:01:33 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzuaonEXrgPvIBse6+w9kcXa8qKYMz5sPmaQ3xU6NobOwE4eSHxLtV+JbXJRopQd7Fg6aoI X-Received: by 2002:a37:7445:: with SMTP id p66-v6mr4920909qkc.368.1533891693007; Fri, 10 Aug 2018 02:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533891693; cv=none; d=google.com; s=arc-20160816; b=DfhlVD25Flk6asctTubLcadH3rGsNIfJFj9THYrd9xXEeak1SDluO6QNPUOE+/Pz1n UE44u8XR38eeC2v+Si7J7Dj3oFevObEdeMc3uT+uOqTbZuD7rXmEkbwiIgbCH1ku0YHA ci0hiYH9QOF4jhBhjJirGeV4ylHggMWSNU550os23PvUFsksObBnI9xvQQ8YLDRdk43W NLokXgExbe4j3HLRDgo4bkT3BmadrTnd8WDruqpCmY2d51x2ooPCb2EF/qRsxQWvaXnb cGgOV8T/Fjn42oqmT60u2vyRlDA9IHvQAm1YeQUtduo8/kZwChmDENfJrNUJS1N74Pgb rtYA== 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=Y4tqsF+sZFxjgoKqiH6BlreoVuWi5B215Z6HMiKR9hs=; b=vcl2r7CgzcvhpnR++Hw+FB360Rabx9lLmEg4gaVmbIScaew2MBgWXQdFMwJEOjtZ4A 4tAy5oz4TE4ev9uj0z083xmafdwu6ROhUTn5M0fCXSKj2bTHl31HqC/RMTbgijLFlSwp SqPKm00PhrooRtld68LDnJwyKR+s2/oMoBx+7LKlDY4FwunaKjwQtznrBozF7TTNml3K xq/l2jxlhU6nVIHT9XduhfDtKRm0akmAYuCx3xn/jj9W3dgyYggvWFBANmduJtAe0SBY kP+XxbTd5+CYcq7qNdVgqc/DSWbgRvF02Q7YBVkX3POOtjVBkAx6vu7m/ko6PXWHNPPk MzyA== 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 i7-v6si1334448qkm.225.2018.08.10.02.01.32; Fri, 10 Aug 2018 02:01:32 -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 883366861C; Fri, 10 Aug 2018 09:01:32 +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 0482B685F1; Fri, 10 Aug 2018 09:00:35 +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 56B8D685CB; Fri, 10 Aug 2018 09:00:26 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 2D4D9685F1 for ; Fri, 10 Aug 2018 09:00:18 +0000 (UTC) Received: from mxback7o.mail.yandex.net (mxback7o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::21]) by forward103j.mail.yandex.net (Yandex) with ESMTP id 2767934C49F3 for ; Fri, 10 Aug 2018 12:00:16 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback7o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id VY1BHxCl3v-0Gq43og9; Fri, 10 Aug 2018 12:00:16 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id PXmhgUlAA5-0FHeSUi0; Fri, 10 Aug 2018 12:00:15 +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: Fri, 10 Aug 2018 09:00:12 +0000 Message-Id: <1533891612-393-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533891612-393-1-git-send-email-odpbot@yandex.ru> References: <1533891612-393-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 660 Subject: [lng-odp] [PATCH API-NEXT v2 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: b7a150ea4e9fe568e77d603f637ddb968838aec6 **/ platform/linux-generic/odp_packet_io.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 7759f83e4..cb8086afd 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -1466,15 +1466,23 @@ int odp_pktin_queue_config(odp_pktio_t pktio, odp_queue_param_t queue_param; char name[ODP_QUEUE_NAME_LEN]; int pktio_id = odp_pktio_index(pktio); + odp_pktin_queue_param_ovr_t *queue_param_ovr = NULL; + + if (param->queue_param_ovr) + queue_param_ovr = param->queue_param_ovr + i; 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 + } else { memcpy(&queue_param, ¶m->queue_param, sizeof(odp_queue_param_t)); + if (queue_param_ovr) + queue_param.sched.group = + queue_param_ovr->group; + } queue_param.type = ODP_QUEUE_TYPE_PLAIN;