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 2EAE9A04FD; Mon, 23 May 2022 08:07:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14A764014F; Mon, 23 May 2022 08:07:48 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 8A58E40041 for ; Mon, 23 May 2022 08:07:46 +0200 (CEST) Content-class: urn:content-classes:message Subject: RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Mon, 23 May 2022 08:07:44 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87097@smartserver.smartshare.dk> In-Reply-To: <20220522055900.417282-4-spiked@nvidia.com> X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark Thread-Index: AdhtoSQCugxZnvEISfuoE7k0oV6hZgAyWp1Q References: <20220506035645.4101714-1-spiked@nvidia.com> <20220522055900.417282-1-spiked@nvidia.com> <20220522055900.417282-4-spiked@nvidia.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "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: Spike Du [mailto:spiked@nvidia.com] > Sent: Sunday, 22 May 2022 07.59 >=20 > LWM(limit watermark) describes the fullness of a Rx queue. If the Rx > queue fullness is above LWM, the device will trigger the event > RTE_ETH_EVENT_RX_LWM. > LWM is defined as a percentage of Rx queue size with valid value of > [0,99]. > Setting LWM to 0 means disable it, which is the default. > When translate the percentage to queue descriptor number, the numbe > should be bigger than 0 and less than queue size. > Add LWM's configuration and query driver callbacks in eth_dev_ops. >=20 > Signed-off-by: Spike Du > --- > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf { > */ > union rte_eth_rxseg *rx_seg; >=20 > - uint64_t reserved_64s[2]; /**< Reserved for future fields */ > + /** > + * Per-queue Rx limit watermark defined as percentage of Rx queue > + * size. If Rx queue receives traffic higher than this > percentage, > + * the event RTE_ETH_EVENT_RX_LWM is triggered. > + */ > + uint8_t lwm; Why percentage, why not 1/128th, or 1/16th? 2^N seems more logical, and = I wonder if such high granularity is really necessary. Just a thought, = it's not important. If you stick with percentage, it only needs 7 bits, and you can make the = remaining one bit reserved. Also, please add here that 0 means disable. > + > + uint8_t reserved_bits[3]; > + uint32_t reserved_32s; > + uint64_t reserved_64s; > void *reserved_ptrs[2]; /**< Reserved for future fields */ > }; >=20