Skip to content

Commit

Permalink
bnxt_re/lib: Fix incorrect transfer length in bnxt_re_post_send
Browse files Browse the repository at this point in the history
library is incorrectly setting transfer length/qkey_len in
bnxt_re_post_send handler if chain of Work Request is posted by
application. It doesn't update length when wr->num_sge is zero
and hence qkey_len is updated with stale data from length variable.

Initialize the bytes variable to zero in the loop.

Signed-off-by: Saravanan Vajravel <[email protected]>
Signed-off-by: Selvin Xavier <[email protected]>
  • Loading branch information
Saravanan Vajravel authored and selvintxavier committed Nov 16, 2023
1 parent bcf1baa commit 68f59cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions providers/bnxt_re/verbs.c
Expand Up @@ -1715,6 +1715,7 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
}

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

Expand Down

0 comments on commit 68f59cd

Please sign in to comment.