[5/8] common/cnxk: always use single qint with NIX

Message ID 20211209091342.27017-5-ndabilpuram@marvell.com (mailing list archive)
State Changes Requested, archived
Delegated to: Jerin Jacob
Headers
Series [1/8] common/cnxk: fix shift offset for tl3 length disable |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram Dec. 9, 2021, 9:13 a.m. UTC
  From: Harman Kalra <hkalra@marvell.com>

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.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_nix_queue.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
  

Comments

Jerin Jacob Jan. 19, 2022, 4:28 p.m. UTC | #1
On Thu, Dec 9, 2021 at 2:44 PM Nithin Dabilpuram
<ndabilpuram@marvell.com> wrote:
>
> From: Harman Kalra <hkalra@marvell.com>
>
> 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.
>
> Signed-off-by: Harman Kalra <hkalra@marvell.com>

Changed the subject to;
 common/cnxk: always use single interrupt ID with NIX

Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks

> ---
>  drivers/common/cnxk/roc_nix_queue.c | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
> index c8c8401..4455fc1 100644
> --- a/drivers/common/cnxk/roc_nix_queue.c
> +++ b/drivers/common/cnxk/roc_nix_queue.c
> @@ -680,7 +680,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
> @@ -779,8 +783,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
> --
> 2.8.4
>
  

Patch

diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index c8c8401..4455fc1 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -680,7 +680,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
@@ -779,8 +783,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