aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/ar-ack.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rxrpc/ar-ack.c')
-rw-r--r--net/rxrpc/ar-ack.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/ar-ack.c
index 1a490d976e7e..c6be17a959a6 100644
--- a/net/rxrpc/ar-ack.c
+++ b/net/rxrpc/ar-ack.c
@@ -43,6 +43,26 @@ unsigned rxrpc_soft_ack_delay = 1 * HZ;
43 */ 43 */
44unsigned rxrpc_idle_ack_delay = 0.5 * HZ; 44unsigned rxrpc_idle_ack_delay = 0.5 * HZ;
45 45
46/*
47 * Receive window size in packets. This indicates the maximum number of
48 * unconsumed received packets we're willing to retain in memory. Once this
49 * limit is hit, we should generate an EXCEEDS_WINDOW ACK and discard further
50 * packets.
51 */
52unsigned rxrpc_rx_window_size = 32;
53
54/*
55 * Maximum Rx MTU size. This indicates to the sender the size of jumbo packet
56 * made by gluing normal packets together that we're willing to handle.
57 */
58unsigned rxrpc_rx_mtu = 5692;
59
60/*
61 * The maximum number of fragments in a received jumbo packet that we tell the
62 * sender that we're willing to handle.
63 */
64unsigned rxrpc_rx_jumbo_max = 4;
65
46static const char *rxrpc_acks(u8 reason) 66static const char *rxrpc_acks(u8 reason)
47{ 67{
48 static const char *const str[] = { 68 static const char *const str[] = {
@@ -1195,11 +1215,11 @@ send_ACK:
1195 mtu = call->conn->trans->peer->if_mtu; 1215 mtu = call->conn->trans->peer->if_mtu;
1196 mtu -= call->conn->trans->peer->hdrsize; 1216 mtu -= call->conn->trans->peer->hdrsize;
1197 ackinfo.maxMTU = htonl(mtu); 1217 ackinfo.maxMTU = htonl(mtu);
1198 ackinfo.rwind = htonl(32); 1218 ackinfo.rwind = htonl(rxrpc_rx_window_size);
1199 1219
1200 /* permit the peer to send us jumbo packets if it wants to */ 1220 /* permit the peer to send us jumbo packets if it wants to */
1201 ackinfo.rxMTU = htonl(5692); 1221 ackinfo.rxMTU = htonl(rxrpc_rx_mtu);
1202 ackinfo.jumbo_max = htonl(4); 1222 ackinfo.jumbo_max = htonl(rxrpc_rx_jumbo_max);
1203 1223
1204 hdr.serial = htonl(atomic_inc_return(&call->conn->serial)); 1224 hdr.serial = htonl(atomic_inc_return(&call->conn->serial));
1205 _proto("Tx ACK %%%u { m=%hu f=#%u p=#%u s=%%%u r=%s n=%u }", 1225 _proto("Tx ACK %%%u { m=%hu f=#%u p=#%u s=%%%u r=%s n=%u }",