From patchwork Tue Jan 23 17: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: 125560 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1874859ljf; Tue, 23 Jan 2018 09:01:11 -0800 (PST) X-Google-Smtp-Source: AH8x22560TE/5r+kq/I1vkXwRJDvXsau7f60Z0uvvWkrddTsFeOptpcRGRwAUULHZFJdZzhV5oBu X-Received: by 10.55.190.197 with SMTP id o188mr240473qkf.98.1516726870914; Tue, 23 Jan 2018 09:01:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516726870; cv=none; d=google.com; s=arc-20160816; b=dVfhW2N7yicCCwMu48ubw/HKnsMeJgwVJm1w1lnTjcBO71lQF/wYL5pE7WCBqkhmOC wOhrtYwT5Fe5/G4qPmG3ysYVFaB+Pwqgrhv8/+zi6PbL+ZgqoZ9Sh++hZhaoiW0v6bre AYhFfykuqJumuojfviC959o27AqzgaaIZvo6j1j4+ToHGSG0PoXuyioKaF9P7yxvFn0Z QdsPnKijE/Yx+yjisxZ9SZcN2EsvtTJjsyvcCHzR0dnXLkd50LVOXrFgFLFlF7/UXMWm mdFO6qZCghgE2JIbT94UYfIMF0+93kXGnNZnCyIonTxIfA6IBWQvnXZNbUUohcQc5uyu FzOw== 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=ILpCmfiB6+oU+sTOHF//yh9NGrUa6kxEi+t1zUy4b4Q=; b=pV17rTm/I1+2fO10+MgtHpPvb/ldE5AzPOJ9BK+yMf7j6X7zNS5TFzSDtoxXV6Jm6A fcejqndTbp2hX6bOy4jwL8XW5J58hJ8oBp8q6fy35W3h/b/P+eX9kwvjmtRA8nbJMjS4 dwsaDEFCHY1Ug/N0PsEczrZve5mWeX85VxTyhc3TO6PpVJRCnBzibkp7mBHOWIovNTgy 4r1CUPVuM9S/JDJZOWstrlV2eE3MD4D9SeBgzc1s8dy4fyry+DYF2ebG5UJDwByauKup RwyNXIKWZs6G6RDO1LmNXEcEe9pka3x9Kl+y7xWdcIoimK2hBaYYNGMukLsk4gyoIiJp 0xLQ== 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 l8si11755235qki.336.2018.01.23.09.01.10; Tue, 23 Jan 2018 09:01:10 -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 6CD116176E; Tue, 23 Jan 2018 17: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=-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 8352A6177B; Tue, 23 Jan 2018 17:00:24 +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 90ADA6176D; Tue, 23 Jan 2018 17:00:21 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 999846088C for ; Tue, 23 Jan 2018 17:00:15 +0000 (UTC) Received: from mxback7o.mail.yandex.net (mxback7o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::21]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 181351243DE9 for ; Tue, 23 Jan 2018 20:00:14 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback7o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id LZ4xcvPMrV-0D188RcD; Tue, 23 Jan 2018 20:00:14 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id khtookhCVl-0DDG5P9c; Tue, 23 Jan 2018 20:00:13 +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: Tue, 23 Jan 2018 20:00:12 +0300 Message-Id: <1516726812-17319-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516726812-17319-1-git-send-email-odpbot@yandex.ru> References: <1516726812-17319-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 418 Subject: [lng-odp] [PATCH v2 1/1] linux-gen: cls: fix: 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 updates cls capability to return max supported hash queues 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: b122176ee59494dd957f0f5ff41d4b55a1477e13 ** Merge commit sha: 675214846a9348c9bc766e2ddd7aa02db63469b1 **/ platform/linux-generic/odp_classification.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index 5aa3b84a1..5dcf20a0c 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,8 +221,8 @@ 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; drop_policy = param->drop_policy;