]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[iobuf] Limit automatic I/O buffer alignment to page size
authorMichael Brown <mcb30@ipxe.org>
Mon, 31 Mar 2025 12:33:44 +0000 (13:33 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 31 Mar 2025 12:39:58 +0000 (13:39 +0100)
commit5818529f39fc245744d966d8ad49cf194ee3109d
tree3233aeafbe03af6100bb5c580c46faf116d6f0f3
parent7fe467a46db6bb989c82f55119a6b302d85f8bc6
[iobuf] Limit automatic I/O buffer alignment to page size

Without any explicit alignment requirement, we will currently allocate
I/O buffers on their own size rounded up to the nearest power of two.
This is done to simplify driver transmit code paths, which can assume
that a standard Ethernet frame lies within a single physical page and
therefore does not need to be split even for devices with DMA engines
that cannot cross page boundaries.

Limit this automatic alignment to a maximum of the page size, to avoid
requiring excessive alignment for unusually large buffers (such as a
buffer allocated for an HTTP POST with a large parameter list).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/iobuf.c