]> git.ipfire.org Git - thirdparty/linux.git/commit
net: Add rfs_needed() helper
authorChristoph Paasch <cpaasch@openai.com>
Tue, 2 Sep 2025 21:11:35 +0000 (23:11 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 3 Sep 2025 22:08:20 +0000 (15:08 -0700)
commit929324913e0caabea91b50fa71e41d70b766f7dc
tree831510fdbf4098597c55e0849682ac391e5c1b53
parent3fff72f827ad168343a88ae1c4857a1c17a9c865
net: Add rfs_needed() helper

Add a helper to check if RFS is needed or not. Allows to make the code a
bit cleaner and the next patch to have MPTCP use this helper to decide
whether or not to iterate over the subflows.

tun_flow_update() was calling sock_rps_record_flow_hash() regardless of
the state of rfs_needed. This was not really a bug as sock_flow_table
simply ends up being NULL and thus everything will be fine.
This commit here thus also implicitly makes tun_flow_update() respect
the state of rfs_needed.

Suggested-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Christoph Paasch <cpaasch@openai.com>
Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250902-net-next-mptcp-misc-feat-6-18-v2-3-fa02bb3188b1@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/rps.h