summaryrefslogtreecommitdiffstats
path: root/src/net/aoe.c
Commit message (Collapse)AuthorAgeFilesLines
* [block] Describe all SAN devices via ACPI tablesMichael Brown2017-03-281-23/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Describe all SAN devices via ACPI tables such as the iBFT. For tables that can describe only a single device (i.e. the aBFT and sBFT), one table is installed per device. For multi-device tables (i.e. the iBFT), all devices are described in a single table. An underlying SAN device connection may be closed at the time that we need to construct an ACPI table. We therefore introduce the concept of an "ACPI descriptor" which enables the SAN boot code to maintain an opaque pointer to the underlying object, and an "ACPI model" which can build tables from a list of such descriptors. This separates the lifecycles of ACPI descriptions from the lifecycles of the block device interfaces, and allows for construction of the ACPI tables even if the block device interface has been closed. For a multipath SAN device, iPXE will wait until sufficient information is available to describe all devices but will not wait for all paths to connect successfully. For example: with a multipath iSCSI boot iPXE will wait until at least one path has become available and name resolution has completed on all other paths. We do this since the iBFT has to include IP addresses rather than DNS names. We will commence booting without waiting for the inactive paths to either become available or close; this avoids unnecessary boot delays. Note that the Linux kernel will refuse to accept an iBFT with more than two NIC or target structures. We therefore describe only the NICs that are actually required in order to reach the described targets. Any iBFT with at most two targets is therefore guaranteed to describe at most two NICs. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | | | | These files cannot be automatically relicensed by util/relicense.pl since they either contain unusual but trivial contributions (such as the addition of __nonnull function attributes), or contain lines dating back to the initial git revision (and so require manual knowledge of the code's origin). 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/+3
| | | | | | | | 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>
* [netdevice] Pass both link-layer addresses in net_tx() and net_rx()Michael Brown2010-10-071-3/+6
| | | | | | | | | FCoE requires the use of fabric-provided MAC addresses, which breaks the assumption that the net device's MAC address is implicitly the source address for net_tx() and the (unicast) destination address for net_rx(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [aoe] Add support for identifying the underlying hardware deviceMichael Brown2010-09-221-0/+13
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [aoe] Fail immediately when network device is closedMichael Brown2010-09-221-0/+8
| | | | | | | Avoid a tedious timeout delay when attempting to issue a command over a network device that has been closed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [block] Replace gPXE block-device API with an iPXE asynchronous interfaceMichael Brown2010-09-141-290/+850
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The block device interface used in gPXE predates the invention of even the old gPXE data-transfer interface, let alone the current iPXE generic asynchronous interface mechanism. Bring this old code up to date, with the following benefits: o Block device commands can be cancelled by the requestor. The INT 13 layer uses this to provide a global timeout on all INT 13 calls, with the result that an unexpected passive failure mode (such as an iSCSI target ACKing the request but never sending a response) will lead to a timeout that gets reported back to the INT 13 user, rather than simply freezing the system. o INT 13,00 (reset drive) is now able to reset the underlying block device. INT 13 users, such as DOS, that use INT 13,00 as a method for error recovery now have a chance of recovering. o All block device commands are tagged, with a numerical tag that will show up in debugging output and in packet captures; this will allow easier interpretation of bug reports that include both sources of information. o The extremely ugly hacks used to generate the boot firmware tables have been eradicated and replaced with a generic acpi_describe() method (exploiting the ability of iPXE interfaces to pass through methods to an underlying interface). The ACPI tables are now built in a shared data block within .bss16, rather than each requiring dedicated space in .data16. o The architecture-independent concept of a SAN device has been exposed to the iPXE core through the sanboot API, which provides calls to hook, unhook, boot, and describe SAN devices. This allows for much more flexible usage patterns (such as hooking an empty SAN device and then running an OS installer via TFTP). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Hold reference while timer is running and during expiry callbackMichael Brown2010-09-031-1/+1
| | | | | | | | | Guarantee that a retry timer cannot go out of scope while the timer is running, and provide a guarantee to the expiry callback that the timer will remain in scope during the entire callback (similar to the guarantee provided to interface methods). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix misaligned table entries when using gcc 4.5Piotr Jaroszyński2010-08-201-1/+1
| | | | | | | | | | Declarations without the accompanying __table_entry cause misalignment of the table entries when using gcc 4.5. Fix by adding the appropriate __table_entry macro or (where possible) by removing unnecessary forward declarations. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Add timer_init() wrapper functionMichael Brown2010-06-221-1/+1
| | | | | | | Standardise on using timer_init() to initialise an embedded retry timer, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [refcnt] Add ref_init() wrapper functionMichael Brown2010-06-221-1/+1
| | | | | | | Standardise on using ref_init() to initialise an embedded reference count, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-10/+10
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocolMichael Brown2009-07-181-2/+1Star
| | | | | | | | | IPoIB has a link-layer broadcast address that varies according to the partition key. We currently go through several contortions to pretend that the link-layer address is a fixed constant; by making the broadcast address a property of the network device rather than the link-layer protocol it will be possible to simplify IPoIB's broadcast handling.
* [ata] Make ATA command issuing partially asynchronousMichael Brown2009-07-181-8/+2Star
| | | | | | | | | Move the icky call to step() from aoe.c to ata.c; this takes it at least one step further away from where it really doesn't belong. Unfortunately, AoE has the ugly aoe_discover() mechanism which means that we still have a step() loop in aoe.c for now; this needs to be replaced at some future point.
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [aoe] Use an AoE config query to identify the target MAC addressMichael Brown2008-11-191-51/+145
| | | | | | | | | | | | | | | | The AoE spec does not specify that the source MAC address of a received packet actually matches the MAC address of the AoE target. In principle an AoE server can respond to an AoE request on any interface available to it, which may not be an address configured to accept AoE requests. This issue is resolved by implementing AoE device discovery. The purpose of AoE discovery is to find out which addresses an AoE target can use for requests. An AoE configuration command is sent when the AoE attach is attempted. The AoE target must respond to that configuration query from an interface that can accept requests. Based on a patch from Ryan Thomas <ryan@coraid.com>
* [aoe] Start retry timer before potential temporary transmission failureMichael Brown2008-11-081-4/+11
| | | | | | | The retry timer needs to be running as soon as we know that we are trying to transmit a command. If transmission fails because of a temporary error condition, then the timer will allow us to retry the transmission later.
* Allowed zero-cost enforced ordering of features in startup bannerMichael Brown2007-08-021-1/+1
| | | | | | list. Added FEATURE() macros to most relevant (non-driver) files.
* Use otherwise-useless byte in DHCP feature option as a version numberMichael Brown2007-08-021-1/+1
|
* Add FEATURE() macro, plus code to display features at startup time,Michael Brown2007-08-021-0/+3
| | | | | and generate DHCP options to indicate features to DHCP server (and to PXE NBPs).
* Quick hack to get AoE back in to the tree, on a par with the currentMichael Brown2007-07-291-34/+96
| | | | iSCSI hack.
* Kill off hotplug.h and just make net devices normal reference-countedMichael Brown2007-06-271-17/+0Star
| | | | | | structures. DHCP still broken and #if 0'd out.
* pkbuff->iobuf changeoverMichael Brown2007-05-191-15/+15
| | | | | | | | Achieved via Perl using: perl -pi -e 's/pk_buff/io_buffer/g; s/Packet buffer/I\/O buffer/ig; ' \ -e 's/pkbuff\.h/iobuf.h/g; s/pkb_/iob_/g; s/_pkb/_iob/g; ' \ -e 's/pkb/iobuf/g; s/PKB/IOB/g;'
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* Gave asynchronous operations approximate POSIX signal semantics. ThisMichael Brown2007-01-151-5/+7
| | | | | | | | | | | will enable us to cascade async operations, which is necessary in order to properly support DNS. (For example, an HTTP request may have to redirect to a new location and will have to perform a new DNS lookup, so we can't just rely on doing the name lookup at the time of parsing the initial URL). Anything other than HTTP is probably broken right now; I'll fix the others up asap.
* An AoE session holds a persistent reference to a net device.Michael Brown2007-01-041-0/+23
|
* Remove _PROTOCOL macros for gcc 3.2 compatibilityMarty Connor2006-08-091-3/+1Star
|
* Simplify RX data path.Michael Brown2006-06-181-7/+7
| | | | | | | | | | Kill off the static single net device and move to proper dynamic registration (which we need with the new device model). Break the (flawed) assumption that all network-layer protocols can use ARP; such network-layer protocols (i.e. IPv4) must now register as an ARP protocol using ARP_NET_PROTOCOL() and provide a single method for checking the existence of a local network-layer address.
* Simplify TX datapath.Michael Brown2006-06-161-29/+4Star
|
* Improve tcpdump legibility.Michael Brown2006-06-011-0/+1
|
* Updated retry timer mechanism to incorporate smoothed RTT estimation.Michael Brown2006-06-011-1/+28
| | | | AoE now uses the retry timer mechanism.
* Put in a method to get the MAC address for the AoE target. (It's notMichael Brown2006-05-311-6/+17
| | | | elegant, but it works).
* ATA devices are now asynchronous. The ATA layer itself now performs theMichael Brown2006-05-311-1/+4
| | | | | | | | async_wait(), though we may wish to move this higher up the stack, and consider making the block device model asynchronous. (There is only a marginal cost for synchronous devices, since they can simply call async_done() before returning; async_wait() will work seamlessly in this situation).
* Added generic asynchronous operations code.Michael Brown2006-05-311-93/+73Star
| | | | | | | | | Removed data_in_len and data_out_len from ata_command structure; the lengths are implied by the sector count and the presence of the data_in or data_out pointers. Changed AoE code to use subcommands by default, and made aoe_issue() nonblocking (with completion via async_wait()).
* Handle multi-sector reads by splitting them into subcommands.Michael Brown2006-05-291-2/+48
|
* Initial AoE implementation. Limitations are:Michael Brown2006-05-291-0/+261
Cannot yet handle reads of more than two sectors No retransmission No way to find out a target's MAC address (this proof of concept uses broadcasts) These limitations shall not last long! :)