* Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.3
2015-01-12 15:44 ` Ian Jackson
@ 2015-01-12 16:37 ` Charles Arnold
2015-01-12 17:06 ` Ian Jackson
2015-01-12 16:37 ` Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.4, 4.5, and unstable Charles Arnold
` (2 subsequent siblings)
3 siblings, 1 reply; 15+ messages in thread
From: Charles Arnold @ 2015-01-12 16:37 UTC (permalink / raw)
To: Ian Jackson, Daniel Kiper; +Cc: xen-devel, Ian Campbell, Jan Beulich
With changeset 22885 support was added for setting the MTU in the vif-bridge
script for when a vif interface was set to 'online'. The was not done for the
'add' operation. The 'add' operation was added to the script for when tap
devices were specified (c/s 21944). With the setting of the MTU for the
'online' case was there a reason for omitting the 'add'?
This patch sets the MTU for both 'online' and 'add' in the vif-bridge script.
Backport for Xen version 4.3
Signed-off-by: Charles Arnold <carnold@suse.com>
diff --git a/tools/hotplug/Linux/vif-bridge b/tools/hotplug/Linux/vif-bridge
index f489519..da8a0f8 100644
--- a/tools/hotplug/Linux/vif-bridge
+++ b/tools/hotplug/Linux/vif-bridge
@@ -82,11 +82,7 @@ fi
case "$command" in
online)
setup_virtual_bridge_port "$dev"
- mtu="`ip link show $bridge | awk '/mtu/ { print $5 }'`"
- if [ -n "$mtu" ] && [ "$mtu" -gt 0 ]
- then
- ip link set $dev mtu $mtu || :
- fi
+ set_mtu "$bridge" "$dev"
add_to_bridge "$bridge" "$dev"
;;
@@ -97,6 +93,7 @@ case "$command" in
add)
setup_virtual_bridge_port "$dev"
+ set_mtu "$bridge" "$dev"
add_to_bridge "$bridge" "$dev"
;;
esac
diff --git a/tools/hotplug/Linux/xen-network-common.sh b/tools/hotplug/Linux/xen-network-common.sh
index 8cff156..9a9526b 100644
--- a/tools/hotplug/Linux/xen-network-common.sh
+++ b/tools/hotplug/Linux/xen-network-common.sh
@@ -132,3 +132,14 @@ add_to_bridge () {
ip link set ${dev} up
}
+# Usage: set_mtu bridge dev
+set_mtu () {
+ local bridge=$1
+ local dev=$2
+ mtu="`ip link show ${bridge}| awk '/mtu/ { print $5 }'`"
+ if [ -n "$mtu" ] && [ "$mtu" -gt 0 ]
+ then
+ ip link set ${dev} mtu $mtu || :
+ fi
+}
+
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.3
2015-01-12 16:37 ` Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.3 Charles Arnold
@ 2015-01-12 17:06 ` Ian Jackson
2015-01-13 15:09 ` Daniel Kiper
0 siblings, 1 reply; 15+ messages in thread
From: Ian Jackson @ 2015-01-12 17:06 UTC (permalink / raw)
To: Charles Arnold; +Cc: xen-devel, Jan Beulich, Ian Campbell, Daniel Kiper
Charles Arnold writes ("Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.3"):
> With changeset 22885 support was added for setting the MTU in the vif-bridge
> script for when a vif interface was set to 'online'. The was not done for the
> 'add' operation. The 'add' operation was added to the script for when tap
> devices were specified (c/s 21944). With the setting of the MTU for the
> 'online' case was there a reason for omitting the 'add'?
>
> This patch sets the MTU for both 'online' and 'add' in the vif-bridge script.
>
> Backport for Xen version 4.3
>
> Signed-off-by: Charles Arnold <carnold@suse.com>
Thanks, applied to 4.3.
Ian.
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.3
2015-01-12 17:06 ` Ian Jackson
@ 2015-01-13 15:09 ` Daniel Kiper
0 siblings, 0 replies; 15+ messages in thread
From: Daniel Kiper @ 2015-01-13 15:09 UTC (permalink / raw)
To: Ian Jackson
Cc: Charles Arnold, xen-devel, Jan Beulich, Ian Campbell,
Daniel Kiper
On Mon, Jan 12, 2015 at 05:06:12PM +0000, Ian Jackson wrote:
> Charles Arnold writes ("Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.3"):
> > With changeset 22885 support was added for setting the MTU in the vif-bridge
> > script for when a vif interface was set to 'online'. The was not done for the
> > 'add' operation. The 'add' operation was added to the script for when tap
> > devices were specified (c/s 21944). With the setting of the MTU for the
> > 'online' case was there a reason for omitting the 'add'?
> >
> > This patch sets the MTU for both 'online' and 'add' in the vif-bridge script.
> >
> > Backport for Xen version 4.3
> >
> > Signed-off-by: Charles Arnold <carnold@suse.com>
>
> Thanks, applied to 4.3.
Thanks a lot guys!
Daniel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.4, 4.5, and unstable
2015-01-12 15:44 ` Ian Jackson
2015-01-12 16:37 ` Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.3 Charles Arnold
@ 2015-01-12 16:37 ` Charles Arnold
2015-01-12 17:03 ` Ian Jackson
2015-01-12 16:44 ` Backport request for "tools/hotplug: set mtu from bridge for tap interface" Charles Arnold
2015-01-13 15:06 ` Daniel Kiper
3 siblings, 1 reply; 15+ messages in thread
From: Charles Arnold @ 2015-01-12 16:37 UTC (permalink / raw)
To: Ian Jackson, Daniel Kiper; +Cc: xen-devel, Ian Campbell, Jan Beulich
Add quotes around $bridge and $dev to handle spaces in names.
This should go into 4.4, 4.5 and unstable.
Signed-off-by: Charles Arnold <carnold@suse.com>
diff --git a/tools/hotplug/Linux/vif-bridge b/tools/hotplug/Linux/vif-bridge
index 3d72ca4..8b67b0a 100644
--- a/tools/hotplug/Linux/vif-bridge
+++ b/tools/hotplug/Linux/vif-bridge
@@ -77,7 +77,7 @@ fi
case "$command" in
online)
setup_virtual_bridge_port "$dev"
- set_mtu $bridge $dev
+ set_mtu "$bridge" "$dev"
add_to_bridge "$bridge" "$dev"
;;
@@ -88,7 +88,7 @@ case "$command" in
add)
setup_virtual_bridge_port "$dev"
- set_mtu $bridge $dev
+ set_mtu "$bridge" "$dev"
add_to_bridge "$bridge" "$dev"
;;
esac
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.4, 4.5, and unstable
2015-01-12 16:37 ` Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.4, 4.5, and unstable Charles Arnold
@ 2015-01-12 17:03 ` Ian Jackson
2015-01-12 17:15 ` Charles Arnold
2015-01-13 7:15 ` Philipp Hahn
0 siblings, 2 replies; 15+ messages in thread
From: Ian Jackson @ 2015-01-12 17:03 UTC (permalink / raw)
To: Charles Arnold; +Cc: xen-devel, Jan Beulich, Ian Campbell, Daniel Kiper
Charles Arnold writes ("Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.4, 4.5, and unstable"):
> Add quotes around $bridge and $dev to handle spaces in names.
> This should go into 4.4, 4.5 and unstable.
Is this really necessary for backporting ?
Frankly I think if you put spaces in your network device names an
awful lot of things are going to break.
Ian.
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.4, 4.5, and unstable
2015-01-12 17:03 ` Ian Jackson
@ 2015-01-12 17:15 ` Charles Arnold
2015-01-13 7:15 ` Philipp Hahn
1 sibling, 0 replies; 15+ messages in thread
From: Charles Arnold @ 2015-01-12 17:15 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel, Jan Beulich, Ian Campbell, Daniel Kiper
>>> On 1/12/2015 at 10:03 AM, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote:
> Charles Arnold writes ("Re: Backport request for "tools/hotplug: set mtu from
> bridge for tap interface" - for Xen 4.4, 4.5, and unstable"):
>> Add quotes around $bridge and $dev to handle spaces in names.
>> This should go into 4.4, 4.5 and unstable.
>
> Is this really necessary for backporting ?
>
> Frankly I think if you put spaces in your network device names an
> awful lot of things are going to break.
You are probably right. The change was also for consistency in how the variables are used elsewhere in the script.
- Charles
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.4, 4.5, and unstable
2015-01-12 17:03 ` Ian Jackson
2015-01-12 17:15 ` Charles Arnold
@ 2015-01-13 7:15 ` Philipp Hahn
1 sibling, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2015-01-13 7:15 UTC (permalink / raw)
To: xen-devel
Hello,
On 12.01.2015 18:03, Ian Jackson wrote:
> Charles Arnold writes ("Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.4, 4.5, and unstable"):
>> Add quotes around $bridge and $dev to handle spaces in names.
>> This should go into 4.4, 4.5 and unstable.
>
> Is this really necessary for backporting ?
>
> Frankly I think if you put spaces in your network device names an
> awful lot of things are going to break.
Luckily for you at least Linux does not allow space characters in
interface names: net/core/dev.c:936 dev_valid_name
On the other hand I find not caring about quoting somehow dangerous, as
I already expeienced one desaster caused by missing quotes. Just my 2¢.
Philipp
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface"
2015-01-12 15:44 ` Ian Jackson
2015-01-12 16:37 ` Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.3 Charles Arnold
2015-01-12 16:37 ` Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.4, 4.5, and unstable Charles Arnold
@ 2015-01-12 16:44 ` Charles Arnold
2015-01-13 15:06 ` Daniel Kiper
3 siblings, 0 replies; 15+ messages in thread
From: Charles Arnold @ 2015-01-12 16:44 UTC (permalink / raw)
To: Ian Jackson, Daniel Kiper; +Cc: xen-devel, Ian Campbell, Jan Beulich
Forgot to put [Patch] in the subject line for the last two replies :(
- Charles
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface"
2015-01-12 15:44 ` Ian Jackson
` (2 preceding siblings ...)
2015-01-12 16:44 ` Backport request for "tools/hotplug: set mtu from bridge for tap interface" Charles Arnold
@ 2015-01-13 15:06 ` Daniel Kiper
3 siblings, 0 replies; 15+ messages in thread
From: Daniel Kiper @ 2015-01-13 15:06 UTC (permalink / raw)
To: Ian Jackson
Cc: Charles Arnold, xen-devel, jbeulich, Daniel Kiper, Ian Campbell
On Mon, Jan 12, 2015 at 03:44:28PM +0000, Ian Jackson wrote:
> Daniel Kiper writes ("Re: Backport request for "tools/hotplug: set mtu from bridge for tap interface""):
> > On Tue, Nov 18, 2014 at 06:24:31PM +0000, Ian Jackson wrote:
> > > Does it apply cleanly to 4.3 and 4.4? I haven't checked. Daniel, if
> > > you could check that, that would be helpful. If it doesn't then the
> > > normal process would be for the backport requestor (ie you) to post
> > > the revised patch against 4.3 and/or 4.4.
> >
> > 4.4 and later have this patch. 4.3 and earlier ones do not have this patch.
> > It could be cherry picked to 4.3 and 4.2 without any issues.
>
> I tried cherry-picking this commit (f3f5f192) to 4.4 and it didn't
> apply.
As I wrote above "4.4 and later have this patch".
Daniel
^ permalink raw reply [flat|nested] 15+ messages in thread