
Rafal,
Rafal Jaworowski wrote:
Dave,
I'm having problems with tftp transfer with current U-Boot running on MPC5121 (FEC controller); since your mcast tftp implementation we first attempt to transfer using some bigger blocksize: #define TFTP_MTU_BLOCKSIZE 1468, and it seems my problems are related to this size.
When running current code (ET_DEBUG enabled) it fails like the following:
=> run load Using FEC ETHERNET device TFTP from server 192.168.1.1; our IP address is 192.168.160.77 Filename '/tftpboot/ads5121/u-boot.bin'. Load address: 0x100000 Loading: send option "timeout 5" Got OACK: timeout 5 Blocksize ack: 1468, 1468 T T T T T T T T T T Retry count exceeded; starting again Using FEC ETHERNET device TFTP from server 192.168.1.1; our IP address is 192.168.160.77 Filename '/tftpboot/ads5121/u-boot.bin'. Load address: 0x100000 Loading: send option "timeout 5" Got OACK: timeout 5 Blocksize ack: 1468, 1468
Abort =>
It fails with TFTP_MTU_BLOCKSIZE values above 1454, but it's ok with anything up to this (including 1454):
=> run load Using FEC ETHERNET device TFTP from server 192.168.1.1; our IP address is 192.168.160.77 Filename '/tftpboot/ads5121/u-boot.bin'. Load address: 0x100000 Loading: send option "timeout 5" Got OACK: timeout 5 Blocksize ack: 1454, 1454 ########### done Bytes transferred = 157720 (26818 hex) =>
Any hints on these observations? What might be going wrong here?
kind regards, Rafal
TFTP packets are structured as follows:
| Eth header (14 bytes) | IP header (20 bytes) | UDP header (8 bytes) | TFTP message | Eth FCS (4 bytes) |
You can see that the total overhead is 46 bytes. If your network port's maximum MTU size is 1500 bytes (the default), the math works out for a maximum TFTP PDU size of 1454 bytes.
However... the Ethernet header/trailer is not supposed to be included in the MTU. I suspect we have a terminology problem here. Let me dig a bit further to find out what's going on.
regards, Ben