Thread (82 messages) 82 messages, 5 authors, 2016-08-06

Re: [PATCH v3 05/10] pack-protocol: fix maximum pkt-line size

flat view

From: Lars Schneider <hidden>
Date: 2016-08-01 12:23:37

On 30 Jul 2016, at 15:58, Jakub Narębski [off-list ref] wrote:

W dniu 30.07.2016 o 01:37, larsxschneider@gmail.com pisze:
quoted
From: Lars Schneider <redacted>

According to LARGE_PACKET_MAX in pkt-line.h the maximal lenght of a
pkt-line packet is 65520 bytes. The pkt-line header takes 4 bytes and
therefore the pkt-line data component must not exceed 65516 bytes.
s/lenght/length/
Thanks!

Is it maximum length of pkt-line packet, or maximum length of data
that can be send in a packet?
65520 is the maximum length of a pkt-line.

With 4 hex digits, maximal length if pkt-line packet (together
with length) is ffff_16, that is 2^16-1 = 65535.  Where does the
number 65520 comes from?
Historic reasons, I guess? However, it won't be changed. See response
from Peff here:
http://public-inbox.org/git/20160726134257.GB19277%40sigill.intra.peff.net/

quoted
Signed-off-by: Lars Schneider <redacted>
---
Documentation/technical/protocol-common.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/technical/protocol-common.txt b/Documentation/technical/protocol-common.txt
index bf30167..ecedb34 100644
--- a/Documentation/technical/protocol-common.txt
+++ b/Documentation/technical/protocol-common.txt
@@ -67,9 +67,9 @@ with non-binary data the same whether or not they contain the trailing
LF (stripping the LF if present, and not complaining when it is
missing).

-The maximum length of a pkt-line's data component is 65520 bytes.
-Implementations MUST NOT send pkt-line whose length exceeds 65524
-(65520 bytes of payload + 4 bytes of length data).
+The maximum length of a pkt-line's data component is 65516 bytes.
+Implementations MUST NOT send pkt-line whose length exceeds 65520
+(65516 bytes of payload + 4 bytes of length data).

Implementations SHOULD NOT send an empty pkt-line ("0004").
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help