]> git.baikalelectronics.ru Git - kernel.git/commit
kcm: Add receive message timeout
authorTom Herbert <tom@herbertland.com>
Mon, 7 Mar 2016 22:11:11 +0000 (14:11 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Mar 2016 21:36:15 +0000 (16:36 -0500)
commit443764935140d07f97161961cd715606b9092c3b
tree89287b971525eab8a238437e3e12959074f9fa63
parentf03d01d261fbd6c9976c5fb78c392127dd30b6b2
kcm: Add receive message timeout

This patch adds receive timeout for message assembly on the attached TCP
sockets. The timeout is set when a new messages is started and the whole
message has not been received by TCP (not in the receive queue). If the
completely message is subsequently received the timer is cancelled, if the
timer expires the RX side is aborted.

The timeout value is taken from the socket timeout (SO_RCVTIMEO) that is
set on a TCP socket (i.e. set by get sockopt before attaching a TCP socket
to KCM.

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/kcm.h
net/kcm/kcmproc.c
net/kcm/kcmsock.c