13 Nov, 2009

1 commit

  • Current code has a limitation: an LSO header is not allowed to cross a
    64 byte boundary. This patch removes this limitation by setting the
    WQE RR for large headers thus allowing LSO headers of any size. The
    extra buffer reserved for MLX4_IB_QP_LSO QPs has been doubled, from 64
    to 128 bytes, assuming this is reasonable upper limit for header
    length. Also, this patch will cause IB_DEVICE_UD_TSO to be set only
    for HCA FW versions that set MLX4_DEV_CAP_FLAG_BLH; e.g. FW version
    2.6.000 and higher.

    Signed-off-by: Eli Cohen
    Signed-off-by: Roland Dreier

    Eli Cohen
     

06 Jun, 2009

1 commit

  • The ConnectX Programmer's Reference Manual states that the "SO" bit
    must be set when posting Fast Register and Local Invalidate send work
    requests. When this bit is set, the work request will be executed
    only after all previous work requests on the send queue have been
    executed. (If the bit is not set, Fast Register and Local Invalidate
    WQEs may begin execution too early, which violates the defined
    semantics for these operations)

    This fixes the issue with NFS/RDMA reported in

    Signed-off-by: Jack Morgenstein
    Cc:
    Signed-off-by: Roland Dreier

    Jack Morgenstein
     

28 May, 2009

1 commit

  • The current MTT allocator uses kmalloc() to allocate a buffer for its
    buddy allocator, and thus is limited in the amount of MTT segments
    that it can control. As a result, the size of memory that can be
    registered is limited too. This patch uses a module parameter to
    control the number of MTT entries that each segment represents,
    allowing more memory to be registered with the same number of
    segments.

    Signed-off-by: Eli Cohen
    Signed-off-by: Roland Dreier

    Eli Cohen
     

19 Mar, 2009

1 commit

  • When a port's link is down (except to driver restart) and the port is
    configured for auto sensing, we try to sense port link type (Ethernet
    or InfiniBand) in order to determine how to initialize the port. If
    the port type needs to be changed, all mlx4 for the device interfaces
    are unregistered and then registered again with the new port
    types. Sensing is done with intervals of 3 seconds.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: Roland Dreier

    Yevgeny Petrilin
     

22 Dec, 2008

1 commit

  • When using MSI-X mode, create a completion event queue for each CPU.
    Report the number of completion EQs in a new struct mlx4_caps member,
    num_comp_vectors, and extend the mlx4_cq_alloc() interface with a
    vector parameter so that consumers can specify which completion EQ
    should be used to report events for the CQ being created.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: Roland Dreier

    Yevgeny Petrilin
     

29 Nov, 2008

1 commit

  • Commit 7ff93f8b ("mlx4_core: Multiple port type support") introduced
    support for different port types. As part of that support, SET_PORT
    is invoked to set the port type during driver startup. However, as a
    side-effect, for IB ports the invocation of this command also sets the
    port's capability mask to zero (losing the default value set by FW).

    To fix this, get the default ib port capabilities (via a MAD_IFC Port
    Info query) during driver startup, and save them for use in the
    mlx4_SET_PORT command when setting the port-type to Infiniband.

    This patch fixes problems with subnet manager (SM) failover such as
    , which occurred
    because the IsTrapSupported bit in the capability mask was zeroed.

    Signed-off-by: Jack Morgenstein
    Signed-off-by: Roland Dreier

    Jack Morgenstein
     

23 Oct, 2008

4 commits

  • Multi-protocol adapters support different port types. Each consumer
    of mlx4_core queries for supported port types; in particular mlx4_ib
    can no longer assume that all physical ports belong to it. Port type
    is configured through a sysfs interface. When the type of a port is
    changed, all mlx4 interfaces are unregistered, and then registered
    again with the new port types.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: Roland Dreier

    Yevgeny Petrilin
     
  • Add support for managing MAC and VLAN filters for each port.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: Oren Duer
    Signed-off-by: Roland Dreier

    Yevgeny Petrilin
     
  • Get maximum ethernet MTU and default MAC address from the firmware
    QUERY_DEV_CAP command.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: Roland Dreier

    Yevgeny Petrilin
     
  • For ethernet support, we need to reserve QPs for the ethernet and
    fibre channel driver. The QPs are reserved at the end of the QP
    table. (This way we assure that they are aligned to their size)

    We need to consider these reserved ranges in bitmap creation, so we
    extend the mlx4 bitmap utility functions to allow reserved ranges at
    both the bottom and the top of the range.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: Roland Dreier

    Yevgeny Petrilin
     

11 Oct, 2008

1 commit

  • To allow allocating an aligned range of consecutive QP numbers, add an
    interface to reserve an aligned range of QP numbers and have the QP
    allocation function always take a QP number.

    This will be used for RSS support in the mlx4_en Ethernet driver and
    also potentially by IPoIB RSS support.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: Roland Dreier

    Yevgeny Petrilin
     

16 Sep, 2008

1 commit

  • Byte swap the addresses in the page list for fast register work requests
    to big endian to match what the HCA expectx. Also, the addresses must
    have the "present" bit set so that the HCA knows it can access them.
    Otherwise the HCA will fault the first time it accesses the memory
    region.

    Signed-off-by: Vladimir Sokolovsky
    Signed-off-by: Roland Dreier

    Vladimir Sokolovsky
     

07 Aug, 2008

1 commit


26 Jul, 2008

1 commit


23 Jul, 2008

2 commits


15 Jul, 2008

1 commit


30 Apr, 2008

1 commit


26 Apr, 2008

2 commits


24 Apr, 2008

1 commit


17 Apr, 2008

5 commits


09 Feb, 2008

1 commit

  • 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
    Signed-off-by: Jack Morgenstein
    Signed-off-by: Roland Dreier

    Jack Morgenstein
     

07 Feb, 2008

3 commits

  • 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

    Roland Dreier
     
  • 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
    Signed-off-by: Jack Morgenstein
    Signed-off-by: Roland Dreier

    Jack Morgenstein
     
  • 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

    Roland Dreier
     

15 Oct, 2007

1 commit


10 Oct, 2007

2 commits


13 Jul, 2007

2 commits


10 Jul, 2007

1 commit


19 Jun, 2007

1 commit

  • 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

    Roland Dreier
     

18 Jun, 2007

1 commit

  • 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

    Roland Dreier
     

09 May, 2007

1 commit

  • 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

    Roland Dreier