Skip to content

Commit 680367b

Browse files
committed
Merge branch 'tcp-remove-rtx_syn_ack-and-inet_rtx_syn_ack'
Eric Dumazet says: ==================== tcp: remove rtx_syn_ack and inet_rtx_syn_ack() After DCCP removal, we can cleanup SYNACK retransmits a bit. ==================== Link: https://patch.msgid.link/20250626153017.2156274-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents bf3b1d3 + cf56a98 commit 680367b

File tree

7 files changed

+4
-18
lines changed

7 files changed

+4
-18
lines changed

include/net/request_sock.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ struct request_sock_ops {
3030
unsigned int obj_size;
3131
struct kmem_cache *slab;
3232
char *slab_name;
33-
int (*rtx_syn_ack)(const struct sock *sk,
34-
struct request_sock *req);
3533
void (*send_ack)(const struct sock *sk, struct sk_buff *skb,
3634
struct request_sock *req);
3735
void (*send_reset)(const struct sock *sk,
@@ -41,8 +39,6 @@ struct request_sock_ops {
4139
void (*syn_ack_timeout)(const struct request_sock *req);
4240
};
4341

44-
int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req);
45-
4642
struct saved_syn {
4743
u32 mac_hdrlen;
4844
u32 network_hdrlen;

net/ipv4/inet_connection_sock.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -884,15 +884,6 @@ static void syn_ack_recalc(struct request_sock *req,
884884
req->num_timeout >= rskq_defer_accept - 1;
885885
}
886886

887-
int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req)
888-
{
889-
int err = req->rsk_ops->rtx_syn_ack(parent, req);
890-
891-
if (!err)
892-
req->num_retrans++;
893-
return err;
894-
}
895-
896887
static struct request_sock *
897888
reqsk_alloc_noprof(const struct request_sock_ops *ops, struct sock *sk_listener,
898889
bool attach_listener)
@@ -1132,7 +1123,7 @@ static void reqsk_timer_handler(struct timer_list *t)
11321123
req->rsk_ops->syn_ack_timeout(req);
11331124
if (!expire &&
11341125
(!resend ||
1135-
!inet_rtx_syn_ack(sk_listener, req) ||
1126+
!tcp_rtx_synack(sk_listener, req) ||
11361127
inet_rsk(req)->acked)) {
11371128
if (req->num_timeout++ == 0)
11381129
atomic_dec(&queue->young);

net/ipv4/tcp_ipv4.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,6 @@ static struct dst_entry *tcp_v4_route_req(const struct sock *sk,
17031703
struct request_sock_ops tcp_request_sock_ops __read_mostly = {
17041704
.family = PF_INET,
17051705
.obj_size = sizeof(struct tcp_request_sock),
1706-
.rtx_syn_ack = tcp_rtx_synack,
17071706
.send_ack = tcp_v4_reqsk_send_ack,
17081707
.destructor = tcp_v4_reqsk_destructor,
17091708
.send_reset = tcp_v4_send_reset,

net/ipv4/tcp_minisocks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
726726
LINUX_MIB_TCPACKSKIPPEDSYNRECV,
727727
&tcp_rsk(req)->last_oow_ack_time) &&
728728

729-
!inet_rtx_syn_ack(sk, req)) {
729+
!tcp_rtx_synack(sk, req)) {
730730
unsigned long expires = jiffies;
731731

732732
expires += reqsk_timeout(req, TCP_RTO_MAX);

net/ipv4/tcp_output.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4425,6 +4425,7 @@ int tcp_rtx_synack(const struct sock *sk, struct request_sock *req)
44254425
tcp_sk_rw(sk)->total_retrans++;
44264426
}
44274427
trace_tcp_retransmit_synack(sk, req);
4428+
req->num_retrans++;
44284429
}
44294430
return res;
44304431
}

net/ipv4/tcp_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static void tcp_fastopen_synack_timer(struct sock *sk, struct request_sock *req)
478478
* regular retransmit because if the child socket has been accepted
479479
* it's not good to give up too easily.
480480
*/
481-
inet_rtx_syn_ack(sk, req);
481+
tcp_rtx_synack(sk, req);
482482
req->num_timeout++;
483483
tcp_update_rto_stats(sk);
484484
if (!tp->retrans_stamp)

net/ipv6/tcp_ipv6.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,6 @@ static struct dst_entry *tcp_v6_route_req(const struct sock *sk,
835835
struct request_sock_ops tcp6_request_sock_ops __read_mostly = {
836836
.family = AF_INET6,
837837
.obj_size = sizeof(struct tcp6_request_sock),
838-
.rtx_syn_ack = tcp_rtx_synack,
839838
.send_ack = tcp_v6_reqsk_send_ack,
840839
.destructor = tcp_v6_reqsk_destructor,
841840
.send_reset = tcp_v6_send_reset,

0 commit comments

Comments
 (0)