* [Accel-config] Re: [PATCH 1/1] accel-config/test: fix dedicated mode wq size 1 failure
@ 2022-03-29 15:11 Dave Jiang
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jiang @ 2022-03-29 15:11 UTC (permalink / raw)
To: accel-config
[-- Attachment #1: Type: text/plain, Size: 2675 bytes --]
On 3/29/2022 12:49 AM, Tony Zhu wrote:
> dsa_test fails on dedicated WQ size 1, the root cause is if the size is
> 1 and subtract 1, it is 0. So it is looped there. The correct way is
> if it is shared mode, the test range is threshold. If it is dedicated,
> the test range is wq size, don't need to subtract 1.
>
> Signed-off-by: Tony Zhu <tony.zhu(a)intel.com>
Reviewed-by: Dave Jiang <dave.jiang(a)intel.com>
Wonder why it was set to size - 1 before.....
> ---
> test/dsa_test.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/test/dsa_test.c b/test/dsa_test.c
> index 8e8dc25..f593cdf 100644
> --- a/test/dsa_test.c
> +++ b/test/dsa_test.c
> @@ -51,7 +51,7 @@ static int test_batch(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -226,7 +226,7 @@ static int test_dif(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -303,7 +303,7 @@ static int test_noop(struct dsa_context *ctx, int tflags, int num_desc)
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -353,7 +353,7 @@ static int test_memory(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -514,7 +514,7 @@ static int test_delta(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -584,7 +584,7 @@ static int test_crc(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Accel-config] Re: [PATCH 1/1] accel-config/test: fix dedicated mode wq size 1 failure
@ 2022-03-30 0:58 Zhu, Tony
0 siblings, 0 replies; 2+ messages in thread
From: Zhu, Tony @ 2022-03-30 0:58 UTC (permalink / raw)
To: accel-config
[-- Attachment #1: Type: text/plain, Size: 3364 bytes --]
No confidence to remove the -1 when porting it.
That value is original used for both shared and dedicated, usually, when shared mode the threshold is less 1 than size(the logic is not good).
I modified when shared mode loop range equal threshold, but didn't remove -1 for dedicated.
So the issue happened.
Tony(zhu, xinzhan)
Cube:SHZ1-3W-279
iNet:8821-5077
-----Original Message-----
From: Jiang, Dave <dave.jiang(a)intel.com>
Sent: Tuesday, March 29, 2022 11:11 PM
To: Zhu, Tony <tony.zhu(a)intel.com>; accel-config(a)lists.01.org; Thomas, Ramesh <ramesh.thomas(a)intel.com>
Subject: Re: [PATCH 1/1] accel-config/test: fix dedicated mode wq size 1 failure
On 3/29/2022 12:49 AM, Tony Zhu wrote:
> dsa_test fails on dedicated WQ size 1, the root cause is if the size
> is
> 1 and subtract 1, it is 0. So it is looped there. The correct way is
> if it is shared mode, the test range is threshold. If it is dedicated,
> the test range is wq size, don't need to subtract 1.
>
> Signed-off-by: Tony Zhu <tony.zhu(a)intel.com>
Reviewed-by: Dave Jiang <dave.jiang(a)intel.com>
Wonder why it was set to size - 1 before.....
> ---
> test/dsa_test.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/test/dsa_test.c b/test/dsa_test.c index 8e8dc25..f593cdf
> 100644
> --- a/test/dsa_test.c
> +++ b/test/dsa_test.c
> @@ -51,7 +51,7 @@ static int test_batch(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -226,7 +226,7 @@ static int test_dif(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -303,7 +303,7 @@ static int test_noop(struct dsa_context *ctx, int tflags, int num_desc)
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -353,7 +353,7 @@ static int test_memory(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -514,7 +514,7 @@ static int test_delta(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
> @@ -584,7 +584,7 @@ static int test_crc(struct dsa_context *ctx, size_t buf_size,
> if (ctx->dedicated == ACCFG_WQ_SHARED)
> range = ctx->threshold;
> else
> - range = ctx->wq_size - 1;
> + range = ctx->wq_size;
>
> while (itr > 0 && rc == DSA_STATUS_OK) {
> i = (itr < range) ? itr : range;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-30 0:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29 15:11 [Accel-config] Re: [PATCH 1/1] accel-config/test: fix dedicated mode wq size 1 failure Dave Jiang
2022-03-30 0:58 Zhu, Tony
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.