Re: [PATCH] net: openvswitch: Use for_each_cpu() where appropriate

From: Ilya Maximets
Date: Tue Aug 19 2025 - 09:29:35 EST


On 8/18/25 7:28 PM, Yury Norov wrote:
> From: "Yury Norov (NVIDIA)" <yury.norov@xxxxxxxxx>
>
> Due to legacy reasons, openswitch code opencodes for_each_cpu() to make
> sure that CPU0 is always considered.
>
> Since commit c4b2bf6b4a35 ("openvswitch: Optimize operations for OvS
> flow_stats."), the corresponding flow->cpu_used_mask is initialized
> such that CPU0 is explicitly set.
>
> So, switch the code to using plain for_each_cpu().
>
> Suggested-by: Ilya Maximets <i.maximets@xxxxxxx>
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@xxxxxxxxx>
> ---
> net/openvswitch/flow.c | 12 ++++--------
> net/openvswitch/flow_table.c | 7 +++----
> 2 files changed, 7 insertions(+), 12 deletions(-)
>
> v1: https://lore.kernel.org/all/20250814195838.388693-1-yury.norov@xxxxxxxxx/
> v2:
> - always include CPU0 (Ilya);

nit: The subject prefix should've been [PATCH net-next v2].

The change itself looks correct to me. Thanks!

Acked-by: Ilya Maximets <i.maximets@xxxxxxx>