Skip to content

Commit

Permalink
common/cnxk: always use single interrupt ID with NIX
Browse files Browse the repository at this point in the history
[ upstream commit 89d3557 ]

An errata exists whereby, in certain cases NIX may use an
incorrect QINT_IDX for SQ interrupts. As a result, the
interrupt may not be delivered to software, or may not be
associated with the correct SQ.
When NIX uses an incorrect QINT_IDX :
1. NIX_LF_QINT(0..63)_CNT[COUNT] will be incremented for
incorrect QINT.
2. NIX_LF_QINT(0..63)_INT[INTR] will be set for incorrect
QINT.

Fixes: ae06070 ("common/cnxk: add NIX Tx queue management API")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
  • Loading branch information
Harman Kalra authored and kevintraynor committed Feb 21, 2022
1 parent cfcdf00 commit 1349f9e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions drivers/common/cnxk/roc_nix_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,11 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
aq->sq.sq_int_ena |= BIT(NIX_SQINT_MNQ_ERR);

/* Many to one reduction */
aq->sq.qint_idx = sq->qid % nix->qints;
/* Assigning QINT 0 to all the SQs, an errata exists where NIXTX can
* send incorrect QINT_IDX when reporting queue interrupt (QINT). This
* might result in software missing the interrupt.
*/
aq->sq.qint_idx = 0;
}

static int
Expand Down Expand Up @@ -794,8 +798,11 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
aq->sq.sq_int_ena |= BIT(NIX_SQINT_SEND_ERR);
aq->sq.sq_int_ena |= BIT(NIX_SQINT_MNQ_ERR);

/* Many to one reduction */
aq->sq.qint_idx = sq->qid % nix->qints;
/* Assigning QINT 0 to all the SQs, an errata exists where NIXTX can
* send incorrect QINT_IDX when reporting queue interrupt (QINT). This
* might result in software missing the interrupt.
*/
aq->sq.qint_idx = 0;
}

static int
Expand Down

0 comments on commit 1349f9e

Please sign in to comment.