diff mbox series

drivers: fix cnxk event qos devarg processing

Message ID 9da85a53252e304aef90f0e54805feaee61b75c5.1653030578.git.sthotton@marvell.com (mailing list archive)
State Accepted
Delegated to: Jerin Jacob
Headers show
Series drivers: fix cnxk event qos devarg processing | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Shijith Thotton May 20, 2022, 7:11 a.m. UTC
Fixed qos parameters getting over written and IAQ/TAQ threshold
calculation.

Fixes: 910da32c53a9 ("event/cnxk: add device start")
Cc: stable@dpdk.org

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 drivers/common/cnxk/roc_sso.c      | 4 ++--
 drivers/event/cnxk/cnxk_eventdev.c | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Jerin Jacob June 13, 2022, 5:58 a.m. UTC | #1
On Fri, May 20, 2022 at 12:41 PM Shijith Thotton <sthotton@marvell.com> wrote:
>
> Fixed qos parameters getting over written and IAQ/TAQ threshold
> calculation.
>
> Fixes: 910da32c53a9 ("event/cnxk: add device start")
> Cc: stable@dpdk.org
>
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>

Applied to dpdk-next-net-eventdev/for-main. Thanks


> ---
>  drivers/common/cnxk/roc_sso.c      | 4 ++--
>  drivers/event/cnxk/cnxk_eventdev.c | 8 ++++----
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/common/cnxk/roc_sso.c b/drivers/common/cnxk/roc_sso.c
> index 358d37a9f2..8251c967fb 100644
> --- a/drivers/common/cnxk/roc_sso.c
> +++ b/drivers/common/cnxk/roc_sso.c
> @@ -406,10 +406,10 @@ roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso, struct roc_sso_hwgrp_qos *qos,
>                 }
>                 req->grp = qos[i].hwgrp;
>                 req->xaq_limit = (nb_xaq * (xaq_prcnt ? xaq_prcnt : 100)) / 100;
> -               req->taq_thr = (SSO_HWGRP_IAQ_MAX_THR_MASK *
> +               req->iaq_thr = (SSO_HWGRP_IAQ_MAX_THR_MASK *
>                                 (iaq_prcnt ? iaq_prcnt : 100)) /
>                                100;
> -               req->iaq_thr = (SSO_HWGRP_TAQ_MAX_THR_MASK *
> +               req->taq_thr = (SSO_HWGRP_TAQ_MAX_THR_MASK *
>                                 (taq_prcnt ? taq_prcnt : 100)) /
>                                100;
>         }
> diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
> index b66f241ef8..2455b7be2d 100644
> --- a/drivers/event/cnxk/cnxk_eventdev.c
> +++ b/drivers/event/cnxk/cnxk_eventdev.c
> @@ -513,10 +513,10 @@ cnxk_sso_start(struct rte_eventdev *event_dev, cnxk_sso_hws_reset_t reset_fn,
>
>         plt_sso_dbg();
>         for (i = 0; i < dev->qos_queue_cnt; i++) {
> -               qos->hwgrp = dev->qos_parse_data[i].queue;
> -               qos->iaq_prcnt = dev->qos_parse_data[i].iaq_prcnt;
> -               qos->taq_prcnt = dev->qos_parse_data[i].taq_prcnt;
> -               qos->xaq_prcnt = dev->qos_parse_data[i].xaq_prcnt;
> +               qos[i].hwgrp = dev->qos_parse_data[i].queue;
> +               qos[i].iaq_prcnt = dev->qos_parse_data[i].iaq_prcnt;
> +               qos[i].taq_prcnt = dev->qos_parse_data[i].taq_prcnt;
> +               qos[i].xaq_prcnt = dev->qos_parse_data[i].xaq_prcnt;
>         }
>         rc = roc_sso_hwgrp_qos_config(&dev->sso, qos, dev->qos_queue_cnt,
>                                       dev->xae_cnt);
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/common/cnxk/roc_sso.c b/drivers/common/cnxk/roc_sso.c
index 358d37a9f2..8251c967fb 100644
--- a/drivers/common/cnxk/roc_sso.c
+++ b/drivers/common/cnxk/roc_sso.c
@@ -406,10 +406,10 @@  roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso, struct roc_sso_hwgrp_qos *qos,
 		}
 		req->grp = qos[i].hwgrp;
 		req->xaq_limit = (nb_xaq * (xaq_prcnt ? xaq_prcnt : 100)) / 100;
-		req->taq_thr = (SSO_HWGRP_IAQ_MAX_THR_MASK *
+		req->iaq_thr = (SSO_HWGRP_IAQ_MAX_THR_MASK *
 				(iaq_prcnt ? iaq_prcnt : 100)) /
 			       100;
-		req->iaq_thr = (SSO_HWGRP_TAQ_MAX_THR_MASK *
+		req->taq_thr = (SSO_HWGRP_TAQ_MAX_THR_MASK *
 				(taq_prcnt ? taq_prcnt : 100)) /
 			       100;
 	}
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index b66f241ef8..2455b7be2d 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -513,10 +513,10 @@  cnxk_sso_start(struct rte_eventdev *event_dev, cnxk_sso_hws_reset_t reset_fn,
 
 	plt_sso_dbg();
 	for (i = 0; i < dev->qos_queue_cnt; i++) {
-		qos->hwgrp = dev->qos_parse_data[i].queue;
-		qos->iaq_prcnt = dev->qos_parse_data[i].iaq_prcnt;
-		qos->taq_prcnt = dev->qos_parse_data[i].taq_prcnt;
-		qos->xaq_prcnt = dev->qos_parse_data[i].xaq_prcnt;
+		qos[i].hwgrp = dev->qos_parse_data[i].queue;
+		qos[i].iaq_prcnt = dev->qos_parse_data[i].iaq_prcnt;
+		qos[i].taq_prcnt = dev->qos_parse_data[i].taq_prcnt;
+		qos[i].xaq_prcnt = dev->qos_parse_data[i].xaq_prcnt;
 	}
 	rc = roc_sso_hwgrp_qos_config(&dev->sso, qos, dev->qos_queue_cnt,
 				      dev->xae_cnt);