xref: /OK3568_Linux_fs/kernel/net/ipv4/tcp_vegas.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * TCP Vegas congestion control interface
4*4882a593Smuzhiyun  */
5*4882a593Smuzhiyun #ifndef __TCP_VEGAS_H
6*4882a593Smuzhiyun #define __TCP_VEGAS_H 1
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun /* Vegas variables */
9*4882a593Smuzhiyun struct vegas {
10*4882a593Smuzhiyun 	u32	beg_snd_nxt;	/* right edge during last RTT */
11*4882a593Smuzhiyun 	u32	beg_snd_una;	/* left edge  during last RTT */
12*4882a593Smuzhiyun 	u32	beg_snd_cwnd;	/* saves the size of the cwnd */
13*4882a593Smuzhiyun 	u8	doing_vegas_now;/* if true, do vegas for this RTT */
14*4882a593Smuzhiyun 	u16	cntRTT;		/* # of RTTs measured within last RTT */
15*4882a593Smuzhiyun 	u32	minRTT;		/* min of RTTs measured within last RTT (in usec) */
16*4882a593Smuzhiyun 	u32	baseRTT;	/* the min of all Vegas RTT measurements seen (in usec) */
17*4882a593Smuzhiyun };
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun void tcp_vegas_init(struct sock *sk);
20*4882a593Smuzhiyun void tcp_vegas_state(struct sock *sk, u8 ca_state);
21*4882a593Smuzhiyun void tcp_vegas_pkts_acked(struct sock *sk, const struct ack_sample *sample);
22*4882a593Smuzhiyun void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event);
23*4882a593Smuzhiyun size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr,
24*4882a593Smuzhiyun 			  union tcp_cc_info *info);
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun #endif	/* __TCP_VEGAS_H */
27