[PATCH i-g-t 1/2] tests/intel/xe_pmu: Unprovision VFs on cleanup
K V P, Satyanarayana
satyanarayana.k.v.p at intel.com
Tue May 6 12:51:27 UTC 2025
Hi.
> -----Original Message-----
> From: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
> Sent: Tuesday, May 6, 2025 3:46 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>; Kolakowski,
> Jakub1 <jakub1.kolakowski at intel.com>; Tauro, Riana
> <riana.tauro at intel.com>; K V P, Satyanarayana
> <satyanarayana.k.v.p at intel.com>
> Subject: [PATCH i-g-t 1/2] tests/intel/xe_pmu: Unprovision VFs on cleanup
>
> Unprovision VFs to ensure a clean state for subsequent tests.
> Rename disable_vfs() to unprovision_and_disable_vfs() to reflect the
> additional cleanup steps.
>
> Cc: Jakub Kolakowski <jakub1.kolakowski at intel.com>
> Cc: Riana Tauro <riana.tauro at intel.com>
> Cc: Satyanarayana K V P <satyanarayana.k.v.p at intel.com>
> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
> ---
> tests/intel/xe_pmu.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/tests/intel/xe_pmu.c b/tests/intel/xe_pmu.c
> index 094dc0c6c..8cbbf6916 100644
> --- a/tests/intel/xe_pmu.c
> +++ b/tests/intel/xe_pmu.c
> @@ -497,12 +497,15 @@ static unsigned int enable_and_provision_vfs(int
> fd)
> return num_vfs;
> }
>
> -static void disable_vfs(int fd)
> +static void unprovision_and_disable_vfs(int fd)
> {
> - unsigned int gt;
> + unsigned int gt, num_vfs = igt_sriov_get_enabled_vfs(fd);
>
> - xe_for_each_gt(fd, gt)
> + xe_for_each_gt(fd, gt) {
> xe_sriov_set_sched_if_idle(fd, gt, 0);
> + for (int fn = 0; fn <= num_vfs; fn++)
> + xe_sriov_set_exec_quantum_ms(fd, fn, gt, 0);
> + }
>
Do we need to set exec quantum for VFs, when un-provisioning and disabling VFs?
Any specific reason for doing this?
-Satya.
> igt_sriov_disable_vfs(fd);
> /* abort to avoid execution of next tests with enabled VFs */
> @@ -596,7 +599,7 @@ igt_main
> }
>
> igt_fixture
> - disable_vfs(fd);
> + unprovision_and_disable_vfs(fd);
> }
>
> igt_subtest_group {
> --
> 2.31.1
More information about the igt-dev
mailing list