[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100804.215424.200345652.davem@davemloft.net>
Date: Wed, 04 Aug 2010 21:54:24 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: bhutchings@...arflare.com
Cc: rusty@...tcorp.com.au, netdev@...r.kernel.org, mst@...hat.com,
izumi.taku@...fujitsu.com
Subject: Re: [PATCH] virtio_net: implements ethtool_ops.get_drvinfo
From: Ben Hutchings <bhutchings@...arflare.com>
Date: Thu, 05 Aug 2010 04:47:21 +0100
> On Thu, 2010-08-05 at 13:02 +0930, Rusty Russell wrote:
>> I often use "ethtool -i" command to check what driver controls the
>> ehternet device. But because current virtio_net driver doesn't
>> support "ethtool -i", it becomes the following:
>>
>> # ethtool -i eth3
>> Cannot get driver information: Operation not supported
>>
>> This patch simply adds the "ethtool -i" support. The following is the
>> result when using the virtio_net driver with my patch applied to.
>>
>> # ethtool -i eth3
>> driver: virtio_net
>> version: N/A
>> firmware-version: N/A
>> bus-info: virtio0
>>
>> Personally, "-i" is one of the most frequently-used option, and most
>> network drivers support "ethtool -i", so I think virtio_net also
>> should do.
> [...]
>
> This information is already available generically through sysfs:
> basename $(readlink /sys/class/net/eth3/device)
> basename $(readlink /sys/class/net/eth3/device/driver)
>
> Given that, we should either recommend that people use that method
> instead, or we should add an equivalent default implementation of the
> get_drvinfo operation.
We've had ethtool for nearly a decade, it's a standard facility and
it's only wise to have all drivers implement as much of the API as
possible.
As such I've applied Rusty's patch and I will apply any patch which
makes a driver more fully provide support for all ethtool facilities.
--
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