]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: avoid dst->ops->check() call in tcp_v{4,6}_do_rcv()
authorEric Dumazet <edumazet@google.com>
Fri, 6 Mar 2026 15:43:22 +0000 (15:43 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Mar 2026 01:52:56 +0000 (18:52 -0700)
commit82f36517a13e6339ddd9737d8a310949e057e596
tree57a9f6164b9482a6daf4114f57f77a1da3682376
parent6927430735802bd8bc5dbe352edbd94a04459567
tcp: avoid dst->ops->check() call in tcp_v{4,6}_do_rcv()

If incoming skb dst matches the socket cached one,
there is no need to call again dst->ops->check().

Network layer already validated the skb dst for us,
usually from tcp_v{4,6}_early_demux().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260306154322.1086539-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c