]> git.baikalelectronics.ru Git - kernel.git/commit
can: isotp: set max PDU size to 64 kByte
authorOliver Hartkopp <socketcan@hartkopp.net>
Wed, 9 Mar 2022 12:04:14 +0000 (13:04 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 10 Mar 2022 08:23:45 +0000 (09:23 +0100)
commit7dab4f873d35d1605c694e96d2cbbf540cdd2a42
tree444c740c184c62181d77cfb95e2c9130a0526db8
parent19f035c1ee79af384f5d88df7fa4c87e757e65b3
can: isotp: set max PDU size to 64 kByte

The reason to extend the max PDU size from 4095 Byte (12 bit length value)
to a 32 bit value (up to 4 GByte) was to be able to flash 64 kByte
bootloaders with a single ISO-TP PDU. The max PDU size in the Linux kernel
implementation was set to 8200 Bytes to be able to test the length
information escape sequence.

It turns out that the demand for 64 kByte PDUs is real so the value for
MAX_MSG_LENGTH is set to 66000 to be able to potentially add some checksums
to the 65.536 Byte block.

Link: https://github.com/linux-can/can-utils/issues/347#issuecomment-1056142301
Link: https://lore.kernel.org/all/20220309120416.83514-3-socketcan@hartkopp.net
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/isotp.c