Skip to content

net: Prevent RPS table overwrite of active flows

Krishna Kumar netdev 7 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest posting 2/22 patches 0 repliesApplied 2/2
  2. v7 posting 1/22 patches 2 repliesSuperseded
  3. v62 patches 4 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v52 patches5 repliesSuperseded
v42 patches0 repliesSuperseded
v32 patches3 repliesSuperseded
v22 patches0 repliesSuperseded

Patches in v7 posting 2/2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: Prevent RPS table overwrite of active flowsinclude/net/rps.h net/core/dev.c net/core/net-sysfs.c+65 -100 repliesApplied
2/2net: Cache hash and flow_id to avoid recalculationnet/core/dev.c+7 -80 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.

Read the v7 thread

Cover letter [RESEND PATCH v7 net-next 0/2] net: Prevent RPS table overwrite of active flows

As requested, I am resending the same [3] patch after the 6.17 merge window. It applies cleanly to the current net-next tree and has been tested under heavy traffic for 15 minutes.

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() (this patch depends on the first).

[1] lore.kernel.org/netdev/[email protected]/
[2] lore.kernel.org/netdev/[email protected]/

---
v7: Improve readability of rps_flow_is_active() and remove some
unnecessary comments.
v6: Keep 'hash' in 'rps_dev_flow' under aRFS config.
v5: Same v4 patch sent with a change in documentation style for "return".
v4: Same v3 patch sent as a new thread instead of a continuation.
v3: Wrapped rps_flow_is_active() in #ifdef CONFIG_RFS_ACCEL to fix
unused function warning reported by kernel test robot.
v2: Split original patch into two: RPS table overwrite prevention and hash/
flow_id caching.

Krishna Kumar (2):
net: Prevent RPS table overwrite of active flows
net: Cache hash and flow_id to avoid recalculation

 include/net/rps.h    |  7 +++--
 net/core/dev.c       | 71 +++++++++++++++++++++++++++++++++++++-------
 net/core/net-sysfs.c |  4 ++-
 3 files changed, 68 insertions(+), 14 deletions(-)
Signature · 1 line
2.39.5