1. 27 4月, 2016 1 次提交
  2. 22 3月, 2016 1 次提交
    • E
      IB/core: Add interfaces to control VF attributes · 50174a7f
      Eli Cohen 提交于
      Following the practice exercised for network devices which allow the PF
      net device to configure attributes of its virtual functions, we
      introduce the following functions to be used by IPoIB which is the
      network driver implementation for IB devices.
      
      ib_set_vf_link_state - set the policy for a VF link. More below.
      ib_get_vf_config - read configuration information of a VF
      ib_get_vf_stats - read VF statistics
      ib_set_vf_guid - set the node or port GUID of a VF
      
      Also add an indication in the device cap flags that indicates that this
      IB devices is based on a virtual function.
      
      A VF shares the physical port with the PF and other VFs. When setting
      the link state we have three options:
      
      1. Auto - in this mode, the virtual port follows the state of the
         physical port and becomes active only if the physical port's state is
         active. In all other cases it remains in a Down state.
      2. Down - sets the state of the virtual port to Down
      3. Up - causes the virtual port to transition into Initialize state if
         it was not already in this state. A virtualization aware subnet manager
         can then bring the state of the port into the Active state.
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      50174a7f
  3. 05 3月, 2016 1 次提交
  4. 01 3月, 2016 1 次提交
    • S
      IB: new common API for draining queues · 765d6774
      Steve Wise 提交于
      Add provider-specific drain_sq/drain_rq functions for providers needing
      special drain logic.
      
      Add static functions __ib_drain_sq() and __ib_drain_rq() which post noop
      WRs to the SQ or RQ and block until their completions are processed.
      This ensures the applications completions for work requests posted prior
      to the drain work request have all been processed.
      
      Add API functions ib_drain_sq(), ib_drain_rq(), and ib_drain_qp().
      
      For the drain logic to work, the caller must:
      
      ensure there is room in the CQ(s) and QP for the drain work request
      and completion.
      
      allocate the CQ using ib_alloc_cq() and the CQ poll context cannot be
      IB_POLL_DIRECT.
      
      ensure that there are no other contexts that are posting WRs concurrently.
      Otherwise the drain is not guaranteed.
      Reviewed-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      765d6774
  5. 20 1月, 2016 3 次提交
  6. 24 12月, 2015 3 次提交
  7. 23 12月, 2015 4 次提交
  8. 08 12月, 2015 1 次提交
    • B
      IB core: Fix ib_sg_to_pages() · 8f5ba10e
      Bart Van Assche 提交于
      On 12/03/2015 01:18 AM, Christoph Hellwig wrote:
      > The patch looks good to me, but while we touch this area, how about
      > throwing in a few cosmetic fixes as well?
      
      How about the patch below ? In that version of the ib_sg_to_pages() fix
      these concerns have been addressed and additionally to more bugs have been fixed.
      
      ------------
      
      [PATCH] IB core: Fix ib_sg_to_pages()
      
      Fix the code for detecting gaps. A gap occurs not only if the
      second or later scatterlist element is not aligned but also if
      any scatterlist element other than the last does not end at a
      page boundary.
      
      In the code for coalescing contiguous elements, ensure that
      mr->length is correct and that last_page_addr is up-to-date.
      
      Ensure that this function returns a negative
      error code instead of zero if the first set_page() call fails.
      
      Fixes: commit 4c67e2bf ("IB/core: Introduce new fast registration API")
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NSagi Grimberg <sagig@mellanox.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      8f5ba10e
  9. 31 10月, 2015 1 次提交
  10. 29 10月, 2015 2 次提交
  11. 22 10月, 2015 2 次提交
  12. 31 8月, 2015 5 次提交
  13. 06 8月, 2015 1 次提交
  14. 13 6月, 2015 2 次提交
  15. 02 6月, 2015 1 次提交
  16. 19 5月, 2015 3 次提交
  17. 16 12月, 2014 1 次提交
  18. 05 6月, 2014 1 次提交
    • R
      IB/core: Fix sparse warnings about redeclared functions · 8385fd84
      Roland Dreier 提交于
      Fix a few functions that are declared with __attribute_const__ in the
      ib_verbs.h header file but defined without it in verbs.c.  This gets rid
      of the following sparse warnings:
      
          drivers/infiniband/core/verbs.c:51:5: error: symbol 'ib_rate_to_mult' redeclared with different type (originally declared at include/rdma/ib_verbs.h:469) - different modifiers
          drivers/infiniband/core/verbs.c:68:14: error: symbol 'mult_to_ib_rate' redeclared with different type (originally declared at include/rdma/ib_verbs.h:607) - different modifiers
          drivers/infiniband/core/verbs.c:85:5: error: symbol 'ib_rate_to_mbps' redeclared with different type (originally declared at include/rdma/ib_verbs.h:476) - different modifiers
          drivers/infiniband/core/verbs.c:111:1: error: symbol 'rdma_node_get_transport' redeclared with different type (originally declared at include/rdma/ib_verbs.h:84) - different modifiers
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      8385fd84
  19. 08 3月, 2014 2 次提交
    • S
      IB/core: Introduce signature verbs API · 1b01d335
      Sagi Grimberg 提交于
      Introduce a verbs interface for signature-related operations.  A
      signature handover operation configures the layouts of data and
      protection attributes both in memory and wire domains.
      
      Signature operations are:
      
      - INSERT:
        Generate and insert protection information when handing over
        data from input space to output space.
      - validate and STRIP:
        Validate protection information and remove it when handing over
        data from input space to output space.
      - validate and PASS:
        Validate protection information and pass it when handing over
        data from input space to output space.
      
      Once the signature handover opration is done, the HCA will offload
      data integrity generation/validation while performing the actual data
      transfer.
      
      Additions:
      
      1. HCA signature capabilities in device attributes
          Verbs provider supporting signature handover operations fills
          relevant fields in device attributes structure returned by
          ib_query_device.
      
      2. QP creation flag IB_QP_CREATE_SIGNATURE_EN
          Creating a QP that will carry signature handover operations may
          require some special preparations from the verbs provider.  So we
          add QP creation flag IB_QP_CREATE_SIGNATURE_EN to declare that the
          created QP may carry out signature handover operations.  Expose
          signature support to verbs layer (no support for now).
      
      3. New send work request IB_WR_REG_SIG_MR
          Signature handover work request. This WR will define the signature
          handover properties of the memory/wire domains as well as the
          domains layout. The purpose of this work request is to bind all
          the needed information for the signature operation:
      
          - data to be transferred:  wr->sg_list (ib_sge).
            * The raw data, pre-registered to a single MR (normally, before
              signature, this MR would have been used directly for the data
              transfer)
          - data protection guards: sig_handover.prot (ib_sge).
            * The data protection buffer, pre-registered to a single MR, which
              contains the data integrity guards of the raw data blocks.
              Note that it may not always exist, only in cases where the user is
              interested in storing protection guards in memory.
          - signature operation attributes: sig_handover.sig_attrs.
            * Tells the HCA how to validate/generate the protection information.
      
          Once the work request is executed, the memory region that will
          describe the signature transaction will be the sig_mr.  The
          application can now go ahead and send the sig_mr.rkey or use the
          sig_mr.lkey for data transfer.
      
      4. New Verb ib_check_mr_status
          check_mr_status verb checks the status of the memory region post
          transaction.  The first check that may be used is
          IB_MR_CHECK_SIG_STATUS, which will indicate if any signature
          errors are pending for a specific signature-enabled ib_mr.  This
          verb is a lightwight check and is allowed to be taken from
          interrupt context.  An application must call this verb after it is
          known that the actual data transfer has finished.
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      1b01d335
    • S
      IB/core: Introduce protected memory regions · 17cd3a2d
      Sagi Grimberg 提交于
      This commit introduces verbs for creating/destoying memory
      regions which will allow new types of memory key operations such
      as protected memory registration.
      
      Indirect memory registration is registering several (one
      of more) pre-registered memory regions in a specific layout.
      The Indirect region may potentialy describe several regions
      and some repitition format between them.
      
      Protected Memory registration is registering a memory region
      with various data integrity attributes which will describe protection
      schemes that will be handled by the HCA in an offloaded manner.
      These memory regions will be applicable for a new REG_SIG_MR
      work request introduced later in this patchset.
      
      In the future these routines may replace or implement current memory
      regions creation routines existing today:
      - ib_reg_user_mr
      - ib_alloc_fast_reg_mr
      - ib_get_dma_mr
      - ib_dereg_mr
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      17cd3a2d
  20. 20 1月, 2014 1 次提交
  21. 19 1月, 2014 1 次提交
  22. 15 1月, 2014 1 次提交
    • M
      IB/core: Ethernet L2 attributes in verbs/cm structures · dd5f03be
      Matan Barak 提交于
      This patch add the support for Ethernet L2 attributes in the
      verbs/cm/cma structures.
      
      When dealing with L2 Ethernet, we should use smac, dmac, vlan ID and priority
      in a similar manner that the IB L2 (and the L4 PKEY) attributes are used.
      
      Thus, those attributes were added to the following structures:
      
      * ib_ah_attr - added dmac
      * ib_qp_attr - added smac and vlan_id, (sl remains vlan priority)
      * ib_wc - added smac, vlan_id
      * ib_sa_path_rec - added smac, dmac, vlan_id
      * cm_av - added smac and vlan_id
      
      For the path record structure, extra care was taken to avoid the new
      fields when packing it into wire format, so we don't break the IB CM
      and SA wire protocol.
      
      On the active side, the CM fills. its internal structures from the
      path provided by the ULP.  We add there taking the ETH L2 attributes
      and placing them into the CM Address Handle (struct cm_av).
      
      On the passive side, the CM fills its internal structures from the WC
      associated with the REQ message.  We add there taking the ETH L2
      attributes from the WC.
      
      When the HW driver provides the required ETH L2 attributes in the WC,
      they set the IB_WC_WITH_SMAC and IB_WC_WITH_VLAN flags. The IB core
      code checks for the presence of these flags, and in their absence does
      address resolution from the ib_init_ah_from_wc() helper function.
      
      ib_modify_qp_is_ok is also updated to consider the link layer. Some
      parameters are mandatory for Ethernet link layer, while they are
      irrelevant for IB.  Vendor drivers are modified to support the new
      function signature.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      dd5f03be
  23. 14 1月, 2014 1 次提交