Re: [Xen-devel] Backport request for tools/hotplug: set mtu from bridge for tap interface - for Xen 4.3
On Mon, Jan 12, 2015 at 05:06:12PM +, 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 carn...@suse.com Thanks, applied to 4.3. Thanks a lot guys! Daniel ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] 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 carn...@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 +} + ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] Backport request for tools/hotplug: set mtu from bridge for tap interface - for Xen 4.3
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 carn...@suse.com Thanks, applied to 4.3. Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel