]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Provide VLAN configuration protocol 838/head
authorMichael Brown <mcb30@ipxe.org>
Tue, 13 Dec 2022 14:45:44 +0000 (14:45 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 14 Dec 2022 11:51:52 +0000 (11:51 +0000)
commitd879c8e4d9f3b00c09a7d199a2681705fc5b55d0
tree03fa45c25742b4f605d9391c776146331b040f11
parent5e62b4bc6c7bd7c6929b3fe540fb1ba8744fd16c
[efi] Provide VLAN configuration protocol

UEFI implements VLAN support within the Managed Network Protocol (MNP)
driver, which may create child VLAN devices automatically based on
stored UEFI variables.  These child devices do not themselves provide
a raw-packet interface via EFI_SIMPLE_NETWORK_PROTOCOL, and may be
consumed only via the EFI_MANAGED_NETWORK_PROTOCOL interface.

The device paths constructed for these child devices may conflict with
those for the EFI_SIMPLE_NETWORK_PROTOCOL instances that iPXE attempts
to install for its own VLAN devices.  The upshot is that creating an
iPXE VLAN device (e.g. via the "vcreate" command) will fail if the
UEFI Managed Network Protocol has already created a device for the
same VLAN tag.

Fix by providing our own EFI_VLAN_CONFIG_PROTOCOL instance on the same
device handle as EFI_SIMPLE_NETWORK_PROTOCOL.  This causes the MNP
driver to treat iPXE's device as supporting hardware VLAN offload, and
it will therefore not attempt to install its own instance of the
protocol.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/efi/efi_null.h
src/include/ipxe/efi/efi_snp.h
src/include/ipxe/vlan.h
src/interface/efi/efi_null.c
src/interface/efi/efi_snp.c
src/net/vlan.c