[syslinux] TFTP progress indicator

WormFood syslinux-ml at wormfood.net
Fri Apr 24 07:03:53 PDT 2015

On Fri, 2015-04-24 at 11:11 +0100, Paul Civati via Syslinux wrote:
> Some observations/thoughts...  as I originally asked this question and have been
> meaning to look at the code with a view to contributing something.
> TFTP is not the only transport mechanism now, we also have http via lpxelinux.0
> although I don't know how the code is organised.  I am definitely using http
> transfer now for large images in my setup, it is so so much quicker!

   In my tests, I found http to be only slightly faster than tftp. Like
a few seconds difference, for a file that takes about 2 1/2 minutes to

   This patch also works for http, but displays the progress for small
files several times. For example, a 3.5 meg file, will display the
progress 4 times, while a 200 meg file will only display it once. I'm
not sure why it's acting this way, and I haven't found the code that is
causing a difference.

   Also, it's worth noting, in my tests, this patch, only added 0.05
seconds overhead, for small files, and for large files, it made
absolutely no difference at all (in my tests, sometimes displaying the
progress was faster, than not displaying it).

> Not all TFTP servers (as I understand it) will give out the size of the file being
> fetched, so in cases where it does you can calculate a percentage but in cases
> where you don't know, you'd have to print progress per some arbitrary amount
> of blocks/bytes/whatever.

   That is a very valid point, that I was unaware of. What tftp server
can I test with, that doesn't report size? My patch should be easy
enough to modify, to just print dots, for files of unknown size. One
way, is to commit this patch, then wait for bug reports from people with
tftp servers that don't report file size. ;)

More information about the Syslinux mailing list