* [dpdk-dev] [PATCH] common/cnxk: consider adjust value for tm burst calculation
@ 2021-11-01 7:28 skoteshwar
2021-11-03 15:13 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: skoteshwar @ 2021-11-01 7:28 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao; +Cc: dev
From: Satha Rao <skoteshwar@marvell.com>
To support lower pps in packet mode we are changing adjust value,
same needs to be consider for burst size calculations.
When both peak and committed rates requested, then peak rate should
be larger than committed rate.
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
---
drivers/common/cnxk/roc_nix_tm_ops.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
index eee80d5..b80c77c 100644
--- a/drivers/common/cnxk/roc_nix_tm_ops.c
+++ b/drivers/common/cnxk/roc_nix_tm_ops.c
@@ -124,6 +124,11 @@
profile->pkt_mode_adj += adjust;
profile->commit.rate += (adjust * profile->commit.rate);
profile->peak.rate += (adjust * profile->peak.rate);
+ /* Number of tokens freed after scheduling was proportional
+ * to adjust value
+ */
+ profile->commit.size *= adjust;
+ profile->peak.size *= adjust;
}
return 0;
@@ -181,6 +186,10 @@
return NIX_ERR_TM_INVALID_PEAK_RATE;
}
+ /* If PIR and CIR are requested, PIR should always be larger than CIR */
+ if (peak_rate && commit_rate && (commit_rate > peak_rate))
+ return NIX_ERR_TM_INVALID_PEAK_RATE;
+
if (!skip_ins)
TAILQ_INSERT_TAIL(&nix->shaper_profile_list, profile, shaper);
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] common/cnxk: consider adjust value for tm burst calculation
2021-11-01 7:28 [dpdk-dev] [PATCH] common/cnxk: consider adjust value for tm burst calculation skoteshwar
@ 2021-11-03 15:13 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2021-11-03 15:13 UTC (permalink / raw)
To: Satha Koteswara Rao Kottidi, Ferruh Yigit
Cc: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, dpdk-dev
On Mon, Nov 1, 2021 at 12:59 PM <skoteshwar@marvell.com> wrote:
>
> From: Satha Rao <skoteshwar@marvell.com>
>
> To support lower pps in packet mode we are changing adjust value,
> same needs to be consider for burst size calculations.
>
> When both peak and committed rates requested, then peak rate should
> be larger than committed rate.
>
> Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks
> ---
> drivers/common/cnxk/roc_nix_tm_ops.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
> index eee80d5..b80c77c 100644
> --- a/drivers/common/cnxk/roc_nix_tm_ops.c
> +++ b/drivers/common/cnxk/roc_nix_tm_ops.c
> @@ -124,6 +124,11 @@
> profile->pkt_mode_adj += adjust;
> profile->commit.rate += (adjust * profile->commit.rate);
> profile->peak.rate += (adjust * profile->peak.rate);
> + /* Number of tokens freed after scheduling was proportional
> + * to adjust value
> + */
> + profile->commit.size *= adjust;
> + profile->peak.size *= adjust;
> }
>
> return 0;
> @@ -181,6 +186,10 @@
> return NIX_ERR_TM_INVALID_PEAK_RATE;
> }
>
> + /* If PIR and CIR are requested, PIR should always be larger than CIR */
> + if (peak_rate && commit_rate && (commit_rate > peak_rate))
> + return NIX_ERR_TM_INVALID_PEAK_RATE;
> +
> if (!skip_ins)
> TAILQ_INSERT_TAIL(&nix->shaper_profile_list, profile, shaper);
>
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-03 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01 7:28 [dpdk-dev] [PATCH] common/cnxk: consider adjust value for tm burst calculation skoteshwar
2021-11-03 15:13 ` Jerin Jacob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).