public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Nikolay Dimitrov <picmaster@mail.bg>
To: u-boot@lists.denx.de
Subject: [U-Boot] u-boot tftp problem
Date: Fri, 20 Feb 2015 17:50:41 +0200	[thread overview]
Message-ID: <54E757D1.5090605@mail.bg> (raw)
In-Reply-To: <54E747FF.3010106@mail.ru>

Hi PF4Public,

On 02/20/2015 04:43 PM, PF4Public wrote:
>  >When working with large TFTP packets (probably 4096 bytes, as set in
> your board config file), U-Boot TFTP code sends wrong acknowledges for
> the TFTP packets.
>
> But what is clear from traffic dumps is that a packet size never exceeds
> 516 when downloading from Linux machine's tftpd. Am I missing something
> here?

Hmm. Please check your boards' initial TFTP request packet, and
especially the "option blksize" field. My understanding is that it
should be the same as the size of all incoming TFTP data blocks, and
when they're not equal sized, U-Boot TFTP code has issues to reassemble
the fragments. That's why I recommended to use the default max TFTP
blocksize which is 1468 bytes and fits nicely in a single ethernet
frame.

This is based on my own observations some time ago when debugged
somewhat similar issues with U-Boot running on ARM, and trying to boot
from OpenBSD TFTP server.

>  >Reduce your TFTP blksize, by commenting CONFIG_TFTPBLOCKSIZE in your
> board config. The default value is 1468, which should work fine.
>
> I have tried reducing tftpblocksize with editenv command of U-Boot, that
> ensured reduced blocksizes, which was clearly visible in tcpdump, but
> sadly it didn't change a thing.
> Btw I cannot find CONFIG_TFTPBLOCKSIZE in the whole source tree of
> U-Boot: "grep -r CONFIG_TFTPBLOCKSIZE ." and "grep -r TFTPBLOCKSIZE ."
> gave no output.

Sorry for the confusion, it's CONFIG_TFTP_BLOCKSIZE.

Regards,
Nikolay

  reply	other threads:[~2015-02-20 15:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-14  2:05 [U-Boot] u-boot tftp problem PF4Public
2015-02-17 17:10 ` Joe Hershberger
2015-02-18 15:33   ` PF4Public
2015-02-18 17:31     ` Nikolay Dimitrov
     [not found]       ` <54E4CE0E.5000308@mail.bg>
2015-02-20 14:43         ` [U-Boot] Fwd: " PF4Public
2015-02-20 15:50           ` Nikolay Dimitrov [this message]
2015-02-20 16:51             ` [U-Boot] " PF4Public
2015-02-23 23:02               ` Joe Hershberger
2015-02-25 22:01                 ` PF4Public
2015-03-02 22:22                 ` PF4Public

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=54E757D1.5090605@mail.bg \
    --to=picmaster@mail.bg \
    --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