All of lore.kernel.org
 help / color / mirror / Atom feed
From: Isaac Boukris <iboukris@gmail.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbox@nvidia.com>
Cc: dev@dpdk.org, David Marchand <david.marchand@redhat.com>,
	Aman Singh <aman.deep.singh@intel.com>,
	Luca Vizzarro <luca.vizzarro@arm.com>,
	Patrick Robb <patrickrobb1997@gmail.com>,
	Isaac Boukris <iboukris@gmail.com>
Subject: [PATCH v2 4/5] dts: support virtio PCI ports
Date: Wed, 18 Nov 2026 00:00:00 +0200	[thread overview]
Message-ID: <20261117220001.965310-5-iboukris@gmail.com> (raw)
In-Reply-To: <20261117220001.965310-1-iboukris@gmail.com>

DTS reads the logical name and the MAC address of a port from the
lshw entry of its PCI device. A virtio device has none there, because
lshw lists its network interface as a device of its own, on the virtio
bus, right after the PCI device. The test run setup then fails:

  Could not gather a valid MAC address and/or logical name for port
  port-0 in node SUT 1.

Copy to the entry of the PCI device what it lacks from the entry of
its interface.

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
---
 dts/framework/testbed_model/linux_session.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py
index 786e8c4eb4..40cc87adaf 100644
--- a/dts/framework/testbed_model/linux_session.py
+++ b/dts/framework/testbed_model/linux_session.py
@@ -438,7 +438,14 @@ def get_pci_addr_of_vfs(self, pf_port: Port) -> list[str]:
     @cached_property
     def _lshw_net_info(self) -> list[LshwOutput]:
         output = self.send_command("lshw -quiet -json -C network", verify=True)
-        return json.loads(output.stdout)
+        ports = json.loads(output.stdout)
+        # The network interface of a virtio device is an entry of its own, on the virtio bus,
+        # right after the entry of the PCI device. Copy from it what the PCI entry lacks.
+        for device, interface in zip(ports, ports[1:]):
+            if "logicalname" not in device and interface.get("businfo", "").startswith("virtio@"):
+                configuration = interface.get("configuration", {}) | device.get("configuration", {})
+                device.update(interface | device | {"configuration": configuration})
+        return ports
 
     def refresh_lshw(self) -> None:
         """Force refresh of cached lshw network info."""
-- 
2.56.1


  parent reply	other threads:[~2026-11-17 22:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 12:43 [PATCH 0/1] net/virtio: fix Rx interrupts with MSI-X Isaac Boukris
2026-11-17 12:43 ` [PATCH 1/1] net/virtio: fix Rx interrupt setup " Isaac Boukris
2026-11-17 14:29   ` David Marchand
2026-11-17 19:51     ` Isaac Boukris
2026-11-17 21:59 ` [PATCH v2 0/5] net/virtio: fix Rx interrupts " Isaac Boukris
2026-11-17 21:59   ` [PATCH v2 1/5] net/virtio: fix Rx interrupt setup " Isaac Boukris
2026-11-17 21:59   ` [PATCH v2 2/5] test/virtio_user: add unit test of Rx interrupts Isaac Boukris
2026-11-17 21:59   ` [PATCH v2 3/5] app/testpmd: add Rx queue interrupts option Isaac Boukris
2026-11-17 22:00   ` Isaac Boukris [this message]
2026-11-17 22:00   ` [PATCH v2 5/5] dts: add Rx interrupt test suite Isaac Boukris
2026-11-18  0:19 ` [PATCH v3 0/7] net/virtio: fix Rx interrupts with MSI-X Isaac Boukris
2026-11-18  0:19   ` [PATCH v3 1/7] net/virtio: fix Rx interrupt setup " Isaac Boukris
2026-11-18  0:19   ` [PATCH v3 2/7] net/virtio-user: fix packet loss with unused queue pairs Isaac Boukris
2026-11-18  0:19   ` [PATCH v3 3/7] test/virtio_user: add unit test of " Isaac Boukris
2026-11-18  0:19   ` [PATCH v3 4/7] test/virtio_user: add unit test of Rx interrupts Isaac Boukris
2026-11-18  0:19   ` [PATCH v3 5/7] app/testpmd: add Rx queue interrupts option Isaac Boukris
2026-11-18  0:19   ` [PATCH v3 6/7] dts: support virtio PCI ports Isaac Boukris
2026-11-18  0:19   ` [PATCH v3 7/7] dts: add Rx interrupt test suite Isaac Boukris

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=20261117220001.965310-5-iboukris@gmail.com \
    --to=iboukris@gmail.com \
    --cc=aman.deep.singh@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=luca.vizzarro@arm.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=patrickrobb1997@gmail.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.