summaryrefslogtreecommitdiffstats
path: root/src/net/infiniband.c
Commit message (Collapse)AuthorAgeFilesLines
* [infiniband] Return status code from ib_create_mi()Michael Brown2017-03-221-8/+6Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Return status code from ib_create_cq() and ib_create_qp()Michael Brown2017-03-221-19/+26
| | | | | | | | | | | | Any underlying errors arising during ib_create_cq() or ib_create_qp() are lost since the functions simply return NULL on error. This makes debugging harder, since a debug-enabled build is required to discover the root cause of the error. Fix by returning a status code from these functions, thereby allowing any underlying errors to be propagated. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Make IPoIB support configurable at build timeMichael Brown2016-03-091-3/+0Star
| | | | | | | Add a build configuration option VNIC_IPOIB to control whether or not IPoIB support is included for Infiniband devices. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Assign names to queue pairsMichael Brown2016-03-081-6/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Assign names to Infiniband devices for debug messagesMichael Brown2016-03-081-55/+69
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Profile post work queue entry operationsMichael Brown2016-01-101-0/+25
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipoib] Fix a race when chain-loading undionly.kpxe in IPoIBWissam Shoukair2015-08-171-0/+6
| | | | | | | | | | | | | | | The Infiniband link status change callback ipoib_link_state_changed() may be called while the IPoIB device is closed, in which case there will not be an IPoIB queue pair to be joined to the IPv4 broadcast group. This leads to NULL pointer dereferences in ib_mcast_attach() and ib_mcast_detach(). Fix by not attempting to join (or leave) the broadcast group unless we actually have an IPoIB queue pair. Signed-off-by: Wissam Shoukair <wissams@mellanox.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix the REQUIRE_SYMBOL mechanismMichael Brown2015-03-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | At some point in the past few years, binutils became more aggressive at removing unused symbols. To function as a symbol requirement, a relocation record must now be in a section marked with @progbits and must not be in a section which gets discarded during the link (either via --gc-sections or via /DISCARD/). Update REQUIRE_SYMBOL() to generate relocation records meeting these criteria. To minimise the impact upon the final binary size, we use existing symbols (specified via the REQUIRING_SYMBOL() macro) as the relocation targets where possible. We use R_386_NONE or R_X86_64_NONE relocation types to prevent any actual unwanted relocation taking place. Where no suitable symbol exists for REQUIRING_SYMBOL() (such as in config.c), the macro PROVIDE_REQUIRING_SYMBOL() can be used to generate a one-byte-long symbol to act as the relocation target. If there are versions of binutils for which this approach fails, then the fallback will probably involve killing off REQUEST_SYMBOL(), redefining REQUIRE_SYMBOL() to use the current definition of REQUEST_SYMBOL(), and postprocessing the linked ELF file with something along the lines of "nm -u | wc -l" to check that there are no undefined symbols remaining. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use REQUIRE_OBJECT() to drag in per-object configurationMichael Brown2015-03-051-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | | | | | | | | | Relicence files with kind permission from the following contributors: Alex Williamson <alex.williamson@redhat.com> Eduardo Habkost <ehabkost@redhat.com> Greg Jednaszewski <jednaszewski@gmail.com> H. Peter Anvin <hpa@zytor.com> Marin Hannache <git@mareo.fr> Robin Smidsrød <robin@smidsrod.no> Shao Miller <sha0.miller@gmail.com> Thomas Horsten <thomas@horsten.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Include destination address vector in ib_complete_recv()Michael Brown2012-08-311-2/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Use explicit "source" and "dest" address vector parameter namesMichael Brown2012-08-311-16/+15Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Allow queue pairs to have a custom allocator for receive iobufsMichael Brown2012-08-311-2/+5
| | | | 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>
* [infiniband] Reset port state after closing deviceMichael Brown2011-11-151-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Open device prior to creating SMI and GSI queue pairsMichael Brown2011-11-151-9/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Poll event queues only for devices that are openMichael Brown2011-11-151-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Pass containing object pointer to process step() methodsMichael Brown2011-06-281-4/+1Star
| | | | | | | | | 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>
* [list] Fix typographical error from previous commitShao Miller2010-11-111-1/+2
| | | | | | | | | | Fix typographical error from commit ea631f6 ("[list] Add list_first_entry()"). The symptom was PXELINUX 3.86 causing a stack overflow under VMware. Tested-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Add list_first_entry()Michael Brown2010-11-081-5/+5
| | | | | | | | | There are several points in the iPXE codebase where list_for_each_entry() is (ab)used to extract only the first entry from a list. Add a macro list_first_entry() to make this code easier to read. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Add the notion of an Ethernet queue pair typeMichael Brown2010-09-211-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Avoid leaving uninitialised lists in struct ib_deviceMichael Brown2010-09-211-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Add node GUID as distinct from the first port GUIDMichael Brown2010-09-161-11/+5Star
| | | | | | | | | | | | | | | 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] Match GID/GUID terminology as used in the IBAMichael Brown2010-09-151-7/+6Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Add the concept of an Infiniband upper-layer driverMichael Brown2010-09-051-38/+82
| | | | | | | | | Replace the explicit calls from the Infiniband core to the IPoIB layer with the general concept of an Infiniband upper-layer driver (analogous to a PCI driver) which can create arbitrary devices on top of Infiniband devices. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Enable automated extraction of error usage reportsMichael Brown2010-05-311-4/+8
| | | | | | | Add preprocessor magic to the error definitions to enable every error usage to be tracked. 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>
* [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] Report IB link status as IPoIB netdevice statusMichael Brown2009-11-161-0/+28
|
* [infiniband] Add last_opened_ibdev(), analogous to last_opened_netdev()Michael Brown2009-08-101-0/+23
| | | | | | | The minimal-surprise behaviour, when no explicit SRP initiator device is specified, will probably be to use the most recently opened Infiniband device. This matches our behaviour with using the most recently opened net device for PXE, iSCSI, AoE, NBI, etc.
* [infiniband] Add find_ibdev()Michael Brown2009-08-101-0/+16
|
* [process] Make it safe to call process_add() multiple timesMichael Brown2009-08-101-0/+1
|
* [infiniband] Update all other MAD users to use a management interfaceMichael Brown2009-08-091-9/+8Star
|
* [infiniband] Update subnet management agent to use a management interfaceMichael Brown2009-08-091-6/+18
|
* [infiniband] Change IB_{QPN,QKEY,QPT} names from {SMA,GMA} to {SMI,GSI}Michael Brown2009-08-061-6/+6
| | | | | | | | | | 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 infrastructure for RC queue pairsMichael Brown2009-07-181-12/+43
| | | | | | | | | | | | | | | | | | 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-5/+5
|
* [infiniband] Allow external QPN to differ from real QPNMichael Brown2009-07-181-2/+19
| | | | | | | 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-181-10/+23
|
* [infiniband] Add notion of a queue pair typeMichael Brown2009-07-181-1/+4
|
* [infiniband] Allow completion queue operations to be optionalMichael Brown2009-07-181-2/+12
| | | | | 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] Implement SMA as an instance of a GMAMichael Brown2009-07-181-0/+25
| | | | | The GMA code was based upon the SMA code. We can save space by making the SMA simply an instance of the GMA.
* [infiniband] Provide a general mechanism for multicast group joinsMichael Brown2009-07-181-0/+4
| | | | Generalise out the multicast group membership record code from IPoIB.
* [infiniband] Make qkey and rate optional parameters to ib_post_send()Michael Brown2009-07-181-0/+6
| | | | | | | | | | The queue key is stored as a property of the queue pair, and so can optionally be added by the Infiniband core at the time of calling ib_post_send(), rather than always having to be specified by the caller. This allows IPoIB to avoid explicitly keeping track of the data queue key.
* [infiniband] Create a general management agentMichael Brown2009-07-181-7/+29
| | | | | | Generalise the subnet management agent into a general management agent capable of sending and responding to MADs, including support for retransmissions as necessary.
* [infiniband] Poll completion queues automaticallyMichael Brown2009-07-181-3/+109
| | | | | | | | | | | | | | | | | Currently, all Infiniband users must create a process for polling their completion queues (or rely on a regular hook such as netdev_poll() in ipoib.c). Move instead to a model whereby the Infiniband core maintains a single process calling ib_poll_eq(), and polling the event queue triggers polls of the applicable completion queues. (At present, the Infiniband core simply polls all of the device's completion queues.) Polling a completion queue will now implicitly refill all attached receive work queues; this is analogous to the way that netdev_poll() implicitly refills the RX ring. Infiniband users no longer need to create a process just to poll their completion queues and refill their receive rings.
* [infiniband] Centralise assumption of 2048-byte payloadsMichael Brown2009-07-181-0/+7
| | | | | | | | | | IPoIB and the SMA have separate constants for the packet size to be used to I/O buffer allocations. Merge these into the single IB_MAX_PAYLOAD_SIZE constant. (Various other points in the Infiniband stack have hard-coded assumptions of a 2048-byte payload; we don't currently support variable MTUs.)
* [infiniband] Provide ib_get_hca_info() as a commonly-available functionMichael Brown2009-07-181-0/+26
|
* [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.
* [infiniband] Call ib_open() only when opening the IPoIB net deviceMichael Brown2009-01-021-7/+36
| | | | | Defer the call to ib_open() until we want to actually open the device, rather than when the device is registered.