diff options
author | Kaike Wan <kaike.wan@intel.com> | 2017-10-09 12:38:26 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-10-18 10:13:00 -0400 |
commit | a8979cc55c0034fbe129904936cfc4b5bf41e59b (patch) | |
tree | 5cc1dc1f6b0289b6886061efe598b2bfb85f8def /drivers/infiniband/hw/hfi1/verbs_txreq.h | |
parent | f8195f3b14a046ae33d9c369ffb59b4192f29e08 (diff) | |
download | linux-stable-a8979cc55c0034fbe129904936cfc4b5bf41e59b.tar.gz linux-stable-a8979cc55c0034fbe129904936cfc4b5bf41e59b.tar.bz2 linux-stable-a8979cc55c0034fbe129904936cfc4b5bf41e59b.zip |
IB/hfi1: Set hdr_type when tx req is allocated
Setting the protocol type should be part of initializing the tx request.
For UC and RC, the current protocol type is part of the qp priv structure.
For ud requests, it needs to be adjusted dynamically, based on the AV
posted with the WQE. This patch will simplify the initialization of the
tx request.
Fixes: 5b6cabb0db77 ("IB/hfi1: Add 16B RC/UC support")
Reviewed-by: Don Hiatt <don.hiatt@intel.com>
Reviewed-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: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/verbs_txreq.h')
-rw-r--r-- | drivers/infiniband/hw/hfi1/verbs_txreq.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/verbs_txreq.h b/drivers/infiniband/hw/hfi1/verbs_txreq.h index 76216f2ef35a..cec7a4b34d16 100644 --- a/drivers/infiniband/hw/hfi1/verbs_txreq.h +++ b/drivers/infiniband/hw/hfi1/verbs_txreq.h @@ -92,6 +92,8 @@ static inline struct verbs_txreq *get_txreq(struct hfi1_ibdev *dev, tx->psc = priv->s_sendcontext; /* so that we can test if the sdma decriptors are there */ tx->txreq.num_desc = 0; + /* Set the header type */ + tx->phdr.hdr.hdr_type = priv->hdr_type; return tx; } |