Re: [PATCH net-next v11] net: reduce ARFS flow updates by checking LLC affinity

From: Jakub Kicinski

Date: Mon Oct 19 2026 - 21:44:32 EST


On Mon, 12 Oct 2026 14:01:08 +0800 Chuang Wang wrote:
> + /*

nit: empty line not needed in networking, start with the "title":

/* ARFS LLC Affinity Feature:

> + * ARFS LLC Affinity Feature:
> + * Reduce ARFS flow updates by checking LLC affinity.
> + *
> + * Frequent flow table updates can trigger constant hardware steering
> + * reconfigurations (e.g., ndo_rx_flow_steer), leading to significant
> + * contention on driver internal locks (like mlx5's arfs_lock).
> + *
> + * Skip the expensive hardware steering update if the flow's previous
> + * target CPU and the new one share the last level cache: cache locality
> + * for the application is preserved either way.
> + */

Honestly, I don't think this comment is needed at all. The check
is pretty understandable to anyone with any system config experience.

> + if (static_branch_unlikely(&arfs_llc_affinity) &&
> + old_cpu < nr_cpu_ids && cpu_online(old_cpu) &&
> + cpus_share_cache(old_cpu, next_cpu))
> + goto out;

The last line of the condition is mis-aligned

> + {
> + .procname = "arfs_llc_affinity",
> + .data = &arfs_llc_affinity.key,
> + .maxlen = sizeof(arfs_llc_affinity.key),
> + .mode = 0644,
> + .proc_handler = proc_do_static_key
> + },

You're adding a uAPI / profcs knob. It needs to be documented
appropriately under Documentation/

Please note that net next is closed:
https://netdev.bots.linux.dev/net-next.html
--
pw-bot: cr