Skip to content

Commit

Permalink
bnxt_re/lib: Avoid unnecessary increment in idx
Browse files Browse the repository at this point in the history
idx need not be incremented in post_send while
getting the index for header.

Signed-off-by: Selvin Xavier <[email protected]>
  • Loading branch information
selvintxavier committed Nov 16, 2023
1 parent 0b19f94 commit f01ae35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions providers/bnxt_re/verbs.c
Expand Up @@ -1737,10 +1737,10 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
goto bad_wr;
}

idx = 0;
idx = 2;
bytes = 0;
hdr = bnxt_re_get_hwqe(sq, idx++);
sqe = bnxt_re_get_hwqe(sq, idx++);
hdr = bnxt_re_get_hwqe(sq, 0);
sqe = bnxt_re_get_hwqe(sq, 1);

/* populate push buffer */
if (pbuf) {
Expand Down

0 comments on commit f01ae35

Please sign in to comment.