netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ij@kernel.org>
To: "Chia-Yu Chang (Nokia)" <chia-yu.chang@nokia-bell-labs.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	 "ncardwell@google.com" <ncardwell@google.com>,
	 "Koen De Schepper (Nokia)"
	<koen.de_schepper@nokia-bell-labs.com>,
	 "g.white@CableLabs.com" <g.white@CableLabs.com>,
	 "ingemar.s.johansson@ericsson.com"
	<ingemar.s.johansson@ericsson.com>,
	 "mirja.kuehlewind@ericsson.com" <mirja.kuehlewind@ericsson.com>,
	 "cheshire@apple.com" <cheshire@apple.com>,
	 "rs.ietf@gmx.at" <rs.ietf@gmx.at>,
	 "Jason_Livingood@comcast.com" <Jason_Livingood@comcast.com>,
	 "vidhi_goel@apple.com" <vidhi_goel@apple.com>,
	 "Olivier Tilmans (Nokia)" <olivier.tilmans@nokia.com>
Subject: RE: [PATCH net-next 17/44] tcp: accecn: AccECN negotiation
Date: Tue, 15 Oct 2024 23:31:37 +0300 (EEST)	[thread overview]
Message-ID: <3394a181-11c2-742c-b38f-ef80f35ea418@kernel.org> (raw)
In-Reply-To: <PAXPR07MB7984AD495ACF09289D78AA96A3452@PAXPR07MB7984.eurprd07.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 4244 bytes --]

On Tue, 15 Oct 2024, Chia-Yu Chang (Nokia) wrote:

> -----Original Message-----
> From: Ilpo Järvinen <ij@kernel.org> 
> Sent: Tuesday, October 15, 2024 9:50 PM
> To: Chia-Yu Chang (Nokia) <chia-yu.chang@nokia-bell-labs.com>
> Cc: netdev@vger.kernel.org; ncardwell@google.com; Koen De Schepper (Nokia) <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; Olivier Tilmans (Nokia) <olivier.tilmans@nokia.com>
> Subject: Re: [PATCH net-next 17/44] tcp: accecn: AccECN negotiation
> 
> 
> CAUTION: This is an external email. Please be very careful when clicking links or opening attachments. See the URL nok.it/ext for additional information.
> 
> 
> 
> On Tue, 15 Oct 2024, chia-yu.chang@nokia-bell-labs.com wrote:
> 
> > From: Ilpo Järvinen <ij@kernel.org>
> >
> > Accurate ECN negotiation parts based on the specification:
> >   https://tools.ietf.org/id/draft-ietf-tcpm-accurate-ecn-28.txt
> >
> > Accurate ECN is negotiated using ECE, CWR and AE flags in the TCP 
> > header. TCP falls back into using RFC3168 ECN if one of the ends 
> > supports only RFC3168-style ECN.
> >
> > The AccECN negotiation includes reflecting IP ECN field value seen in 
> > SYN and SYNACK back using the same bits as negotiation to allow 
> > responding to SYN CE marks and to detect ECN field mangling. CE marks 
> > should not occur currently because SYN=1 segments are sent with 
> > Non-ECT in IP ECN field (but proposal exists to remove this 
> > restriction).
> >
> > Reflecting SYN IP ECN field in SYNACK is relatively simple.
> > Reflecting SYNACK IP ECN field in the final/third ACK of the handshake 
> > is more challenging. Linux TCP code is not well prepared for using the 
> > final/third ACK a signalling channel which makes things somewhat 
> > complicated here.
> >
> > Co-developed-by: Olivier Tilmans <olivier.tilmans@nokia.com>
> > Signed-off-by: Olivier Tilmans <olivier.tilmans@nokia.com>
> > Signed-off-by: Ilpo Järvinen <ij@kernel.org>
> > Co-developed-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
> > Signed-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
> > ---
> >  include/linux/tcp.h        |   9 ++-
> >  include/net/tcp.h          |  80 +++++++++++++++++++-
> >  net/ipv4/syncookies.c      |   3 +
> >  net/ipv4/sysctl_net_ipv4.c |   2 +-
> >  net/ipv4/tcp.c             |   2 +
> >  net/ipv4/tcp_input.c       | 149 +++++++++++++++++++++++++++++++++----
> >  net/ipv4/tcp_ipv4.c        |   3 +-
> >  net/ipv4/tcp_minisocks.c   |  51 +++++++++++--
> >  net/ipv4/tcp_output.c      |  77 +++++++++++++++----
> >  net/ipv6/syncookies.c      |   1 +
> >  net/ipv6/tcp_ipv6.c        |   1 +
> >  11 files changed, 336 insertions(+), 42 deletions(-)
> >
> 
> > @@ -6358,6 +6446,13 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb)
> >               return;
> >
> >  step5:
> > +     if (unlikely(tp->wait_third_ack)) {
> > +             if (!tcp_ecn_disabled(tp))
> > +                     tp->wait_third_ack = 0;
> 
> I don't think !tcp_ecn_disabled(tp) condition is necessary and is harmful (I think I tried to explain this earlier but it seems there was a misunderstanding).
> 
> A third ACK is third ACK regardless of ECN mode and this entire code block should be skipped on subsequent ACKs after the third ACK. By adding that ECN mode condition, ->wait_third_ack cannot be set to zero if ECN mode get disabled which is harmful because then this code can never be skipped.
> 
> --
>  i.
> 
> If you read the only place I set this flag as 1 is with the same 
> condition if (!tcp_ecn_disabled(tp)), the original idea is to make it 
> symmetric when setting back to 0.
> Of course it might create problem if in future we change the condition 
> when set this flag as TRUE, then we need to change also here to set this 
> flag back to FALSE. But if this confusing, I can remove this if 
> condition in the next patches

My point is that something can change ECN mode in between so the symmetry 
argument doesn't really work here. You want to make sure wait_third_ack 
won't remain set if ECN got disable before we reach this line.

-- 
 i.

  reply	other threads:[~2024-10-15 20:31 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15 10:28 [PATCH net-next 00/44] DualPI2, Accurate ECN, TCP Prague patch series chia-yu.chang
2024-10-15 10:28 ` [PATCH net-next 01/44] sched: Add dualpi2 qdisc chia-yu.chang
2024-10-15 15:30   ` Jamal Hadi Salim
2024-10-15 15:40     ` Jakub Kicinski
2024-10-15 10:28 ` [PATCH net-next 02/44] tcp: reorganize tcp_in_ack_event() and tcp_count_delivered() chia-yu.chang
2024-10-15 10:28 ` [PATCH net-next 03/44] tcp: create FLAG_TS_PROGRESS chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 04/44] tcp: use BIT() macro in include/net/tcp.h chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 05/44] tcp: extend TCP flags to allow AE bit/ACE field chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 06/44] tcp: reorganize SYN ECN code chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 07/44] tcp: rework {__,}tcp_ecn_check_ce() -> tcp_data_ecn_check() chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 08/44] tcp: helpers for ECN mode handling chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 09/44] gso: AccECN support chia-yu.chang
2024-10-16  1:31   ` Jakub Kicinski
2024-10-15 10:29 ` [PATCH net-next 10/44] gro: prevent ACE field corruption & better AccECN handling chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 11/44] tcp: AccECN support to tcp_add_backlog chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 12/44] tcp: allow ECN bits in TOS/traffic class chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 13/44] tcp: Pass flags to __tcp_send_ack chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 14/44] tcp: fast path functions later chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 15/44] tcp: AccECN core chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 16/44] net: sysctl: introduce sysctl SYSCTL_FIVE chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 17/44] tcp: accecn: AccECN negotiation chia-yu.chang
2024-10-15 19:49   ` Ilpo Järvinen
2024-10-15 20:25     ` Chia-Yu Chang (Nokia)
2024-10-15 20:31       ` Ilpo Järvinen [this message]
2024-10-15 10:29 ` [PATCH net-next 18/44] tcp: accecn: add AccECN rx byte counters chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 19/44] tcp: allow embedding leftover into option padding chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 20/44] tcp: accecn: AccECN needs to know delivered bytes chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 21/44] tcp: sack option handling improvements chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 22/44] tcp: accecn: AccECN option chia-yu.chang
2024-10-16  1:32   ` Jakub Kicinski
2024-10-15 10:29 ` [PATCH net-next 23/44] tcp: accecn: AccECN option send control chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 24/44] tcp: accecn: AccECN option failure handling chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 25/44] tcp: accecn: AccECN option ceb/cep heuristic chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 26/44] tcp: accecn: AccECN ACE field multi-wrap heuristic chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 27/44] tcp: accecn: try to fit AccECN option with SACK chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 28/44] tcp: try to avoid safer when ACKs are thinned chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 29/44] gro: flushing when CWR is set negatively affects AccECN chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 30/44] tcp: accecn: Add ece_delta to rate_sample chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 31/44] tcp: L4S ECT(1) identifier for CC modules chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 32/44] tcp: disable RFC3168 fallback " chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 33/44] tcp: accecn: handle unexpected AccECN negotiation feedback chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 34/44] tcp: accecn: retransmit downgraded SYN in AccECN negotiation chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 35/44] tcp: move increment of num_retrans chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 36/44] tcp: accecn: retransmit SYN/ACK without AccECN option or non-AccECN SYN/ACK chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 37/44] tcp: accecn: unset ECT if receive or send ACE=0 in AccECN negotiaion chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 38/44] tcp: accecn: fallback outgoing half link to non-AccECN chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 39/44] tcp: accecn: verify ACE counter in 1st ACK after AccECN negotiation chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 40/44] tcp: accecn: stop sending AccECN option when loss ACK with AccECN option chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 41/44] Documentation: networking: Update ECN related sysctls chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 42/44] tcp: Add tso_segs() CC callback for TCP Prague chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 43/44] tcp: Add mss_cache_set_by_ca for CC algorithm to set MSS chia-yu.chang
2024-10-15 10:29 ` [PATCH net-next 44/44] tcp: Add the TCP Prague congestion control module chia-yu.chang
2024-10-15 10:51 ` [PATCH net-next 00/44] DualPI2, Accurate ECN, TCP Prague patch series Paolo Abeni
2024-10-15 15:14   ` Koen De Schepper (Nokia)
2024-10-15 17:52     ` Eric Dumazet
2024-10-15 19:30       ` 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=3394a181-11c2-742c-b38f-ef80f35ea418@kernel.org \
    --to=ij@kernel.org \
    --cc=Jason_Livingood@comcast.com \
    --cc=cheshire@apple.com \
    --cc=chia-yu.chang@nokia-bell-labs.com \
    --cc=g.white@CableLabs.com \
    --cc=ingemar.s.johansson@ericsson.com \
    --cc=koen.de_schepper@nokia-bell-labs.com \
    --cc=mirja.kuehlewind@ericsson.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=olivier.tilmans@nokia.com \
    --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;
as well as URLs for NNTP newsgroup(s).