1. 07 1月, 2010 2 次提交
  2. 04 12月, 2009 1 次提交
  3. 13 11月, 2009 2 次提交
  4. 06 9月, 2009 3 次提交
    • J
      IB/mlx4: Don't allow userspace open while recovering from catastrophic error · 3b4a8cd5
      Jack Morgenstein 提交于
      Userspace apps are supposed to release all ib device resources if they
      receive a fatal async event (IBV_EVENT_DEVICE_FATAL).  However, the
      app has no way of knowing when the device has come back up, except to
      repeatedly attempt ibv_open_device() until it succeeds.
      
      However, currently there is no protection against the open succeeding
      while the device is in being removed following the fatal event.  In
      this case, the open will succeed, but as a result the device waits in
      the middle of its removal until the new app releases its resources --
      and the new app will not do so, since the open succeeded at a point
      following the fatal event generation.
      
      This patch adds an "active" flag to the device. The active flag is set
      to false (in the fatal event flow) before the "fatal" event is
      generated, so any subsequent ibv_dev_open() call to the device will
      fail until the device comes back up, thus preventing the above
      deadlock.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      3b4a8cd5
    • R
      IB/mlx4: Annotate CQ locking · 338a8fad
      Roland Dreier 提交于
      mlx4_ib_lock_cqs()/mlx4_ib_unlock_cqs() are helper functions that
      lock/unlock both CQs attached to a QP in the proper order to avoid
      AB-BA deadlocks.  Annotate this so sparse can understand what's going
      on (and warn us if we misuse these functions).
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      338a8fad
    • M
      IB: Use printk_once() for driver versions · f1aa78b2
      Marcin Slusarz 提交于
      Replace open-coded reimplementations with printk_once().
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      f1aa78b2
  5. 06 6月, 2009 1 次提交
  6. 08 5月, 2009 1 次提交
  7. 30 3月, 2009 1 次提交
  8. 19 3月, 2009 1 次提交
  9. 29 1月, 2009 1 次提交
    • M
      IB/mlx4: Fix dispatch of IB_EVENT_LID_CHANGE event · f0f6f346
      Moni Shoua 提交于
      When snooping a PortInfo MAD, its client_reregister bit is checked.
      If the bit is ON then a CLIENT_REREGISTER event is dispatched,
      otherwise a LID_CHANGE event is dispatched.  This way of decision
      ignores the cases where the MAD changes the LID along with an
      instruction to reregister (so a necessary LID_CHANGE event won't be
      dispatched) or the MAD is neither of these (and an unnecessary
      LID_CHANGE event will be dispatched).
      
      This causes problems at least with IPoIB, which will do a "light"
      flush on reregister, rather than the "heavy" flush required due to a
      LID change.
      
      Fix this by dispatching a CLIENT_REREGISTER event if the
      client_reregister bit is set, but also compare the LID in the MAD to
      the current LID.  If and only if they are not identical then a
      LID_CHANGE event is dispatched.
      Signed-off-by: NMoni Shoua <monis@voltaire.com>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NYossi Etigin <yosefe@voltaire.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      f0f6f346
  10. 18 1月, 2009 1 次提交
  11. 17 1月, 2009 1 次提交
  12. 10 1月, 2009 1 次提交
  13. 06 1月, 2009 1 次提交
  14. 31 12月, 2008 1 次提交
  15. 25 12月, 2008 1 次提交
  16. 22 12月, 2008 1 次提交
  17. 02 12月, 2008 1 次提交
  18. 06 11月, 2008 1 次提交
  19. 23 10月, 2008 1 次提交
  20. 11 10月, 2008 1 次提交
  21. 09 10月, 2008 1 次提交
  22. 16 9月, 2008 1 次提交
  23. 28 8月, 2008 1 次提交
  24. 08 8月, 2008 1 次提交
  25. 07 8月, 2008 1 次提交
  26. 26 7月, 2008 1 次提交
  27. 23 7月, 2008 2 次提交
  28. 15 7月, 2008 7 次提交
    • E
      IB/mlx4: Use kzalloc() for new QPs so flags are initialized to 0 · f507d28b
      Eli Cohen 提交于
      Current code uses kmalloc() and then just does a bitwise OR operation on
      qp->flags in create_qp_common(), which means that qp->flags may
      potentially have some unintended bits set.  This patch uses kzalloc()
      and avoids further explicit clearing of structure members, which also
      shrinks the code:
      
      add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-65 (-65)
      function                                     old     new   delta
      create_qp_common                            2024    1959     -65
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      f507d28b
    • R
      IB/mlx4: Add support for blocking multicast loopback packets · 521e575b
      Ron Livne 提交于
      Add support for handling the IB_QP_CREATE_MULTICAST_BLOCK_LOOPBACK
      flag by using the per-multicast group loopback blocking feature of
      mlx4 hardware.
      Signed-off-by: NRon Livne <ronli@voltaire.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      521e575b
    • R
      IB/mlx4: Remove extra code for RESET->ERR QP state transition · 7c27f358
      Roland Dreier 提交于
      Commit 65adfa91 ("IB/mlx4: Fix RESET to RESET and RESET to ERROR
      transitions") added some extra code to handle a QP state transition
      from RESET to ERROR.  However, the latest 1.2.1 version of the IB spec
      has clarified that this transition is actually not allowed, so we can
      remove this extra code again.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      7c27f358
    • E
      IB/mlx4: Pass congestion management class MADs to the HCA · 6578cf33
      Eli Cohen 提交于
      ConnectX HCAs support the IB_MGMT_CLASS_CONG_MGMT management class, so
      process MADs of this class through the MAD_IFC firmware command.
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      6578cf33
    • E
      IB/mlx4: Configure QPs' max message size based on real device capability · d1f2cd89
      Eli Cohen 提交于
      ConnectX returns the max message size it supports through the
      QUERY_DEV_CAP firmware command.  When modifying a QP to RTR, the max
      message size for the QP must be specified.  This value must not exceed
      the value declared through QUERY_DEV_CAP.  The current code ignores
      the max allowed size and unconditionally sets the value to 2^31.  This
      patch sets all QPs to the max value allowed as returned from firmware.
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d1f2cd89
    • S
      RDMA/core: Add memory management extensions support · 00f7ec36
      Steve Wise 提交于
      This patch adds support for the IB "base memory management extension"
      (BMME) and the equivalent iWARP operations (which the iWARP verbs
      mandates all devices must implement).  The new operations are:
      
       - Allocate an ib_mr for use in fast register work requests.
      
       - Allocate/free a physical buffer lists for use in fast register work
         requests.  This allows device drivers to allocate this memory as
         needed for use in posting send requests (eg via dma_alloc_coherent).
      
       - New send queue work requests:
         * send with remote invalidate
         * fast register memory region
         * local invalidate memory region
         * RDMA read with invalidate local memory region (iWARP only)
      
      Consumer interface details:
      
       - A new device capability flag IB_DEVICE_MEM_MGT_EXTENSIONS is added
         to indicate device support for these features.
      
       - New send work request opcodes IB_WR_FAST_REG_MR, IB_WR_LOCAL_INV,
         IB_WR_RDMA_READ_WITH_INV are added.
      
       - A new consumer API function, ib_alloc_mr() is added to allocate
         fast register memory regions.
      
       - New consumer API functions, ib_alloc_fast_reg_page_list() and
         ib_free_fast_reg_page_list() are added to allocate and free
         device-specific memory for fast registration page lists.
      
       - A new consumer API function, ib_update_fast_reg_key(), is added to
         allow the key portion of the R_Key and L_Key of a fast registration
         MR to be updated.  Consumers call this if desired before posting
         a IB_WR_FAST_REG_MR work request.
      
      Consumers can use this as follows:
      
       - MR is allocated with ib_alloc_mr().
      
       - Page list memory is allocated with ib_alloc_fast_reg_page_list().
      
       - MR R_Key/L_Key "key" field is updated with ib_update_fast_reg_key().
      
       - MR made VALID and bound to a specific page list via
         ib_post_send(IB_WR_FAST_REG_MR)
      
       - MR made INVALID via ib_post_send(IB_WR_LOCAL_INV),
         ib_post_send(IB_WR_RDMA_READ_WITH_INV) or an incoming send with
         invalidate operation.
      
       - MR is deallocated with ib_dereg_mr()
      
       - page lists dealloced via ib_free_fast_reg_page_list().
      
      Applications can allocate a fast register MR once, and then can
      repeatedly bind the MR to different physical block lists (PBLs) via
      posting work requests to a send queue (SQ).  For each outstanding
      MR-to-PBL binding in the SQ pipe, a fast_reg_page_list needs to be
      allocated (the fast_reg_page_list is owned by the low-level driver
      from the consumer posting a work request until the request completes).
      Thus pipelining can be achieved while still allowing device-specific
      page_list processing.
      
      The 32-bit fast register memory key/STag is composed of a 24-bit index
      and an 8-bit key.  The application can change the key each time it
      fast registers thus allowing more control over the peer's use of the
      key/STag (ie it can effectively be changed each time the rkey is
      rebound to a page list).
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      00f7ec36
    • E
      IB/mlx4: Optimize QP stamping · 9670e553
      Eli Cohen 提交于
      The idea is that for QPs with fixed size work requests (eg selective
      signaling QPs), before stamping the WQE, we read the value of the DS
      field, which gives the effective size of the descriptor as used in the
      previous post.  Then we stamp only that area, since the rest of the
      descriptor is already stamped.
      
      When initializing the send queue buffer, make sure the DS field is
      initialized to the max descriptor size so that the subsequent stamping
      will be done on the entire descriptor area.
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      9670e553
  29. 21 5月, 2008 1 次提交
    • R
      IB/mlx4: Fix creation of kernel QP with max number of send s/g entries · cd155c1c
      Roland Dreier 提交于
      When creating a kernel QP where the consumer asked for a send queue
      with lots of scatter/gater entries, set_kernel_sq_size() incorrectly
      returned an error if the send queue stride is larger than the
      hardware's maximum send work request descriptor size.  This is not a
      problem; the only issue is to make sure that the actual descriptors
      used do not overflow the maximum descriptor size, so check this instead.
      
      Clamp the returned max_send_sge value to be no bigger than what
      query_device returns for the max_sge to avoid confusing hapless users,
      even if the hardware is capable of handling a few more s/g entries.
      
      This bug caused NFS/RDMA mounts to fail when the server adapter used
      the mlx4 driver.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      cd155c1c