[Accel-config] Re: [PATCH 1/1] accel-config/test: Fix dsa_test reports opposite WQ mode output info

Dave Jiang <dave.jiang at intel.com> Thu, 21 Apr 2022 08:30:58 -0700
Newsgroups dev.linux.lists.accel-config
Message-ID <[email protected]>
On 4/21/2022 2:59 AM, Tony Zhu wrote:
> It the test wq is shared mode, output shared. For dedicated mode, output
> dedicated instead of shared 1.

Current output information to indicate a wq is shared or dedicated is 
reversed for dsa_test. Fix and indicate the exact wq mode.


Otherwise, Reviewed-by: Dave Jiang <dave.jiang(a)intel.com>


>
> Signed-off-by: Tony Zhu <tony.zhu(a)intel.com>
> ---
>   test/accel_test.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/accel_test.c b/test/accel_test.c
> index 8487099..9c4d2f4 100644
> --- a/test/accel_test.c
> +++ b/test/accel_test.c
> @@ -224,9 +224,9 @@ int acctest_alloc(struct acctest_context *ctx, int shared, int dev_id, int wq_id
>   	ctx->max_xfer_bits = bsr(ctx->max_xfer_size);
>   	ctx->compl_size = accfg_device_get_compl_size(dev);
>   
> -	info("alloc wq %d shared %d size %d addr %p batch sz %#x xfer sz %#x\n",
> -	     ctx->wq_idx, ctx->dedicated, ctx->wq_size, ctx->wq_reg,
> -	     ctx->max_batch_size, ctx->max_xfer_size);
> +	info("alloc wq %d %s size %d addr %p batch sz %#x xfer sz %#x\n",
> +	     ctx->wq_idx, (ctx->dedicated == ACCFG_WQ_SHARED) ? "shared" : "dedicated",
> +	     ctx->wq_size, ctx->wq_reg, ctx->max_batch_size, ctx->max_xfer_size);
>   
>   	return 0;
>   }