Skip to content

Commit

Permalink
nvmet-rdma: add unlikely check in the fast path
Browse files Browse the repository at this point in the history
ib_post_send operation should succeed unless something unusual
happened to the ib device.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Max Gurtovoy authored and Christoph Hellwig committed Jul 23, 2018
1 parent 0d5ee2b commit 2fc464e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/target/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static void nvmet_rdma_queue_response(struct nvmet_req *req)
rsp->send_sge.addr, rsp->send_sge.length,
DMA_TO_DEVICE);

if (ib_post_send(cm_id->qp, first_wr, &bad_wr)) {
if (unlikely(ib_post_send(cm_id->qp, first_wr, &bad_wr))) {
pr_err("sending cmd response failed\n");
nvmet_rdma_release_rsp(rsp);
}
Expand Down

0 comments on commit 2fc464e

Please sign in to comment.