misc.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /* Miscellaneous bits
  3. *
  4. * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
  5. * Written by David Howells (dhowells@redhat.com)
  6. */
  7. #include <linux/kernel.h>
  8. #include <net/sock.h>
  9. #include <net/af_rxrpc.h>
  10. #include "ar-internal.h"
  11. /*
  12. * The maximum listening backlog queue size that may be set on a socket by
  13. * listen().
  14. */
  15. unsigned int rxrpc_max_backlog __read_mostly = 10;
  16. /*
  17. * How long to wait before scheduling an ACK with subtype DELAY (in ms).
  18. *
  19. * We use this when we've received new data packets. If those packets aren't
  20. * all consumed within this time we will send a DELAY ACK if an ACK was not
  21. * requested to let the sender know it doesn't need to resend.
  22. */
  23. unsigned long rxrpc_soft_ack_delay = 1000;
  24. /*
  25. * How long to wait before scheduling an ACK with subtype IDLE (in ms).
  26. *
  27. * We use this when we've consumed some previously soft-ACK'd packets when
  28. * further packets aren't immediately received to decide when to send an IDLE
  29. * ACK let the other end know that it can free up its Tx buffer space.
  30. */
  31. unsigned long rxrpc_idle_ack_delay = 500;
  32. /*
  33. * Receive window size in packets. This indicates the maximum number of
  34. * unconsumed received packets we're willing to retain in memory. Once this
  35. * limit is hit, we should generate an EXCEEDS_WINDOW ACK and discard further
  36. * packets.
  37. */
  38. unsigned int rxrpc_rx_window_size = 255;
  39. /*
  40. * Maximum Rx MTU size. This indicates to the sender the size of jumbo packet
  41. * made by gluing normal packets together that we're willing to handle.
  42. */
  43. unsigned int rxrpc_rx_mtu = 5692;
  44. /*
  45. * The maximum number of fragments in a received jumbo packet that we tell the
  46. * sender that we're willing to handle.
  47. */
  48. unsigned int rxrpc_rx_jumbo_max = 4;
  49. #ifdef CONFIG_AF_RXRPC_INJECT_RX_DELAY
  50. /*
  51. * The delay to inject into packet reception.
  52. */
  53. unsigned long rxrpc_inject_rx_delay;
  54. #endif