From: Harman Kalra Date: Fri, 21 Jan 2022 12:04:19 +0000 (+0530) Subject: common/cnxk: always use single interrupt ID with NIX X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=89d3557c8de36a40266ddfbfbaa73adcda97c8f4;p=dpdk.git common/cnxk: always use single interrupt ID with NIX 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: ae06070901ab ("common/cnxk: add NIX Tx queue management API") Cc: stable@dpdk.org Signed-off-by: Harman Kalra Acked-by: Jerin Jacob --- diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c index ab578496d1..e8b42ed6be 100644 --- a/drivers/common/cnxk/roc_nix_queue.c +++ b/drivers/common/cnxk/roc_nix_queue.c @@ -705,7 +705,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 @@ -804,8 +808,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