Information

tcp-lp.c

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

Documents

TCP Low Priority (TCP-LP)

Service prioritization among different traffic classes is an important goal for the future Internet. Conventional approaches to solving this problem consider the existing best-effort class as the low-priority class, and attempt to develop mechanisms that provide "better-than-best-effort" service.

Aleksandar Kuzmanovic and Edward W. Knightly explore the opposite approach, and devise a new distributed algorithm to realize a low-priority service (as compared to the existing best effort) from the network endpoints. To this end, they develop TCP Low Priority (TCP-LP), a distributed algorithm whose goal is to utilize only the excess network bandwidth as compared to the "fair share" of bandwidth as targeted by TCP.

The key mechanisms unique to TCP-LP congestion control are the use of one-way packet delays for congestion indications and a TCP-transparent congestion avoidance policy.

See TCP-LP Home Page for their implementation.

TCP Low Priority module (TCP-LP-MOD)

As of 2.6.13, Linux supports pluggable congestion control algorithms. Due
to the limitation of the API, we take the following changes from the original
TCP-LP implementation:

  • We use newReno in most core CA handling. Only add some checking within
    cong_avoid.

  • Add Error correcting in remote HZ, therefore remote HZ will be keeped on
    checking and updating.

  • Handle calculation of One-Way-Delay (OWD) within rtt_sample, sicne OWD
    have a similar meaning as RTT. Also correct the buggy formular.

  • Handle reaction for Early Congestion Indication (ECI) within pkts_acked,
    as mentioned within pseudo code.

  • Handle OWD in relative format, where local time stamp will in
    tcp_time_stamp format.
Syndicate content