Content-Type: multipart/mixed; boundary="===============3491671285986499844==" MIME-Version: 1.0 From: ramesh.thomas at intel.com Subject: [Accel-config] [PATCH] accel-config: Set wq name after setting mdev type Date: Mon, 19 Jul 2021 23:44:41 -0400 Message-ID: <20210720034441.1120152-1-ramesh.thomas@intel.com> To: accel-config@lists.01.org List-ID: --===============3491671285986499844== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Ramesh Thomas Setting mdev type resets the name. After setting mdev set the name again from the template. Signed-off-by: Ramesh Thomas --- test/libaccfg.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/libaccfg.c b/test/libaccfg.c index 57d97f2..516adbc 100644 --- a/test/libaccfg.c +++ b/test/libaccfg.c @@ -764,7 +764,8 @@ static int mdev_test(struct accfg_ctx *ctx, struct accf= g_device *device, return 0; } = -static int set_mdev_type(struct accfg_ctx *ctx, struct accfg_wq *wq) +static int set_mdev_type(struct accfg_ctx *ctx, struct accfg_wq *wq, + struct wq_parameters *wq_param) { int rc; = @@ -772,6 +773,10 @@ static int set_mdev_type(struct accfg_ctx *ctx, struct= accfg_wq *wq) if (rc) fprintf(stderr, "Error setting mdev type\n"); = + rc =3D accfg_wq_set_str_name(wq, wq_param->name); + if (rc) + fprintf(stderr, "Error setting name for mdev type wq\n"); + return rc; } = @@ -810,7 +815,7 @@ static int test_mdev_1swq(struct accfg_ctx *ctx) if (rc) return rc; = - rc =3D set_mdev_type(ctx, test_ctx.wq[2]); + rc =3D set_mdev_type(ctx, test_ctx.wq[2], test_ctx.wq_param[2]); if (rc) return rc; = @@ -843,7 +848,7 @@ static int test_mdev_1dwq(struct accfg_ctx *ctx) if (rc) return rc; = - rc =3D set_mdev_type(ctx, test_ctx.wq[3]); + rc =3D set_mdev_type(ctx, test_ctx.wq[3], test_ctx.wq_param[3]); if (rc) return rc; = -- = 2.26.3 --===============3491671285986499844==--