mirror of https://github.com/torvalds/linux.git
tcp: remove inet_rtx_syn_ack()
inet_rtx_syn_ack() is a simple wrapper around tcp_rtx_synack(), if we move req->num_retrans update. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Neal Cardwell <ncardwell@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20250626153017.2156274-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
8d68411a12
commit
cf56a98202
|
|
@ -39,8 +39,6 @@ struct request_sock_ops {
|
|||
void (*syn_ack_timeout)(const struct request_sock *req);
|
||||
};
|
||||
|
||||
int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req);
|
||||
|
||||
struct saved_syn {
|
||||
u32 mac_hdrlen;
|
||||
u32 network_hdrlen;
|
||||
|
|
|
|||
|
|
@ -884,15 +884,6 @@ static void syn_ack_recalc(struct request_sock *req,
|
|||
req->num_timeout >= rskq_defer_accept - 1;
|
||||
}
|
||||
|
||||
int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req)
|
||||
{
|
||||
int err = tcp_rtx_synack(parent, req);
|
||||
|
||||
if (!err)
|
||||
req->num_retrans++;
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct request_sock *
|
||||
reqsk_alloc_noprof(const struct request_sock_ops *ops, struct sock *sk_listener,
|
||||
bool attach_listener)
|
||||
|
|
@ -1132,7 +1123,7 @@ static void reqsk_timer_handler(struct timer_list *t)
|
|||
req->rsk_ops->syn_ack_timeout(req);
|
||||
if (!expire &&
|
||||
(!resend ||
|
||||
!inet_rtx_syn_ack(sk_listener, req) ||
|
||||
!tcp_rtx_synack(sk_listener, req) ||
|
||||
inet_rsk(req)->acked)) {
|
||||
if (req->num_timeout++ == 0)
|
||||
atomic_dec(&queue->young);
|
||||
|
|
|
|||
|
|
@ -726,7 +726,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
|
|||
LINUX_MIB_TCPACKSKIPPEDSYNRECV,
|
||||
&tcp_rsk(req)->last_oow_ack_time) &&
|
||||
|
||||
!inet_rtx_syn_ack(sk, req)) {
|
||||
!tcp_rtx_synack(sk, req)) {
|
||||
unsigned long expires = jiffies;
|
||||
|
||||
expires += reqsk_timeout(req, TCP_RTO_MAX);
|
||||
|
|
|
|||
|
|
@ -4425,6 +4425,7 @@ int tcp_rtx_synack(const struct sock *sk, struct request_sock *req)
|
|||
tcp_sk_rw(sk)->total_retrans++;
|
||||
}
|
||||
trace_tcp_retransmit_synack(sk, req);
|
||||
req->num_retrans++;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ static void tcp_fastopen_synack_timer(struct sock *sk, struct request_sock *req)
|
|||
* regular retransmit because if the child socket has been accepted
|
||||
* it's not good to give up too easily.
|
||||
*/
|
||||
inet_rtx_syn_ack(sk, req);
|
||||
tcp_rtx_synack(sk, req);
|
||||
req->num_timeout++;
|
||||
tcp_update_rto_stats(sk);
|
||||
if (!tp->retrans_stamp)
|
||||
|
|
|
|||
Loading…
Reference in New Issue