Skip to content

Commit

Permalink
bnxt_re/lib: Populate vendor_err in the work completion
Browse files Browse the repository at this point in the history
[ Upstream commit 5ac2b2f ]

In case of error completion, it is observed that vendor error
code is always set to zero. Update to populate vendor error along
with IB completions. Also, modified the log to display vendor error.

Fixes: f158e23 ("libbnxt_re: Allow apps to poll for flushed completions")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Nicolas Morey <nmorey@suse.com>
  • Loading branch information
Kalesh AP authored and nmorey committed Sep 24, 2024
1 parent 97d80e4 commit 9cc6f8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/bnxt_re/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ static uint8_t bnxt_re_poll_err_scqe(struct bnxt_re_qp *qp,
status = (le32toh(hdr->flg_st_typ_ph) >> BNXT_RE_BCQE_STATUS_SHIFT) &
BNXT_RE_BCQE_STATUS_MASK;
ibvwc->status = bnxt_re_to_ibv_wc_status(status, true);
ibvwc->vendor_err = status;
ibvwc->wc_flags = 0;
ibvwc->wr_id = swrid->wrid;
ibvwc->qp_num = qp->qpid;
Expand Down Expand Up @@ -487,6 +488,7 @@ static int bnxt_re_poll_err_rcqe(struct bnxt_re_qp *qp, struct ibv_wc *ibvwc,
return 0;

ibvwc->status = bnxt_re_to_ibv_wc_status(status, false);
ibvwc->vendor_err = status;
ibvwc->qp_num = qp->qpid;
ibvwc->opcode = IBV_WC_RECV;
ibvwc->byte_len = 0;
Expand Down

0 comments on commit 9cc6f8a

Please sign in to comment.