[PATCH] Fix vlan networking on little-endian systems

2022-03-01 Thread Chad Kimes via Grub-devel
The interface vlantag appears to have never worked on little-endian systems. This small initial patch is mostly to get my feet wet in the GRUB dev process. Once this is accepted, I intend to submit a few more patches that (a) allow vlan configuration via a command from the net module and (b) auto-c

[PATCH] Fix vlan networking on little-endian systems

2022-03-01 Thread Chad Kimes via Grub-devel
Vlan configuration seems to have never worked on little-endian systems. This is likely because VLANTAG_IDENTIFIER is not byte-swapped before copying into the net buffer, nor is vlantag. We can resolve this by using grub_cpu_to_be16 and its inverse when copying vlan info to/from the net buffer. ---

[PATCH v2] Fix vlan networking on little-endian systems

2022-03-02 Thread Chad Kimes via Grub-devel
Vlan configuration seems to have never worked on little-endian systems. This is likely because VLANTAG_IDENTIFIER is not byte-swapped before copying into the net buffer, nor is vlantag. We can resolve this by using grub_cpu_to_be16 and its inverse when copying vlan info to/from the net buffer. Sig

[PATCH 1/2] Add vlan information to net_ls_addr output

2022-03-04 Thread Chad Kimes via Grub-devel
Example output: grub> net_ls_addr efinet1 00:11:22:33:44:55 192.168.0.100 vlan100 Signed-off-by: Chad Kimes --- grub-core/net/net.c | 18 +- include/grub/net.h | 8 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/grub-core/net/net.c b/grub-core/net/n

[PATCH 2/2] Add net_set_vlan command

2022-03-04 Thread Chad Kimes via Grub-devel
Previously there was no way to set the 802.1Q VLAN identifier, despite support for vlantag in the net module. The only location vlantag was being populated was from PXE boot and only for Open Firmware hardware. This commit allows users to manually configure VLAN information for any interface. Exam

[PATCH 1/2] Print VLAN info in EFI device path

2022-03-05 Thread Chad Kimes via Grub-devel
Signed-off-by: Chad Kimes --- grub-core/kern/efi/efi.c | 7 +++ include/grub/efi/api.h | 9 + 2 files changed, 16 insertions(+) diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c index 18858c327..d60a0b3e6 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi

[PATCH 2/2] Configure VLAN from UEFI device used for PXE

2022-03-05 Thread Chad Kimes via Grub-devel
Signed-off-by: Chad Kimes --- grub-core/net/drivers/efi/efinet.c | 38 ++ 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c index 381c138db..98b0f6bef 100644 --- a/grub-core/net/drive

Re: [PATCH 2/2] Add net_set_vlan command

2022-03-21 Thread Chad Kimes via Grub-devel
Thanks for the review! I'll re-submit this and the other patch series shortly. On Thu, Mar 17, 2022 at 7:03 PM Daniel Kiper wrote: > > On Fri, Mar 04, 2022 at 10:46:36PM -0500, Chad Kimes via Grub-devel wrote: > > Previously there was no way to set the 802.1Q VLAN identifier, de

[PATCH 0/2] Add command-line management of VLAN config

2022-03-21 Thread Chad Kimes via Grub-devel
These patches provide functionality to configure 802.1Q VLAN identifiers on existing network interfaces using the GRUB command line. The first patch simply updates the output of net_ls_addr to include information about interface VLAN configuration. The second patch introduces a new command net_se

[PATCH 2/2] Add net_set_vlan command

2022-03-21 Thread Chad Kimes via Grub-devel
Previously there was no way to set the 802.1Q VLAN identifier, despite support for vlantag in the net module. The only location vlantag was being populated was from PXE boot and only for Open Firmware hardware. This commit allows users to manually configure VLAN information for any interface. Exam

[PATCH 1/2] Add vlan information to net_ls_addr output

2022-03-21 Thread Chad Kimes via Grub-devel
Example output: grub> net_ls_addr efinet1 00:11:22:33:44:55 192.0.2.100 vlan100 Signed-off-by: Chad Kimes --- grub-core/net/net.c | 19 ++- include/grub/net.h | 6 ++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/grub-core/net/net.c b/grub-core/net/net.

[PATCH v2 0/2] Automatically configure VLAN from PXE on UEFI

2022-03-21 Thread Chad Kimes via Grub-devel
This patch series introduces automatic configuration of 802.1Q VLAN identifiers if the interface used for PXE booting on UEFI hardware was configured with a VLAN. The first patch adds the necessary types for parsing VLAN info from UEFI device paths, and uses that to produce a Vlan(x) device in the

[PATCH v2 1/2] Print VLAN info in EFI device path

2022-03-21 Thread Chad Kimes via Grub-devel
Signed-off-by: Chad Kimes --- grub-core/kern/efi/efi.c | 7 +++ include/grub/efi/api.h | 9 + 2 files changed, 16 insertions(+) diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c index 18858c327..d60a0b3e6 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi

[PATCH v2 2/2] Configure VLAN from UEFI device used for PXE

2022-03-21 Thread Chad Kimes via Grub-devel
Signed-off-by: Chad Kimes --- grub-core/net/drivers/efi/efinet.c | 38 ++ 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c index 381c138db..107e1f09e 100644 --- a/grub-core/net/drive