IB/ipath: Add barrier before updating WC head in shared memory
Add a barrier to make sure the CPU doesn't reorder writes to memory, since user programs can be polling on the head index update and the entry should be written before that. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Este cometimento está contido em:

cometido por
Roland Dreier

ascendente
06cc85086e
cometimento
4fc570bcbe
@@ -176,6 +176,8 @@ static void ipath_ud_loopback(struct ipath_qp *sqp,
|
||||
dev->n_pkt_drops++;
|
||||
goto bail_sge;
|
||||
}
|
||||
/* Make sure entry is read after head index is read. */
|
||||
smp_rmb();
|
||||
wqe = get_rwqe_ptr(rq, tail);
|
||||
if (++tail >= rq->size)
|
||||
tail = 0;
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador