]> git.baikalelectronics.ru Git - kernel.git/commit
IB/rdmavt: Add QP iterator API for QPs
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Mon, 28 Aug 2017 18:23:45 +0000 (11:23 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:28 +0000 (19:12 -0400)
commitc4053a04ff4cb59c3d900b125947d63657c430a1
treeb6216160865460e57f382181b5e58c59feeccb8f
parent4f728287e440993141f0e6b764ae34b68f02d27b
IB/rdmavt: Add QP iterator API for QPs

There are currently 3 spots in the qib and hfi1 driver that have
knowledge of the internal QP hash list that should only be in
scope to rdmavt QP code.

Add an iterator API for processing all QPs to hide the
nature of the RCU hashlist.

The API consists of:
- rvt_qp_iter_init()
  * For iterating QPs one at a time for seq_file semantics
- rvt_qp_iter_next()
  * For iterating QPs one at a time for seq_file semantics
- rvt_qp_iter()
  * For iterating all QPs

The first two are used for things like seq_file prints.

The last is for code that just needs to iterate all QPs
in the system.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rdmavt/qp.c
include/rdma/rdmavt_qp.h