Content-Type: multipart/mixed; boundary="===============1008954971307009384==" MIME-Version: 1.0 From: Dave Jiang Subject: [Accel-config] Re: [PATCH 1/1] accel-config/test: fix dedicated mode wq size 1 failure Date: Tue, 29 Mar 2022 08:11:13 -0700 Message-ID: In-Reply-To: 20220329074911.736158-1-tony.zhu@intel.com To: accel-config@lists.01.org List-ID: --===============1008954971307009384== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 Reviewed-by: Dave Jiang 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 b= uf_size, > if (ctx->dedicated =3D=3D ACCFG_WQ_SHARED) > range =3D ctx->threshold; > else > - range =3D ctx->wq_size - 1; > + range =3D ctx->wq_size; > = > while (itr > 0 && rc =3D=3D DSA_STATUS_OK) { > i =3D (itr < range) ? itr : range; > @@ -226,7 +226,7 @@ static int test_dif(struct dsa_context *ctx, size_t b= uf_size, > if (ctx->dedicated =3D=3D ACCFG_WQ_SHARED) > range =3D ctx->threshold; > else > - range =3D ctx->wq_size - 1; > + range =3D ctx->wq_size; > = > while (itr > 0 && rc =3D=3D DSA_STATUS_OK) { > i =3D (itr < range) ? itr : range; > @@ -303,7 +303,7 @@ static int test_noop(struct dsa_context *ctx, int tfl= ags, int num_desc) > if (ctx->dedicated =3D=3D ACCFG_WQ_SHARED) > range =3D ctx->threshold; > else > - range =3D ctx->wq_size - 1; > + range =3D ctx->wq_size; > = > while (itr > 0 && rc =3D=3D DSA_STATUS_OK) { > i =3D (itr < range) ? itr : range; > @@ -353,7 +353,7 @@ static int test_memory(struct dsa_context *ctx, size_= t buf_size, > if (ctx->dedicated =3D=3D ACCFG_WQ_SHARED) > range =3D ctx->threshold; > else > - range =3D ctx->wq_size - 1; > + range =3D ctx->wq_size; > = > while (itr > 0 && rc =3D=3D DSA_STATUS_OK) { > i =3D (itr < range) ? itr : range; > @@ -514,7 +514,7 @@ static int test_delta(struct dsa_context *ctx, size_t= buf_size, > if (ctx->dedicated =3D=3D ACCFG_WQ_SHARED) > range =3D ctx->threshold; > else > - range =3D ctx->wq_size - 1; > + range =3D ctx->wq_size; > = > while (itr > 0 && rc =3D=3D DSA_STATUS_OK) { > i =3D (itr < range) ? itr : range; > @@ -584,7 +584,7 @@ static int test_crc(struct dsa_context *ctx, size_t b= uf_size, > if (ctx->dedicated =3D=3D ACCFG_WQ_SHARED) > range =3D ctx->threshold; > else > - range =3D ctx->wq_size - 1; > + range =3D ctx->wq_size; > = > while (itr > 0 && rc =3D=3D DSA_STATUS_OK) { > i =3D (itr < range) ? itr : range; --===============1008954971307009384==--