162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 262306a36Sopenharmony_ci/* Miscellaneous bits 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 562306a36Sopenharmony_ci * Written by David Howells (dhowells@redhat.com) 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#include <linux/kernel.h> 962306a36Sopenharmony_ci#include <net/sock.h> 1062306a36Sopenharmony_ci#include <net/af_rxrpc.h> 1162306a36Sopenharmony_ci#include "ar-internal.h" 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/* 1462306a36Sopenharmony_ci * The maximum listening backlog queue size that may be set on a socket by 1562306a36Sopenharmony_ci * listen(). 1662306a36Sopenharmony_ci */ 1762306a36Sopenharmony_ciunsigned int rxrpc_max_backlog __read_mostly = 10; 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci/* 2062306a36Sopenharmony_ci * How long to wait before scheduling an ACK with subtype DELAY (in jiffies). 2162306a36Sopenharmony_ci * 2262306a36Sopenharmony_ci * We use this when we've received new data packets. If those packets aren't 2362306a36Sopenharmony_ci * all consumed within this time we will send a DELAY ACK if an ACK was not 2462306a36Sopenharmony_ci * requested to let the sender know it doesn't need to resend. 2562306a36Sopenharmony_ci */ 2662306a36Sopenharmony_ciunsigned long rxrpc_soft_ack_delay = HZ; 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci/* 2962306a36Sopenharmony_ci * How long to wait before scheduling an ACK with subtype IDLE (in jiffies). 3062306a36Sopenharmony_ci * 3162306a36Sopenharmony_ci * We use this when we've consumed some previously soft-ACK'd packets when 3262306a36Sopenharmony_ci * further packets aren't immediately received to decide when to send an IDLE 3362306a36Sopenharmony_ci * ACK let the other end know that it can free up its Tx buffer space. 3462306a36Sopenharmony_ci */ 3562306a36Sopenharmony_ciunsigned long rxrpc_idle_ack_delay = HZ / 2; 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci/* 3862306a36Sopenharmony_ci * Receive window size in packets. This indicates the maximum number of 3962306a36Sopenharmony_ci * unconsumed received packets we're willing to retain in memory. Once this 4062306a36Sopenharmony_ci * limit is hit, we should generate an EXCEEDS_WINDOW ACK and discard further 4162306a36Sopenharmony_ci * packets. 4262306a36Sopenharmony_ci */ 4362306a36Sopenharmony_ciunsigned int rxrpc_rx_window_size = 255; 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci/* 4662306a36Sopenharmony_ci * Maximum Rx MTU size. This indicates to the sender the size of jumbo packet 4762306a36Sopenharmony_ci * made by gluing normal packets together that we're willing to handle. 4862306a36Sopenharmony_ci */ 4962306a36Sopenharmony_ciunsigned int rxrpc_rx_mtu = 5692; 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci/* 5262306a36Sopenharmony_ci * The maximum number of fragments in a received jumbo packet that we tell the 5362306a36Sopenharmony_ci * sender that we're willing to handle. 5462306a36Sopenharmony_ci */ 5562306a36Sopenharmony_ciunsigned int rxrpc_rx_jumbo_max = 4; 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci#ifdef CONFIG_AF_RXRPC_INJECT_RX_DELAY 5862306a36Sopenharmony_ci/* 5962306a36Sopenharmony_ci * The delay to inject into packet reception. 6062306a36Sopenharmony_ci */ 6162306a36Sopenharmony_ciunsigned long rxrpc_inject_rx_delay; 6262306a36Sopenharmony_ci#endif 63