mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
![Eric Dumazet](/assets/img/avatar_default.png)
We would like that optional info provided by Congestion Control modules using netlink can also be read using getsockopt() This patch changes get_info() to put this information in a buffer, instead of skb, like tcp_get_info(), so that following patch can reuse this common infrastructure. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Yuchung Cheng <ycheng@google.com> Cc: Neal Cardwell <ncardwell@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
25 lines
889 B
C
25 lines
889 B
C
/*
|
|
* TCP Vegas congestion control interface
|
|
*/
|
|
#ifndef __TCP_VEGAS_H
|
|
#define __TCP_VEGAS_H 1
|
|
|
|
/* Vegas variables */
|
|
struct vegas {
|
|
u32 beg_snd_nxt; /* right edge during last RTT */
|
|
u32 beg_snd_una; /* left edge during last RTT */
|
|
u32 beg_snd_cwnd; /* saves the size of the cwnd */
|
|
u8 doing_vegas_now;/* if true, do vegas for this RTT */
|
|
u16 cntRTT; /* # of RTTs measured within last RTT */
|
|
u32 minRTT; /* min of RTTs measured within last RTT (in usec) */
|
|
u32 baseRTT; /* the min of all Vegas RTT measurements seen (in usec) */
|
|
};
|
|
|
|
void tcp_vegas_init(struct sock *sk);
|
|
void tcp_vegas_state(struct sock *sk, u8 ca_state);
|
|
void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us);
|
|
void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event);
|
|
size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr,
|
|
union tcp_cc_info *info);
|
|
|
|
#endif /* __TCP_VEGAS_H */
|