From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [FWD] [Xen-users] Jumbo frame support for Xen Date: Mon, 24 Oct 2011 15:52:16 -0400 Message-ID: <20111024195216.GB2441@phenom.dumpdata.com> References: <20111013100058.GF11846@linux.gyakg.u-szeged.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20111013100058.GF11846@linux.gyakg.u-szeged.hu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: =?iso-8859-1?Q?P=C1SZTOR_Gy=F6rgy?= Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, Oct 13, 2011 at 12:00:58PM +0200, P=C1SZTOR Gy=F6rgy wrote: > Hi, >=20 > I just got some hint, to forward my original mail to this list too. The patch looks OK, except that it does not check for the cases where the mtu is not set. Would you be up for respinning the patch with that check and also include your Signed-off-by? >=20 > Cheers, > ----- Forwarded message from P=C1SZTOR Gy=F6rgy ----- >=20 > Hi, >=20 > I had to use bridge interfaces with mtu other than 9000, so I started t= o > google for a solution. Then I found this thread: > http://web.archiveorange.com/archive/v/ZvO4j2ymSAvyo8GNrwhY >=20 > But, It didn't work, as the original author says. > I tried to find an easier way, to setup this, so as I found out: If you > configure a vif's mtu, the logical solution is to use the same mtu as t= he > bridge interface -> So I wrote a smaller, nicer, and... a working patch= . >=20 > The "trick" is that, I don't use the xen's bridge creation scripts, I > preconfigure my bridge interfaces from my Debian configuration, far bef= ore > the xen things would start. > bridge entry from my /etc/network/interfaces: > auto br201 > iface br201 inet static > address 10.0.3.5 > netmask 255.255.0.0 > network 10.0.0.0 > broadcast 10.0.255.255 > mtu 9000 > bridge_ports bond0.201 > bridge_fd 0 > bridge_maxwait 0 >=20 > This iface config pre-creates the vlan if on my bonding if, creates the > bridge, add the bond.vlan into my bridge interface, and every mtu is OK= , > until xen starts... > Then, with my patched xen scripts,... work again, still, whatever you w= ant: > It's just work! ;-) >=20 > Use it wise, and for your own risk! >=20 > The patch: >=20 > diff -urN /etc/xen/scripts.orig/vif-bridge /etc/xen/scripts/vif-bridge > --- /etc/xen/scripts.orig/vif-bridge 2011-04-14 15:24:51.000000000 +020= 0 > +++ /etc/xen/scripts/vif-bridge 2011-10-12 18:13:13.873102049 +0200 > @@ -82,6 +82,7 @@ > case "$command" in > online) > setup_bridge_port "$vif" > + set_vif_mtu "$vif" "$(get_if_mtu $bridge)" > add_to_bridge "$bridge" "$vif" > ;; > =20 > diff -urN /etc/xen/scripts.orig/xen-network-common.sh /etc/xen/scripts/= xen-network-common.sh > --- /etc/xen/scripts.orig/xen-network-common.sh 2010-06-21 15:46:02.000= 000000 +0200 > +++ /etc/xen/scripts/xen-network-common.sh 2011-10-12 18:07:00.45690941= 0 +0200 > @@ -116,3 +116,19 @@ > ip link set ${dev} up > } > =20 > +get_if_mtu () { > + local dev=3D$1 > + local line > + ip link show $dev | \ > + ( read line > + line=3D"${line##*mtu }" > + line=3D"${line%% *}" > + echo $line > + cat >/dev/null ) > +} > + > +set_vif_mtu () { > + local vif=3D$1 > + local mtu=3D$2 > + ip link set "$vif" mtu "$mtu" > +} >=20 > Cheers! >=20 >=20 > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >=20 > ----- End forwarded message ----- > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel