net: tcp: add a new tcp retransmission detection mechanism based-on last time out

This commit tries to speed up the process of tcp retransmission.  The 
tcp transmission detection can be categorized into two types.  One is
based-on time out, and another is based-on packet loss.

This new tcp retransmission detection can be as a time out based-on
mechanism.  In tcp_sock structure some new members are defined to save
more information about ack.  Here we save the highest sack seq number.
Then they will be used to detect the packet loss for normal packet and
retransmitted packet.

In tcp_mark_lost_retrans() function if skb->time_seq >= high_acked_seq,
we think that the retransmitted packet has lost.  In tcp_mark_time_lost()
function, we will traverse all packets and detect packets that have lost.

In this commit a new sysctl parameter 'net.ipv4.tcp_lto' (default: 0)
is defined so that it can be used to detect the packet loss.  When we
set this parameter (e.g. 25ms), if we receive a ack packet but the
time stamp is greater than this time out.  We believe that some packet
has lost.

Signed-off-by: Honghao Liu <tianlan.lhh@alibaba-inc.com>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
net: tcp: tcp packet loss detection based-on probe packet

In this commit we add a new packet loss detection mechanism base-on
probe packet in order to speed up the retransmission of TCP.

In general, we will record the highest acked sequence.  Once we receive
a ack packet which is before the highest acked sequence or 'tcp_lto'
has been time out, we think some packets have lost and we will reset
ssthresh and others parameters.

Here we initialize a new timer called 'probe timer' which is used to
send out the probe packet.  Once this timer is time out, a new function
called tcp_data_probe_timer() will be called to try to send probe
packet.  If the length of packet is less 40 bytes, we just send it out.
Otherwise, we need to construct a new packet with some data as probe
packet. 

In this commit two new sysctl parameters are defined, which are called
'net.ipv4.tcp_probe' and 'net.ipv4.tcp_probe_time'.  'tcp_probe' is used
to control the number of times that probe packet is sent out, and
'tcp_probe_time' is used to control the time out of probe packet.

Signed-off-by: Honghao Liu <tianlan.lhh@alibaba-inc.com>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>