From patchwork Thu Sep 14 08:00:09 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: 112510 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp465071qgf; Thu, 14 Sep 2017 01:01:56 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAgaH8lkVqV6Kv3gUEVrJe32CgipEPAzcYgGYUQxloYaU1fv7FYrDCGQP5dQDSjEvCAPl48 X-Received: by 10.55.48.8 with SMTP id w8mr1553135qkw.139.1505376116694; Thu, 14 Sep 2017 01:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505376116; cv=none; d=google.com; s=arc-20160816; b=AjsUYht5xn+Xp5dplArE90IxKtw4md6D9CRG7Lfr201Dr9aB7eaGM0Mxt4Il5ior7u bYjsWMKZyBa00Jgb3NZIsktrBf6SmhJoZfcwJbCgX3qZ7DdhY8/ESh4RWLPntzmqOcHa hqKbdjK3Vpdbg+ZVX4VxllkgeSXvmiAklwpBByr3fMMQI+fMHphxH4Fa+kVuo+9UJLyu 7kqYgxh2Z8PVm6PngMguiTITCB2WK0C7H74fnkpu7PHvvB+V8C3z2qulABLnbg2iGYE1 KNaZR8EIMTpNGSKKboRp7zMft6CuAcGO/gV2wh47eK6iae7hHyv8q0aE+TnQS130gl3O ZEkQ== 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=ERHADDyP8Gb4d30/LW3LFC2sV9fdqH3hSQ5ek6kYLcg=; b=EcdKeDfSE2iD0rtl75JQa/o6WLKTfxCMJ+ztA+I08EOK5h0VutuszIEfwUPUOB6Vdi ydH1jo9qeLo7X5Apt/scP4MS1ZG+x/HiM6EvEEAoCGE5DE6f4rY2TkjC/gEUvOpJh/RP RyTQ3uzaITTmdAGxLuYsPajSV/HqAKTan1tczLo1LRDU+PciUQ0emhegUv6uY1jdxM/Z THZPEoxqCp+Or4Uf5RHNOwIXOfJx6nu2LUUYtQ8nWu+xksHz+7m59D9OU7SqPsr6ULS5 MKaaG+drl8AUjanZO5eePj/ZjbtwB2wUpBU1F2csUozfZe5NNK72XeUvnWkf3bHt+Hl7 4hSA== 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 g38si3878687qte.244.2017.09.14.01.01.56; Thu, 14 Sep 2017 01:01:56 -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 5750D60B45; Thu, 14 Sep 2017 08:01:56 +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 5472660A6D; Thu, 14 Sep 2017 08:01:12 +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 DB7D860C48; Thu, 14 Sep 2017 08:00:47 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 61E6360C63 for ; Thu, 14 Sep 2017 08:00:16 +0000 (UTC) Received: from mxback5j.mail.yandex.net (mxback5j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10e]) by forward104j.mail.yandex.net (Yandex) with ESMTP id BEC364561C for ; Thu, 14 Sep 2017 11:00:14 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback5j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id whLjpseq78-0EJaaOOL; Thu, 14 Sep 2017 11:00:14 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AptB5ucoDT-0Emu6pV9; Thu, 14 Sep 2017 11:00:14 +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: Thu, 14 Sep 2017 11:00:09 +0300 Message-Id: <1505376010-305-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505376010-305-1-git-send-email-odpbot@yandex.ru> References: <1505376010-305-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 172 Subject: [lng-odp] [PATCH API-NEXT v5 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: 004b3f911c315f6d1e9e7fb1a057bd8fd86ee4c8 **/ 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..6e8cd951 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,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 Thu Sep 14 08: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: 112511 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp465668qgf; Thu, 14 Sep 2017 01:02:40 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDX0zmuKpZtkkvUssOGJWUsAAllQ06wUBiNt6JNV7Wms+k3C0a87xj0fj3nzCbvD9pCTnbW X-Received: by 10.55.151.196 with SMTP id z187mr1409267qkd.135.1505376160769; Thu, 14 Sep 2017 01:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505376160; cv=none; d=google.com; s=arc-20160816; b=V/EMM/SLwjKlflvL5itAvNRQ1guySNEv9xyQLasM9FYKzb9BlDNPV76v7kEcppOuxO AktLiYPue3YXKkUPICkXCGFZBB7sVEjDn5Ps4EQPHeZThyrlt+hBsS4to54xgnPKkuA7 CMQ0YY7Qk1yGam/ZcqL/QzeaH4/4kMo/nfEuqkCVyuT5+q19sEuWtzfNGyAQ+n2JaIUM QimwboaHOzZ+8XRSxt7rcsxjbTbOnbquOYsYQTdvwrrJi90kFGYJ0lYW4q1UFMyQUH38 mribbsF5fm74YMuBEkiJpiGwylLhHhHutVSgULEeBUuykmd+EyW8RlmmeJyDUCCi/3Zu jGGg== 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=6feVqg8rzXJjqCEZHJYejBKyqM3WIilnnke4f1xsb50=; b=0QJ99QFiX3+te+bmk36TGSAfgUXkBimGvIVcyM30u2jK87zJNjPGJA95vn/J+IEZfV YLX5nMmXrmQ1vPQkzGhleT7at+ITt/FZGSaFaG/PnML6t3dhRnhqDKZpDxCh443EZW4D SKMvNtmMTKb3IcxbvF44uKwK2lVweI8ttIMfP3/5riGfPmF9DidhmqyNbS8mSoU7TQn3 E3rHECZImcMzYJAfOeNVqb48oa2Up+3Dvf5835uZ2c362JlJ8g/MQVC8xEtuL+X3ft4w RDsYAEoaRlGaZfiwC5rMYbkESqc8x0FOd81gZ/f4bQk3BpmNYJ1NceHvZitTHBWYqmnW zMKA== 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 n66si3133418qka.134.2017.09.14.01.02.40; Thu, 14 Sep 2017 01:02:40 -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 64BBF60C48; Thu, 14 Sep 2017 08:02:40 +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 81F1A609B2; Thu, 14 Sep 2017 08:01: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 3D09560C48; Thu, 14 Sep 2017 08:00:50 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id 0765B60D78 for ; Thu, 14 Sep 2017 08:00:17 +0000 (UTC) Received: from mxback15j.mail.yandex.net (mxback15j.mail.yandex.net [IPv6:2a02:6b8:0:1619::91]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 4DC314084FA3 for ; Thu, 14 Sep 2017 11:00:15 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback15j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9lba69QfQM-0FPWr8xX; Thu, 14 Sep 2017 11:00:15 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AptB5ucoDT-0EmWbC5Y; Thu, 14 Sep 2017 11:00:14 +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: Thu, 14 Sep 2017 11:00:10 +0300 Message-Id: <1505376010-305-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505376010-305-1-git-send-email-odpbot@yandex.ru> References: <1505376010-305-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 172 Subject: [lng-odp] [PATCH API-NEXT v5 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: 004b3f911c315f6d1e9e7fb1a057bd8fd86ee4c8 **/ 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..7fa125ec 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; }