hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/net/rxrpc/protocol.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* packet.h: Rx packet layout and definitions
23 *
34 * Copyright (C) 2002, 2007 Red Hat, Inc. All Rights Reserved.
45 * Written by David Howells (dhowells@redhat.com)
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version
9
- * 2 of the License, or (at your option) any later version.
106 */
117
128 #ifndef _LINUX_RXRPC_PACKET_H
....@@ -93,6 +89,15 @@
9389 #define RXRPC_JUMBO_DATALEN 1412 /* non-terminal jumbo packet data length */
9490 #define RXRPC_JUMBO_SUBPKTLEN (RXRPC_JUMBO_DATALEN + sizeof(struct rxrpc_jumbo_header))
9591
92
+/*
93
+ * The maximum number of subpackets that can possibly fit in a UDP packet is:
94
+ *
95
+ * ((max_IP - IP_hdr - UDP_hdr) / RXRPC_JUMBO_SUBPKTLEN) + 1
96
+ * = ((65535 - 28 - 28) / 1416) + 1
97
+ * = 46 non-terminal packets and 1 terminal packet.
98
+ */
99
+#define RXRPC_MAX_NR_JUMBO 47
100
+
96101 /*****************************************************************************/
97102 /*
98103 * on-the-wire Rx ACK packet data payload