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 Oct 1, 2024
1 parent 90a9cbf commit 6e066a7
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 @@ -556,6 +556,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 @@ -675,6 +676,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 6e066a7

Please sign in to comment.