Re: [PATCH iwl-next 07/16] libeth: xdp: add XDPSQ cleanup timers
From: Maciej Fijalkowski
Date: Thu Apr 24 2025 - 11:34:53 EST
On Tue, Apr 15, 2025 at 07:28:16PM +0200, Alexander Lobakin wrote:
> When XDP Tx queues are not interrupt-driven but use lazy cleaning,
> i.e. only when there are less than `threshold` free descriptors left,
> we also need cleanup timers to avoid &xdp_buff and &xdp_frame stall
> for too long, especially with Page Pool (it warns every about inflight
> pages every 60 second).
> Let's say we sent 256 frames and don't need to send more, but we clean
> only when the number of pending items >= 384. In that case, those 256
> will stall until 128 more are sent. For this, add simple helpers to
> run a timer which will clean the queue regardless, after 1 second of
> the last send.
> The timer is triggered when finalizing the queue. As long as there is
> regular active traffic, the timer doesn't fire.
>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>