[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 6/10] Add support for netfront/netback acceleration drivers



This set of patches adds the support for acceleration plugins to the
netfront/netback drivers.  These plugins are intended to support
virtualisable network hardware that can be directly accessed from the
guest, bypassing dom0.

This is in response to the RFC we posted to xen-devel with an outline
of our approach at the end of September.

To follow will be another set of patches to provide our hardware
specific drivers and plugins.  The above set are all hardware-agnostic
and so of wider relevance.

Signed-off-by: kmansley@xxxxxxxxxxxxxx

The following describes each of the patches that are attached.  

xenbus_for_each
 - Two new functions to allow the frontend and backend buses to be
 enumerated, and a function applied to each device on those buses.

Add xenbus_for_each_[back,front]end functions to iterate each bus

diff -r 4d33a9ce5fb9 linux-2.6-xen-
sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Fri Dec 01
11:41:53 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Fri Dec 01
15:54:02 2006 +0000
@@ -4,6 +4,7 @@
  * Copyright (C) 2005 Rusty Russell, IBM Corporation
  * Copyright (C) 2005 Mike Wray, Hewlett-Packard
  * Copyright (C) 2005, 2006 XenSource Ltd
+ * Copyright (C) 2006 Solarflare Communications, Inc.
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version
2
@@ -1013,3 +1014,10 @@ static int __init boot_wait_for_devices(
 
 late_initcall(boot_wait_for_devices);
 #endif
+
+
+int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void
*))
+{
+        return bus_for_each_dev(&xenbus_frontend.bus, NULL, arg, fn);
+}
+EXPORT_SYMBOL_GPL(xenbus_for_each_frontend);
diff -r 4d33a9ce5fb9 linux-2.6-xen-
sparse/drivers/xen/xenbus/xenbus_probe_backend.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe_backend.c    Fri
Dec 01 11:41:53 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe_backend.c    Fri
Dec 01 15:56:51 2006 +0000
@@ -4,6 +4,7 @@
  * Copyright (C) 2005 Rusty Russell, IBM Corporation
  * Copyright (C) 2005 Mike Wray, Hewlett-Packard
  * Copyright (C) 2005, 2006 XenSource Ltd
+ * Copyright (C) 2006 Solarflare Communications, Inc.
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version
2
@@ -269,3 +270,10 @@ void xenbus_backend_device_register(void
 {
        device_register(&xenbus_backend.dev);
 }
+
+int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void
*))
+{
+        return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn);
+}
+EXPORT_SYMBOL_GPL(xenbus_for_each_backend);
+
diff -r 4d33a9ce5fb9 linux-2.6-xen-sparse/include/xen/xenbus.h
--- a/linux-2.6-xen-sparse/include/xen/xenbus.h Fri Dec 01 11:41:53 2006
+0000
+++ b/linux-2.6-xen-sparse/include/xen/xenbus.h Fri Dec 01 15:56:04 2006
+0000
@@ -304,4 +304,7 @@ int xenbus_dev_is_online(struct xenbus_d
 int xenbus_dev_is_online(struct xenbus_device *dev);
 int xenbus_frontend_closed(struct xenbus_device *dev);
 
+extern int xenbus_for_each_backend(void *arg, int (*fn)(struct device
*, void *));
+extern int xenbus_for_each_frontend(void *arg, int (*fn)(struct device
*, void *));
+
 #endif /* _XEN_XENBUS_H */



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.