[gPXE-devel] [PATCH] 802.1Q support for gpxe
Stefan Hajnoczi
stefanha at gmail.com
Fri Apr 16 04:42:30 EDT 2010
Cool patch :).
Please format the code according to gPXE coding style. For reference,
see include/gpxe/netdevice.h and net/netdevice.c.
Can you split the 'netboot' command into a completely separate patch?
This is a useful command that is unrelated to vlans, it breaks up
monolithic 'autoboot' into a finer-grained command that can be used
from scripts.
+static void ieee8021q_poll ( struct net_device* dev __unused) {
+ netdev_poll(((struct vlan_device_priv*)dev->priv)->netdev);
+}
__unused should not be there. Also this implementation has the side-effect of
calling netdev_poll() on the underlying device 1 + n times in the network stack
processing function, net_step() (where n is the number of vlan devices). I
think we won't have many vlan devices and will be okay though.
+static void ieee8021q_irq ( struct net_device* dev, int enable ) {
+ /* a little bit unsure about side effects */
+ return netdev_irq(((struct vlan_device_priv*)dev->priv)->netdev, enable);
+}
netdev_irq() is used by the PXE stack because the UNDI API involves hardware
interrupts. Only one active netdev is supported by the active PXE stack and
therefore side effects don't matter in this case. There can be no interference
because only one netdev will use irqs at a given time.
I still have some more to read and will let you know.
Stefan
More information about the gPXE-devel
mailing list