Table of Contents

Driver test: VLAN loopback

Rationale

iPXE expects network cards to provide transparent transmit and receive datapaths. Some network cards provide no way to disable their VLAN offload features and will always strip the VLAN tag from a received packet, reporting this tag via the receive descriptor. Drivers for such cards must use special handling to deliver the received packet directly to the appropriate VLAN device.

The vcreate command can be used to create VLAN interfaces, and the lotest command can be used to verify correct operation of the VLAN interfaces.

Background

Refer to the basic loopback test for background information.

A network card

Test sequence

  1. Before starting, ensure that your network interface is directly connected to a second network interface on the same machine.
  2. Boot into a version of iPXE with VLAN_CMD and LOTEST_CMD enabled and with support for both network interfaces.
  3. Use ifstat to identify the name of your network interface (hereafter assumed to be net0) and the name of the second network interface (hereafter assumed to be net1).
  4. Create a VLAN interface on net0 using vcreate --tag 123 net0
  5. Create a VLAN interface on net1 using vcreate --tag 123 net1
  6. Initiate testing of the transmit datapath via the VLAN interfaces using lotest net0-123 net1-123.
  7. Verify that the packet counter displayed by lotest increases steadily and rapidly.
  8. Abort the test using Ctrl-C.
  9. Initiate testing of the receive datapath via the VLAN interfaces using lotest net1-123 net0-123.
  10. Verify that the packet counter displayed by lotest increases steadily and rapidly.
  11. Abort the test using Ctrl-C.