aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mlx4
AgeCommit message (Collapse)AuthorFilesLines
2008-04-29mlx4_core: Add a way to set the "collapsed" CQ flagYevgeny Petrilin1-1/+2
Extend the mlx4_cq_resize() API with a way to set the "collapsed" flag for the CQ being created. Signed-off-by: Yevgeny Petrilin <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-04-25mlx4_core: Add helper to move QP to ready-to-sendYevgeny Petrilin1-0/+4
Avoid duplicating code in ethernet and FC modules. Signed-off-by: Yevgeny Petrilin <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-04-25mlx4_core: Add HW queues allocation helpersYevgeny Petrilin1-0/+11
Wrap doorbell, buffer and MTT allocation in helper functions for ethernet and FC modules to use. Signed-off-by: Yevgeny Petrilin <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-04-23mlx4_core: Move kernel doorbell management into coreYevgeny Petrilin1-0/+29
In addition to mlx4_ib, there will be ethernet and FC consumers of mlx4_core, so move the code for managing kernel doorbells into the core module to avoid having to duplicate this multiple times. Signed-off-by: Yevgeny Petrilin <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-04-16IB/mlx4: Add support for resizing CQsVladimir Sokolovsky1-0/+2
Signed-off-by: Vladimir Sokolovsky <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-04-16IB/mlx4: Add support for modifying CQ moderation parametersEli Cohen2-1/+4
Signed-off-by: Eli Cohen <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-04-16IB/mlx4: Add IPoIB LSO supportEli Cohen2-0/+6
Add TSO support to the mlx4_ib driver. Signed-off-by: Eli Cohen <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-04-16IB/mlx4: Add IPoIB checksum offload supportEli Cohen2-6/+18
ConnectX devices support checksum generation and verification of TCP and UDP packets for UD IPoIB messages. This patch checks if the HCA supports this and sets the IB_DEVICE_UD_IP_CSUM capability flag if it does. It implements support for handling the IB_SEND_IP_CSUM send flag and setting the csum_ok field in receive work completions. Signed-off-by: Eli Cohen <[email protected]> Signed-off-by: Ali Ayub <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-04-16mlx4_core: Fix confusion between mlx4_event and mlx4_dev_event enumsRoland Dreier1-2/+1
The struct mlx4_interface.event() method was supposed to get an enum mlx4_dev_event, but the driver code was actually passing in the hardware enum mlx4_event values. Fix up the callers of mlx4_dispatch_event() so that they pass in the right type of value, and fix up the event method in mlx4_ib so that it can handle the enum mlx4_dev_event values. This eliminates the need for the subtype parameter to the event method, so remove it. This also fixes the sparse warning drivers/net/mlx4/intf.c:127:48: warning: mixing different enum types drivers/net/mlx4/intf.c:127:48: int enum mlx4_event versus drivers/net/mlx4/intf.c:127:48: int enum mlx4_dev_event Signed-off-by: Roland Dreier <[email protected]>
2008-02-08IB/mlx4: Use multiple WQ blocks to post smaller send WQEsJack Morgenstein2-0/+9
ConnectX HCA supports shrinking WQEs, so that a single work request can be made of multiple units of wqe_shift. This way, WRs can differ in size, and do not have to be a power of 2 in size, saving memory and speeding up send WR posting. Unfortunately, if we do this then the wqe_index field in CQEs can't be used to look up the WR ID anymore, so our implementation does this only if selective signaling is off. Further, on 32-bit platforms, we can't use vmap() to make the QP buffer virtually contigious. Thus we have to use constant-sized WRs to make sure a WR is always fully within a single page-sized chunk. Finally, we use WRs with the NOP opcode to avoid wrapping around the queue buffer in the middle of posting a WR, and we set the NoErrorCompletion bit to avoid getting completions with error for NOP WRs. However, NEC is only supported starting with firmware 2.2.232, so we use constant-sized WRs for older firmware. And, since MLX QPs only support SEND, we use constant-sized WRs in this case. When stamping during NOP posting, do stamping following setting of the NOP WQE valid bit. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Jack Morgenstein <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-02-06mlx4_core: Clean up struct mlx4_bufRoland Dreier1-6/+4
Now that struct mlx4_buf.u is a struct instead of a union because of the vmap() changes, there's no point in having a struct at all. So move .direct and .page_list directly into struct mlx4_buf and get rid of a bunch of unnecessary ".u"s. Signed-off-by: Roland Dreier <[email protected]>
2008-02-06mlx4_core: For 64-bit systems, vmap() kernel queue buffersJack Morgenstein1-2/+2
Since kernel virtual memory is not a problem on 64-bit systems, there is no reason to use our own 2-layer page mapping scheme for large kernel queue buffers on such systems. Instead, map the page list to a single virtually contiguous buffer with vmap(), so that can we access buffer memory via direct indexing. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Jack Morgenstein <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2008-02-06IB/mlx4: Consolidate code to get an entry from a struct mlx4_bufRoland Dreier1-0/+8
We use struct mlx4_buf for kernel QP, CQ and SRQ buffers, and the code to look up an entry is duplicated in get_cqe_from_buf() and the QP and SRQ versions of get_wqe(). Factor this out into mlx4_buf_offset(). This will also make it easier to switch over to using vmap() for buffers. Signed-off-by: Roland Dreier <[email protected]>
2007-10-14mlx4_core: Kill mlx4_write64_raw()Roland Dreier1-11/+0
It's a leftover from development that's never used in the real driver. Signed-off-by: Roland Dreier <[email protected]>
2007-10-09IB/mlx4: Implement FMRsJack Morgenstein1-0/+21
Implement FMRs for mlx4. This is an adaptation of code from mthca. Signed-off-by: Jack Morgenstein <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2007-10-09IB/mlx4: Display misc device information under /sys/class/infiniband/Jack Morgenstein1-0/+6
display the following device information under /sys/class/infiniband/mlx4_X: board_id, fw_ver, hw_rev, hca_type. This patch makes this information available to userspace utilities such as ibstat and ibv_devinfo. Signed-off-by: Jack Morgenstein <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2007-07-12IB/mlx4: Implement query SRQJack Morgenstein1-0/+1
Signed-off-by: Dotan Barak <[email protected]> Signed-off-by: Jack Morgenstein <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2007-07-12IB/mlx4: Implement query QPJack Morgenstein1-0/+3
Signed-off-by: Jack Morgenstein <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2007-07-09mlx4_core: Get the maximum message size from reported device capabilitiesDotan Barak1-0/+1
Get the maximum message size from the device capabilities returned from the QUERY_DEV_CAP firmware command, rather than hard-coding 2 GB. Signed-off-by: Dotan Barak <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2007-06-18IB/mlx4: Make sure inline data segments don't cross a 64 byte boundaryRoland Dreier1-0/+4
Inline data segments in send WQEs are not allowed to cross a 64 byte boundary. We use inline data segments to hold the UD headers for MLX QPs (QP0 and QP1). A send with GRH on QP1 will have a UD header that is too big to fit in a single inline data segment without crossing a 64 byte boundary, so split the header into two inline data segments. Signed-off-by: Roland Dreier <[email protected]>
2007-06-18IB/mlx4: Handle FW command interface rev 3Roland Dreier2-6/+8
Upcoming firmware introduces command interface revision 3, which changes the way port capabilities are queried and set. Update the driver to handle both the new and old command interfaces by adding a new MLX4_FLAG_OLD_PORT_CMDS that it is set after querying the firmware interface revision and then using the correct interface based on the setting of the flag. Signed-off-by: Roland Dreier <[email protected]>
2007-05-08IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adaptersRoland Dreier7-0/+1118
Add an InfiniBand driver for Mellanox ConnectX adapters. Because these adapters can also be used as ethernet NICs and Fibre Channel HBAs, the driver is split into two modules: mlx4_core: Handles low-level things like device initialization and processing firmware commands. Also controls resource allocation so that the InfiniBand, ethernet and FC functions can share a device without stepping on each other. mlx4_ib: Handles InfiniBand-specific things; plugs into the InfiniBand midlayer. Signed-off-by: Roland Dreier <[email protected]>