pxenv_tftp_get_fsize is an API call that PXE clients can call to obtain the size of a remote file. It is implemented by starting a TFTP transfer with pxe_tftp_open, waiting for the response and then stopping the transfer with pxe_tftp_close(). This leaves the session hanging on the TFTP server and it will try to resend the packet repeatedly (verified with tftpd-hpa) until it times out. This patch adds a method "tftpsize" that will abort the transfer after the first packet is received from the server. This will terminate the session on the server and is the same behaviour as Intel's PXE ROM exhibits. Together with a qemu patch to handle the ERROR packet (submitted to qemu's mailing list), this resolves a specific issue where booting pxegrub with qemu's TFTP server would be slow or hang. I've tested this against qemu's tftp server and against my normal boot infrastructure (tftpd-hpa). Booting pxegrub and loading extra files now produces a trace similar to Intel's PXE client and there are no spurious retransmits from tftpd any more. Signed-off-by: Thomas Horsten <thomas@horsten.com> Signed-off-by: Milan Plzik <milan.plzik@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>tags/v1.0.0-rc1
|
|
||
165 |
|
165 |
|
166 |
|
166 |
|
167 |
|
167 |
|
168 |
|
|
|
|
168 |
|
|
|
169 |
|
|
169 |
|
170 |
|
170 |
|
171 |
|
171 |
|
172 |
|
|
|
||
185 |
|
186 |
|
186 |
|
187 |
|
187 |
|
188 |
|
188 |
|
|
|
|
189 |
|
|
|
190 |
|
|
189 |
|
191 |
|
190 |
|
192 |
|
191 |
|
193 |
|
|
|
||
254 |
|
256 |
|
255 |
|
257 |
|
256 |
|
258 |
|
257 |
|
|
|
|
259 |
|
|
|
260 |
|
|
258 |
|
261 |
|
259 |
|
262 |
|
260 |
|
263 |
|
|
|
||
488 |
|
491 |
|
489 |
|
492 |
|
490 |
|
493 |
|
491 |
|
|
|
|
494 |
|
|
492 |
|
495 |
|
493 |
|
496 |
|
494 |
|
497 |
|
|
|
||
558 |
|
561 |
|
559 |
|
562 |
|
560 |
|
563 |
|
561 |
|
|
|
|
564 |
|
|
562 |
|
565 |
|
563 |
|
566 |
|
564 |
|
567 |
|
|
|
||
133 |
|
133 |
|
134 |
|
134 |
|
135 |
|
135 |
|
|
136 |
|
|
|
137 |
|
|
136 |
|
138 |
|
137 |
|
139 |
|
138 |
|
140 |
|
|
|
||
410 |
|
412 |
|
411 |
|
413 |
|
412 |
|
414 |
|
|
415 |
|
|
|
416 |
|
|
|
417 |
|
|
|
418 |
|
|
|
419 |
|
|
|
420 |
|
|
|
421 |
|
|
|
422 |
|
|
|
423 |
|
|
|
424 |
|
|
|
425 |
|
|
|
426 |
|
|
|
427 |
|
|
|
428 |
|
|
|
429 |
|
|
|
430 |
|
|
|
431 |
|
|
|
432 |
|
|
|
433 |
|
|
|
434 |
|
|
|
435 |
|
|
|
436 |
|
|
|
437 |
|
|
|
438 |
|
|
|
439 |
|
|
|
440 |
|
|
|
441 |
|
|
|
442 |
|
|
|
443 |
|
|
|
444 |
|
|
|
445 |
|
|
|
446 |
|
|
|
447 |
|
|
|
448 |
|
|
|
449 |
|
|
|
450 |
|
|
413 |
|
451 |
|
414 |
|
452 |
|
415 |
|
453 |
|
|
|
||
732 |
|
770 |
|
733 |
|
771 |
|
734 |
|
772 |
|
|
773 |
|
|
|
774 |
|
|
|
775 |
|
|
|
776 |
|
|
|
777 |
|
|
|
778 |
|
|
|
779 |
|
|
|
780 |
|
|
735 |
|
781 |
|
736 |
|
782 |
|
737 |
|
783 |
|
|
|
||
759 |
|
805 |
|
760 |
|
806 |
|
761 |
|
807 |
|
|
808 |
|
|
|
809 |
|
|
|
810 |
|
|
|
811 |
|
|
|
812 |
|
|
|
813 |
|
|
|
814 |
|
|
762 |
|
815 |
|
763 |
|
816 |
|
764 |
|
817 |
|
|
|
||
1120 |
|
1173 |
|
1121 |
|
1174 |
|
1122 |
|
1175 |
|
|
1176 |
|
|
|
1177 |
|
|
|
1178 |
|
|
|
1179 |
|
|
|
1180 |
|
|
|
1181 |
|
|
|
1182 |
|
|
|
1183 |
|
|
|
1184 |
|
|
|
1185 |
|
|
|
1186 |
|
|
|
1187 |
|
|
|
1188 |
|
|
|
1189 |
|
|
|
1190 |
|
|
|
1191 |
|
|
|
1192 |
|
|
|
1193 |
|
|
|
1194 |
|
|
|
1195 |
|
|
1123 |
|
1196 |
|
1124 |
|
1197 |
|
1125 |
|
1198 |
|