summaryrefslogtreecommitdiffstats
path: root/src/net
Commit message (Collapse)AuthorAgeFilesLines
...
* [netdevice] Allow the hardware and link-layer addresses to differ in sizeMichael Brown2009-08-123-2/+15
| | | | | | | | | | IPoIB has a 20-byte link-layer address, of which only eight bytes represent anything relating to a "hardware address". The PXE and EFI SNP APIs expect the permanent address to be the same size as the link-layer address, so fill in the "permanent address" field with the initial link layer address (as generated by register_netdev() based upon the real hardware address).
* [netdevice] Separate out the concept of hardware and link-layer addressesMichael Brown2009-08-122-2/+6
| | | | | | | | | | | The hardware address is an intrinsic property of the hardware, while the link-layer address can be changed at runtime. This separation is exposed via APIs such as PXE and EFI, but is currently elided by gPXE. Expose the hardware and link-layer addresses as separate properties within a net device. Drivers should now fill in hw_addr, which will be used to initialise ll_addr at the time of calling register_netdev().
* [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 last_opened_ibdev(), analogous to last_opened_netdev()Michael Brown2009-08-102-1/+24
| | | | | | | 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
|
* [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.
* [scsi] Make LUN a property of the SCSI backend onlyMichael Brown2009-08-101-1/+0Star
| | | | | Nothing within the SCSI core actually refers to the LUN, so we can simplify matters by treating it as purely a property of the backend.
* [scsi] Generalise iscsi_parse_lun() to scsi_parse_lun()Michael Brown2009-08-101-37/+1Star
|
* [scsi] Generalise iscsi_detached_command() to scsi_detached_command()Michael Brown2009-08-101-6/+1Star
|
* [process] Make it safe to call process_add() multiple timesMichael Brown2009-08-103-0/+3
|
* [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.
* [802.11] Fix memory leak on unsuccessful probesJoshua Oreman2009-08-091-2/+1Star
| | | | | | | When a probe found no results, the list head of beacons would not be freed, leaking 16 bytes of memory per probe. Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [802.11] Set channels early on to avoid tuning to an undefined channelJoshua Oreman2009-08-091-0/+5
| | | | | | | | | | | Some cards (such as ath5k) always need to tune to a particular channel when they are reset; the reset may happen upon open(), which is before the channels array would be set up (in prepare_probe()). Avoid tuning the card to an inconsistent state by copying the hardware supported-channels array to the 802.11 device's allowable-channels array even before channels are "properly" set up. Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [802.11] Enhance support for driver PHY differencesJoshua Oreman2009-08-091-14/+76
| | | | | | | | | | | | | | | | | The prior net80211 model of physical-layer behavior for drivers was overly simplistic and limited the drivers that could be written. To be more flexible, split the driver-provided list of supported rates by band, and add a means for specifying a list of supported channels. Allow drivers to specify a hardware channel value that will be tied to uses of the channel. Expose net80211_duration() to drivers, and make the rate it uses in its computations configurable, so that it can be used in calculating durations that must be set in hardware for ACK and CTS packets. Add net80211_cts_duration() for the common case of calculating the duration for a CTS packet. Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [infiniband] Update all other MAD users to use a management interfaceMichael Brown2009-08-095-912/+562Star
|
* [infiniband] Update subnet management agent to use a management interfaceMichael Brown2009-08-093-303/+380
|
* [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-063-10/+10
| | | | | | | | | | 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.
* [tcp] Avoid printf format warnings on some compilersMichael Brown2009-08-021-9/+9
| | | | | | | | | | | | In several places, we currently use size_t to represent a difference between TCP sequence numbers. This can cause compiler warnings relating to printf format specifiers, since the result of (uint32_t+size_t) may be an unsigned long on some compilers. Fix by using uint32_t for all variables that represent a difference between TCP sequence numbers. Tested-by: Joshua Oreman <oremanj@xenon.get-linux.org>
* [802.11] Add support for 802.11 devices with software MAC layerJoshua Oreman2009-08-012-0/+2966
| | | | | | | | | This is required for all modern 802.11 devices, and allows drivers to be written for them with minimally more effort than is required for a wired NIC. Signed-off-by: Michael Brown <mcb30@etherboot.org> Modified-by: Michael Brown <mcb30@etherboot.org>
* [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-184-18/+66
| | | | | | | | | | | | | | | | | | 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-182-6/+6
|
* [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-182-7/+24
| | | | | | | 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-185-344/+292Star
|
* [infiniband] Add notion of a queue pair typeMichael Brown2009-07-183-5/+10
|
* [infiniband] Allow completion queue operations to be optionalMichael Brown2009-07-182-24/+12Star
| | | | | 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-183-316/+169Star
| | | | | 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.
* [infiniband] Provide a general mechanism for multicast group joinsMichael Brown2009-07-182-0/+239
| | | | Generalise out the multicast group membership record code from IPoIB.
* [infiniband] Allow for sending MADs via GMA without retransmissionMichael Brown2009-07-182-29/+53
|
* [infiniband] Make qkey and rate optional parameters to ib_post_send()Michael Brown2009-07-182-4/+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] Provide a general mechanism for path record lookupsMichael Brown2009-07-181-0/+221
| | | | Generalise out the path record lookup code from IPoIB.
* [infiniband] Create a general management agentMichael Brown2009-07-182-7/+443
| | | | | | Generalise the subnet management agent into a general management agent capable of sending and responding to MADs, including support for retransmissions as necessary.
* [infiniband] Centralise SMA and GMA queue constantsMichael Brown2009-07-182-2/+2
|
* [infiniband] Poll completion queues automaticallyMichael Brown2009-07-183-89/+110
| | | | | | | | | | | | | | | | | 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-183-5/+10
| | | | | | | | | | 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-182-16/+30
|
* [infiniband] Split queue set functionality out of ipoib.c to ib_qset.cMichael Brown2009-07-181-0/+133
|
* [infiniband] Move non-driver-specific code to net/infinibandMichael Brown2009-07-183-0/+959
|
* [netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocolMichael Brown2009-07-184-5/+21
| | | | | | | | | 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.
* [scsi] Make SCSI command issuing partially asynchronousMichael Brown2009-07-181-18/+11Star
| | | | | Move the icky call to step() from iscsi.c to scsi.c; this takes it at least one step further away from where it really doesn't belong.