]> git.openfabrics.org - ~shefty/libmlx4.git/commit
Fix data corruption triggered by wrong headroom marking order
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 20 Sep 2007 18:22:37 +0000 (11:22 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 20 Sep 2007 18:23:50 +0000 (11:23 -0700)
commitc45efd89ef667b30b84e4f63d8c712d1ebcabde2
treed1c418c61fe83de7e1b27a496d5861b34a52b976
parent338a180f3ca81d12dbc5b6587433d557769ee098
Fix data corruption triggered by wrong headroom marking order

This is an addendum to commit 561da8d1 ("Handle new FW requirement for
send request prefetching").  We also need to handle prefetch marking
properly for S/G segments, or else the HCA may end up processing S/G
segments that are not fully written and end up sending the wrong data.

We write S/G segments in reverse order into the WQE, in order to
guarantee that the first dword of all cachelines containing S/G
segments is written last (overwriting the headroom invalidation
pattern).  The entire cacheline will thus contain valid data when the
invalidation pattern is overwritten.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
src/qp.c