Skip to contentSkip to conversation

nvmet-rdma: add unlikely check in the fast path

PATCH New Max Gurtovoy 3 participants 3 messages Jun 27, 2018 – Jun 29, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmet-rdma: add unlikely check in the fast path

ib_post_send operation should succeed unless something unusual happened to the ib device.

Signed-off-by Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/target/rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/rdma.c +1 -1
index 88d9f82..ac4fdab 100644
@@ -501,7 +501,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);
 	}
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw

PATCH 1/1 nvmet-rdma: add unlikely check in the fast path

Reviewed-by Sagi Grimberg <sagi at grimberg.me>