aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-08-02[tcp] Avoid printf format warnings on some compilersMichael Brown1-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>
2009-08-02[build] Allow safe concurrent builds of .iso, .liso and .sdsk targetsMichael Brown3-8/+5
The geniso, genliso and gensdsk scripts contain hard-coded temporary directory names, and so could potentially collide with each other when run as part of a concurrent build (e.g. "make -j 4"). Fix by using mktemp to generate suitable temporary directory names.
2009-08-02[build] Make .liso image generation silent unless errors occurMichael Brown1-1/+1
2009-08-02[build] Add syslinux floppy image type .sdskMarty Connor3-27/+89
We add a syslinux floppy disk type using parts of the genliso script. This floppy image cat be dd'ed to a physical floppy or used in instances where a virtual floppy with an mountable DOS filesystem is useful. We also modify the genliso script to only generate .liso images rather than creating images depending on how it is called. Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-08-01[rtl818x] Add driver for Realtek 8180/8185 wireless cardsJoshua Oreman10-0/+2607
2009-08-01[802.11] Add support for 802.11 devices with software MAC layerJoshua Oreman7-1/+5144
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>
2009-07-17[hermon] Add support for RC queue pairsMichael Brown3-70/+221
2009-07-17[hermon] Allow software GMA to receive packets destined for QP1Michael Brown2-45/+277
The Linux IB Communication Manager will always send MADs to QP1, rather than back to the originating QP. On Hermon, QP1 is by default handled by the embedded firmware. We can change this, but the cost is that we have to handle both QP0 and QP1 (i.e. we have to provide SMA as well as GMA service in software), and we have to use MLX queues rather than standard UD queues (i.e. we have to construct the UD datagrams by hand). There doesn't seem to be any viable way around this situation, ugly though it is.
2009-07-17[hermon] Disable debugging around mapping of firmware tablesMichael Brown1-0/+8
2009-07-17[hermon] Remove an unnecessary check for GID-less transmissionsMichael Brown1-8/+1
2009-07-17[infiniband] Add Communication Manager (CM)Michael Brown4-0/+524
The Communication Manager is responsible for handling the setup and teardown of RC connections.
2009-07-17[infiniband] Add infrastructure for RC queue pairsMichael Brown9-93/+148
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().
2009-07-17[infiniband] Pass a generic MAD to ib_set_port_info()Michael Brown4-14/+12
2009-07-17[infiniband] Expose supported and enabled link speeds and widthsMichael Brown4-23/+61
2009-07-17[infiniband] Allow MAD handlers to indicate response via return valueMichael Brown4-71/+104
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.
2009-07-17[infiniband] Remove the return status code from MAD handlersMichael Brown4-69/+37
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().)
2009-07-17[infiniband] Allow external QPN to differ from real QPNMichael Brown3-8/+32
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.
2009-07-17[infiniband] Always create an SMA and a GMAMichael Brown9-390/+299
2009-07-17[infiniband] Add notion of a queue pair typeMichael Brown6-10/+27
2009-07-17[infiniband] Allow completion queue operations to be optionalMichael Brown2-24/+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.
2009-07-17[infiniband] Improve ib_packet debugging messagesMichael Brown1-7/+15
2009-07-17[ipoib] Attempt the broadcast group join only if the link is upMichael Brown1-9/+4
Attempting the broadcast group join while the link is down is harmless, but can generate annoying volumes of debug messages.
2009-07-17[infiniband] Implement SMA as an instance of a GMAMichael Brown8-363/+193
The GMA code was based upon the SMA code. We can save space by making the SMA simply an instance of the GMA.
2009-07-17[infiniband] Pass GMA as a parameter to GMA MAD handlersMichael Brown4-72/+72
2009-07-17[ipoib] Remove the queue set abstractionMichael Brown3-148/+36
Now that IPoIB has to deal with only one set of queues, the queue set abstraction becomes merely an inconvenient wrapper.
2009-07-17[ipoib] Kill off the now-unused IPoIB metadata queue setMichael Brown1-144/+39
All packets handled by the metadata queue set now go via the GMA.
2009-07-17[infiniband] Provide a general mechanism for multicast group joinsMichael Brown6-129/+274
Generalise out the multicast group membership record code from IPoIB.
2009-07-17[infiniband] Allow for sending MADs via GMA without retransmissionMichael Brown3-30/+54
2009-07-17[infiniband] Make qkey and rate optional parameters to ib_post_send()Michael Brown3-10/+10
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.
2009-07-17[ipoib] Clarify new role of IPoIB peer cache as for MAC addresses onlyMichael Brown1-39/+21
Now that path record lookups are handled entirely via ib_resolve_path(), the only role of the IPoIB peer cache is as a lookup table for MAC addresses. Update the code structure and comments to reflect this.
2009-07-17[ipoib] Expose the real broadcast MACMichael Brown1-46/+37
The IPoIB broadcast MAC address varies according to the partition key. Now that the broadcast MAC address is a property of the network device rather than of the link layer, we can expose this real MAC address directly. The broadcast LID is now identified via a path record lookup; this is marginally inefficient (since it was present in the MCMemberRecord GetResponse), but avoids the need to special-case broadcasts when constructing the address vector in ipoib_transmit().
2009-07-17[ipoib] Use Infiniband broadcast QPN in IPoIB broadcast MAC addressMichael Brown1-10/+3
Remove the special handling of the IPoIB broadcast QPN.
2009-07-17[infiniband] Provide a general mechanism for path record lookupsMichael Brown4-108/+247
Generalise out the path record lookup code from IPoIB.
2009-07-17[infiniband] Create a general management agentMichael Brown6-7/+534
Generalise the subnet management agent into a general management agent capable of sending and responding to MADs, including support for retransmissions as necessary.
2009-07-17[infiniband] Centralise SMA and GMA queue constantsMichael Brown5-20/+23
2009-07-17[infiniband] Poll completion queues automaticallyMichael Brown7-113/+124
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.
2009-07-17[infiniband] Centralise assumption of 2048-byte payloadsMichael Brown8-18/+22
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.)
2009-07-17[infiniband] Provide ib_get_hca_info() as a commonly-available functionMichael Brown4-19/+35
2009-07-17[infiniband] Split queue set functionality out of ipoib.c to ib_qset.cMichael Brown4-137/+204
2009-07-17[infiniband] Move non-driver-specific code to net/infinibandMichael Brown4-1/+1
2009-07-17[netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocolMichael Brown12-58/+49
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.
2009-07-17[ata] Make ATA command issuing partially asynchronousMichael Brown4-9/+29
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.
2009-07-17[scsi] Improve SCSI debuggingMichael Brown1-9/+26
2009-07-17[scsi] Make SCSI command issuing partially asynchronousMichael Brown4-30/+33
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.
2009-07-17[debug] Use a delimiter to break up DBG_HD() outputMichael Brown1-1/+2
Reading sixteen columns of hex digits can be difficult; include a "-" character to split the output into two groups of eight columns.
2009-07-06[xfer] Always nullify interface while sending close() messageMichael Brown2-5/+3
Objects typically call xfer_close() as part of their response to a close() message. If the initiating object has already nullified the xfer interface then this isn't a problem, but it can lead to unexpected behaviour when the initiating object is aiming to reuse the connection and so does not nullify the interface. Fix by always temporarily nullifying the interface during xfer_close() (as was already being done by xfer_vreopen() in order to work around this specific problem). Reported-by: infernix <infernix@infernix.net> Tested-by: infernix <infernix@infernix.net>
2009-06-28[pxe] Add startpxe and stoppxe commandsMichael Brown4-0/+38
These commands can be used to activate or deactivate the PXE API (on a specifiable network interface). This is currently of limited use, since most image formats will call shutdown() before booting the image, meaning that the underlying net device gets shut down during remove_devices() anyway.
2009-06-28[ifmgmt] Move ifmgmt_cmd.h to include/hciMichael Brown2-1/+1
2009-06-28[ifmgmt] Optimise prototype for ifcommon_exec()Michael Brown2-12/+12
ifcommon_exec() was long-ago marked as __attribute__((regparm(2))) in order to minimise the size of functions that call into it. Since then, gPXE has added -mregparm=3 as a general compilation option, and this "optimisation" is now counter-productive. Change (and simplify) the prototype to minimise code size given the current compilation conditions.
2009-06-28[pxe] Check for unhookable interrupts in PXENV_STOP_UNDIMichael Brown1-0/+9
PXENV_STOP_UNDI should return PXENV_STATUS_KEEP_UNDI if the UNDI cannot be safely unloaded (e.g. due to interrupt vectors that could not be unhooked).