MFC r243147:

 Change fetch(1) to:
 o Report the instantaneous bandwidth instead of an average since the
   beginning of the download.
 o At the finish of the download report the average bandwidth and also
   the total time it took instead of 00m00s.

 Reviewed by:	des

MFC r244058:

 Fix bandwidth reporting when doing a restarted download with "-r".
 The offset is already accounted for in xs->lastrcvd and doesn't
 have to be subtracted again.

 Reported by:	Florian Smeets <flo@smeets.im>
 Submitted by:	Mateusz Guzik <mjguzik@gmail.com>
 Tested by:	Florian Smeets <flo@smeets.im>
MFC r244039:

 Remove outdated reference to tcp inflight tuning.
MFC r242251, r242311:

 Defer sending an independent window update if a delayed ACK is pending
 saving a packet.  The window update then gets piggy-backed on the next
 already scheduled ACK.

MFC r242252:

 Prevent a flurry of forced window updates when an application is
 doing small reads on a (partially) filled receive socket buffer.

 Normally one would a send a window update every time the available
 space in the socket buffer increases by two times MSS.  This leads
 to a flurry of window updates that do not provide any meaningful
 new information to the sender.  There still is available space in
 the window and the sender can continue sending data.  All window
 updates then get carried by the regular ACKs.  Only when the socket
 buffer was (almost) full and the window closed accordingly a window
 updates delivery new information and allows the sender to start
 sending more data again.

 Send window updates only every two MSS when the socket buffer
 has less than 1/8 space available, or the available space in the
 socket buffer increased by 1/4 its full capacity, or the socket
 buffer is very small.  The next regular data ACK will carry and
 report the exact window size again.

 Reported by:	sbruno
 Tested by:	darrenr
 Tested by:	Darren Baginski
 PR:		kern/116335
MFC r242257:

 Remove bogus 'else' in #ifdef that prevented the rttvar from being reset
 tcp_timer_rexmt() on retransmit for IPv6 sessions.

MFC r242260:

 When retransmitting SYN in TCPS_SYN_SENT state use TCPTV_RTOBASE,
 the default retransmit timeout, as base to calculate the backoff
 time until next try instead of the TCP_REXMTVAL() macro which only
 works correctly when we already have measured an actual RTT+RTTVAR.

MFC r242263, r242264:

 Add SACK_PERMIT to the list of TCP options that are switched off after
 retransmitting a SYN three times.

MFC r242267:

 If the user has closed the socket then drop a persisting connection
 after a much reduced timeout.

 Typically web servers close their sockets quickly under the assumption
 that the TCP connections goes away as well.  That is not entirely true
 however.  If the peer closed the window we're going to wait for a long
 time with lots of data in the send buffer.
MFC r242256:

 Improve m_cat() by being able to also merge contents from M_EXT
 mbuf's by doing proper testing with M_WRITABLE().

 In m_collapse() replace an incomplete manual check for M_RDONLY
 with the M_WRITABLE() macro that also tests for shared buffers
 and other cases that make a particular mbuf immutable.