lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f0e95c596be3ebcaf862486af4977a1fb00e8896.camel@kernel.org>
Date:   Wed, 04 Nov 2020 17:08:42 -0800
From:   Saeed Mahameed <saeed@...nel.org>
To:     Shannon Nelson <snelson@...sando.io>, netdev@...r.kernel.org,
        davem@...emloft.net, kuba@...nel.org
Subject: Re: [PATCH net-next 4/6] ionic: batch rx buffer refilling

On Wed, 2020-11-04 at 14:33 -0800, Shannon Nelson wrote:
> We don't need to refill the rx descriptors on every napi
> if only a few were handled.  Waiting until we can batch up
> a few together will save us a few Rx cycles.
> 
> Signed-off-by: Shannon Nelson <snelson@...sando.io>
> ---
>  .../net/ethernet/pensando/ionic/ionic_dev.h    |  4 +++-
>  .../net/ethernet/pensando/ionic/ionic_txrx.c   | 18 ++++++++++----
> ----
>  2 files changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.h
> b/drivers/net/ethernet/pensando/ionic/ionic_dev.h
> index 6c243b17312c..9064222a087a 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.h
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.h
> @@ -12,8 +12,10 @@
>  
>  #define IONIC_MAX_TX_DESC		8192
>  #define IONIC_MAX_RX_DESC		16384
> -#define IONIC_MIN_TXRX_DESC		16
> +#define IONIC_MIN_TXRX_DESC		64
>  #define IONIC_DEF_TXRX_DESC		4096
> +#define IONIC_RX_FILL_THRESHOLD		64

isn't 64 a bit high ? 64 is the default napi budget 

Many drivers do this with bulks of 8/16 but I couldn't find any with
higher numbers.

also, just for a reference, GRO and XDP they bulk up to 8. but not
more.

IMHO i think you need to relax the re-fill threshold a bit.

> +#define IONIC_RX_FILL_DIV		8
> 
...

> -	if (work_done)
> +	rx_fill_threshold = min_t(u16, IONIC_RX_FILL_THRESHOLD,
> +				  cq->num_descs / IONIC_RX_FILL_DIV);
> +	if (work_done && ionic_q_space_avail(cq->bound_q) >=
> rx_fill_threshold)
>  		ionic_rx_fill(cq->bound_q);
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ