#
3e15b01d |
| 22-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
libsa: Remove redundant sys/cdefs.h
Sponsored by: Netflix
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
1a3ccb8f |
| 17-Apr-2023 |
Dimitry Andric <dim@FreeBSD.org> |
libsa: make single bit bitfields unsigned to avoid clang 16 warning
Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a declaration in libsa's tftp.c:
s
libsa: make single bit bitfields unsigned to avoid clang 16 warning
Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a declaration in libsa's tftp.c:
stand/libsa/tftp.c:382:20: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* very short file */ ^ ~ stand/libsa/tftp.c:432:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* EOF */ ^ ~
Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the field as a boolean, so make it unsigned.
MFC after: 3 days
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
60cb4f9a |
| 26-Jul-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: tftp.c doesn't need bootinfo.h
tftp.c includes bootinfo.h, but doesn't need it. Remove it, and remove the -Istand/common from CFALGS since that's the only reason we had it.
Sponsored by: Ne
stand: tftp.c doesn't need bootinfo.h
tftp.c includes bootinfo.h, but doesn't need it. Remove it, and remove the -Istand/common from CFALGS since that's the only reason we had it.
Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D35928
show more ...
|
Revision tags: release/13.1.0 |
|
#
dfc9c1d4 |
| 30-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: tftp: Copy the first block into the cache
tftp_open reads the first block so copy it in the cached data. If we have more than one block (i.e. we called tftp_read before tftp_preload) simply
loader: tftp: Copy the first block into the cache
tftp_open reads the first block so copy it in the cached data. If we have more than one block (i.e. we called tftp_read before tftp_preload) simply just reset the transfer.
Reported by: mmel Reviewed by: mmel, tsoome MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33697
show more ...
|
#
3eb01900 |
| 10-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: tftp: Add preload method
The preload method will transfer the whole file in a buffer and cache it so read/lseek operations are faster.
Reviewed by: imp, tsoome MFC after: 2 weeks Sponsored
loader: tftp: Add preload method
The preload method will transfer the whole file in a buffer and cache it so read/lseek operations are faster.
Reviewed by: imp, tsoome MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33410
show more ...
|
#
4f36ed51 |
| 13-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: tftp: Don't let tftp timeout
When we load a kernel or module we open/close it a few times. Since we're using the same port number each time and that we requested the same file the ACK that w
loader: tftp: Don't let tftp timeout
When we load a kernel or module we open/close it a few times. Since we're using the same port number each time and that we requested the same file the ACK that we send are valid on the server side and the server send us the file multiple times. This makes tftp loading time very inconsistant due to the UDP "flood" that we have to process.
Reviewed by: imp, tsoome MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33407
show more ...
|
#
70661eaa |
| 09-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: Add a readtest command
readtest will simply load the file in memory, useful for timing loading on some filesystems.
Reviewed by: tsoome MFC after: 2 weeks Sponsored by: Beckhoff Automation
loader: Add a readtest command
readtest will simply load the file in memory, useful for timing loading on some filesystems.
Reviewed by: tsoome MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33411
show more ...
|
#
bf07f2f8 |
| 08-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: tftp: Don't error on tftp error 0
tftp-hpa sends NAK with tftp error set to 0 when trying to get a directory and this is the first thing that loader tries to do and this make it hangs.
Revi
loader: tftp: Don't error on tftp error 0
tftp-hpa sends NAK with tftp error set to 0 when trying to get a directory and this is the first thing that loader tries to do and this make it hangs.
Reviewed by: imp, tsoome MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33406
show more ...
|
Revision tags: release/12.3.0 |
|
#
98e805b4 |
| 24-Sep-2021 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: net_open() should not replace f->f_devdata
net_open() does replace f_devdata with pointer to netdev_sock, this will cause memory leak when device is closed, but also does alter the devopen()
loader: net_open() should not replace f->f_devdata
net_open() does replace f_devdata with pointer to netdev_sock, this will cause memory leak when device is closed, but also does alter the devopen() logic.
We should store &netdev_sock to dev->d_opendata instead, this would preserve and follow the devopen() logic.
Fixes network boot on aarch64 (tested by bz).
Reviewed-by: imp MFC After: 2 weeks Differential Revision: https://reviews.freebsd.org/D32227
show more ...
|
#
1b1bb6f1 |
| 02-Aug-2021 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: tftp client should use server address from rootip
servip is set from bootp bp_siaddr (if present) and rootip is set immediately from servip in tha sane bootp code.
However, the common/dev_n
loader: tftp client should use server address from rootip
servip is set from bootp bp_siaddr (if present) and rootip is set immediately from servip in tha sane bootp code.
However, the common/dev_net.c does only set rootip (based on url processing etc). Therefore, we should also use rootip in tftp reader.
Fixes hung tftp based boot when bp_siaddr is not provided.
MFC after: 1 week
show more ...
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0 |
|
#
723f9041 |
| 07-Apr-2020 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Improve interaction of vectx and tftp
On slow platforms, it helps to spread the hashing load over time so that tftp does not timeout.
Also, some .4th files are too big to fit in cache of pkgfs, so
Improve interaction of vectx and tftp
On slow platforms, it helps to spread the hashing load over time so that tftp does not timeout.
Also, some .4th files are too big to fit in cache of pkgfs, so increase cache size and ensure fully populated.
Reviewed by: stevek MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24287
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
2a22df74 |
| 04-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339813 through r340125.
|
#
3c3779dc |
| 01-Nov-2018 |
Toomas Soome <tsoome@FreeBSD.org> |
libsa: cstyle cleanup tftp.c
No functinal changes intended.
|
#
c6588669 |
| 01-Nov-2018 |
Toomas Soome <tsoome@FreeBSD.org> |
libsa: tftp should use calloc
instead of malloc() memset(), use calloc().
|
#
f442898f |
| 01-Nov-2018 |
Toomas Soome <tsoome@FreeBSD.org> |
libsa: tftp should not read past file end
When we have the file size via tsize option, use it to make sure we will not attempt to read past file end.
|
#
c6879c6c |
| 23-Oct-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339015 through r339669.
|
#
bb489cd7 |
| 23-Oct-2018 |
Toomas Soome <tsoome@FreeBSD.org> |
libsa: re-send ACK for older data packets in tftp
In current tftp code we drop out-of-order packets; however, we should play nice and re-send ACK for older data packets we are receiving. This will h
libsa: re-send ACK for older data packets in tftp
In current tftp code we drop out-of-order packets; however, we should play nice and re-send ACK for older data packets we are receiving. This will hopefully stop server repeating those packets we already have received. Note we do not answer duplicates from "previous" session (that is, session with different port number), those will eventually time out.
Differential Revision: https://reviews.freebsd.org/D17087
show more ...
|
#
3af64f03 |
| 11-Sep-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338392 through r338594.
|
#
7e63e808 |
| 09-Sep-2018 |
Toomas Soome <tsoome@FreeBSD.org> |
libsa: validate tftp_makereq() after we did reset the read
The name check referred in the comment is not the only possible error source, we need to validate the result.
Reviewed by: allanjude Appro
libsa: validate tftp_makereq() after we did reset the read
The name check referred in the comment is not the only possible error source, we need to validate the result.
Reviewed by: allanjude Approved by: re (kib) Differential Revision: https://reviews.freebsd.org/D17081
show more ...
|
#
7ee96df3 |
| 08-Sep-2018 |
Toomas Soome <tsoome@FreeBSD.org> |
libsa: memory leak in tftp_open()
tftpfile is allocated just above and needs to be freed.
Reviewed by: imp Approved by: re (kib) Differential Revision: https://reviews.freebsd.org/D17058
|
Revision tags: release/11.2.0 |
|
#
6d423eb2 |
| 13-Jun-2018 |
Warner Losh <imp@FreeBSD.org> |
Remove unused variables.
Sponsored by: Netflix
|
#
468b6c53 |
| 27-Feb-2018 |
Toomas Soome <tsoome@FreeBSD.org> |
libsa: replace remaining _write callbacks by null_write
There are some _write callbacks left only returning EROFS, replace them by null_write. return EROFS from null_write().
Reviewed by: cem, imp,
libsa: replace remaining _write callbacks by null_write
There are some _write callbacks left only returning EROFS, replace them by null_write. return EROFS from null_write().
Reviewed by: cem, imp, kan Differential Revision: https://reviews.freebsd.org/D14523
show more ...
|
#
2e7e6fbc |
| 23-Feb-2018 |
Conrad Meyer <cem@FreeBSD.org> |
libsa: Const-ify buffer argument of write(2) analog
Reported by: kevans Reviewed by: delphij, eadler, imp, kevans Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D14
libsa: Const-ify buffer argument of write(2) analog
Reported by: kevans Reviewed by: delphij, eadler, imp, kevans Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D14482
show more ...
|
#
c5b86c3b |
| 15-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
libsa: Consolidate tftp sendrecv into net.c sendrecv
bootp/arp/rarp/rpc all use the sendrecv implementation in net.c. tftp has its own implementation because it passes an extra parameter into the re
libsa: Consolidate tftp sendrecv into net.c sendrecv
bootp/arp/rarp/rpc all use the sendrecv implementation in net.c. tftp has its own implementation because it passes an extra parameter into the recv callback for the received payload type to be held.
These sendrecv implementations are otherwise equivalent, so consolidate them. The other users of sendrecv won't be using the extra argument to recv, but this gives us only one place to worry about respecting timeouts and one consistent timeout behavior.
Tested by: sbruno Reviewed by: sbruno, tsoome MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14373
show more ...
|