WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] set mtu from bridge also on vif interface

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] set mtu from bridge also on vif interface
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Sun, 6 Feb 2011 14:41:23 +0100
Delivery-date: Sun, 06 Feb 2011 05:42:13 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1296999686; l=846; s=domk; d=aepfle.de; h=Content-Type:MIME-Version:Subject:To:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=Rhmm3xI7CkYftLksrfbT/3RDbmc=; b=kk7I12Ln8OAsKQsr/68YhIXGQzfkI3tnVb6ecBM2rQXgtSvK/GyFXzVIlDPuMKpyenv bfCv/H/BvIAA76xg+KFwbVBk8xi2fJLRfQ5/22QWrlMjau+OwJhL5ITRGhJPjymVTFwIy Imi5dBc67oyg+2Q1i837o/QhVg3qjV3x4Sk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
Apply mtu size from bridge interface also in vif interface.
This depends on a kernel change which allows arbitrary mtu sizes until
the frontend driver has connected to the backend driver. Without this
kernel change, the vif mtu size will be limited to 1500 even with this
change to the vif-bridge script.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---
 tools/hotplug/Linux/vif-bridge |    5 +++++
 1 file changed, 5 insertions(+)

--- xen-unstable.hg-4.1.22870.orig/tools/hotplug/Linux/vif-bridge
+++ xen-unstable.hg-4.1.22870/tools/hotplug/Linux/vif-bridge
@@ -82,6 +82,11 @@ 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
         add_to_bridge "$bridge" "$dev"
         ;;
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel