aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <[email protected]>2023-10-01 13:13:01 +0100
committerDavid S. Miller <[email protected]>2023-10-01 13:13:01 +0100
commit66ac08a7385fa8a5d3312ca96d1399670cfca0eb (patch)
tree9adaa63e9e4419985dd767117601c312cb5880c5 /include
parent236f3873b517acfaf949c23bb2d5dec13bfd2da2 (diff)
parentbbf80d713fe75cfbecda26e7c03a9a8d22af2f4f (diff)
Merge branch 'tcp_delack_max'
Eric Dumazet says: ==================== tcp: add tcp_delack_max() First patches are adding const qualifiers to four existing helpers. Third patch adds a much needed companion feature to RTAX_RTO_MIN. ==================== Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h4
-rw-r--r--include/net/tcp.h6
2 files changed, 6 insertions, 4 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 56ac1abadea5..2800d587b08d 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2141,14 +2141,14 @@ static inline bool sk_rethink_txhash(struct sock *sk)
}
static inline struct dst_entry *
-__sk_dst_get(struct sock *sk)
+__sk_dst_get(const struct sock *sk)
{
return rcu_dereference_check(sk->sk_dst_cache,
lockdep_sock_is_held(sk));
}
static inline struct dst_entry *
-sk_dst_get(struct sock *sk)
+sk_dst_get(const struct sock *sk)
{
struct dst_entry *dst;
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 91688d0dadcd..af9cb37fbe53 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -718,8 +718,10 @@ static inline void tcp_fast_path_check(struct sock *sk)
tcp_fast_path_on(tp);
}
+u32 tcp_delack_max(const struct sock *sk);
+
/* Compute the actual rto_min value */
-static inline u32 tcp_rto_min(struct sock *sk)
+static inline u32 tcp_rto_min(const struct sock *sk)
{
const struct dst_entry *dst = __sk_dst_get(sk);
u32 rto_min = inet_csk(sk)->icsk_rto_min;
@@ -729,7 +731,7 @@ static inline u32 tcp_rto_min(struct sock *sk)
return rto_min;
}
-static inline u32 tcp_rto_min_us(struct sock *sk)
+static inline u32 tcp_rto_min_us(const struct sock *sk)
{
return jiffies_to_usecs(tcp_rto_min(sk));
}