Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-25 Thread Andrew Rybchenko
On 5/25/22 16:58, Thomas Monjalon wrote: 25/05/2022 14:59, Andrew Rybchenko: On 5/24/22 11:18, Thomas Monjalon wrote: 24/05/2022 04:50, Spike Du: From: Thomas Monjalon 23/05/2022 05:01, Spike Du: From: Stephen Hemminger Spike Du wrote: --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-25 Thread Thomas Monjalon
25/05/2022 14:59, Andrew Rybchenko: > On 5/24/22 11:18, Thomas Monjalon wrote: > > 24/05/2022 04:50, Spike Du: > >> From: Thomas Monjalon > >>> 23/05/2022 05:01, Spike Du: > From: Stephen Hemminger > > Spike Du wrote: > >> --- a/lib/ethdev/rte_ethdev.h > >> +++ b/lib/ethdev/rte_

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-25 Thread Andrew Rybchenko
On 5/24/22 11:18, Thomas Monjalon wrote: 24/05/2022 04:50, Spike Du: From: Thomas Monjalon 23/05/2022 05:01, Spike Du: From: Stephen Hemminger Spike Du wrote: --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf { */ union

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-24 Thread Morten Brørup
> From: Andrew Rybchenko [mailto:andrew.rybche...@oktetlabs.ru] > Sent: Tuesday, 24 May 2022 08.35 > > On 5/23/22 17:39, Thomas Monjalon wrote: > > 23/05/2022 16:10, Spike Du: > >>> From: Thomas Monjalon > If you stick with percentage, it only needs 7 bits, and you can > make the > >>> remai

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-24 Thread Thomas Monjalon
24/05/2022 04:50, Spike Du: > From: Thomas Monjalon > > 23/05/2022 05:01, Spike Du: > > > From: Stephen Hemminger > > > > Spike Du wrote: > > > > > --- a/lib/ethdev/rte_ethdev.h > > > > > +++ b/lib/ethdev/rte_ethdev.h > > > > > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf { > > > > >*/ >

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Andrew Rybchenko
On 5/23/22 17:39, Thomas Monjalon wrote: 23/05/2022 16:10, Spike Du: From: Thomas Monjalon If you stick with percentage, it only needs 7 bits, and you can make the remaining one bit reserved. Agree, will change to use 7 bits. I'm not sure it's worth introducing a bit field here. +1

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Spike Du
tephen Hemminger > > > Sent: Sunday, May 22, 2022 11:23 PM > > > To: Spike Du > > > Cc: Matan Azrad ; Slava Ovsiienko > > > ; Ori Kam ; NBU-Contact- > > > Thomas Monjalon (EXTERNAL) ; dev@dpdk.org; > > > Raslan Darawsheh > > > Subject:

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Spike Du
> Subject: Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark > > External email: Use caution opening links or attachments > > > 23/05/2022 05:01, Spike Du: > > From: Stephen Hemminger > > > Spike Du wrote: > > > > --- a/lib/ethd

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Stephen Hemminger
tact- > > Thomas Monjalon (EXTERNAL) ; dev@dpdk.org; > > Raslan Darawsheh > > Subject: Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark > > > > External email: Use caution opening links or attachments > > > > > > On Sun, 22 May 20

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Thomas Monjalon
23/05/2022 05:01, Spike Du: > From: Stephen Hemminger > > Spike Du wrote: > > > --- a/lib/ethdev/rte_ethdev.h > > > +++ b/lib/ethdev/rte_ethdev.h > > > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf { > > >*/ > > > union rte_eth_rxseg *rx_seg; > > > > > > - uint64_t reserved_64s[2

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Thomas Monjalon
23/05/2022 16:10, Spike Du: > > From: Thomas Monjalon > > > If you stick with percentage, it only needs 7 bits, and you can make the > > remaining one bit reserved. > > Agree, will change to use 7 bits. I'm not sure it's worth introducing a bit field here.

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Spike Du
> -Original Message- > From: Thomas Monjalon > Sent: Monday, May 23, 2022 6:59 PM > To: Spike Du ; Morten Brørup > > Cc: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; dev@dpdk.org; > Raslan Darawsheh > Subject: Re: [RFC v2 3/7] ethdev: introduce Rx

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Thomas Monjalon
23/05/2022 08:07, Morten Brørup: > > + 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. I think percentage is the easiest to understand and to share with othe

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-22 Thread Morten Brørup
> From: Spike Du [mailto:spi...@nvidia.com] > Sent: Sunday, 22 May 2022 07.59 > > 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 val

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-22 Thread Spike Du
Hi, pls see below. > -Original Message- > From: Stephen Hemminger > Sent: Sunday, May 22, 2022 11:23 PM > To: Spike Du > Cc: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; NBU-Contact- > Thomas Monjalon (EXTERNAL) ; dev@dpdk.org; > Raslan Darawsheh > Subje

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-22 Thread Spike Du
Hi, > -Original Message- > From: Stephen Hemminger > Sent: Sunday, May 22, 2022 11:25 PM > To: Spike Du > Cc: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; NBU-Contact- > Thomas Monjalon (EXTERNAL) ; dev@dpdk.org; > Raslan Darawsheh > Subject: Re: [RFC v2 3/7]

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-22 Thread Stephen Hemminger
On Sun, 22 May 2022 08:58:56 +0300 Spike Du wrote: > 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]. > Sett

Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-22 Thread Stephen Hemminger
On Sun, 22 May 2022 08:58:56 +0300 Spike Du wrote: > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index 04cff8ee10..687ae5ff29 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf { >*/ > union rte_