IB/hfi1: Prepare resource waits for dual leg
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Fri, 28 Sep 2018 14:17:09 +0000 (07:17 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 1 Oct 2018 01:21:12 +0000 (19:21 -0600)
commit5da0fc9dbf891a9c9e01a634f2126b5952afb3a6
treecf9192ba040aa3bb4ba582baa29a71cde0bf9132
parentd205a06a14796a24b3447bc5d27b7dedff4479d5
IB/hfi1: Prepare resource waits for dual leg

Current implementation allows each qp to have only one send engine.  As
such, each qp has only one list to queue prebuilt packets when send engine
resources are not available. To improve performance, it is desired to
support multiple send engines for each qp.

This patch creates the framework to support two send engines
(two legs) for each qp for the TID RDMA protocol, which can be easily
extended to support more send engines. It achieves the goal by creating a
leg specific struct, iowait_work in the iowait struct, to hold the
work_struct and the tx_list as well as a pointer to the parent iowait
struct.

The hfi1_pkt_state now has an additional field to record the current legs
work structure and that is now passed to all egress waiters to determine
the leg that needs to wait via a new iowait helper.  The APIs are adjusted
to use the new leg specific struct as required.

Many new and modified helpers are added to support this change.

Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
16 files changed:
drivers/infiniband/hw/hfi1/Makefile
drivers/infiniband/hw/hfi1/iowait.c [new file with mode: 0644]
drivers/infiniband/hw/hfi1/iowait.h
drivers/infiniband/hw/hfi1/qp.c
drivers/infiniband/hw/hfi1/qp.h
drivers/infiniband/hw/hfi1/ruc.c
drivers/infiniband/hw/hfi1/sdma.c
drivers/infiniband/hw/hfi1/sdma.h
drivers/infiniband/hw/hfi1/user_sdma.c
drivers/infiniband/hw/hfi1/verbs.c
drivers/infiniband/hw/hfi1/verbs.h
drivers/infiniband/hw/hfi1/verbs_txreq.h
drivers/infiniband/hw/hfi1/vnic_sdma.c
drivers/infiniband/hw/qib/qib_verbs.c
drivers/infiniband/hw/qib/qib_verbs.h
include/rdma/rdma_vt.h