From patchwork Wed Sep 13 12:00:10 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: 112444 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp861793qgf; Wed, 13 Sep 2017 05:02:27 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDPVlF1R1oODMnyxCdw+zgg0iZxZzBDtcEZPlIWshmmMZhJtN/AYcayMfGkC0BnAASLAeTp X-Received: by 10.55.12.133 with SMTP id 127mr23085942qkm.251.1505304146851; Wed, 13 Sep 2017 05:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505304146; cv=none; d=google.com; s=arc-20160816; b=YVc5chEm43K0iKTLtuAMEkeOE042Gh2dU+1CCndjHO424Wh9o166EO9iSrAUnbnUoQ z3+HfGX50AKTySZ2iw5yACs38RfyRjVZUD/fZb1brSCumxc3LOFYtgWBPDCendvolvIY gcbs934+sCJ4sfAH2s7EfzJTDEEBHCtilHJUcjQPPYIkm+HKaq9Ktev8vY1wRXZc4zHI 1JU0RQIdNIxHd3ob5NsFkC4ne3+JaGCv+H+IEXDncV4/cLa5pQ4r0DtRhsdr0QkST57Z DFTqZQ9y5kY5nZtiafHoVxD9+dygT8rIYMPg53O32GgrdFDnFLIc6zS4KbXPQhvCeh6r inxQ== 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=H6w+Ik4fkAW/EkPFIkQQfD6yvPmHnY9AyXV2nZl3NhY=; b=ID2enXtsXesoCaCFZcZuxxa6FjbVSKQDFyixotxTLsejTX5rDqxHBdeq3xNH6abaBd Of6HXA0Xwi3++Lw06WLZqIxdWfUGHCNpy7o/ZajuoejcISTMZP/UxqIYSSZ98Wwv3pfS 8upw437gmFarP2TQUj2qha3gSbzOfqPX1LHevjrGA0LbpNMwjvgFgJRFSKb/NTFLjxkK 3kUVtCGUHrWHlCyEqxRZQhK0tQ2/U0kGZM4WcZfi/qbhnhEwhIAVGdK6kzGWrBu1rTeK SRR7KqBOmSi2QthzRfvzY+SrOgLUYwlmCSF7RBNyHwdKEH0fG8MvsLGEOBevJc3BTZ9T sm+g== 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 s3si13969025qkf.542.2017.09.13.05.02.26; Wed, 13 Sep 2017 05:02: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 802AA609DA; Wed, 13 Sep 2017 12:02:26 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 9A8E760AF1; Wed, 13 Sep 2017 12:01:27 +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 1759B6156C; Wed, 13 Sep 2017 12:01:13 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id D8CC960EC3 for ; Wed, 13 Sep 2017 12:00:17 +0000 (UTC) Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 885B512438B4 for ; Wed, 13 Sep 2017 15:00:16 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id dwHRWqAGBZ-0G1uJoXm; Wed, 13 Sep 2017 15:00:16 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 5chTvZ43V2-0F7qrqZv; Wed, 13 Sep 2017 15: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: Wed, 13 Sep 2017 15:00:10 +0300 Message-Id: <1505304010-18280-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505304010-18280-1-git-send-email-odpbot@yandex.ru> References: <1505304010-18280-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 172 Subject: [lng-odp] [PATCH API-NEXT v3 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: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 7f9a06cba1bced5ed7829294c75eac5048e4016e **/ 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..cedf60e3 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 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 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; /**