rxrpc: Fix call timeouts
Fix the rxrpc call expiration timeouts and make them settable from
userspace. By analogy with other rx implementations, there should be three
timeouts:
(1) "Normal timeout"
This is set for all calls and is triggered if we haven't received any
packets from the peer in a while. It is measured from the last time
we received any packet on that call. This is not reset by any
connection packets (such as CHALLENGE/RESPONSE packets).
If a service operation takes a long time, the server should generate
PING ACKs at a duration that's substantially less than the normal
timeout so is to keep both sides alive. This is set at 1/6 of normal
timeout.
(2) "Idle timeout"
This is set only for a service call and is triggered if we stop
receiving the DATA packets that comprise the request data. It is
measured from the last time we received a DATA packet.
(3) "Hard timeout"
This can be set for a call and specified the maximum lifetime of that
call. It should not be specified by default. Some operations (such
as volume transfer) take a long time.
Allow userspace to set/change the timeouts on a call with sendmsg, using a
control message:
RXRPC_SET_CALL_TIMEOUTS
The data to the message is a number of 32-bit words, not all of which need
be given:
u32 hard_timeout; /* sec from first packet */
u32 idle_timeout; /* msec from packet Rx */
u32 normal_timeout; /* msec from data Rx */
This can be set in combination with any other sendmsg() that affects a
call.
Signed-off-by:
David Howells <dhowells@redhat.com>
Showing
- include/trace/events/rxrpc.h 47 additions, 22 deletionsinclude/trace/events/rxrpc.h
- include/uapi/linux/rxrpc.h 1 addition, 0 deletionsinclude/uapi/linux/rxrpc.h
- net/rxrpc/ar-internal.h 24 additions, 13 deletionsnet/rxrpc/ar-internal.h
- net/rxrpc/call_event.c 84 additions, 95 deletionsnet/rxrpc/call_event.c
- net/rxrpc/call_object.c 16 additions, 11 deletionsnet/rxrpc/call_object.c
- net/rxrpc/conn_client.c 2 additions, 2 deletionsnet/rxrpc/conn_client.c
- net/rxrpc/input.c 30 additions, 4 deletionsnet/rxrpc/input.c
- net/rxrpc/misc.c 7 additions, 12 deletionsnet/rxrpc/misc.c
- net/rxrpc/recvmsg.c 1 addition, 1 deletionnet/rxrpc/recvmsg.c
- net/rxrpc/sendmsg.c 49 additions, 10 deletionsnet/rxrpc/sendmsg.c
- net/rxrpc/sysctl.c 29 additions, 31 deletionsnet/rxrpc/sysctl.c
Loading
Please register or sign in to comment