From: Yingjie Wang <x-professor@outlook.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Yingjie Wang <x-professor@outlook.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@kernel.org" <edumazet@kernel.org>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"horms@kernel.org" <horms@kernel.org>,
"shuah@kernel.org" <shuah@kernel.org>,
"phx0fer@gmail.com" <phx0fer@gmail.com>,
"wang.zhan@smartx.com" <wang.zhan@smartx.com>,
"kuniyu@google.com" <kuniyu@google.com>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH net v2 0/2] net: preserve rps_default_mask on failed writes
Date: Thu, 29 Oct 2026 15:10:34 +0000 [thread overview]
Message-ID: <cover.1793286626.git.x-professor@outlook.com> (raw)
rps_default_mask_sysctl() parses and validates writes in the live
per-netns mask. Both the bitmap parser and housekeeping validation can
modify that mask before returning an error, so a failed write can change
the default applied to RX queues created later.
Parse and validate a temporary mask before publishing it, and add a
regression test for a partially parsed invalid value.
On the base kernel, the new test fails because the mask changes from 1
to 3. With the fix, all ten rps_default_mask selftests pass. Tests with
isolated CPUs also confirm that overflow and housekeeping failures leave
the mask unchanged, while valid writes continue to work.
Changes since v1:
- Parse and validate the temporary mask before taking
rps_default_mask_mutex, as suggested by Wang Zhan.
- Add Wang Zhan's Reviewed-by and Tested-by tags to patch 1.
- Add Kuniyuki Iwashima to Cc.
v1: https://lore.kernel.org/r/cover.1793199118.git.x-professor@outlook.com
Yingjie Wang (2):
net: preserve rps_default_mask on failed writes
selftests: net: check failed rps_default_mask writes
net/core/sysctl_net_core.c | 31 ++++++++++---------
.../testing/selftests/net/rps_default_mask.sh | 23 ++++++++++++++
2 files changed, 40 insertions(+), 14 deletions(-)
base-commit: fcc00b15cb21a6de76826e5012b2c758505f5e65
--
2.43.0
next reply other threads:[~2026-10-29 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 15:10 Yingjie Wang [this message]
2026-10-29 15:10 ` [PATCH net v2 1/2] net: preserve rps_default_mask on failed writes Yingjie Wang
2026-10-29 15:10 ` [PATCH net v2 2/2] selftests: net: check failed rps_default_mask writes Yingjie Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1793286626.git.x-professor@outlook.com \
--to=x-professor@outlook.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=phx0fer@gmail.com \
--cc=shuah@kernel.org \
--cc=wang.zhan@smartx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.