summaryrefslogtreecommitdiffstats
path: root/src/net/infiniband
Commit message (Collapse)AuthorAgeFilesLines
* [base16] Add buffer size parameter to base16_encode() and base16_decode()Michael Brown2015-04-241-1/+1
| | | | | | | | | | | | | | The current API for Base16 (and Base64) encoding requires the caller to always provide sufficient buffer space. This prevents the use of the generic encoding/decoding functionality in some situations, such as in formatting the hex setting types. Implement a generic hex_encode() (based on the existing format_hex_setting()), implement base16_encode() and base16_decode() in terms of the more generic hex_encode() and hex_decode(), and update all callers to provide the additional buffer length parameter. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-027-7/+35
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Include destination address vector in ib_complete_recv()Michael Brown2012-08-313-10/+18
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Use explicit "source" and "dest" address vector parameter namesMichael Brown2012-08-313-24/+27
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Allow queue pairs to have a custom allocator for receive iobufsMichael Brown2012-08-312-2/+14
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-207-7/+14
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Use a one-shot process for CMRC shutdownMichael Brown2011-06-281-4/+2Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Pass containing object pointer to process step() methodsMichael Brown2011-06-281-5/+7
| | | | | | | | | Give the step() method a pointer to the containing object, rather than a pointer to the process. This is consistent with the operation of interface methods, and allows a single function to serve as both an interface method and a process step() method. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Send xfer_window_changed() when CMRC connection is establishedMichael Brown2011-06-281-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Add support for identifying the underlying hardware deviceMichael Brown2010-09-221-0/+13
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Add node GUID as distinct from the first port GUIDMichael Brown2010-09-163-33/+76
| | | | | | | | | | | | | | | iPXE currently uses the first port's port GUID as the node GUID, rather than using the (possibly distinct) real node GUID. This can confuse opensm during the handover to a loaded OS: it thinks the port already belongs to a different node and so discards our port information with a warning message about duplicate ports. Everything is picked up correctly on the second subnet sweep, after opensm has established that the "old" node no longer exists, but this can delay link-up unnecessarily by several seconds. Fix by using the real node GUID. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Always call ib_link_state_changed() in ib_smc_update()Michael Brown2010-09-161-2/+39
| | | | | | | | | | | | | | ib_smc_update() potentially updates the Infiniband port state, and so should almost always be followed by a call to ib_link_state_changed(). The one exception is the call made to ib_smc_update() before the device is registered. Fix by removing explicit calls to ib_link_state_changed() from drivers using ib_smc_update(), including a call to ib_link_state_changed() within ib_smc_update(), and creating a separate ib_smc_init() for use prior to device registration. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Match GID/GUID terminology as used in the IBAMichael Brown2010-09-158-89/+63Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [block] Replace gPXE block-device API with an iPXE asynchronous interfaceMichael Brown2010-09-141-85/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [infiniband] Respond to CM disconnection requestsMichael Brown2010-09-121-68/+153
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Fix TID magic signatureMichael Brown2010-09-121-1/+1
| | | | 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>
* [interface] Convert all data-xfer interfaces to generic interfacesMichael Brown2010-06-221-37/+21Star
| | | | | | | | | | | | | | Remove data-xfer as an interface type, and replace data-xfer interfaces with generic interfaces supporting the data-xfer methods. Filter interfaces (as used by the TLS layer) are handled using the generic pass-through interface capability. A side-effect of this is that deliver_raw() no longer exists as a data-xfer method. (In practice this doesn't lose any efficiency, since there are no instances within the current codebase where xfer_deliver_raw() is used to pass data to an interface supporting the deliver_raw() method.) 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-0/+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>
* [libc] Enable automated extraction of error usage reportsMichael Brown2010-05-311-4/+9
| | | | | | | Add preprocessor magic to the error definitions to enable every error usage to be tracked. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Use generic base16 functions for SRPMichael Brown2010-05-281-9/+7Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-209-35/+35
| | | | | | | | | | | 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>
* [infiniband] Rename IB_PKEY_NONE to IB_PKEY_DEFAULTMichael Brown2009-11-161-1/+1
| | | | There is no such thing as a non-existent partition.
* [infiniband] Include hostname in node description, if availableMichael Brown2009-11-161-1/+7
|
* [infiniband] Make node description invariant across all portsMichael Brown2009-11-161-4/+5
| | | | | | | IBA section 14.2.5.2 states that "the contents of the NodeDescription attribute are the same for all ports on a node". Satisfy this by using the HCA GUID rather than the port GUID to form the node description string.
* [infiniband] Send CM requests to target node's GSI rather than SM's GSIMichael Brown2009-10-171-1/+3
|
* [infiniband] Disambiguate CM connection rejection reasonsMichael Brown2009-08-102-4/+27
| | | | | | | | | | | | | There is diagnostic value in being able to disambiguate between the various reasons why an IB CM has rejected a connection attempt. In particular, reason 8 "invalid service ID" can be used to identify an incorrect SRP service_id root-path component, and reason 28 "consumer reject" corresponds to a genuine SRP login rejection IU, which can be passed up to the SRP layer. For rejection reasons other than "consumer reject", we should not pass through the private data, since it is most likely generated by the CM without any protocol-specific knowledge.
* [infiniband] Generate more specific errors in response to failure MADsMichael Brown2009-08-104-6/+8
| | | | | | | Generate errors within individual MAD transaction consumers such as ib_pathrec.c and ib_mcast.c, rather than within ib_mi.c. This allows for more meaningful error messages to eventually be displayed to the user.
* [infiniband] Add support for SRP over InfinibandMichael Brown2009-08-101-0/+406
| | | | | | | | SRP is the SCSI RDMA Protocol. It allows for a method of SAN booting whereby the target is responsible for reading and writing data using Remote DMA directly to the initiator's memory. The software initiator merely sends and receives SCSI commands; it never has to touch the actual data.
* [infiniband] Add a "communication-managed reliable connection" protocolMichael Brown2009-08-101-0/+435
| | | | | | | SRP over Infiniband uses a protocol whereby data is sent via a combination of the CM private data fields and the RC queue pair itself. This seems sufficiently generic that it's worth having available as a separate protocol.
* [infiniband] Handle duplicate Communication Management REPsMichael Brown2009-08-091-0/+55
| | | | | | | | | | | We will terminate our transaction as soon as we receive the first CM REP, since that provides all the state that we need. However, the peer may resend the REP if it didn't see our RTU, and if we don't respond with another RTU we risk being disconnected. (This protocol appears not to handle retries gracefully.) Fix by adding a management agent that will listen for these duplicate REPs and send back an RTU.
* [infiniband] Update all other MAD users to use a management interfaceMichael Brown2009-08-094-903/+554Star
|
* [infiniband] Update subnet management agent to use a management interfaceMichael Brown2009-08-092-297/+362
|
* [infiniband] Add the concept of a management interfaceMichael Brown2009-08-091-0/+410
| | | | | | | | | A management interface is the component through which both local and remote management agents are accessed. This new implementation of a management interface allows for the user to react to timed-out transactions, and also allows for cancellation of in-progress transactions.
* [infiniband] Change IB_{QPN,QKEY,QPT} names from {SMA,GMA} to {SMI,GSI}Michael Brown2009-08-062-4/+4
| | | | | | | | | | The IBA specification refers to management "interfaces" and "agents". The interface is the component that connects to the queue pair and sends and receives MADs; the agent is the component that constructs the reply to the MAD. Rename the IB_{QPN,QKEY,QPT} constants as a first step towards making this separation in gPXE.
* [infiniband] Add Communication Manager (CM)Michael Brown2009-07-181-0/+329
| | | | | The Communication Manager is responsible for handling the setup and teardown of RC connections.
* [infiniband] Add infrastructure for RC queue pairsMichael Brown2009-07-183-6/+23
| | | | | | | | | | | | | | | | | | Queue pairs are now assumed to be created in the INIT state, with a call to ib_modify_qp() required to bring the queue pair to the RTS state. ib_modify_qp() no longer takes a modification list; callers should modify the relevant queue pair parameters (e.g. qkey) directly and then call ib_modify_qp() to synchronise the changes to the hardware. The packet sequence number is now a property of the queue pair, rather than of the device. Each queue pair may have an associated address vector. For RC queue pairs, this is the address vector that will be programmed in to the hardware as the remote address. For UD queue pairs, it will be used as the default address vector if none is supplied to ib_post_send().
* [infiniband] Pass a generic MAD to ib_set_port_info()Michael Brown2009-07-181-1/+1
|
* [infiniband] Expose supported and enabled link speeds and widthsMichael Brown2009-07-182-16/+38
|
* [infiniband] Allow MAD handlers to indicate response via return valueMichael Brown2009-07-183-62/+100
| | | | | | | | Now that MAD handlers no longer return a status code, we can allow them to return a pointer to a MAD structure if and only if they want to send a response. This provides a more natural and flexible approach than using a "response method" field within the handler's descriptor.
* [infiniband] Remove the return status code from MAD handlersMichael Brown2009-07-183-67/+36Star
| | | | | | | | | | | | | MAD handlers have to set the status fields within the MAD itself anyway, in order to provide a meaningful response MAD; the additional gPXE return status code is just noise. Note that we probably don't need to ever explicitly set the status to IB_MGMT_STATUS_OK, since it should already have this value from the request. (By not explicitly setting the status in this way, we can safely have ib_sma_set_xxx() call ib_sma_get_xxx() in order to generate the GetResponse MAD without worrying that ib_sma_get_xxx() will clear any error status set by ib_sma_set_xxx().)
* [infiniband] Allow external QPN to differ from real QPNMichael Brown2009-07-181-5/+5
| | | | | | | Most IB hardware seems not to allow allocation of the genuine QPNs 0 and 1, so allow for the externally-visible QPN (as constructed and parsed by ib_packet, where used) to differ from the real hardware-allocated QPN.
* [infiniband] Always create an SMA and a GMAMichael Brown2009-07-184-334/+269Star
|
* [infiniband] Add notion of a queue pair typeMichael Brown2009-07-182-4/+6
|
* [infiniband] Allow completion queue operations to be optionalMichael Brown2009-07-181-22/+0Star
| | | | | The send completion handler typically will just free the I/O buffer, so allow this common case to be handled by the Infiniband core.
* [infiniband] Improve ib_packet debugging messagesMichael Brown2009-07-181-7/+15
|
* [infiniband] Implement SMA as an instance of a GMAMichael Brown2009-07-182-316/+144Star
| | | | | The GMA code was based upon the SMA code. We can save space by making the SMA simply an instance of the GMA.
* [infiniband] Pass GMA as a parameter to GMA MAD handlersMichael Brown2009-07-183-64/+63Star
|
* [ipoib] Remove the queue set abstractionMichael Brown2009-07-181-97/+0Star
| | | | | Now that IPoIB has to deal with only one set of queues, the queue set abstraction becomes merely an inconvenient wrapper.