Skip to content

net: introduce rps_default_mask

Paolo Abeni netdev 2 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 5 repliesApplied 4/4
  2. v34 patches 0 repliesSuperseded

Changes in v4 from the cover letter

- fix build warning

Patches in v4 All 4 applied

#Subject and filesSizeRepliesApplied
1/4net-sysctl: factor out cpumask parsing helpernet/core/sysctl_net_core.c+28 -181 replyApplied
2/4net-sysctl: factor-out rpm mask manipulation helpersnet/core/dev.h net/core/net-sysfs.c+44 -301 replyApplied
3/4net: introduce default_rps_mask netns attributeDocumentation/admin-guide/sysctl/net.rst include/linux/netdevice.h net/core/net-sysfs.c +1 more+50 -11 replyApplied
4/4self-tests: introduce self-tests for RPS default masktools/testing/selftests/net/Makefile tools/testing/selftests/net/config tools/testing/selftests/net/rps_default_mask.sh+61 -01 replyApplied

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSimon HormanEric Dumazet
SeriesR-b
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 net-next 0/4] net: introduce rps_default_mask

Real-time setups try hard to ensure proper isolation between time critical applications and e.g. network processing performed by the network stack in softirq and RPS is used to move the softirq activity away from the isolated core.

If the network configuration is dynamic, with netns and devices routinely created at run-time, enforcing the correct RPS setting on each newly created device allowing to transient bad configuration became complex.

Additionally, when multi-queue devices are involved, configuring rps in user-space on each queue easily becomes very expensive, e.g. some setups use veths with per cpu queues.

These series try to address the above, introducing a new sysctl knob: rps_default_mask. The new sysctl entry allows configuring a netns-wide RPS mask, to be enforced since receive queue creation time without any fourther per device configuration required.

Additionally, a simple self-test is introduced to check the rps_default_mask behavior.

v3 -> v4:
- fix build warning

v2 -> v3:
- reduce code duplication
- rebased

Paolo Abeni (4):
net-sysctl: factor out cpumask parsing helper
net-sysctl: factor-out rpm mask manipulation helpers
net: introduce default_rps_mask netns attribute
self-tests: introduce self-tests for RPS default mask

 Documentation/admin-guide/sysctl/net.rst      |  6 ++
 include/linux/netdevice.h                     |  1 +
 net/core/dev.h                                |  2 +
 net/core/net-sysfs.c                          | 79 +++++++++++-------
 net/core/sysctl_net_core.c                    | 81 ++++++++++++++-----
 tools/testing/selftests/net/Makefile          |  1 +
 tools/testing/selftests/net/config            |  3 +
 .../testing/selftests/net/rps_default_mask.sh | 57 +++++++++++++
 8 files changed, 182 insertions(+), 48 deletions(-)
 create mode 100755 tools/testing/selftests/net/rps_default_mask.sh
Signature · 1 line
2.39.1