| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* packet.h: Rx packet layout and definitions |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Copyright (C) 2002, 2007 Red Hat, Inc. All Rights Reserved. |
|---|
| 4 | 5 | * 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. |
|---|
| 10 | 6 | */ |
|---|
| 11 | 7 | |
|---|
| 12 | 8 | #ifndef _LINUX_RXRPC_PACKET_H |
|---|
| .. | .. |
|---|
| 93 | 89 | #define RXRPC_JUMBO_DATALEN 1412 /* non-terminal jumbo packet data length */ |
|---|
| 94 | 90 | #define RXRPC_JUMBO_SUBPKTLEN (RXRPC_JUMBO_DATALEN + sizeof(struct rxrpc_jumbo_header)) |
|---|
| 95 | 91 | |
|---|
| 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 | + |
|---|
| 96 | 101 | /*****************************************************************************/ |
|---|
| 97 | 102 | /* |
|---|
| 98 | 103 | * on-the-wire Rx ACK packet data payload |
|---|