diff options
author | David Howells <dhowells@redhat.com> | 2019-08-19 09:25:37 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-08-27 09:48:37 +0100 |
commit | c3c9e3df49f8d83db09d1f61c8bed54e7fed8662 (patch) | |
tree | 693139ea0c2fa31cbb88ad32702db92725be1405 /net/rxrpc/protocol.h | |
parent | cfef46d692efd852a0da6803f920cc756eea2855 (diff) |
rxrpc: Improve jumbo packet counting
Improve the information stored about jumbo packets so that we don't need to
reparse them so much later.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Diffstat (limited to 'net/rxrpc/protocol.h')
-rw-r--r-- | net/rxrpc/protocol.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/rxrpc/protocol.h b/net/rxrpc/protocol.h index 99ce322d7caa..49bb972539aa 100644 --- a/net/rxrpc/protocol.h +++ b/net/rxrpc/protocol.h @@ -89,6 +89,15 @@ struct rxrpc_jumbo_header { #define RXRPC_JUMBO_DATALEN 1412 /* non-terminal jumbo packet data length */ #define RXRPC_JUMBO_SUBPKTLEN (RXRPC_JUMBO_DATALEN + sizeof(struct rxrpc_jumbo_header)) +/* + * The maximum number of subpackets that can possibly fit in a UDP packet is: + * + * ((max_IP - IP_hdr - UDP_hdr) / RXRPC_JUMBO_SUBPKTLEN) + 1 + * = ((65535 - 28 - 28) / 1416) + 1 + * = 46 non-terminal packets and 1 terminal packet. + */ +#define RXRPC_MAX_NR_JUMBO 47 + /*****************************************************************************/ /* * on-the-wire Rx ACK packet data payload |