From: Eric Dumazet Date: Tue, 27 Nov 2018 22:42:00 +0000 (-0800) Subject: tcp: hint compiler about sack flows X-Git-Tag: for-linus-20190104~82^2~178^2~3 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ebeef4bcccf4681ba3de04fbf3a005f6054f7999;p=linux-2.6-block.git tcp: hint compiler about sack flows Tell the compiler that most TCP flows are using SACK these days. There is no need to add the unlikely() clause in tcp_is_reno(), the compiler is able to infer it. Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Signed-off-by: David S. Miller --- diff --git a/include/net/tcp.h b/include/net/tcp.h index 63e37dd1c274..0c61bf0a06da 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1124,7 +1124,7 @@ void tcp_rate_check_app_limited(struct sock *sk); */ static inline int tcp_is_sack(const struct tcp_sock *tp) { - return tp->rx_opt.sack_ok; + return likely(tp->rx_opt.sack_ok); } static inline bool tcp_is_reno(const struct tcp_sock *tp)