This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RedBoot TFTP last block ack oddness
- From: David Vrabel <dvrabel at arcom dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Thu, 08 Sep 2005 16:19:03 +0100
- Subject: [ECOS] RedBoot TFTP last block ack oddness
Hi,
RedBoot's TFTP client has two oddities when ack'ing the last data block.
1. It fails to ack the last data block when loading ELF images if
there's trailing data after the last section it loads (more correctly,
it fails to ack the first block it doesn't want). For example, if an
image had a trailing .comment section.
2. Normally, two ack's are sent for the last block. I'm thinking the
tftp_ack() in tftp_stream_close() is unnecessary?
Attached are some packet captures summaries showing this.
David Vrabel
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
Sample packet capture of loading an ELF image:
RedBoot> load redboot-vulcan-v1i5-ram.elf
No. Time Source Destination Protocol Info
1 0.000000 10.2.39.40 10.2.2.14 TFTP Read Request, File: redboot-vulcan-v1i5-ram.elf, Transfer type: OCTET
2 0.009258 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 1
3 0.010083 10.2.39.40 10.2.2.14 TFTP Acknowledgement, Block: 1
4 0.010193 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 2
5 0.010893 10.2.39.40 10.2.2.14 TFTP Acknowledgement, Block: 2
[...]
1438 0.684266 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 719
1439 0.685045 10.2.39.40 10.2.2.14 TFTP Acknowledgement, Block: 719
1440 0.685076 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 720
1441 0.688509 10.2.39.40 10.2.2.14 TFTP Acknowledgement, Block: 720
1442 0.688556 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 721 (last)
1443 5.689069 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 721 (last)
1444 10.690189 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 721 (last)
1445 15.691244 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 721 (last)
1446 20.692337 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 721 (last)
Sample packet capture of loading a raw image:
RedBoot> load -r -b %{FREEMEMLO} 600B
No. Time Source Destination Protocol Info
1 0.000000 10.2.39.40 10.2.2.14 TFTP Read Request, File: 600B, Transfer type: OCTET
2 0.003572 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 1
3 0.004294 10.2.39.40 10.2.2.14 TFTP Acknowledgement, Block: 1
4 0.004371 10.2.2.14 10.2.39.40 TFTP Data Packet, Block: 2 (last)
5 0.004832 10.2.39.40 10.2.2.14 TFTP Acknowledgement, Block: 2
6 0.007925 10.2.39.40 10.2.2.14 TFTP Acknowledgement, Block: 2
7 0.007961 10.2.2.14 10.2.39.40 ICMP Destination unreachable (Port unreachable)
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss