[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231129020827.94167-1-kuniyu@amazon.com>
Date: Tue, 28 Nov 2023 18:08:27 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <pabeni@...hat.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <horms@...nel.org>,
<kuba@...nel.org>, <kuni1840@...il.com>, <kuniyu@...zon.com>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH v2 net-next 8/8] tcp: Factorise cookie-dependent fields initialisation in cookie_v[46]_check()
From: Paolo Abeni <pabeni@...hat.com>
Date: Tue, 28 Nov 2023 11:34:56 +0100
> > @@ -245,7 +248,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
> > dst_metric(dst, RTAX_INITRWND));
> >
> > ireq->rcv_wscale = rcv_wscale;
> > - ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, net, dst);
> > + ireq->ecn_ok &= cookie_ecn_ok(net, dst);
>
> Nice cleanup! IMHO looks very good. But deserves Eric's explicit ack, I
> think ;)
>
> The only question I have (out of sheer curiosity, no change requested
> here) is:
>
> have you considered leaving the 'ecn_ok' initialization unchanged
> (looks a little cleaner as a single step init)? Is that for later's
> patch sake? (I haven't looked at them yet).
Yes, kfunc for bpf cookie validation will set ecn_ok bit first at the
tc hook, and then ecn_ok needs to be updated based on sysctl or dst.
https://lore.kernel.org/netdev/20231121184245.69569-11-kuniyu@amazon.com/
Powered by blists - more mailing lists