提交 55a98e95 编写于 作者: E Eli Cohen 提交者: Roland Dreier

IB/mthca: Mark error paths as unlikely() in post_srq_recv functions

Signed-off-by: NEli Cohen <eli@mellanox.co.il>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 3ac8c70f
...@@ -509,7 +509,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, ...@@ -509,7 +509,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
for (nreq = 0; wr; wr = wr->next) { for (nreq = 0; wr; wr = wr->next) {
ind = srq->first_free; ind = srq->first_free;
if (ind < 0) { if (unlikely(ind < 0)) {
mthca_err(dev, "SRQ %06x full\n", srq->srqn); mthca_err(dev, "SRQ %06x full\n", srq->srqn);
err = -ENOMEM; err = -ENOMEM;
*bad_wr = wr; *bad_wr = wr;
...@@ -519,7 +519,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, ...@@ -519,7 +519,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
wqe = get_wqe(srq, ind); wqe = get_wqe(srq, ind);
next_ind = *wqe_to_link(wqe); next_ind = *wqe_to_link(wqe);
if (next_ind < 0) { if (unlikely(next_ind < 0)) {
mthca_err(dev, "SRQ %06x full\n", srq->srqn); mthca_err(dev, "SRQ %06x full\n", srq->srqn);
err = -ENOMEM; err = -ENOMEM;
*bad_wr = wr; *bad_wr = wr;
...@@ -623,7 +623,7 @@ int mthca_arbel_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, ...@@ -623,7 +623,7 @@ int mthca_arbel_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
for (nreq = 0; wr; ++nreq, wr = wr->next) { for (nreq = 0; wr; ++nreq, wr = wr->next) {
ind = srq->first_free; ind = srq->first_free;
if (ind < 0) { if (unlikely(ind < 0)) {
mthca_err(dev, "SRQ %06x full\n", srq->srqn); mthca_err(dev, "SRQ %06x full\n", srq->srqn);
err = -ENOMEM; err = -ENOMEM;
*bad_wr = wr; *bad_wr = wr;
...@@ -633,7 +633,7 @@ int mthca_arbel_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, ...@@ -633,7 +633,7 @@ int mthca_arbel_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
wqe = get_wqe(srq, ind); wqe = get_wqe(srq, ind);
next_ind = *wqe_to_link(wqe); next_ind = *wqe_to_link(wqe);
if (next_ind < 0) { if (unlikely(next_ind < 0)) {
mthca_err(dev, "SRQ %06x full\n", srq->srqn); mthca_err(dev, "SRQ %06x full\n", srq->srqn);
err = -ENOMEM; err = -ENOMEM;
*bad_wr = wr; *bad_wr = wr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册