Re: [PATCH net-next v14 06/13] rtase: Implement .ndo_start_xmit function
From: Jakub Kicinski
Date: Thu Dec 14 2023 - 12:24:16 EST
On Thu, 14 Dec 2023 13:00:29 +0000 JustinLai0215 wrote:
> > I don't see how this is called, the way you split the submission makes it a bit
> > hard to review, oh well. Anyway - if you pass the NAPI budget here - that's not
> > right, it may be 0, and you'd loop forever.
> > For Tx - you should try to reap some fixed number of packets, say 128, the
> > budget is for Rx, not for Tx.
>
> Even if the budget is 0, this function will not loop forever, it will just run all tx_left.
> Or what changes would you like us to make?
Ah, good point. It does seem a little accidental to me :S
In that case perhaps always consume all completed packets?
@budget should not constrain Tx completions directly, see:
https://www.kernel.org/doc/html/next/networking/napi.html