lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 04 Nov 2011 18:17:08 -0700
From:	Rick Jones <rick.jones2@...com>
To:	Stephen Hemminger <shemminger@...tta.com>
CC:	Ben Hutchings <bhutchings@...arflare.com>, netdev@...r.kernel.org,
	rusty@...tcorp.com.au, mst@...hat.com
Subject: Re: what's in a bus_info

On 11/04/2011 05:07 PM, Stephen Hemminger wrote:
> My view of bus_info, is that it is an informational string for administrators.
> Tools shouldn't depend on the value.  If a tool wants to find out about
> the physical device, then it should readlink the value of /sys/class/net/ethX/device

Just a quick look under device for the virtio_net interface shows it 
isn't quite as "complete" as a bare iron tg3 interface (as an example)

The bare iron tg3 example:
raj@...dy:~$ ls /sys/class/net/eth0/device
broken_parity_status      enable         net        resource0
class                     firmware_node  numa_node  subsystem
config                    irq            power      subsystem_device
consistent_dma_mask_bits  local_cpulist  remove     subsystem_vendor
device                    local_cpus     rescan     uevent
dma_mask_bits             modalias       reset      vendor
driver                    msi_bus        resource   vpd

The virtio_net interface:

raj@...-ubuntu-guest:~$ ls /sys/class/net/eth0/device
device  features  net    status     uevent
driver  modalias  power  subsystem  vendor


I have found that if I add a function to return a struct pci_dev * given 
a struct virtio_device, to virtio/virtio_pci.c and do a pci_name() 
against that, I do get a familiar looking bus address:

raj@...-ubuntu-guest:~$ ethtool -i eth0
driver: virtio_net
version: I am versionless
firmware-version: I have no firmware
bus-info: 0000:00:03.0

and it even matches the lspci output for the guest:

00:03.0 Ethernet controller: Red Hat, Inc Virtio network device

(still my "playing around" version, hence the silly strings in version 
and firmware-version)

I suppose the question becomes whether it is worthwhile to clean it up 
and submit.    I'm also thinking it would be goodness to start 
displaying some sort of version number, and if there is anything the 
driver might query to fill-in as a firmware-version - perhaps something 
about the version of the driver on the other side?

rick jones
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists