From: "Ilpo Järvinen" <ij@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: chia-yu.chang@nokia-bell-labs.com, netdev@vger.kernel.org,
dsahern@gmail.com, davem@davemloft.net, dsahern@kernel.org,
pabeni@redhat.com, joel.granados@kernel.org, kuba@kernel.org,
andrew+netdev@lunn.ch, horms@kernel.org, pablo@netfilter.org,
kadlec@netfilter.org, netfilter-devel@vger.kernel.org,
coreteam@netfilter.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 v5 net-next 01/13] tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()
Date: Thu, 7 Nov 2024 21:32:54 +0200 (EET) [thread overview]
Message-ID: <fd509ff1-c97a-625f-6423-cf24871cf124@kernel.org> (raw)
In-Reply-To: <CANn89iLEC4Gwr1P8x3tpFVFObvB4nM5xt0F=nRBNe1hqYOLU9A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2432 bytes --]
On Thu, 7 Nov 2024, Eric Dumazet wrote:
> On Tue, Nov 5, 2024 at 11:07 AM <chia-yu.chang@nokia-bell-labs.com> wrote:
> >
> > From: Ilpo Järvinen <ij@kernel.org>
> >
> > - Move tcp_count_delivered() earlier and split tcp_count_delivered_ce()
> > out of it
> > - Move tcp_in_ack_event() later
> > - While at it, remove the inline from tcp_in_ack_event() and let
> > the compiler to decide
> >
> > Accurate ECN's heuristics does not know if there is going
> > to be ACE field based CE counter increase or not until after
> > rtx queue has been processed. Only then the number of ACKed
> > bytes/pkts is available. As CE or not affects presence of
> > FLAG_ECE, that information for tcp_in_ack_event is not yet
> > available in the old location of the call to tcp_in_ack_event().
> >
> > Signed-off-by: Ilpo Järvinen <ij@kernel.org>
> > Signed-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
> > ---
> > net/ipv4/tcp_input.c | 56 +++++++++++++++++++++++++-------------------
> > 1 file changed, 32 insertions(+), 24 deletions(-)
> >
> > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> > index 5bdf13ac26ef..fc52eab4fcc9 100644
> > --- a/net/ipv4/tcp_input.c
> > +++ b/net/ipv4/tcp_input.c
> > @@ -3856,12 +3861,23 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag)
> > }
> > }
> >
> > -static inline void tcp_in_ack_event(struct sock *sk, u32 flags)
> > +static void tcp_in_ack_event(struct sock *sk, int flag)
> > {
> > const struct inet_connection_sock *icsk = inet_csk(sk);
> >
> > - if (icsk->icsk_ca_ops->in_ack_event)
> > - icsk->icsk_ca_ops->in_ack_event(sk, flags);
> > + if (icsk->icsk_ca_ops->in_ack_event) {
> > + u32 ack_ev_flags = 0;
> > +
> > + if (flag & FLAG_WIN_UPDATE)
> > + ack_ev_flags |= CA_ACK_WIN_UPDATE;
> > + if (flag & FLAG_SLOWPATH) {
> > + ack_ev_flags = CA_ACK_SLOWPATH;
>
> This is removing the potential CA_ACK_WIN_UPDATE, I would suggest :
>
> ack_ev_flags |= CA_ACK_SLOWPATH;
Yes, a good catch.
--
i.
> > + if (flag & FLAG_ECE)
> > + ack_ev_flags |= CA_ACK_ECE;
> > + }
> > +
> > + icsk->icsk_ca_ops->in_ack_event(sk, ack_ev_flags);
> > + }
> > }
> >
> >
>
next prev parent reply other threads:[~2024-11-07 19:32 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 10:06 [PATCH v5 net-next 00/13] AccECN protocol preparation patch series chia-yu.chang
2024-11-05 10:06 ` [PATCH v5 net-next 01/13] tcp: reorganize tcp_in_ack_event() and tcp_count_delivered() chia-yu.chang
2024-11-07 9:31 ` Eric Dumazet
2024-11-07 19:32 ` Ilpo Järvinen [this message]
2024-11-05 10:06 ` [PATCH v5 net-next 02/13] tcp: create FLAG_TS_PROGRESS chia-yu.chang
2024-11-07 9:34 ` Eric Dumazet
2024-11-05 10:06 ` [PATCH v5 net-next 03/13] tcp: use BIT() macro in include/net/tcp.h chia-yu.chang
2024-11-07 10:20 ` Eric Dumazet
2024-11-05 10:06 ` [PATCH v5 net-next 04/13] tcp: extend TCP flags to allow AE bit/ACE field chia-yu.chang
2024-11-07 10:23 ` Eric Dumazet
2024-11-05 10:06 ` [PATCH v5 net-next 05/13] tcp: reorganize SYN ECN code chia-yu.chang
2024-11-07 10:25 ` Eric Dumazet
2024-11-05 10:06 ` [PATCH v5 net-next 06/13] tcp: rework {__,}tcp_ecn_check_ce() -> tcp_data_ecn_check() chia-yu.chang
2024-11-07 10:30 ` Eric Dumazet
2024-11-05 10:06 ` [PATCH v5 net-next 07/13] tcp: helpers for ECN mode handling chia-yu.chang
2024-11-07 12:26 ` Eric Dumazet
2024-11-05 10:06 ` [PATCH v5 net-next 08/13] gso: AccECN support chia-yu.chang
2024-11-07 12:41 ` Eric Dumazet
2024-11-09 10:09 ` Ilpo Järvinen
2024-11-09 19:42 ` Neal Cardwell
2024-11-09 21:38 ` Ilpo Järvinen
2024-11-05 10:06 ` [PATCH v5 net-next 09/13] gro: prevent ACE field corruption & better AccECN handling chia-yu.chang
2024-11-07 12:40 ` Eric Dumazet
2024-11-07 19:28 ` Ilpo Järvinen
2024-11-12 2:09 ` Chia-Yu Chang (Nokia)
2024-11-12 21:19 ` Ilpo Järvinen
2024-11-13 1:42 ` Jason Wang
2024-11-14 1:04 ` Chia-Yu Chang (Nokia)
2024-11-05 10:06 ` [PATCH v5 net-next 10/13] tcp: AccECN support to tcp_add_backlog chia-yu.chang
2024-11-07 12:42 ` Eric Dumazet
2024-11-05 10:06 ` [PATCH v5 net-next 11/13] tcp: allow ECN bits in TOS/traffic class chia-yu.chang
2024-11-07 12:55 ` Eric Dumazet
2024-11-05 10:06 ` [PATCH v5 net-next 12/13] tcp: Pass flags to __tcp_send_ack chia-yu.chang
2024-11-07 12:58 ` Eric Dumazet
2024-11-05 10:06 ` [PATCH v5 net-next 13/13] tcp: fast path functions later chia-yu.chang
2024-11-07 13:00 ` Eric Dumazet
2024-11-07 20:38 ` 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=fd509ff1-c97a-625f-6423-cf24871cf124@kernel.org \
--to=ij@kernel.org \
--cc=Jason_Livingood@comcast.com \
--cc=andrew+netdev@lunn.ch \
--cc=cheshire@apple.com \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=g.white@cablelabs.com \
--cc=horms@kernel.org \
--cc=ingemar.s.johansson@ericsson.com \
--cc=joel.granados@kernel.org \
--cc=kadlec@netfilter.org \
--cc=koen.de_schepper@nokia-bell-labs.com \
--cc=kuba@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;
as well as URLs for NNTP newsgroup(s).