From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 7 16:30:37 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05FE1969 for ; Sat, 7 Feb 2015 16:30:37 +0000 (UTC) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC77FA66 for ; Sat, 7 Feb 2015 16:30:36 +0000 (UTC) Received: by pdbfl12 with SMTP id fl12so11289590pdb.10 for ; Sat, 07 Feb 2015 08:30:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=D3cWUaGTIje3FSHBJJJNIIe7jvpRuarC3DwsjV8mu6s=; b=WgMdTZ/Xrt4+3XBXEIvfYdqs3tIDaY9SXqjA+Pum89IvKxcXumHsulJjWEhG5ySDPR sWAhaZ9beWDiWzaDKyaq4RsDHSyEXThCxlyF6N8vk/CcbKqyS7u5ezKRNTMHFgFZahI6 b4VSgS1A/nhFG2muuaGO8zCz44mjLYSe40ew7G1e3Ps4E3FrH3lDgOCPUwwBC1JA2Lhj ipMdIuHrhHdOBhpP3uOssIxDgGrzqLhFD06mHjo0AQ3mXw9DhACyKlbkJEG//xPzqqBn xPVbqTHT0MYt0OaFs65NMAmwPVn+O/ZZOs8JPqtMaNSh9fpafMA+PkjHaXHYn2HrqXw7 N2xw== X-Received: by 10.68.241.35 with SMTP id wf3mr15147390pbc.22.1423326635769; Sat, 07 Feb 2015 08:30:35 -0800 (PST) Received: from ox ([24.6.44.228]) by mx.google.com with ESMTPSA id u14sm11369363pbs.85.2015.02.07.08.30.33 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 07 Feb 2015 08:30:34 -0800 (PST) Sender: Navdeep Parhar Date: Sat, 7 Feb 2015 08:30:28 -0800 From: Navdeep Parhar To: "Pokala, Ravi" Subject: Re: Changing the MTU on a lagg device Message-ID: <20150207163028.GA4965@ox> Mail-Followup-To: "Pokala, Ravi" , John-Mark Gurney , "freebsd-hackers@freebsd.org" References: <20150207051012.GH58410@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "freebsd-hackers@freebsd.org" , John-Mark Gurney X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2015 16:30:37 -0000 On Sat, Feb 07, 2015 at 05:26:36AM +0000, Pokala, Ravi wrote: > > So, to do it, you'd need to try to change all the ports mtu, and if > any of them fail, you need to revert all of them back to the original > mtu... > > Which is exactly what our code does. :-) And if reverting it fails then you end up with the old MTU on some interfaces and the new MTU on others. Very unlikely, but possible. if_lagg may have been written the way it is to avoid dealing with failures to revert the MTU. Regards, Navdeep > > Right now, I only have the change against our older base FreeBSD; I'll > port it to -CURRENT and send out a patch when I have a few minutes > sometime this weekend. > > -Ravi > > -----Original Message----- > From: John-Mark Gurney > Date: 2015-02-06, Friday at 21:10 > To: Ravi Pokala > Cc: "freebsd-hackers@freebsd.org" > Subject: Re: Changing the MTU on a lagg device > > >Ravi Pokala wrote this message on Sat, Feb 07, 2015 at 02:42 +0000: > >> Hi folks, > >> > >> Let's say you have lagg0, consisting of if0 and if1. If you want to > >>change > >> the MTU, you have to remove if0 and if1 from the lagg, change their > >>MTUs, > >> and add them back; that is: > >> > >> 1) ifconfig lagg0 -laggport if0 > >> 2) ifconfig lagg0 -laggport if1 > >> 3) ifconfig if0 mtu 9000 > >> 4) ifconfig if1 mtu 9000 > >> 5) ifconfig lagg0 laggport if0 > >> 6) ifconfig lagg0 laggport if1 > >> > >> It would be nice if this could be done with a single command: > >> > >> 1) ifconfig lagg0 mtu 9000 > >> > >> Panasas implemented that functionality for our older base FreeBSD, and > >> we're looking to port it forward and push it upstream. However, it looks > >> like someone thought about this case and explicitly decided not to do > >>it; > >> if_lagg.c has: > >> > >> case SIOCSIFMTU: > >> /* Do not allow the MTU to be changed once joined */ > >> error = EINVAL; > >> break; > >> > >> > >> Does anyone know why that is? Would anyone object to a patch that lets > >>you > >> change the MTU on the lagg device, and having the lagg driver change it > >>on > >> all the component interfaces for you? > > > >If could be trying to deal w/ the issue if you ask for 16000 but one > >can do it, but the other can only handle 9000, how do you handle it? > > > >Just for fun, I just tried something similar.. lagg won't allow you > >to add a port that has a different (smaller or bigger) MTU than the > >first one added.. > > > >So, to do it, you'd need to try to change all the ports mtu, and if > >any of them fail, you need to revert all of them back to the original > >mtu... > > > >-- > > John-Mark Gurney Voice: +1 415 225 5579 > > > > "All that I will do, has been done, All that I have, has not." > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"