Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/xen Introduce "vifname" keys for Xen domains. I...
details: https://anonhg.NetBSD.org/src/rev/0d63dbcc2bf7
branches: trunk
changeset: 760721:0d63dbcc2bf7
user: jym <jym%NetBSD.org@localhost>
date: Tue Jan 11 23:22:19 2011 +0000
description:
Introduce "vifname" keys for Xen domains. Its value is the interface
name for the vif, e.g. xvif(4) for dom0, and xennet(4) for domU.
ok bouyer@.
See http://mail-index.netbsd.org/port-xen/2011/01/11/msg006405.html
diffstat:
sys/arch/xen/xen/if_xennet_xenbus.c | 10 ++++++++--
sys/arch/xen/xen/xennetback_xenbus.c | 9 ++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
diffs (54 lines):
diff -r a6437dad5176 -r 0d63dbcc2bf7 sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c Tue Jan 11 21:10:17 2011 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c Tue Jan 11 23:22:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_xennet_xenbus.c,v 1.45 2010/10/17 17:10:44 jym Exp $ */
+/* $NetBSD: if_xennet_xenbus.c,v 1.46 2011/01/11 23:22:19 jym Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -85,7 +85,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.45 2010/10/17 17:10:44 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.46 2011/01/11 23:22:19 jym Exp $");
#include "opt_xen.h"
#include "opt_nfs_boot.h"
@@ -490,6 +490,12 @@
if (xbt == NULL)
return ENOMEM;
error = xenbus_printf(xbt, sc->sc_xbusd->xbusd_path,
+ "vifname", device_xname(sc->sc_dev));
+ if (error) {
+ errmsg = "vifname";
+ goto abort_transaction;
+ }
+ error = xenbus_printf(xbt, sc->sc_xbusd->xbusd_path,
"tx-ring-ref","%u", sc->sc_tx_ring_gntref);
if (error) {
errmsg = "writing tx ring-ref";
diff -r a6437dad5176 -r 0d63dbcc2bf7 sys/arch/xen/xen/xennetback_xenbus.c
--- a/sys/arch/xen/xen/xennetback_xenbus.c Tue Jan 11 21:10:17 2011 +0000
+++ b/sys/arch/xen/xen/xennetback_xenbus.c Tue Jan 11 23:22:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xennetback_xenbus.c,v 1.36 2011/01/11 01:21:32 jym Exp $ */
+/* $NetBSD: xennetback_xenbus.c,v 1.37 2011/01/11 23:22:19 jym Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -324,6 +324,13 @@
goto fail;
}
err = xenbus_printf(xbt, xbusd->xbusd_path,
+ "vifname", ifp->if_xname);
+ if (err) {
+ printf("xbdback: failed to write %s/vifname: "
+ "%d\n", xbusd->xbusd_path, err);
+ goto abort_xbt;
+ }
+ err = xenbus_printf(xbt, xbusd->xbusd_path,
"feature-rx-copy", "%d", 1);
if (err) {
printf("xbdback: failed to write %s/feature-rx-copy: "
Home |
Main Index |
Thread Index |
Old Index