From patchwork Mon Jun 12 11:41:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 103615 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp148028qgd; Mon, 12 Jun 2017 04:41:54 -0700 (PDT) X-Received: by 10.55.47.66 with SMTP id v63mr65203717qkh.42.1497267714512; Mon, 12 Jun 2017 04:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497267714; cv=none; d=google.com; s=arc-20160816; b=FyfAZ1CKnm2kpMuwX5KokT2IcjbaZWiKZk0O+yw1WY1vDZLeItJGFrHfEniPP1UW7p JB/gb5CsAtlzgpj8tOkrHJyJNRvZfyRTV3oau0qVvNOpK/0WNXF/vgoBYveEobtE2Alr 6dGUGHiKT+1JyFdzkYcvWk3YXWkGkt2uFASUfcedG64ENqfV+7DK+UWmSBrTD9J082i8 WRtI5+wQAWYA9UMZZJ4zwhL+ZdRWyOvntgoyt+KBvvNdKdsZ2liPkusZDB75XSegE3rr c5gdK8bnPO6t2OIrABh2CeJbWk2cdmSFseSIWl+PTTHYdWFPFcESyMJ6vYt+XKqXps/S pGFQ== 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:message-id:date:to:from :delivered-to:arc-authentication-results; bh=HpTRXDa/bQbSK/nTWIGNpjFLc0qM92Bl0h1GrcO+dwA=; b=ldP83h3OqQIV0w73nWHRcWF+6ZecR5eKPhYb3MqfqhHFZz+CmsS/bJkv4nTcX790j5 BZCh5RK6yhB/1M1psWjn4b5YdNybHpJfb0/VscgmetvPnDGmz20eoP4oA6ry2+5pA/vQ utMGzhwzQRfTeA3y9vUMUvKrnFgQ9Ae0ZKjwa4ln/0alCbkdtt0dkABIaBYEXiBhe8Cd xKRsslCBHug3bmsdLo4No3ijtcckcSAdn79ZoDpwXwIDb/d0QVDGymAqNAml/SN/Wy9Z o0uWBUWNIIoqgwBXFmfWN49p1WBQXeDGfU/dsbWNujTt/Y7ishCAx9u/M49zlbWDNSOV bywA== 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y134si8282137qkb.229.2017.06.12.04.41.53; Mon, 12 Jun 2017 04:41:54 -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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D128C60B5E; Mon, 12 Jun 2017 11:41:53 +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, RCVD_IN_DNSWL_NONE, 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 8B62E60A3E; Mon, 12 Jun 2017 11:41:49 +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 36D8260B2B; Mon, 12 Jun 2017 11:41:47 +0000 (UTC) Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) by lists.linaro.org (Postfix) with ESMTPS id 3863F60509 for ; Mon, 12 Jun 2017 11:41:45 +0000 (UTC) Received: by mail-pg0-f53.google.com with SMTP id v18so44605484pgb.1 for ; Mon, 12 Jun 2017 04:41:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HpTRXDa/bQbSK/nTWIGNpjFLc0qM92Bl0h1GrcO+dwA=; b=MgVR3sxBmU5pICltXElrBfhIw/ykCneUF1T1nuku5RAWiow9R7KuDu+1cE+S4GHgeu I0ULsFK60lMAxih+fygSMx+c1ZpcLayuFzjFthnnLQ0HD7Kavv4WSEBYltRqaKkPDOUs R5yC9oK0zoQaRKIhR+850XIBs0vSKfY8+SzTbSpJsNclkvzQiKykrAuUGnshEesMSiuy Uc0MXa9FWNWLu3x7q97V7fOd+5mcE6fr7a28il0rico+x/X1/KcZsP+kOfLFZuDY2JOh +ZCLJxpcPXPSKhKyzmJnXvaG+5i3ECMDx6Vfm5CKpH5zMV18F4nCwqXVZ+2w5zs7byCf CF9Q== X-Gm-Message-State: AODbwcDoJwV85uU4ZribJVNo+ey65l/uZQ3LyRFK2pLTdZXne6fAFqEk LnLtTwv5wqiG3dS8YShLHrid X-Received: by 10.98.19.16 with SMTP id b16mr31312768pfj.159.1497267704233; Mon, 12 Jun 2017 04:41:44 -0700 (PDT) Received: from localhost.localdomain ([122.171.27.59]) by smtp.gmail.com with ESMTPSA id n2sm18285837pgd.26.2017.06.12.04.41.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Jun 2017 04:41:42 -0700 (PDT) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 04:41:26 -0700 Message-Id: <1497267686-3590-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.9.1 Subject: [lng-odp] [RFC] 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" Add random early discard configuration to class-of-service Signed-off-by: Balasubramanian Manoharan --- include/odp/api/spec/classification.h | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) -- 1.9.1 diff --git a/include/odp/api/spec/classification.h b/include/odp/api/spec/classification.h index 39831b2..badadff 100644 --- a/include/odp/api/spec/classification.h +++ b/include/odp/api/spec/classification.h @@ -128,6 +128,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; /** @@ -167,6 +174,43 @@ typedef struct odp_cls_cos_param { odp_queue_t queue; /**< Queue associated with CoS */ odp_pool_t pool; /**< Pool associated with CoS */ odp_cls_drop_t drop_policy; /**< Drop policy associated with CoS */ + + /* 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; /**