Content-Type: multipart/mixed; boundary="===============7497052579836001411==" MIME-Version: 1.0 From: Dave Jiang Subject: [Accel-config] Re: [PATCH] accel-config: Set wq name after setting mdev type Date: Tue, 20 Jul 2021 08:52:19 -0700 Message-ID: In-Reply-To: 20210720034441.1120152-1-ramesh.thomas@intel.com To: accel-config@lists.01.org List-ID: --===============7497052579836001411== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 7/19/2021 8:44 PM, ramesh.thomas(a)intel.com wrote: > From: Ramesh Thomas > > Setting mdev type resets the name. After setting mdev set the name again > from the template. > > Signed-off-by: Ramesh Thomas Reviewed-by: Dave Jiang > --- > 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 ac= cfg_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, stru= ct 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; > =20 --===============7497052579836001411==--