nvme: only prefetch req's stailq when req != NULL
It is fine to prefetch an invalid address, but ASAN doesn't like it. So move the prefetch slightly to make ASAN happy. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ib51ab8890e5fe91d30057f65e1399cfc9dd1dd49 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17432 Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
7858e18b05
commit
7d44b36e0d
@ -925,13 +925,13 @@ nvme_pcie_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_
|
|||||||
}
|
}
|
||||||
|
|
||||||
tr = &pqpair->tr[cpl->cid];
|
tr = &pqpair->tr[cpl->cid];
|
||||||
|
pqpair->sq_head = cpl->sqhd;
|
||||||
|
|
||||||
|
if (tr->req) {
|
||||||
/* Prefetch the req's STAILQ_ENTRY since we'll need to access it
|
/* Prefetch the req's STAILQ_ENTRY since we'll need to access it
|
||||||
* as part of putting the req back on the qpair's free list.
|
* as part of putting the req back on the qpair's free list.
|
||||||
*/
|
*/
|
||||||
__builtin_prefetch(&tr->req->stailq);
|
__builtin_prefetch(&tr->req->stailq);
|
||||||
pqpair->sq_head = cpl->sqhd;
|
|
||||||
|
|
||||||
if (tr->req) {
|
|
||||||
nvme_pcie_qpair_complete_tracker(qpair, tr, cpl, true);
|
nvme_pcie_qpair_complete_tracker(qpair, tr, cpl, true);
|
||||||
} else {
|
} else {
|
||||||
SPDK_ERRLOG("cpl does not map to outstanding cmd\n");
|
SPDK_ERRLOG("cpl does not map to outstanding cmd\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user