Skip to content

Commit 8d68411

Browse files
edumazetkuba-moo
authored andcommitted
tcp: remove rtx_syn_ack field
Now inet_rtx_syn_ack() is only used by TCP, it can directly call tcp_rtx_synack() instead of using an indirect call to req->rsk_ops->rtx_syn_ack(). 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-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent bf3b1d3 commit 8d68411

File tree

4 files changed

+1
-5
lines changed

4 files changed

+1
-5
lines changed

include/net/request_sock.h

Lines changed: 0 additions & 2 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,

net/ipv4/inet_connection_sock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ static void syn_ack_recalc(struct request_sock *req,
886886

887887
int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req)
888888
{
889-
int err = req->rsk_ops->rtx_syn_ack(parent, req);
889+
int err = tcp_rtx_synack(parent, req);
890890

891891
if (!err)
892892
req->num_retrans++;

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/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)