RE: Re: [PATCH v2 1/2] net: ravb: Always process TX descriptor ring

From: Ratheesh Kannoth
Date: Wed Apr 03 2024 - 05:28:36 EST


> From: Paul Barker <paul.barker.ct@xxxxxxxxxxxxxx>
> > AFAIU, TX is processed without any budget. This wont result in rx work
> > starvation if TX traffic is more ?
>
> Quoting the docs in Documentation/networking/napi.rst:
>
> The method takes a ``budget`` argument - drivers can process
> completions for any number of Tx packets but should only process up
> to ``budget`` number of Rx packets.
>
> skb Tx processing should happen regardless of the ``budget``
>
> I take that to mean that the RX work budget running out should not stop
> processing of TX packets.
>
> Other drivers with a combined TX/RX poll function follow the same pattern of
> processing TX packets regardless of RX budget exhaustion, for example see
> ixgbe_poll() which processes TX packets first (in
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c).
ACK. Thanks for pointing out. I had seen some drivers, TX NAPI routines exist to bring fairness to rx and tx.
Just wondering, if there is a lot of tx traffic, would RX budget alone can do fairness among NAPI
Routines.