Commit a158bdd
committed
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 <[email protected]>1 parent 4812417 commit a158bdd
File tree
11 files changed
+290
-201
lines changed- include
- trace/events
- uapi/linux
- net/rxrpc
11 files changed
+290
-201
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
141 | 147 | | |
142 | 148 | | |
143 | 149 | | |
| 150 | + | |
144 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
145 | 155 | | |
146 | 156 | | |
147 | 157 | | |
| |||
296 | 306 | | |
297 | 307 | | |
298 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
299 | 315 | | |
300 | 316 | | |
| 317 | + | |
301 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
302 | 322 | | |
303 | 323 | | |
304 | | - | |
| 324 | + | |
305 | 325 | | |
306 | 326 | | |
307 | 327 | | |
| |||
932 | 952 | | |
933 | 953 | | |
934 | 954 | | |
935 | | - | |
| 955 | + | |
936 | 956 | | |
937 | | - | |
| 957 | + | |
938 | 958 | | |
939 | 959 | | |
940 | 960 | | |
941 | 961 | | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
948 | 970 | | |
949 | 971 | | |
950 | 972 | | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
959 | 982 | | |
960 | 983 | | |
961 | | - | |
| 984 | + | |
962 | 985 | | |
963 | 986 | | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
968 | 993 | | |
969 | 994 | | |
970 | 995 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
472 | 471 | | |
473 | 472 | | |
| 473 | + | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
521 | 525 | | |
522 | 526 | | |
523 | 527 | | |
| |||
697 | 701 | | |
698 | 702 | | |
699 | 703 | | |
700 | | - | |
701 | | - | |
702 | 704 | | |
703 | 705 | | |
704 | 706 | | |
705 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
706 | 717 | | |
707 | 718 | | |
708 | 719 | | |
| |||
843 | 854 | | |
844 | 855 | | |
845 | 856 | | |
846 | | - | |
847 | | - | |
| 857 | + | |
| 858 | + | |
848 | 859 | | |
849 | 860 | | |
850 | 861 | | |
| |||
976 | 987 | | |
977 | 988 | | |
978 | 989 | | |
979 | | - | |
980 | | - | |
981 | | - | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
982 | 993 | | |
983 | 994 | | |
984 | 995 | | |
985 | | - | |
| 996 | + | |
986 | 997 | | |
987 | 998 | | |
988 | 999 | | |
| |||
0 commit comments