From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 17:27:59 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A67F106566C; Sun, 29 Nov 2009 17:27:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 664128FC16; Sun, 29 Nov 2009 17:27:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATHRxha002338; Sun, 29 Nov 2009 17:27:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATHRwIC002328; Sun, 29 Nov 2009 17:27:58 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200911291727.nATHRwIC002328@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 29 Nov 2009 17:27:58 +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: r199901 - in stable/7: . sys/compat/pecoff sys/conf sys/i386/conf sys/i386/include sys/modules sys/modules/pecoff sys/pc98/conf sys/pc98/include X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 17:27:59 -0000 Author: bz Date: Sun Nov 29 17:27:58 2009 New Revision: 199901 URL: http://svn.freebsd.org/changeset/base/199901 Log: MFC r179785, r180496: Remove obselete PECOFF image activator support. Discussed with: secteam, kib Approved by: re (kensmith) Deleted: stable/7/sys/compat/pecoff/ stable/7/sys/i386/include/pecoff_machdep.h stable/7/sys/modules/pecoff/ stable/7/sys/pc98/include/pecoff_machdep.h Modified: stable/7/ObsoleteFiles.inc (contents, props changed) stable/7/UPDATING stable/7/sys/conf/files.i386 stable/7/sys/conf/files.pc98 stable/7/sys/conf/options.i386 stable/7/sys/conf/options.pc98 stable/7/sys/i386/conf/NOTES stable/7/sys/modules/Makefile stable/7/sys/pc98/conf/NOTES Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/ObsoleteFiles.inc ============================================================================== --- stable/7/ObsoleteFiles.inc Sun Nov 29 17:25:32 2009 (r199900) +++ stable/7/ObsoleteFiles.inc Sun Nov 29 17:27:58 2009 (r199901) @@ -14,6 +14,10 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20091129: pecoff image activator removed +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/pecoff_machdep.h +.endif # 20090203: adding_user.8 moved to adding_user.7 OLD_FILES+=usr/share/man/man8/adding_user.8.gz # 20080407: pkg_sign has been removed Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Sun Nov 29 17:25:32 2009 (r199900) +++ stable/7/UPDATING Sun Nov 29 17:27:58 2009 (r199901) @@ -8,6 +8,9 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20091129: + PECOFF image activator support removed. + 20090831: The newly imported zic(8) produces a new format in the output. Please run tzsetup(8) to install the newly created Modified: stable/7/sys/conf/files.i386 ============================================================================== --- stable/7/sys/conf/files.i386 Sun Nov 29 17:25:32 2009 (r199900) +++ stable/7/sys/conf/files.i386 Sun Nov 29 17:27:58 2009 (r199901) @@ -98,7 +98,6 @@ compat/ndis/subr_ntoskrnl.c optional ndi compat/ndis/subr_pe.c optional ndisapi pci compat/ndis/subr_usbd.c optional ndisapi pci compat/ndis/winx32_wrap.S optional ndisapi pci -compat/pecoff/imgact_pecoff.c optional pecoff_support compat/svr4/imgact_svr4.c optional compat_svr4 compat/svr4/svr4_fcntl.c optional compat_svr4 compat/svr4/svr4_filio.c optional compat_svr4 Modified: stable/7/sys/conf/files.pc98 ============================================================================== --- stable/7/sys/conf/files.pc98 Sun Nov 29 17:25:32 2009 (r199900) +++ stable/7/sys/conf/files.pc98 Sun Nov 29 17:27:58 2009 (r199901) @@ -60,7 +60,6 @@ compat/linux/linux_sysctl.c optional com compat/linux/linux_time.c optional compat_linux compat/linux/linux_uid16.c optional compat_linux compat/linux/linux_util.c optional compat_linux -compat/pecoff/imgact_pecoff.c optional pecoff_support compat/svr4/imgact_svr4.c optional compat_svr4 compat/svr4/svr4_fcntl.c optional compat_svr4 compat/svr4/svr4_filio.c optional compat_svr4 Modified: stable/7/sys/conf/options.i386 ============================================================================== --- stable/7/sys/conf/options.i386 Sun Nov 29 17:25:32 2009 (r199900) +++ stable/7/sys/conf/options.i386 Sun Nov 29 17:27:58 2009 (r199901) @@ -27,8 +27,6 @@ DEBUG_SVR4 opt_svr4.h LINPROCFS opt_dontuse.h LINSYSFS opt_dontuse.h NDISAPI opt_dontuse.h -PECOFF_DEBUG opt_pecoff.h -PECOFF_SUPPORT opt_dontuse.h # Change KVM size. Changes things all over the kernel. KVA_PAGES opt_global.h Modified: stable/7/sys/conf/options.pc98 ============================================================================== --- stable/7/sys/conf/options.pc98 Sun Nov 29 17:25:32 2009 (r199900) +++ stable/7/sys/conf/options.pc98 Sun Nov 29 17:27:58 2009 (r199901) @@ -25,8 +25,6 @@ COMPAT_SVR4 opt_dontuse.h DEBUG_SVR4 opt_svr4.h LINPROCFS opt_dontuse.h LINSYSFS opt_dontuse.h -PECOFF_DEBUG opt_pecoff.h -PECOFF_SUPPORT opt_dontuse.h # Change KVM size. Changes things all over the kernel. KVA_PAGES opt_global.h Modified: stable/7/sys/i386/conf/NOTES ============================================================================== --- stable/7/sys/i386/conf/NOTES Sun Nov 29 17:25:32 2009 (r199900) +++ stable/7/sys/i386/conf/NOTES Sun Nov 29 17:27:58 2009 (r199901) @@ -1221,10 +1221,6 @@ options KSTACK_PAGES=3 options FB_INSTALL_CDEV # install a CDEV entry in /dev -# PECOFF module (Win32 Execution Format) -options PECOFF_SUPPORT -options PECOFF_DEBUG - options I4B_SMP_WORKAROUND options I586_PMC_GUPROF=0x70000 options KBDIO_DEBUG=2 Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Sun Nov 29 17:25:32 2009 (r199900) +++ stable/7/sys/modules/Makefile Sun Nov 29 17:27:58 2009 (r199901) @@ -215,7 +215,6 @@ SUBDIR= ${_3dfx} \ ${_pccard} \ ${_pcfclock} \ pcn \ - ${_pecoff} \ ${_pf} \ ${_pflog} \ plip \ @@ -433,7 +432,6 @@ _opensolaris= opensolaris .endif _pccard= pccard _pcfclock= pcfclock -_pecoff= pecoff _pst= pst _ray= ray _rdma= rdma @@ -588,7 +586,7 @@ _zfs= zfs .if ${MACHINE_ARCH} == "ia64" # Modules not enabled on ia64 (as compared to i386) include: # aac acpi aout apm atspeaker drm ibcs2 linprocfs linux ncv -# nsp oltr pecoff s3 sbni stg vesa +# nsp oltr s3 sbni stg vesa # acpi is not enabled because it is broken as a module on ia64 _aic= aic #_ar= ar not 64-bit clean Modified: stable/7/sys/pc98/conf/NOTES ============================================================================== --- stable/7/sys/pc98/conf/NOTES Sun Nov 29 17:25:32 2009 (r199900) +++ stable/7/sys/pc98/conf/NOTES Sun Nov 29 17:27:58 2009 (r199901) @@ -749,10 +749,6 @@ options KSTACK_PAGES=3 options FB_INSTALL_CDEV # install a CDEV entry in /dev -# PECOFF module (Win32 Execution Format) -options PECOFF_SUPPORT -options PECOFF_DEBUG - options I4B_SMP_WORKAROUND options I586_PMC_GUPROF=0x70000 options KBDIO_DEBUG=2 From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 18:29:20 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BFBC106568F; Sun, 29 Nov 2009 18:29:20 +0000 (UTC) (envelope-from wkoszek@freebsd.czest.pl) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by mx1.freebsd.org (Postfix) with ESMTP id 171A58FC16; Sun, 29 Nov 2009 18:29:19 +0000 (UTC) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by freebsd.czest.pl (8.14.2/8.14.2) with ESMTP id nATII2ls046735; Sun, 29 Nov 2009 19:18:02 +0100 (CET) (envelope-from wkoszek@freebsd.czest.pl) Received: (from wkoszek@localhost) by freebsd.czest.pl (8.14.2/8.14.2/Submit) id nATII2io046734; Sun, 29 Nov 2009 19:18:02 +0100 (CET) (envelope-from wkoszek) Date: Sun, 29 Nov 2009 19:18:02 +0100 From: "Wojciech A. Koszek" To: "Bjoern A. Zeeb" Message-ID: <20091129181802.GC98022@FreeBSD.org> Mail-Followup-To: "Bjoern A. Zeeb" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-7@FreeBSD.org References: <200911291727.nATHRwIC002328@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <200911291727.nATHRwIC002328@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-3.0 (freebsd.czest.pl [212.87.224.105]); Sun, 29 Nov 2009 19:18:02 +0100 (CET) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r199901 - in stable/7: . sys/compat/pecoff sys/conf sys/i386/conf sys/i386/include sys/modules sys/modules/pecoff sys/pc98/conf sys/pc98/include X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 18:29:20 -0000 On Sun, Nov 29, 2009 at 05:27:58PM +0000, Bjoern A. Zeeb wrote: > Author: bz > Date: Sun Nov 29 17:27:58 2009 > New Revision: 199901 > URL: http://svn.freebsd.org/changeset/base/199901 > > Log: > MFC r179785, r180496: > > Remove obselete PECOFF image activator support. > > Discussed with: secteam, kib > Approved by: re (kensmith) > > Deleted: > stable/7/sys/compat/pecoff/ > stable/7/sys/i386/include/pecoff_machdep.h > stable/7/sys/modules/pecoff/ > stable/7/sys/pc98/include/pecoff_machdep.h > Modified: > stable/7/ObsoleteFiles.inc (contents, props changed) > stable/7/UPDATING > stable/7/sys/conf/files.i386 > stable/7/sys/conf/files.pc98 > stable/7/sys/conf/options.i386 > stable/7/sys/conf/options.pc98 > stable/7/sys/i386/conf/NOTES > stable/7/sys/modules/Makefile > stable/7/sys/pc98/conf/NOTES > Directory Properties: > stable/7/sys/ (props changed) > stable/7/sys/contrib/pf/ (props changed) Thank you. -- Wojciech A. Koszek wkoszek@FreeBSD.org http://FreeBSD.czest.pl/~wkoszek/ From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 18:54:21 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B0601065670; Sun, 29 Nov 2009 18:54:21 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 501DE8FC20; Sun, 29 Nov 2009 18:54:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATIsLVq004576; Sun, 29 Nov 2009 18:54:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATIsL46004574; Sun, 29 Nov 2009 18:54:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291854.nATIsL46004574@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 18:54:21 +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: r199909 - stable/7/sys/dev/jme X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 18:54:21 -0000 Author: yongari Date: Sun Nov 29 18:54:21 2009 New Revision: 199909 URL: http://svn.freebsd.org/changeset/base/199909 Log: MFC r197585. Remove unnecessary device reinitialization. Modified: stable/7/sys/dev/jme/if_jme.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/jme/if_jme.c ============================================================================== --- stable/7/sys/dev/jme/if_jme.c Sun Nov 29 18:51:58 2009 (r199908) +++ stable/7/sys/dev/jme/if_jme.c Sun Nov 29 18:54:21 2009 (r199909) @@ -306,6 +306,10 @@ jme_mediastatus(struct ifnet *ifp, struc sc = ifp->if_softc; JME_LOCK(sc); + if ((ifp->if_flags & IFF_UP) == 0) { + JME_UNLOCK(sc); + return; + } mii = device_get_softc(sc->jme_miibus); mii_pollstat(mii); @@ -1585,8 +1589,10 @@ jme_resume(device_t dev) pmc + PCIR_POWER_STATUS, pmstat, 2); } ifp = sc->jme_ifp; - if ((ifp->if_flags & IFF_UP) != 0) + if ((ifp->if_flags & IFF_UP) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; jme_init_locked(sc); + } JME_UNLOCK(sc); @@ -1861,6 +1867,7 @@ jme_watchdog(struct jme_softc *sc) if ((sc->jme_flags & JME_FLAG_LINK) == 0) { if_printf(sc->jme_ifp, "watchdog timeout (missed link)\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; jme_init_locked(sc); return; } @@ -1875,6 +1882,7 @@ jme_watchdog(struct jme_softc *sc) if_printf(sc->jme_ifp, "watchdog timeout\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; jme_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) taskqueue_enqueue(sc->jme_tq, &sc->jme_tx_task); @@ -1917,8 +1925,10 @@ jme_ioctl(struct ifnet *ifp, u_long cmd, VLAN_CAPABILITIES(ifp); } ifp->if_mtu = ifr->ifr_mtu; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; jme_init_locked(sc); + } JME_UNLOCK(sc); } break; @@ -2642,6 +2652,8 @@ jme_init_locked(struct jme_softc *sc) ifp = sc->jme_ifp; mii = device_get_softc(sc->jme_miibus); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; /* * Cancel any pending I/O. */ From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:01:22 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90212106566C; Sun, 29 Nov 2009 19:01:22 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BBDC8FC13; Sun, 29 Nov 2009 19:01:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJ1MC6004834; Sun, 29 Nov 2009 19:01:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJ1M4d004832; Sun, 29 Nov 2009 19:01:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291901.nATJ1M4d004832@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:01:22 +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: r199911 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:01:22 -0000 Author: yongari Date: Sun Nov 29 19:01:21 2009 New Revision: 199911 URL: http://svn.freebsd.org/changeset/base/199911 Log: MFC 197587. Don't encode model id twice. Reported by: Kristof Provost sigsegv dot be> Modified: stable/7/sys/dev/mii/e1000phy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Sun Nov 29 18:59:43 2009 (r199910) +++ stable/7/sys/dev/mii/e1000phy.c Sun Nov 29 19:01:21 2009 (r199911) @@ -247,7 +247,7 @@ e1000phy_reset(struct mii_softc *sc) } } - switch (MII_MODEL(esc->mii_model)) { + switch (esc->mii_model) { case MII_MODEL_MARVELL_E3082: case MII_MODEL_MARVELL_E1112: case MII_MODEL_MARVELL_E1118: From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:04:42 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60A89106566B; Sun, 29 Nov 2009 19:04:42 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FCF38FC19; Sun, 29 Nov 2009 19:04:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJ4gDh004985; Sun, 29 Nov 2009 19:04:42 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJ4gXD004983; Sun, 29 Nov 2009 19:04:42 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291904.nATJ4gXD004983@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:04:42 +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: r199913 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:04:42 -0000 Author: yongari Date: Sun Nov 29 19:04:42 2009 New Revision: 199913 URL: http://svn.freebsd.org/changeset/base/199913 Log: MFC 197588. Some fiber PHY(88E1112) does not seem to set resolved speed so always assume we've got IFM_1000_SX. Modified: stable/7/sys/dev/mii/e1000phy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Sun Nov 29 19:03:20 2009 (r199912) +++ stable/7/sys/dev/mii/e1000phy.c Sun Nov 29 19:04:42 2009 (r199913) @@ -484,8 +484,11 @@ e1000phy_status(struct mii_softc *sc) return; } } else { - if (ssr & E1000_SSR_1000MBS) - mii->mii_media_active |= IFM_1000_SX; + /* + * Some fiber PHY(88E1112) does not seem to set resolved + * speed so always assume we've got IFM_1000_SX. + */ + mii->mii_media_active |= IFM_1000_SX; } if (ssr & E1000_SSR_DUPLEX) From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:07:38 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E22101065672; Sun, 29 Nov 2009 19:07:38 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D17AB8FC19; Sun, 29 Nov 2009 19:07:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJ7cCO005145; Sun, 29 Nov 2009 19:07:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJ7cOR005143; Sun, 29 Nov 2009 19:07:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291907.nATJ7cOR005143@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:07:38 +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: r199915 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:07:39 -0000 Author: yongari Date: Sun Nov 29 19:07:38 2009 New Revision: 199915 URL: http://svn.freebsd.org/changeset/base/199915 Log: MFC 197589. Fix MIB statistics clear routine. This should fix alignment errors on sparc64. Reported by: Garrett Damore < gdamore <> opensolaris dot org > Modified: stable/7/sys/dev/msk/if_msk.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:06:33 2009 (r199914) +++ stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:07:38 2009 (r199915) @@ -4188,7 +4188,7 @@ msk_stats_clear(struct msk_if_softc *sc_ gmac = GMAC_READ_2(sc, sc_if->msk_port, GM_PHY_ADDR); GMAC_WRITE_2(sc, sc_if->msk_port, GM_PHY_ADDR, gmac | GM_PAR_MIB_CLR); /* Read all MIB Counters with Clear Mode set. */ - for (i = GM_RXF_UC_OK; i <= GM_TXE_FIFO_UR; i++) + for (i = GM_RXF_UC_OK; i <= GM_TXE_FIFO_UR; i += sizeof(uint32_t)) reg = MSK_READ_MIB32(sc_if->msk_port, i); /* Clear MIB Clear Counter Mode. */ gmac &= ~GM_PAR_MIB_CLR; From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:12:42 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 056C4106566C; Sun, 29 Nov 2009 19:12:42 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF4038FC1C; Sun, 29 Nov 2009 19:12:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJCfkx005345; Sun, 29 Nov 2009 19:12:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJCf0n005340; Sun, 29 Nov 2009 19:12:41 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291912.nATJCf0n005340@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:12:41 +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: r199917 - in stable/7/sys/dev: mii msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:12:42 -0000 Author: yongari Date: Sun Nov 29 19:12:41 2009 New Revision: 199917 URL: http://svn.freebsd.org/changeset/base/199917 Log: MFC 197590. Add hack to pass controller specific information to phy driver. Unlike most other PHYs there is no easy way to know which media type the PHY supports on Marvell PHYs. MIIF_HAVEFIBER flags is now passed via bus-specific instance variable of a device. While I'm here add 88E1112 specific work around to set SIGDET polarity low. Many thanks "Eugene Perevyazko dnepro dot net>" who kindly gave remote access to system with DGE-560SX. Modified: stable/7/sys/dev/mii/e1000phy.c stable/7/sys/dev/mii/e1000phyreg.h stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Sun Nov 29 19:11:03 2009 (r199916) +++ stable/7/sys/dev/mii/e1000phy.c Sun Nov 29 19:12:41 2009 (r199917) @@ -59,6 +59,9 @@ __FBSDID("$FreeBSD$"); #include "miidevs.h" #include +/* XXX */ +#include +#include #include "miibus_if.h" @@ -68,6 +71,7 @@ static int e1000phy_attach(device_t); struct e1000phy_softc { struct mii_softc mii_sc; int mii_model; + struct msk_mii_data *mmd; }; static device_method_t e1000phy_methods[] = { @@ -129,6 +133,7 @@ e1000phy_attach(device_t dev) struct mii_softc *sc; struct mii_attach_args *ma; struct mii_data *mii; + struct ifnet *ifp; esc = device_get_softc(dev); sc = &esc->mii_sc; @@ -144,6 +149,16 @@ e1000phy_attach(device_t dev) mii->mii_instance++; esc->mii_model = MII_MODEL(ma->mii_id2); + ifp = sc->mii_pdata->mii_ifp; + if (strcmp(ifp->if_dname, "msk") == 0) { + /* XXX */ + esc->mmd = device_get_ivars( + device_get_parent(device_get_parent(dev))); + if (esc->mmd != NULL && + (esc->mmd->mii_flags & MIIF_HAVEFIBER) != 0) + sc->mii_flags |= MIIF_HAVEFIBER; + } + switch (esc->mii_model) { case MII_MODEL_MARVELL_E1011: case MII_MODEL_MARVELL_E1112: @@ -198,6 +213,13 @@ e1000phy_reset(struct mii_softc *sc) reg &= ~E1000_SCR_MODE_MASK; reg |= E1000_SCR_MODE_1000BX; PHY_WRITE(sc, E1000_SCR, reg); + if (esc->mmd != NULL && esc->mmd->pmd == 'P') { + /* Set SIGDET polarity low for SFP module. */ + PHY_WRITE(sc, E1000_EADR, 1); + reg = PHY_READ(sc, E1000_SCR); + reg |= E1000_SCR_FIB_SIGDET_POLARITY; + PHY_WRITE(sc, E1000_SCR, reg); + } PHY_WRITE(sc, E1000_EADR, page); } } else { Modified: stable/7/sys/dev/mii/e1000phyreg.h ============================================================================== --- stable/7/sys/dev/mii/e1000phyreg.h Sun Nov 29 19:11:03 2009 (r199916) +++ stable/7/sys/dev/mii/e1000phyreg.h Sun Nov 29 19:12:41 2009 (r199917) @@ -248,6 +248,11 @@ #define E1000_SCR_EN_DETECT_MASK 0x0300 +/* 88E1112 page 1 fiber specific control */ +#define E1000_SCR_FIB_TX_DIS 0x0008 +#define E1000_SCR_FIB_SIGDET_POLARITY 0x0200 +#define E1000_SCR_FIB_FORCE_LINK 0x0400 + /* 88E1112 page 2 */ #define E1000_SCR_MODE_MASK 0x0380 #define E1000_SCR_MODE_AUTO 0x0180 Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:11:03 2009 (r199916) +++ stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:12:41 2009 (r199917) @@ -1445,6 +1445,7 @@ msk_attach(device_t dev) struct msk_softc *sc; struct msk_if_softc *sc_if; struct ifnet *ifp; + struct msk_mii_data *mmd; int i, port, error; uint8_t eaddr[6]; @@ -1454,7 +1455,8 @@ msk_attach(device_t dev) error = 0; sc_if = device_get_softc(dev); sc = device_get_softc(device_get_parent(dev)); - port = *(int *)device_get_ivars(dev); + mmd = device_get_ivars(dev); + port = mmd->port; sc_if->msk_if_dev = dev; sc_if->msk_port = port; @@ -1600,7 +1602,8 @@ static int mskc_attach(device_t dev) { struct msk_softc *sc; - int error, msic, msir, *port, reg; + struct msk_mii_data *mmd; + int error, msic, msir, reg; sc = device_get_softc(dev); sc->msk_dev = dev; @@ -1669,10 +1672,6 @@ mskc_attach(device_t dev) CSR_WRITE_2(sc, B0_CTST, CS_RST_SET); CSR_WRITE_2(sc, B0_CTST, CS_RST_CLR); sc->msk_pmd = CSR_READ_1(sc, B2_PMD_TYP); - if (sc->msk_pmd == 'L' || sc->msk_pmd == 'S') - sc->msk_coppertype = 0; - else - sc->msk_coppertype = 1; /* Check number of MACs. */ sc->msk_num_port = 1; if ((CSR_READ_1(sc, B2_Y2_HW_RES) & CFG_DUAL_MAC_MSK) == @@ -1812,15 +1811,18 @@ mskc_attach(device_t dev) error = ENXIO; goto fail; } - port = malloc(sizeof(int), M_DEVBUF, M_WAITOK); - if (port == NULL) { + mmd = malloc(sizeof(struct msk_mii_data), M_DEVBUF, M_WAITOK | M_ZERO); + if (mmd == NULL) { device_printf(dev, "failed to allocate memory for " "ivars of PORT_A\n"); error = ENXIO; goto fail; } - *port = MSK_PORT_A; - device_set_ivars(sc->msk_devs[MSK_PORT_A], port); + mmd->port = MSK_PORT_A; + mmd->pmd = sc->msk_pmd; + if (sc->msk_pmd == 'L' || sc->msk_pmd == 'S' || sc->msk_pmd == 'P') + mmd->mii_flags |= MIIF_HAVEFIBER; + device_set_ivars(sc->msk_devs[MSK_PORT_A], mmd); if (sc->msk_num_port > 1) { sc->msk_devs[MSK_PORT_B] = device_add_child(dev, "msk", -1); @@ -1829,15 +1831,18 @@ mskc_attach(device_t dev) error = ENXIO; goto fail; } - port = malloc(sizeof(int), M_DEVBUF, M_WAITOK); - if (port == NULL) { + mmd = malloc(sizeof(struct msk_mii_data), M_DEVBUF, M_WAITOK | M_ZERO); + if (mmd == NULL) { device_printf(dev, "failed to allocate memory for " "ivars of PORT_B\n"); error = ENXIO; goto fail; } - *port = MSK_PORT_B; - device_set_ivars(sc->msk_devs[MSK_PORT_B], port); + mmd->port = MSK_PORT_B; + mmd->pmd = sc->msk_pmd; + if (sc->msk_pmd == 'L' || sc->msk_pmd == 'S' || sc->msk_pmd == 'P') + mmd->mii_flags |= MIIF_HAVEFIBER; + device_set_ivars(sc->msk_devs[MSK_PORT_B], mmd); } error = bus_generic_attach(dev); Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Sun Nov 29 19:11:03 2009 (r199916) +++ stable/7/sys/dev/msk/if_mskreg.h Sun Nov 29 19:12:41 2009 (r199917) @@ -2403,6 +2403,12 @@ struct msk_ring_data { #define MSK_TX_TIMEOUT 5 #define MSK_PUT_WM 10 +struct msk_mii_data { + int port; + uint32_t pmd; + int mii_flags; +}; + /* Forward decl. */ struct msk_if_softc; @@ -2466,7 +2472,6 @@ struct msk_softc { uint8_t msk_num_port; int msk_ramsize; /* amount of SRAM on NIC */ uint32_t msk_pmd; /* physical media type */ - uint32_t msk_coppertype; uint32_t msk_intrmask; uint32_t msk_intrhwemask; uint32_t msk_pflags; From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:16:16 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6FCF106566C; Sun, 29 Nov 2009 19:16:16 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 964878FC08; Sun, 29 Nov 2009 19:16:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJGGft005532; Sun, 29 Nov 2009 19:16:16 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJGGCp005530; Sun, 29 Nov 2009 19:16:16 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291916.nATJGGCp005530@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:16:16 +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: r199919 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:16:16 -0000 Author: yongari Date: Sun Nov 29 19:16:16 2009 New Revision: 199919 URL: http://svn.freebsd.org/changeset/base/199919 Log: MFC 197591. Add workaround for Yukon XL which has hardware bug that can't flush FIFO. Modified: stable/7/sys/dev/msk/if_msk.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:15:08 2009 (r199918) +++ stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:16:16 2009 (r199919) @@ -3799,9 +3799,14 @@ msk_init_locked(struct msk_if_softc *sc_ /* Set receive filter. */ msk_rxfilter(sc_if); - /* Flush Rx MAC FIFO on any flow control or error. */ - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_FL_MSK), - GMR_FS_ANY_ERR); + if (sc->msk_hw_id == CHIP_ID_YUKON_XL) { + /* Clear flush mask - HW bug. */ + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_FL_MSK), 0); + } else { + /* Flush Rx MAC FIFO on any flow control or error. */ + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_FL_MSK), + GMR_FS_ANY_ERR); + } /* * Set Rx FIFO flush threshold to 64 bytes + 1 FIFO word From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:19:23 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E2DF1065670; Sun, 29 Nov 2009 19:19:23 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D6088FC1D; Sun, 29 Nov 2009 19:19:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJJNDl005700; Sun, 29 Nov 2009 19:19:23 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJJNmj005697; Sun, 29 Nov 2009 19:19:23 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291919.nATJJNmj005697@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:19:23 +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: r199921 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:19:23 -0000 Author: yongari Date: Sun Nov 29 19:19:23 2009 New Revision: 199921 URL: http://svn.freebsd.org/changeset/base/199921 Log: MFC 197592. Add DGE-560SX(Yukon XL) to the supported device list. Many thanks to "Eugene Perevyazko dnepro dot net>" who kindly gave remote access to system with DGE-560SX. Modified: stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:18:22 2009 (r199920) +++ stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:19:23 2009 (r199921) @@ -223,6 +223,8 @@ static struct msk_product { "Marvell Yukon 88E8072 Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE550SX, "D-Link 550SX Gigabit Ethernet" }, + { VENDORID_DLINK, DEVICEID_DLINK_DGE560SX, + "D-Link 560SX Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE560T, "D-Link 560T Gigabit Ethernet" } }; Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Sun Nov 29 19:18:22 2009 (r199920) +++ stable/7/sys/dev/msk/if_mskreg.h Sun Nov 29 19:19:23 2009 (r199921) @@ -148,6 +148,7 @@ * D-Link gigabit ethernet device ID */ #define DEVICEID_DLINK_DGE550SX 0x4001 +#define DEVICEID_DLINK_DGE560SX 0x4002 #define DEVICEID_DLINK_DGE560T 0x4b00 #define BIT_31 (1 << 31) From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:23:26 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 297321065692; Sun, 29 Nov 2009 19:23:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18C1E8FC17; Sun, 29 Nov 2009 19:23:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJNPl3005891; Sun, 29 Nov 2009 19:23:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJNPBM005889; Sun, 29 Nov 2009 19:23:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291923.nATJNPBM005889@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:23:25 +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: r199923 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:23:26 -0000 Author: yongari Date: Sun Nov 29 19:23:25 2009 New Revision: 199923 URL: http://svn.freebsd.org/changeset/base/199923 Log: MFC 197593. DGE-560SX is now supported. Modified: stable/7/share/man/man4/msk.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/msk.4 ============================================================================== --- stable/7/share/man/man4/msk.4 Sun Nov 29 19:22:44 2009 (r199922) +++ stable/7/share/man/man4/msk.4 Sun Nov 29 19:23:25 2009 (r199923) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 2, 2009 +.Dd September 28, 2009 .Dt MSK 4 .Os .Sh NAME @@ -158,6 +158,8 @@ Yukon II based Gigabit Ethernet controll .It D-Link 550SX Gigabit Ethernet .It +D-Link 560SX Gigabit Ethernet +.It D-Link 560T Gigabit Ethernet .It Marvell Yukon 88E8021CU Gigabit Ethernet From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:26:32 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CA981065706; Sun, 29 Nov 2009 19:26:32 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C0DC8FC2B; Sun, 29 Nov 2009 19:26:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJQWCa006045; Sun, 29 Nov 2009 19:26:32 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJQWYi006043; Sun, 29 Nov 2009 19:26:32 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291926.nATJQWYi006043@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:26:32 +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: r199925 - stable/7/sys/dev/alc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:26:32 -0000 Author: yongari Date: Sun Nov 29 19:26:31 2009 New Revision: 199925 URL: http://svn.freebsd.org/changeset/base/199925 Log: MFC 197600. For AR8132 fast ethernet controller, do not report 1000baseT capability to mii(4). Even though AR8132 uses the same model/ revision number of F1 gigabit PHY, the PHY has no ability to establish 1000baseT link. I have no idea why Atheros use the same device/model id for this PHY. With this change atphy(4) does not report 1000baseT media capability and manual 1000baseT configuration is also disabled which is more desirable behavior for 10/100Mbps PHY. Modified: stable/7/sys/dev/alc/if_alc.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/alc/if_alc.c ============================================================================== --- stable/7/sys/dev/alc/if_alc.c Sun Nov 29 19:25:15 2009 (r199924) +++ stable/7/sys/dev/alc/if_alc.c Sun Nov 29 19:26:31 2009 (r199925) @@ -234,6 +234,16 @@ alc_miibus_readreg(device_t dev, int phy if (phy != sc->alc_phyaddr) return (0); + /* + * For AR8132 fast ethernet controller, do not report 1000baseT + * capability to mii(4). Even though AR8132 uses the same + * model/revision number of F1 gigabit PHY, the PHY has no + * ability to establish 1000baseT link. + */ + if ((sc->alc_flags & ALC_FLAG_FASTETHER) != 0 && + reg == MII_EXTSR) + return (0); + CSR_WRITE_4(sc, ALC_MDIO, MDIO_OP_EXECUTE | MDIO_OP_READ | MDIO_SUP_PREAMBLE | MDIO_CLK_25_4 | MDIO_REG_ADDR(reg)); for (i = ALC_PHY_TIMEOUT; i > 0; i--) { From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:30:55 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35F291065785; Sun, 29 Nov 2009 19:30:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A7C48FC15; Sun, 29 Nov 2009 19:30:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJUsma006225; Sun, 29 Nov 2009 19:30:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJUsBx006220; Sun, 29 Nov 2009 19:30:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291930.nATJUsBx006220@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:30:54 +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: r199927 - in stable/7/sys/dev: ae age alc ale X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:30:55 -0000 Author: yongari Date: Sun Nov 29 19:30:54 2009 New Revision: 199927 URL: http://svn.freebsd.org/changeset/base/199927 Log: MFC 197627. Fix multicast handling. All Atheros controllers use big-endian form in computing multicast hash. PR: kern/139137 Modified: stable/7/sys/dev/ae/if_ae.c stable/7/sys/dev/age/if_age.c stable/7/sys/dev/alc/if_alc.c stable/7/sys/dev/ale/if_ale.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ae/if_ae.c ============================================================================== --- stable/7/sys/dev/ae/if_ae.c Sun Nov 29 19:29:11 2009 (r199926) +++ stable/7/sys/dev/ae/if_ae.c Sun Nov 29 19:30:54 2009 (r199927) @@ -2077,7 +2077,7 @@ ae_rxfilter(ae_softc_t *sc) TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - crc = ether_crc32_le(LLADDR((struct sockaddr_dl *) + crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), ETHER_ADDR_LEN); mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); } Modified: stable/7/sys/dev/age/if_age.c ============================================================================== --- stable/7/sys/dev/age/if_age.c Sun Nov 29 19:29:11 2009 (r199926) +++ stable/7/sys/dev/age/if_age.c Sun Nov 29 19:30:54 2009 (r199927) @@ -3135,7 +3135,7 @@ age_rxfilter(struct age_softc *sc) TAILQ_FOREACH(ifma, &sc->age_ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - crc = ether_crc32_le(LLADDR((struct sockaddr_dl *) + crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), ETHER_ADDR_LEN); mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); } Modified: stable/7/sys/dev/alc/if_alc.c ============================================================================== --- stable/7/sys/dev/alc/if_alc.c Sun Nov 29 19:29:11 2009 (r199926) +++ stable/7/sys/dev/alc/if_alc.c Sun Nov 29 19:30:54 2009 (r199927) @@ -3476,7 +3476,7 @@ alc_rxfilter(struct alc_softc *sc) TAILQ_FOREACH(ifma, &sc->alc_ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - crc = ether_crc32_le(LLADDR((struct sockaddr_dl *) + crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), ETHER_ADDR_LEN); mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); } Modified: stable/7/sys/dev/ale/if_ale.c ============================================================================== --- stable/7/sys/dev/ale/if_ale.c Sun Nov 29 19:29:11 2009 (r199926) +++ stable/7/sys/dev/ale/if_ale.c Sun Nov 29 19:30:54 2009 (r199927) @@ -3060,7 +3060,7 @@ ale_rxfilter(struct ale_softc *sc) TAILQ_FOREACH(ifma, &sc->ale_ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - crc = ether_crc32_le(LLADDR((struct sockaddr_dl *) + crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), ETHER_ADDR_LEN); mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); } From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:47:31 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F04C0106568B; Sun, 29 Nov 2009 19:47:31 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFA698FC18; Sun, 29 Nov 2009 19:47:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJlVqM006611; Sun, 29 Nov 2009 19:47:31 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJlVKV006608; Sun, 29 Nov 2009 19:47:31 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291947.nATJlVKV006608@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:47:31 +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: r199929 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:47:32 -0000 Author: yongari Date: Sun Nov 29 19:47:31 2009 New Revision: 199929 URL: http://svn.freebsd.org/changeset/base/199929 Log: MFC 198813. Add BCM5761 PHY id. Modified: stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/miidevs Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Sun Nov 29 19:46:15 2009 (r199928) +++ stable/7/sys/dev/mii/brgphy.c Sun Nov 29 19:47:31 2009 (r199929) @@ -134,6 +134,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709CAX), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5722), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Sun Nov 29 19:46:15 2009 (r199928) +++ stable/7/sys/dev/mii/miidevs Sun Nov 29 19:47:31 2009 (r199929) @@ -149,6 +149,7 @@ model xxBROADCOM_ALT1 BCM5708S 0x0015 BC model xxBROADCOM_ALT1 BCM5709CAX 0x002c BCM5709C(AX) 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5722 0x002d BCM5722 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:50:39 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 743FC1065679; Sun, 29 Nov 2009 19:50:39 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63D8D8FC0C; Sun, 29 Nov 2009 19:50:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJod1a006766; Sun, 29 Nov 2009 19:50:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJodsM006764; Sun, 29 Nov 2009 19:50:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291950.nATJodsM006764@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:50:39 +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: r199931 - stable/7/sys/dev/re X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:50:39 -0000 Author: yongari Date: Sun Nov 29 19:50:39 2009 New Revision: 199931 URL: http://svn.freebsd.org/changeset/base/199931 Log: MFC 198814. Add a check to know whether driver is still running after reacquiring driver lock in Rx handler. re(4) drops a driver lock before passing received frame to upper stack and reacquire the lock. During the time window ioctl calls could be executed and if the ioctl was interface down request, driver will stop the controller and free allocated mbufs. After that when driver comes back to Rx handler again it does not know what was happend so it could access free mbufs which in turn cause panic. Reported by: Norbert Papke < npapk <> acm dot org > Tested by: Norbert Papke < npapk <> acm dot org > Modified: stable/7/sys/dev/re/if_re.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Sun Nov 29 19:49:21 2009 (r199930) +++ stable/7/sys/dev/re/if_re.c Sun Nov 29 19:50:39 2009 (r199931) @@ -1814,6 +1814,8 @@ re_rxeof(struct rl_softc *sc) for (i = sc->rl_ldata.rl_rx_prodidx; maxpkt > 0; i = RL_RX_DESC_NXT(sc, i)) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; cur_rx = &sc->rl_ldata.rl_rx_list[i]; rxstat = le32toh(cur_rx->rl_cmdstat); if ((rxstat & RL_RDESC_STAT_OWN) != 0) From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:56:49 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0292106566C; Sun, 29 Nov 2009 19:56:49 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF8DE8FC1A; Sun, 29 Nov 2009 19:56:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJunSc007005; Sun, 29 Nov 2009 19:56:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJunu6007003; Sun, 29 Nov 2009 19:56:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291956.nATJunu6007003@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:56:49 +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: r199933 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:56:50 -0000 Author: yongari Date: Sun Nov 29 19:56:49 2009 New Revision: 199933 URL: http://svn.freebsd.org/changeset/base/199933 Log: MFC 198996-198997. r198996: Remove unnecessary header file. r198997: It's normal to see Rx FIFO overruns under high network load and showing the message creates other side-effects. Remove the Rx FIFO overrun message in interrupt handler. msk(4) should recover from the FIFO overruns without any user intervention. Users can still check the Rx FIFO overrun counter from MAC MIB statistics maintained in driver(dev.msk.0.stats.rx.overflows). Modified: stable/7/sys/dev/msk/if_msk.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:54:32 2009 (r199932) +++ stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:56:49 2009 (r199933) @@ -137,7 +137,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -3216,11 +3215,9 @@ msk_intr_gmac(struct msk_if_softc *sc_if status = CSR_READ_1(sc, MR_ADDR(sc_if->msk_port, GMAC_IRQ_SRC)); /* GMAC Rx FIFO overrun. */ - if ((status & GM_IS_RX_FF_OR) != 0) { + if ((status & GM_IS_RX_FF_OR) != 0) CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), GMF_CLI_RX_FO); - device_printf(sc_if->msk_if_dev, "Rx FIFO overrun!\n"); - } /* GMAC Tx FIFO underrun. */ if ((status & GM_IS_TX_FF_UR) != 0) { CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 19:59:40 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D4BC10656A4; Sun, 29 Nov 2009 19:59:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 839F28FC14; Sun, 29 Nov 2009 19:59:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATJxeMi007186; Sun, 29 Nov 2009 19:59:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATJxeRl007183; Sun, 29 Nov 2009 19:59:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911291959.nATJxeRl007183@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 19:59:40 +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: r199935 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:59:40 -0000 Author: yongari Date: Sun Nov 29 19:59:40 2009 New Revision: 199935 URL: http://svn.freebsd.org/changeset/base/199935 Log: MFC r199012: Add preliminary Yukon Ultra 2 support(88E8057). The controller looks very similar to Yukon EC Ultra. Tested by: kalin m ( kalin <> el dot net ) Modified: stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:58:35 2009 (r199934) +++ stable/7/sys/dev/msk/if_msk.c Sun Nov 29 19:59:40 2009 (r199935) @@ -220,6 +220,8 @@ static struct msk_product { "Marvell Yukon 88E8071 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_436C, "Marvell Yukon 88E8072 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_4380, + "Marvell Yukon 88E8057 Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE550SX, "D-Link 550SX Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE560SX, @@ -234,7 +236,9 @@ static const char *model_name[] = { "Yukon EX", "Yukon EC", "Yukon FE", - "Yukon FE+" + "Yukon FE+", + "Yukon Supreme", + "Yukon Ultra 2" }; static int mskc_probe(device_t); @@ -1141,6 +1145,7 @@ msk_phy_power(struct msk_softc *sc, int case CHIP_ID_YUKON_EC_U: case CHIP_ID_YUKON_EX: case CHIP_ID_YUKON_FE_P: + case CHIP_ID_YUKON_UL_2: CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ @@ -1644,7 +1649,8 @@ mskc_attach(device_t dev) sc->msk_hw_rev = (CSR_READ_1(sc, B2_MAC_CFG) >> 4) & 0x0f; /* Bail out if chip is not recognized. */ if (sc->msk_hw_id < CHIP_ID_YUKON_XL || - sc->msk_hw_id > CHIP_ID_YUKON_FE_P) { + sc->msk_hw_id > CHIP_ID_YUKON_UL_2 || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR) { device_printf(dev, "unknown device: id=0x%02x, rev=0x%02x\n", sc->msk_hw_id, sc->msk_hw_rev); mtx_destroy(&sc->msk_mtx); @@ -1743,6 +1749,10 @@ mskc_attach(device_t dev) sc->msk_clock = 156; /* 156 Mhz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; + case CHIP_ID_YUKON_UL_2: + sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_pflags |= MSK_FLAG_JUMBO; + break; default: sc->msk_clock = 156; /* 156 Mhz */ break; Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Sun Nov 29 19:58:35 2009 (r199934) +++ stable/7/sys/dev/msk/if_mskreg.h Sun Nov 29 19:59:40 2009 (r199935) @@ -143,6 +143,7 @@ #define DEVICEID_MRVL_436A 0x436A #define DEVICEID_MRVL_436B 0x436B #define DEVICEID_MRVL_436C 0x436C +#define DEVICEID_MRVL_4380 0x4380 /* * D-Link gigabit ethernet device ID @@ -890,6 +891,8 @@ #define CHIP_ID_YUKON_EC 0xb6 /* Chip ID for YUKON-2 EC */ #define CHIP_ID_YUKON_FE 0xb7 /* Chip ID for YUKON-2 FE */ #define CHIP_ID_YUKON_FE_P 0xb8 /* Chip ID for YUKON-2 FE+ */ +#define CHIP_ID_YUKON_SUPR 0xb9 /* Chip ID for YUKON-2 Supreme */ +#define CHIP_ID_YUKON_UL_2 0xba /* Chip ID for YUKON-2 Ultra 2 */ #define CHIP_REV_YU_XL_A0 0 /* Chip Rev. for Yukon-2 A0 */ #define CHIP_REV_YU_XL_A1 1 /* Chip Rev. for Yukon-2 A1 */ From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 20:09:36 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FD06106566C; Sun, 29 Nov 2009 20:09:36 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2148FC12; Sun, 29 Nov 2009 20:09:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATK9aDG007528; Sun, 29 Nov 2009 20:09:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATK9aV8007525; Sun, 29 Nov 2009 20:09:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911292009.nATK9aV8007525@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 20:09:36 +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: r199937 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 20:09:36 -0000 Author: yongari Date: Sun Nov 29 20:09:35 2009 New Revision: 199937 URL: http://svn.freebsd.org/changeset/base/199937 Log: MFC r198475: - Add support for Marvell Yukon 88E8042 device. Modified: stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sun Nov 29 20:06:57 2009 (r199936) +++ stable/7/sys/dev/msk/if_msk.c Sun Nov 29 20:09:35 2009 (r199937) @@ -200,6 +200,8 @@ static struct msk_product { "Marvell Yukon 88E8040 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_8040T, "Marvell Yukon 88E8040T Fast Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_8042, + "Marvell Yukon 88E8042 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_8048, "Marvell Yukon 88E8048 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4361, Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Sun Nov 29 20:06:57 2009 (r199936) +++ stable/7/sys/dev/msk/if_mskreg.h Sun Nov 29 20:09:35 2009 (r199937) @@ -133,6 +133,7 @@ #define DEVICEID_MRVL_8039 0x4353 #define DEVICEID_MRVL_8040 0x4354 #define DEVICEID_MRVL_8040T 0x4355 +#define DEVICEID_MRVL_8042 0x4357 #define DEVICEID_MRVL_8048 0x435A #define DEVICEID_MRVL_4360 0x4360 #define DEVICEID_MRVL_4361 0x4361 From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 20:10:35 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EAD5106566B; Sun, 29 Nov 2009 20:10:35 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E4048FC0C; Sun, 29 Nov 2009 20:10:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATKAZp7007601; Sun, 29 Nov 2009 20:10:35 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATKAZqY007599; Sun, 29 Nov 2009 20:10:35 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911292010.nATKAZqY007599@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 20:10:35 +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: r199938 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 20:10:35 -0000 Author: yongari Date: Sun Nov 29 20:10:35 2009 New Revision: 199938 URL: http://svn.freebsd.org/changeset/base/199938 Log: MFC r198475: - Add support for Marvell Yukon 88E8042 device. Modified: stable/7/share/man/man4/msk.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/msk.4 ============================================================================== --- stable/7/share/man/man4/msk.4 Sun Nov 29 20:09:35 2009 (r199937) +++ stable/7/share/man/man4/msk.4 Sun Nov 29 20:10:35 2009 (r199938) @@ -190,6 +190,8 @@ Marvell Yukon 88E8040 Fast Ethernet .It Marvell Yukon 88E8040T Fast Ethernet .It +Marvell Yukon 88E8042 Fast Ethernet +.It Marvell Yukon 88E8048 Fast Ethernet .It Marvell Yukon 88E8050 Gigabit Ethernet From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 20:12:07 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1F581065679; Sun, 29 Nov 2009 20:12:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 918F48FC14; Sun, 29 Nov 2009 20:12:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATKC7V0007738; Sun, 29 Nov 2009 20:12:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATKC7IK007736; Sun, 29 Nov 2009 20:12:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911292012.nATKC7IK007736@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 20:12:07 +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: r199940 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 20:12:07 -0000 Author: yongari Date: Sun Nov 29 20:12:07 2009 New Revision: 199940 URL: http://svn.freebsd.org/changeset/base/199940 Log: MFC r199013: 88E8057(Ultra 2) is now supported. Modified: stable/7/share/man/man4/msk.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/msk.4 ============================================================================== --- stable/7/share/man/man4/msk.4 Sun Nov 29 20:11:38 2009 (r199939) +++ stable/7/share/man/man4/msk.4 Sun Nov 29 20:12:07 2009 (r199940) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2009 +.Dd November 6, 2009 .Dt MSK 4 .Os .Sh NAME @@ -204,6 +204,8 @@ Marvell Yukon 88E8055 Gigabit Ethernet .It Marvell Yukon 88E8056 Gigabit Ethernet .It +Marvell Yukon 88E8057 Gigabit Ethernet +.It Marvell Yukon 88E8058 Gigabit Ethernet .It Marvell Yukon 88E8070 Gigabit Ethernet From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 20:20:34 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D292C1065676; Sun, 29 Nov 2009 20:20:34 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C23098FC16; Sun, 29 Nov 2009 20:20:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATKKYjd008039; Sun, 29 Nov 2009 20:20:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATKKYD1008037; Sun, 29 Nov 2009 20:20:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911292020.nATKKYD1008037@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 20:20:34 +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: r199943 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 20:20:34 -0000 Author: yongari Date: Sun Nov 29 20:20:34 2009 New Revision: 199943 URL: http://svn.freebsd.org/changeset/base/199943 Log: MFC r199413: It seems generation of link state change of e1000phy(4) is not reliable on some Marvell PHYs. If msk(4) know it still does not have established link check whether msk(4) missed the link state change by looking into polled link state. Reported by: Mel Flynn < mel.flynn+fbsd.current <> mailing.thruhere dot net >, Gleb Kurtsou gmail dot com > Tested by: Gleb Kurtsou gmail dot com > Modified: stable/7/sys/dev/msk/if_msk.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sun Nov 29 20:19:24 2009 (r199942) +++ stable/7/sys/dev/msk/if_msk.c Sun Nov 29 20:20:34 2009 (r199943) @@ -3200,6 +3200,8 @@ msk_tick(void *xsc_if) mii = device_get_softc(sc_if->msk_miibus); mii_tick(mii); + if ((sc_if->msk_flags & MSK_FLAG_LINK) == 0) + msk_miibus_statchg(sc_if->msk_if_dev); msk_watchdog(sc_if); callout_reset(&sc_if->msk_tick_ch, hz, msk_tick, sc_if); } From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 20:31:09 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A00621065692; Sun, 29 Nov 2009 20:31:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2538FC1F; Sun, 29 Nov 2009 20:31:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATKV9uX008270; Sun, 29 Nov 2009 20:31:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATKV9RV008267; Sun, 29 Nov 2009 20:31:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911292031.nATKV9RV008267@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 20:31:09 +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: r199944 - in stable/7/sys: dev/re pci X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 20:31:09 -0000 Author: yongari Date: Sun Nov 29 20:31:09 2009 New Revision: 199944 URL: http://svn.freebsd.org/changeset/base/199944 Log: MFC r195675: Adding hardware ID for RTL810x PCIe found on HP Pavilion DV2-1022AX. Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Sun Nov 29 20:20:34 2009 (r199943) +++ stable/7/sys/dev/re/if_re.c Sun Nov 29 20:31:09 2009 (r199944) @@ -211,6 +211,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8101E, RL_8169, "8101E"}, { RL_HWREV_8102E, RL_8169, "8102E"}, { RL_HWREV_8102EL, RL_8169, "8102EL"}, + { RL_HWREV_8102EL_SPIN1, RL_8169, "8102EL"}, { RL_HWREV_8168_SPIN2, RL_8169, "8168"}, { RL_HWREV_8168_SPIN3, RL_8169, "8168"}, { RL_HWREV_8168C, RL_8169, "8168C/8111C"}, @@ -1261,6 +1262,7 @@ re_attach(device_t dev) break; case RL_HWREV_8102E: case RL_HWREV_8102EL: + case RL_HWREV_8102EL_SPIN1: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP; Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Sun Nov 29 20:20:34 2009 (r199943) +++ stable/7/sys/pci/if_rlreg.h Sun Nov 29 20:31:09 2009 (r199944) @@ -159,6 +159,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 +#define RL_HWREV_8102EL_SPIN1 0x24c00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 #define RL_HWREV_8168_SPIN1 0x30000000 From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 29 20:34:41 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4F73106568D; Sun, 29 Nov 2009 20:34:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2188FC16; Sun, 29 Nov 2009 20:34:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATKYf2F008399; Sun, 29 Nov 2009 20:34:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATKYfOE008396; Sun, 29 Nov 2009 20:34:41 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911292034.nATKYfOE008396@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 29 Nov 2009 20:34:41 +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: r199945 - in stable/7/sys: dev/re pci X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 20:34:42 -0000 Author: yongari Date: Sun Nov 29 20:34:41 2009 New Revision: 199945 URL: http://svn.freebsd.org/changeset/base/199945 Log: MFC r191301: For RTL8139C+ controllers, have controller handle padding short checksum offload frames. Software workaround used for broken controllers(RTL8169, RTL8168, RTL8168B) seem to cause watchdog timeouts on RTL8139C+. Introduce a new flag RL_FLAG_AUTOPAD to mark automatic padding feature of controller and set it for RTL8139C+ and controllers that use new descriptor format. This fixes watchdog timeouts seen on RTL8139C+. Reported by: Dimitri Rodis < DimitriR <> integritasystems dot com > Tested by: Dimitri Rodis < DimitriR <> integritasystems dot com > Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Sun Nov 29 20:31:09 2009 (r199944) +++ stable/7/sys/dev/re/if_re.c Sun Nov 29 20:34:41 2009 (r199945) @@ -1253,7 +1253,8 @@ re_attach(device_t dev) switch (hw_rev->rl_rev) { case RL_HWREV_8139CPLUS: - sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_FASTETHER; + sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_FASTETHER | + RL_FLAG_AUTOPAD; break; case RL_HWREV_8100E: case RL_HWREV_8101E: @@ -1265,7 +1266,7 @@ re_attach(device_t dev) case RL_HWREV_8102EL_SPIN1: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | - RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP; + RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD; break; case RL_HWREV_8168_SPIN1: case RL_HWREV_8168_SPIN2: @@ -1285,7 +1286,8 @@ re_attach(device_t dev) case RL_HWREV_8168D: case RL_HWREV_8168DP: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | - RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP; + RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | + RL_FLAG_AUTOPAD; /* * These controllers support jumbo frame but it seems * that enabling it requires touching additional magic @@ -2257,7 +2259,7 @@ re_encap(struct rl_softc *sc, struct mbu * offload is enabled, we always manually pad short frames out * to the minimum ethernet frame size. */ - if ((sc->rl_flags & RL_FLAG_DESCV2) == 0 && + if ((sc->rl_flags & RL_FLAG_AUTOPAD) == 0 && (*m_head)->m_pkthdr.len < RL_IP4CSUMTX_PADLEN && ((*m_head)->m_pkthdr.csum_flags & CSUM_IP) != 0) { padlen = RL_MIN_FRAMELEN - (*m_head)->m_pkthdr.len; Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Sun Nov 29 20:31:09 2009 (r199944) +++ stable/7/sys/pci/if_rlreg.h Sun Nov 29 20:34:41 2009 (r199945) @@ -855,6 +855,7 @@ struct rl_softc { int rl_txstart; uint32_t rl_flags; #define RL_FLAG_MSI 0x0001 +#define RL_FLAG_AUTOPAD 0x0002 #define RL_FLAG_PHYWAKE 0x0008 #define RL_FLAG_NOJUMBO 0x0010 #define RL_FLAG_PAR 0x0020 From owner-svn-src-stable-7@FreeBSD.ORG Mon Nov 30 08:01:19 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AFCB1065670; Mon, 30 Nov 2009 08:01:19 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED1898FC12; Mon, 30 Nov 2009 08:01:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAU81I2G022838; Mon, 30 Nov 2009 08:01:18 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAU81I6W022836; Mon, 30 Nov 2009 08:01:18 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911300801.nAU81I6W022836@svn.freebsd.org> From: Christian Brueffer Date: Mon, 30 Nov 2009 08:01:18 +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: r199967 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2009 08:01:19 -0000 Author: brueffer Date: Mon Nov 30 08:01:18 2009 New Revision: 199967 URL: http://svn.freebsd.org/changeset/base/199967 Log: MFC: r199739, r199825 - LSI MegaRAID 9260 works, sort the hardware list while here. - Add IBM ServeRAID-MR10i to the hardware list. Modified: stable/7/share/man/man4/mfi.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/mfi.4 ============================================================================== --- stable/7/share/man/man4/mfi.4 Mon Nov 30 07:54:22 2009 (r199966) +++ stable/7/share/man/man4/mfi.4 Mon Nov 30 08:01:18 2009 (r199967) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2008 +.Dd November 26, 2009 .Dt MFI 4 .Os .Sh NAME @@ -79,15 +79,19 @@ driver supports the following hardware: .Pp .Bl -bullet -compact .It +LSI MegaRAID SAS 1078 +.It LSI MegaRAID SAS 8408E .It LSI MegaRAID SAS 8480E .It -LSI MegaRAID SAS 1078 +LSI MegaRAID SAS 9260 .It Dell PERC5 .It Dell PERC6 +.It +IBM ServeRAID-MR10i .El .Sh FILES .Bl -tag -width ".Pa /dev/mfid?" -compact From owner-svn-src-stable-7@FreeBSD.ORG Mon Nov 30 20:02:58 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49A53106566B; Mon, 30 Nov 2009 20:02:58 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id D422F8FC13; Mon, 30 Nov 2009 20:02:57 +0000 (UTC) Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net [70.71.167.197]) (authenticated bits=0) by sippysoft.com (8.14.3/8.14.3) with ESMTP id nAUJTmi0089693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Nov 2009 11:29:49 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4B141D2E.1000203@FreeBSD.org> Date: Mon, 30 Nov 2009 11:29:50 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Stanislav Sedov References: <200911151143.nAFBhTSD036619@svn.freebsd.org> In-Reply-To: <200911151143.nAFBhTSD036619@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2009 20:02:58 -0000 Is the option related to Jumbo Frames in any way? If not, IMHO the name should be changed to avoid any confusion. -Maxim Stanislav Sedov wrote: > Author: stas > Date: Sun Nov 15 11:43:28 2009 > New Revision: 199289 > URL: http://svn.freebsd.org/changeset/base/199289 > > Log: > - MFC r198320: > Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header > in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not > into if_bce.c anyway. It is disabled by default. > > PR: If a GNATS PR is affected by the change. > > Submitted by: If someone else sent in the change. > > Reviewed by: If someone else reviewed your modification. > > Approved by: If you needed approval for this commit. > > Obtained from: If the change is from a third party. > > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > > Security: Vulnerability reference (one per line) or description. > > Empty fields above will be automatically removed. > > _M 7/sys > M 7/sys/conf/NOTES > M 7/sys/conf/options > M 7/sys/dev/bce/if_bce.c > M 7/sys/dev/bce/if_bcereg.h > _M 7/sys/contrib/pf > > Modified: > stable/7/sys/conf/NOTES > stable/7/sys/conf/options > stable/7/sys/dev/bce/if_bce.c > stable/7/sys/dev/bce/if_bcereg.h > Directory Properties: > stable/7/sys/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > > Modified: stable/7/sys/conf/NOTES > ============================================================================== > --- stable/7/sys/conf/NOTES Sun Nov 15 11:30:59 2009 (r199288) > +++ stable/7/sys/conf/NOTES Sun Nov 15 11:43:28 2009 (r199289) > @@ -1929,6 +1929,12 @@ device lmc > # only works for Tigon II chips, and has no effect for Tigon I chips. > options TI_JUMBO_HDRSPLIT > > +# > +# Use header splitting feature on bce(4) adapters. > +# This may help to reduce the amount of jumbo-sized memory buffers used. > +# > +options BCE_JUMBO_HDRSPLIT > + > # These two options allow manipulating the mbuf cluster size and mbuf size, > # respectively. Be very careful with NIC driver modules when changing > # these from their default values, because that can potentially cause a > > Modified: stable/7/sys/conf/options > ============================================================================== > --- stable/7/sys/conf/options Sun Nov 15 11:30:59 2009 (r199288) > +++ stable/7/sys/conf/options Sun Nov 15 11:43:28 2009 (r199289) > @@ -493,6 +493,7 @@ DRM_DEBUG opt_drm.h > ZERO_COPY_SOCKETS opt_zero.h > TI_PRIVATE_JUMBOS opt_ti.h > TI_JUMBO_HDRSPLIT opt_ti.h > +BCE_JUMBO_HDRSPLIT opt_bce.h > > # XXX Conflict: # of devices vs network protocol (Native ATM). > # This makes "atm.h" unusable. > > Modified: stable/7/sys/dev/bce/if_bce.c > ============================================================================== > --- stable/7/sys/dev/bce/if_bce.c Sun Nov 15 11:30:59 2009 (r199288) > +++ stable/7/sys/dev/bce/if_bce.c Sun Nov 15 11:43:28 2009 (r199289) > @@ -293,12 +293,12 @@ static void bce_dump_enet (str > static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); > static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); > static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); > #endif > static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); > static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); > #endif > static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); > @@ -306,7 +306,7 @@ static void bce_dump_ctx (struct bce_s > static void bce_dump_ftqs (struct bce_softc *); > static void bce_dump_tx_chain (struct bce_softc *, u16, int); > static void bce_dump_rx_chain (struct bce_softc *, u16, int); > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > static void bce_dump_pg_chain (struct bce_softc *, u16, int); > #endif > static void bce_dump_status_block (struct bce_softc *); > @@ -391,7 +391,7 @@ static int bce_init_rx_chain (struct b > static void bce_fill_rx_chain (struct bce_softc *); > static void bce_free_rx_chain (struct bce_softc *); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); > static int bce_init_pg_chain (struct bce_softc *); > static void bce_fill_pg_chain (struct bce_softc *); > @@ -597,7 +597,7 @@ bce_print_adapter_info(struct bce_softc > > /* Firmware version and device features. */ > printf("B/C (0x%08X); Flags( ", sc->bce_bc_ver); > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > printf("SPLT "); > #endif > if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) > @@ -1013,7 +1013,7 @@ bce_attach(device_t dev) > * This may change later if the MTU size is set to > * something other than 1500. > */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sc->rx_bd_mbuf_alloc_size = MHLEN; > /* Make sure offset is 16 byte aligned for hardware. */ > sc->rx_bd_mbuf_align_pad = roundup2((MSIZE - MHLEN), 16) - > @@ -2753,7 +2753,7 @@ bce_dma_free(struct bce_softc *sc) > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* Free, unmap and destroy all page buffer descriptor chain pages. */ > for (i = 0; i < PG_PAGES; i++ ) { > if (sc->pg_bd_chain[i] != NULL) { > @@ -2817,7 +2817,7 @@ bce_dma_free(struct bce_softc *sc) > sc->rx_mbuf_tag = NULL; > } > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* Unload and destroy the page mbuf maps. */ > for (i = 0; i < TOTAL_PG_BD; i++) { > if (sc->pg_mbuf_map[i] != NULL) { > @@ -3263,7 +3263,7 @@ bce_dma_alloc(device_t dev) > /* > * Create a DMA tag for RX mbufs. > */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > max_size = max_seg_size = ((sc->rx_bd_mbuf_alloc_size < MCLBYTES) ? > MCLBYTES : sc->rx_bd_mbuf_alloc_size); > #else > @@ -3304,7 +3304,7 @@ bce_dma_alloc(device_t dev) > } > } > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* > * Create a DMA tag for the page buffer descriptor chain, > * allocate and clear the memory, and fetch the physical > @@ -4393,7 +4393,7 @@ bce_stop(struct bce_softc *sc) > bce_disable_intr(sc); > > /* Free RX buffers. */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > bce_free_pg_chain(sc); > #endif > bce_free_rx_chain(sc); > @@ -4831,7 +4831,7 @@ bce_get_rx_buf(struct bce_softc *sc, str > goto bce_get_rx_buf_exit); > > /* This is a new mbuf allocation. */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > MGETHDR(m_new, M_DONTWAIT, MT_DATA); > #else > if (sc->rx_bd_mbuf_alloc_size <= MCLBYTES) > @@ -4912,7 +4912,7 @@ bce_get_rx_buf_exit: > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Encapsulate an mbuf cluster into the page chain. */ > /* */ > @@ -5021,7 +5021,7 @@ bce_get_pg_buf_exit: > > return(rc); > } > -#endif /* ZERO_COPY_SOCKETS */ > +#endif /* BCE_JUMBO_HDRSPLIT */ > > /****************************************************************************/ > /* Initialize the TX context memory. */ > @@ -5377,7 +5377,7 @@ bce_free_rx_chain(struct bce_softc *sc) > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Allocate memory and initialize the page data structures. */ > /* Assumes that bce_init_rx_chain() has not already been called. */ > @@ -5541,7 +5541,7 @@ bce_free_pg_chain(struct bce_softc *sc) > > DBEXIT(BCE_VERBOSE_RESET | BCE_VERBOSE_RECV | BCE_VERBOSE_UNLOAD); > } > -#endif /* ZERO_COPY_SOCKETS */ > +#endif /* BCE_JUMBO_HDRSPLIT */ > > > /****************************************************************************/ > @@ -5714,7 +5714,7 @@ bce_rx_intr(struct bce_softc *sc) > unsigned int pkt_len; > u16 sw_rx_cons, sw_rx_cons_idx, hw_rx_cons; > u32 status; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > unsigned int rem_len; > u16 sw_pg_cons, sw_pg_cons_idx; > #endif > @@ -5730,7 +5730,7 @@ bce_rx_intr(struct bce_softc *sc) > bus_dmamap_sync(sc->rx_bd_chain_tag, > sc->rx_bd_chain_map[i], BUS_DMASYNC_POSTREAD); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* Prepare the page chain pages to be accessed by the host CPU. */ > for (int i = 0; i < PG_PAGES; i++) > bus_dmamap_sync(sc->pg_bd_chain_tag, > @@ -5742,7 +5742,7 @@ bce_rx_intr(struct bce_softc *sc) > > /* Get working copies of the driver's view of the consumer indices. */ > sw_rx_cons = sc->rx_cons; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sw_pg_cons = sc->pg_cons; > #endif > > @@ -5803,7 +5803,7 @@ bce_rx_intr(struct bce_softc *sc) > */ > m_adj(m0, sizeof(struct l2_fhdr) + ETHER_ALIGN); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* > * Check whether the received frame fits in a single > * mbuf or not (i.e. packet data + FCS <= > @@ -5977,7 +5977,7 @@ bce_rx_int_next_rx: > if (m0) { > /* Make sure we don't lose our place when we release the lock. */ > sc->rx_cons = sw_rx_cons; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sc->pg_cons = sw_pg_cons; > #endif > > @@ -5987,7 +5987,7 @@ bce_rx_int_next_rx: > > /* Recover our place. */ > sw_rx_cons = sc->rx_cons; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sw_pg_cons = sc->pg_cons; > #endif > } > @@ -5998,7 +5998,7 @@ bce_rx_int_next_rx: > } > > /* No new packets to process. Refill the RX and page chains and exit. */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sc->pg_cons = sw_pg_cons; > bce_fill_pg_chain(sc); > #endif > @@ -6011,7 +6011,7 @@ bce_rx_int_next_rx: > bus_dmamap_sync(sc->rx_bd_chain_tag, > sc->rx_bd_chain_map[i], BUS_DMASYNC_PREWRITE); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > for (int i = 0; i < PG_PAGES; i++) > bus_dmamap_sync(sc->pg_bd_chain_tag, > sc->pg_bd_chain_map[i], BUS_DMASYNC_PREWRITE); > @@ -6257,7 +6257,7 @@ bce_init_locked(struct bce_softc *sc) > * Calculate and program the hardware Ethernet MTU > * size. Be generous on the receive if we have room. > */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > if (ifp->if_mtu <= (sc->rx_bd_mbuf_data_len + sc->pg_bd_mbuf_alloc_size)) > ether_mtu = sc->rx_bd_mbuf_data_len + sc->pg_bd_mbuf_alloc_size; > #else > @@ -6289,7 +6289,7 @@ bce_init_locked(struct bce_softc *sc) > /* Program appropriate promiscuous/multicast filtering. */ > bce_set_rx_mode(sc); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > DBPRINT(sc, BCE_INFO_LOAD, "%s(): pg_bd_mbuf_alloc_size = %d\n", > __FUNCTION__, sc->pg_bd_mbuf_alloc_size); > > @@ -6802,7 +6802,7 @@ bce_ioctl(struct ifnet *ifp, u_long comm > BCE_LOCK(sc); > ifp->if_mtu = ifr->ifr_mtu; > ifp->if_drv_flags &= ~IFF_DRV_RUNNING; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* No buffer allocation size changes are necessary. */ > #else > /* Recalculate our buffer allocation sizes. */ > @@ -7505,7 +7505,7 @@ bce_tick(void *xsc) > bce_stats_update(sc); > > /* Top off the receive and page chains. */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > bce_fill_pg_chain(sc); > #endif > bce_fill_rx_chain(sc); > @@ -7685,7 +7685,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Provides a sysctl interface to allow dumping the page chain. */ > /* */ > @@ -8313,7 +8313,7 @@ bce_add_sysctls(struct bce_softc *sc) > (void *)sc, 0, > bce_sysctl_dump_tx_chain, "I", "Dump tx_bd chain"); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > SYSCTL_ADD_PROC(ctx, children, OID_AUTO, > "dump_pg_chain", CTLTYPE_INT | CTLFLAG_RW, > (void *)sc, 0, > @@ -8608,7 +8608,7 @@ bce_dump_rx_mbuf_chain(struct bce_softc > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Prints out the mbufs in the mbuf page chain. */ > /* */ > @@ -8732,7 +8732,7 @@ bce_dump_rxbd(struct bce_softc *sc, int > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Prints out a rx_bd structure in the page chain. */ > /* */ > @@ -9219,7 +9219,7 @@ bce_dump_rx_chain(struct bce_softc *sc, > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Prints out the page chain. */ > /* */ > @@ -9700,7 +9700,7 @@ bce_dump_driver_state(struct bce_softc * > "0x%08X:%08X - (sc->rx_bd_chain) rx_bd chain virtual address\n", > val_hi, val_lo); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > val_hi = BCE_ADDR_HI(sc->pg_bd_chain); > val_lo = BCE_ADDR_LO(sc->pg_bd_chain); > BCE_PRINTF( > @@ -9720,7 +9720,7 @@ bce_dump_driver_state(struct bce_softc * > "0x%08X:%08X - (sc->rx_mbuf_ptr) rx mbuf chain virtual address\n", > val_hi, val_lo); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > val_hi = BCE_ADDR_HI(sc->pg_mbuf_ptr); > val_lo = BCE_ADDR_LO(sc->pg_mbuf_ptr); > BCE_PRINTF( > @@ -9773,7 +9773,7 @@ bce_dump_driver_state(struct bce_softc * > BCE_PRINTF(" 0x%08X - (sc->free_rx_bd) free rx_bd's\n", > sc->free_rx_bd); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > BCE_PRINTF(" 0x%04X(0x%04X) - (sc->pg_prod) page producer index\n", > sc->pg_prod, (u16) PG_CHAIN_IDX(sc->pg_prod)); > > @@ -10279,7 +10279,7 @@ bce_breakpoint(struct bce_softc *sc) > bce_dump_tpat_state(sc, 0); > bce_dump_cp_state(sc, 0); > bce_dump_com_state(sc, 0); > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > bce_dump_pgbd(sc, 0, NULL); > bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); > bce_dump_pg_chain(sc, 0, USABLE_PG_BD); > > Modified: stable/7/sys/dev/bce/if_bcereg.h > ============================================================================== > --- stable/7/sys/dev/bce/if_bcereg.h Sun Nov 15 11:30:59 2009 (r199288) > +++ stable/7/sys/dev/bce/if_bcereg.h Sun Nov 15 11:43:28 2009 (r199289) > @@ -6205,7 +6205,7 @@ struct l2_fhdr { > #define RX_PAGE(x) (((x) & ~USABLE_RX_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) > #define RX_IDX(x) ((x) & USABLE_RX_BD_PER_PAGE) > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* > * To accomodate jumbo frames, the page chain should > * be 4 times larger than the receive chain. > @@ -6227,7 +6227,7 @@ struct l2_fhdr { > #define PG_PAGE(x) (((x) & ~USABLE_PG_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) > #define PG_IDX(x) ((x) & USABLE_PG_BD_PER_PAGE) > > -#endif /* ZERO_COPY_SOCKETS */ > +#endif /* BCE_JUMBO_HDRSPLIT */ > > #define CTX_INIT_RETRY_COUNT 10 > > @@ -6505,7 +6505,7 @@ struct bce_softc > u16 tx_cons; > u32 tx_prod_bseq; /* Counts the bytes used. */ > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > u16 pg_prod; > u16 pg_cons; > #endif > @@ -6522,7 +6522,7 @@ struct bce_softc > int rx_bd_mbuf_data_len; > int rx_bd_mbuf_align_pad; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > int pg_bd_mbuf_alloc_size; > #endif > > @@ -6544,7 +6544,7 @@ struct bce_softc > struct rx_bd *rx_bd_chain[RX_PAGES]; > bus_addr_t rx_bd_chain_paddr[RX_PAGES]; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* H/W maintained page buffer descriptor chain structure. */ > bus_dma_tag_t pg_bd_chain_tag; > bus_dmamap_t pg_bd_chain_map[PG_PAGES]; > @@ -6581,7 +6581,7 @@ struct bce_softc > bus_dma_tag_t rx_mbuf_tag; > bus_dma_tag_t tx_mbuf_tag; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > bus_dma_tag_t pg_mbuf_tag; > #endif > > @@ -6593,7 +6593,7 @@ struct bce_softc > bus_dmamap_t rx_mbuf_map[TOTAL_RX_BD]; > struct mbuf *rx_mbuf_ptr[TOTAL_RX_BD]; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* S/W maintained mbuf page chain structure. */ > bus_dmamap_t pg_mbuf_map[TOTAL_PG_BD]; > struct mbuf *pg_mbuf_ptr[TOTAL_PG_BD]; > @@ -6605,7 +6605,7 @@ struct bce_softc > u16 used_tx_bd; > u16 max_tx_bd; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > u16 free_pg_bd; > u16 max_pg_bd; > #endif > @@ -6693,7 +6693,7 @@ struct bce_softc > int debug_tx_mbuf_alloc; > int debug_rx_mbuf_alloc; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > int debug_pg_mbuf_alloc; > #endif > > @@ -6710,7 +6710,7 @@ struct bce_softc > u32 rx_low_watermark; /* Lowest number of rx_bd's free. */ > u32 rx_empty_count; /* Number of times the RX chain was empty. */ > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > u32 pg_low_watermark; /* Lowest number of pages free. */ > u32 pg_empty_count; /* Number of times the page chain was empty. */ > #endif > From owner-svn-src-stable-7@FreeBSD.ORG Mon Nov 30 20:27:46 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8E291065670 for ; Mon, 30 Nov 2009 20:27:46 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from tomjudge.vm.bytemark.co.uk (tomjudge.vm.bytemark.co.uk [80.68.91.100]) by mx1.freebsd.org (Postfix) with ESMTP id 0D0538FC14 for ; Mon, 30 Nov 2009 20:27:45 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 5855448AFE; Mon, 30 Nov 2009 20:10:20 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at tomjudge.vm.bytemark.co.uk Received: from tomjudge.vm.bytemark.co.uk ([127.0.0.1]) by localhost (tomjudge.vm.bytemark.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UIb1RPinCttJ; Mon, 30 Nov 2009 20:10:13 +0000 (GMT) Received: from rita.nodomain (unknown [192.168.205.6]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id D0CC948AFA; Mon, 30 Nov 2009 20:10:11 +0000 (GMT) Message-ID: <4B142655.6030703@tomjudge.com> Date: Mon, 30 Nov 2009 20:08:53 +0000 From: Tom Judge User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Maxim Sobolev References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> In-Reply-To: <4B141D2E.1000203@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Stanislav Sedov , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2009 20:27:46 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Maxim Sobolev wrote: > Is the option related to Jumbo Frames in any way? If not, IMHO the name > should be changed to avoid any confusion. The bug is easier to reproduce when jumbo frames are turned on however we have seen it with normal frames also. Tom > > -Maxim > > Stanislav Sedov wrote: >> Author: stas >> Date: Sun Nov 15 11:43:28 2009 >> New Revision: 199289 >> URL: http://svn.freebsd.org/changeset/base/199289 >> >> Log: >> - MFC r198320: >> Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable >> header >> in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not >> into if_bce.c anyway. It is disabled by default. >> > PR: If a GNATS PR is affected by the change. >> > Submitted by: If someone else sent in the change. >> > Reviewed by: If someone else reviewed your modification. >> > Approved by: If you needed approval for this commit. >> > Obtained from: If the change is from a third party. >> > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder >> email. >> > Security: Vulnerability reference (one per line) or description. >> > Empty fields above will be automatically removed. >> _M 7/sys >> M 7/sys/conf/NOTES >> M 7/sys/conf/options >> M 7/sys/dev/bce/if_bce.c >> M 7/sys/dev/bce/if_bcereg.h >> _M 7/sys/contrib/pf >> >> Modified: >> stable/7/sys/conf/NOTES >> stable/7/sys/conf/options >> stable/7/sys/dev/bce/if_bce.c >> stable/7/sys/dev/bce/if_bcereg.h >> Directory Properties: >> stable/7/sys/ (props changed) >> stable/7/sys/contrib/pf/ (props changed) >> >> Modified: stable/7/sys/conf/NOTES >> ============================================================================== >> >> --- stable/7/sys/conf/NOTES Sun Nov 15 11:30:59 2009 (r199288) >> +++ stable/7/sys/conf/NOTES Sun Nov 15 11:43:28 2009 (r199289) >> @@ -1929,6 +1929,12 @@ device lmc >> # only works for Tigon II chips, and has no effect for Tigon I chips. >> options TI_JUMBO_HDRSPLIT >> >> +# >> +# Use header splitting feature on bce(4) adapters. >> +# This may help to reduce the amount of jumbo-sized memory buffers used. >> +# >> +options BCE_JUMBO_HDRSPLIT >> + >> # These two options allow manipulating the mbuf cluster size and mbuf >> size, >> # respectively. Be very careful with NIC driver modules when changing >> # these from their default values, because that can potentially cause a >> >> Modified: stable/7/sys/conf/options >> ============================================================================== >> >> --- stable/7/sys/conf/options Sun Nov 15 11:30:59 2009 (r199288) >> +++ stable/7/sys/conf/options Sun Nov 15 11:43:28 2009 (r199289) >> @@ -493,6 +493,7 @@ DRM_DEBUG opt_drm.h >> ZERO_COPY_SOCKETS opt_zero.h >> TI_PRIVATE_JUMBOS opt_ti.h >> TI_JUMBO_HDRSPLIT opt_ti.h >> +BCE_JUMBO_HDRSPLIT opt_bce.h >> >> # XXX Conflict: # of devices vs network protocol (Native ATM). >> # This makes "atm.h" unusable. >> >> Modified: stable/7/sys/dev/bce/if_bce.c >> ============================================================================== >> >> --- stable/7/sys/dev/bce/if_bce.c Sun Nov 15 11:30:59 2009 >> (r199288) >> +++ stable/7/sys/dev/bce/if_bce.c Sun Nov 15 11:43:28 2009 >> (r199289) >> @@ -293,12 +293,12 @@ static void bce_dump_enet (str >> static void bce_dump_mbuf (struct bce_softc *, struct >> mbuf *); >> static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); >> static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); >> #endif >> static void bce_dump_txbd (struct bce_softc *, int, struct >> tx_bd *); >> static void bce_dump_rxbd (struct bce_softc *, int, struct >> rx_bd *); >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> static void bce_dump_pgbd (struct bce_softc *, int, struct >> rx_bd *); >> #endif >> static void bce_dump_l2fhdr (struct bce_softc *, int, >> struct l2_fhdr *); >> @@ -306,7 +306,7 @@ static void bce_dump_ctx (struct bce_s >> static void bce_dump_ftqs (struct bce_softc *); >> static void bce_dump_tx_chain (struct bce_softc *, u16, int); >> static void bce_dump_rx_chain (struct bce_softc *, u16, int); >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> static void bce_dump_pg_chain (struct bce_softc *, u16, int); >> #endif >> static void bce_dump_status_block (struct bce_softc *); >> @@ -391,7 +391,7 @@ static int bce_init_rx_chain (struct b >> static void bce_fill_rx_chain (struct bce_softc *); >> static void bce_free_rx_chain (struct bce_softc *); >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> static int bce_get_pg_buf (struct bce_softc *, struct >> mbuf *, u16 *, u16 *); >> static int bce_init_pg_chain (struct bce_softc *); >> static void bce_fill_pg_chain (struct bce_softc *); >> @@ -597,7 +597,7 @@ bce_print_adapter_info(struct bce_softc >> /* Firmware version and device features. */ >> printf("B/C (0x%08X); Flags( ", sc->bce_bc_ver); >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> printf("SPLT "); >> #endif >> if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) >> @@ -1013,7 +1013,7 @@ bce_attach(device_t dev) >> * This may change later if the MTU size is set to >> * something other than 1500. >> */ >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> sc->rx_bd_mbuf_alloc_size = MHLEN; >> /* Make sure offset is 16 byte aligned for hardware. */ >> sc->rx_bd_mbuf_align_pad = roundup2((MSIZE - MHLEN), 16) - >> @@ -2753,7 +2753,7 @@ bce_dma_free(struct bce_softc *sc) >> } >> >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /* Free, unmap and destroy all page buffer descriptor chain >> pages. */ >> for (i = 0; i < PG_PAGES; i++ ) { >> if (sc->pg_bd_chain[i] != NULL) { >> @@ -2817,7 +2817,7 @@ bce_dma_free(struct bce_softc *sc) >> sc->rx_mbuf_tag = NULL; >> } >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /* Unload and destroy the page mbuf maps. */ >> for (i = 0; i < TOTAL_PG_BD; i++) { >> if (sc->pg_mbuf_map[i] != NULL) { >> @@ -3263,7 +3263,7 @@ bce_dma_alloc(device_t dev) >> /* >> * Create a DMA tag for RX mbufs. >> */ >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> max_size = max_seg_size = ((sc->rx_bd_mbuf_alloc_size < MCLBYTES) ? >> MCLBYTES : sc->rx_bd_mbuf_alloc_size); >> #else >> @@ -3304,7 +3304,7 @@ bce_dma_alloc(device_t dev) >> } >> } >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /* >> * Create a DMA tag for the page buffer descriptor chain, >> * allocate and clear the memory, and fetch the physical >> @@ -4393,7 +4393,7 @@ bce_stop(struct bce_softc *sc) >> bce_disable_intr(sc); >> >> /* Free RX buffers. */ >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> bce_free_pg_chain(sc); >> #endif >> bce_free_rx_chain(sc); >> @@ -4831,7 +4831,7 @@ bce_get_rx_buf(struct bce_softc *sc, str >> goto bce_get_rx_buf_exit); >> >> /* This is a new mbuf allocation. */ >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> MGETHDR(m_new, M_DONTWAIT, MT_DATA); >> #else >> if (sc->rx_bd_mbuf_alloc_size <= MCLBYTES) >> @@ -4912,7 +4912,7 @@ bce_get_rx_buf_exit: >> } >> >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /****************************************************************************/ >> >> /* Encapsulate an mbuf cluster into the page >> chain. */ >> /* >> */ >> @@ -5021,7 +5021,7 @@ bce_get_pg_buf_exit: >> >> return(rc); >> } >> -#endif /* ZERO_COPY_SOCKETS */ >> +#endif /* BCE_JUMBO_HDRSPLIT */ >> >> /****************************************************************************/ >> >> /* Initialize the TX context >> memory. */ >> @@ -5377,7 +5377,7 @@ bce_free_rx_chain(struct bce_softc *sc) >> } >> >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /****************************************************************************/ >> >> /* Allocate memory and initialize the page data >> structures. */ >> /* Assumes that bce_init_rx_chain() has not already been >> called. */ >> @@ -5541,7 +5541,7 @@ bce_free_pg_chain(struct bce_softc *sc) >> >> DBEXIT(BCE_VERBOSE_RESET | BCE_VERBOSE_RECV | BCE_VERBOSE_UNLOAD); >> } >> -#endif /* ZERO_COPY_SOCKETS */ >> +#endif /* BCE_JUMBO_HDRSPLIT */ >> >> >> /****************************************************************************/ >> >> @@ -5714,7 +5714,7 @@ bce_rx_intr(struct bce_softc *sc) >> unsigned int pkt_len; >> u16 sw_rx_cons, sw_rx_cons_idx, hw_rx_cons; >> u32 status; >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> unsigned int rem_len; >> u16 sw_pg_cons, sw_pg_cons_idx; >> #endif >> @@ -5730,7 +5730,7 @@ bce_rx_intr(struct bce_softc *sc) >> bus_dmamap_sync(sc->rx_bd_chain_tag, >> sc->rx_bd_chain_map[i], BUS_DMASYNC_POSTREAD); >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /* Prepare the page chain pages to be accessed by the host CPU. */ >> for (int i = 0; i < PG_PAGES; i++) >> bus_dmamap_sync(sc->pg_bd_chain_tag, >> @@ -5742,7 +5742,7 @@ bce_rx_intr(struct bce_softc *sc) >> >> /* Get working copies of the driver's view of the consumer >> indices. */ >> sw_rx_cons = sc->rx_cons; >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> sw_pg_cons = sc->pg_cons; >> #endif >> >> @@ -5803,7 +5803,7 @@ bce_rx_intr(struct bce_softc *sc) >> */ >> m_adj(m0, sizeof(struct l2_fhdr) + ETHER_ALIGN); >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /* >> * Check whether the received frame fits in a single >> * mbuf or not (i.e. packet data + FCS <= >> @@ -5977,7 +5977,7 @@ bce_rx_int_next_rx: >> if (m0) { >> /* Make sure we don't lose our place when we release the >> lock. */ >> sc->rx_cons = sw_rx_cons; >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> sc->pg_cons = sw_pg_cons; >> #endif >> >> @@ -5987,7 +5987,7 @@ bce_rx_int_next_rx: >> >> /* Recover our place. */ >> sw_rx_cons = sc->rx_cons; >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> sw_pg_cons = sc->pg_cons; >> #endif >> } >> @@ -5998,7 +5998,7 @@ bce_rx_int_next_rx: >> } >> >> /* No new packets to process. Refill the RX and page chains and >> exit. */ >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> sc->pg_cons = sw_pg_cons; >> bce_fill_pg_chain(sc); >> #endif >> @@ -6011,7 +6011,7 @@ bce_rx_int_next_rx: >> bus_dmamap_sync(sc->rx_bd_chain_tag, >> sc->rx_bd_chain_map[i], BUS_DMASYNC_PREWRITE); >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> for (int i = 0; i < PG_PAGES; i++) >> bus_dmamap_sync(sc->pg_bd_chain_tag, >> sc->pg_bd_chain_map[i], BUS_DMASYNC_PREWRITE); >> @@ -6257,7 +6257,7 @@ bce_init_locked(struct bce_softc *sc) >> * Calculate and program the hardware Ethernet MTU >> * size. Be generous on the receive if we have room. >> */ >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> if (ifp->if_mtu <= (sc->rx_bd_mbuf_data_len + >> sc->pg_bd_mbuf_alloc_size)) >> ether_mtu = sc->rx_bd_mbuf_data_len + sc->pg_bd_mbuf_alloc_size; >> #else >> @@ -6289,7 +6289,7 @@ bce_init_locked(struct bce_softc *sc) >> /* Program appropriate promiscuous/multicast filtering. */ >> bce_set_rx_mode(sc); >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> DBPRINT(sc, BCE_INFO_LOAD, "%s(): pg_bd_mbuf_alloc_size = %d\n", >> __FUNCTION__, sc->pg_bd_mbuf_alloc_size); >> >> @@ -6802,7 +6802,7 @@ bce_ioctl(struct ifnet *ifp, u_long comm >> BCE_LOCK(sc); >> ifp->if_mtu = ifr->ifr_mtu; >> ifp->if_drv_flags &= ~IFF_DRV_RUNNING; >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /* No buffer allocation size changes are necessary. */ >> #else >> /* Recalculate our buffer allocation sizes. */ >> @@ -7505,7 +7505,7 @@ bce_tick(void *xsc) >> bce_stats_update(sc); >> >> /* Top off the receive and page chains. */ >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> bce_fill_pg_chain(sc); >> #endif >> bce_fill_rx_chain(sc); >> @@ -7685,7 +7685,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ >> } >> >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /****************************************************************************/ >> >> /* Provides a sysctl interface to allow dumping the page >> chain. */ >> /* >> */ >> @@ -8313,7 +8313,7 @@ bce_add_sysctls(struct bce_softc *sc) >> (void *)sc, 0, >> bce_sysctl_dump_tx_chain, "I", "Dump tx_bd chain"); >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> SYSCTL_ADD_PROC(ctx, children, OID_AUTO, >> "dump_pg_chain", CTLTYPE_INT | CTLFLAG_RW, >> (void *)sc, 0, >> @@ -8608,7 +8608,7 @@ bce_dump_rx_mbuf_chain(struct bce_softc } >> >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /****************************************************************************/ >> >> /* Prints out the mbufs in the mbuf page >> chain. */ >> /* >> */ >> @@ -8732,7 +8732,7 @@ bce_dump_rxbd(struct bce_softc *sc, int } >> >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /****************************************************************************/ >> >> /* Prints out a rx_bd structure in the page >> chain. */ >> /* >> */ >> @@ -9219,7 +9219,7 @@ bce_dump_rx_chain(struct bce_softc *sc, } >> >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /****************************************************************************/ >> >> /* Prints out the page >> chain. */ >> /* >> */ >> @@ -9700,7 +9700,7 @@ bce_dump_driver_state(struct bce_softc * >> "0x%08X:%08X - (sc->rx_bd_chain) rx_bd chain virtual address\n", >> val_hi, val_lo); >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> val_hi = BCE_ADDR_HI(sc->pg_bd_chain); >> val_lo = BCE_ADDR_LO(sc->pg_bd_chain); >> BCE_PRINTF( >> @@ -9720,7 +9720,7 @@ bce_dump_driver_state(struct bce_softc * >> "0x%08X:%08X - (sc->rx_mbuf_ptr) rx mbuf chain virtual >> address\n", >> val_hi, val_lo); >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> val_hi = BCE_ADDR_HI(sc->pg_mbuf_ptr); >> val_lo = BCE_ADDR_LO(sc->pg_mbuf_ptr); >> BCE_PRINTF( >> @@ -9773,7 +9773,7 @@ bce_dump_driver_state(struct bce_softc * >> BCE_PRINTF(" 0x%08X - (sc->free_rx_bd) free rx_bd's\n", >> sc->free_rx_bd); >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> BCE_PRINTF(" 0x%04X(0x%04X) - (sc->pg_prod) page producer >> index\n", >> sc->pg_prod, (u16) PG_CHAIN_IDX(sc->pg_prod)); >> >> @@ -10279,7 +10279,7 @@ bce_breakpoint(struct bce_softc *sc) >> bce_dump_tpat_state(sc, 0); >> bce_dump_cp_state(sc, 0); >> bce_dump_com_state(sc, 0); >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> bce_dump_pgbd(sc, 0, NULL); >> bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); >> bce_dump_pg_chain(sc, 0, USABLE_PG_BD); >> >> Modified: stable/7/sys/dev/bce/if_bcereg.h >> ============================================================================== >> >> --- stable/7/sys/dev/bce/if_bcereg.h Sun Nov 15 11:30:59 2009 >> (r199288) >> +++ stable/7/sys/dev/bce/if_bcereg.h Sun Nov 15 11:43:28 2009 >> (r199289) >> @@ -6205,7 +6205,7 @@ struct l2_fhdr { >> #define RX_PAGE(x) (((x) & ~USABLE_RX_BD_PER_PAGE) >> (BCM_PAGE_BITS >> - 4)) >> #define RX_IDX(x) ((x) & USABLE_RX_BD_PER_PAGE) >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /* >> * To accomodate jumbo frames, the page chain should >> * be 4 times larger than the receive chain. >> @@ -6227,7 +6227,7 @@ struct l2_fhdr { >> #define PG_PAGE(x) (((x) & ~USABLE_PG_BD_PER_PAGE) >> (BCM_PAGE_BITS >> - 4)) >> #define PG_IDX(x) ((x) & USABLE_PG_BD_PER_PAGE) >> >> -#endif /* ZERO_COPY_SOCKETS */ >> +#endif /* BCE_JUMBO_HDRSPLIT */ >> >> #define CTX_INIT_RETRY_COUNT 10 >> >> @@ -6505,7 +6505,7 @@ struct bce_softc >> u16 tx_cons; >> u32 tx_prod_bseq; /* Counts the bytes >> used. */ >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> u16 pg_prod; >> u16 pg_cons; >> #endif >> @@ -6522,7 +6522,7 @@ struct bce_softc >> int rx_bd_mbuf_data_len; >> int rx_bd_mbuf_align_pad; >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> int pg_bd_mbuf_alloc_size; >> #endif >> >> @@ -6544,7 +6544,7 @@ struct bce_softc >> struct rx_bd *rx_bd_chain[RX_PAGES]; >> bus_addr_t rx_bd_chain_paddr[RX_PAGES]; >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /* H/W maintained page buffer descriptor chain structure. */ >> bus_dma_tag_t pg_bd_chain_tag; >> bus_dmamap_t pg_bd_chain_map[PG_PAGES]; >> @@ -6581,7 +6581,7 @@ struct bce_softc >> bus_dma_tag_t rx_mbuf_tag; >> bus_dma_tag_t tx_mbuf_tag; >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> bus_dma_tag_t pg_mbuf_tag; >> #endif >> >> @@ -6593,7 +6593,7 @@ struct bce_softc >> bus_dmamap_t rx_mbuf_map[TOTAL_RX_BD]; >> struct mbuf *rx_mbuf_ptr[TOTAL_RX_BD]; >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> /* S/W maintained mbuf page chain structure. */ >> bus_dmamap_t pg_mbuf_map[TOTAL_PG_BD]; >> struct mbuf *pg_mbuf_ptr[TOTAL_PG_BD]; >> @@ -6605,7 +6605,7 @@ struct bce_softc >> u16 used_tx_bd; >> u16 max_tx_bd; >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> u16 free_pg_bd; >> u16 max_pg_bd; >> #endif >> @@ -6693,7 +6693,7 @@ struct bce_softc >> int debug_tx_mbuf_alloc; >> int debug_rx_mbuf_alloc; >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> int debug_pg_mbuf_alloc; >> #endif >> >> @@ -6710,7 +6710,7 @@ struct bce_softc >> u32 rx_low_watermark; /* Lowest number of rx_bd's >> free. */ >> u32 rx_empty_count; /* Number of times the RX >> chain was empty. */ >> >> -#ifdef ZERO_COPY_SOCKETS >> +#ifdef BCE_JUMBO_HDRSPLIT >> u32 pg_low_watermark; /* Lowest number of pages >> free. */ >> u32 pg_empty_count; /* Number of times the page chain >> was empty. */ >> #endif >> > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" - -- TJU13-ARIN -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJLFCZVAAoJEMSwVS7lr0OdMLgIAKzeXBKtLHvx6BmAMn97ky+K mc0qempP/6gnydQkzJCCosoL/78mLzelqId7ff6jAayOriNkh4iQkSl3cZUtewD2 pJXrN1vhWWR0TxNuXLg77g3VXTtBNwxZ/9y02KWaf2xOGVVMkAOILdfhwHmCPNiV btUjtZpcr9Fe5N4IM0Mpgr8SNAPDbigAWs/58Nn8jpoo6Dy3qYf1Pl7P7kvQDZIj XLC91Vun1gY6B1YSXfZQWeHaOm/6YJwLFjEJs8G4MHF4rjy9Yfb27HX9AzJr3DvS Tm7tgZG+CU0PGrzgojxhqSDOND3MoDhPVSSqQ19oQHlTWSEOZQaq+qrtPvYfPRk= =hEox -----END PGP SIGNATURE----- From owner-svn-src-stable-7@FreeBSD.ORG Mon Nov 30 21:25:03 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE96A10656A5; Mon, 30 Nov 2009 21:25:03 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 8D8308FC19; Mon, 30 Nov 2009 21:25:03 +0000 (UTC) Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net [70.71.167.197]) (authenticated bits=0) by sippysoft.com (8.14.3/8.14.3) with ESMTP id nAULP1GS090380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Nov 2009 13:25:02 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4B14382F.5080000@FreeBSD.org> Date: Mon, 30 Nov 2009 13:25:03 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tom Judge References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> In-Reply-To: <4B142655.6030703@tomjudge.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Stanislav Sedov , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2009 21:25:03 -0000 Tom Judge wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Maxim Sobolev wrote: >> Is the option related to Jumbo Frames in any way? If not, IMHO the name >> should be changed to avoid any confusion. > > The bug is easier to reproduce when jumbo frames are turned on however > we have seen it with normal frames also. Can we change the name then? We've seen the similar issue without the jumbo frames, which made me wonder. Also, perhaps we should make it a default and/or tunable. Having user to recompile kernel just to save 20 bytes of text segment is not very practical these days. -Maxim From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 03:00:16 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4DF9106566B; Tue, 1 Dec 2009 03:00:16 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B30758FC12; Tue, 1 Dec 2009 03:00:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB130Gto050374; Tue, 1 Dec 2009 03:00:16 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB130Gbk050372; Tue, 1 Dec 2009 03:00:16 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200912010300.nB130Gbk050372@svn.freebsd.org> From: Colin Percival Date: Tue, 1 Dec 2009 03:00:16 +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: r199981 - stable/7/libexec/rtld-elf X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 03:00:16 -0000 Author: cperciva Date: Tue Dec 1 03:00:16 2009 New Revision: 199981 URL: http://svn.freebsd.org/changeset/base/199981 Log: MFC r199979: Fix local root vulnerability. Modified: stable/7/libexec/rtld-elf/rtld.c Directory Properties: stable/7/libexec/rtld-elf/ (props changed) Modified: stable/7/libexec/rtld-elf/rtld.c ============================================================================== --- stable/7/libexec/rtld-elf/rtld.c Tue Dec 1 02:59:22 2009 (r199980) +++ stable/7/libexec/rtld-elf/rtld.c Tue Dec 1 03:00:16 2009 (r199981) @@ -361,12 +361,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ * future processes to honor the potentially un-safe variables. */ if (!trust) { - unsetenv(LD_ "PRELOAD"); - unsetenv(LD_ "LIBMAP"); - unsetenv(LD_ "LIBRARY_PATH"); - unsetenv(LD_ "LIBMAP_DISABLE"); - unsetenv(LD_ "DEBUG"); - unsetenv(LD_ "ELF_HINTS_PATH"); + if (unsetenv(LD_ "PRELOAD") || unsetenv(LD_ "LIBMAP") || + unsetenv(LD_ "LIBRARY_PATH") || unsetenv(LD_ "LIBMAP_DISABLE") || + unsetenv(LD_ "DEBUG") || unsetenv(LD_ "ELF_HINTS_PATH")) { + _rtld_error("environment corrupt; aborting"); + die(); + } } ld_debug = getenv(LD_ "DEBUG"); libmap_disable = getenv(LD_ "LIBMAP_DISABLE") != NULL; From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 04:30:56 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 097E9106566B; Tue, 1 Dec 2009 04:30:56 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id B9FB08FC08; Tue, 1 Dec 2009 04:30:55 +0000 (UTC) Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net [70.71.167.197]) (authenticated bits=0) by sippysoft.com (8.14.3/8.14.3) with ESMTP id nB14UqO6092427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Nov 2009 20:30:53 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4B149BFF.50700@FreeBSD.org> Date: Mon, 30 Nov 2009 20:30:55 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Maxim Sobolev References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> <4B14382F.5080000@FreeBSD.org> In-Reply-To: <4B14382F.5080000@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, Stanislav Sedov , svn-src-stable-7@FreeBSD.org, Tom Judge Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 04:30:56 -0000 Maxim Sobolev wrote: > Tom Judge wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Maxim Sobolev wrote: >>> Is the option related to Jumbo Frames in any way? If not, IMHO the name >>> should be changed to avoid any confusion. >> >> The bug is easier to reproduce when jumbo frames are turned on however >> we have seen it with normal frames also. > > Can we change the name then? We've seen the similar issue without the > jumbo frames, which made me wonder. Also, perhaps we should make it a > default and/or tunable. Having user to recompile kernel just to save 20 > bytes of text segment is not very practical these days. Here is the patch: http://sobomax.sippysoft.com/~sobomax/bce.diff Please let me know if you have any objection to it, otherwise I will check it in. -Maxim From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 04:48:59 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04D93106566B; Tue, 1 Dec 2009 04:48:59 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 9F76C8FC17; Tue, 1 Dec 2009 04:48:58 +0000 (UTC) Received: from orion.SpringDaemons.com (adsl-99-48-191-9.dsl.snfc21.sbcglobal.net [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id 3523A8FC4E; Tue, 1 Dec 2009 07:48:56 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 3AD3639858; Mon, 30 Nov 2009 20:48:51 -0800 (PST) Date: Mon, 30 Nov 2009 20:48:44 -0800 From: Stanislav Sedov To: Maxim Sobolev Message-Id: <20091130204844.9bec6460.stas@FreeBSD.org> In-Reply-To: <4B149BFF.50700@FreeBSD.org> References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> <4B14382F.5080000@FreeBSD.org> <4B149BFF.50700@FreeBSD.org> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Mon__30_Nov_2009_20_48_44_-0800_TBpGg.ujfEwuWyU8" Cc: Tom Judge , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 04:48:59 -0000 --Signature=_Mon__30_Nov_2009_20_48_44_-0800_TBpGg.ujfEwuWyU8 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 30 Nov 2009 20:30:55 -0800 Maxim Sobolev mentioned: > Maxim Sobolev wrote: > > Tom Judge wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> Maxim Sobolev wrote: > >>> Is the option related to Jumbo Frames in any way? If not, IMHO the na= me > >>> should be changed to avoid any confusion. > >> > >> The bug is easier to reproduce when jumbo frames are turned on however > >> we have seen it with normal frames also. > >=20 > > Can we change the name then? We've seen the similar issue without the=20 > > jumbo frames, which made me wonder. Also, perhaps we should make it a=20 > > default and/or tunable. Having user to recompile kernel just to save 20= =20 > > bytes of text segment is not very practical these days. >=20 > Here is the patch: >=20 > http://sobomax.sippysoft.com/~sobomax/bce.diff >=20 > Please let me know if you have any objection to it, otherwise I will=20 > check it in. >=20 Thanks, it looks great! But better pass this through davidch@, as he might have objections regarding this modification. My first intention was to enable the header splitting by default, but he seemed to have some concerns, so the compile-time option was a kind of consensus. --=20 Stanislav Sedov ST4096-RIPE --Signature=_Mon__30_Nov_2009_20_48_44_-0800_TBpGg.ujfEwuWyU8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJLFKAyAAoJEL8lojEJL9nwWkkP/j8yU8VJUPjIBMzYSCM8UIxg u8QjIyGgA8ahmaqHQk7LuxuyA2jNrZSImcHk3HForpXualrfglNk1pIpadA1KF7O W+7uCt9xRhxK6Frgce511MW4Gvf7SOn+7EpsMvCrO7lcXPQbhP36qiPZeo++kdi1 2yHou1lPZ2EZc4gr08EQ+bUTcfKXwl1E+Ko0X4/eBR7toQqycZPzaAjFwrdxptCR PMsEkeMvK4XPd9nYR7izagQbeMCIyqMg9Jmj87ssqRBrEIJ870GEvi61tVYIIVg2 ddH7UjDbK95JpFJGcRElVMio898G4e5Pp7As470QA9Ubl08fGR/d7DK1aTnLl65C Dx1m+atUibkKn56mXawZwO1mxPWXc0QOyKaRKNN2FlbvbE80Paz+G8tUQcGjyWAS 1S6+O2s+zkKMTXYjs1b+FWiArjG7VTBwVxtBxrXk0Fo4AxXqrelu7kckCkJC9J8j MZmr6eB2d+3H4ThhG2p6+Ddtf+5T17CcVrggdbpip5xhhPwjFbH4G+uOPJ0mZG2i K9eilmJF2JyLmDuCiJdAcLe3qVDcGYrA689uNyWYQu8P1n3TzN+eJucW9hEhBKN1 BtORc68M5daFsFrFthGeYPuv8+Sz6WSm1KC3kpp8WNd+4CSnmkqWTvM/oIQ56hzC Jzpcr1ITsgrZe5Kl/O7Z =0Gwv -----END PGP SIGNATURE----- --Signature=_Mon__30_Nov_2009_20_48_44_-0800_TBpGg.ujfEwuWyU8-- From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 04:51:47 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2094106566B; Tue, 1 Dec 2009 04:51:47 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 8949E8FC1B; Tue, 1 Dec 2009 04:51:47 +0000 (UTC) Received: from orion.SpringDaemons.com (adsl-99-48-191-9.dsl.snfc21.sbcglobal.net [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id 1E1138FC4E; Tue, 1 Dec 2009 07:51:45 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id A959739858; Mon, 30 Nov 2009 20:51:41 -0800 (PST) Date: Mon, 30 Nov 2009 20:51:41 -0800 From: Stanislav Sedov To: Maxim Sobolev Message-Id: <20091130205141.2911011e.stas@FreeBSD.org> In-Reply-To: <4B14382F.5080000@FreeBSD.org> References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> <4B14382F.5080000@FreeBSD.org> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Mon__30_Nov_2009_20_51_41_-0800_l1wet+8p93ROUrOG" Cc: Tom Judge , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 04:51:48 -0000 --Signature=_Mon__30_Nov_2009_20_51_41_-0800_l1wet+8p93ROUrOG Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 30 Nov 2009 13:25:03 -0800 Maxim Sobolev mentioned: > Can we change the name then? We've seen the similar issue without the=20 > jumbo frames, which made me wonder. It's strange, because 'normal' frames are less than a page size in length, so the issue I was experiencing should not be reproducable with jumbo frames disabled. Can you describe a bit more what kind of problem you're experien= cing? --=20 Stanislav Sedov ST4096-RIPE --Signature=_Mon__30_Nov_2009_20_51_41_-0800_l1wet+8p93ROUrOG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJLFKDdAAoJEL8lojEJL9nwpA0QAMVhGvaW/28mpViCus7FE23y FXzWKCtfyM0cbDnju6Y6BIWR9VkWdErxPIJCrZZkXywnAVh2W/xcX3KZjLWXkI1v UH/G10f/nvLQLSZRqjP2WpClbjHCHCac9qt8i5v3mVl2AX0JBbcKhFlfXJiBreK9 dB/cAoqz5g6de6DlgkIv/3ucMgJQ2dtjClCMDPkKMCioAuxf6QkJ62okdWw93+jH tuAHlgdj6tYJW1OpEG5LWcGQZg+sfRP5pWj63ed9lWSO0BLoN4OkOZwJPTZOcgHi HOr/+blfFOzZd/bK5rowYkBZSvUc0PvfzZKhJuJnUUb7HroS2zqAIxPgDbX+Xi2U M4jrnNXbPyx2KMecONXKUlVlutk7ttbu+LleqzuaAMZ9QrtMxaXVfYpVnyoBabhL 5t0pDTDJhsc3AKn+Poi3KCeOGCA9cp/d56TaSlpVtFhRNXlFFFVMBoYbdx7/3bFp eBrBsAe1qcYV4vGrRzMw3JkC8ieiE3M9cf6S1xveaPhdtzG/IG4zSf/uJKf1dbzQ fmtw1O9Honm58LPz2X54hsn9o/4Jrq9ZgqnwGTsMHYruOmwme7yDGExhTffNBWwV cvJzPPIA9z5K1ZU62455/XhWSrWaZ9rhDYftE6bpwWgO0dwNuwNjMiMfRcf02ZlD J7+8eSV5m68da3ZjJXqs =iD16 -----END PGP SIGNATURE----- --Signature=_Mon__30_Nov_2009_20_51_41_-0800_l1wet+8p93ROUrOG-- From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 06:15:20 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F11BC106566B; Tue, 1 Dec 2009 06:15:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E08678FC0C; Tue, 1 Dec 2009 06:15:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB16FJjB054664; Tue, 1 Dec 2009 06:15:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB16FJAc054660; Tue, 1 Dec 2009 06:15:19 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200912010615.nB16FJAc054660@svn.freebsd.org> From: Andriy Gapon Date: Tue, 1 Dec 2009 06:15:19 +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: r199986 - stable/7/sys/dev/acpica X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 06:15:20 -0000 Author: avg Date: Tue Dec 1 06:15:19 2009 New Revision: 199986 URL: http://svn.freebsd.org/changeset/base/199986 Log: MFC r199016: acpi: remove 'magic' ivar Note that the ivar itself is kept in the stable branches, only its use is dropped. Modified: stable/7/sys/dev/acpica/acpi_cpu.c stable/7/sys/dev/acpica/acpi_ec.c stable/7/sys/dev/acpica/acpi_hpet.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_cpu.c Tue Dec 1 06:12:31 2009 (r199985) +++ stable/7/sys/dev/acpica/acpi_cpu.c Tue Dec 1 06:15:19 2009 (r199986) @@ -252,7 +252,7 @@ acpi_cpu_probe(device_t dev) /* Mark this processor as in-use and save our derived id for attach. */ cpu_softc[cpu_id] = (void *)1; - acpi_set_magic(dev, cpu_id); + acpi_set_private(dev, (void*)(intptr_t)cpu_id); device_set_desc(dev, "ACPI CPU"); return (0); @@ -283,7 +283,7 @@ acpi_cpu_attach(device_t dev) sc = device_get_softc(dev); sc->cpu_dev = dev; sc->cpu_handle = acpi_get_handle(dev); - cpu_id = acpi_get_magic(dev); + cpu_id = (int)(intptr_t)acpi_get_private(dev); cpu_softc[cpu_id] = sc; pcpu_data = pcpu_find(cpu_id); pcpu_data->pc_device = dev; Modified: stable/7/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_ec.c Tue Dec 1 06:12:31 2009 (r199985) +++ stable/7/sys/dev/acpica/acpi_ec.c Tue Dec 1 06:15:19 2009 (r199986) @@ -127,9 +127,6 @@ struct acpi_ec_params { int uid; }; -/* Indicate that this device has already been probed via ECDT. */ -#define DEV_ECDT(x) (acpi_get_magic(x) == (uintptr_t)&acpi_ec_devclass) - /* * Driver softc. */ @@ -330,7 +327,6 @@ acpi_ec_ecdt_probe(device_t parent) params->uid = ecdt->Uid; acpi_GetInteger(h, "_GLK", ¶ms->glk); acpi_set_private(child, params); - acpi_set_magic(child, (uintptr_t)&acpi_ec_devclass); /* Finish the attach process. */ if (device_probe_and_attach(child) != 0) @@ -346,6 +342,7 @@ acpi_ec_probe(device_t dev) ACPI_STATUS status; device_t peer; char desc[64]; + int ecdt; int ret; struct acpi_ec_params *params; static char *ec_ids[] = { "PNP0C09", NULL }; @@ -360,11 +357,12 @@ acpi_ec_probe(device_t dev) * duplicate probe. */ ret = ENXIO; - params = NULL; + ecdt = 0; buf.Pointer = NULL; buf.Length = ACPI_ALLOCATE_BUFFER; - if (DEV_ECDT(dev)) { - params = acpi_get_private(dev); + params = acpi_get_private(dev); + if (params != NULL) { + ecdt = 1; ret = 0; } else if (!acpi_disabled("ec") && ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { @@ -437,7 +435,7 @@ out: if (ret == 0) { snprintf(desc, sizeof(desc), "Embedded Controller: GPE %#x%s%s", params->gpe_bit, (params->glk) ? ", GLK" : "", - DEV_ECDT(dev) ? ", ECDT" : ""); + ecdt ? ", ECDT" : ""); device_set_desc_copy(dev, desc); } Modified: stable/7/sys/dev/acpica/acpi_hpet.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_hpet.c Tue Dec 1 06:12:31 2009 (r199985) +++ stable/7/sys/dev/acpica/acpi_hpet.c Tue Dec 1 06:15:19 2009 (r199986) @@ -59,8 +59,6 @@ static void acpi_hpet_test(struct acpi_h static char *hpet_ids[] = { "PNP0103", NULL }; -#define DEV_HPET(x) (acpi_get_magic(x) == (uintptr_t)&acpi_hpet_devclass) - struct timecounter hpet_timecounter = { .tc_get_timecount = hpet_get_timecount, .tc_counter_mask = ~0u, @@ -131,8 +129,6 @@ acpi_hpet_identify(driver_t *driver, dev return; } - /* Record a magic value so we can detect this device later. */ - acpi_set_magic(child, (uintptr_t)&acpi_hpet_devclass); bus_set_resource(child, SYS_RES_MEMORY, 0, hpet->Address.Address, HPET_MEM_WIDTH); } @@ -144,7 +140,7 @@ acpi_hpet_probe(device_t dev) if (acpi_disabled("hpet")) return (ENXIO); - if (!DEV_HPET(dev) && + if (acpi_get_handle(dev) != NULL && (ACPI_ID_PROBE(device_get_parent(dev), dev, hpet_ids) == NULL || device_get_unit(dev) != 0)) return (ENXIO); From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 07:00:59 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42DE2106566B; Tue, 1 Dec 2009 07:00:59 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id F403F8FC13; Tue, 1 Dec 2009 07:00:58 +0000 (UTC) Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net [70.71.167.197]) (authenticated bits=0) by sippysoft.com (8.14.3/8.14.3) with ESMTP id nB170sAF093309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Nov 2009 23:00:56 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4B14BF23.1030303@FreeBSD.org> Date: Mon, 30 Nov 2009 23:00:51 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Stanislav Sedov References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> <4B14382F.5080000@FreeBSD.org> <20091130205141.2911011e.stas@FreeBSD.org> In-Reply-To: <20091130205141.2911011e.stas@FreeBSD.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: Tom Judge , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 07:00:59 -0000 Stanislav Sedov wrote: > On Mon, 30 Nov 2009 13:25:03 -0800 > Maxim Sobolev mentioned: > >> Can we change the name then? We've seen the similar issue without the >> jumbo frames, which made me wonder. > > It's strange, because 'normal' frames are less than a page size in length, > so the issue I was experiencing should not be reproducable with jumbo frames > disabled. Can you describe a bit more what kind of problem you're experiencing? The traffic through interface abruptly halts randomly when under a load, without any signs of a problem. What is interesting is that the communication through unix domain sockets appears to be down too, since some scripts that connect to database not able to complete as well, so whatever this problem is it affect the whole network subsystem. We tried to replace hardware and it did not help. Only after we replaced bce(4) with IntelPro card (em) the problem has went away. -Maxim From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 13:16:41 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C20D106568B; Tue, 1 Dec 2009 13:16:41 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from tomjudge.vm.bytemark.co.uk (tomjudge.vm.bytemark.co.uk [80.68.91.100]) by mx1.freebsd.org (Postfix) with ESMTP id B94708FC1E; Tue, 1 Dec 2009 13:16:40 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 6A9B948B16; Tue, 1 Dec 2009 13:16:39 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at tomjudge.vm.bytemark.co.uk Received: from tomjudge.vm.bytemark.co.uk ([127.0.0.1]) by localhost (tomjudge.vm.bytemark.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rKFZWSgMIoAV; Tue, 1 Dec 2009 13:16:36 +0000 (GMT) Received: from rita.nodomain (unknown [192.168.205.6]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 7881748B03; Tue, 1 Dec 2009 13:16:35 +0000 (GMT) Message-ID: <4B1516E5.9030508@tomjudge.com> Date: Tue, 01 Dec 2009 13:15:17 +0000 From: Tom Judge User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Maxim Sobolev References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> <4B14382F.5080000@FreeBSD.org> <20091130205141.2911011e.stas@FreeBSD.org> <4B14BF23.1030303@FreeBSD.org> In-Reply-To: <4B14BF23.1030303@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: Stanislav Sedov , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 13:16:41 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Maxim Sobolev wrote: > Stanislav Sedov wrote: >> On Mon, 30 Nov 2009 13:25:03 -0800 >> Maxim Sobolev mentioned: >> >>> Can we change the name then? We've seen the similar issue without the >>> jumbo frames, which made me wonder. >> >> It's strange, because 'normal' frames are less than a page size in >> length, >> so the issue I was experiencing should not be reproducable with jumbo >> frames >> disabled. Can you describe a bit more what kind of problem you're >> experiencing? > > The traffic through interface abruptly halts randomly when under a load, > without any signs of a problem. What is interesting is that the > communication through unix domain sockets appears to be down too, since > some scripts that connect to database not able to complete as well, so > whatever this problem is it affect the whole network subsystem. We tried > to replace hardware and it did not help. Only after we replaced bce(4) > with IntelPro card (em) the problem has went away. > > -Maxim When you see this lock up do you also see denied requests for mbufs? All the times I have seen the issue, the system was denying mbuf requests. Tom - -- TJU13-ARIN -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJLFRbkAAoJEMSwVS7lr0OdL84H/0rPW0l53qCqMv8HQ45KLd21 9PMEYRT9GkIMR9xQ489BCtcKQEILqA9o9WJoGOHPL/9I3ecYiB3phMp/cTvtcQiu 3I2UNdeDUg3YWqZyPwgXg4snUUod9flITkCzwn8+yx7EmD4cEz9BVi7XXyqwGxoW GM9BoX2rBttO3DEP2h19JazG9U5BXPW1zZ1Jf47Or6WMMfYeC6dSMA0WMr1fxjgY VsQVyIH2EfR19ddwZkJqkx32y5+TDgjsevlu0cw/0KjxLii2NqAtLtPQNLfDC4Wo wKWpi0CXqdkCinwJsKcVISYj6TLI3wAz5U2q5l4bDNRkp/0YkgHAjdj+VSwKErg= =o5DH -----END PGP SIGNATURE----- From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 22:19:24 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21BEE106566B; Tue, 1 Dec 2009 22:19:24 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id D102F8FC13; Tue, 1 Dec 2009 22:19:23 +0000 (UTC) Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net [70.71.167.197]) (authenticated bits=0) by sippysoft.com (8.14.3/8.14.3) with ESMTP id nB1MJKtr004755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Dec 2009 14:19:22 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4B15966B.9080102@FreeBSD.org> Date: Tue, 01 Dec 2009 14:19:23 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tom Judge References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> <4B14382F.5080000@FreeBSD.org> <20091130205141.2911011e.stas@FreeBSD.org> <4B14BF23.1030303@FreeBSD.org> <4B1516E5.9030508@tomjudge.com> In-Reply-To: <4B1516E5.9030508@tomjudge.com> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: Stanislav Sedov , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 22:19:24 -0000 Tom Judge wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Maxim Sobolev wrote: >> Stanislav Sedov wrote: >>> On Mon, 30 Nov 2009 13:25:03 -0800 >>> Maxim Sobolev mentioned: >>> >>>> Can we change the name then? We've seen the similar issue without the >>>> jumbo frames, which made me wonder. >>> It's strange, because 'normal' frames are less than a page size in >>> length, >>> so the issue I was experiencing should not be reproducable with jumbo >>> frames >>> disabled. Can you describe a bit more what kind of problem you're >>> experiencing? >> The traffic through interface abruptly halts randomly when under a load, >> without any signs of a problem. What is interesting is that the >> communication through unix domain sockets appears to be down too, since >> some scripts that connect to database not able to complete as well, so >> whatever this problem is it affect the whole network subsystem. We tried >> to replace hardware and it did not help. Only after we replaced bce(4) >> with IntelPro card (em) the problem has went away. > > When you see this lock up do you also see denied requests for mbufs? > > All the times I have seen the issue, the system was denying mbuf requests. Not sure about that, since we only have had network connection to that box, no console. However, I think that the problem with the other network subsystems that we see at the same time suggests that it might be an issue with the mbufs indeed. -Maxim From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 22:32:56 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6F01065693; Tue, 1 Dec 2009 22:32:56 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 090E48FC2A; Tue, 1 Dec 2009 22:32:53 +0000 (UTC) Received: by people.fsn.hu (Postfix, from userid 1001) id 1323A1431C8; Tue, 1 Dec 2009 23:14:26 +0100 (CET) X-CRM114-Version: 20090423-BlameSteveJobs ( TRE 0.7.6 (BSD) ) MF-ACE0E1EA [pR: 20.2708] X-CRM114-CacheID: sfid-20091201_23142_1023A4EA X-CRM114-Status: Good ( pR: 20.2708 ) Message-ID: <4B159540.9000503@fsn.hu> Date: Tue, 01 Dec 2009 23:14:24 +0100 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Maxim Sobolev References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> <4B14382F.5080000@FreeBSD.org> <20091130205141.2911011e.stas@FreeBSD.org> <4B14BF23.1030303@FreeBSD.org> In-Reply-To: <4B14BF23.1030303@FreeBSD.org> X-Stationery: 0.4.10 Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (people.fsn.hu); Tue, 01 Dec 2009 23:14:25 +0100 (CET) Cc: src-committers@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, Stanislav Sedov , svn-src-stable-7@FreeBSD.org, Tom Judge Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 22:32:56 -0000 Maxim Sobolev wrote: > Stanislav Sedov wrote: >> On Mon, 30 Nov 2009 13:25:03 -0800 >> Maxim Sobolev mentioned: >> >>> Can we change the name then? We've seen the similar issue without >>> the jumbo frames, which made me wonder. >> >> It's strange, because 'normal' frames are less than a page size in >> length, >> so the issue I was experiencing should not be reproducable with jumbo >> frames >> disabled. Can you describe a bit more what kind of problem you're >> experiencing? > > The traffic through interface abruptly halts randomly when under a > load, without any signs of a problem. What is interesting is that the > communication through unix domain sockets appears to be down too, > since some scripts that connect to database not able to complete as > well, so whatever this problem is it affect the whole network > subsystem. We tried to replace hardware and it did not help. Only > after we replaced bce(4) with IntelPro card (em) the problem has went > away. Sorry, I've just noticed this thread and did not read the earlier posts. I can see similar, although only (at least for now) on version 8 (running something around RC2), also with bce interfaces and "heavy" -in terms of pps, this is a DNS server- network load. Everything which involves network halts for some minutes, but the machine is completely usable from the console. top shows some processes (I don't have an output, but as far as I can remember they were only that which did network IO) in the "keglim" state. Then something happens and the machine starts to work again. Can this be the same, or is it completely different? From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 22:38:37 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD5E110656A5; Tue, 1 Dec 2009 22:38:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBCB88FC0A; Tue, 1 Dec 2009 22:38:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1McbTD078590; Tue, 1 Dec 2009 22:38:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1Mcbl4078587; Tue, 1 Dec 2009 22:38:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200912012238.nB1Mcbl4078587@svn.freebsd.org> From: John Baldwin Date: Tue, 1 Dec 2009 22:38:37 +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: r200005 - stable/7/sys/boot/i386/zfsboot X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 22:38:38 -0000 Author: jhb Date: Tue Dec 1 22:38:37 2009 New Revision: 200005 URL: http://svn.freebsd.org/changeset/base/200005 Log: MFC 199579: Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to fully support booting from large volumes. Modified: stable/7/sys/boot/i386/zfsboot/zfsboot.c stable/7/sys/boot/i386/zfsboot/zfsldr.S Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/7/sys/boot/i386/zfsboot/zfsboot.c Tue Dec 1 22:38:17 2009 (r200004) +++ stable/7/sys/boot/i386/zfsboot/zfsboot.c Tue Dec 1 22:38:37 2009 (r200005) @@ -138,8 +138,8 @@ struct dsk { unsigned unit; unsigned slice; unsigned part; - unsigned start; int init; + daddr_t start; }; static char cmd[512]; static char kname[1024]; @@ -163,7 +163,7 @@ static int parse(void); static void printf(const char *,...); static void putchar(int); static uint32_t memsize(void); -static int drvread(struct dsk *, void *, unsigned, unsigned); +static int drvread(struct dsk *, void *, daddr_t, unsigned); static int keyhit(unsigned); static int xputc(int); static int xgetc(int); @@ -310,7 +310,8 @@ static int vdev_read(vdev_t *vdev, void *priv, off_t off, void *buf, size_t bytes) { char *p; - unsigned int lba, nb; + daddr_t lba; + unsigned int nb; struct dsk *dsk = (struct dsk *) priv; if ((off & (DEV_BSIZE - 1)) || (bytes & (DEV_BSIZE - 1))) @@ -964,7 +965,7 @@ static struct { #endif static int -drvread(struct dsk *dsk, void *buf, unsigned lba, unsigned nblk) +drvread(struct dsk *dsk, void *buf, daddr_t lba, unsigned nblk) { #ifdef GPT static unsigned c = 0x2d5c7c2f; @@ -999,7 +1000,7 @@ drvread(struct dsk *dsk, void *buf, unsi v86.es = VTOPSEG(buf); v86.eax = lba; v86.ebx = VTOPOFF(buf); - v86.ecx = lba >> 16; + v86.ecx = lba >> 32; v86.edx = nblk << 8 | dsk->drive; v86int(); v86.ctl = V86_FLAGS; Modified: stable/7/sys/boot/i386/zfsboot/zfsldr.S ============================================================================== --- stable/7/sys/boot/i386/zfsboot/zfsldr.S Tue Dec 1 22:38:17 2009 (r200004) +++ stable/7/sys/boot/i386/zfsboot/zfsldr.S Tue Dec 1 22:38:37 2009 (r200005) @@ -83,7 +83,7 @@ ebpb: .byte 0 # BIOS physical drive nu * Trampoline used by boot2 to call read to read data from the disk via * the BIOS. Call with: * - * %cx:%ax - long - LBA to read in + * %ecx:%eax - long - LBA to read in * %es:(%bx) - caddr_t - buffer to read data into * %dl - byte - drive to read from * %dh - byte - num sectors to read @@ -94,10 +94,8 @@ xread: push %ss # Address /* * Setup an EDD disk packet and pass it to read */ -xread.1: # Starting - pushl $0x0 # absolute - push %cx # block - push %ax # number +xread.1: pushl %ecx # Starting absolute block + pushl %eax # block number push %es # Address of push %bx # transfer buffer xor %ax,%ax # Number of @@ -195,7 +193,7 @@ main.4: xor %dx,%dx # Partition:drive */ main.5: mov %dx,MEM_ARG # Save args movb $NSECT,%dh # Sector count - movw $1024,%ax # Offset to boot2 + movl $1024,%eax # Offset to boot2 callw nread.1 # Read disk main.6: mov $MEM_BUF,%si # BTX (before reloc) mov 0xa(%si),%bx # Get BTX length and set @@ -245,10 +243,11 @@ seta20.3: sti # Enable interrupts /* * Trampoline used to call read from within boot1. */ -nread: xor %ax,%ax # Sector offset in partition +nread: xor %eax,%eax # Sector offset in partition nread.1: mov $MEM_BUF,%bx # Transfer buffer - add 0x8(%si),%ax # Get - mov 0xa(%si),%cx # LBA + xor %ecx,%ecx # Get + addl 0x8(%si),%eax # LBA + adc $0,%ecx push %cs # Read from callw xread.1 # disk jnc return # If success, return From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 23:01:59 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 825DE106566B; Tue, 1 Dec 2009 23:01:59 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 577E38FC08; Tue, 1 Dec 2009 23:01:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1N1xI1079335; Tue, 1 Dec 2009 23:01:59 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1N1xFE079333; Tue, 1 Dec 2009 23:01:59 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912012301.nB1N1xFE079333@svn.freebsd.org> From: Fabien Thomas Date: Tue, 1 Dec 2009 23:01:59 +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: r200009 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 23:01:59 -0000 Author: fabient Date: Tue Dec 1 23:01:59 2009 New Revision: 200009 URL: http://svn.freebsd.org/changeset/base/200009 Log: MFC 198343: Handle the case where there is only one PMC in the system. Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_mod.c Tue Dec 1 23:01:29 2009 (r200008) +++ stable/7/sys/dev/hwpmc/hwpmc_mod.c Tue Dec 1 23:01:59 2009 (r200009) @@ -793,7 +793,7 @@ pmc_link_target_process(struct pmc *pm, KASSERT(PMC_IS_VIRTUAL_MODE(PMC_TO_MODE(pm)), ("[pmc,%d] Attaching a non-process-virtual pmc=%p to pid=%d", __LINE__, pm, pp->pp_proc->p_pid)); - KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt < ((int) md->pmd_npmc - 1), + KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt <= ((int) md->pmd_npmc - 1), ("[pmc,%d] Illegal reference count %d for process record %p", __LINE__, pp->pp_refcnt, (void *) pp)); @@ -846,7 +846,7 @@ pmc_unlink_target_process(struct pmc *pm KASSERT(pm != NULL && pp != NULL, ("[pmc,%d] Null pm %p or pp %p", __LINE__, pm, pp)); - KASSERT(pp->pp_refcnt >= 1 && pp->pp_refcnt < (int) md->pmd_npmc, + KASSERT(pp->pp_refcnt >= 1 && pp->pp_refcnt <= (int) md->pmd_npmc, ("[pmc,%d] Illegal ref count %d on process record %p", __LINE__, pp->pp_refcnt, (void *) pp)); @@ -1113,7 +1113,7 @@ pmc_detach_one_process(struct proc *p, s * descriptor from the target hash table and unset the P_HWPMC * flag in the struct proc. */ - KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt < (int) md->pmd_npmc, + KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt <= (int) md->pmd_npmc, ("[pmc,%d] Illegal refcnt %d for process struct %p", __LINE__, pp->pp_refcnt, pp)); @@ -1788,7 +1788,7 @@ pmc_hook_handler(struct thread *td, int pmc_detach_one_process(td->td_proc, pm, PMC_FLAG_NONE); - KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt < (int) md->pmd_npmc, + KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt <= (int) md->pmd_npmc, ("[pmc,%d] Illegal ref count %d on pp %p", __LINE__, pp->pp_refcnt, pp)); From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 23:07:39 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 443451065693; Tue, 1 Dec 2009 23:07:39 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32C748FC14; Tue, 1 Dec 2009 23:07:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1N7dj7079544; Tue, 1 Dec 2009 23:07:39 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1N7dPS079542; Tue, 1 Dec 2009 23:07:39 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912012307.nB1N7dPS079542@svn.freebsd.org> From: Fabien Thomas Date: Tue, 1 Dec 2009 23:07:39 +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: r200011 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 23:07:39 -0000 Author: fabient Date: Tue Dec 1 23:07:38 2009 New Revision: 200011 URL: http://svn.freebsd.org/changeset/base/200011 Log: MFC 199763: - fix a LOR between process lock and pmc thread mutex - fix a system deadlock on process exit when the sample buffer is full (pmclog_loop blocked in fo_write) and pmcstat exit. Modified: stable/7/sys/dev/hwpmc/hwpmc_logging.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_logging.c Tue Dec 1 23:06:17 2009 (r200010) +++ stable/7/sys/dev/hwpmc/hwpmc_logging.c Tue Dec 1 23:07:38 2009 (r200011) @@ -240,6 +240,7 @@ pmclog_loop(void *arg) int error; struct pmc_owner *po; struct pmclog_buffer *lb; + struct proc *p; struct ucred *ownercred; struct ucred *mycred; struct thread *td; @@ -248,12 +249,13 @@ pmclog_loop(void *arg) size_t nbytes; po = (struct pmc_owner *) arg; + p = po->po_owner; td = curthread; mycred = td->td_ucred; - PROC_LOCK(po->po_owner); - ownercred = crhold(po->po_owner->p_ucred); - PROC_UNLOCK(po->po_owner); + PROC_LOCK(p); + ownercred = crhold(p->p_ucred); + PROC_UNLOCK(p); PMCDBG(LOG,INI,1, "po=%p kt=%p", po, po->po_kthread); KASSERT(po->po_kthread == curthread->td_proc, @@ -324,16 +326,16 @@ pmclog_loop(void *arg) error = fo_write(po->po_file, &auio, ownercred, 0, td); td->td_ucred = mycred; - mtx_lock(&pmc_kthread_mtx); - if (error) { /* XXX some errors are recoverable */ /* XXX also check for SIGPIPE if a socket */ /* send a SIGIO to the owner and exit */ - PROC_LOCK(po->po_owner); - psignal(po->po_owner, SIGIO); - PROC_UNLOCK(po->po_owner); + PROC_LOCK(p); + psignal(p, SIGIO); + PROC_UNLOCK(p); + + mtx_lock(&pmc_kthread_mtx); po->po_error = error; /* save for flush log */ @@ -342,6 +344,8 @@ pmclog_loop(void *arg) break; } + mtx_lock(&pmc_kthread_mtx); + /* put the used buffer back into the global pool */ PMCLOG_INIT_BUFFER_DESCRIPTOR(lb); @@ -525,15 +529,20 @@ static void pmclog_stop_kthread(struct pmc_owner *po) { /* - * Unset flag, wakeup the helper thread, + * Close the file to force the thread out of fo_write, + * unset flag, wakeup the helper thread, * wait for it to exit */ - mtx_assert(&pmc_kthread_mtx, MA_OWNED); + if (po->po_file != NULL) + fo_close(po->po_file, curthread); + + mtx_lock(&pmc_kthread_mtx); po->po_flags &= ~PMC_PO_OWNS_LOGFILE; wakeup_one(po); if (po->po_kthread) msleep(po->po_kthread, &pmc_kthread_mtx, PPAUSE, "pmckstp", 0); + mtx_unlock(&pmc_kthread_mtx); } /* @@ -602,10 +611,8 @@ pmclog_configure_log(struct pmc_mdep *md error: /* shutdown the thread */ - mtx_lock(&pmc_kthread_mtx); if (po->po_kthread) pmclog_stop_kthread(po); - mtx_unlock(&pmc_kthread_mtx); KASSERT(po->po_kthread == NULL, ("[pmclog,%d] po=%p kthread not " "stopped", __LINE__, po)); @@ -641,10 +648,8 @@ pmclog_deconfigure_log(struct pmc_owner ("[pmclog,%d] po=%p no log file", __LINE__, po)); /* stop the kthread, this will reset the 'OWNS_LOGFILE' flag */ - mtx_lock(&pmc_kthread_mtx); if (po->po_kthread) pmclog_stop_kthread(po); - mtx_unlock(&pmc_kthread_mtx); KASSERT(po->po_kthread == NULL, ("[pmclog,%d] po=%p kthread not stopped", __LINE__, po)); From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 23:15:59 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3D8810656A5; Tue, 1 Dec 2009 23:15:59 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from tomjudge.vm.bytemark.co.uk (tomjudge.vm.bytemark.co.uk [80.68.91.100]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8E88FC34; Tue, 1 Dec 2009 23:15:58 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 3172048AED; Tue, 1 Dec 2009 23:15:58 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at tomjudge.vm.bytemark.co.uk Received: from tomjudge.vm.bytemark.co.uk ([127.0.0.1]) by localhost (tomjudge.vm.bytemark.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ms3Ntq1ZRzik; Tue, 1 Dec 2009 23:15:52 +0000 (GMT) Received: from rita.nodomain (unknown [192.168.205.6]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id A35C948AE7; Tue, 1 Dec 2009 23:15:51 +0000 (GMT) Message-ID: <4B15A358.8060909@tomjudge.com> Date: Tue, 01 Dec 2009 23:14:32 +0000 From: Tom Judge User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Maxim Sobolev References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> <4B14382F.5080000@FreeBSD.org> <20091130205141.2911011e.stas@FreeBSD.org> <4B14BF23.1030303@FreeBSD.org> <4B1516E5.9030508@tomjudge.com> <4B15966B.9080102@FreeBSD.org> In-Reply-To: <4B15966B.9080102@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: Stanislav Sedov , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 23:15:59 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Maxim Sobolev wrote: > Tom Judge wrote: >> >> >> When you see this lock up do you also see denied requests for mbufs? >> >> All the times I have seen the issue, the system was denying mbuf >> requests. > > Not sure about that, since we only have had network connection to that > box, no console. However, I think that the problem with the other > network subsystems that we see at the same time suggests that it might > be an issue with the mbufs indeed. > If you could put some simple cron job in that dumps the denied counters to disk every minute or so that would help diagnose the issue. Tom - -- TJU13-ARIN -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJLFaNYAAoJEMSwVS7lr0OdIwkIAJdQXEU9a+nQ9tjq8YezkRHU /SMEst2To8NxH+AktOLr0dkOmMi484VFJRWLUEyBBi1AAKELNfLucTwCisvhTLmX 6LgqDWghJdPnx014HWozHLbkakeeL/rmFyo5ZdbfWhkQgPxwcxyB5EkKHLcOz0OF SnRT57vTdFQwHPOSMV5DcvO2XwTP2zHdqecT2edvAbY4LQeP8QTtLkOrwuPHnP1w vknrpNxgd+A7Wt1ME0HMUD4UuZUvuHekw5DhM07YJGWSJXdu3HmO2DJf3jMznLAV EC43I+Uouz6zo3fVCp5Jhvmf57fK6wAFxhhdvuVPn0niD6VDgnxj5gSoUKOyyNg= =mWfX -----END PGP SIGNATURE----- From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 1 23:24:42 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE268106566C; Tue, 1 Dec 2009 23:24:42 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACF438FC22; Tue, 1 Dec 2009 23:24:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1NOgFC080032; Tue, 1 Dec 2009 23:24:42 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1NOgTw080030; Tue, 1 Dec 2009 23:24:42 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912012324.nB1NOgTw080030@svn.freebsd.org> From: Fabien Thomas Date: Tue, 1 Dec 2009 23:24:42 +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: r200013 - stable/7/lib/libfetch X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 23:24:42 -0000 Author: fabient Date: Tue Dec 1 23:24:42 2009 New Revision: 200013 URL: http://svn.freebsd.org/changeset/base/200013 Log: MFC 198339: Fix the NO_PROXY handling. PR: 139751 Modified: stable/7/lib/libfetch/common.c Directory Properties: stable/7/lib/libfetch/ (props changed) Modified: stable/7/lib/libfetch/common.c ============================================================================== --- stable/7/lib/libfetch/common.c Tue Dec 1 23:23:52 2009 (r200012) +++ stable/7/lib/libfetch/common.c Tue Dec 1 23:24:42 2009 (r200013) @@ -772,7 +772,7 @@ fetch_no_proxy_match(const char *host) break; d_len = q - p; - if (d_len > 0 && h_len > d_len && + if (d_len > 0 && h_len >= d_len && strncasecmp(host + h_len - d_len, p, d_len) == 0) { /* domain name matches */ From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 2 03:08:29 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB52C1065672; Wed, 2 Dec 2009 03:08:29 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8DA58FC0A; Wed, 2 Dec 2009 03:08:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB238Tt9085137; Wed, 2 Dec 2009 03:08:29 GMT (envelope-from wollman@svn.freebsd.org) Received: (from wollman@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB238Tdm085126; Wed, 2 Dec 2009 03:08:29 GMT (envelope-from wollman@svn.freebsd.org) Message-Id: <200912020308.nB238Tdm085126@svn.freebsd.org> From: Garrett Wollman Date: Wed, 2 Dec 2009 03:08:29 +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: r200017 - in stable/7/lib/libc: gen rpc stdio yp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2009 03:08:29 -0000 Author: wollman Date: Wed Dec 2 03:08:29 2009 New Revision: 200017 URL: http://svn.freebsd.org/changeset/base/200017 Log: MFC revs 199781,199782,199784,199786: Eliminate dead stores. In __mbsconv(), if prec was zero, nconv could have been used uninitialized. Initialize it to a safe value so that there's no chance of returning an error if stack garbage happens to be equal to (size_t)-1 or (size_t)-2. In clnt_raw_create(), avoid minor race condition initializing the file-scope variable clntraw_private. Mark head rev 199785 as merged; 7-STABLE's version of svc_raw_reply() doesn't have the same bug (or even look all that similar). Found by: Clang static analyzer Modified: stable/7/lib/libc/gen/getcap.c stable/7/lib/libc/gen/getusershell.c stable/7/lib/libc/gen/wordexp.c stable/7/lib/libc/rpc/clnt_raw.c stable/7/lib/libc/rpc/getnetconfig.c stable/7/lib/libc/rpc/key_call.c stable/7/lib/libc/stdio/fgetws.c stable/7/lib/libc/stdio/fvwrite.c stable/7/lib/libc/stdio/vfwprintf.c stable/7/lib/libc/yp/yplib.c Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/gen/getcap.c ============================================================================== --- stable/7/lib/libc/gen/getcap.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/gen/getcap.c Wed Dec 2 03:08:29 2009 (r200017) @@ -647,7 +647,7 @@ int cgetnext(char **bp, char **db_array) { size_t len; - int done, hadreaderr, i, savederrno, status; + int done, hadreaderr, savederrno, status; char *cp, *line, *rp, *np, buf[BSIZE], nbuf[BSIZE]; u_int dummy; @@ -658,7 +658,7 @@ cgetnext(char **bp, char **db_array) (void)cgetclose(); return (-1); } - for(;;) { + for (;;) { if (toprec && !gottoprec) { gottoprec = 1; line = toprec; @@ -709,7 +709,6 @@ cgetnext(char **bp, char **db_array) /* * Line points to a name line. */ - i = 0; done = 0; np = nbuf; for (;;) { Modified: stable/7/lib/libc/gen/getusershell.c ============================================================================== --- stable/7/lib/libc/gen/getusershell.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/gen/getusershell.c Wed Dec 2 03:08:29 2009 (r200017) @@ -124,7 +124,7 @@ _local_initshells(rv, cb_data, ap) if ((fp = fopen(_PATH_SHELLS, "r")) == NULL) return NS_UNAVAIL; - sp = cp = line; + cp = line; while (fgets(cp, MAXPATHLEN + 1, fp) != NULL) { while (*cp != '#' && *cp != '/' && *cp != '\0') cp++; Modified: stable/7/lib/libc/gen/wordexp.c ============================================================================== --- stable/7/lib/libc/gen/wordexp.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/gen/wordexp.c Wed Dec 2 03:08:29 2009 (r200017) @@ -282,7 +282,7 @@ we_check(const char *words, int flags) if (c == '\0' || level != 0) return (WRDE_SYNTAX); } else - c = *--words; + --words; break; default: break; Modified: stable/7/lib/libc/rpc/clnt_raw.c ============================================================================== --- stable/7/lib/libc/rpc/clnt_raw.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/rpc/clnt_raw.c Wed Dec 2 03:08:29 2009 (r200017) @@ -92,13 +92,13 @@ clnt_raw_create(prog, vers) rpcprog_t prog; rpcvers_t vers; { - struct clntraw_private *clp = clntraw_private; + struct clntraw_private *clp; struct rpc_msg call_msg; - XDR *xdrs = &clp->xdr_stream; - CLIENT *client = &clp->client_object; + XDR *xdrs; + CLIENT *client; mutex_lock(&clntraw_lock); - if (clp == NULL) { + if ((clp = clntraw_private) == NULL) { clp = (struct clntraw_private *)calloc(1, sizeof (*clp)); if (clp == NULL) { mutex_unlock(&clntraw_lock); @@ -110,6 +110,9 @@ clnt_raw_create(prog, vers) clp->_raw_buf = __rpc_rawcombuf; clntraw_private = clp; } + xdrs = &clp->xdr_stream; + client = &clp->client_object; + /* * pre-serialize the static part of the call msg and stash it away */ Modified: stable/7/lib/libc/rpc/getnetconfig.c ============================================================================== --- stable/7/lib/libc/rpc/getnetconfig.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/rpc/getnetconfig.c Wed Dec 2 03:08:29 2009 (r200017) @@ -412,13 +412,13 @@ void *handlep; * Noone needs these entries anymore, then frees them. * Make sure all info in netconfig_info structure has been reinitialized. */ - q = p = ni.head; + q = ni.head; ni.eof = ni.ref = 0; ni.head = NULL; ni.tail = NULL; mutex_unlock(&ni_lock); - while (q) { + while (q != NULL) { p = q->next; if (q->ncp->nc_lookups != NULL) free(q->ncp->nc_lookups); free(q->ncp); Modified: stable/7/lib/libc/rpc/key_call.c ============================================================================== --- stable/7/lib/libc/rpc/key_call.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/rpc/key_call.c Wed Dec 2 03:08:29 2009 (r200017) @@ -302,7 +302,7 @@ int vers; void *localhandle; struct netconfig *nconf; struct netconfig *tpconf; - struct key_call_private *kcp = key_call_private_main; + struct key_call_private *kcp; struct timeval wait_time; struct utsname u; int main_thread; Modified: stable/7/lib/libc/stdio/fgetws.c ============================================================================== --- stable/7/lib/libc/stdio/fgetws.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/stdio/fgetws.c Wed Dec 2 03:08:29 2009 (r200017) @@ -89,7 +89,7 @@ fgetws(wchar_t * __restrict ws, int n, F if (!__mbsinit(&fp->_extra->mbstate)) /* Incomplete character */ goto error; - *wsp++ = L'\0'; + *wsp = L'\0'; FUNLOCKFILE(fp); return (ws); Modified: stable/7/lib/libc/stdio/fvwrite.c ============================================================================== --- stable/7/lib/libc/stdio/fvwrite.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/stdio/fvwrite.c Wed Dec 2 03:08:29 2009 (r200017) @@ -60,7 +60,7 @@ __sfvwrite(fp, uio) char *nl; int nlknown, nldist; - if ((len = uio->uio_resid) == 0) + if (uio->uio_resid == 0) return (0); /* make sure we can write */ if (prepwrite(fp) != 0) Modified: stable/7/lib/libc/stdio/vfwprintf.c ============================================================================== --- stable/7/lib/libc/stdio/vfwprintf.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/stdio/vfwprintf.c Wed Dec 2 03:08:29 2009 (r200017) @@ -367,7 +367,7 @@ __mbsconv(char *mbsarg, int prec) * number of characters to print. */ p = mbsarg; - insize = nchars = 0; + insize = nchars = nconv = 0; mbs = initial; while (nchars != (size_t)prec) { nconv = mbrlen(p, MB_CUR_MAX, &mbs); Modified: stable/7/lib/libc/yp/yplib.c ============================================================================== --- stable/7/lib/libc/yp/yplib.c Wed Dec 2 02:47:29 2009 (r200016) +++ stable/7/lib/libc/yp/yplib.c Wed Dec 2 03:08:29 2009 (r200017) @@ -241,7 +241,7 @@ static bool_t ypmatch_cache_lookup(struct dom_binding *ypdb, char *map, keydat *key, valdat *val) { - struct ypmatch_ent *c = ypdb->cache; + struct ypmatch_ent *c; ypmatch_cache_expire(ypdb); From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 2 09:00:00 2009 Return-Path: Delivered-To: svn-src-stable-7@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A492E1065670; Wed, 2 Dec 2009 09:00:00 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 40BAA8FC14; Wed, 2 Dec 2009 09:00:00 +0000 (UTC) Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net [70.71.167.197]) (authenticated bits=0) by sippysoft.com (8.14.3/8.14.3) with ESMTP id nB28xuh6007958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Dec 2009 00:59:57 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4B162C8E.3090507@FreeBSD.org> Date: Wed, 02 Dec 2009 00:59:58 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Attila Nagy References: <200911151143.nAFBhTSD036619@svn.freebsd.org> <4B141D2E.1000203@FreeBSD.org> <4B142655.6030703@tomjudge.com> <4B14382F.5080000@FreeBSD.org> <20091130205141.2911011e.stas@FreeBSD.org> <4B14BF23.1030303@FreeBSD.org> <4B159540.9000503@fsn.hu> In-Reply-To: <4B159540.9000503@fsn.hu> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, Stanislav Sedov , svn-src-stable-7@FreeBSD.org, Tom Judge Subject: Re: svn: stable/7/sys: conf dev/bce X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2009 09:00:00 -0000 Attila Nagy wrote: > Maxim Sobolev wrote: >> Stanislav Sedov wrote: >>> On Mon, 30 Nov 2009 13:25:03 -0800 >>> Maxim Sobolev mentioned: >>> >>>> Can we change the name then? We've seen the similar issue without >>>> the jumbo frames, which made me wonder. >>> >>> It's strange, because 'normal' frames are less than a page size in >>> length, >>> so the issue I was experiencing should not be reproducable with jumbo >>> frames >>> disabled. Can you describe a bit more what kind of problem you're >>> experiencing? >> >> The traffic through interface abruptly halts randomly when under a >> load, without any signs of a problem. What is interesting is that the >> communication through unix domain sockets appears to be down too, >> since some scripts that connect to database not able to complete as >> well, so whatever this problem is it affect the whole network >> subsystem. We tried to replace hardware and it did not help. Only >> after we replaced bce(4) with IntelPro card (em) the problem has went >> away. > Sorry, I've just noticed this thread and did not read the earlier posts. > I can see similar, although only (at least for now) on version 8 > (running something around RC2), also with bce interfaces and "heavy" -in > terms of pps, this is a DNS server- network load. > > Everything which involves network halts for some minutes, but the > machine is completely usable from the console. top shows some processes > (I don't have an output, but as far as I can remember they were only > that which did network IO) in the "keglim" state. > Then something happens and the machine starts to work again. > > Can this be the same, or is it completely different? It really looks like the same issue. Those boxes are heavy-duty VoIP switches, so that they are handling high PPS as well in our case. -Maxim From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 2 15:24:58 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51EC8106568D; Wed, 2 Dec 2009 15:24:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 404308FC14; Wed, 2 Dec 2009 15:24:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB2FOvr5021717; Wed, 2 Dec 2009 15:24:57 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB2FOvrv021715; Wed, 2 Dec 2009 15:24:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200912021524.nB2FOvrv021715@svn.freebsd.org> From: John Baldwin Date: Wed, 2 Dec 2009 15:24:57 +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: r200030 - stable/7/sys/vm X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2009 15:24:58 -0000 Author: jhb Date: Wed Dec 2 15:24:57 2009 New Revision: 200030 URL: http://svn.freebsd.org/changeset/base/200030 Log: MFC 194429: Add support for UMA_SLAB_KERNEL to page_free(). (While I'm here remove an unnecessary newline character from the end of two panic messages.) Modified: stable/7/sys/vm/uma_core.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/vm/uma_core.c ============================================================================== --- stable/7/sys/vm/uma_core.c Wed Dec 2 15:20:31 2009 (r200029) +++ stable/7/sys/vm/uma_core.c Wed Dec 2 15:24:57 2009 (r200030) @@ -1033,8 +1033,10 @@ page_free(void *mem, int size, u_int8_t if (flags & UMA_SLAB_KMEM) map = kmem_map; + else if (flags & UMA_SLAB_KERNEL) + map = kernel_map; else - panic("UMA: page_free used with invalid flags %d\n", flags); + panic("UMA: page_free used with invalid flags %d", flags); kmem_free(map, (vm_offset_t)mem, size); } @@ -1292,7 +1294,7 @@ keg_ctor(void *mem, int size, void *udat printf("zone %s ipers %d rsize %d size %d\n", zone->uz_name, keg->uk_ipers, keg->uk_rsize, keg->uk_size); - panic("UMA slab won't fit.\n"); + panic("UMA slab won't fit."); } } From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 2 15:34:13 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C01106568D; Wed, 2 Dec 2009 15:34:13 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEA5A8FC2E; Wed, 2 Dec 2009 15:34:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB2FYDYE023144; Wed, 2 Dec 2009 15:34:13 GMT (envelope-from fanf@svn.freebsd.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB2FYDEW023140; Wed, 2 Dec 2009 15:34:13 GMT (envelope-from fanf@svn.freebsd.org) Message-Id: <200912021534.nB2FYDEW023140@svn.freebsd.org> From: Tony Finch Date: Wed, 2 Dec 2009 15:34:13 +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: r200032 - stable/7/usr.bin/unifdef X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2009 15:34:13 -0000 Author: fanf Date: Wed Dec 2 15:34:13 2009 New Revision: 200032 URL: http://svn.freebsd.org/changeset/base/200032 Log: MFC 199813, 199817, 199842, 199867: Update unifdef to latest upstream version. Modified: stable/7/usr.bin/unifdef/unifdef.1 stable/7/usr.bin/unifdef/unifdef.c stable/7/usr.bin/unifdef/unifdefall.sh Directory Properties: stable/7/usr.bin/unifdef/ (props changed) Modified: stable/7/usr.bin/unifdef/unifdef.1 ============================================================================== --- stable/7/usr.bin/unifdef/unifdef.1 Wed Dec 2 15:30:53 2009 (r200031) +++ stable/7/usr.bin/unifdef/unifdef.1 Wed Dec 2 15:34:13 2009 (r200032) @@ -1,6 +1,6 @@ .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. -.\" Copyright (c) 2002 - 2005 Tony Finch . All rights reserved. +.\" Copyright (c) 2002 - 2009 Tony Finch . All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Dave Yost. It was rewritten to support ANSI C by Tony Finch. @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)unifdef.1 8.2 (Berkeley) 4/1/94 -.\" $dotat: things/unifdef.1,v 1.51 2005/03/08 12:39:01 fanf2 Exp $ +.\" $dotat: unifdef/unifdef.1,v 1.60 2009/11/25 00:11:02 fanf2 Exp $ .\" $FreeBSD$ .\" .Dd September 24, 2002 @@ -41,7 +41,7 @@ .Nd remove preprocessor conditionals from code .Sh SYNOPSIS .Nm -.Op Fl cdeklnst +.Op Fl BbcdeKknst .Op Fl I Ns Ar path .Op Fl D Ns Ar sym Ns Op = Ns Ar val .Op Fl U Ns Ar sym @@ -70,46 +70,85 @@ utility acts on .Ic #if , #ifdef , #ifndef , #elif , #else , and .Ic #endif -lines, -and it understands only the commonly-used subset +lines. +A directive is only processed +if the symbols specified on the command line are sufficient to allow +.Nm +to get a definite value for its control expression. +If the result is false, +the directive and the following lines under its control are removed. +If the result is true, +only the directive is removed. +An +.Ic #ifdef +or +.Ic #ifndef +directive is passed through unchanged +if its controlling symbol is not specified on the command line. +Any +.Ic #if +or +.Ic #elif +control expression that has an unknown value or that +.Nm +cannot parse is passed through unchanged. +By default, +.Nm +ignores +.Ic #if +and +.Ic #elif +lines with constant expressions; +it can be told to process them by specifying the +.Fl k +flag on the command line. +.Pp +It understands a commonly-used subset of the expression syntax for .Ic #if and .Ic #elif -lines. -It handles +lines: +integer constants, integer values of symbols defined on the command line, the .Fn defined -operator applied to symbols defined or undefined on the command line, +operator, the operators .Ic \&! , < , > , <= , >= , == , != , && , || , and parenthesized expressions. -Anything that it does not understand is passed through unharmed. -It only processes -.Ic #ifdef -and -.Ic #ifndef -directives if the symbol is specified on the command line, -otherwise they are also passed through unchanged. -By default, it ignores -.Ic #if -and -.Ic #elif -lines with constant expressions, -or they may be processed by specifying the -.Fl k -flag on the command line. +A kind of +.Dq "short circuit" +evaluation is used for the +.Ic && +operator: +if either operand is definitely false then the result is false, +even if the value of the other operand is unknown. +Similarly, +if either operand of +.Ic || +is definitely true then the result is true. +.Pp +In most cases, the +.Nm +utility does not distinguish between object-like macros +(without arguments) and function-like arguments (with arguments). +If a macro is not explicitly defined, or is defined with the +.Fl D +flag on the command-line, its arguments are ignored. +If a macro is explicitly undefined on the command line with the +.Fl U +flag, it may not have any arguments since this leads to a syntax error. .Pp The .Nm -utility also understands just enough about C +utility understands just enough about C to know when one of the directives is inactive because it is inside a comment, or affected by a backslash-continued line. It spots unusually-formatted preprocessor directives -and knows when the layout is too odd to handle. +and knows when the layout is too odd for it to handle. .Pp A script called .Nm unifdefall @@ -125,8 +164,7 @@ and their definitions (or lack thereof), then invokes .Nm with appropriate arguments to process the file. -.Pp -Available options: +.Sh OPTIONS .Pp .Bl -tag -width indent -compact .It Fl D Ns Ar sym Ns Op = Ns Ar val @@ -143,6 +181,19 @@ Specify that a symbol is undefined. If the same symbol appears in more than one argument, the last occurrence dominates. .Pp +.It Fl B +Compress blank lines around a deleted section. +Mutually exclusive with the +.Fl b +option. +.Pp +.It Fl b +Replace removed lines with blank lines +instead of deleting them. +Mutually exclusive with the +.Fl B +option. +.Pp .It Fl c If the .Fl c @@ -174,6 +225,16 @@ option changes the behaviour so that, where possible, such lines are left unprocessed instead of reporting an error. .Pp +.It Fl K +Always treat the result of +.Ic && +and +.Ic || +operators as unknown if either operand is unknown, +instead of short-circuiting when unknown operands can't affect the result. +This option is for compatibility with older versions of +.Nm . +.Pp .It Fl k Process .Ic #if @@ -186,10 +247,6 @@ because they typically start and are used as a kind of comment to sketch out future or past development. It would be rude to strip them out, just as it would be for normal comments. .Pp -.It Fl l -Replace removed lines with blank lines -instead of deleting them. -.Pp .It Fl n Add .Li #line @@ -235,7 +292,7 @@ comments and line continuations inside those .Ic #ifdef Ns s . -One specifies ignored symbols with +You can specify ignored symbols with .Fl iD Ns Ar sym Ns Oo = Ns Ar val Oc and .Fl iU Ns Ar sym @@ -313,7 +370,7 @@ command appeared in support was added in .Fx 4.7 . .Sh AUTHORS -This implementation was originally written by +The original implementation was written by .An Dave Yost Aq Dave@Yost.com . .An Tony Finch Aq dot@dotat.at rewrote it to support Modified: stable/7/usr.bin/unifdef/unifdef.c ============================================================================== --- stable/7/usr.bin/unifdef/unifdef.c Wed Dec 2 15:30:53 2009 (r200031) +++ stable/7/usr.bin/unifdef/unifdef.c Wed Dec 2 15:34:13 2009 (r200032) @@ -1,13 +1,5 @@ /* - * Copyright (c) 2002 - 2005 Tony Finch . All rights reserved. - * - * This code is derived from software contributed to Berkeley by Dave Yost. - * It was rewritten to support ANSI C by Tony Finch. The original version of - * unifdef carried the following copyright notice. None of its code remains - * in this version (though some of the names remain). - * - * Copyright (c) 1985, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 2002 - 2009 Tony Finch * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,20 +23,21 @@ * SUCH DAMAGE. */ +/* + * This code was derived from software contributed to Berkeley by Dave Yost. + * It was rewritten to support ANSI C by Tony Finch. The original version + * of unifdef carried the 4-clause BSD copyright licence. None of its code + * remains in this version (though some of the names remain) so it now + * carries a more liberal licence. + * + * The latest version is available from http://dotat.at/prog/unifdef + */ + #include -#ifndef lint -#if 0 -static const char copyright[] = -"@(#) Copyright (c) 1985, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif #ifdef __IDSTRING -__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93"); -__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.8 2000/07/03 02:51:36 matt Exp $"); -__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.171 2005/03/08 12:38:48 fanf2 Exp $"); +__IDSTRING(dotat, "$dotat: unifdef/unifdef.c,v 1.190 2009/11/27 17:21:26 fanf2 Exp $"); #endif -#endif /* not lint */ #ifdef __FBSDID __FBSDID("$FreeBSD$"); #endif @@ -88,6 +81,7 @@ typedef enum { LT_DODGY_LAST = LT_DODGY + LT_ENDIF, LT_PLAIN, /* ordinary line */ LT_EOF, /* end of file */ + LT_ERROR, /* unevaluable #if */ LT_COUNT } Linetype; @@ -98,7 +92,7 @@ static char const * const linetype_name[ "DODGY IF", "DODGY TRUE", "DODGY FALSE", "DODGY ELIF", "DODGY ELTRUE", "DODGY ELFALSE", "DODGY ELSE", "DODGY ENDIF", - "PLAIN", "EOF" + "PLAIN", "EOF", "ERROR" }; /* state of #if processing */ @@ -166,11 +160,13 @@ static char const * const linestate_name * Globals. */ +static bool compblank; /* -B: compress blank lines */ +static bool lnblank; /* -b: blank deleted lines */ static bool complement; /* -c: do the complement */ static bool debugging; /* -d: debugging reports */ static bool iocccok; /* -e: fewer IOCCC errors */ +static bool strictlogic; /* -K: keep ambiguous #ifs */ static bool killconsts; /* -k: eval constant #ifs */ -static bool lnblank; /* -l: blank deleted lines */ static bool lnnum; /* -n: add #line directives */ static bool symlist; /* -s: output symbol list */ static bool text; /* -t: this is a text file */ @@ -194,7 +190,9 @@ static bool ignoring[MAXDEPT static int stifline[MAXDEPTH]; /* start of current #if */ static int depth; /* current #if nesting */ static int delcount; /* count of deleted lines */ -static bool keepthis; /* don't delete constant #if */ +static unsigned blankcount; /* count of blank lines */ +static unsigned blankmax; /* maximum recent blankcount */ +static bool constexpr; /* constant #if expression */ static int exitstat; /* program exit status */ @@ -204,13 +202,14 @@ static void done(void); static void error(const char *); static int findsym(const char *); static void flushline(bool); -static Linetype getline(void); +static Linetype parseline(void); static Linetype ifeval(const char **); static void ignoreoff(void); static void ignoreon(void); static void keywordedit(const char *); static void nest(void); static void process(void); +static const char *skipargs(const char *); static const char *skipcomment(const char *); static const char *skipsym(const char *); static void state(Ifstate); @@ -218,7 +217,7 @@ static int strlcmp(const ch static void unnest(void); static void usage(void); -#define endsym(c) (!isalpha((unsigned char)c) && !isdigit((unsigned char)c) && c != '_') +#define endsym(c) (!isalnum((unsigned char)c) && c != '_') /* * The main program. @@ -228,7 +227,7 @@ main(int argc, char *argv[]) { int opt; - while ((opt = getopt(argc, argv, "i:D:U:I:cdeklnst")) != -1) + while ((opt = getopt(argc, argv, "i:D:U:I:BbcdeKklnst")) != -1) switch (opt) { case 'i': /* treat stuff controlled by these symbols as text */ /* @@ -253,6 +252,13 @@ main(int argc, char *argv[]) case 'I': /* no-op for compatibility with cpp */ break; + case 'B': /* compress blank lines around removed section */ + compblank = true; + break; + case 'b': /* blank deleted lines instead of omitting them */ + case 'l': /* backwards compatibility */ + lnblank = true; + break; case 'c': /* treat -D as -U and vice versa */ complement = true; break; @@ -262,12 +268,12 @@ main(int argc, char *argv[]) case 'e': /* fewer errors from dodgy lines */ iocccok = true; break; + case 'K': /* keep ambiguous #ifs */ + strictlogic = true; + break; case 'k': /* process constant #ifs */ killconsts = true; break; - case 'l': /* blank deleted lines instead of omitting them */ - lnblank = true; - break; case 'n': /* add #line directive after deleted lines */ lnnum = true; break; @@ -282,6 +288,8 @@ main(int argc, char *argv[]) } argc -= optind; argv += optind; + if (compblank && lnblank) + errx(2, "-B and -b are mutually exclusive"); if (argc > 1) { errx(2, "can only do one file"); } else if (argc == 1 && strcmp(*argv, "-") != 0) { @@ -300,7 +308,7 @@ main(int argc, char *argv[]) static void usage(void) { - fprintf(stderr, "usage: unifdef [-cdeklnst] [-Ipath]" + fprintf(stderr, "usage: unifdef [-BbcdeKknst] [-Ipath]" " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n"); exit(2); } @@ -381,46 +389,46 @@ static state_fn * const trans_table[IS_C /* IS_OUTSIDE */ { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Eendif, Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eendif, - print, done }, + print, done, abort }, /* IS_FALSE_PREFIX */ { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Strue, Sfalse,Selse, Dendif, Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Eioccc,Eioccc,Eioccc,Eioccc, - drop, Eeof }, + drop, Eeof, abort }, /* IS_TRUE_PREFIX */ { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Dfalse,Dfalse,Dfalse,Delse, Dendif, Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc, - print, Eeof }, + print, Eeof, abort }, /* IS_PASS_MIDDLE */ { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Pelif, Mtrue, Delif, Pelse, Pendif, Oiffy, Oiffy, Fpass, Oif, Oif, Pelif, Oelif, Oelif, Pelse, Pendif, - print, Eeof }, + print, Eeof, abort }, /* IS_FALSE_MIDDLE */ { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Pelif, Mtrue, Delif, Pelse, Pendif, Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc, - drop, Eeof }, + drop, Eeof, abort }, /* IS_TRUE_MIDDLE */ { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Melif, Melif, Melif, Melse, Pendif, Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Pendif, - print, Eeof }, + print, Eeof, abort }, /* IS_PASS_ELSE */ { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Pendif, Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Pendif, - print, Eeof }, + print, Eeof, abort }, /* IS_FALSE_ELSE */ { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Dendif, Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Eioccc, - drop, Eeof }, + drop, Eeof, abort }, /* IS_TRUE_ELSE */ { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Dendif, Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eioccc, - print, Eeof }, + print, Eeof, abort }, /* IS_FALSE_TRAILER */ { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Dendif, Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Eioccc, - drop, Eeof } + drop, Eeof, abort } /*TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF (DODGY) - PLAIN EOF */ + PLAIN EOF ERROR */ }; /* @@ -454,9 +462,11 @@ keywordedit(const char *replacement) static void nest(void) { - depth += 1; - if (depth >= MAXDEPTH) + if (depth > MAXDEPTH-1) + abort(); /* bug */ + if (depth == MAXDEPTH-1) error("Too many levels of nesting"); + depth += 1; stifline[depth] = linenum; } static void @@ -481,15 +491,23 @@ flushline(bool keep) if (symlist) return; if (keep ^ complement) { - if (lnnum && delcount > 0) - printf("#line %d\n", linenum); - fputs(tline, stdout); - delcount = 0; + bool blankline = tline[strspn(tline, " \t\n")] == '\0'; + if (blankline && compblank && blankcount != blankmax) { + delcount += 1; + blankcount += 1; + } else { + if (lnnum && delcount > 0) + printf("#line %d\n", linenum); + fputs(tline, stdout); + delcount = 0; + blankmax = blankcount = blankline ? blankcount + 1 : 0; + } } else { if (lnblank) putc('\n', stdout); exitstat = 1; delcount += 1; + blankcount = 0; } } @@ -501,9 +519,12 @@ process(void) { Linetype lineval; + /* When compressing blank lines, act as if the file + is preceded by a large number of blank lines. */ + blankmax = blankcount = 1000; for (;;) { linenum++; - lineval = getline(); + lineval = parseline(); trans_table[ifstate[depth]][lineval](); debug("process %s -> %s depth %d", linetype_name[lineval], @@ -517,7 +538,7 @@ process(void) * help from skipcomment(). */ static Linetype -getline(void) +parseline(void) { const char *cp; int cursym; @@ -586,9 +607,21 @@ getline(void) if (incomment) linestate = LS_DIRTY; } - /* skipcomment should have changed the state */ - if (linestate == LS_HASH) - abort(); /* bug */ + /* skipcomment normally changes the state, except + if the last line of the file lacks a newline, or + if there is too much whitespace in a directive */ + if (linestate == LS_HASH) { + size_t len = cp - tline; + if (fgets(tline + len, MAXLINE - len, input) == NULL) { + /* append the missing newline */ + tline[len+0] = '\n'; + tline[len+1] = '\0'; + cp++; + linestate = LS_START; + } else { + linestate = LS_DIRTY; + } + } } if (linestate == LS_DIRTY) { while (*cp != '\0') @@ -601,17 +634,40 @@ getline(void) /* * These are the binary operators that are supported by the expression - * evaluator. Note that if support for division is added then we also - * need short-circuiting booleans because of divide-by-zero. + * evaluator. */ -static int op_lt(int a, int b) { return (a < b); } -static int op_gt(int a, int b) { return (a > b); } -static int op_le(int a, int b) { return (a <= b); } -static int op_ge(int a, int b) { return (a >= b); } -static int op_eq(int a, int b) { return (a == b); } -static int op_ne(int a, int b) { return (a != b); } -static int op_or(int a, int b) { return (a || b); } -static int op_and(int a, int b) { return (a && b); } +static Linetype op_strict(int *p, int v, Linetype at, Linetype bt) { + if(at == LT_IF || bt == LT_IF) return (LT_IF); + return (*p = v, v ? LT_TRUE : LT_FALSE); +} +static Linetype op_lt(int *p, Linetype at, int a, Linetype bt, int b) { + return op_strict(p, a < b, at, bt); +} +static Linetype op_gt(int *p, Linetype at, int a, Linetype bt, int b) { + return op_strict(p, a > b, at, bt); +} +static Linetype op_le(int *p, Linetype at, int a, Linetype bt, int b) { + return op_strict(p, a <= b, at, bt); +} +static Linetype op_ge(int *p, Linetype at, int a, Linetype bt, int b) { + return op_strict(p, a >= b, at, bt); +} +static Linetype op_eq(int *p, Linetype at, int a, Linetype bt, int b) { + return op_strict(p, a == b, at, bt); +} +static Linetype op_ne(int *p, Linetype at, int a, Linetype bt, int b) { + return op_strict(p, a != b, at, bt); +} +static Linetype op_or(int *p, Linetype at, int a, Linetype bt, int b) { + if (!strictlogic && (at == LT_TRUE || bt == LT_TRUE)) + return (*p = 1, LT_TRUE); + return op_strict(p, a || b, at, bt); +} +static Linetype op_and(int *p, Linetype at, int a, Linetype bt, int b) { + if (!strictlogic && (at == LT_FALSE || bt == LT_FALSE)) + return (*p = 0, LT_FALSE); + return op_strict(p, a && b, at, bt); +} /* * An evaluation function takes three arguments, as follows: (1) a pointer to @@ -620,8 +676,8 @@ static int op_and(int a, int b) { return * value of the expression; and (3) a pointer to a char* that points to the * expression to be evaluated and that is updated to the end of the expression * when evaluation is complete. The function returns LT_FALSE if the value of - * the expression is zero, LT_TRUE if it is non-zero, or LT_IF if the - * expression could not be evaluated. + * the expression is zero, LT_TRUE if it is non-zero, LT_IF if the expression + * depends on an unknown symbol, or LT_ERROR if there is a parse failure. */ struct ops; @@ -640,7 +696,7 @@ static const struct ops { eval_fn *inner; struct op { const char *str; - int (*fn)(int, int); + Linetype (*fn)(int *, Linetype, int, Linetype, int); } op[5]; } eval_ops[] = { { eval_table, { { "||", op_or } } }, @@ -655,8 +711,8 @@ static const struct ops { /* * Function for evaluating the innermost parts of expressions, - * viz. !expr (expr) defined(symbol) symbol number - * We reset the keepthis flag when we find a non-constant subexpression. + * viz. !expr (expr) number defined(symbol) symbol + * We reset the constexpr flag in the last two cases. */ static Linetype eval_unary(const struct ops *ops, int *valp, const char **cpp) @@ -664,63 +720,83 @@ eval_unary(const struct ops *ops, int *v const char *cp; char *ep; int sym; + bool defparen; + Linetype lt; cp = skipcomment(*cpp); if (*cp == '!') { debug("eval%d !", ops - eval_ops); cp++; - if (eval_unary(ops, valp, &cp) == LT_IF) - return (LT_IF); - *valp = !*valp; + lt = eval_unary(ops, valp, &cp); + if (lt == LT_ERROR) + return (LT_ERROR); + if (lt != LT_IF) { + *valp = !*valp; + lt = *valp ? LT_TRUE : LT_FALSE; + } } else if (*cp == '(') { cp++; debug("eval%d (", ops - eval_ops); - if (eval_table(eval_ops, valp, &cp) == LT_IF) - return (LT_IF); + lt = eval_table(eval_ops, valp, &cp); + if (lt == LT_ERROR) + return (LT_ERROR); cp = skipcomment(cp); if (*cp++ != ')') - return (LT_IF); + return (LT_ERROR); } else if (isdigit((unsigned char)*cp)) { debug("eval%d number", ops - eval_ops); *valp = strtol(cp, &ep, 0); + if (ep == cp) + return (LT_ERROR); + lt = *valp ? LT_TRUE : LT_FALSE; cp = skipsym(cp); } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) { cp = skipcomment(cp+7); debug("eval%d defined", ops - eval_ops); - if (*cp++ != '(') - return (LT_IF); - cp = skipcomment(cp); + if (*cp == '(') { + cp = skipcomment(cp+1); + defparen = true; + } else { + defparen = false; + } sym = findsym(cp); - if (sym < 0) - return (LT_IF); - *valp = (value[sym] != NULL); + if (sym < 0) { + lt = LT_IF; + } else { + *valp = (value[sym] != NULL); + lt = *valp ? LT_TRUE : LT_FALSE; + } cp = skipsym(cp); cp = skipcomment(cp); - if (*cp++ != ')') - return (LT_IF); - keepthis = false; + if (defparen && *cp++ != ')') + return (LT_ERROR); + constexpr = false; } else if (!endsym(*cp)) { debug("eval%d symbol", ops - eval_ops); sym = findsym(cp); - if (sym < 0) - return (LT_IF); - if (value[sym] == NULL) + cp = skipsym(cp); + if (sym < 0) { + lt = LT_IF; + cp = skipargs(cp); + } else if (value[sym] == NULL) { *valp = 0; - else { + lt = LT_FALSE; + } else { *valp = strtol(value[sym], &ep, 0); if (*ep != '\0' || ep == value[sym]) - return (LT_IF); + return (LT_ERROR); + lt = *valp ? LT_TRUE : LT_FALSE; + cp = skipargs(cp); } - cp = skipsym(cp); - keepthis = false; + constexpr = false; } else { debug("eval%d bad expr", ops - eval_ops); - return (LT_IF); + return (LT_ERROR); } *cpp = cp; debug("eval%d = %d", ops - eval_ops, *valp); - return (*valp ? LT_TRUE : LT_FALSE); + return (lt); } /* @@ -732,11 +808,13 @@ eval_table(const struct ops *ops, int *v const struct op *op; const char *cp; int val; + Linetype lt, rt; debug("eval%d", ops - eval_ops); cp = *cpp; - if (ops->inner(ops+1, valp, &cp) == LT_IF) - return (LT_IF); + lt = ops->inner(ops+1, valp, &cp); + if (lt == LT_ERROR) + return (LT_ERROR); for (;;) { cp = skipcomment(cp); for (op = ops->op; op->str != NULL; op++) @@ -746,14 +824,16 @@ eval_table(const struct ops *ops, int *v break; cp += strlen(op->str); debug("eval%d %s", ops - eval_ops, op->str); - if (ops->inner(ops+1, &val, &cp) == LT_IF) - return (LT_IF); - *valp = op->fn(*valp, val); + rt = ops->inner(ops+1, &val, &cp); + if (rt == LT_ERROR) + return (LT_ERROR); + lt = op->fn(valp, lt, *valp, rt, val); } *cpp = cp; debug("eval%d = %d", ops - eval_ops, *valp); - return (*valp ? LT_TRUE : LT_FALSE); + debug("eval%d lt = %s", ops - eval_ops, linetype_name[lt]); + return (lt); } /* @@ -765,13 +845,13 @@ static Linetype ifeval(const char **cpp) { int ret; - int val; + int val = 0; debug("eval %s", *cpp); - keepthis = killconsts ? false : true; + constexpr = killconsts ? false : true; ret = eval_table(eval_ops, &val, cpp); debug("eval = %d", val); - return (keepthis ? LT_IF : ret); + return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret); } /* @@ -883,6 +963,31 @@ skipcomment(const char *cp) } /* + * Skip macro arguments. + */ +static const char * +skipargs(const char *cp) +{ + const char *ocp = cp; + int level = 0; + cp = skipcomment(cp); + if (*cp != '(') + return (cp); + do { + if (*cp == '(') + level++; + if (*cp == ')') + level--; + cp = skipcomment(cp+1); + } while (level != 0 && *cp != '\0'); + if (level == 0) + return (cp); + else + /* Rewind and re-detect the syntax error later. */ + return (ocp); +} + +/* * Skip over an identifier. */ static const char * @@ -894,7 +999,7 @@ skipsym(const char *cp) } /* - * Look for the symbol in the symbol table. If is is found, we return + * Look for the symbol in the symbol table. If it is found, we return * the symbol table index, else we return -1. */ static int Modified: stable/7/usr.bin/unifdef/unifdefall.sh ============================================================================== --- stable/7/usr.bin/unifdef/unifdefall.sh Wed Dec 2 15:30:53 2009 (r200031) +++ stable/7/usr.bin/unifdef/unifdefall.sh Wed Dec 2 15:34:13 2009 (r200032) @@ -1,29 +1,61 @@ #!/bin/sh # -# remove all the #if's from a source file +# unifdefall: remove all the #if's from a source file # -# $dotat: things/unifdefall.sh,v 1.9 2002/09/24 19:43:57 fanf2 Exp $ +# Copyright (c) 2002 - 2009 Tony Finch . All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $dotat: unifdef/unifdefall.sh,v 1.24 2009/11/26 12:54:39 fanf2 Exp $ # $FreeBSD$ set -e -basename=`basename $0` -tmp=`mktemp -d -t $basename` || exit 2 - -unifdef -s "$@" | sort | uniq > $tmp/ctrl -cpp -dM "$@" | sort | - sed -Ee 's/^#define[ ]+(.*[^ ])[ ]*$/\1/' > $tmp/hashdefs -sed -Ee 's/^([A-Za-z0-9_]+).*$/\1/' $tmp/hashdefs > $tmp/alldef -comm -23 $tmp/ctrl $tmp/alldef > $tmp/undef -comm -12 $tmp/ctrl $tmp/alldef > $tmp/def +basename=$(basename $0) +tmp=$(mktemp -d "${TMPDIR:-/tmp}/$basename.XXXXXXXXXX") || exit 2 +trap 'rm -r "$tmp" || exit 1' EXIT -echo unifdef -k \\ > $tmp/cmd -sed -Ee 's/^(.*)$/-U\1 \\/' $tmp/undef >> $tmp/cmd -while read sym -do sed -Ee '/^('"$sym"')([(][^)]*[)])?([ ]+(.*))?$/!d;s//-D\1=\4/' $tmp/hashdefs -done < $tmp/def | - sed -Ee 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$/" \\/' >> $tmp/cmd -echo '"$@"' >> $tmp/cmd -sh $tmp/cmd "$@" +export LC_ALL=C -rm -r $tmp +# list of all controlling macros +unifdef -s "$@" | sort | uniq >"$tmp/ctrl" +# list of all macro definitions +cpp -dM "$@" | sort | sed 's/^#define //' >"$tmp/hashdefs" +# list of defined macro names +sed 's/[^A-Za-z0-9_].*$//' <"$tmp/hashdefs" >"$tmp/alldef" +# list of undefined and defined controlling macros +comm -23 "$tmp/ctrl" "$tmp/alldef" >"$tmp/undef" +comm -12 "$tmp/ctrl" "$tmp/alldef" >"$tmp/def" +# create a sed script that extracts the controlling macro definitions +# and converts them to unifdef command-line arguments +sed 's|.*|s/^&\\(([^)]*)\\)\\{0,1\\} /-D&=/p|' <"$tmp/def" >"$tmp/script" +# create the final unifdef command +{ echo unifdef -k \\ + # convert the controlling undefined macros to -U arguments + sed 's/.*/-U& \\/' <"$tmp/undef" + # convert the controlling defined macros to quoted -D arguments + sed -nf "$tmp/script" <"$tmp/hashdefs" | + sed "s/'/'\\\\''/g;s/.*/'&' \\\\/" + echo '"$@"' +} >"$tmp/cmd" +# run the command we just created +sh "$tmp/cmd" "$@" From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 2 15:39:19 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2F9D106568D; Wed, 2 Dec 2009 15:39:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C44DA8FC18; Wed, 2 Dec 2009 15:39:18 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 793DB46B2A; Wed, 2 Dec 2009 10:39:18 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id AEB138A01B; Wed, 2 Dec 2009 10:39:17 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Date: Wed, 2 Dec 2009 10:37:11 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <200912021524.nB2FOvrv021715@svn.freebsd.org> In-Reply-To: <200912021524.nB2FOvrv021715@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200912021037.11828.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 02 Dec 2009 10:39:17 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r200030 - stable/7/sys/vm X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2009 15:39:19 -0000 On Wednesday 02 December 2009 10:24:57 am John Baldwin wrote: > Author: jhb > Date: Wed Dec 2 15:24:57 2009 > New Revision: 200030 > URL: http://svn.freebsd.org/changeset/base/200030 > > Log: > MFC 194429: > Add support for UMA_SLAB_KERNEL to page_free(). (While I'm here remove an > unnecessary newline character from the end of two panic messages.) This fixes "UMA free:" panics when draining zones during a memory shortage after the MFC of 194454 and 195385 in change 196838. -- John Baldwin From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 2 19:30:33 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88C79106566B; Wed, 2 Dec 2009 19:30:33 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 774118FC28; Wed, 2 Dec 2009 19:30:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB2JUXWq070987; Wed, 2 Dec 2009 19:30:33 GMT (envelope-from fanf@svn.freebsd.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB2JUXtL070985; Wed, 2 Dec 2009 19:30:33 GMT (envelope-from fanf@svn.freebsd.org) Message-Id: <200912021930.nB2JUXtL070985@svn.freebsd.org> From: Tony Finch Date: Wed, 2 Dec 2009 19:30:33 +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: r200044 - stable/7/games/factor X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2009 19:30:33 -0000 Author: fanf Date: Wed Dec 2 19:30:33 2009 New Revision: 200044 URL: http://svn.freebsd.org/changeset/base/200044 Log: MFC 199815: Fix performance bugs in factor(6). Modified: stable/7/games/factor/factor.c Directory Properties: stable/7/games/factor/ (props changed) Modified: stable/7/games/factor/factor.c ============================================================================== --- stable/7/games/factor/factor.c Wed Dec 2 19:28:55 2009 (r200043) +++ stable/7/games/factor/factor.c Wed Dec 2 19:30:33 2009 (r200044) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -35,18 +31,20 @@ */ #ifndef lint -static const char copyright[] = -"@(#) Copyright (c) 1989, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -#if 0 -static char sccsid[] = "@(#)factor.c 8.4 (Berkeley) 5/4/95"; -__RCSID("$NetBSD: factor.c,v 1.13 2002/06/18 23:07:36 simonb Exp $"); +#include +#ifdef __COPYRIGHT +__COPYRIGHT("@(#) Copyright (c) 1989, 1993\ + The Regents of the University of California. All rights reserved."); +#endif +#ifdef __SCCSID +__SCCSID("@(#)factor.c 8.4 (Berkeley) 5/4/95"); +#endif +#ifdef __RCSID +__RCSID("$NetBSD: factor.c,v 1.19 2009/08/12 05:54:31 dholland Exp $"); +#endif +#ifdef __FBSDID +__FBSDID("$FreeBSD$"); #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* @@ -63,7 +61,7 @@ static const char rcsid[] = * * number: factor1 factor1 factor2 factor3 factor3 factor3 ... * - * where factor1 < factor2 < factor3 < ... + * where factor1 <= factor2 <= factor3 <= ... * * If no args are given, the list of numbers are read from stdin. */ @@ -214,7 +212,9 @@ pr_fact(BIGNUM *val) bnfact = BN_new(); BN_set_word(bnfact, *(fact - 1)); BN_sqr(bnfact, bnfact, ctx); - if (BN_cmp(bnfact, val) > 0) + if (BN_cmp(bnfact, val) > 0 || + BN_is_prime(val, PRIME_CHECKS, + NULL, NULL, NULL) == 1) pr_print(val); else pollard_pminus1(val); @@ -257,22 +257,28 @@ usage(void) #ifdef HAVE_OPENSSL -/* pollard rho, algorithm from Jim Gillogly, May 2000 */ +/* pollard p-1, algorithm from Jim Gillogly, May 2000 */ static void pollard_pminus1(BIGNUM *val) { - BIGNUM *base, *num, *i, *x; + BIGNUM *base, *rbase, *num, *i, *x; base = BN_new(); + rbase = BN_new(); num = BN_new(); i = BN_new(); x = BN_new(); + BN_set_word(rbase, 1); +newbase: + BN_add_word(rbase, 1); BN_set_word(i, 2); - BN_set_word(base, 2); + BN_copy(base, rbase); for (;;) { BN_mod_exp(base, base, i, val, ctx); + if (BN_is_one(base)) + goto newbase; BN_copy(x, base); BN_sub_word(x, 1); From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 2 21:58:35 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C92A1065695; Wed, 2 Dec 2009 21:58:35 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3155F8FC1B; Wed, 2 Dec 2009 21:58:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB2LwZTR032015; Wed, 2 Dec 2009 21:58:35 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB2LwZJB032013; Wed, 2 Dec 2009 21:58:35 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200912022158.nB2LwZJB032013@svn.freebsd.org> From: Xin LI Date: Wed, 2 Dec 2009 21:58:35 +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: r200048 - stable/7/usr.bin/gzip X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2009 21:58:35 -0000 Author: delphij Date: Wed Dec 2 21:58:34 2009 New Revision: 200048 URL: http://svn.freebsd.org/changeset/base/200048 Log: MFC r199066 + 199339: Apply a NetBSD fix (revision 1.12) to handle multi-session bzip2 files as created by pbzip2. Modified: stable/7/usr.bin/gzip/unbzip2.c Directory Properties: stable/7/usr.bin/gzip/ (props changed) Modified: stable/7/usr.bin/gzip/unbzip2.c ============================================================================== --- stable/7/usr.bin/gzip/unbzip2.c Wed Dec 2 21:58:00 2009 (r200047) +++ stable/7/usr.bin/gzip/unbzip2.c Wed Dec 2 21:58:34 2009 (r200048) @@ -1,4 +1,4 @@ -/* $NetBSD: unbzip2.c,v 1.11 2008/04/28 20:24:13 martin Exp $ */ +/* $NetBSD: unbzip2.c,v 1.12 2009/10/11 05:17:20 mrg Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ static off_t unbzip2(int in, int out, char *pre, size_t prelen, off_t *bytes_in) { - int ret, end_of_file; + int ret, end_of_file, cold = 0; off_t bytes_out = 0; bz_stream bzs; static char *inbuf, *outbuf; @@ -64,7 +64,7 @@ unbzip2(int in, int out, char *pre, size if (bytes_in) *bytes_in = prelen; - while (ret >= BZ_OK && ret != BZ_STREAM_END) { + while (ret == BZ_OK) { if (bzs.avail_in == 0 && !end_of_file) { ssize_t n; @@ -86,9 +86,19 @@ unbzip2(int in, int out, char *pre, size switch (ret) { case BZ_STREAM_END: case BZ_OK: - if (ret == BZ_OK && end_of_file) - maybe_err("read"); - if (!tflag) { + if (ret == BZ_OK && end_of_file) { + /* + * If we hit this after a stream end, consider + * it as the end of the whole file and don't + * bail out. + */ + if (cold == 1) + ret = BZ_STREAM_END; + else + maybe_errx("truncated file"); + } + cold = 0; + if (!tflag && bzs.avail_out != BUFLEN) { ssize_t n; n = write(out, outbuf, BUFLEN - bzs.avail_out); @@ -96,7 +106,14 @@ unbzip2(int in, int out, char *pre, size maybe_err("write"); bytes_out += n; } - break; + if (ret == BZ_STREAM_END && !end_of_file) { + if (BZ2_bzDecompressEnd(&bzs) != BZ_OK || + BZ2_bzDecompressInit(&bzs, 0, 0) != BZ_OK) + maybe_errx("bzip2 re-init"); + cold = 1; + ret = BZ_OK; + } + break; case BZ_DATA_ERROR: maybe_warnx("bzip2 data integrity error"); @@ -109,7 +126,10 @@ unbzip2(int in, int out, char *pre, size case BZ_MEM_ERROR: maybe_warnx("bzip2 out of memory"); break; - + + default: + maybe_warnx("unknown bzip2 error: %d", ret); + break; } } From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 3 09:18:41 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DD2C1065696; Thu, 3 Dec 2009 09:18:41 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E73AA8FC18; Thu, 3 Dec 2009 09:18:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB39IeF1061820; Thu, 3 Dec 2009 09:18:40 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB39IejI061814; Thu, 3 Dec 2009 09:18:40 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200912030918.nB39IejI061814@svn.freebsd.org> From: Colin Percival Date: Thu, 3 Dec 2009 09:18:40 +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: r200054 - head/crypto/openssl/ssl head/etc/mtree head/usr.sbin/freebsd-update releng/6.3 releng/6.3/crypto/openssl/ssl releng/6.3/etc/mtree releng/6.3/usr.sbin/freebsd-update releng/6.4... X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2009 09:18:41 -0000 Author: cperciva Date: Thu Dec 3 09:18:40 2009 New Revision: 200054 URL: http://svn.freebsd.org/changeset/base/200054 Log: Disable SSL renegotiation in order to protect against a serious protocol flaw. [09:15] Correctly handle failures from unsetenv resulting from a corrupt environment in rtld-elf. [09:16] Fix permissions in freebsd-update in order to prevent leakage of sensitive files. [09:17] Approved by: so (cperciva) Security: FreeBSD-SA-09:15.ssl Security: FreeBSD-SA-09:16.rtld Security: FreeBSD-SA-09:17.freebsd-udpate Modified: stable/7/crypto/openssl/ssl/s3_lib.c stable/7/crypto/openssl/ssl/s3_pkt.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/etc/mtree/BSD.var.dist stable/7/usr.sbin/freebsd-update/freebsd-update.sh Changes in other areas also in this revision: Modified: head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/etc/mtree/BSD.var.dist head/usr.sbin/freebsd-update/freebsd-update.sh releng/6.3/UPDATING releng/6.3/crypto/openssl/ssl/s3_lib.c releng/6.3/crypto/openssl/ssl/s3_pkt.c releng/6.3/crypto/openssl/ssl/s3_srvr.c releng/6.3/etc/mtree/BSD.var.dist releng/6.3/usr.sbin/freebsd-update/freebsd-update.sh releng/6.4/UPDATING releng/6.4/crypto/openssl/ssl/s3_lib.c releng/6.4/crypto/openssl/ssl/s3_pkt.c releng/6.4/crypto/openssl/ssl/s3_srvr.c releng/6.4/etc/mtree/BSD.var.dist releng/6.4/usr.sbin/freebsd-update/freebsd-update.sh releng/7.1/UPDATING releng/7.1/crypto/openssl/ssl/s3_lib.c releng/7.1/crypto/openssl/ssl/s3_pkt.c releng/7.1/crypto/openssl/ssl/s3_srvr.c releng/7.1/etc/mtree/BSD.var.dist releng/7.1/libexec/rtld-elf/rtld.c releng/7.1/usr.sbin/freebsd-update/freebsd-update.sh releng/7.2/UPDATING releng/7.2/crypto/openssl/ssl/s3_lib.c releng/7.2/crypto/openssl/ssl/s3_pkt.c releng/7.2/crypto/openssl/ssl/s3_srvr.c releng/7.2/etc/mtree/BSD.var.dist releng/7.2/libexec/rtld-elf/rtld.c releng/7.2/usr.sbin/freebsd-update/freebsd-update.sh releng/8.0/UPDATING releng/8.0/crypto/openssl/ssl/s3_lib.c releng/8.0/crypto/openssl/ssl/s3_pkt.c releng/8.0/crypto/openssl/ssl/s3_srvr.c releng/8.0/etc/mtree/BSD.var.dist releng/8.0/libexec/rtld-elf/rtld.c releng/8.0/usr.sbin/freebsd-update/freebsd-update.sh stable/6/crypto/openssl/ssl/s3_lib.c stable/6/crypto/openssl/ssl/s3_pkt.c stable/6/crypto/openssl/ssl/s3_srvr.c stable/6/etc/mtree/BSD.var.dist stable/6/usr.sbin/freebsd-update/freebsd-update.sh stable/8/crypto/openssl/ssl/s3_lib.c stable/8/crypto/openssl/ssl/s3_pkt.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/etc/mtree/BSD.var.dist stable/8/usr.sbin/freebsd-update/freebsd-update.sh Modified: stable/7/crypto/openssl/ssl/s3_lib.c ============================================================================== --- stable/7/crypto/openssl/ssl/s3_lib.c Thu Dec 3 08:11:20 2009 (r200053) +++ stable/7/crypto/openssl/ssl/s3_lib.c Thu Dec 3 09:18:40 2009 (r200054) @@ -2375,6 +2375,9 @@ int ssl3_renegotiate(SSL *s) if (s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) return(0); + if (1) + return(0); + s->s3->renegotiate=1; return(1); } Modified: stable/7/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- stable/7/crypto/openssl/ssl/s3_pkt.c Thu Dec 3 08:11:20 2009 (r200053) +++ stable/7/crypto/openssl/ssl/s3_pkt.c Thu Dec 3 09:18:40 2009 (r200054) @@ -976,9 +976,7 @@ start: if (s->msg_callback) s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->s3->handshake_fragment, 4, s, s->msg_callback_arg); - if (SSL_is_init_finished(s) && - !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) && - !s->s3->renegotiate) + if (0) { ssl3_renegotiate(s); if (ssl3_renegotiate_check(s)) @@ -1109,8 +1107,7 @@ start: /* Unexpected handshake message (Client Hello, or protocol violation) */ if ((s->s3->handshake_fragment_len >= 4) && !s->in_handshake) { - if (((s->state&SSL_ST_MASK) == SSL_ST_OK) && - !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)) + if (0) { #if 0 /* worked only because C operator preferences are not as expected (and * because this is not really needed for clients except for detecting Modified: stable/7/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- stable/7/crypto/openssl/ssl/s3_srvr.c Thu Dec 3 08:11:20 2009 (r200053) +++ stable/7/crypto/openssl/ssl/s3_srvr.c Thu Dec 3 09:18:40 2009 (r200054) @@ -672,6 +672,13 @@ int ssl3_get_client_hello(SSL *s) #endif STACK_OF(SSL_CIPHER) *ciphers=NULL; + if (s->new_session) + { + al=SSL_AD_HANDSHAKE_FAILURE; + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, ERR_R_INTERNAL_ERROR); + goto f_err; + } + /* We do this so that we will respond with our native type. * If we are TLSv1 and we get SSLv3, we will respond with TLSv1, * This down switching should be handled by a different method. Modified: stable/7/etc/mtree/BSD.var.dist ============================================================================== --- stable/7/etc/mtree/BSD.var.dist Thu Dec 3 08:11:20 2009 (r200053) +++ stable/7/etc/mtree/BSD.var.dist Thu Dec 3 09:18:40 2009 (r200054) @@ -32,7 +32,7 @@ db entropy uname=operator gname=operator mode=0700 .. - freebsd-update + freebsd-update mode=0700 .. ipf mode=0700 .. Modified: stable/7/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/7/usr.sbin/freebsd-update/freebsd-update.sh Thu Dec 3 08:11:20 2009 (r200053) +++ stable/7/usr.sbin/freebsd-update/freebsd-update.sh Thu Dec 3 09:18:40 2009 (r200054) @@ -533,6 +533,7 @@ fetch_check_params () { echo ${WORKDIR} exit 1 fi + chmod 700 ${WORKDIR} cd ${WORKDIR} || exit 1 # Generate release number. The s/SECURITY/RELEASE/ bit exists From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 3 18:45:01 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B6EA106568F; Thu, 3 Dec 2009 18:45:01 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 504448FC19; Thu, 3 Dec 2009 18:45:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB3Ij1DG022576; Thu, 3 Dec 2009 18:45:01 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB3Ij1Qw022574; Thu, 3 Dec 2009 18:45:01 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200912031845.nB3Ij1Qw022574@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 3 Dec 2009 18:45:01 +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: r200073 - stable/7/sys/dev/re X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2009 18:45:01 -0000 Author: yongari Date: Thu Dec 3 18:45:01 2009 New Revision: 200073 URL: http://svn.freebsd.org/changeset/base/200073 Log: MFC r199564: Minimize interface reinitialization by checking IFF_DRV_RUNNING flag. This fixes unnecessary interface UP/DOWNs during getting an IP address via DHCP. Modified: stable/7/sys/dev/re/if_re.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Thu Dec 3 18:42:19 2009 (r200072) +++ stable/7/sys/dev/re/if_re.c Thu Dec 3 18:45:01 2009 (r200073) @@ -754,6 +754,7 @@ re_diag(struct rl_softc *sc) ifp->if_flags |= IFF_PROMISC; sc->rl_testmode = 1; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; re_init_locked(sc); sc->rl_flags |= RL_FLAG_LINK; if (sc->rl_type == RL_8169) @@ -2140,8 +2141,10 @@ re_poll_locked(struct ifnet *ifp, enum p * XXX check behaviour on receiver stalls. */ - if (status & RL_ISR_SYSTEM_ERR) + if (status & RL_ISR_SYSTEM_ERR) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; re_init_locked(sc); + } } } #endif /* DEVICE_POLLING */ @@ -2216,8 +2219,10 @@ re_int_task(void *arg, int npending) RL_ISR_TX_ERR|RL_ISR_TX_DESC_UNAVAIL)) re_txeof(sc); - if (status & RL_ISR_SYSTEM_ERR) + if (status & RL_ISR_SYSTEM_ERR) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; re_init_locked(sc); + } if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); @@ -2533,6 +2538,9 @@ re_init_locked(struct rl_softc *sc) mii = device_get_softc(sc->rl_miibus); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + /* * Cancel pending I/O and free all RX/TX buffers. */ @@ -2787,7 +2795,8 @@ re_ioctl(struct ifnet *ifp, u_long comma case SIOCADDMULTI: case SIOCDELMULTI: RL_LOCK(sc); - re_set_rxmode(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + re_set_rxmode(sc); RL_UNLOCK(sc); break; case SIOCGIFMEDIA: @@ -2856,8 +2865,10 @@ re_ioctl(struct ifnet *ifp, u_long comma if ((mask & IFCAP_WOL_MAGIC) != 0) ifp->if_capenable ^= IFCAP_WOL_MAGIC; } - if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING) + if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; re_init(sc); + } VLAN_CAPABILITIES(ifp); } break; @@ -2893,6 +2904,7 @@ re_watchdog(struct rl_softc *sc) ifp->if_oerrors++; re_rxeof(sc); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; re_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 3 18:50:05 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49E7B106568B; Thu, 3 Dec 2009 18:50:05 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38EAD8FC08; Thu, 3 Dec 2009 18:50:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB3Io5jp022773; Thu, 3 Dec 2009 18:50:05 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB3Io5JO022771; Thu, 3 Dec 2009 18:50:05 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200912031850.nB3Io5JO022771@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 3 Dec 2009 18:50:05 +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: r200075 - stable/7/sys/dev/re X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2009 18:50:05 -0000 Author: yongari Date: Thu Dec 3 18:50:04 2009 New Revision: 200075 URL: http://svn.freebsd.org/changeset/base/200075 Log: MFC r199565: Move interface reinitialization down after disabling WOL in resume path. Modified: stable/7/sys/dev/re/if_re.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Thu Dec 3 18:48:32 2009 (r200074) +++ stable/7/sys/dev/re/if_re.c Thu Dec 3 18:50:04 2009 (r200075) @@ -3017,15 +3017,16 @@ re_resume(device_t dev) CSR_READ_1(sc, RL_GPIO) | 0x01); } - /* reinitialize interface if necessary */ - if (ifp->if_flags & IFF_UP) - re_init_locked(sc); - /* * Clear WOL matching such that normal Rx filtering * wouldn't interfere with WOL patterns. */ re_clrwol(sc); + + /* reinitialize interface if necessary */ + if (ifp->if_flags & IFF_UP) + re_init_locked(sc); + sc->suspended = 0; RL_UNLOCK(sc); From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 3 19:37:53 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3644106566C; Thu, 3 Dec 2009 19:37:52 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1C648FC08; Thu, 3 Dec 2009 19:37:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB3JbqgO023833; Thu, 3 Dec 2009 19:37:52 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB3Jbq4O023831; Thu, 3 Dec 2009 19:37:52 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912031937.nB3Jbq4O023831@svn.freebsd.org> From: Fabien Thomas Date: Thu, 3 Dec 2009 19:37:52 +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: r200078 - stable/7/sys/amd64/include X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2009 19:37:53 -0000 Author: fabient Date: Thu Dec 3 19:37:52 2009 New Revision: 200078 URL: http://svn.freebsd.org/changeset/base/200078 Log: MFC 179886: Complete the merge after hwpmc backport. Make preparations for increasing the size of the kernel virtual address space on the amd64 architecture. The amd64 architecture requires kernel code and global variables to reside in the highest 2GB of the 64-bit virtual address space. Thus, KERNBASE cannot change. However, KERNBASE is sometimes used as the start of the kernel virtual address space. Henceforth, VM_MIN_KERNEL_ADDRESS should be used instead. Since KERNBASE and VM_MIN_KERNEL_ADDRESS are still the same address, there should be no visible effect from this change (yet). Modified: stable/7/sys/amd64/include/pmc_mdep.h Modified: stable/7/sys/amd64/include/pmc_mdep.h ============================================================================== --- stable/7/sys/amd64/include/pmc_mdep.h Thu Dec 3 19:27:12 2009 (r200077) +++ stable/7/sys/amd64/include/pmc_mdep.h Thu Dec 3 19:37:52 2009 (r200078) @@ -104,8 +104,8 @@ union pmc_md_pmc { #define PMC_IN_KERNEL_STACK(S,START,END) \ ((S) >= (START) && (S) < (END)) -#define PMC_IN_KERNEL(va) (((va) >= DMAP_MIN_ADDRESS && \ - (va) < DMAP_MAX_ADDRESS) || ((va) >= KERNBASE && \ +#define PMC_IN_KERNEL(va) (((va) >= DMAP_MIN_ADDRESS && \ + (va) < DMAP_MAX_ADDRESS) || ((va) >= VM_MIN_KERNEL_ADDRESS && \ (va) < VM_MAX_KERNEL_ADDRESS)) #define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 4 07:09:17 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7082C106568D; Fri, 4 Dec 2009 07:09:17 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EF178FC08; Fri, 4 Dec 2009 07:09:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB479H5q045742; Fri, 4 Dec 2009 07:09:17 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB479HRj045740; Fri, 4 Dec 2009 07:09:17 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200912040709.nB479HRj045740@svn.freebsd.org> From: Christian Brueffer Date: Fri, 4 Dec 2009 07:09:17 +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: r200093 - stable/7/lib/libc/string X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2009 07:09:17 -0000 Author: brueffer Date: Fri Dec 4 07:09:17 2009 New Revision: 200093 URL: http://svn.freebsd.org/changeset/base/200093 Log: MFC: r199988 Add an .Nm for strncat. Modified: stable/7/lib/libc/string/strcat.3 Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/string/strcat.3 ============================================================================== --- stable/7/lib/libc/string/strcat.3 Fri Dec 4 07:08:15 2009 (r200092) +++ stable/7/lib/libc/string/strcat.3 Fri Dec 4 07:09:17 2009 (r200093) @@ -32,11 +32,12 @@ .\" @(#)strcat.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd December 1, 2009 .Dt STRCAT 3 .Os .Sh NAME -.Nm strcat +.Nm strcat , +.Nm strncat .Nd concatenate strings .Sh LIBRARY .Lb libc From owner-svn-src-stable-7@FreeBSD.ORG Sat Dec 5 13:53:42 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 523DA106568B; Sat, 5 Dec 2009 13:53:42 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4073F8FC0A; Sat, 5 Dec 2009 13:53:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5DrgQD089420; Sat, 5 Dec 2009 13:53:42 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5Drg91089416; Sat, 5 Dec 2009 13:53:42 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200912051353.nB5Drg91089416@svn.freebsd.org> From: Luigi Rizzo Date: Sat, 5 Dec 2009 13:53:42 +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: r200123 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 13:53:42 -0000 Author: luigi Date: Sat Dec 5 13:53:41 2009 New Revision: 200123 URL: http://svn.freebsd.org/changeset/base/200123 Log: some MFC: r200020 change the type of the opcode from enum *:8 to u_int8_t so the size and alignment of the ipfw_insn is not compiler dependent. No changes in the code generated by gcc. r200023 Add new sockopt names for ipfw and dummynet. This commit is just grabbing entries for the new names that will be used in the future, so you don't need to rebuild anything now. r200034 Dispatch sockopt calls to ipfw and dummynet using the new option numbers, IP_FW3 and IP_DUMMYNET3. Right now the modules return an error if called with those arguments so there is no danger of unwanted behaviour. The code for r200040 was already in RELENG_7 before the 8.x freeze Modified: stable/7/sys/netinet/in.h stable/7/sys/netinet/ip_fw.h stable/7/sys/netinet/raw_ip.c Modified: stable/7/sys/netinet/in.h ============================================================================== --- stable/7/sys/netinet/in.h Sat Dec 5 13:45:21 2009 (r200122) +++ stable/7/sys/netinet/in.h Sat Dec 5 13:53:41 2009 (r200123) @@ -438,12 +438,20 @@ __END_DECLS #define IP_ONESBCAST 23 /* bool: send all-ones broadcast */ +/* + * Options for controlling the firewall and dummynet. + * Historical options (from 40 to 64) will eventually be + * replaced by only two options, IP_FW3 and IP_DUMMYNET3. + */ #define IP_FW_TABLE_ADD 40 /* add entry */ #define IP_FW_TABLE_DEL 41 /* delete entry */ #define IP_FW_TABLE_FLUSH 42 /* flush table */ #define IP_FW_TABLE_GETSIZE 43 /* get table size */ #define IP_FW_TABLE_LIST 44 /* list table contents */ +#define IP_FW3 48 /* generic ipfw v.3 sockopts */ +#define IP_DUMMYNET3 49 /* generic dummynet v.3 sockopts */ + #define IP_FW_ADD 50 /* add a firewall rule to chain */ #define IP_FW_DEL 51 /* delete a firewall rule from chain */ #define IP_FW_FLUSH 52 /* flush firewall rule chain */ Modified: stable/7/sys/netinet/ip_fw.h ============================================================================== --- stable/7/sys/netinet/ip_fw.h Sat Dec 5 13:45:21 2009 (r200122) +++ stable/7/sys/netinet/ip_fw.h Sat Dec 5 13:53:41 2009 (r200123) @@ -216,7 +216,7 @@ enum ipfw_opcodes { /* arguments (4 byt * */ typedef struct _ipfw_insn { /* template for instructions */ - enum ipfw_opcodes opcode:8; + u_int8_t opcode; u_int8_t len; /* number of 32-bit words */ #define F_NOT 0x80 #define F_OR 0x40 Modified: stable/7/sys/netinet/raw_ip.c ============================================================================== --- stable/7/sys/netinet/raw_ip.c Sat Dec 5 13:45:21 2009 (r200122) +++ stable/7/sys/netinet/raw_ip.c Sat Dec 5 13:53:41 2009 (r200123) @@ -453,6 +453,7 @@ rip_ctloutput(struct socket *so, struct error = sooptcopyout(sopt, &optval, sizeof optval); break; + case IP_FW3: /* generic ipfw v.3 functions */ case IP_FW_ADD: /* ADD actually returns the body... */ case IP_FW_GET: case IP_FW_TABLE_GETSIZE: @@ -465,6 +466,7 @@ rip_ctloutput(struct socket *so, struct error = ENOPROTOOPT; break; + case IP_DUMMYNET3: /* generic dummynet v.3 functions */ case IP_DUMMYNET_GET: if (ip_dn_ctl_ptr != NULL) error = ip_dn_ctl_ptr(sopt); @@ -510,6 +512,7 @@ rip_ctloutput(struct socket *so, struct inp->inp_flags &= ~INP_HDRINCL; break; + case IP_FW3: /* generic ipfw v.3 functions */ case IP_FW_ADD: case IP_FW_DEL: case IP_FW_FLUSH: @@ -526,6 +529,7 @@ rip_ctloutput(struct socket *so, struct error = ENOPROTOOPT; break; + case IP_DUMMYNET3: /* generic dummynet v.3 functions */ case IP_DUMMYNET_CONFIGURE: case IP_DUMMYNET_DEL: case IP_DUMMYNET_FLUSH: From owner-svn-src-stable-7@FreeBSD.ORG Sat Dec 5 17:08:45 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 854B01065672; Sat, 5 Dec 2009 17:08:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73E218FC0C; Sat, 5 Dec 2009 17:08:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5H8jku093560; Sat, 5 Dec 2009 17:08:45 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5H8jdC093558; Sat, 5 Dec 2009 17:08:45 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200912051708.nB5H8jdC093558@svn.freebsd.org> From: Ed Maste Date: Sat, 5 Dec 2009 17:08:45 +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: r200128 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 17:08:45 -0000 Author: emaste Date: Sat Dec 5 17:08:45 2009 New Revision: 200128 URL: http://svn.freebsd.org/changeset/base/200128 Log: MFC r200001: Fix parenthesis typo -- copy full frame pointer for userland callchain, not just one byte. Submitted by: Ryan Stone rysto32 at gmail dot com Modified: stable/7/sys/dev/hwpmc/hwpmc_x86.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_x86.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_x86.c Sat Dec 5 17:07:43 2009 (r200127) +++ stable/7/sys/dev/hwpmc/hwpmc_x86.c Sat Dec 5 17:08:45 2009 (r200128) @@ -101,7 +101,7 @@ pmc_save_user_callchain(uintptr_t *cc, i if (copyin((void *) sp, &pc, sizeof(pc)) != 0) return (n); } else if (copyin((void *) r, &pc, sizeof(pc)) != 0 || - copyin((void *) fp, &fp, sizeof(fp) != 0)) + copyin((void *) fp, &fp, sizeof(fp)) != 0) return (n); for (; n < nframes;) {