From patchwork Mon Sep 11 13:00:06 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: 112179 Delivered-To: patch@linaro.org Received: by 10.100.153.131 with SMTP id 3csp5758038pji; Mon, 11 Sep 2017 06:01:26 -0700 (PDT) X-Google-Smtp-Source: AOwi7QB8c0rLr0YiZ51Vbv8rB9lT3eSIc9Ik0wuH5UBQLWDltUgs7OjolHI6Qu7z4CRBhMyuqTA8 X-Received: by 10.55.47.6 with SMTP id v6mr9449779qkh.181.1505134886190; Mon, 11 Sep 2017 06:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505134886; cv=none; d=google.com; s=arc-20160816; b=MIsWCn/aex+a2Mf6Ohld93PqfjQsLNrQUMXFvPS4cq46J2hVnmLqOiomMI/s2mFpUR atOdcJvW+cwyFC2iHKWL69HVs9hCcU3JJjXTFzYcMtaK9Ic4bflTlfCHJzg2mDkw7ASu Y4/nOWwg80ilfyKcbZ0PvzGXjgBphkXfdZRG/WpbX6nvfD/bTczygKJrZfY2fdPiy6Gw hQbqJ+fhLIYFfFNLqywZ3yiaK9LHmrITd6Q7p+m6BqbO/TwSGA+bEr2tW0+E90VbeDwQ zJ8BG3GFieiqYi9Y8UBRBUlOxlwOQYEpBmBNzweMRKEldZtFJI5PujtsTbkRGYJ0Acec JPHg== 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=8lpovsx3Eqx/6+xPRQmYBMzlT1J/h119qTwN4GS52sc=; b=0seCSsJcxiKcDiTcF3ccyuCH6BbpfQzGiB1TV7pStYUyLcFT6JijeAKmQrwOJmTdXd p+OPUE8Kd5uRMfkc6NPsQ6ApUlDiriKOrI4Mh3+jdx2HkAl6/i3jE0RNTPVo7/F3POnG PYnQarwXl+X6nnNy/hNE8av6kJ6aRfjD1Kex4V6i76FI3nlmGqcfVFzKPrLDP3gqVacc 4tsQLxLs+f7dI+v7r0Ve+1WT9MTrKNNP9JJ+LtG9/z19b1xG+MzcaEWHHWK2d1L3IfoW QeWVtLSK9H4grMye9QjQ9vK7gLUsgbZxGsM3q02blsZPAY++meWbLAd2XpOP1mWwwQz+ 61Xw== 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 d28si3535762qtc.302.2017.09.11.06.01.25; Mon, 11 Sep 2017 06:01:26 -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 C5AF760C79; Mon, 11 Sep 2017 13:01:25 +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 BEE9960CE2; Mon, 11 Sep 2017 13:00:32 +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 4CFE360C79; Mon, 11 Sep 2017 13:00:25 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 2D75960CCC for ; Mon, 11 Sep 2017 13:00:20 +0000 (UTC) Received: from mxback14g.mail.yandex.net (mxback14g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:93]) by forward100o.mail.yandex.net (Yandex) with ESMTP id AA0D72A22308 for ; Mon, 11 Sep 2017 16:00:18 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback14g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id YdbZIA4s2M-0IL82V3m; Mon, 11 Sep 2017 16:00:18 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id HHXZUP2la3-0Hwqrv19; Mon, 11 Sep 2017 16: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: Mon, 11 Sep 2017 16:00:06 +0300 Message-Id: <1505134806-4484-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505134806-4484-1-git-send-email-odpbot@yandex.ru> References: <1505134806-4484-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 172 Subject: [lng-odp] [PATCH API-NEXT v1 1/1] api: classification: add random early discard 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 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: 7fa8e2c97ed18f8dd6e95cbc78b7e668ccb98869 ** Merge commit sha: 7bb14b113f0416e3f27afe483dc3f76d9f15f51a **/ include/odp/api/spec/classification.h | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/include/odp/api/spec/classification.h b/include/odp/api/spec/classification.h index 0c4a95c5..17c7718d 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 Discard */ + odp_support_t random_early_discard; + + /** Support for Back Pressure to the remote peer */ + odp_support_t back_pressure; + } odp_cls_capability_t; /** @@ -206,6 +213,43 @@ typedef struct odp_cls_cos_param { /** Drop policy associated with CoS */ odp_cls_drop_t drop_policy; + + /* Random Early Discard (RED) + * Random Early discard 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 1 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 parameters */ + odp_bool_t red_enable; + + /* Maximum threshold percentage for RED */ + uint16_t max_red_threshold; + + /* Minimum threshold percentage for RED */ + uint16_t min_red_threshold; + + /* Back pressure + * 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; + + /* Threshold for enabling back pressure. BP is enabled when pool/queue + * size is equal to or greater than this backpressure threshold. + * BP threshold is expressed as a percentage of the resource size. */ + uint16_t bp_threshold; } odp_cls_cos_param_t; /**