From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 004A7C4332F for ; Tue, 24 May 2022 19:00:34 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16449400EF; Tue, 24 May 2022 21:00:34 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id B40FF400D6 for ; Tue, 24 May 2022 21:00:32 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: [PATCH v3 0/7] introduce per-queue limit watermark and host shaper Content-Transfer-Encoding: quoted-printable Date: Tue, 24 May 2022 21:00:27 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D870AA@smartserver.smartshare.dk> In-Reply-To: <6057836.17fYzF0512@thomas> X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v3 0/7] introduce per-queue limit watermark and host shaper Thread-Index: Adhvh0aSFMlIja2BSHSmqam6rjERdQAF4Qug References: <20220522055900.417282-1-spiked@nvidia.com> <20220524152041.737154-1-spiked@nvidia.com> <6057836.17fYzF0512@thomas> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Thomas Monjalon" , "Spike Du" Cc: , , , , , , , , 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 > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Tuesday, 24 May 2022 17.59 >=20 > +Cc people involved in previous versions >=20 > 24/05/2022 17:20, Spike Du: > > LWM(limit watermark) is per RX queue attribute, when RX queue > fullness reach the LWM limit, HW sends an event to dpdk application. > > Host shaper can configure shaper rate and lwm-triggered for a host > port. Please ignore this comment, it is not important, but I had to get it out = of my system: I assume that the "LWM" name is from the NIC datasheet; = otherwise I would probably prefer something with "threshold"... LWM is = easily confused with "low water mark", which is the opposite of what the = LWM does. Names are always open for discussion, so I won't object to it. > > The shaper limits the rate of traffic from host port to wire port. >From host to wire? It is RX, so you must mean from wire to host. > > If lwm-triggered is enabled, a 100Mbps shaper is enabled > automatically when one of the host port's Rx queues receives LWM = event. > > > > These two features can combine to control traffic from host port to > wire port. Again, you mean from wire to host? > > The work flow is configure LWM to RX queue and enable lwm-triggered > flag in host shaper, after receiving LWM event, delay a while until RX > queue is empty , then disable the shaper. We recycle this work flow to > reduce RX queue drops. You delay while RX queue gets drained by some other threads, I assume. Surely, the excess packets must be dropped somewhere, e.g. by the = shaper? > > > > Add new libethdev API to set LWM, add rte event > RTE_ETH_EVENT_RXQ_LIMIT_REACHED to handle LWM event. Makes sense to make it public; could be usable for other purposes, = similar to interrupt coalescing, as mentioned by Stephen. > > For host shaper, > because it doesn't align to existing DPDK framework and is specific to > Nvidia NIC, use PMD private API. Makes sense to keep it private. > > > > For integration with testpmd, put the private cmdline function and > LWM event handler in mlx5 PMD directory by adding a new file > mlx5_test.c. Only add minimal code in testpmd to invoke interfaces = from > mlx5_test.c. > > > > Spike Du (7): > > net/mlx5: add LWM support for Rxq > > common/mlx5: share interrupt management > > ethdev: introduce Rx queue based limit watermark > > net/mlx5: add LWM event handling support > > net/mlx5: support Rx queue based limit watermark > > net/mlx5: add private API to config host port shaper > > app/testpmd: add LWM and Host Shaper command > >