net: introduce default_rps_mask netns attribute

If RPS is enabled, this allows configuring a default rps
mask, which is effective since receive queue creation time.

A default RPS mask allows the system admin to ensure proper
isolation, avoiding races at network namespace or device
creation time.

The default RPS mask is initially empty, and can be
modified via a newly added sysctl entry.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Paolo Abeni
2023-02-07 19:44:57 +01:00
committed by Jakub Kicinski
parent 370ca718fd
commit 605cfa1b10
4 changed files with 50 additions and 1 deletions
+6
View File
@@ -215,6 +215,12 @@ rmem_max
The maximum receive socket buffer size in bytes.
rps_default_mask
----------------
The default RPS CPU mask used on newly created network devices. An empty
mask means RPS disabled by default.
tstamp_allow_data
-----------------
Allow processes to receive tx timestamps looped together with the original