Message ID | 1727103691-29383-1-git-send-email-guoxin0309@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] tcp: remove unnecessary update for tp->write_seq in tcp_connect() | expand |
On Mon, Sep 23, 2024 at 5:01 PM xin.guo <guoxin0309@gmail.com> wrote: > > From: "xin.guo" <guoxin0309@gmail.com> > > Commit 783237e8daf13("net-tcp: Fast Open client - sending SYN-data") > introduce tcp_connect_queue_skb() and it would overwrite tcp->write_seq, > so it is no need to update tp->write_seq before invoking > tcp_connect_queue_skb() > > Signed-off-by: xin.guo <guoxin0309@gmail.com> > --- > net/ipv4/tcp_output.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c > index 4fd746b..f255c7d 100644 > --- a/net/ipv4/tcp_output.c > +++ b/net/ipv4/tcp_output.c > @@ -4134,7 +4134,7 @@ int tcp_connect(struct sock *sk) > if (unlikely(!buff)) > return -ENOBUFS; > > - tcp_init_nondata_skb(buff, tp->write_seq++, TCPHDR_SYN); > + tcp_init_nondata_skb(buff, tp->write_seq, TCPHDR_SYN); > tcp_mstamp_refresh(tp); > tp->retrans_stamp = tcp_time_stamp_ts(tp); > tcp_connect_queue_skb(sk, buff); This seems fine, but net-next is currently closed. Documentation/process/maintainer-netdev.rst for the details.
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 4fd746b..f255c7d 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -4134,7 +4134,7 @@ int tcp_connect(struct sock *sk) if (unlikely(!buff)) return -ENOBUFS; - tcp_init_nondata_skb(buff, tp->write_seq++, TCPHDR_SYN); + tcp_init_nondata_skb(buff, tp->write_seq, TCPHDR_SYN); tcp_mstamp_refresh(tp); tp->retrans_stamp = tcp_time_stamp_ts(tp); tcp_connect_queue_skb(sk, buff);