1. 21 Mar, 2016 2 commits
  2. 03 Mar, 2016 1 commit
    • Majd Dibbiny's avatar
      IB/{core, mlx5}: Fix input len in vendor part of create_qp/srq · 3d943c9d
      Majd Dibbiny authored
      Currently, the inlen field of the vendor's part of the command
      doesn't match the command buffer. This happens because the inlen
      accommodates ib_uverbs_cmd_hdr which is deducted from the in buffer.
      This is problematic since the vendor function could be called either
      from the legacy verb (where the input length mismatches the actual
      length) or by the extended verb (where the length matches). The vendor
      has no idea which function calls it and therefore has no way to know
      how the length variable should be treated.
      
      Fixing this by aligning the inlen to the correct length.
      
      All vendor drivers either assumed that inlen >= sizeof(vendor_uhw_cmd)
      or just failed wrongly (mlx5) and fixed in this patch.
      
      Fixes: cfb5e088 ('IB/mlx5: Add CQE version 1 support to user QPs and SRQs')
      Signed-off-by: default avatarMajd Dibbiny <majd@mellanox.com>
      Reviewed-by: default avatarMatan Barak <matanb@mellanox.com>
      Reviewed-by: default avatarHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      3d943c9d
  3. 01 Mar, 2016 1 commit
  4. 29 Feb, 2016 1 commit
    • Marina Varshaver's avatar
      IB/core: Add don't trap flag to flow creation · a3100a78
      Marina Varshaver authored
      Don't trap flag (i.e. IB_FLOW_ATTR_FLAGS_DONT_TRAP) indicates that QP
      will receive traffic, but will not steal it.
      
      When a packet matches a flow steering rule that was created with
      the don't trap flag, the QPs assigned to this rule will get this
      packet, but matching will continue to other equal/lower priority
      rules. This will let other QPs assigned to those rules to get the
      packet too.
      
      If both don't trap rule and other rules have the same priority
      and match the same packet, the behavior is undefined.
      
      The don't trap flag can't be set with default rule types
      (i.e. IB_FLOW_ATTR_ALL_DEFAULT, IB_FLOW_ATTR_MC_DEFAULT) as default rules
      don't have rules after them and don't trap has no meaning here.
      Signed-off-by: default avatarMarina Varshaver <marinav@mellanox.com>
      Reviewed-by: default avatarMatan Barak <matanb@mellanox.com>
      Reviewed-by: default avatarYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      a3100a78
  5. 23 Dec, 2015 3 commits
  6. 22 Dec, 2015 1 commit
  7. 07 Dec, 2015 2 commits
  8. 21 Oct, 2015 5 commits
  9. 08 Oct, 2015 1 commit
    • Christoph Hellwig's avatar
      IB: split struct ib_send_wr · e622f2f4
      Christoph Hellwig authored
      This patch split up struct ib_send_wr so that all non-trivial verbs
      use their own structure which embedds struct ib_send_wr.  This dramaticly
      shrinks the size of a WR for most common operations:
      
      sizeof(struct ib_send_wr) (old):	96
      
      sizeof(struct ib_send_wr):		48
      sizeof(struct ib_rdma_wr):		64
      sizeof(struct ib_atomic_wr):		96
      sizeof(struct ib_ud_wr):		88
      sizeof(struct ib_fast_reg_wr):		88
      sizeof(struct ib_bind_mw_wr):		96
      sizeof(struct ib_sig_handover_wr):	80
      
      And with Sagi's pending MR rework the fast registration WR will also be
      down to a reasonable size:
      
      sizeof(struct ib_fastreg_wr):		64
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> [srp, srpt]
      Reviewed-by: Chuck Lever <chuck.lever@oracle.com> [sunrpc]
      Tested-by: default avatarHaggai Eran <haggaie@mellanox.com>
      Tested-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Tested-by: default avatarSteve Wise <swise@opengridcomputing.com>
      e622f2f4
  10. 03 Sep, 2015 1 commit
  11. 30 Aug, 2015 4 commits
  12. 12 Jun, 2015 4 commits
  13. 18 Feb, 2015 2 commits
  14. 17 Feb, 2015 1 commit
  15. 06 Feb, 2015 1 commit
  16. 15 Dec, 2014 4 commits
    • Haggai Eran's avatar
      IB/core: Implement support for MMU notifiers regarding on demand paging regions · 882214e2
      Haggai Eran authored
      * Add an interval tree implementation for ODP umems. Create an
        interval tree for each ucontext (including a count of the number of
        ODP MRs in this context, semaphore, etc.), and register ODP umems in
        the interval tree.
      * Add MMU notifiers handling functions, using the interval tree to
        notify only the relevant umems and underlying MRs.
      * Register to receive MMU notifier events from the MM subsystem upon
        ODP MR registration (and unregister accordingly).
      * Add a completion object to synchronize the destruction of ODP umems.
      * Add mechanism to abort page faults when there's a concurrent invalidation.
      
      The way we synchronize between concurrent invalidations and page
      faults is by keeping a counter of currently running invalidations, and
      a sequence number that is incremented whenever an invalidation is
      caught. The page fault code checks the counter and also verifies that
      the sequence number hasn't progressed before it updates the umem's
      page tables. This is similar to what the kvm module does.
      
      In order to prevent the case where we register a umem in the middle of
      an ongoing notifier, we also keep a per ucontext counter of the total
      number of active mmu notifiers. We only enable new umems when all the
      running notifiers complete.
      Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: default avatarShachar Raindel <raindel@mellanox.com>
      Signed-off-by: default avatarHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: default avatarYuval Dagan <yuvalda@mellanox.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      882214e2
    • Shachar Raindel's avatar
      IB/core: Add support for on demand paging regions · 8ada2c1c
      Shachar Raindel authored
      * Extend the umem struct to keep the ODP related data.
      * Allocate and initialize the ODP related information in the umem
        (page_list, dma_list) and freeing as needed in the end of the run.
      * Store a reference to the process PID struct in the ucontext.  Used to
        safely obtain the task_struct and the mm during fault handling,
        without preventing the task destruction if needed.
      * Add 2 helper functions: ib_umem_odp_map_dma_pages and
        ib_umem_odp_unmap_dma_pages. These functions get the DMA addresses
        of specific pages of the umem (and, currently, pin them).
      * Support for page faults only - IB core will keep the reference on
        the pages used and call put_page when freeing an ODP umem
        area. Invalidations support will be added in a later patch.
      Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: default avatarShachar Raindel <raindel@mellanox.com>
      Signed-off-by: default avatarHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: default avatarMajd Dibbiny <majd@mellanox.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      8ada2c1c
    • Sagi Grimberg's avatar
      IB/core: Add flags for on demand paging support · 860f10a7
      Sagi Grimberg authored
      * Add a configuration option for enable on-demand paging support in
        the infiniband subsystem (CONFIG_INFINIBAND_ON_DEMAND_PAGING). In a
        later patch, this configuration option will select the MMU_NOTIFIER
        configuration option to enable mmu notifiers.
      * Add a flag for on demand paging (ODP) support in the IB device capabilities.
      * Add a flag to request ODP MR in the access flags to reg_mr.
      * Fail registrations done with the ODP flag when the low-level driver
        doesn't support this.
      * Change the conditions in which an MR will be writable to explicitly
        specify the access flags.  This is to avoid making an MR writable just
        because it is an ODP MR.
      * Add a ODP capabilities to the extended query device verb.
      Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: default avatarShachar Raindel <raindel@mellanox.com>
      Signed-off-by: default avatarHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      860f10a7
    • Eli Cohen's avatar
      IB/core: Add support for extended query device caps · 5a77abf9
      Eli Cohen authored
      Add extensible query device capabilities verb to allow adding new features.
      ib_uverbs_ex_query_device is added and copy_query_dev_fields is used to
      copy capability fields to be used by both ib_uverbs_query_device and
      ib_uverbs_ex_query_device.
      Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
      Signed-off-by: default avatarHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      5a77abf9
  17. 14 Oct, 2014 1 commit
  18. 01 Aug, 2014 1 commit
  19. 19 Jan, 2014 1 commit
  20. 20 Dec, 2013 3 commits