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

From: Jakub Kicinski <[email-masked]>
Date: Wed, 29 May 2024 10:48:46 -0700

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?