From owner-svn-src-stable@FreeBSD.ORG Mon Mar 23 03:03:44 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BB38106566C; Mon, 23 Mar 2009 03:03:44 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68B4C8FC15; Mon, 23 Mar 2009 03:03:44 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2N33iPZ092235; Mon, 23 Mar 2009 03:03:44 GMT (envelope-from scf@svn.freebsd.org) Received: (from scf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2N33iGT092234; Mon, 23 Mar 2009 03:03:44 GMT (envelope-from scf@svn.freebsd.org) Message-Id: <200903230303.n2N33iGT092234@svn.freebsd.org> From: Sean Farley Date: Mon, 23 Mar 2009 03:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190307 - stable/7/sys/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2009 03:03:45 -0000 Author: scf Date: Mon Mar 23 03:03:44 2009 New Revision: 190307 URL: http://svn.freebsd.org/changeset/base/190307 Log: Merge r189866 from head to stable/7: Add the SIOCSIFMTU ioctl handling directly to tap(4) permitting it to have its MTU set higher than 1500 (ETHERMTU). Its new limit is now 65535 as enforced by ifhwioctl() in if.c This allows a tap(4) device to be added to a bridge, which requires all interface members to have the same MTU, with an interface configured for jumbo frames. QEMU may now connect to a network via tap(4) without requiring the real interface to have its MTU set to 1500 or lower. Reviewed by: rpaulo, bms Merge r189907 from head to stable/7: Remove the splimp()/splx() calls around the setting of the MTU. They are no-op's that I inadvertently added. Even if locking is needed in general for the ioctl's, setting a single long will not need it due to the operation being atomic. Reported by: rwatson Modified: stable/7/sys/net/if_tap.c Modified: stable/7/sys/net/if_tap.c ============================================================================== --- stable/7/sys/net/if_tap.c Mon Mar 23 01:24:17 2009 (r190306) +++ stable/7/sys/net/if_tap.c Mon Mar 23 03:03:44 2009 (r190307) @@ -600,6 +600,7 @@ static int tapifioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct tap_softc *tp = ifp->if_softc; + struct ifreq *ifr = (struct ifreq *)data; struct ifstat *ifs = NULL; int s, dummy; @@ -609,6 +610,10 @@ tapifioctl(struct ifnet *ifp, u_long cmd case SIOCDELMULTI: break; + case SIOCSIFMTU: + ifp->if_mtu = ifr->ifr_mtu; + break; + case SIOCGIFSTATUS: s = splimp(); ifs = (struct ifstat *)data;