Ian Campbell
2010-Aug-19 09:27 UTC
[Xen-devel] [GIT/PATCH 0/2] Minor fixes to xen-netfront
I think these are likely for 2.6.37 but if possible the ethtool one would be nice to have for 2.6.36 since 2.6.36 adds PVHVM support for Xen (paravirtual drivers for fully-virtualised guests) so it is useful to be able to see explicitly if eth0 is emulated or PV without having to infer xen-netfront from: # ethtool -i eth0 Cannot get driver information: Operation not supported The following changes since commit da5cabf80e2433131bf0ed8993abc0f7ea618c73: Linus Torvalds (1): Linux 2.6.36-rc1 are available in the git repository at: git://xenbits.xensource.com/people/ianc/linux-2.6.git for-netdev/xen-netfront Ian Campbell (2): xen: use less generic names in netfront driver. xen: netfront: support the ethtool drvinfo hook. drivers/net/xen-netfront.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2010-Aug-19 09:27 UTC
[Xen-devel] [PATCH 1/2] xen: use less generic names in netfront driver.
All Xen frontend drivers have a couple of identically named functions which makes figuring out which device went wrong from a stacktrace harder than it needs to be. Rename them to something specificto the device type. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> --- drivers/net/xen-netfront.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index b50fedc..788a9bc 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1395,7 +1395,7 @@ static int setup_netfront(struct xenbus_device *dev, struct netfront_info *info) } /* Common code used when first setting up, and when resuming. */ -static int talk_to_backend(struct xenbus_device *dev, +static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) { const char *message; @@ -1545,7 +1545,7 @@ static int xennet_connect(struct net_device *dev) return -ENODEV; } - err = talk_to_backend(np->xbdev, np); + err = talk_to_netback(np->xbdev, np); if (err) return err; @@ -1599,7 +1599,7 @@ static int xennet_connect(struct net_device *dev) /** * Callback received when the backend''s state changes. */ -static void backend_changed(struct xenbus_device *dev, +static void netback_changed(struct xenbus_device *dev, enum xenbus_state backend_state) { struct netfront_info *np = dev_get_drvdata(&dev->dev); @@ -1801,7 +1801,7 @@ static struct xenbus_driver netfront_driver = { .probe = netfront_probe, .remove = __devexit_p(xennet_remove), .resume = netfront_resume, - .otherend_changed = backend_changed, + .otherend_changed = netback_changed, }; static int __init netif_init(void) -- 1.5.6.5 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2010-Aug-19 09:27 UTC
[Xen-devel] [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook.
Causes "ethtool -i" to report something useful: # ethtool -i eth0 driver: xen-netfront version: firmware-version: bus-info: vif-0 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> --- drivers/net/xen-netfront.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 788a9bc..4484929 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1630,8 +1630,17 @@ static void netback_changed(struct xenbus_device *dev, } } +static void xennet_get_drvinfo(struct net_device *dev, + struct ethtool_drvinfo *info) +{ + strcpy(info->driver, "xen-netfront"); + strcpy(info->bus_info, dev_name(dev->dev.parent)); +} + static const struct ethtool_ops xennet_ethtool_ops { + .get_drvinfo = xennet_get_drvinfo, + .set_tx_csum = ethtool_op_set_tx_csum, .set_sg = xennet_set_sg, .set_tso = xennet_set_tso, -- 1.5.6.5 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ben Hutchings
2010-Aug-20 00:51 UTC
[Xen-devel] Re: [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook.
On Thu, 2010-08-19 at 10:27 +0100, Ian Campbell wrote:> Causes "ethtool -i" to report something useful: > # ethtool -i eth0 > driver: xen-netfront > version: > firmware-version: > bus-info: vif-0[...] This should already be covered by: commit 01414802054c382072b6cb9a1bdc6e243c74b2d5 Author: Ben Hutchings <bhutchings@solarflare.com> Date: Tue Aug 17 02:31:15 2010 -0700 ethtool: Provide a default implementation of ethtool_ops::get_drvinfo Ben. -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that''s the marketing department''s job. They asked us to note that Solarflare product names are trademarked. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2010-Aug-20 07:07 UTC
[Xen-devel] Re: [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook.
On Fri, 2010-08-20 at 01:51 +0100, Ben Hutchings wrote:> On Thu, 2010-08-19 at 10:27 +0100, Ian Campbell wrote: > > Causes "ethtool -i" to report something useful: > > # ethtool -i eth0 > > driver: xen-netfront > > version: > > firmware-version: > > bus-info: vif-0 > [...] > > This should already be covered by: > > commit 01414802054c382072b6cb9a1bdc6e243c74b2d5Excellent, thanks!> Author: Ben Hutchings <bhutchings@solarflare.com> > Date: Tue Aug 17 02:31:15 2010 -0700 > > ethtool: Provide a default implementation of ethtool_ops::get_drvinfo > > Ben. >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
David Miller
2010-Aug-23 04:44 UTC
[Xen-devel] Re: [PATCH 1/2] xen: use less generic names in netfront driver.
From: Ian Campbell <ian.campbell@citrix.com> Date: Thu, 19 Aug 2010 10:27:49 +0100> All Xen frontend drivers have a couple of identically named functions which > makes figuring out which device went wrong from a stacktrace harder than it > needs to be. Rename them to something specificto the device type. > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>Applied. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel