android_kernel_xiaomi_sm7250/net
David S. Miller 01ff367e62 [TCP]: Revert 6b251858d3
But retain the comment fix.

Alexey Kuznetsov has explained the situation as follows:

--------------------

I think the fix is incorrect. Look, the RFC function init_cwnd(mss) is
not continuous: f.e. for mss=1095 it needs initial window 1095*4, but
for mss=1096 it is 1096*3. We do not know exactly what mss sender used
for calculations. If we advertised 1096 (and calculate initial window
3*1096), the sender could limit it to some value < 1096 and then it
will need window his_mss*4 > 3*1096 to send initial burst.

See?

So, the honest function for inital rcv_wnd derived from
tcp_init_cwnd() is:

	init_rcv_wnd(mss)=
	  min { init_cwnd(mss1)*mss1 for mss1 <= mss }

It is something sort of:

	if (mss < 1096)
		return mss*4;
	if (mss < 1096*2)
		return 1096*4;
	return mss*2;

(I just scrablled a graph of piece of paper, it is difficult to see or
to explain without this)

I selected it differently giving more window than it is strictly
required.  Initial receive window must be large enough to allow sender
following to the rfc (or just setting initial cwnd to 2) to send
initial burst.  But besides that it is arbitrary, so I decided to give
slack space of one segment.

Actually, the logic was:

If mss is low/normal (<=ethernet), set window to receive more than
initial burst allowed by rfc under the worst conditions
i.e. mss*4. This gives slack space of 1 segment for ethernet frames.

For msses slighlty more than ethernet frame, take 3. Try to give slack
space of 1 frame again.

If mss is huge, force 2*mss. No slack space.

Value 1460*3 is really confusing. Minimal one is 1096*2, but besides
that it is an arbitrary value. It was meant to be ~4096. 1460*3 is
just the magic number from RFC, 1460*3 = 1095*4 is the magic :-), so
that I guess hands typed this themselves.

--------------------

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-29 17:07:20 -07:00
..
802 [TR]: Set correct frame type for SNAP packets 2005-09-22 04:51:56 -03:00
8021q [8021Q]: Add endian annotations. 2005-09-19 15:41:28 -07:00
appletalk [APPLETALK]: Fix broadcast bug. 2005-09-27 16:11:29 -07:00
atm [ATM]: fix bug in atm address list handling 2005-09-28 16:35:22 -07:00
ax25 [AX.25]: Reformat ax25_proto_ops initialization 2005-09-12 14:25:25 -07:00
bluetooth [Bluetooth] Prevent RFCOMM connections through the RAW socket 2005-09-13 01:32:31 +02:00
bridge [BRIDGE]: TSO fix in br_dev_queue_push_xmit 2005-09-22 23:35:34 -07:00
core Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2005-09-29 08:56:47 -07:00
dccp [DCCP]: Introduce CCID getsockopt for the CCIDs 2005-09-18 00:19:32 -07:00
decnet [PATCH] timer initialization cleanup: DEFINE_TIMER 2005-09-09 14:03:48 -07:00
econet [NET]: Store skb->timestamp as offset to a base timestamp 2005-08-29 15:58:24 -07:00
ethernet [NET]: Fix reversed logic in eth_type_trans(). 2005-09-28 22:37:53 -07:00
ieee80211 [PATCH] proc_mkdir() should be used to create procfs directories 2005-09-29 08:46:26 -07:00
ipv4 [TCP]: Revert 6b251858d3 2005-09-29 17:07:20 -07:00
ipv6 [IPV6]: Fix [Bug 5306] Oops on IPv6 route lookup 2005-09-26 15:10:16 -07:00
ipx [NET]: Fix sparse warnings 2005-08-29 16:01:32 -07:00
irda [IRDA]: *irttp cleanup 2005-09-24 16:55:17 -07:00
key
lapb
llc [LLC]: fix llc_ui_recvmsg, making it behave like tcp_recvmsg 2005-09-22 08:29:08 -03:00
netfilter [NETFILTER]: Fix HW checksum handling in nfnetlink_queue 2005-09-06 15:10:00 -07:00
netlink [NETLINK]: Don't prevent creating sockets when no kernel socket is registered 2005-09-06 15:43:59 -07:00
netrom [NETROM]: Introduct stuct nr_private 2005-09-12 14:28:03 -07:00
packet [AF_PACKET]: Remove bogus checks added to packet_sendmsg(). 2005-09-26 15:23:58 -07:00
rose [ROSE]: fix typo (regeistration) 2005-09-27 15:45:15 -07:00
rxrpc [RXRPC]: Fix build failure introduced by skb->stamp changes. 2005-08-29 16:01:24 -07:00
sched [PATCH] timer initialization cleanup: DEFINE_TIMER 2005-09-09 14:03:48 -07:00
sctp [SCTP]: Fix SCTP_SHUTDOWN notifications. 2005-09-22 23:48:38 -07:00
sunrpc [PATCH] Code cleanups in calbacks in svcsock 2005-09-13 08:22:32 -07:00
unix [NET]: Fix sparse warnings 2005-08-29 16:01:32 -07:00
wanrouter [TCP]: Move the tcp sock states to net/tcp_states.h 2005-08-29 15:41:54 -07:00
x25 [TCP]: Move the tcp sock states to net/tcp_states.h 2005-08-29 15:41:54 -07:00
xfrm [XFRM]: Always release dst_entry on error in xfrm_lookup 2005-09-08 15:11:55 -07:00
compat.c [PATCH] Fix 32bit sendmsg() flaw 2005-09-08 08:14:11 -07:00
Kconfig [NETFILTER] move nfnetlink options to right location in kconfig menu 2005-09-17 00:41:21 -07:00
Makefile /spare/repo/netdev-2.6 branch 'master' 2005-09-01 18:02:01 -04:00
nonet.c
socket.c [NET]: Fix module reference counts for loadable protocol modules 2005-09-27 15:23:38 -07:00
sysctl_net.c [NET]: Fix sparse warnings 2005-08-29 16:01:32 -07:00
TUNABLE