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 <snel...@pensando.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);
>  


Reply via email to