From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81CC6A0032; Wed, 13 Jul 2022 14:11:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 638164282D; Wed, 13 Jul 2022 14:11:56 +0200 (CEST) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by mails.dpdk.org (Postfix) with ESMTP id 4C4C04280D for ; Wed, 13 Jul 2022 14:11:55 +0200 (CEST) Received: by mail-qv1-f50.google.com with SMTP id l15so4657779qvo.11 for ; Wed, 13 Jul 2022 05:11:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Y0wG3OMTUVUd6XQZIclHLCAdqzx/WSsIbPVM24L4K5k=; b=ibhxkuRuB5on9TQYz/UVivyvoBkib94ze7n4WUvYBSLApfRsnFhZ1XmDejEpwcHH9X 9766u12cD4TpE0YxJAKZuZ14FKS7DJ1vg5+q5hlmimoCnXf23cspz66es/BcEuun1hCR SD9QP9AuHSnN9gxplm5JPOmkdjPkt7l93OtcUocKFyGddN5TnAZAjGl+GtxbikUdqZt4 eiQlTmMl4Gc4NkkVRsU1eSIhVek+WjOrT+YU2+KbHon5PwoyNg2z+zKzT8199mMLHxSg dNJcaI/ruyq2EQFXFRC1Jue+P5QtKJiBKKTTXJcJ5L3i3VgZGxHnNYSo9Fg7Np8TTK5K FuzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Y0wG3OMTUVUd6XQZIclHLCAdqzx/WSsIbPVM24L4K5k=; b=I2WWFfgENz9yErMShOtvS2wD8Tv+qQHxUujgcQR2jtk9TQ7wj2Tj+0tE5H7A9PoAnx ZVnde4VoEj3v4bQuWQHXDSRHOEa8at2ZjCdj685IP5viYpCG1KtbTjAT6A4eGilcvLVr 3Z/3ysk5HzurRqkeF6WYkdgWU6ML2soZUuURX49u00G3CPG7fLucVK2uuDfSu/bplM6M vUhFGhXY1r0Utt9U/Y8b5HrEqZsxY8v3AarQAATN1BhXYaTkATngBEmFqMrNa7tXaEVv Vu6T5Rhac1r+t6SkYGuCu+oTViVYzaA9u46ytWpLR1I+/BJD8EIzVL6aZ8jFpriffrih JIgA== X-Gm-Message-State: AJIora8XNN5m0wo+SMFVAtnVm2hVj2jrovzDVcHKgLK9nPj8TGhjEbTF XrrZwpslyTvsb9w0H69X58cWbsaWuh41JVMb23o= X-Google-Smtp-Source: AGRyM1vDaWrkUymdDzgax6+K/oR8eLwZddotKTn/FKvtiF2l6kHB7hZzNEmg/rsZkavTl/C0eFjk/Hozc/Dxe1LkgxU= X-Received: by 2002:ad4:5bea:0:b0:473:301:3859 with SMTP id k10-20020ad45bea000000b0047303013859mr2632451qvc.16.1657714314581; Wed, 13 Jul 2022 05:11:54 -0700 (PDT) MIME-Version: 1.0 References: <20220530131526.3598658-1-jerinj@marvell.com> In-Reply-To: From: Jerin Jacob Date: Wed, 13 Jul 2022 17:41:28 +0530 Message-ID: Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support congestion management To: Ajit Khaparde Cc: Jerin Jacob Kollanukkaran , dpdk-dev , Ferruh Yigit , Thomas Monjalon , Andrew Rybchenko , Andrew Boyer , Beilei Xing , Bruce Richardson , Chas Williams , "Xia, Chenbo" , Ciara Loftus , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Gaetan Rivet , Gagandeep Singh , Guoyang Zhou , Haiyue Wang , Harman Kalra , Heinrich Kuhn , Hemant Agrawal , Hyong Youb Kim , Igor Chauskin , Igor Russkikh , Jakub Grajciar , "Singh, Jasvinder" , Jian Wang , Jiawen Wu , Jingjing Wu , John Daley , John Miller , "John W. Linville" , "Wiles, Keith" , Kiran Kumar K , oulijun , Liron Himi , Long Li , Marcin Wojtas , Martin Spinler , Matan Azrad , Matt Peters , Maxime Coquelin , Michal Krawczyk , "Min Hu (Connor)" , Nalla Pradeep , Nithin Dabilpuram , Qiming Yang , Qi Zhang , Radha Mohan Chintakuntla , Rahul Lakkireddy , Rasesh Mody , Rosen Xu , "Sachin Saxena (OSS)" , Satha Rao , Shahed Shaikh , Shai Brandes , Shepard Siegel , Somalapuram Amaranath , Somnath Kotur , Stephen Hemminger , Steven Webster , Sunil Kumar Kori , Tetsuya Mukawa , Veerasenareddy Burru , Slava Ovsiienko , Xiao Wang , Xiaoyun Wang , Yisen Zhuang , Yong Wang , Ziyang Xuan , "Dumitrescu, Cristian" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, May 31, 2022 at 1:13 AM Ajit Khaparde wrote: > > On Mon, May 30, 2022 at 6:16 AM wrote: > > > > From: Jerin Jacob > > > > NIC HW controllers often come with congestion management support on > > various HW objects such as Rx queue depth or mempool queue depth. > > > > Also, it can support various modes of operation such as RED > > (Random early discard), WRED etc on those HW objects. > > > > This patch adds a framework to express such modes(enum rte_cman_mode) > > and introduce (enum rte_eth_cman_obj) to enumerate the different > > objects where the modes can operate on. > > > > This patch adds RTE_CMAN_RED mode of operation and > > RTE_ETH_CMAN_OBJ_RX_QUEUE, RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL object. > > > > Introduced reserved fields in configuration structure > > backed by rte_eth_cman_config_init() to add new configuration > > parameters without ABI breakage. > > > > Added rte_eth_cman_info_get() API to get the information such as > > supported modes and objects. > > > > Added rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs > > to configure congestion management on those object with associated mode= . > > > > Finally, Added rte_eth_cman_config_get() API to retrieve the > > applied configuration. > > Can you also add How all this helps an application? Thanks Random early detection (RED), also known as random early discard or random early drop is a queuing discipline for a network scheduler suited for congestion avoidance. In the conventional tail drop algorithm, a router or other network component buffers as many packets as it can, and simply drops the ones it cannot buffer. If buffers are constantly full, the network is congested. Tail drop distributes buffer space unfairly among traffic flows. Tail drop can also lead to TCP global synchronization as all TCP connections "hold back" simultaneously, and then step forward simultaneously. Networks become under-utilized and flooded=E2=80=94alternately, in waves. RED addresses these issues by pre-emptively dropping packets before the buffer becomes completely full. It uses predictive models to decide which packets to drop. it is copied from https://en.wikipedia.org/wiki/Random_early_detection page. I have kept this URL under enum rte_cman_mode:: RTE_CMAN_RED too. Also I will add original specification URL too, http://www.aciri.org/floyd/papers/red/red.html.