net, ipv4, tcp_noord: minor cleanup

This commit addresses minor typos in the code, none of which
influenced its correct behavior.

Signed-off-by: Daniele Cristofori <daniele.cristofori89@gmail.com>
Signed-off-by: Stefano Alletto <alletto.s@gmail.com>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
net, ipv4, tcp_noord: fix shifting of rtt-related variables

Round trip times were considered as if stored in eights of a
millisecond. Actually, the RTT is passed to the pkts_acked() hook
as simple microseconds. This commit fixes the issue.

Signed-off-by: Daniele Cristofori <daniele.cristofori89@gmail.com>
Signed-off-by: Stefano Alletto <alletto.s@gmail.com>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
net, ipv4, tcp_noord: fix unit of measurement for tx_timer-related variables

The tx_timer variable of the noord structure is, at the moment, unused;
however, it should be used (and perhaps will be used) to set the RTO
according to TCP Noordwijk's needs. The RTO timeout is stored in
eights of microseconds: this commit prepares the variables to be
used for that purpose.

Signed-off-by: Daniele Cristofori <daniele.cristofori89@gmail.com>
Signed-off-by: Stefano Alletto <alletto.s@gmail.com>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
net, ipv4, tcp_noord: fix counting of packets per burst

The burst size is measured in packets; each ACK may regard more than
one packet, in case of cumulative ACKs, but currently the ack count
is incremented of one unit per ACK. Let the ACK count know how many
packets are being ACK'd.

Signed-off-by: Daniele Cristofori <daniele.cristofori89@gmail.com>
Signed-off-by: Stefano Alletto <alletto.s@gmail.com>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
net, ipv4, tcp_noord: improve check of burst exhaustion

It may happen that we receive a cumulative ACK that has the ACK
count exceed the burst size; in this case, the burst exhaustion
check would not succeed, even if the burst has been exhausted.
This commit lets the cong_avoid() hook handle this case.

Signed-off-by: Daniele Cristofori <daniele.cristofori89@gmail.com>
Signed-off-by: Stefano Alletto <alletto.s@gmail.com>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
net, ipv4, tcp_noord: remove initialization at each TX_START cwnd event

We are notified the TX_START event when some packet is being
transmitted and there are no packets in flight. However, this does
not necessarily mean that we are ending an idle period. Do not
re-initialize Noordwijk at each TX_START event.

Signed-off-by: Daniele Cristofori <daniele.cristofori89@gmail.com>
Signed-off-by: Stefano Alletto <alletto.s@gmail.com>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
net, ipv4, tcp_noord: make sure cwnd size is fixed across the burst

The sender congestion window size may be reset by the TCP core
implementation at each ACK or when the congestion window is restarted.
Let Noordwijk re-set it according to its needs to keep the burst
size fixed across the entire burst.

Signed-off-by: Daniele Cristofori <daniele.cristofori89@gmail.com>
Signed-off-by: Stefano Alletto <alletto.s@gmail.com>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
net, ipv4, tcp_noord: improve estimation of burst duration

Currently, the duration of a burst is estimated as the difference
between the timestamps of the last and first ACKs of the burst.
However, mechanisms such as "delayed ACK" might reduce that temporal
distance and force Noordwijk to underestimate the duration of the
burst. This commit lets Noordwijk use the TX_START event and the
ACK count to estimate the duration of the burst. Please see the
code for further details.

Signed-off-by: Daniele Cristofori <daniele.cristofori89@gmail.com>
Signed-off-by: Stefano Alletto <alletto.s@gmail.com>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
net, ipv4, tcp_noord: change burst size to obtain a rate of 480 Kbps

This small change was made to simplify tests made according to the
description given in Roseti and Kristiansen (2008).

Signed-off-by: Daniele Cristofori <daniele.cristofori89@gmail.com>
Signed-off-by: Stefano Alletto <alletto.s@gmail.com>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>