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.org \
--cc=Jason_Livingood@comcast.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@fiberby.net \
--cc=bpf@vger.kernel.org \
--cc=cheshire@apple.com \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=corbet@lwn.net \
--cc=dave.taht@gmail.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=g.white@cablelabs.com \
--cc=ij@kernel.org \
--cc=ingemar.s.johansson@ericsson.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=koen.de_schepper@nokia-bell-labs.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=mirja.kuehlewind@ericsson.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rs.ietf@gmx.at \
--cc=shuah@kernel.org \
--cc=stephen@networkplumber.org \
--cc=vidhi_goel@apple.com \
--cc=xiyou.wangcong@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).