]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: byte-based overload control on socket receive queue
authorYing Xue <ying.xue@windriver.com>
Sun, 20 Jan 2013 22:30:09 +0000 (23:30 +0100)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 15 Feb 2013 22:01:58 +0000 (17:01 -0500)
commit8f6861486bd94261a44a461779e05051795c5118
treebd22bd59d69f28e71f075912ec024082adf5a36a
parentaf2c721bac550ff7bf631127b97e7e844fe87fcf
tipc: byte-based overload control on socket receive queue

Change overload control to be purely byte-based, using
sk->sk_rmem_alloc as byte counter, and compare it to a calculated
upper limit for the socket receive queue.

For all connection messages, irrespective of message importance,
the overload limit is set to a constant value (i.e, 67MB). This
limit should normally never be reached because of the lower
limit used by the flow control algorithm, and is there only
as a last resort in case a faulty peer doesn't respect the send
window limit.

For datagram messages, message importance is taken into account
when calculating the overload limit. The calculation is based
on sk->sk_rcvbuf, and is hence configurable via the socket option
SO_RCVBUF.

Cc: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/tipc/socket.c