Content-Type: multipart/mixed; boundary="===============1092043728974749023==" MIME-Version: 1.0 From: Ramesh Thomas Subject: [Accel-config] [PATCH 5/6] accel-config: Use driver_name attr for binding Date: Mon, 31 Jan 2022 18:53:18 -0800 Message-ID: <20220201025319.16393-6-ramesh.thomas@intel.com> In-Reply-To: 20220201025319.16393-1-ramesh.thomas@intel.com To: accel-config@lists.01.org List-ID: --===============1092043728974749023== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Use wq driver_name attribute if present get the driver name for binding. Signed-off-by: Ramesh Thomas --- accfg/lib/libaccfg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/accfg/lib/libaccfg.c b/accfg/lib/libaccfg.c index 5bd4623..9cdd8f8 100644 --- a/accfg/lib/libaccfg.c +++ b/accfg/lib/libaccfg.c @@ -2193,9 +2193,15 @@ static int accfg_wq_control(struct accfg_wq *wq, enu= m accfg_control_flag flag, = if (flag =3D=3D ACCFG_WQ_ENABLE) { rc =3D get_driver_bind_path(device->bus_type_str, + wq->driver_name ? wq->driver_name : IDXD_WQ_DEVICE_PORTAL(device, wq), &path); if (rc < 0) return rc; + if (wq->driver_name && access(path, F_OK)) { + fprintf(stderr, "Invalid wq driver name \"%s\"\n", + wq->driver_name); + return -ENOENT; + } } else if (flag =3D=3D ACCFG_WQ_DISABLE) { int clients; = -- = 2.31.1 --===============1092043728974749023==--