summaryrefslogtreecommitdiff
path: root/net/core/net-sysfs.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-08-28 04:23:04 +0300
committerJakub Kicinski <kuba@kernel.org>2025-08-28 04:24:22 +0300
commit86b26768167ad030b9d4885d484e08a30e6b8df9 (patch)
treef7d2eb1ee55f69d071264ed6ae368109de4eae5e /net/core/net-sysfs.c
parentf0c88a0d83b26bcfbb3463d3a283bc08007a5ae0 (diff)
parent48aa30443e52c9666d5cd5e67532e475f212337e (diff)
downloadlinux-86b26768167ad030b9d4885d484e08a30e6b8df9.tar.xz
Merge branch 'net-prevent-rps-table-overwrite-of-active-flows'
Krishna Kumar says: ==================== net: Prevent RPS table overwrite of active flows This series splits the original RPS patch [1] into two patches for net-next. It also addresses a kernel test robot warning by defining rps_flow_is_active() only when aRFS is enabled. I tested v3 with four builds and reboots: two for [PATCH 1/2] with aRFS enabled & disabled, and two for [PATCH 2/2]. There are no code changes in v4 and v5, only documentation. Patch v6 has one line change to keep 'hash' field under #ifdef, and was test built with aRFS=on and aRFS=off. The same two builds were done for v7, along with 15m load testing with aRFS=on to ensure the new changes are correct. The first patch prevents RPS table overwrite for active flows thereby improving aRFS stability. The second patch caches hash & flow_id in get_rps_cpu() to avoid recalculating it in set_rps_cpu(). [1] lore.kernel.org/netdev/20250708081516.53048-1-krikku@gmail.com/ [2] lore.kernel.org/netdev/20250729104109.1687418-1-krikku@gmail.com/ ==================== Link: https://patch.msgid.link/20250825031005.3674864-1-krikku@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r--net/core/net-sysfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index c28cd6665444..5ea9f64adce3 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1120,8 +1120,10 @@ static ssize_t store_rps_dev_flow_table_cnt(struct netdev_rx_queue *queue,
return -ENOMEM;
table->log = ilog2(mask) + 1;
- for (count = 0; count <= mask; count++)
+ for (count = 0; count <= mask; count++) {
table->flows[count].cpu = RPS_NO_CPU;
+ table->flows[count].filter = RPS_NO_FILTER;
+ }
} else {
table = NULL;
}