Re: [RFC net-next 07/15] net: psp: update the TCP MSS to reflect PSP packet overhead

Willem de Bruijn
2024-05-30T00:52:40Z

Jakub Kicinski wrote:
> On Sun, 12 May 2024 21:47:16 -0400 Willem de Bruijn wrote:
> > > - inet_csk(newsk)->icsk_ext_hdr_len = 0;
> > > + inet_csk(newsk)->icsk_ext_hdr_len = psp_sk_overhead(sk);
> > > if (opt)
> > > - inet_csk(newsk)->icsk_ext_hdr_len = opt->opt_nflen +
> > > - opt->opt_flen;
> > > + inet_csk(newsk)->icsk_ext_hdr_len += opt->opt_nflen +
> > > + opt->opt_flen;
> > >
> > > tcp_ca_openreq_child(newsk, dst);
> >
> > The below code adjusts ext_hdr_len and recalculates mss when
> > setting the tx association.
> >
> > Why already include it at connect and syn_recv, above?
> >
> > My assumption was that the upgrade to PSP only happens during
> > TCP_ESTABLISHED. But perhaps I'm wrong.
> >
> > Is it allowed to set rx and tx association even from as early as the
> > initial socket(), when still in TCP_CLOSE, client-side?
> >
> > Server-side, there is no connection fd to pass to netlink commands
> > before TCP_ESTABLISHED.
>
> Mostly for symmetry, really. IDK what's worse, the dead code or that
> someone may be surprised it's not there.. Should I delete it?

Symmetry with what?

This dead code had me scratching my head what it was doing, so my vote
to drop it. If you want something, maybe a code comment instead?