enum tcp_lp_state
enum tcp_lp_state {
LP_VALID_RHZ,
LP_VALID_OWD,
LP_WITHIN_THR,
LP_WITHIN_INF
};
Constants
- LP_VALID_RHZ
- is remote HZ valid?
- LP_VALID_OWD
- is OWD valid?
- LP_WITHIN_THR
- are we within threshold?
- LP_WITHIN_INF
- are we within inference?
Description
TCP-LP's state flags.
We create this set of state flag mainly for debugging.
struct lp
struct lp {
u32 flag;
u32 sowd;
u32 owd_min;
u32 owd_max;
u32 owd_max_rsv;
u32 remote_hz;
u32 remote_ref_time;
u32 local_ref_time;
u32 last_drop;
u32 inference;
};
Members
- flag
- TCP-LP state flag
- sowd
- smoothed OWD << 3
- owd_min
- min OWD
- owd_max
- max OWD
- owd_max_rsv
- resrved max owd
- remote_hz
- estimated remote HZ
- remote_ref_time
- remote reference time
- local_ref_time
- local reference time
- last_drop
- time for last active drop
- inference
- current inference
Description
TCP-LP's private struct.
We get the idea from original TCP-LP implementation where only left those we
found are really useful.
Function
void
tcp_lp_init
(struct sock * sk)
Arguments
Description
Init all required variables.
Clone the handling from Vegas module implementation.
Function
void
tcp_lp_cong_avoid
(struct sock * sk,
u32 ack,
u32 rtt,
u32 in_flight,
int flag)
Arguments
Description
Implementation of cong_avoid.
Will only call newReno CA when away from inference.
From TCP-LP's paper, this will be handled in additive increasement.
Function
u32
tcp_lp_remote_hz_estimator
(struct sock * sk)
Arguments
Description
Estimate remote HZ.
We keep on updating the estimated value, where original TCP-LP
implementation only guest it for once and use forever.
Function
u32
tcp_lp_owd_calculator
(struct sock * sk)
Arguments
Description
Calculate one way delay (in relative format).
Original implement OWD as minus of remote time difference to local time
difference directly. As this time difference just simply equal to RTT, when
the network status is stable, remote RTT will equal to local RTT, and result
OWD into zero.
It seems to be a bug and so we fixed it.
Function
void
tcp_lp_rtt_sample
(struct sock * sk,
u32 usrtt)
Arguments
Description
Implementation or rtt_sample.
Will take the following action,
1. calc OWD,
2. record the min/max OWD,
3. calc smoothed OWD (SOWD).
Most ideas come from the original TCP-LP implementation.
Function
void
tcp_lp_pkts_acked
(struct sock * sk,
u32 num_acked)
Arguments
Description
Implementation of pkts_acked.
Deal with active drop under Early Congestion Indication.
Only drop to half and 1 will be handle, because we hope to use back
newReno in increase case.
We work it out by following the idea from TCP-LP's paper directly

