On Fri, Jan 8, 2021 at 2:08 PM Sedat Dilek <sedat.di...@gmail.com> wrote:
>
> On Wed, Aug 12, 2020 at 6:25 PM Eric Dumazet <eduma...@google.com> wrote:
>
> > > Also, I tried the diff for tcp_conn_request...
> > > With removing the call to prandom_u32() not useful for
> > > prandom_u32/tracing via perf.
> >
> > I am planning to send the TCP patch once net-next is open. (probably next 
> > week)
>
> Ping.
>
> What is the status of this?
>

I am attaching the updated diff against latest Linus Git.

- Sedat -
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index c7e16b0ed791..95ed49de4635 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -6852,10 +6852,12 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
 		isn = cookie_init_sequence(af_ops, sk, skb, &req->mss);
 		if (!tmp_opt.tstamp_ok)
 			inet_rsk(req)->ecn_ok = 0;
+		tcp_rsk(req)->txhash = skb->hash ?: 1;
+	} else {
+		tcp_rsk(req)->txhash = net_tx_rndhash();
 	}
 
 	tcp_rsk(req)->snt_isn = isn;
-	tcp_rsk(req)->txhash = net_tx_rndhash();
 	tcp_rsk(req)->syn_tos = TCP_SKB_CB(skb)->ip_dsfield;
 	tcp_openreq_init_rwin(req, sk, dst);
 	sk_rx_queue_set(req_to_sk(req), skb);

Reply via email to