11 Apr, 2014

1 commit


08 Mar, 2014

5 commits

  • This commit takes care of the generated signature error CQE generated
    by the HW (if happened). The underlying mlx5 driver will handle
    signature error completions and will mark the relevant memory region
    as dirty.

    Once the consumer gets the completion for the transaction, it must
    check for signature errors on signature memory region using a new
    lightweight verb ib_check_mr_status().

    In case the user doesn't check for signature error (i.e. doesn't call
    ib_check_mr_status() with status check IB_MR_CHECK_SIG_STATUS), the
    memory region cannot be used for another signature operation
    (REG_SIG_MR work request will fail).

    Signed-off-by: Sagi Grimberg
    Signed-off-by: Roland Dreier

    Sagi Grimberg
     
  • This patch implements IB_WR_REG_SIG_MR posted by the user.

    Baisically this WR involves 3 WQEs in order to prepare and properly
    register the signature layout:

    1. post UMR WR to register the sig_mr in one of two possible ways:
    * In case the user registered a single MR for data so the UMR data segment
    consists of:
    - single klm (data MR) passed by the user
    - BSF with signature attributes requested by the user.
    * In case the user registered 2 MRs, one for data and one for protection,
    the UMR consists of:
    - strided block format which includes data and protection MRs and
    their repetitive block format.
    - BSF with signature attributes requested by the user.

    2. post SET_PSV in order to set the memory domain initial
    signature parameters passed by the user.
    SET_PSV is not signaled and solicited CQE.

    3. post SET_PSV in order to set the wire domain initial
    signature parameters passed by the user.
    SET_PSV is not signaled and solicited CQE.

    * After this compound WR we place a small fence for next WR to come.

    This patch also introduces some helper functions to set the BSF correctly
    and determining the signature format selectors.

    Signed-off-by: Sagi Grimberg
    Signed-off-by: Roland Dreier

    Sagi Grimberg
     
  • This will be useful when processing signature errors on a specific
    key. The mlx5 driver will lookup the matching mlx5 memory region
    structure and mark it as dirty (contains signature errors).

    Signed-off-by: Sagi Grimberg
    Signed-off-by: Roland Dreier

    Sagi Grimberg
     
  • If user requested signature enable we initialize relevant mlx5_ib_qp
    members. We mark the qp as sig_enable and we increase the effective
    SQ size, but still limit the user max_send_wr to original size
    computed. We also allow the create_qp routine to accept sig_enable
    create flag.

    Signed-off-by: Sagi Grimberg
    Signed-off-by: Roland Dreier

    Sagi Grimberg
     
  • Support create_mr and destroy_mr verbs. Creating ib_mr may be done
    for either ib_mr that will register regular page lists like
    alloc_fast_reg_mr routine, or indirect ib_mrs that can register other
    (pre-registered) ib_mrs in an indirect manner.

    In addition user may request signature enable, that will mean that the
    created ib_mr may be attached with signature attributes (BSF, PSVs).

    Currently we only allow direct/indirect registration modes.

    Signed-off-by: Sagi Grimberg
    Signed-off-by: Roland Dreier

    Sagi Grimberg
     

14 Feb, 2014

1 commit


07 Feb, 2014

1 commit

  • Commit c1be5232d21d ("Fix micro UAR allocator") broke binary compatibility
    between libmlx5 and mlx5_ib since it defines a different value to the number
    of micro UARs per page, leading to wrong calculation in libmlx5. This patch
    defines struct mlx5_ib_alloc_ucontext_req_v2 as an extension to struct
    mlx5_ib_alloc_ucontext_req. The extended size is determined in mlx5_ib_alloc_ucontext()
    and in case of old library we use uuarn 0 which works fine -- this is
    acheived due to create_user_qp() falling back from high to medium then to
    low class where low class will return 0. For new libraries we use the
    more sophisticated allocation algorithm.

    Signed-off-by: Eli Cohen
    Reviewed-by: Yann Droneaud
    Signed-off-by: Roland Dreier

    Eli Cohen
     

23 Jan, 2014

5 commits


15 Jan, 2014

1 commit

  • The micro UAR (uuar) allocator had a bug which resulted from the fact
    that in each UAR we only have two micro UARs avaialable, those at
    index 0 and 1. This patch defines iterators to aid in traversing the
    list of available micro UARs when allocating a uuar.

    In addition, change the logic in create_user_qp() so that if high
    class allocation fails (high class means lower latency), we revert to
    medium class and not to the low class.

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

    Eli Cohen
     

09 Nov, 2013

4 commits

  • The Connect-IB adapter has an inherent page size which equals 4K.
    Define an new enum that equals the page shift and use it instead of
    using the value 12 throughout the code.

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

    Eli Cohen
     
  • Firmware spec requires reserved fields to be cleared when calling
    set_hca_cap. Current code queries and copy to the set area, possibly
    resulting in reserved bits not cleared. This patch copies only
    writable fields to the set area.

    Fix also typo - msx => max

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

    Eli Cohen
     
  • Connect-IB firmware requires 4K pages to be communicated with the
    driver. This patch breaks larger pages to 4K units to enable support
    for architectures utilizing larger page size, such as PowerPC. This
    patch also fixes several places that referred to PAGE_SHIFT instead of
    explicit 12 which is the inherent page shift on Connect-IB.

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

    Eli Cohen
     
  • Use asynchronous commands to execute up to eight concurrent create MR
    commands. This is to fill memory caches faster so we keep consuming
    from there. Also, increase timeout for shrinking caches to five
    minutes.

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

    Eli Cohen
     

11 Oct, 2013

3 commits


16 Aug, 2013

1 commit

  • In the previous QUERY_PAGES command version we used one command to get the
    required amount of boot, init and post init pages. The new version uses the
    op_mod field to specify whether the query is for the required amount of boot,
    init or post init pages. In addition the output field size for the required
    amount of pages increased from 16 to 32 bits.

    In MANAGE_PAGES command the input_num_entries and output_num_entries fields
    sizes changed from 16 to 32 bits and the PAS tables offset changed to 0x10.

    In the pages request event the num_pages field also changed to 32 bits.

    In the HCA-capabilities-layout the size and location of max_qp_mcg field has
    been changed to support 24 bits.

    This patch isn't compatible with firmware versions < 5; however, it turns out that the
    first GA firmware we will publish will not support previous versions so this should be OK.

    Signed-off-by: Moshe Lazer
    Signed-off-by: Eli Cohen
    Signed-off-by: David S. Miller

    Moshe Lazer
     

06 Aug, 2013

1 commit


01 Aug, 2013

1 commit

  • Introduce enbale_hca and disable_hca commands to signify when the
    driver starts or ceases to operate on the device.

    In addition the driver will use boot and init pages count; boot pages
    is required to allow firmware to complete boot commands and the other
    to complete init hca. Command interface revision is bumped to 4 to
    enforce using supported firmware.

    This patch breaks compatibility with old versions of firmware (< 4);
    however, the first GA firmware we will publish will support version 4
    so this should not be a problem.

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

    Eli Cohen
     

12 Jul, 2013

1 commit

  • Sparse reported an endianness bug in the assignment to hca_cap.uar_page_sz.

    Fix the declaration of this field to be __be16 (which is what is in
    the firmware spec), renaming the field to log_uar_pg_size to conform
    to the spec, which fixes the endianness bug reported by sparse.

    Reported-by: Fengguang Wu
    Signed-off-by: Moshe Lazer
    Signed-off-by: Or Gerlitz
    Signed-off-by: Roland Dreier

    Moshe Lazer
     

09 Jul, 2013

2 commits

  • This deals with the sparse warning:

    drivers/net/ethernet/mellanox/mlx5/core/health.c:94:54: warning: incorrect type in argument 2 (different address spaces)
    drivers/net/ethernet/mellanox/mlx5/core/health.c:94:54: expected void *buf
    drivers/net/ethernet/mellanox/mlx5/core/health.c:94:54: got struct health_buffer [noderef] *health

    Signed-off-by: Roland Dreier

    Roland Dreier
     
  • The driver is comprised of two kernel modules: mlx5_ib and mlx5_core.
    This partitioning resembles what we have for mlx4, except that mlx5_ib
    is the pci device driver and not mlx5_core.

    mlx5_core is essentially a library that provides general functionality
    that is intended to be used by other Mellanox devices that will be
    introduced in the future. mlx5_ib has a similar role as any hardware
    device under drivers/infiniband/hw.

    Signed-off-by: Eli Cohen
    Signed-off-by: Jack Morgenstein
    Signed-off-by: Or Gerlitz

    [ Merge in coccinelle fixes from Fengguang Wu .
    - Roland ]

    Signed-off-by: Roland Dreier

    Eli Cohen