public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* TFTP hangs with fragmented IP packets
@ 2022-03-29 20:28 Laurent Pinchart
  2022-03-31  5:43 ` Ramon Fried
  0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2022-03-29 20:28 UTC (permalink / raw)
  To: u-boot; +Cc: Ramon Fried, Marcel Ziswiler

[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]

Hello,

I've banged my head a few days ago trying to debug an issue with a TFTP
transfer hanging in the middle.

I'm testing U-Boot 2022-rc5 on a Toradex Verdin i.MX8MP module (using
the verdin-imx8mp defconfig). My local network MTU is 1500 bytes, and
the board uses the EQoS ethernet controller.

The problem started occurring after rebuilding a kernel image. U-Boot
started transferring the image, and stopped in the middle, eventually
timing out. Capture network traffic showed that U-Boot was continuously
asking for retransmit of the same block, and eventually timed out.

U-Boot is configured with a default TFTP block size of 4096 bytes, which
results in the TFTP blocks being sent in one UDP packet split in three
IP packets. U-Boot is configured with IP fragmentation supprot enabled.
This works fine for all TFTP blocks until a paticular one in the middle
of the kernel image.

I've narrowed it down to a file of 1472 that can't be transferred at
all (I have attached the binary to this e-mail). Changing the value of
any of the last two bytes of the file allows transferring it correctly,
so I suspect a CRC issue, likely related to IP fragmentation. Lowering
the TFTP block size to avoid fragmentation works around the problem.

Arguably a TFTP block size of 4096 bytes should probably not be used
with a 1500 bytes MTU network, but I thought it would be useful to fix
the issue nonetheless.

I can test patches.

-- 
Regards,

Laurent Pinchart

[-- Attachment #2: test.bin --]
[-- Type: application/octet-stream, Size: 1472 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-11 19:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-29 20:28 TFTP hangs with fragmented IP packets Laurent Pinchart
2022-03-31  5:43 ` Ramon Fried
2022-04-02 23:17   ` Ramon Fried
2022-04-05 23:11     ` Laurent Pinchart
2022-04-11 19:02       ` Tim Harvey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox