From: David Matlack <dmatlack@google.com>
To: Josh Hilke <jrhilke@google.com>
Cc: Alex Williamson <alex@shazbot.org>,
Vipin Sharma <vipinsh@google.com>, Shuah Khan <shuah@kernel.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 10/10] selftests/vfio: igb: Use offical IGB headers in selftest driver
Date: Mon, 6 Jul 2026 20:49:32 +0000 [thread overview]
Message-ID: <akwU3DIBQlPCXFmQ@google.com> (raw)
In-Reply-To: <20260526235417.2058313-11-jrhilke@google.com>
On 2026-05-26 11:54 PM, Josh Hilke wrote:
> Include the offical Intel network driver header files in
> tools/testing/selftests/vfio/lib/drivers/igb/igb.c and refactor the
> driver to directly utilize standard E1000_ prefixed registers and macros
> found from those headers.
>
> Delete tools/testing/selftests/vfio/lib/drivers/igb/registers.h as it
> only contains duplicate code found in the offical IGB header files.
>
> Assisted-by: Gemini:gemini-3.1-pro-preview
> Suggested-by: David Matlack <dmatlack@google.com>
> Signed-off-by: Josh Hilke <jrhilke@google.com>
>
> # Conflicts:
> # tools/testing/selftests/vfio/lib/drivers/igb/igb.c
This should not be in the commit message.
> ---
> .../selftests/vfio/lib/drivers/igb/igb.c | 159 +++++++++---------
> .../vfio/lib/drivers/igb/registers.h | 127 --------------
> tools/testing/selftests/vfio/lib/libvfio.mk | 1 +
> 3 files changed, 83 insertions(+), 204 deletions(-)
> delete mode 100644 tools/testing/selftests/vfio/lib/drivers/igb/registers.h
Please fold this into the first commit to avoid adding registers.h only
to then remove it a few patches later.
> -#endif /* _IGB_REGISTERS_H_ */
> diff --git a/tools/testing/selftests/vfio/lib/libvfio.mk b/tools/testing/selftests/vfio/lib/libvfio.mk
> index 1f13cca04348..0075749e2f12 100644
> --- a/tools/testing/selftests/vfio/lib/libvfio.mk
> +++ b/tools/testing/selftests/vfio/lib/libvfio.mk
> @@ -23,6 +23,7 @@ LIBVFIO_O_DIRS := $(shell dirname $(LIBVFIO_O) | uniq)
> $(shell mkdir -p $(LIBVFIO_O_DIRS))
>
> CFLAGS += -I$(LIBVFIO_SRCDIR)/include
> +CFLAGS += -I$(top_srcdir)/drivers/net/ethernet/intel/igb
Please create symlinks to the specific header files you need to include
rather than exposing this entire directory to the VFIO selftests default
include paths.
e.g. Take a look how how the DSA driver does it:
$ ls -l tools/testing/selftests/vfio/lib/drivers/dsa
total 12
-rw-r----- 1 dmatlack primarygroup 11648 Jun 11 21:18 dsa.c
lrwxrwxrwx 1 dmatlack primarygroup 49 Oct 6 2025 registers.h -> ../../../../../../../drivers/dma/idxd/registers.h
$ head -20 tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c
[...]
#include "registers.h"
[...]
>
> $(LIBVFIO_O): $(LIBVFIO_OUTPUT)/%.o : $(LIBVFIO_SRCDIR)/%.c
> $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
> --
> 2.54.0.794.g4f17f83d09-goog
>
next prev parent reply other threads:[~2026-07-06 20:49 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 23:54 [PATCH v2 00/10] selftests/vfio: igb: Add driver for Intel Josh Hilke
2026-05-26 23:54 ` [PATCH v2 01/10] selftests/vfio: igb: Add driver for IGB QEMU device Josh Hilke
2026-05-27 0:32 ` sashiko-bot
2026-07-06 20:30 ` David Matlack
2026-05-26 23:54 ` [PATCH v2 02/10] selftests/vfio: igb: Use PHY internal loopback on 82576 Josh Hilke
2026-05-26 23:54 ` [PATCH v2 03/10] selftests/vfio: igb: Use advanced TX and RX descriptors Josh Hilke
2026-05-27 0:14 ` sashiko-bot
2026-05-29 20:24 ` Alex Williamson
2026-05-26 23:54 ` [PATCH v2 04/10] selftests/vfio: igb: Program MSI-X interrupt routing Josh Hilke
2026-05-27 0:19 ` sashiko-bot
2026-05-29 20:24 ` Alex Williamson
2026-05-26 23:54 ` [PATCH v2 05/10] selftests/vfio: igb: Extend memcpy completion timeout for line-rate hardware Josh Hilke
2026-05-26 23:54 ` [PATCH v2 06/10] selftests/vfio: igb: Disable PCIe completion timeout retries Josh Hilke
2026-05-26 23:54 ` [PATCH v2 07/10] selftests/vfio: Add vfio_pci_irq_reenable() helper Josh Hilke
2026-07-06 21:03 ` David Matlack
2026-05-26 23:54 ` [PATCH v2 08/10] selftests/vfio: igb: Factor hardware programming into igb_hw_init() Josh Hilke
2026-07-06 21:16 ` David Matlack
2026-05-26 23:54 ` [PATCH v2 09/10] selftests/vfio: igb: Recover after DMA-read faults Josh Hilke
2026-07-06 21:16 ` David Matlack
2026-05-26 23:54 ` [PATCH v2 10/10] selftests/vfio: igb: Use offical IGB headers in selftest driver Josh Hilke
2026-05-27 2:40 ` sashiko-bot
2026-07-06 20:49 ` David Matlack [this message]
2026-07-06 20:55 ` [PATCH v2 00/10] selftests/vfio: igb: Add driver for Intel David Matlack
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=akwU3DIBQlPCXFmQ@google.com \
--to=dmatlack@google.com \
--cc=alex@shazbot.org \
--cc=jrhilke@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=vipinsh@google.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.