diff options
author | Eric Dumazet <edumazet@google.com> | 2021-11-15 11:02:44 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-16 13:10:34 +0000 |
commit | b96c51bd3bd826a3391cbf4b1281a1e0bf9df90a (patch) | |
tree | 5c22c21b70de3d7a840e110466291592bf5bdbc0 /net/ipv4/tcp_input.c | |
parent | 7b6a893a5991f5e8a56795155ae86333b03080b7 (diff) | |
download | linux-b96c51bd3bd826a3391cbf4b1281a1e0bf9df90a.tar.bz2 |
tcp: tp->urg_data is unlikely to be set
Use some unlikely() hints in the fast path.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 5ee07a337652..3658b9c3dd2b 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -5604,11 +5604,11 @@ static void tcp_urg(struct sock *sk, struct sk_buff *skb, const struct tcphdr *t struct tcp_sock *tp = tcp_sk(sk); /* Check if we get a new urgent pointer - normally not. */ - if (th->urg) + if (unlikely(th->urg)) tcp_check_urg(sk, th); /* Do we wait for any urgent data? - normally not... */ - if (tp->urg_data == TCP_URG_NOTYET) { + if (unlikely(tp->urg_data == TCP_URG_NOTYET)) { u32 ptr = tp->urg_seq - ntohl(th->seq) + (th->doff * 4) - th->syn; |