From patchwork Fri Sep 15 11:00:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112723 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp474440qgf; Fri, 15 Sep 2017 04:01:53 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCqj1wzDaf1sOEx4Q9SxovisPTiTIsAivWkvaecUpYuhQn4osQac+DH1UBghetV48zF13HT X-Received: by 10.200.5.132 with SMTP id a4mr37157985qth.316.1505473313473; Fri, 15 Sep 2017 04:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505473313; cv=none; d=google.com; s=arc-20160816; b=vq6Yg8NX1cVQukSlMyLu6j1WFwXCzpf6eJS8AhcvS3xGLVkOpr2NrECSFGeODrcoJN 6FRRMDaqTnmZFO5W2TPJK4EKsxH04NJPCxqOJ10nSww1bfow7epo0v2rkrQuXx4n4v2f BZPGS8GzYFE3gXX0WorUaMqOWCmfYgUAdz6/570uRG0HASAoMpsju1n1u6F7XlKDrn99 cGZ8VoS+6WbSzMVNzp1JOrz/otCPRMAXYR16KbltjO3t8tmcMWw/cQWVgyqPqSfH+vWr sCXzlLW6QeRR9+Yuo7SdsUdILZ/pA9ESFrf+A41BkG0o8i7NX/N81A2BDDzNq7dZtibr AE9A== 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=eVWRqXJOPzCVWZa7IydH2yFTtVTqoHO9f/nIKENCxa8=; b=PJzNEwu4Sfw9xloI0nzrJXU0cMU7z1Xxq+pVlj6M/j/HwKqQRgprdf/c8qnFrRhSZ3 PijQJEaukOKXKcpW2LzBW9pcsw8aiqMN9xfv/YeAbmrXJrlwOSEu5cbZ0n5edlp6ZkjC XEYwtAtUyR3dV2gKJbJVNgrKOHAZ0vo6QQ5za7SXGaw6YRub+ZT1ZfXDTKs/BdUxSHbs XMFbgYemxPeGfVXsBg5I8QOqr1TbE8wkrICSO80wIfUISJ9wPYZLG68aLnrY8zeQ9P9k 3nYRBcke+pJUBEG85CN//ULhaJ5k1M7HHgXsCmRCZMCVxXKF7scqp+il4bXW2vPD9uAS ULQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q5si623199qtd.539.2017.09.15.04.01.52; Fri, 15 Sep 2017 04:01:53 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 BF39560B59; Fri, 15 Sep 2017 11:01:52 +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_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED 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 026C36097C; Fri, 15 Sep 2017 11:00:39 +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 0E59B6097F; Fri, 15 Sep 2017 11:00:25 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 4AEAB6097C for ; Fri, 15 Sep 2017 11:00:21 +0000 (UTC) Received: from mxback19j.mail.yandex.net (mxback19j.mail.yandex.net [IPv6:2a02:6b8:0:1619::95]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 18FA95102E18 for ; Fri, 15 Sep 2017 14:00:19 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback19j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id z8IZKOEOZg-0J5iBgOX; Fri, 15 Sep 2017 14:00:19 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Kybgxu9PgJ-0ItqLV4g; Fri, 15 Sep 2017 14:00:18 +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, 15 Sep 2017 14:00:07 +0300 Message-Id: <1505473208-13946-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505473208-13946-1-git-send-email-odpbot@yandex.ru> References: <1505473208-13946-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 172 Subject: [lng-odp] [PATCH API-NEXT v6 1/2] api: classification: add random early detection and back pressure 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 Adds random early detection and Back pressure feature to CoS Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 172 (bala-manoharan:random_early_discard) ** https://github.com/Linaro/odp/pull/172 ** Patch: https://github.com/Linaro/odp/pull/172.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 0c618590acb06220da7f8666c6b1ce011b3ea763 **/ include/odp/api/spec/classification.h | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/include/odp/api/spec/classification.h b/include/odp/api/spec/classification.h index 0c4a95c5f..01e4f5a90 100644 --- a/include/odp/api/spec/classification.h +++ b/include/odp/api/spec/classification.h @@ -135,6 +135,13 @@ typedef struct odp_cls_capability_t { /** A Boolean to denote support of PMR range */ odp_bool_t pmr_range_supported; + + /** Support for Random Early Detection */ + odp_support_t random_early_detection; + + /** Support for Back Pressure to the remote peer */ + odp_support_t back_pressure; + } odp_cls_capability_t; /** @@ -206,6 +213,59 @@ typedef struct odp_cls_cos_param { /** Drop policy associated with CoS */ odp_cls_drop_t drop_policy; + + /** Random Early Detection (RED) + * Random Early Detection is enabled to initiate a drop probability + * for the incoming packet when the packets in the queue/pool reaches + * a specified threshold. + * When RED is enabled for a particular flow then further incoming + * packets are assigned a drop probability based on the size of the + * pool/queue and the drop probability becomes 100% when the queue/pool + * is full. + * RED is logically configured in the CoS and could be implemented + * in either pool or queue linked to the CoS depending on + * platform capabilities. + * RED is controlled using maximum and minimum threshold values + * which are defined as percentage of the system resource. + * RED is enabled when the resource limit is equal to or greater than + * the maximum threshold value and is disabled when resource limit + * is less than or equal to minimum threshold value. */ + + /** A boolean to enable RED + * When true, RED is enabled and configured with RED parameters. + * Otherwise, RED parameters are ignored. */ + odp_bool_t red_enable; + + /** RED parameters */ + struct { + /** Threshold percentage values for RED is expressed as + * one-hundredths of a percent. Hence 100% is represented as + * the integer value 10000 */ + + /** Maximum threshold percentage for RED */ + uint16_t max_threshold; + + /** Minimum threshold percentage for RED */ + uint16_t min_threshold; + } red; + + /** A boolean to enable Back pressure + * When true, back pressure is enabled and configured with the BP + * parameters. Otherwise BP parameters are ignored. When back pressure + * is enabled for a particular flow, the HW can send back pressure + * information to the remote peer indicating a network congestion */ + odp_bool_t bp_enable; + + /** BP parameters */ + struct { + /** Threshold for enabling back pressure. BP threshold is + * expressed as one-hundredth of a percent. Hence 100% is + * represented as the integer value 10000. + * BP is enabled when pool/queue size is equal to or greater + * than the backpressure threshold. BP threshold is expressed + * as a percentage of the pool/queue size. */ + uint16_t bp_threshold; + } bp; } odp_cls_cos_param_t; /** From patchwork Fri Sep 15 11:00:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112722 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp473608qgf; Fri, 15 Sep 2017 04:01:10 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCRKH58Ls+PcUp8gko8A7sMBo7yQzUlitIUkhfLAPuQcpcUGJQw1cmv8u+WKrswYCI2OoMC X-Received: by 10.55.177.198 with SMTP id a189mr6698096qkf.77.1505473270202; Fri, 15 Sep 2017 04:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505473270; cv=none; d=google.com; s=arc-20160816; b=DSHgX6SHPHd3r2lBROLDRs+U1DUILcY7gUI8MkkZg22eDDbGJAU16QB3e2E9xEjOF1 8UMJKXn5dumJTXjTUJWZt6/shK6Cvob3cCR7JCC65sG5em295b/M7kIyP677m0iAhiAl +skZqriEPOXACV9Zww0WR1ZJ1Hgc/51gKpbWVecGGFnNtw2JZWxGSI7y2zC4Zg1oTpNF nM2iU9xTgnD26Dtwr484v8hoEtsQfaKVUV6jm0TSAczjws73udSM9ZlsLWoW1HBW210i 0VovHZqut4a28u2IeJ05XAsPwPTJWpcDJl/APhQefS0HbUIkuuCpW/F/OCjQPNaKsdO4 4VuA== 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=9tFN7ygSBpYiu+g8MaKg6VCjHw5cGH1O4lGMmjXXUNg=; b=TseziwjAcvWLVRV0Ds19N97fWa7RllFib73kgXjk5N8F1JLx6+QQUQ3na211wLnHjY N4ll4GLeFiSV4X5VwDqL7tu4hcH5Piiisi5owUgAGyJ7yBT4jGWw+1bgvuskXPbWEhg/ YMEWcmKmN58EL7BIzM/dDINbgr95JoDuZI1fAOzkAjUBlzIbIhpqiM7BmqoLNneJtIdm KkYJlwXwHaUjHzxJIQyr5Vc2n5cYAj0DK6Hzjju/VnouI7NUnMZw7IiF+vreHmncCPoa gfEdqOFopPXGlX/PIfg28hGc3BFKWi+yCZB+ct3/+M9Juy7lANpm4u22IvXwxN8ZYMFj uOxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w51si662665qth.374.2017.09.15.04.01.09; Fri, 15 Sep 2017 04:01:10 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 BBFA060BE9; Fri, 15 Sep 2017 11:01:09 +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_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED 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 95801609B3; Fri, 15 Sep 2017 11:00:36 +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 9205A60997; Fri, 15 Sep 2017 11:00:24 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 4E2D36097F for ; Fri, 15 Sep 2017 11:00:21 +0000 (UTC) Received: from mxback13j.mail.yandex.net (mxback13j.mail.yandex.net [IPv6:2a02:6b8:0:1619::88]) by forward100p.mail.yandex.net (Yandex) with ESMTP id A161E51021B7 for ; Fri, 15 Sep 2017 14:00:19 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback13j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id JFG5rayRjs-0JOi8xAd; Fri, 15 Sep 2017 14:00:19 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Kybgxu9PgJ-0Jt4lbj8; Fri, 15 Sep 2017 14:00:19 +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, 15 Sep 2017 14:00:08 +0300 Message-Id: <1505473208-13946-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505473208-13946-1-git-send-email-odpbot@yandex.ru> References: <1505473208-13946-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 172 Subject: [lng-odp] [PATCH API-NEXT v6 2/2] linux-generic: classification: implement random early detection and back pressure 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 Implements Random early detection and Back pressure Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 172 (bala-manoharan:random_early_discard) ** https://github.com/Linaro/odp/pull/172 ** Patch: https://github.com/Linaro/odp/pull/172.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 0c618590acb06220da7f8666c6b1ce011b3ea763 **/ platform/linux-generic/odp_classification.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index a5cba56a4..7fa125ec2 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -190,6 +190,8 @@ int odp_cls_capability(odp_cls_capability_t *capability) capability->supported_terms.bit.tcp_sport = 1; capability->supported_terms.bit.sip_addr = 1; capability->supported_terms.bit.dip_addr = 1; + capability->random_early_detection = ODP_SUPPORT_NO; + capability->back_pressure = ODP_SUPPORT_NO; return 0; }