summaryrefslogtreecommitdiffstats
path: root/src/net/vlan.c
Commit message (Collapse)AuthorAgeFilesLines
* [netdevice] Allow network devices to disclaim IRQ support at runtimeMichael Brown2015-07-281-0/+4
| | | | | | | | | | | | | | | | VLAN and 802.11 devices use a network device operations structure that wraps an underlying structure. For example, the vlan_operations structure wraps the network device operations structure of the underlying trunk device. This can cause false positives from the current implementation of netdev_irq_supported(), which will always report that VLAN devices support interrupts since it has no visibility into the support provided by the underlying trunk device. Fix by allowing network devices to explicitly flag that interrupts are not supported, despite the presence of an irq() method. Originally-fixed-by: Wissam Shoukair <wissams@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-051-1/+5
| | | | | | | | | | | Relicense files with kind permission from Stefan Hajnoczi <stefanha@redhat.com> alongside the contributors who have already granted such relicensing permission. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Make all net_driver methods optionalMichael Brown2013-11-011-11/+0Star
| | | | | | | | Most network upper-layer drivers do not implement all three methods (probe, notify, and remove). Save code by making all methods optional. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add vlan_tag() to get the VLAN tag of a network deviceStefan Hajnoczi2013-03-011-0/+17
| | | | | | | | | | | | The iBFT has a VLAN field that should be filled in. Add the vlan_tag() function to extract the VLAN tag of a network device. Since VLAN support is optional, define a weak function that returns 0 when iPXE is built without VLAN support. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-201-1/+2
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Allow link layer to report broadcast/multicast packets via pull()Michael Brown2011-07-151-2/+5
| | | | | | | | Allow the link layer to directly report whether or not a packet is multicast or broadcast at the time of calling pull(), rather than relying on heuristics to determine this at a later stage. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Expose vlan_find() to network card driversMichael Brown2010-12-011-2/+1Star
| | | | | | | | | Some network cards automatically strip the VLAN header, providing the VLAN tag via a side channel such as a completion queue entry. These cards need to be able to report receive completions directly against the relevant VLAN device. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Use "-" instead of "." as separator in VLAN device namesMichael Brown2010-12-011-1/+1
| | | | | | | | | | | | | | | | | VLAN device names have the form "netX.Y", e.g. "net0.5" for VLAN 5 on net0. This use of "." conflicts with the use of "." as the hierarchical separator in settings block names, with the result that VLAN device settings cannot be accessed by name. It would be trivial to treat the VLAN device settings as being a child of the trunk device settings, but this would cause the VLAN device settings to be applied to the trunk device: for example, setting "net0.5/ip" would then apply the IP address to both net0.5 and net0. Fix by changing the VLAN device name to use "-" instead of ".": the VLAN device "net0.5" is now "net0-5". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Provide vlan_can_be_trunk()Michael Brown2010-11-261-8/+23
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Add non-error debug messagesMichael Brown2010-11-261-0/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Allow duplicate VLAN creation attemptsMichael Brown2010-11-261-5/+11
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Add support for IEEE 802.1Q VLANsMichael Brown2010-11-201-0/+465
Originally-implemented-by: michael-dev@fami-braun.de Signed-off-by: Michael Brown <mcb30@ipxe.org>