From patchwork Mon Jan 22 16:00:09 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: 125440 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1230251ljf; Mon, 22 Jan 2018 08:01:13 -0800 (PST) X-Google-Smtp-Source: AH8x22547B3XUo+4fFS588NlXqI8PRX5VjZgVXLFGMG+rjvuq6eaR0Lhp8v7CUuu8HZcuEKCxnxl X-Received: by 10.55.190.129 with SMTP id o123mr9787979qkf.283.1516636873813; Mon, 22 Jan 2018 08:01:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516636873; cv=none; d=google.com; s=arc-20160816; b=ml+BFhufUU1bB53AamnQJSUK5WKl05EGiILmhRFiPr8bfFsS05e9umiTGWEnueGCxt ZR22Go26LREAPu/KeSIf95s0Q9V6jFBEu4DRpYLF6gCOcgqakCKuRZt2dVbtf5Fk/bLU 2PCZNa/BmjhlXYDmumLpXcwVeL9k46bBsH8nkwdwNtxwdnIxAqlQg+d0EokDVr8cQgdx Lbc9E2Zw7nVnJXG1JmH9KWWXHTz+1VV/Ge7JM8/ngQ24tS0PUBaiYCmco/1GmnBT/P59 QrP1nrMeiyxFA0gLGNRAgFqeNySxMuLrBW3oW2Uq9w+Tb5mKVo1cwLjNe7mWNj2EkRHx OnZg== 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=hHJAl4Qy95rJ/w6hWYjdPTzWq0MkjqbJ7NOhGShaFfU=; b=siDk0ig2XzfwOpPjR0u4ACbwvrVcPYF8/2Gb7I92XCf+YwNfq5BfBrVbFLdksHtoj3 H+tU1b/UHhsiRFb0uIkFFpNO2He2YPESrJ81+pK5O494A31E43zvIJqCRiye/3fBEbVd vwfGXuC7YNuLutHMBeM3kBAxIEKiuFzLt+394/tDBhToyxHe0SokaUXepTa2HOZ6BckS 7SLC53It1TVk2gK72Co+/lZAhbwHz6GZTL8VzvASafB5FR/KCYMQUKPgE4tEmc4IOitb juVrTIpRX8dlKY3XGq67t1mSLdfYT+uGB1D/H41INhWJyJU55C2NZUQxVEk1GW8d5Qoe oAKA== 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 v54si5355027qtk.290.2018.01.22.08.01.13; Mon, 22 Jan 2018 08:01:13 -0800 (PST) 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 57A51617FD; Mon, 22 Jan 2018 16:01:13 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 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 B1789617E4; Mon, 22 Jan 2018 16:00:28 +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 7BE266171E; Mon, 22 Jan 2018 16:00:19 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id 95609607D5 for ; Mon, 22 Jan 2018 16:00:13 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 3C3642182E6E for ; Mon, 22 Jan 2018 19:00:12 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id vOeHUgdj39-0Cmu9wG7; Mon, 22 Jan 2018 19:00:12 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id c00uMedhDu-0BQ0S9kH; Mon, 22 Jan 2018 19:00:11 +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: Mon, 22 Jan 2018 19:00:09 +0300 Message-Id: <1516636809-24962-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516636809-24962-1-git-send-email-odpbot@yandex.ru> References: <1516636809-24962-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 418 Subject: [lng-odp] [PATCH v1 1/1] fix: linux-gen: cls: update capability to return max hash queues 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: Balasubramanian Manoharan Fixes: https://bugs.linaro.org/show_bug.cgi?id=3579 Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 418 (bala-manoharan:BUG3579) ** https://github.com/Linaro/odp/pull/418 ** Patch: https://github.com/Linaro/odp/pull/418.patch ** Base sha: 3ce9d6ab16d064b0f83508e2f0b2e476d64b15e1 ** Merge commit sha: c38e7fcc8cefc49f85a8cb7422a9d885788894c4 **/ platform/linux-generic/odp_classification.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index 5aa3b84a1..5447afa92 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -194,6 +194,7 @@ int odp_cls_capability(odp_cls_capability_t *capability) capability->back_pressure = ODP_SUPPORT_NO; capability->threshold_red.all_bits = 0; capability->threshold_bp.all_bits = 0; + capability->max_hash_queues = CLS_COS_QUEUE_MAX; return 0; } @@ -220,10 +221,11 @@ odp_cos_t odp_cls_cos_create(const char *name, odp_cls_cos_param_t *param) cos_t *cos; uint32_t tbl_index; - /* Packets are dropped if Queue or Pool is invalid*/ - if (param->num_queue > CLS_COS_QUEUE_MAX) + /* num_queue should not be zero */ + if (param->num_queue > CLS_COS_QUEUE_MAX || param->num_queue < 1) return ODP_COS_INVALID; + /* Packets are dropped if Queue (except hashing) or Pool is invalid */ drop_policy = param->drop_policy; for (i = 0; i < CLS_COS_MAX_ENTRY; i++) {