All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "PÁSZTOR György" <pasztor@sagv5.gyakg.u-szeged.hu>
Cc: xen-devel@lists.xensource.com
Subject: Re: [FWD] [Xen-users] Jumbo frame support for Xen
Date: Mon, 24 Oct 2011 15:52:16 -0400	[thread overview]
Message-ID: <20111024195216.GB2441@phenom.dumpdata.com> (raw)
In-Reply-To: <20111013100058.GF11846@linux.gyakg.u-szeged.hu>

On Thu, Oct 13, 2011 at 12:00:58PM +0200, PÁSZTOR György wrote:
> Hi,
> 
> 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?

> 
> Cheers,
> ----- Forwarded message from PÁSZTOR György <pasztor@linux.gyakg.u-szeged.hu> -----
> 
> Hi,
> 
> I had to use bridge interfaces with mtu other than 9000, so I started to
> google for a solution. Then I found this thread:
> http://web.archiveorange.com/archive/v/ZvO4j2ymSAvyo8GNrwhY
> 
> 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 the
> bridge interface -> So I wrote a smaller, nicer, and... a working patch.
> 
> The "trick" is that, I don't use the xen's bridge creation scripts, I
> preconfigure my bridge interfaces from my Debian configuration, far before
> 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
> 
> 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 want:
> It's just work! ;-)
> 
> Use it wise, and for your own risk!
> 
> The patch:
> 
> 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 +0200
> +++ /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"
>          ;;
>  
> 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.000000000 +0200
> +++ /etc/xen/scripts/xen-network-common.sh	2011-10-12 18:07:00.456909410 +0200
> @@ -116,3 +116,19 @@
>      ip link set ${dev} up
>  }
>  
> +get_if_mtu () {
> +    local dev=$1
> +    local line
> +    ip link show $dev | \
> +	( read line
> +	line="${line##*mtu }"
> +	line="${line%% *}"
> +	echo $line
> +	cat >/dev/null )
> +}
> +
> +set_vif_mtu () {
> +    local vif=$1
> +    local mtu=$2
> +    ip link set "$vif" mtu "$mtu"
> +}
> 
> Cheers!
> 
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xensource.com
> http://lists.xensource.com/xen-users
> 
> ----- End forwarded message -----


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

      reply	other threads:[~2011-10-24 19:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 10:00 [FWD] [Xen-users] Jumbo frame support for Xen PÁSZTOR György
2011-10-24 19:52 ` Konrad Rzeszutek Wilk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111024195216.GB2441@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=pasztor@sagv5.gyakg.u-szeged.hu \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.