[ipxe-devel] [PATCH 2/2] [iscsi] Include 802.1Q VLAN Identifier in iBFT

Stefan Hajnoczi stefanha at redhat.com
Fri Mar 1 15:32:16 UTC 2013


The iBFT NIC section has a VLAN field which must be filled in so that
iSCSI booting works over VLANs.

Unfortunately it is unclear from the IBM specification linked in ibft.c
whether the VLAN field is just the 802.1Q VLAN Identifier or the full
802.1Q TCI.  For now just fill in the VID, the Priority Code Point and
Drop Eligible Indicator could be set in the future if it turns out they
should be present too.

Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com>
---
 src/drivers/block/ibft.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/drivers/block/ibft.c b/src/drivers/block/ibft.c
index f160963..570c630 100644
--- a/src/drivers/block/ibft.c
+++ b/src/drivers/block/ibft.c
@@ -264,6 +264,8 @@ static int ibft_fill_nic ( struct ibft_nic *nic,
 	DBG ( "iBFT NIC subnet = /%d\n", nic->subnet_mask_prefix );
 
 	/* Extract values from net-device configuration */
+	nic->vlan = cpu_to_le16 ( netdev_vlan ( netdev ) );
+	DBG ( "iBFT NIC VLAN = %02x\n", le16_to_cpu ( nic->vlan ) );
 	if ( ( rc = ll_protocol->eth_addr ( netdev->ll_addr,
 					    nic->mac_address ) ) != 0 ) {
 		DBG ( "Could not determine iBFT MAC: %s\n", strerror ( rc ) );
-- 
1.8.1.2




More information about the ipxe-devel mailing list