opengnsys_ipxe/src
Michael Brown 926816c58f [efi] Pad transmit buffer length to work around vendor driver bugs
The Mellanox/Nvidia UEFI driver is built from the same codebase as the
iPXE driver, and appears to contain the bug that was fixed in commit
c11734e ("[golan] Use ETH_HLEN for inline header size").  This results
in identical failures when using the SNP or NII interface (via
e.g. snponly.efi) to drive a Mellanox card while EAPoL is enabled.

Work around the underlying UEFI driver bug by padding transmit I/O
buffers to the minimum Ethernet frame length before passing them to
the underlying driver's transmit function.

This padding is not technically necessary, since almost all modern
hardware will insert transmit padding as necessary (and where the
hardware does not support doing so, the underlying UEFI driver is
responsible for adding any necessary padding).  However, it is
guaranteed to be harmless (other than a miniscule performance impact):
the Ethernet specification requires zero padding up to the minimum
frame length for packets that are transmitted onto the wire, and so
the receiver will see the same packet whether or not we manually
insert this padding in software.

The additional padding causes the underlying Mellanox driver to avoid
its faulty code path, since it will never be asked to transmit a very
short packet.

Tested-by: Eric Hagberg <ehagberg@janestreet.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2024-03-18 22:52:05 +00:00
..
arch [build] Fix building on older versions of gcc 2024-03-17 17:49:05 +00:00
bin [build] Reduce scope of wildcard .gitignore rules 2024-01-09 12:39:48 +00:00
config [ucode] Add support for updating x86 microcode 2024-03-15 17:43:49 +00:00
core [mp] Define an API for multiprocessor functions 2024-03-15 13:26:53 +00:00
crypto [crypto] Add implementation of MS-CHAPv2 authentication 2024-02-22 00:08:27 +00:00
doc [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
drivers [efi] Pad transmit buffer length to work around vendor driver bugs 2024-03-18 22:52:05 +00:00
hci [block] Allow SAN boot device to be identified by filesystem label 2024-03-07 14:11:46 +00:00
image [libc] Make static_assert() available via assert.h 2024-01-16 13:35:08 +00:00
include [efi] Provide a multiprocessor API for EFI 2024-03-15 13:26:53 +00:00
interface [efi] Provide a multiprocessor API for EFI 2024-03-15 13:26:53 +00:00
libgcc [libgcc] Change __divmoddi4 from int64 [unknown] to int64_t 2020-07-21 14:33:32 +01:00
net [eap] Add support for the MS-CHAPv2 authentication method 2024-02-23 16:37:07 +00:00
scripts [arm] Inhibit linker warnings about an implied executable stack 2023-01-23 12:55:44 +00:00
tests [settings] Add parsing for UUID and GUID settings types 2024-02-29 15:20:44 +00:00
usr [block] Allow for additional SAN boot parameters alongside filename 2024-03-06 12:19:22 +00:00
util [efi] Ignore new LoongArch PC-relative relocations and relaxations 2024-02-22 14:40:53 +00:00
.gitignore [build] Reduce scope of wildcard .gitignore rules 2024-01-09 12:39:48 +00:00
Makefile [build] Avoid invoking genkeymap.py via Perl 2022-02-15 13:54:28 +00:00
Makefile.efi [build] Avoid using multiple target patterns in pattern rules 2023-06-30 10:31:52 +01:00
Makefile.housekeeping [build] Inhibit more linker warnings about an implied executable stack 2023-07-04 15:12:49 +01:00
Makefile.linux [linux] Centralise the linker script for Linux binaries 2023-01-22 12:38:03 +00:00
doxygen.cfg [build] Remove PACKED macro 2010-05-29 23:49:47 +01:00