From: "Laguna, Lukasz" <lukasz.laguna@intel.com>
To: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>,
<igt-dev@lists.freedesktop.org>
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>,
Jakub Kolakowski <jakub1.kolakowski@intel.com>,
Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: Re: [PATCH i-g-t 2/6] lib/xe/xe_sriov_admin: Rename restore defaults helpers
Date: Tue, 18 Aug 2026 16:14:40 +0200 [thread overview]
Message-ID: <27c3e2de-4dbd-41a0-bff2-8b05409a6a6e@intel.com> (raw)
In-Reply-To: <b9f49ee15df2d3633b4bccaf72ce2df0a4b66fad.1787056235.git.marcin.bernatowicz@linux.intel.com>
On 8/18/2026 14:39, Marcin Bernatowicz wrote:
> The restore helpers only reset execution quantum, preemption timeout and
> scheduling priority. Resource provisioning is restored separately by
> xe_sriov_disable_vfs_restore_auto_provisioning(), so the plain "defaults"
> naming promises more than the helpers deliver.
>
> Rename them to say scheduling defaults. No functional changes.
>
> Assisted-by: Copilot:Claude-Opus-5
> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
> Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
> Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
> Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
> lib/xe/xe_sriov_admin.c | 26 +++++++++++++-------------
> lib/xe/xe_sriov_admin.h | 12 ++++++------
> tests/intel/xe_pmu.c | 4 ++--
> tests/intel/xe_sriov_admin.c | 4 ++--
> tests/intel/xe_sriov_scheduling.c | 2 +-
> 5 files changed, 24 insertions(+), 24 deletions(-)
>
> diff --git a/lib/xe/xe_sriov_admin.c b/lib/xe/xe_sriov_admin.c
> index 0e7ffb52d..b03e77b08 100644
> --- a/lib/xe/xe_sriov_admin.c
> +++ b/lib/xe/xe_sriov_admin.c
> @@ -541,7 +541,7 @@ void xe_sriov_admin_vf_stop(int pf_fd, unsigned int vf_num)
> }
>
> /**
> - * __xe_sriov_admin_restore_defaults - Restore scheduling defaults for a VF
> + * __xe_sriov_admin_restore_sched_defaults - Restore scheduling defaults for a VF
> * @pf_fd: PF device file descriptor.
> * @vf_num: VF index (0 for PF, >0 for VFs).
> *
> @@ -549,7 +549,7 @@ void xe_sriov_admin_vf_stop(int pf_fd, unsigned int vf_num)
> *
> * Returns: 0 on success or negative errno on error.
> */
> -int __xe_sriov_admin_restore_defaults(int pf_fd, unsigned int vf_num)
> +int __xe_sriov_admin_restore_sched_defaults(int pf_fd, unsigned int vf_num)
> {
> int ret_eq, ret_pt, ret_prio;
> int ret = 0;
> @@ -574,24 +574,24 @@ int __xe_sriov_admin_restore_defaults(int pf_fd, unsigned int vf_num)
> }
>
> /**
> - * xe_sriov_admin_restore_defaults - Assert wrapper restoring VF defaults
> + * xe_sriov_admin_restore_sched_defaults - Assert wrapper restoring VF defaults
> * @pf_fd: PF device file descriptor.
> * @vf_num: VF index (0 for PF, >0 for VFs).
> */
> -void xe_sriov_admin_restore_defaults(int pf_fd, unsigned int vf_num)
> +void xe_sriov_admin_restore_sched_defaults(int pf_fd, unsigned int vf_num)
> {
> - igt_assert_eq(0, __xe_sriov_admin_restore_defaults(pf_fd, vf_num));
> + igt_assert_eq(0, __xe_sriov_admin_restore_sched_defaults(pf_fd, vf_num));
> }
>
> /**
> - * __xe_sriov_admin_bulk_restore_defaults - Restore scheduling defaults for PF and all VFs
> + * __xe_sriov_admin_bulk_restore_sched_defaults - Restore scheduling defaults for PF and all VFs
> * @pf_fd: PF device file descriptor.
> *
> * Resets PF and all VFs to driver default scheduling parameters.
> *
> * Returns: 0 on success or negative errno on error.
> */
> -int __xe_sriov_admin_bulk_restore_defaults(int pf_fd)
> +int __xe_sriov_admin_bulk_restore_sched_defaults(int pf_fd)
> {
> int ret_eq, ret_pt, ret_prio;
> int ret = 0;
> @@ -616,16 +616,16 @@ int __xe_sriov_admin_bulk_restore_defaults(int pf_fd)
> }
>
> /**
> - * xe_sriov_admin_bulk_restore_defaults - Assert wrapper for restoring defaults on PF and all VFs
> + * xe_sriov_admin_bulk_restore_sched_defaults - Assert wrapper restoring defaults on PF and all VFs
> * @pf_fd: PF device file descriptor.
> */
> -void xe_sriov_admin_bulk_restore_defaults(int pf_fd)
> +void xe_sriov_admin_bulk_restore_sched_defaults(int pf_fd)
> {
> - igt_assert_eq(0, __xe_sriov_admin_bulk_restore_defaults(pf_fd));
> + igt_assert_eq(0, __xe_sriov_admin_bulk_restore_sched_defaults(pf_fd));
> }
>
> /**
> - * xe_sriov_admin_exit_cleanup_restore_defaults - Best-effort SR-IOV defaults restore callback
> + * xe_sriov_admin_exit_cleanup_restore_sched_defaults - Best-effort SR-IOV defaults restore callback
> * @pf_fd: PF device file descriptor
> * @sig: Exit signal number, or 0 on normal exit
> * @user_data: Unused
> @@ -634,7 +634,7 @@ void xe_sriov_admin_bulk_restore_defaults(int pf_fd)
> * XE SR-IOV scheduling defaults. Restores PF and VF scheduling attributes to
> * driver defaults. Failures are ignored so the callback remains best-effort.
> */
> -void xe_sriov_admin_exit_cleanup_restore_defaults(int pf_fd, int sig, void *user_data)
> +void xe_sriov_admin_exit_cleanup_restore_sched_defaults(int pf_fd, int sig, void *user_data)
> {
> (void)sig;
> (void)user_data;
> @@ -642,5 +642,5 @@ void xe_sriov_admin_exit_cleanup_restore_defaults(int pf_fd, int sig, void *user
> if (!xe_sriov_admin_is_present(pf_fd))
> return;
>
> - (void)__xe_sriov_admin_bulk_restore_defaults(pf_fd);
> + (void)__xe_sriov_admin_bulk_restore_sched_defaults(pf_fd);
> }
> diff --git a/lib/xe/xe_sriov_admin.h b/lib/xe/xe_sriov_admin.h
> index 3db13c2ac..4eb9c83a6 100644
> --- a/lib/xe/xe_sriov_admin.h
> +++ b/lib/xe/xe_sriov_admin.h
> @@ -52,11 +52,11 @@ void xe_sriov_admin_bulk_set_sched_priority(int pf_fd,
> int __xe_sriov_admin_vf_stop(int pf_fd, unsigned int vf_num);
> void xe_sriov_admin_vf_stop(int pf_fd, unsigned int vf_num);
>
> -int __xe_sriov_admin_restore_defaults(int pf_fd, unsigned int vf_num);
> -void xe_sriov_admin_restore_defaults(int pf_fd, unsigned int vf_num);
> -int __xe_sriov_admin_bulk_restore_defaults(int pf_fd);
> -void xe_sriov_admin_bulk_restore_defaults(int pf_fd);
> -void xe_sriov_admin_exit_cleanup_restore_defaults(int pf_fd, int sig,
> - void *user_data);
> +int __xe_sriov_admin_restore_sched_defaults(int pf_fd, unsigned int vf_num);
> +void xe_sriov_admin_restore_sched_defaults(int pf_fd, unsigned int vf_num);
> +int __xe_sriov_admin_bulk_restore_sched_defaults(int pf_fd);
> +void xe_sriov_admin_bulk_restore_sched_defaults(int pf_fd);
> +void xe_sriov_admin_exit_cleanup_restore_sched_defaults(int pf_fd, int sig,
> + void *user_data);
>
> #endif /* __XE_SRIOV_ADMIN_H__ */
> diff --git a/tests/intel/xe_pmu.c b/tests/intel/xe_pmu.c
> index f4c03faa2..2d1bc1f61 100644
> --- a/tests/intel/xe_pmu.c
> +++ b/tests/intel/xe_pmu.c
> @@ -991,7 +991,7 @@ static unsigned int enable_and_provision_vfs(int fd)
> igt_require(igt_sriov_get_enabled_vfs(fd) == 0);
> xe_sriov_require_default_scheduling_attributes(fd);
> igt_sriov_install_exit_handler(fd,
> - xe_sriov_admin_exit_cleanup_restore_defaults,
> + xe_sriov_admin_exit_cleanup_restore_sched_defaults,
> NULL);
> autoprobe = igt_sriov_is_driver_autoprobe_enabled(fd);
>
> @@ -1023,7 +1023,7 @@ static void unprovision_and_disable_vfs(int fd)
> {
> int ret;
>
> - ret = __xe_sriov_admin_bulk_restore_defaults(fd);
> + ret = __xe_sriov_admin_bulk_restore_sched_defaults(fd);
> xe_sriov_disable_vfs_restore_auto_provisioning(fd);
> /* abort to avoid execution of next tests with enabled VFs */
> igt_abort_on_f(igt_sriov_get_enabled_vfs(fd) > 0,
> diff --git a/tests/intel/xe_sriov_admin.c b/tests/intel/xe_sriov_admin.c
> index 8b400a01f..904c2ed7f 100644
> --- a/tests/intel/xe_sriov_admin.c
> +++ b/tests/intel/xe_sriov_admin.c
> @@ -347,7 +347,7 @@ int igt_main()
> igt_require(igt_sriov_get_enabled_vfs(pf_fd) == 0);
> igt_require(xe_sriov_admin_is_present(pf_fd));
> igt_sriov_install_exit_handler(pf_fd,
> - xe_sriov_admin_exit_cleanup_restore_defaults,
> + xe_sriov_admin_exit_cleanup_restore_sched_defaults,
> NULL);
> total_vfs = igt_sriov_get_total_vfs(pf_fd);
> }
> @@ -426,7 +426,7 @@ int igt_main()
> igt_fixture() {
> int ret;
>
> - ret = __xe_sriov_admin_bulk_restore_defaults(pf_fd);
> + ret = __xe_sriov_admin_bulk_restore_sched_defaults(pf_fd);
> igt_sriov_disable_vfs(pf_fd);
> /* abort to avoid execution of next tests with enabled VFs */
> igt_abort_on_f(igt_sriov_get_enabled_vfs(pf_fd) > 0,
> diff --git a/tests/intel/xe_sriov_scheduling.c b/tests/intel/xe_sriov_scheduling.c
> index a2240e473..5e4001219 100644
> --- a/tests/intel/xe_sriov_scheduling.c
> +++ b/tests/intel/xe_sriov_scheduling.c
> @@ -1470,7 +1470,7 @@ int igt_main_args("", long_opts, help_str, subm_opts_handler, NULL)
> igt_require(igt_sriov_get_enabled_vfs(pf_fd) == 0);
> igt_require(xe_sriov_admin_is_present(pf_fd));
> igt_sriov_install_exit_handler(pf_fd,
> - xe_sriov_admin_exit_cleanup_restore_defaults,
> + xe_sriov_admin_exit_cleanup_restore_sched_defaults,
> NULL);
> autoprobe = igt_sriov_is_driver_autoprobe_enabled(pf_fd);
> xe_sriov_require_default_scheduling_attributes(pf_fd);
next prev parent reply other threads:[~2026-08-18 14:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 12:39 [PATCH i-g-t 0/6] Order SR-IOV scheduling provisioning safely Marcin Bernatowicz
2026-08-18 12:39 ` [PATCH i-g-t 1/6] tests/intel/xe_sriov_scheduling: Disable VFs before resetting sched params Marcin Bernatowicz
2026-08-18 14:14 ` Laguna, Lukasz
2026-08-18 12:39 ` [PATCH i-g-t 2/6] lib/xe/xe_sriov_admin: Rename restore defaults helpers Marcin Bernatowicz
2026-08-18 14:14 ` Laguna, Lukasz [this message]
2026-08-18 12:39 ` [PATCH i-g-t 3/6] lib/xe/xe_sriov_admin: Lower priority before clearing timeslicing Marcin Bernatowicz
2026-08-18 14:15 ` Laguna, Lukasz
2026-08-18 12:39 ` [PATCH i-g-t 4/6] lib/xe/xe_sriov_admin: Add bulk scheduling params setter Marcin Bernatowicz
2026-08-18 14:15 ` Laguna, Lukasz
2026-08-18 12:39 ` [PATCH i-g-t 5/6] tests/intel/xe_sriov_scheduling: Use safe scheduling params helpers Marcin Bernatowicz
2026-08-18 14:15 ` Laguna, Lukasz
2026-08-18 12:39 ` [PATCH i-g-t 6/6] tests/intel/xe_pmu: Disable VFs before restoring sched params Marcin Bernatowicz
2026-08-18 14:16 ` Laguna, Lukasz
2026-08-18 14:11 ` ✓ Xe.CI.BAT: success for Order SR-IOV scheduling provisioning safely Patchwork
2026-08-18 14:20 ` ✓ i915.CI.BAT: " Patchwork
2026-08-18 16:39 ` ✓ Xe.CI.FULL: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27c3e2de-4dbd-41a0-bff2-8b05409a6a6e@intel.com \
--to=lukasz.laguna@intel.com \
--cc=adam.miszczak@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jakub1.kolakowski@intel.com \
--cc=marcin.bernatowicz@linux.intel.com \
--cc=michal.wajdeczko@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.