BPF List
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ij@kernel.org>
To: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	 kuba@kernel.org, pabeni@redhat.com, dsahern@kernel.org,
	 netfilter-devel@vger.kernel.org, kadlec@netfilter.org,
	 coreteam@netfilter.org, pablo@netfilter.org,
	bpf@vger.kernel.org,  joel.granados@kernel.org,
	linux-fsdevel@vger.kernel.org, kees@kernel.org,
	 mcgrof@kernel.org, ncardwell@google.com,
	 koen.de_schepper@nokia-bell-labs.com, g.white@CableLabs.com,
	 ingemar.s.johansson@ericsson.com, mirja.kuehlewind@ericsson.com,
	 cheshire@apple.com, rs.ietf@gmx.at, Jason_Livingood@comcast.com,
	 vidhi_goel@apple.com
Subject: Re: [PATCH v4 net-next 14/14] net: sysctl: introduce sysctl SYSCTL_FIVE
Date: Tue, 29 Oct 2024 23:29:58 +0200 (EET)	[thread overview]
Message-ID: <06fe294a-8c7c-36a7-7244-dcdab26adcf3@kernel.org> (raw)
In-Reply-To: <20241021215910.59767-15-chia-yu.chang@nokia-bell-labs.com>

On Mon, 21 Oct 2024, chia-yu.chang@nokia-bell-labs.com wrote:

> From: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
> 
> Add SYSCTL_FIVE for new AccECN feedback modes of net.ipv4.tcp_ecn.
> 
> Signed-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
> ---
>  include/linux/sysctl.h | 17 +++++++++--------
>  kernel/sysctl.c        |  3 ++-
>  2 files changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
> index aa4c6d44aaa0..37c95a70c10e 100644
> --- a/include/linux/sysctl.h
> +++ b/include/linux/sysctl.h
> @@ -37,21 +37,22 @@ struct ctl_table_root;
>  struct ctl_table_header;
>  struct ctl_dir;
>  
> -/* Keep the same order as in fs/proc/proc_sysctl.c */
> +/* Keep the same order as in kernel/sysctl.c */
>  #define SYSCTL_ZERO			((void *)&sysctl_vals[0])
>  #define SYSCTL_ONE			((void *)&sysctl_vals[1])
>  #define SYSCTL_TWO			((void *)&sysctl_vals[2])
>  #define SYSCTL_THREE			((void *)&sysctl_vals[3])
>  #define SYSCTL_FOUR			((void *)&sysctl_vals[4])
> -#define SYSCTL_ONE_HUNDRED		((void *)&sysctl_vals[5])
> -#define SYSCTL_TWO_HUNDRED		((void *)&sysctl_vals[6])
> -#define SYSCTL_ONE_THOUSAND		((void *)&sysctl_vals[7])
> -#define SYSCTL_THREE_THOUSAND		((void *)&sysctl_vals[8])
> -#define SYSCTL_INT_MAX			((void *)&sysctl_vals[9])
> +#define SYSCTL_FIVE			((void *)&sysctl_vals[5])
> +#define SYSCTL_ONE_HUNDRED		((void *)&sysctl_vals[6])
> +#define SYSCTL_TWO_HUNDRED		((void *)&sysctl_vals[7])
> +#define SYSCTL_ONE_THOUSAND		((void *)&sysctl_vals[8])
> +#define SYSCTL_THREE_THOUSAND		((void *)&sysctl_vals[9])
> +#define SYSCTL_INT_MAX			((void *)&sysctl_vals[10])
>  
>  /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
> -#define SYSCTL_MAXOLDUID		((void *)&sysctl_vals[10])
> -#define SYSCTL_NEG_ONE			((void *)&sysctl_vals[11])
> +#define SYSCTL_MAXOLDUID		((void *)&sysctl_vals[11])
> +#define SYSCTL_NEG_ONE			((void *)&sysctl_vals[12])
>  
>  extern const int sysctl_vals[];
>  
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 79e6cb1d5c48..68b6ca67a0c6 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -82,7 +82,8 @@
>  #endif
>  
>  /* shared constants to be used in various sysctls */
> -const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 };
> +const int sysctl_vals[] = { 0, 1, 2, 3, 4, 5, 100, 200, 1000, 3000, INT_MAX,
> +			   65535, -1 };
>  EXPORT_SYMBOL(sysctl_vals);
>  
>  const unsigned long sysctl_long_vals[] = { 0, 1, LONG_MAX };

Hi,

I know I suggested you to put this change into this first batch of 
AccECN patches but I've since come to other thoughts.

I think this should be moved to very tail of AccECN changes in the series
and joined together with the part of change which allows setting 
net.ipv4.tcp_ecn to those higher values. Currently the latter is done in 
the AccECN negotion patch (IIRC) but that part should be moved into a 
separate patch with this change only after all AccECN patches have been 
included to prevent enabling AccECN in incomplete form.

(This comment is orthogonal to Paolo's suggestion to use static constant.
So whichever form is chosen, it should be with the net.ipv4.tcp_ecn 
change at the end of AccECN changes.)

-- 
 i.


  parent reply	other threads:[~2024-10-29 21:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 21:58 [PATCH v4 net-next 00/14] AccECN protocol preparation patch series chia-yu.chang
2024-10-21 21:58 ` [PATCH v4 net-next 01/14] tcp: reorganize tcp_in_ack_event() and tcp_count_delivered() chia-yu.chang
2024-10-21 21:58 ` [PATCH v4 net-next 02/14] tcp: create FLAG_TS_PROGRESS chia-yu.chang
2024-10-21 21:58 ` [PATCH v4 net-next 03/14] tcp: use BIT() macro in include/net/tcp.h chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 04/14] tcp: extend TCP flags to allow AE bit/ACE field chia-yu.chang
2024-10-29 11:43   ` Paolo Abeni
2024-10-29 11:45     ` Paolo Abeni
2024-10-21 21:59 ` [PATCH v4 net-next 05/14] tcp: reorganize SYN ECN code chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 06/14] tcp: rework {__,}tcp_ecn_check_ce() -> tcp_data_ecn_check() chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 07/14] tcp: helpers for ECN mode handling chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 08/14] gso: AccECN support chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 09/14] gro: prevent ACE field corruption & better AccECN handling chia-yu.chang
2024-10-29 12:03   ` Paolo Abeni
2024-10-29 21:17     ` Ilpo Järvinen
2024-10-21 21:59 ` [PATCH v4 net-next 10/14] tcp: AccECN support to tcp_add_backlog chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 11/14] tcp: allow ECN bits in TOS/traffic class chia-yu.chang
2024-10-29 12:18   ` Paolo Abeni
2024-10-21 21:59 ` [PATCH v4 net-next 12/14] tcp: Pass flags to __tcp_send_ack chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 13/14] tcp: fast path functions later chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 14/14] net: sysctl: introduce sysctl SYSCTL_FIVE chia-yu.chang
2024-10-29 12:26   ` Paolo Abeni
2024-10-29 21:29   ` Ilpo Järvinen [this message]
2024-10-31 14:08   ` Joel Granados
2024-10-31 15:44     ` Chia-Yu Chang (Nokia)

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=06fe294a-8c7c-36a7-7244-dcdab26adcf3@kernel.org \
    --to=ij@kernel.org \
    --cc=Jason_Livingood@comcast.com \
    --cc=bpf@vger.kernel.org \
    --cc=cheshire@apple.com \
    --cc=chia-yu.chang@nokia-bell-labs.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=g.white@CableLabs.com \
    --cc=ingemar.s.johansson@ericsson.com \
    --cc=joel.granados@kernel.org \
    --cc=kadlec@netfilter.org \
    --cc=kees@kernel.org \
    --cc=koen.de_schepper@nokia-bell-labs.com \
    --cc=kuba@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mirja.kuehlewind@ericsson.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=rs.ietf@gmx.at \
    --cc=vidhi_goel@apple.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