diff options
author | Roland Dreier <rolandd@cisco.com> | 2007-05-31 11:01:39 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-05-31 11:01:39 -0700 |
commit | e716237f442d2522023c07a5b03f6e3e7977dfa0 (patch) | |
tree | 4e663ba9f0c16542c60842e3dc41863349a30cc6 | |
parent | a61acb1ce4fcc96c520ae284d64d8f09adbc350c (diff) | |
download | libmthca-e716237f442d2522023c07a5b03f6e3e7977dfa0.tar.gz |
Add missing wmb() in mthca_tavor_post_send()
Make sure send WQE fields do not get written in the wrong order to avoid
the HCA hardware seeing a bogus WQE.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | src/qp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -292,7 +292,10 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr, htonl(((ind << qp->sq.wqe_shift) + qp->send_wqe_offset) | mthca_opcode[wr->opcode]); - + /* + * Make sure that nda_op is written before setting ee_nds. + */ + wmb(); ((struct mthca_next_seg *) prev_wqe)->ee_nds = htonl((size0 ? 0 : MTHCA_NEXT_DBD) | size | ((wr->send_flags & IBV_SEND_FENCE) ? |