1. 17 4月, 2008 3 次提交
  2. 15 2月, 2008 1 次提交
  3. 09 2月, 2008 1 次提交
    • J
      IB/mlx4: Use multiple WQ blocks to post smaller send WQEs · ea54b10c
      Jack Morgenstein 提交于
      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: NMichael S. Tsirkin <mst@dev.mellanox.co.il>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      ea54b10c
  4. 07 2月, 2008 1 次提交
  5. 05 2月, 2008 2 次提交
  6. 26 1月, 2008 1 次提交
    • R
      IB/mlx4: Micro-optimize mlx4_ib_poll_one() · b3226184
      Roland Dreier 提交于
      Rather than byte-swapping cqe->g_mlpath_rqpn each time we extract a
      field from it, byte-swap it once into a temporary variable.  This 
      results in smaller, better code -- eg, on 32-bit x86:
      
      add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5 (-5)
      function                                     old     new   delta
      mlx4_ib_poll_cq                             1188    1183      -5
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      b3226184
  7. 09 1月, 2008 1 次提交
  8. 31 10月, 2007 1 次提交
  9. 19 10月, 2007 1 次提交
  10. 10 10月, 2007 5 次提交
  11. 24 9月, 2007 1 次提交
    • J
      IB/mlx4: Fix data corruption triggered by wrong headroom marking order · 6e694ea3
      Jack Morgenstein 提交于
      This is an addendum to commit 0e6e7416 ("IB/mlx4: Handle new FW
      requirement for send request prefetching").  We also need to handle
      prefetch marking properly for S/G segments, or else the HCA may end up
      processing S/G segments that are not fully written and end up sending
      the wrong data.  This can actually cause data corruption in practice,
      especially on systems with relatively slow CPUs (where the HCA is more
      likely to prefetch while the CPU is in the middle of writing a work
      request into memory).
      
      We write S/G segments in reverse order into the WQE, in order to
      guarantee that the first dword of all cachelines containing S/G
      segments is written last (overwriting the headroom invalidation
      pattern).  The entire cacheline will thus contain valid data when the
      invalidation pattern is overwritten.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      6e694ea3
  12. 16 8月, 2007 1 次提交
  13. 04 8月, 2007 1 次提交
  14. 29 7月, 2007 1 次提交
  15. 21 7月, 2007 2 次提交
  16. 19 7月, 2007 2 次提交
  17. 18 7月, 2007 4 次提交
  18. 13 7月, 2007 2 次提交
  19. 10 7月, 2007 3 次提交
  20. 22 6月, 2007 1 次提交
  21. 19 6月, 2007 1 次提交
  22. 18 6月, 2007 4 次提交
    • R
      IB/mlx4: Handle FW command interface rev 3 · 5ae2a7a8
      Roland Dreier 提交于
      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: NRoland Dreier <rolandd@cisco.com>
      5ae2a7a8
    • J
      IB/mlx4: Handle buffer wraparound in __mlx4_ib_cq_clean() · 082dee32
      Jack Morgenstein 提交于
      When compacting CQ entries, we need to set the correct value of the
      ownership bit in case the value is different between the index we copy
      the CQE from and the index we copy it to.
      
      Found by Ronni Zimmerman of Mellanox.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      082dee32
    • R
      IB/mlx4: Get rid of max_inline_data calculation · 54e95f8d
      Roland Dreier 提交于
      The calculation of max_inline_data in set_kernel_sq_size() is bogus,
      since it doesn't take into account the fact that inline segments may
      not cross a 64-byte boundary, and hence multiple inline segments will
      probably need to be used to post large inline sends.
      
      We don't support inline sends for kernel QPs anyway, so there's no
      point in doing this calculation anyway, since the field is just zeroed
      out a little later.  So just delete the bogus calculation.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      54e95f8d
    • R
      IB/mlx4: Handle new FW requirement for send request prefetching · 0e6e7416
      Roland Dreier 提交于
      New ConnectX firmware introduces FW command interface revision 2,
      which requires that for each QP, a chunk of send queue entries (the
      "headroom") is kept marked as invalid, so that the HCA doesn't get
      confused if it prefetches entries that haven't been posted yet.  Add
      code to the driver to do this, and also update the user ABI so that
      userspace can request that the prefetcher be turned off for userspace
      QPs (we just leave the prefetcher on for all kernel QPs).
      
      Unfortunately, marking send queue entries this way is confuses older
      firmware, so we change the driver to allow only FW command interface
      revisions 2.  This means that users will have to update their firmware
      to work with the new driver, but the firmware is changing quickly and
      the old firmware has lots of other bugs anyway, so this shouldn't be too
      big a deal.
      
      Based on a patch from Jack Morgenstein <jackm@dev.mellanox.co.il>.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      0e6e7416