From: Simon Horman <horms@kernel•org>
To: chia-yu.chang@nokia-bell-labs•com
Cc: pabeni@redhat•com, edumazet@google•com,
linux-doc@vger•kernel.org, corbet@lwn•net, dsahern@kernel•org,
kuniyu@amazon•com, bpf@vger•kernel.org, netdev@vger•kernel.org,
dave.taht@gmail•com, jhs@mojatatu•com, kuba@kernel•org,
stephen@networkplumber•org, xiyou.wangcong@gmail•com,
jiri@resnulli•us, davem@davemloft•net, andrew+netdev@lunn•ch,
donald.hunter@gmail•com, ast@fiberby•net, liuhangbin@gmail•com,
shuah@kernel•org, linux-kselftest@vger•kernel.org, ij@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 v13 net-next 11/14] tcp: accecn: AccECN option send control
Date: Sat, 19 Jul 2025 09:21:47 +0100 [thread overview]
Message-ID: <20250719082147.GP2459@horms.kernel.org> (raw)
In-Reply-To: <20250718142032.10725-12-chia-yu.chang@nokia-bell-labs.com>
On Fri, Jul 18, 2025 at 04:20:29PM +0200, chia-yu.chang@nokia-bell-labs•com wrote:
> @@ -549,4 +589,16 @@ tcp_ecn_make_synack(const struct request_sock *req, struct tcphdr *th)
> th->ece = 1;
> }
>
> +static inline bool tcp_accecn_option_beacon_check(const struct sock *sk)
> +{
> + u32 ecn_beacon = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_ecn_option_beacon);
> + struct tcp_sock *tp = tcp_sk(sk);
Hi Chia-Yu Chang,
This is not a full review, but I have observed a minor problem with this
patch.
Commit e9d9da91548b ("tcp: preserve const qualifier in tcp_sk()")
updated tcp_sk so that, as it's subject says, the const qualifier
of it's argument is preserved.
But here sk is not const while tp is not.
I think the solution here is to make tp const.
const struct tcp_sock *tp = tcp_sk(sk);
Flagged by GCC 15.1.0 and Clang 20.1.8 allmodconfig builds.
> +
> + if (!ecn_beacon)
> + return false;
> +
> + return tcp_stamp_us_delta(tp->tcp_mstamp, tp->accecn_opt_tstamp) * ecn_beacon >=
> + (tp->srtt_us >> 3);
> +}
> +
> #endif /* _LINUX_TCP_ECN_H */
--
pw-bot: changes-requested
next prev parent reply other threads:[~2025-07-19 8:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 14:20 [PATCH v13 net-next 00/14] AccECN protocol patch series chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 01/14] tcp: reorganize SYN ECN code chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 02/14] tcp: fast path functions later chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 03/14] tcp: reorganize tcp_sock_write_txrx group for variables later chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 04/14] tcp: ecn functions in separated include file chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 05/14] tcp: AccECN core chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 06/14] tcp: accecn: AccECN negotiation chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 07/14] tcp: accecn: add AccECN rx byte counters chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 08/14] tcp: accecn: AccECN needs to know delivered bytes chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 09/14] tcp: sack option handling improvements chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 10/14] tcp: accecn: AccECN option chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 11/14] tcp: accecn: AccECN option send control chia-yu.chang
2025-07-19 8:21 ` Simon Horman [this message]
2025-07-18 14:20 ` [PATCH v13 net-next 12/14] tcp: accecn: AccECN option failure handling chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 13/14] tcp: accecn: AccECN option ceb/cep and ACE field multi-wrap heuristics chia-yu.chang
2025-07-18 14:20 ` [PATCH v13 net-next 14/14] tcp: accecn: try to fit AccECN option with SACK chia-yu.chang
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=20250719082147.GP2459@horms.kernel.org \
--to=horms@kernel$(echo .)org \
--cc=Jason_Livingood@comcast$(echo .)com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=ast@fiberby$(echo .)net \
--cc=bpf@vger$(echo .)kernel.org \
--cc=cheshire@apple$(echo .)com \
--cc=chia-yu.chang@nokia-bell-labs$(echo .)com \
--cc=corbet@lwn$(echo .)net \
--cc=dave.taht@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=donald.hunter@gmail$(echo .)com \
--cc=dsahern@kernel$(echo .)org \
--cc=edumazet@google$(echo .)com \
--cc=g.white@cablelabs$(echo .)com \
--cc=ij@kernel$(echo .)org \
--cc=ingemar.s.johansson@ericsson$(echo .)com \
--cc=jhs@mojatatu$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=koen.de_schepper@nokia-bell-labs$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=kuniyu@amazon$(echo .)com \
--cc=linux-doc@vger$(echo .)kernel.org \
--cc=linux-kselftest@vger$(echo .)kernel.org \
--cc=liuhangbin@gmail$(echo .)com \
--cc=mirja.kuehlewind@ericsson$(echo .)com \
--cc=ncardwell@google$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=rs.ietf@gmx$(echo .)at \
--cc=shuah@kernel$(echo .)org \
--cc=stephen@networkplumber$(echo .)org \
--cc=vidhi_goel@apple$(echo .)com \
--cc=xiyou.wangcong@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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