From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <kerneljasonxing@gmail.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>,
<kernelxing@tencent.com>, <kuba@kernel.org>,
<netdev@vger.kernel.org>, <pabeni@redhat.com>,
<willemb@google.com>, <willemdebruijn.kernel@gmail.com>,
<kuniyu@amazon.com>
Subject: Re: [PATCH net-next v3] net-timestamp: namespacify the sysctl_tstamp_allow_data
Date: Thu, 3 Oct 2024 15:10:07 -0700 [thread overview]
Message-ID: <20241003221007.12918-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20241003104035.22374-1-kerneljasonxing@gmail.com>
From: Jason Xing <kerneljasonxing@gmail.com>
Date: Thu, 3 Oct 2024 19:40:35 +0900
> diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
> index 86a2476678c4..83622799eb80 100644
> --- a/net/core/sysctl_net_core.c
> +++ b/net/core/sysctl_net_core.c
> @@ -491,15 +491,6 @@ static struct ctl_table net_core_table[] = {
> .mode = 0644,
> .proc_handler = proc_dointvec,
> },
> - {
> - .procname = "tstamp_allow_data",
> - .data = &sysctl_tstamp_allow_data,
> - .maxlen = sizeof(int),
> - .mode = 0644,
> - .proc_handler = proc_dointvec_minmax,
> - .extra1 = SYSCTL_ZERO,
> - .extra2 = SYSCTL_ONE
> - },
> #ifdef CONFIG_RPS
> {
> .procname = "rps_sock_flow_entries",
> @@ -665,6 +656,15 @@ static struct ctl_table netns_core_table[] = {
> .extra2 = SYSCTL_ONE,
> .proc_handler = proc_dou8vec_minmax,
> },
> + {
> + .procname = "tstamp_allow_data",
> + .data = &init_net.core.sysctl_tstamp_allow_data,
> + .maxlen = sizeof(int),
> + .mode = 0644,
> + .proc_handler = proc_dointvec_minmax,
> + .extra1 = SYSCTL_ZERO,
> + .extra2 = SYSCTL_ONE
It's already limited to [0, 1], so you can use u8 and save 3 bytes.
grep -rnI proc_dou8vec_minmax.
next prev parent reply other threads:[~2024-10-03 22:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 10:40 [PATCH net-next v3] net-timestamp: namespacify the sysctl_tstamp_allow_data Jason Xing
2024-10-03 22:10 ` Kuniyuki Iwashima [this message]
2024-10-05 22:04 ` Jason Xing
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=20241003221007.12918-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kerneljasonxing@gmail.com \
--cc=kernelxing@tencent.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).