From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: u-boot@lists.denx.de
Cc: Ramon Fried <rfried.dev@gmail.com>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>
Subject: TFTP hangs with fragmented IP packets
Date: Tue, 29 Mar 2022 23:28:23 +0300 [thread overview]
Message-ID: <YkNr537MNf1oUp3+@pendragon.ideasonboard.com> (raw)
[-- 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 --]
next reply other threads:[~2022-03-29 20:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 20:28 Laurent Pinchart [this message]
2022-03-31 5:43 ` TFTP hangs with fragmented IP packets Ramon Fried
2022-04-02 23:17 ` Ramon Fried
2022-04-05 23:11 ` Laurent Pinchart
2022-04-11 19:02 ` Tim Harvey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YkNr537MNf1oUp3+@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=marcel.ziswiler@toradex.com \
--cc=rfried.dev@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox