mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
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 <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b0e3f1bdf9
commit
ebeef4bccc
@ -1124,7 +1124,7 @@ void tcp_rate_check_app_limited(struct sock *sk);
|
|||||||
*/
|
*/
|
||||||
static inline int tcp_is_sack(const struct tcp_sock *tp)
|
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)
|
static inline bool tcp_is_reno(const struct tcp_sock *tp)
|
||||||
|
Loading…
Reference in New Issue
Block a user