xref: /linux/net/ipv4/tcp_vegas.h (revision 756ee1729b2feb3a45767da29e338f70f2086ba3)
17752237eSStephen Hemminger /*
27752237eSStephen Hemminger  * TCP Vegas congestion control interface
37752237eSStephen Hemminger  */
47752237eSStephen Hemminger #ifndef __TCP_VEGAS_H
57752237eSStephen Hemminger #define __TCP_VEGAS_H 1
67752237eSStephen Hemminger 
77752237eSStephen Hemminger /* Vegas variables */
87752237eSStephen Hemminger struct vegas {
97752237eSStephen Hemminger 	u32	beg_snd_nxt;	/* right edge during last RTT */
107752237eSStephen Hemminger 	u32	beg_snd_una;	/* left edge  during last RTT */
117752237eSStephen Hemminger 	u32	beg_snd_cwnd;	/* saves the size of the cwnd */
127752237eSStephen Hemminger 	u8	doing_vegas_now;/* if true, do vegas for this RTT */
137752237eSStephen Hemminger 	u16	cntRTT;		/* # of RTTs measured within last RTT */
147752237eSStephen Hemminger 	u32	minRTT;		/* min of RTTs measured within last RTT (in usec) */
157752237eSStephen Hemminger 	u32	baseRTT;	/* the min of all Vegas RTT measurements seen (in usec) */
167752237eSStephen Hemminger };
177752237eSStephen Hemminger 
187e58487bSJoe Perches void tcp_vegas_init(struct sock *sk);
197e58487bSJoe Perches void tcp_vegas_state(struct sock *sk, u8 ca_state);
20*756ee172SLawrence Brakmo void tcp_vegas_pkts_acked(struct sock *sk, const struct ack_sample *sample);
217e58487bSJoe Perches void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event);
2264f40ff5SEric Dumazet size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr,
2364f40ff5SEric Dumazet 			  union tcp_cc_info *info);
247752237eSStephen Hemminger 
257752237eSStephen Hemminger #endif	/* __TCP_VEGAS_H */
26