]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[xferbuf] Simplify and generalise data transfer buffers
authorMichael Brown <mcb30@ipxe.org>
Tue, 29 Apr 2025 08:16:41 +0000 (09:16 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 29 Apr 2025 10:27:22 +0000 (11:27 +0100)
commit837b77293beafa15f8a125a484a0d17453b021f8
treeeb42f966d689576b412522e3544387893563a9e3
parent43fc516298273d12099da4fcd2cc7c0af0a1ea86
[xferbuf] Simplify and generalise data transfer buffers

Since all data transfer buffer contents are now accessible via direct
pointer dereferences, remove the unnecessary abstractions for read and
write operations and create two new data transfer buffer types: a
fixed-size buffer, and a void buffer that records its size but can
never receive non-zero lengths of data.  These replace the custom data
buffer types currently implemented for EFI PXE TFTP downloads and for
block device translations.

A new operation xferbuf_detach() is required to take ownership of the
data accumulated in the data transfer buffer, since we no longer rely
on the existence of an independently owned external data pointer for
data transfer buffers allocated via umalloc().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/blocktrans.c
src/core/downloader.c
src/core/xferbuf.c
src/include/ipxe/blocktrans.h
src/include/ipxe/xferbuf.h
src/interface/efi/efi_pxe.c
src/net/peermux.c