1. 02 5月, 2017 14 次提交
  2. 29 4月, 2017 7 次提交
  3. 26 4月, 2017 4 次提交
  4. 22 4月, 2017 2 次提交
  5. 21 4月, 2017 4 次提交
  6. 20 4月, 2017 1 次提交
  7. 06 4月, 2017 8 次提交
    • D
      IB/hfi1: Add transmit fault injection feature · 243d9f43
      Don Hiatt 提交于
      Add ability to fault packets on transmit by opcode.
      Dropping by packet can be achieved by setting the mask to 0.
      
      In order to drop non-verbs traffic we set PbcInsertHrc
      to NONE (0x2). The packet will still be delivered to
      the receiving node but a KHdrHCRCErr (KDETH packet
      with a bad HCRC) will be triggered and the packet will
      not be delivered to the correct context.
      
      In order to drop regular verbs traffic we set the
      PbcTestEbp flag. The packet will still be delivered
      to the receiving node but a 'late ebp error' will
      be triggered and will be dropped.
      
      A global toggle (/sys/kernel/debug/hfi1/hfi1_X/fault_suppress_err)
      has been added to suppress the error messages on the receive
      node when a packet was faulted on the sending node.
      Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NDon Hiatt <don.hiatt@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      243d9f43
    • M
      IB/rdmavt: Avoid reseting wqe send_flags in unreserve · 44dcfa4b
      Mike Marciniszyn 提交于
      The wqe should be read only and in fact the superfluous reset of the
      RVT_SEND_RESERVE_USED flag causes an issue where reserved operations
      elicit a bad completion to the ULP.
      
      The maintenance of the flag is now entirely within rvt_post_one_wr()
      where a reserved operation will set the flag and a non-reserved operation
      will insure the operation that is about to be posted has the flag reset.
      
      Fixes: Commit 856cc4c2 ("IB/hfi1: Add the capability for reserved operations")
      Reviewed-by: NDon Hiatt <don.hiatt@intel.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      44dcfa4b
    • M
      IB/rdmavt, IB/hfi1, IB/qib: Make wc opcode translation driver dependent · 43a474aa
      Mike Marciniszyn 提交于
      The work to create a completion helper moved the translation of send
      wqe operations to completion opcodes to rdmvat.
      
      This precludes having driver dependent operations.  Make the translation
      driver dependent by doing the translation in the driver prior to the
      rvt_qp_swqe_complete() call using restored translation tables.
      
      Fixes: Commit f2dc9cdc ("IB/rdmavt: Add a send completion helper")
      Fixes: Commit 0771da5a ("IB/hfi1,IB/qib: Use new send completion helper")
      Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      43a474aa
    • M
      IB/core: Change completion channel to use the reworked objects schema · 1e7710f3
      Matan Barak 提交于
      This patch adds the standard fd based type - completion_channel.
      The completion_channel is now prefixed with ib_uobject, similarly
      to the rest of the uobjects.
      This requires a few changes:
      (1) We define a new completion channel fd based object type.
      (2) completion_event and async_event are now two different types.
          This means they use different fops.
      (3) We release the completion_channel exactly as we release other
          idr based objects.
      (4) Since ib_uobjects are already kref-ed, we only add the kref to the
          async event.
      
      A fd object requires filling out several parameters. Its op pointer
      should point to uverbs_fd_ops and its size should be at least the
      size if ib_uobject. We use a macro to make the type declaration
      easier.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      1e7710f3
    • M
      IB/core: Add support for fd objects · cf8966b3
      Matan Barak 提交于
      The completion channel we use in verbs infrastructure is FD based.
      Previously, we had a separate way to manage this object. Since we
      strive for a single way to manage any kind of object in this
      infrastructure, we conceptually treat all objects as subclasses
      of ib_uobject.
      
      This commit adds the necessary mechanism to support FD based objects
      like their IDR counterparts. FD objects release need to be synchronized
      with context release. We use the cleanup_mutex on the uverbs_file for
      that.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      cf8966b3
    • M
      IB/core: Change idr objects to use the new schema · fd3c7904
      Matan Barak 提交于
      This changes only the handlers which deals with idr based objects to
      use the new idr allocation, fetching and destruction schema.
      This patch consists of the following changes:
      (1) Allocation, fetching and destruction is done via idr ops.
      (2) Context initializing and release is done through
          uverbs_initialize_ucontext and uverbs_cleanup_ucontext.
      (3) Ditching the live flag. Mostly, this is pretty straight
          forward. The only place that is a bit trickier is in
          ib_uverbs_open_qp. Commit [1] added code to check whether
          the uobject is already live and initialized. This mostly
          happens because of a race between open_qp and events.
          We delayed assigning the uobject's pointer in order to
          eliminate this race without using the live variable.
      
      [1] commit a040f95d
      	("IB/core: Fix XRC race condition in ib_uverbs_open_qp")
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      fd3c7904
    • M
      IB/core: Add idr based standard types · 6be60aed
      Matan Barak 提交于
      This patch adds the standard idr based types. These types are
      used in downstream patches in order to initialize, destroy and
      lookup IB standard objects which are based on idr objects.
      
      An idr object requires filling out several parameters. Its op pointer
      should point to uverbs_idr_ops and its size should be at least the
      size of ib_uobject. We add a macro to make the type declaration easier.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Reviewed-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      6be60aed
    • M
      IB/core: Add support for idr types · 38321256
      Matan Barak 提交于
      The new ioctl infrastructure supports driver specific objects.
      Each such object type has a hot unplug function, allocation size and
      an order of destruction.
      
      When a ucontext is created, a new list is created in this ib_ucontext.
      This list contains all objects created under this ib_ucontext.
      When a ib_ucontext is destroyed, we traverse this list several time
      destroying the various objects by the order mentioned in the object
      type description. If few object types have the same destruction order,
      they are destroyed in an order opposite to their creation.
      
      Adding an object is done in two parts.
      First, an object is allocated and added to idr tree. Then, the
      command's handlers (in downstream patches) could work on this object
      and fill in its required details.
      After a successful command, the commit part is called and the user
      objects become ucontext visible. If the handler failed, alloc_abort
      should be called.
      
      Removing an uboject is done by calling lookup_get with the write flag
      and finalizing it with destroy_commit. A major change from the previous
      code is that we actually destroy the kernel object itself in
      destroy_commit (rather than just the uobject).
      
      We should make sure idr (per-uverbs-file) and list (per-ucontext) could
      be accessed concurrently without corrupting them.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      38321256