Netfront driver can be also useful in dom0, eg when all NICs are assigned to some domU (aka driver domain). Then using netback in domU and netfront in dom0 is the only way to get network access in dom0. Signed-off-by: Marek Marczykowski <marmarek at invisiblethingslab.com> --- drivers/net/xen-netfront.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 698b905..e31ebff 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1953,9 +1953,6 @@ static int __init netif_init(void) if (!xen_domain()) return -ENODEV; - if (xen_initial_domain()) - return 0; - printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); return xenbus_register_frontend(&netfront_driver); @@ -1965,9 +1962,6 @@ module_init(netif_init); static void __exit netif_exit(void) { - if (xen_initial_domain()) - return; - xenbus_unregister_driver(&netfront_driver); } module_exit(netif_exit); -- 1.7.4.4
Netfront driver can be also useful in dom0, eg when all NICs are assigned to some domU (aka driver domain). Then using netback in domU and netfront in dom0 is the only way to get network access in dom0. Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> --- drivers/net/xen-netfront.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 698b905..e5a161a 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1953,9 +1953,6 @@ static int __init netif_init(void) if (!xen_domain()) return -ENODEV; - if (xen_initial_domain()) - return 0; - printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); return xenbus_register_frontend(&netfront_driver); -- 1.7.4.4
Konrad Rzeszutek Wilk
2012-May-21 14:18 UTC
Re: [PATCH] xen: do not disable netfront in dom0
On Sun, May 20, 2012 at 01:45:10PM +0200, Marek Marczykowski wrote:> Netfront driver can be also useful in dom0, eg when all NICs are assigned to > some domU (aka driver domain). Then using netback in domU and netfront in dom0 > is the only way to get network access in dom0. > > Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>Pls CC the network maintainer (and its list) and LKML. Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>> --- > drivers/net/xen-netfront.c | 3 --- > 1 files changed, 0 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > index 698b905..e5a161a 100644 > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -1953,9 +1953,6 @@ static int __init netif_init(void) > if (!xen_domain()) > return -ENODEV; > > - if (xen_initial_domain()) > - return 0; > - > printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); > > return xenbus_register_frontend(&netfront_driver); > -- > 1.7.4.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
On Sun, 20 May 2012, Marek Marczykowski wrote:> Netfront driver can be also useful in dom0, eg when all NICs are assigned to > some domU (aka driver domain). Then using netback in domU and netfront in dom0 > is the only way to get network access in dom0. > > Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> > --- > drivers/net/xen-netfront.c | 3 --- > 1 files changed, 0 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > index 698b905..e5a161a 100644 > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -1953,9 +1953,6 @@ static int __init netif_init(void) > if (!xen_domain()) > return -ENODEV; > > - if (xen_initial_domain()) > - return 0; > - > printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); > > return xenbus_register_frontend(&netfront_driver);you need something similar in netif_exit too
On Mon, 2012-05-21 at 16:58 +0100, Stefano Stabellini wrote:> On Sun, 20 May 2012, Marek Marczykowski wrote: > > Netfront driver can be also useful in dom0, eg when all NICs are assigned to > > some domU (aka driver domain). Then using netback in domU and netfront in dom0 > > is the only way to get network access in dom0. > > > > Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> > > --- > > drivers/net/xen-netfront.c | 3 --- > > 1 files changed, 0 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > > index 698b905..e5a161a 100644 > > --- a/drivers/net/xen-netfront.c > > +++ b/drivers/net/xen-netfront.c > > @@ -1953,9 +1953,6 @@ static int __init netif_init(void) > > if (!xen_domain()) > > return -ENODEV; > > > > - if (xen_initial_domain()) > > - return 0; > > - > > printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); > > > > return xenbus_register_frontend(&netfront_driver); > > you need something similar in netif_exit tooDo we need this in other *foo*front as well? e.g. block? Ian.
On Mon, 21 May 2012, Ian Campbell wrote:> On Mon, 2012-05-21 at 16:58 +0100, Stefano Stabellini wrote: > > On Sun, 20 May 2012, Marek Marczykowski wrote: > > > Netfront driver can be also useful in dom0, eg when all NICs are assigned to > > > some domU (aka driver domain). Then using netback in domU and netfront in dom0 > > > is the only way to get network access in dom0. > > > > > > Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> > > > --- > > > drivers/net/xen-netfront.c | 3 --- > > > 1 files changed, 0 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > > > index 698b905..e5a161a 100644 > > > --- a/drivers/net/xen-netfront.c > > > +++ b/drivers/net/xen-netfront.c > > > @@ -1953,9 +1953,6 @@ static int __init netif_init(void) > > > if (!xen_domain()) > > > return -ENODEV; > > > > > > - if (xen_initial_domain()) > > > - return 0; > > > - > > > printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); > > > > > > return xenbus_register_frontend(&netfront_driver); > > > > you need something similar in netif_exit too > > Do we need this in other *foo*front as well? e.g. block?nope, xen-blkfront doesn''t have any xen_initial_domain checks. The other frontends with xen_initial_domain checks are: drivers/input/misc/xen-kbdfront.c drivers/video/xen-fbfront.c drivers/pci/xen-pcifront.c While it makes sense to keep xen-pcifront dom0 only for the moment, it might be useful to remove the xen_initial_domain checks from xen-fbfront and xen-kbdfront.
Konrad Rzeszutek Wilk
2012-May-22 18:34 UTC
Re: [PATCH] xen: do not disable netfront in dom0
On Sun, May 20, 2012 at 01:45:10PM +0200, Marek Marczykowski wrote:> Netfront driver can be also useful in dom0, eg when all NICs are assigned to > some domU (aka driver domain). Then using netback in domU and netfront in dom0 > is the only way to get network access in dom0. > > Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>> --- > drivers/net/xen-netfront.c | 6 ------ > 1 files changed, 0 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > index 698b905..e31ebff 100644 > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -1953,9 +1953,6 @@ static int __init netif_init(void) > if (!xen_domain()) > return -ENODEV; > > - if (xen_initial_domain()) > - return 0; > - > printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); > > return xenbus_register_frontend(&netfront_driver); > @@ -1965,9 +1962,6 @@ module_init(netif_init); > > static void __exit netif_exit(void) > { > - if (xen_initial_domain()) > - return; > - > xenbus_unregister_driver(&netfront_driver); > } > module_exit(netif_exit); > -- > 1.7.4.4
On Sun, May 20, 2012 at 01:45:10PM +0200, Marek Marczykowski wrote:> Netfront driver can be also useful in dom0, eg when all NICs are assigned to > some domU (aka driver domain). Then using netback in domU and netfront in dom0 > is the only way to get network access in dom0. > > Signed-off-by: Marek Marczykowski <marmarek at invisiblethingslab.com>Acked-by: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com>> --- > drivers/net/xen-netfront.c | 6 ------ > 1 files changed, 0 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > index 698b905..e31ebff 100644 > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -1953,9 +1953,6 @@ static int __init netif_init(void) > if (!xen_domain()) > return -ENODEV; > > - if (xen_initial_domain()) > - return 0; > - > printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); > > return xenbus_register_frontend(&netfront_driver); > @@ -1965,9 +1962,6 @@ module_init(netif_init); > > static void __exit netif_exit(void) > { > - if (xen_initial_domain()) > - return; > - > xenbus_unregister_driver(&netfront_driver); > } > module_exit(netif_exit); > -- > 1.7.4.4
From: Marek Marczykowski <marmarek@invisiblethingslab.com> Date: Sun, 20 May 2012 13:45:10 +0200> Netfront driver can be also useful in dom0, eg when all NICs are assigned to > some domU (aka driver domain). Then using netback in domU and netfront in dom0 > is the only way to get network access in dom0. > > Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>Someone please review this and I can merge it in via the ''net'' tree if it looks OK to XEN folks.
David Miller
2012-May-22 20:50 UTC
Re: [PATCH RESENT] xen: do not disable netfront in dom0
From: Marek Marczykowski <marmarek@invisiblethingslab.com> Date: Sun, 20 May 2012 13:45:10 +0200> Netfront driver can be also useful in dom0, eg when all NICs are assigned to > some domU (aka driver domain). Then using netback in domU and netfront in dom0 > is the only way to get network access in dom0. > > Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> > Acked-by: Ian Campbell <ian.campbell@citrix.com> > Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>Applied, thanks.
From: Marek Marczykowski <marmarek at invisiblethingslab.com> Date: Sun, 20 May 2012 13:45:10 +0200> Netfront driver can be also useful in dom0, eg when all NICs are assigned to > some domU (aka driver domain). Then using netback in domU and netfront in dom0 > is the only way to get network access in dom0. > > Signed-off-by: Marek Marczykowski <marmarek at invisiblethingslab.com> > Acked-by: Ian Campbell <ian.campbell at citrix.com> > Acked-by: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com>Applied, thanks.