Re: [PATCH net-next] ptr_ring: __ptr_ring_zero_tail micro optimization

From: patchwork-bot+netdevbpf

Date: Mon Sep 29 2025 - 21:20:59 EST


Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Sat, 27 Sep 2025 08:29:35 -0400 you wrote:
> __ptr_ring_zero_tail currently does the - 1 operation twice:
> - during initialization of head
> - at each loop iteration
>
> Let's just do it in one place, all we need to do
> is adjust the loop condition. this is better:
> - a slightly clearer logic with less duplication
> - uses prefix -- we don't need to save the old value
> - one less - 1 operation - for example, when ring is empty
> we now don't do - 1 at all, existing code does it once
>
> [...]

Here is the summary with links:
- [net-next] ptr_ring: __ptr_ring_zero_tail micro optimization
https://git.kernel.org/netdev/net-next/c/c39d6d4d9333

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html