Skip to contentSkip to conversation

libxl: don't use a qemu-ifup script on FreeBSD

PATCH Applied Roger Pau Monne 4 participants 8 messages Sep 26, 2014 – Sep 29, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: don't use a qemu-ifup script on FreeBSD

FreeBSD doesn't use any qemu-ifup script in order to setup the network, it is all done on the hotplug script like Linux.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>

---
I request a code freeze exception on the basis that this is a bugfix and it doesn't change the behaviour on platforms different than FreeBSD.

---
 tools/libxl/libxl_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/libxl_dm.c +1 -1
index fbc82fd..0018113 100644
@@ -21,7 +21,7 @@
 
 static const char *libxl_tapif_script(libxl__gc *gc)
 {
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
     return libxl__strdup(gc, "no");
 #else
     return libxl__sprintf(gc, "%s/qemu-ifup", libxl__xen_script_dir_path());
Signature · 7 lines
1.9.3 (Apple Git-50)


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#1 lore raw
Quoted 9 lines · Roger Pau Monne

FreeBSD doesn't use any qemu-ifup script in order to setup the network, it is all done on the hotplug script like Linux.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Quoted 3 lines

---
I request a code freeze exception on the basis that this is a bugfix and it doesn't change the behaviour on platforms different than FreeBSD.

<nods>

Quoted 20 lines
---
 tools/libxl/libxl_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/libxl_dm.c +1 -1
index fbc82fd..0018113 100644
@@ -21,7 +21,7 @@
 
 static const char *libxl_tapif_script(libxl__gc *gc)
 {
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
     return libxl__strdup(gc, "no");
 #else
     return libxl__sprintf(gc, "%s/qemu-ifup", libxl__xen_script_dir_path());
Signature · 1 line
1.9.3 (Apple Git-50)
Applied
#2 lore raw
Quoted 14 lines · Konrad Rzeszutek Wilk
Quoted 9 lines · Roger Pau Monne

FreeBSD doesn't use any qemu-ifup script in order to setup the network, it is all done on the hotplug script like Linux.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Quoted 3 lines

---
I request a code freeze exception on the basis that this is a bugfix and it doesn't change the behaviour on platforms different than FreeBSD.

Quoted 3 lines

<nods>

Applied.

I'm wondering if anyone should be using qemu-ifup these days?

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw

El 29/09/14 a les 15.35, Ian Campbell ha escrit:

Quoted 15 lines · Konrad Rzeszutek Wilk
Quoted 14 lines · Roger Pau Monne
Quoted 12 lines

FreeBSD doesn't use any qemu-ifup script in order to setup the network, it is all done on the hotplug script like Linux.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>

---
I request a code freeze exception on the basis that this is a bugfix and it doesn't change the behaviour on platforms different than FreeBSD.

Quoted 7 lines
Quoted 3 lines

<nods>

Applied.

I'm wondering if anyone should be using qemu-ifup these days?

AFAIR, NetBSD uses it for qemu-trad at least. I was tempted to invert the ifdef and do something like:

#ifdef __NetBSD__
... use qemu-ifup
#else
... no ifup script
#endif

But I have no idea what Solaris does, or if we still try to support it.

Anyway, thanks for applying this.

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw
Quoted 27 lines · Roger Pau Monné

El 29/09/14 a les 15.35, Ian Campbell ha escrit:

Quoted 15 lines · Konrad Rzeszutek Wilk
Quoted 14 lines · Roger Pau Monne
Quoted 12 lines

FreeBSD doesn't use any qemu-ifup script in order to setup the network, it is all done on the hotplug script like Linux.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>

---
I request a code freeze exception on the basis that this is a bugfix and it doesn't change the behaviour on platforms different than FreeBSD.

Quoted 7 lines
Quoted 3 lines

<nods>

Applied.

I'm wondering if anyone should be using qemu-ifup these days?

AFAIR, NetBSD uses it for qemu-trad at least. I was tempted to invert the ifdef and do something like:

Quoted 7 lines

#ifdef __NetBSD__
... use qemu-ifup
#else
... no ifup script
#endif

But I have no idea what Solaris does, or if we still try to support it.

Do we/libxl not call the scripts too in those cases?

Quoted 1 line

Anyway, thanks for applying this.

NP.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw

El 29/09/14 a les 17.37, Ian Campbell ha escrit:

Quoted 34 lines · Roger Pau Monné
Quoted 33 lines

El 29/09/14 a les 15.35, Ian Campbell ha escrit:

Quoted 15 lines · Konrad Rzeszutek Wilk
Quoted 14 lines · Roger Pau Monne
Quoted 12 lines

FreeBSD doesn't use any qemu-ifup script in order to setup the network, it is all done on the hotplug script like Linux.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>

---
I request a code freeze exception on the basis that this is a bugfix and it doesn't change the behaviour on platforms different than FreeBSD.

Quoted 7 lines
Quoted 3 lines

<nods>

Applied.

I'm wondering if anyone should be using qemu-ifup these days?

AFAIR, NetBSD uses it for qemu-trad at least. I was tempted to invert the ifdef and do something like:

#ifdef __NetBSD__
... use qemu-ifup
#else
... no ifup script
#endif

Quoted 3 lines
Quoted 1 line

But I have no idea what Solaris does, or if we still try to support it.

Do we/libxl not call the scripts too in those cases?

Yes, the vif hotplug script is also called, but on NetBSD it just takes care of adding the vif, not the tap interface.

I think it's done this way on NetBSD because tap interfaces cannot be renamed, so only Qemu knows the actual unit/name of the tap interface and calls the qemu-ifup script passing that name as the first argument.

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw
Quoted 37 lines · Roger Pau Monné

El 29/09/14 a les 17.37, Ian Campbell ha escrit:

Quoted 36 lines · Roger Pau Monné
Quoted 34 lines

El 29/09/14 a les 15.35, Ian Campbell ha escrit:

Quoted 15 lines · Konrad Rzeszutek Wilk
Quoted 14 lines · Roger Pau Monne
Quoted 12 lines

FreeBSD doesn't use any qemu-ifup script in order to setup the network, it is all done on the hotplug script like Linux.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>

---
I request a code freeze exception on the basis that this is a bugfix and it doesn't change the behaviour on platforms different than FreeBSD.

Quoted 7 lines
Quoted 3 lines

<nods>

Applied.

I'm wondering if anyone should be using qemu-ifup these days?

AFAIR, NetBSD uses it for qemu-trad at least. I was tempted to invert the ifdef and do something like:

#ifdef __NetBSD__
... use qemu-ifup
#else
... no ifup script
#endif

But I have no idea what Solaris does, or if we still try to support it.

Quoted 8 lines
Quoted 1 line

Do we/libxl not call the scripts too in those cases?

Yes, the vif hotplug script is also called, but on NetBSD it just takes care of adding the vif, not the tap interface.

I think it's done this way on NetBSD because tap interfaces cannot be renamed, so only Qemu knows the actual unit/name of the tap interface and calls the qemu-ifup script passing that name as the first argument.

OK.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel