From: "Laguna, Lukasz" <lukasz.laguna@intel.com>
To: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>,
<igt-dev@lists.freedesktop.org>
Cc: "Jakub Kolakowski" <jakub1.kolakowski@intel.com>,
"Piotr Piórkowski" <piotr.piorkowski@intel.com>
Subject: Re: [PATCH v3 i-g-t 5/7] tests/intel/xe_sriov_flr: Add --wait-flr-ms option
Date: Mon, 9 Feb 2026 11:18:10 +0100 [thread overview]
Message-ID: <2b629a68-df68-46bc-a036-2a6e540b5b6e@intel.com> (raw)
In-Reply-To: <20260204163217.121305-6-marcin.bernatowicz@linux.intel.com>
On 2/4/2026 17:32, Marcin Bernatowicz wrote:
> Make the post-FLR sleep configurable (default 200ms).
>
> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@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: Piotr Piórkowski <piotr.piorkowski@intel.com>
> ---
> tests/intel/xe_sriov_flr.c | 36 ++++++++++++++++++++++++++++++++++--
> 1 file changed, 34 insertions(+), 2 deletions(-)
>
> diff --git a/tests/intel/xe_sriov_flr.c b/tests/intel/xe_sriov_flr.c
> index 2f6b24cf0..951628159 100644
> --- a/tests/intel/xe_sriov_flr.c
> +++ b/tests/intel/xe_sriov_flr.c
> @@ -4,6 +4,7 @@
> */
>
> #include <fcntl.h>
> +#include <limits.h>
> #include <pthread.h>
> #include <sys/stat.h>
> #include "drmtest.h"
> @@ -61,6 +62,8 @@ static const char STOP_REASON_SKIP[] = "SKIP";
>
> #define DRIVER_OVERRIDE_TIMEOUT_MS 200
>
> +static int g_wait_flr_ms = 200;
> +
> static struct g_mmio {
> struct xe_mmio *mmio;
> unsigned int num_vfs;
> @@ -368,7 +371,7 @@ typedef int (*flr_exec_strategy)(int pf_fd, int num_vfs,
> static void verify_flr(int pf_fd, int num_vfs, struct subcheck *checks,
> int num_checks, flr_exec_strategy exec_strategy)
> {
> - const int wait_flr_ms = 200;
> + const int wait_flr_ms = g_wait_flr_ms;
> int i, vf_id, flr_vf_id = -1;
> bool xe_vfio_loaded;
> bool *vf_bound = NULL;
> @@ -1088,7 +1091,36 @@ static void clear_tests(int pf_fd, int num_vfs, flr_exec_strategy exec_strategy)
> verify_flr(pf_fd, num_vfs, checks, num_checks, exec_strategy);
> }
>
> -int igt_main()
> +static int opt_handler(int opt, int opt_index, void *data)
> +{
> + char *end = NULL;
> + long val;
> +
> + switch (opt) {
> + case 'w':
> + errno = 0;
> + val = strtol(optarg, &end, 0);
> + if (errno || !end || *end != '\0' || val < 0 || val > INT_MAX)
> + return IGT_OPT_HANDLER_ERROR;
> + g_wait_flr_ms = (int)val;
> + igt_info("Using wait_flr_ms=%d\n", g_wait_flr_ms);
> + break;
> + default:
> + return IGT_OPT_HANDLER_ERROR;
> + }
> +
> + return IGT_OPT_HANDLER_SUCCESS;
> +}
> +
> +static const struct option long_options[] = {
> + { .name = "wait-flr-ms", .has_arg = true, .val = 'w', },
> + {},
> +};
> +
> +static const char help_str[] =
> + " --wait-flr-ms=MS\tSleep MS milliseconds after VF reset sysfs write (default: 200)\n";
> +
> +int igt_main_args("w:", long_options, help_str, opt_handler, NULL)
> {
> int pf_fd;
> bool autoprobe;
next prev parent reply other threads:[~2026-02-09 10:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 16:32 [PATCH v3 i-g-t 0/7] PCI driver helpers and xe-vfio-pci FLR improvement Marcin Bernatowicz
2026-02-04 16:32 ` [PATCH v3 i-g-t 1/7] lib/igt_sriov_device: Add helper to get VF PCI slot address Marcin Bernatowicz
2026-02-04 16:32 ` [PATCH v3 i-g-t 2/7] lib/igt_pci: Add generic PCI driver override and bind/unbind helpers Marcin Bernatowicz
2026-02-09 10:16 ` Laguna, Lukasz
2026-02-10 10:19 ` Bernatowicz, Marcin
2026-02-11 6:39 ` Laguna, Lukasz
2026-02-11 11:21 ` Bernatowicz, Marcin
2026-02-04 16:32 ` [PATCH v3 i-g-t 3/7] tests/intel/xe_sriov_flr: Attach VFs to xe-vfio-pci before initiating FLR Marcin Bernatowicz
2026-02-09 10:17 ` Laguna, Lukasz
2026-02-04 16:32 ` [PATCH v3 i-g-t 4/7] lib/igt_kmod: Fix PCI bind/unbind for module/driver name mismatch Marcin Bernatowicz
2026-02-04 16:32 ` [PATCH v3 i-g-t 5/7] tests/intel/xe_sriov_flr: Add --wait-flr-ms option Marcin Bernatowicz
2026-02-09 10:18 ` Laguna, Lukasz [this message]
2026-02-04 16:32 ` [PATCH v3 i-g-t 6/7] tests/intel/xe_sriov_flr: Add --no-xe-vfio-pci option Marcin Bernatowicz
2026-02-09 10:18 ` Laguna, Lukasz
2026-02-04 16:32 ` [PATCH v3 i-g-t 7/7] tests/intel/xe_sriov_flr: Skip xe-vfio-pci load/bind when IOMMU is off Marcin Bernatowicz
2026-02-09 10:42 ` Laguna, Lukasz
2026-02-10 11:23 ` Bernatowicz, Marcin
2026-02-11 6:43 ` Laguna, Lukasz
2026-02-04 18:27 ` ✓ Xe.CI.BAT: success for PCI driver helpers and xe-vfio-pci FLR improvement (rev3) Patchwork
2026-02-04 18:41 ` ✓ i915.CI.BAT: " Patchwork
2026-02-05 5:02 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-05 10:13 ` Bernatowicz, Marcin
2026-02-05 8:13 ` ✓ i915.CI.Full: success " 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=2b629a68-df68-46bc-a036-2a6e540b5b6e@intel.com \
--to=lukasz.laguna@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jakub1.kolakowski@intel.com \
--cc=marcin.bernatowicz@linux.intel.com \
--cc=piotr.piorkowski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox