On Sun, Nov 30, 2025 at 08:41:55PM +0100, Florian Fuchs wrote:
> Use the napi functions napi_alloc_skb() and napi_gro_receive() instead
> of netdev_alloc_skb() and netif_receive_skb() for more efficient packet
> receiving. The switch to napi aware functions increases the RX
> throughput, reduces the occurrence of retransmissions and improves the
> resilience against SKB allocation failures.
> 
> Signed-off-by: Florian Fuchs <[email protected]>
> ---
> Note: This change has been tested on real hardware Sony PS3 (CECHL04 PAL),
> the patch was tested for many hours, with continuous system load, high
> network transfer load and injected failslab errors.
> 
> In my tests, the RX throughput increased up to 100% and reduced the
> occurrence of retransmissions drastically, with GRO enabled:
> 
> iperf3 before and after the commit, where PS3 (with this driver) is on
> the receiving side:
> Before: [  5]   0.00-10.00  sec   551 MBytes   462 Mbits/sec receiver
> After:  [  5]   0.00-10.00  sec  1.09 GBytes   939 Mbits/sec receiver
> 
> stats from the sending client to the PS3:
> Before: [  5]   0.00-10.00  sec   552 MBytes   463 Mbits/sec  3151 sender
> After:  [  5]   0.00-10.00  sec  1.09 GBytes   940 Mbits/sec   37  sender

Hi Florian,

Thanks for the rest results and confirming this has
been exercised on real HW.

Thinking out loud:

* I see that the napi_mode argument to gelic_descr_prepare_rx ensures
  that napi_alloc_skb() is only called from softirq context.

* I see that the driver already calls napi_complete_done() in
  it's poll callback, a pre-requisite for using napi_alloc_skb().

So as I understand things the use of the NAPI API by this patch is correct.

And this provides a nice example of the advantages of using this part
of the API.

Reviewed-by: Simon Horman <[email protected]>

Reply via email to