* [GIT/PATCH 0/2] Minor fixes to xen-netfront
@ 2010-08-19 9:27 Ian Campbell
2010-08-19 9:27 ` [PATCH 1/2] xen: use less generic names in netfront driver Ian Campbell
2010-08-19 9:27 ` [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook Ian Campbell
0 siblings, 2 replies; 6+ messages in thread
From: Ian Campbell @ 2010-08-19 9:27 UTC (permalink / raw)
To: netdev, xen-devel; +Cc: Jeremy Fitzhardinge, David S. Miller
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] xen: use less generic names in netfront driver.
2010-08-19 9:27 [GIT/PATCH 0/2] Minor fixes to xen-netfront Ian Campbell
@ 2010-08-19 9:27 ` Ian Campbell
2010-08-23 4:44 ` David Miller
2010-08-19 9:27 ` [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook Ian Campbell
1 sibling, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2010-08-19 9:27 UTC (permalink / raw)
To: netdev, xen-devel
Cc: Jeremy Fitzhardinge, David S. Miller, Ian Campbell,
Jeremy Fitzhardinge
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook.
2010-08-19 9:27 [GIT/PATCH 0/2] Minor fixes to xen-netfront Ian Campbell
2010-08-19 9:27 ` [PATCH 1/2] xen: use less generic names in netfront driver Ian Campbell
@ 2010-08-19 9:27 ` Ian Campbell
2010-08-20 0:51 ` Ben Hutchings
1 sibling, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2010-08-19 9:27 UTC (permalink / raw)
To: netdev, xen-devel; +Cc: Jeremy Fitzhardinge, David S. Miller, Ian Campbell
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook.
2010-08-19 9:27 ` [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook Ian Campbell
@ 2010-08-20 0:51 ` Ben Hutchings
2010-08-20 7:07 ` Ian Campbell
0 siblings, 1 reply; 6+ messages in thread
From: Ben Hutchings @ 2010-08-20 0:51 UTC (permalink / raw)
To: Ian Campbell; +Cc: netdev, xen-devel, Jeremy Fitzhardinge, David S. Miller
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook.
2010-08-20 0:51 ` Ben Hutchings
@ 2010-08-20 7:07 ` Ian Campbell
0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2010-08-20 7:07 UTC (permalink / raw)
To: Ben Hutchings
Cc: netdev@vger.kernel.org, xen-devel@lists.xensource.com,
Jeremy Fitzhardinge, David S. Miller
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 01414802054c382072b6cb9a1bdc6e243c74b2d5
Excellent, 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.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] xen: use less generic names in netfront driver.
2010-08-19 9:27 ` [PATCH 1/2] xen: use less generic names in netfront driver Ian Campbell
@ 2010-08-23 4:44 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-08-23 4:44 UTC (permalink / raw)
To: ian.campbell; +Cc: netdev, jeremy, xen-devel, jeremy.fitzhardinge
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-08-23 4:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-19 9:27 [GIT/PATCH 0/2] Minor fixes to xen-netfront Ian Campbell
2010-08-19 9:27 ` [PATCH 1/2] xen: use less generic names in netfront driver Ian Campbell
2010-08-23 4:44 ` David Miller
2010-08-19 9:27 ` [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook Ian Campbell
2010-08-20 0:51 ` Ben Hutchings
2010-08-20 7:07 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).