From patchwork Wed Sep 13 14:00:21 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: 112453 Delivered-To: patch@linaro.org Received: by 10.80.202.13 with SMTP id d13csp978317edi; Wed, 13 Sep 2017 07:09:00 -0700 (PDT) X-Google-Smtp-Source: AOwi7QC9J/iy/8b9D2TifsG1+k0AWrgDFSSiNxqQ0V2lAMlSUz6ro3XZt4HGyMxrxQ+H7b1WEAr8 X-Received: by 10.200.50.24 with SMTP id x24mr27552408qta.55.1505311740565; Wed, 13 Sep 2017 07:09:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505311740; cv=none; d=google.com; s=arc-20160816; b=DAQO1/ESPDR7bTgIOMhiFwbEPmKLmw4DB71r9QxBMMvdVW0tQxpzjgEV5RDX/kCtBE fxvMXLstqmsm4YQJG5Td9us+GCbZbV5gTUSjJ/ENUis4MYHHbdgzCnB0FdsgNUZNLDd3 HKOIkw1B1t0qrhFwY67pFsXgZU9TYeaUphSZ/cOEOR6Ee4rpGO6V8zJnuc5hOdItNvI1 9ir7jjrYfChOkW4najFbWmct24zGwLXxajYUNuLU1eobim/l+3dJR1O3si5508J23MUQ 5IWJo+6LPokf1N59IP4A97W1itkVGbIayPCWrPiMw4nENPW9wA0IKxBwn1JCYZrDzSZH 0B8g== 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=oLh/w3L2vxJbWhtajEJ2yy/oM7dknW7o8ilVXOX64WQ=; b=Oh4S5v1k5/6W31yATpHZuWTSEP7muhTu9sTZUqTRALniAhCirqnk8gqeubEVZvkUNy 8wTuVk7KmZXhtI7i5EvmXYD/enMkU8A+V0uaWVKla2D8FhWCbWmPgNVmirgIAlE4nVXe ZjlYSCH/DvpPE5TOSFT3tQTynYZvI5qmmhbrs2u4jOp1vt7E16iI/+zrMVspzE7YZ3v5 kJzEVXfcsybR+u6b3LhdBTfqCw53DoC1KiraxnGBRmCZPBlUvQ9OSa66in4ooBNGn52v TLSMwW2P3R8pzUET8jtv8wOd1W9+BsLfXX9QKLmUbOGlC9fOTCCojV09CceH6OYqnvv6 15Lw== 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 u7si8901082qkh.465.2017.09.13.07.09.00; Wed, 13 Sep 2017 07:09:00 -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 2989564494; Wed, 13 Sep 2017 14:09:00 +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 88E5F63CB3; Wed, 13 Sep 2017 14:01:52 +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 6910963CB0; Wed, 13 Sep 2017 14:01:45 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 9686860B14 for ; Wed, 13 Sep 2017 14:00:32 +0000 (UTC) Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1f]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 293A92A222AA for ; Wed, 13 Sep 2017 17:00:28 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback5o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id IEFuidtjR0-0S5S008u; Wed, 13 Sep 2017 17:00:28 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 8ylPQBpGZq-0Rbu0AiT; Wed, 13 Sep 2017 17:00:27 +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 17:00:21 +0300 Message-Id: <1505311222-19767-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505311222-19767-1-git-send-email-odpbot@yandex.ru> References: <1505311222-19767-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 172 Subject: [lng-odp] [PATCH API-NEXT v4 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: c702f85da54be2b375a378723622053244f839e5 **/ 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; /** From patchwork Wed Sep 13 14:00:22 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: 112452 Delivered-To: patch@linaro.org Received: by 10.80.202.13 with SMTP id d13csp977649edi; Wed, 13 Sep 2017 07:08:21 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAePqZ9SS9fdYw7P3mdr6flAXiK0yA35NvEadSkbjbPG3RAN0HXSsus/6HoBYdFYCilMUd7 X-Received: by 10.200.41.143 with SMTP id 15mr18046223qts.56.1505311700614; Wed, 13 Sep 2017 07:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505311700; cv=none; d=google.com; s=arc-20160816; b=0K1FMHPah/w1Nt6fEFZ1QpVt0vmErB2LUyEYP4aOfsPGzXGHmGPv8eoJ84RxsLegtD /DdBUb8S6nWpeJvtoc7268LMSYshekqX4gIf4+qtpyND6dY8+eBtPSDKKsReL+hv6MoR Lfx/YoMhcMLclJgnP+2tYxfUA+2TYfnLrTsYW8NbbDYeMMj7Su8ODeZy30kM+s5WEzAl AnUp2IZA/NfeAv18T8//drsd1XM07BEIDr08QvNL2fBqEq4xIpR4SxLPs0tBPXQUx58c QjUnh0KJWTPbi9aVTjjKnVIyAsUKhtBzbi5HkEkY+gLcCkdp5ckbExAFo1IzfZirZAxF CyqQ== 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=j5IYXneCVSug61AzlJOondtYX9wukz7fIfU2+2G7fJ8=; b=miDYOAr9pL39gYeaGEuKMpVJ+UxI0JNu4hrxLzXg1TCVEYfaCrTFbJ9/A9q8wl1WVq bPcOst1C6juPr9LpFBFyWZRLKCtIlFQfVbjx3Mz9VnOLP8R2+S+E8r36qMRb5KzarRa9 trPBf5f/uiIZHiKxamGAv7Y1cYXeup0XTQOGRbdfomrgELGaSyiWoUTrkUbvml+BMWeU qzo6CjqPZY3UaI4Ps70vwmvL/ddkWBEPcAcV23LhS2woGt+Yb15SJRGYSeZXNJpkb93o e97EKEXPBHCgU+Ha89gnBx3619ypJAj5UjkXln5pxm0BfqcrVyhyXYwIStA8DbU/YRN/ tyCA== 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 b84si13827890qkj.370.2017.09.13.07.08.20; Wed, 13 Sep 2017 07:08:20 -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 4264964491; Wed, 13 Sep 2017 14:08:20 +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,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 4A5CF60B3F; Wed, 13 Sep 2017 14:01:41 +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 39B0962DFD; Wed, 13 Sep 2017 14:01:32 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 4327C60A6D for ; Wed, 13 Sep 2017 14:00:30 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward101o.mail.yandex.net (Yandex) with ESMTP id B046A134543C for ; Wed, 13 Sep 2017 17:00:28 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id yRNX0Yr01z-0ScaqS9Q; Wed, 13 Sep 2017 17:00:28 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 8ylPQBpGZq-0Sb0CPGc; Wed, 13 Sep 2017 17:00:28 +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 17:00:22 +0300 Message-Id: <1505311222-19767-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505311222-19767-1-git-send-email-odpbot@yandex.ru> References: <1505311222-19767-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 172 Subject: [lng-odp] [PATCH API-NEXT v4 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: c702f85da54be2b375a378723622053244f839e5 **/ 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 a5cba56a..aad9b97a 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_discard = ODP_SUPPORT_NO; + capabilty->back_pressure = ODP_SUPPORT_NO; return 0; }