From owner-p4-projects@FreeBSD.ORG Sun Aug 14 16:30:21 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E8AAE106566C; Sun, 14 Aug 2011 16:30:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAD41106564A for ; Sun, 14 Aug 2011 16:30:20 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 980A58FC12 for ; Sun, 14 Aug 2011 16:30:20 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7EGUKCt036454 for ; Sun, 14 Aug 2011 16:30:20 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7EGUK7h036451 for perforce@freebsd.org; Sun, 14 Aug 2011 16:30:20 GMT (envelope-from cnicutar@freebsd.org) Date: Sun, 14 Aug 2011 16:30:20 GMT Message-Id: <201108141630.p7EGUK7h036451@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197643 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2011 16:30:21 -0000 http://p4web.freebsd.org/@@197643?ac=10 Change 197643 by cnicutar@cnicutar_cronos on 2011/08/14 16:29:39 Fix UTO inheritance bug introduced in @197422. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_syncache.c#4 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_syncache.c#4 (text+ko) ==== @@ -1052,7 +1052,7 @@ * we need to inherit the current disposition (i.e. will the resulting * socket accept suggestions?). */ - uint8_t rcv_uto_tf = 0; + uint16_t rcv_uto_tf; uint32_t rcv_uto = 0; INP_INFO_WLOCK_ASSERT(&V_tcbinfo); @@ -1087,7 +1087,7 @@ } /* Remember received UTO regardless of disposition and clear it. */ - rcv_uto_tf = tp->t_flags & TF_RCV_UTO; + rcv_uto_tf = (tp->t_flags & TF_RCV_UTO) ? SCF_RCV_UTO : 0; rcv_uto = tp->rcv_uto; tp->rcv_uto = 0; @@ -1305,8 +1305,7 @@ } /* Inherit received UTO, regardless of disposition. */ - if (rcv_uto_tf) - sc->sc_flags |= SCF_RCV_UTO; + sc->sc_flags |= rcv_uto_tf; sc->sc_rcv_uto = rcv_uto; if (V_tcp_syncookies) { From owner-p4-projects@FreeBSD.ORG Tue Aug 16 13:58:24 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 928EF106566B; Tue, 16 Aug 2011 13:58:23 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54443106567C for ; Tue, 16 Aug 2011 13:58:23 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 404E68FC08 for ; Tue, 16 Aug 2011 13:58:23 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7GDwNwP085498 for ; Tue, 16 Aug 2011 13:58:23 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7GDwMLo085495 for perforce@freebsd.org; Tue, 16 Aug 2011 13:58:22 GMT (envelope-from mjacob@freebsd.org) Date: Tue, 16 Aug 2011 13:58:22 GMT Message-Id: <201108161358.p7GDwMLo085495@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197722 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2011 13:58:24 -0000 http://p4web.freebsd.org/@@197722?ac=10 Change 197722 by mjacob@mjacob-sandbox on 2011/08/16 13:57:39 IFC Affected files ... .. //depot/projects/mjacob-dev/MAINTAINERS#5 integrate .. //depot/projects/mjacob-dev/Makefile.inc1#10 integrate .. //depot/projects/mjacob-dev/UPDATING#8 integrate .. //depot/projects/mjacob-dev/contrib/gdb/FREEBSD-diffs#2 integrate .. //depot/projects/mjacob-dev/contrib/gdb/gdb/sparc64fbsd-tdep.c#2 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/FIXES#3 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/awkgram.y#2 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/b.c#3 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/lex.c#2 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/lib.c#3 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/main.c#3 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/makefile#3 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/proto.h#2 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/run.c#3 integrate .. //depot/projects/mjacob-dev/contrib/one-true-awk/tran.c#2 integrate .. //depot/projects/mjacob-dev/etc/Makefile#3 integrate .. //depot/projects/mjacob-dev/etc/nsswitch.conf#2 integrate .. //depot/projects/mjacob-dev/gnu/usr.bin/gdb/arch/sparc64/Makefile#2 integrate .. //depot/projects/mjacob-dev/gnu/usr.bin/gdb/arch/sparc64/init.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/archive_read.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/archive_read_support_compression_uu.c#3 integrate .. //depot/projects/mjacob-dev/lib/libarchive/archive_read_support_format_iso9660.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/archive_read_support_format_mtree.c#3 integrate .. //depot/projects/mjacob-dev/lib/libarchive/archive_write_open_fd.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/archive_write_open_file.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/archive_write_open_filename.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/archive_write_set_compression_xz.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/archive_write_set_format_zip.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/test/Makefile#4 integrate .. //depot/projects/mjacob-dev/lib/libarchive/test/test_open_failure.c#1 branch .. //depot/projects/mjacob-dev/lib/libarchive/test/test_read_format_mtree.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/test/test_write_compress_lzma.c#2 integrate .. //depot/projects/mjacob-dev/lib/libarchive/test/test_write_compress_xz.c#2 integrate .. //depot/projects/mjacob-dev/lib/libc/net/ethers.3#2 integrate .. //depot/projects/mjacob-dev/lib/libc/sys/dup.2#2 integrate .. //depot/projects/mjacob-dev/lib/libkvm/kvm_ia64.c#3 integrate .. //depot/projects/mjacob-dev/lib/libprocstat/libprocstat.c#5 integrate .. //depot/projects/mjacob-dev/lib/libprocstat/libprocstat.h#2 integrate .. //depot/projects/mjacob-dev/lib/libthread_db/arch/amd64/libpthread_md.c#2 integrate .. //depot/projects/mjacob-dev/lib/libthread_db/arch/sparc64/libpthread_md.c#2 integrate .. //depot/projects/mjacob-dev/lib/libthread_db/libthr_db.c#2 integrate .. //depot/projects/mjacob-dev/release/Makefile.sysinstall#4 integrate .. //depot/projects/mjacob-dev/release/powerpc/mkisoimages.sh#6 integrate .. //depot/projects/mjacob-dev/sbin/rcorder/rcorder.8#3 integrate .. //depot/projects/mjacob-dev/share/man/man4/carp.4#2 integrate .. //depot/projects/mjacob-dev/share/man/man8/diskless.8#2 integrate .. //depot/projects/mjacob-dev/sys/amd64/amd64/pmap.c#6 integrate .. //depot/projects/mjacob-dev/sys/amd64/conf/GENERIC#6 integrate .. //depot/projects/mjacob-dev/sys/amd64/linux32/linux32_machdep.c#4 integrate .. //depot/projects/mjacob-dev/sys/arm/arm/pmap.c#5 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/AVILA#4 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/BWCT#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/CAMBRIA#5 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/CNS11XXNAS#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/CRB#3 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/DB-78XXX#3 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/DB-88F5XXX#3 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/DB-88F6XXX#3 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/DOCKSTAR#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/EP80219#3 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/GUMSTIX#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/HL200#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/HL201#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/IQ31244#3 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/KB920X#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/LN2410SBC#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/NSLU#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/QILA9G20#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/SAM9G20EK#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/SHEEVAPLUG#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/SIMICS#2 integrate .. //depot/projects/mjacob-dev/sys/arm/conf/TS7800#3 integrate .. //depot/projects/mjacob-dev/sys/boot/common/util.c#2 integrate .. //depot/projects/mjacob-dev/sys/boot/powerpc/ps3/Makefile#4 integrate .. //depot/projects/mjacob-dev/sys/boot/powerpc/ps3/conf.c#3 integrate .. //depot/projects/mjacob-dev/sys/boot/powerpc/ps3/devicename.c#3 integrate .. //depot/projects/mjacob-dev/sys/boot/powerpc/ps3/lv1call.S#3 integrate .. //depot/projects/mjacob-dev/sys/boot/powerpc/ps3/lv1call.h#3 integrate .. //depot/projects/mjacob-dev/sys/boot/powerpc/ps3/main.c#3 integrate .. //depot/projects/mjacob-dev/sys/boot/powerpc/ps3/ps3cdrom.c#1 branch .. //depot/projects/mjacob-dev/sys/boot/powerpc/ps3/ps3stor.c#2 integrate .. //depot/projects/mjacob-dev/sys/cam/cam_xpt.c#7 integrate .. //depot/projects/mjacob-dev/sys/cam/cam_xpt.h#4 integrate .. //depot/projects/mjacob-dev/sys/cddl/compat/opensolaris/sys/file.h#3 integrate .. //depot/projects/mjacob-dev/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h#4 integrate .. //depot/projects/mjacob-dev/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c#5 integrate .. //depot/projects/mjacob-dev/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#6 integrate .. //depot/projects/mjacob-dev/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c#4 integrate .. //depot/projects/mjacob-dev/sys/compat/freebsd32/freebsd32_ioctl.c#3 integrate .. //depot/projects/mjacob-dev/sys/compat/linux/linux_file.c#3 integrate .. //depot/projects/mjacob-dev/sys/compat/linux/linux_ioctl.c#4 integrate .. //depot/projects/mjacob-dev/sys/compat/linux/linux_socket.c#3 integrate .. //depot/projects/mjacob-dev/sys/compat/linux/linux_stats.c#3 integrate .. //depot/projects/mjacob-dev/sys/compat/svr4/svr4_fcntl.c#2 integrate .. //depot/projects/mjacob-dev/sys/compat/svr4/svr4_filio.c#2 integrate .. //depot/projects/mjacob-dev/sys/compat/svr4/svr4_ioctl.c#2 integrate .. //depot/projects/mjacob-dev/sys/compat/svr4/svr4_misc.c#2 integrate .. //depot/projects/mjacob-dev/sys/compat/svr4/svr4_stream.c#2 integrate .. //depot/projects/mjacob-dev/sys/conf/files.powerpc#6 integrate .. //depot/projects/mjacob-dev/sys/conf/kern.pre.mk#6 integrate .. //depot/projects/mjacob-dev/sys/dev/aac/aac_linux.c#2 integrate .. //depot/projects/mjacob-dev/sys/dev/amr/amr_linux.c#2 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_dfs/null/dfs_null.c#3 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ah.c#7 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ah.h#9 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ah_internal.h#8 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ah_regdomain.c#5 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ar5212/ar5212.h#7 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c#7 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c#6 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ar5416/ar5416.h#9 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c#9 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c#8 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/if_ath.c#12 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/if_athdfs.h#2 integrate .. //depot/projects/mjacob-dev/sys/dev/ath/if_athvar.h#8 integrate .. //depot/projects/mjacob-dev/sys/dev/hwpmc/hwpmc_logging.c#2 integrate .. //depot/projects/mjacob-dev/sys/dev/ichsmb/ichsmb_pci.c#4 integrate .. //depot/projects/mjacob-dev/sys/dev/ipmi/ipmi_linux.c#2 integrate .. //depot/projects/mjacob-dev/sys/dev/iscsi/initiator/iscsi.c#3 integrate .. //depot/projects/mjacob-dev/sys/dev/isp/isp.c#6 integrate .. //depot/projects/mjacob-dev/sys/dev/isp/isp_freebsd.c#7 integrate .. //depot/projects/mjacob-dev/sys/dev/isp/isp_freebsd.h#7 integrate .. //depot/projects/mjacob-dev/sys/dev/isp/isp_pci.c#4 integrate .. //depot/projects/mjacob-dev/sys/dev/isp/ispvar.h#6 integrate .. //depot/projects/mjacob-dev/sys/dev/mfi/mfi_linux.c#2 integrate .. //depot/projects/mjacob-dev/sys/dev/mmc/mmcsd.c#2 integrate .. //depot/projects/mjacob-dev/sys/dev/mpt/mpilib/mpi_ioc.h#2 integrate .. //depot/projects/mjacob-dev/sys/dev/mpt/mpt_cam.c#6 integrate .. //depot/projects/mjacob-dev/sys/dev/snp/snp.c#3 integrate .. //depot/projects/mjacob-dev/sys/dev/tdfx/tdfx_linux.c#2 integrate .. //depot/projects/mjacob-dev/sys/dev/usb/usb_dev.c#3 integrate .. //depot/projects/mjacob-dev/sys/dev/usb/usb_device.c#6 integrate .. //depot/projects/mjacob-dev/sys/dev/usb/usb_device.h#3 integrate .. //depot/projects/mjacob-dev/sys/dev/usb/usb_request.c#5 integrate .. //depot/projects/mjacob-dev/sys/dev/usb/usbdi.h#6 integrate .. //depot/projects/mjacob-dev/sys/fs/coda/coda_psdev.c#2 integrate .. //depot/projects/mjacob-dev/sys/fs/devfs/devfs_devs.c#3 integrate .. //depot/projects/mjacob-dev/sys/fs/fdescfs/fdesc_vnops.c#4 integrate .. //depot/projects/mjacob-dev/sys/fs/nfsclient/nfs_clport.c#6 integrate .. //depot/projects/mjacob-dev/sys/fs/nfsserver/nfs_nfsdport.c#8 integrate .. //depot/projects/mjacob-dev/sys/fs/portalfs/portal_vfsops.c#2 integrate .. //depot/projects/mjacob-dev/sys/fs/portalfs/portal_vnops.c#3 integrate .. //depot/projects/mjacob-dev/sys/gnu/fs/xfs/xfs_dfrag.c#2 integrate .. //depot/projects/mjacob-dev/sys/i386/conf/GENERIC#7 integrate .. //depot/projects/mjacob-dev/sys/i386/conf/XBOX#4 integrate .. //depot/projects/mjacob-dev/sys/i386/conf/XEN#3 integrate .. //depot/projects/mjacob-dev/sys/i386/i386/pmap.c#6 integrate .. //depot/projects/mjacob-dev/sys/i386/ibcs2/ibcs2_fcntl.c#2 integrate .. //depot/projects/mjacob-dev/sys/i386/ibcs2/ibcs2_ioctl.c#3 integrate .. //depot/projects/mjacob-dev/sys/i386/ibcs2/ibcs2_misc.c#2 integrate .. //depot/projects/mjacob-dev/sys/i386/linux/linux_machdep.c#3 integrate .. //depot/projects/mjacob-dev/sys/i386/xen/pmap.c#5 integrate .. //depot/projects/mjacob-dev/sys/ia64/ia64/dump_machdep.c#3 integrate .. //depot/projects/mjacob-dev/sys/ia64/ia64/pmap.c#7 integrate .. //depot/projects/mjacob-dev/sys/kern/capabilities.conf#2 integrate .. //depot/projects/mjacob-dev/sys/kern/init_sysent.c#5 integrate .. //depot/projects/mjacob-dev/sys/kern/kern_descrip.c#7 integrate .. //depot/projects/mjacob-dev/sys/kern/kern_event.c#3 integrate .. //depot/projects/mjacob-dev/sys/kern/kern_exec.c#5 integrate .. //depot/projects/mjacob-dev/sys/kern/sys_capability.c#6 integrate .. //depot/projects/mjacob-dev/sys/kern/sys_generic.c#2 integrate .. //depot/projects/mjacob-dev/sys/kern/syscalls.c#5 integrate .. //depot/projects/mjacob-dev/sys/kern/tty.c#5 integrate .. //depot/projects/mjacob-dev/sys/kern/uipc_mqueue.c#4 integrate .. //depot/projects/mjacob-dev/sys/kern/uipc_sem.c#4 integrate .. //depot/projects/mjacob-dev/sys/kern/uipc_syscalls.c#7 integrate .. //depot/projects/mjacob-dev/sys/kern/vfs_acl.c#2 integrate .. //depot/projects/mjacob-dev/sys/kern/vfs_aio.c#2 integrate .. //depot/projects/mjacob-dev/sys/kern/vfs_extattr.c#2 integrate .. //depot/projects/mjacob-dev/sys/kern/vfs_lookup.c#2 integrate .. //depot/projects/mjacob-dev/sys/kern/vfs_mount.c#7 integrate .. //depot/projects/mjacob-dev/sys/kern/vfs_syscalls.c#5 integrate .. //depot/projects/mjacob-dev/sys/mips/cavium/asm_octeon.S#2 integrate .. //depot/projects/mjacob-dev/sys/mips/cavium/octeon_mp.c#5 integrate .. //depot/projects/mjacob-dev/sys/mips/mips/dump_machdep.c#4 integrate .. //depot/projects/mjacob-dev/sys/mips/mips/pmap.c#7 integrate .. //depot/projects/mjacob-dev/sys/modules/portalfs/Makefile#2 integrate .. //depot/projects/mjacob-dev/sys/net/route.c#6 integrate .. //depot/projects/mjacob-dev/sys/net80211/ieee80211_scan_sta.c#3 integrate .. //depot/projects/mjacob-dev/sys/netgraph/ng_socket.c#4 integrate .. //depot/projects/mjacob-dev/sys/netinet/in.c#6 integrate .. //depot/projects/mjacob-dev/sys/netinet/sctp_output.c#10 integrate .. //depot/projects/mjacob-dev/sys/netinet/sctp_pcb.c#9 integrate .. //depot/projects/mjacob-dev/sys/netinet/sctp_structs.h#8 integrate .. //depot/projects/mjacob-dev/sys/netinet/sctp_uio.h#7 integrate .. //depot/projects/mjacob-dev/sys/netinet/sctp_usrreq.c#10 integrate .. //depot/projects/mjacob-dev/sys/netinet/sctputil.c#9 integrate .. //depot/projects/mjacob-dev/sys/nfsclient/nfs_bio.c#4 integrate .. //depot/projects/mjacob-dev/sys/nfsclient/nfs_vfsops.c#7 integrate .. //depot/projects/mjacob-dev/sys/nfsclient/nfs_vnops.c#5 integrate .. //depot/projects/mjacob-dev/sys/nfsserver/nfs_srvkrpc.c#3 integrate .. //depot/projects/mjacob-dev/sys/pc98/conf/GENERIC#5 integrate .. //depot/projects/mjacob-dev/sys/powerpc/aim/mmu_oea.c#7 integrate .. //depot/projects/mjacob-dev/sys/powerpc/aim/mmu_oea64.c#7 integrate .. //depot/projects/mjacob-dev/sys/powerpc/booke/pmap.c#7 integrate .. //depot/projects/mjacob-dev/sys/powerpc/include/pmap.h#5 integrate .. //depot/projects/mjacob-dev/sys/powerpc/ps3/ps3cdrom.c#1 branch .. //depot/projects/mjacob-dev/sys/security/audit/audit_arg.c#3 integrate .. //depot/projects/mjacob-dev/sys/security/mac/mac_syscalls.c#4 integrate .. //depot/projects/mjacob-dev/sys/sparc64/conf/GENERIC#5 integrate .. //depot/projects/mjacob-dev/sys/sparc64/sparc64/dump_machdep.c#2 integrate .. //depot/projects/mjacob-dev/sys/sparc64/sparc64/mp_machdep.c#6 integrate .. //depot/projects/mjacob-dev/sys/sparc64/sparc64/pmap.c#9 integrate .. //depot/projects/mjacob-dev/sys/sparc64/sparc64/tsb.c#3 integrate .. //depot/projects/mjacob-dev/sys/sys/capability.h#4 integrate .. //depot/projects/mjacob-dev/sys/sys/file.h#4 integrate .. //depot/projects/mjacob-dev/sys/sys/filedesc.h#4 integrate .. //depot/projects/mjacob-dev/sys/sys/namei.h#2 integrate .. //depot/projects/mjacob-dev/sys/sys/param.h#9 integrate .. //depot/projects/mjacob-dev/sys/sys/syscall.h#5 integrate .. //depot/projects/mjacob-dev/sys/sys/syscall.mk#5 integrate .. //depot/projects/mjacob-dev/sys/sys/sysproto.h#5 integrate .. //depot/projects/mjacob-dev/sys/sys/time.h#2 integrate .. //depot/projects/mjacob-dev/sys/ufs/ffs/ffs_alloc.c#10 integrate .. //depot/projects/mjacob-dev/sys/vm/vm_contig.c#3 integrate .. //depot/projects/mjacob-dev/sys/vm/vm_kern.c#4 integrate .. //depot/projects/mjacob-dev/sys/vm/vm_mmap.c#6 integrate .. //depot/projects/mjacob-dev/sys/vm/vm_object.c#7 integrate .. //depot/projects/mjacob-dev/sys/vm/vm_page.c#6 integrate .. //depot/projects/mjacob-dev/sys/vm/vm_page.h#5 integrate .. //depot/projects/mjacob-dev/tools/regression/netinet/tcpdrop/tcpdrop.c#3 integrate .. //depot/projects/mjacob-dev/tools/regression/security/cap_test/Makefile#3 integrate .. //depot/projects/mjacob-dev/tools/regression/security/cap_test/cap_test.c#3 integrate .. //depot/projects/mjacob-dev/tools/regression/security/cap_test/cap_test.h#3 integrate .. //depot/projects/mjacob-dev/tools/regression/security/cap_test/cap_test_capabilities.c#2 integrate .. //depot/projects/mjacob-dev/tools/regression/security/cap_test/cap_test_relative.c#1 branch .. //depot/projects/mjacob-dev/tools/tools/README#4 integrate .. //depot/projects/mjacob-dev/tools/tools/cxgbtool/Makefile#1 branch .. //depot/projects/mjacob-dev/tools/tools/cxgbtool/cxgbtool.c#1 branch .. //depot/projects/mjacob-dev/tools/tools/cxgbtool/reg_defs.c#1 branch .. //depot/projects/mjacob-dev/tools/tools/cxgbtool/reg_defs_t3.c#1 branch .. //depot/projects/mjacob-dev/tools/tools/cxgbtool/reg_defs_t3b.c#1 branch .. //depot/projects/mjacob-dev/tools/tools/cxgbtool/reg_defs_t3c.c#1 branch .. //depot/projects/mjacob-dev/tools/tools/cxgbtool/version.h#1 branch .. //depot/projects/mjacob-dev/usr.bin/procstat/procstat.1#2 integrate .. //depot/projects/mjacob-dev/usr.bin/procstat/procstat.c#3 integrate .. //depot/projects/mjacob-dev/usr.bin/procstat/procstat.h#3 integrate .. //depot/projects/mjacob-dev/usr.bin/procstat/procstat_cred.c#3 integrate .. //depot/projects/mjacob-dev/usr.bin/procstat/procstat_files.c#3 integrate .. //depot/projects/mjacob-dev/usr.bin/tail/forward.c#3 integrate .. //depot/projects/mjacob-dev/usr.bin/xlint/lint1/tree.c#2 integrate .. //depot/projects/mjacob-dev/usr.sbin/cxgbtool/Makefile#2 delete .. //depot/projects/mjacob-dev/usr.sbin/cxgbtool/cxgbtool.c#3 delete .. //depot/projects/mjacob-dev/usr.sbin/cxgbtool/reg_defs.c#2 delete .. //depot/projects/mjacob-dev/usr.sbin/cxgbtool/reg_defs_t3.c#2 delete .. //depot/projects/mjacob-dev/usr.sbin/cxgbtool/reg_defs_t3b.c#2 delete .. //depot/projects/mjacob-dev/usr.sbin/cxgbtool/reg_defs_t3c.c#2 delete .. //depot/projects/mjacob-dev/usr.sbin/cxgbtool/version.h#2 delete .. //depot/projects/mjacob-dev/usr.sbin/jls/jls.c#4 integrate .. //depot/projects/mjacob-dev/usr.sbin/makefs/cd9660.c#3 integrate .. //depot/projects/mjacob-dev/usr.sbin/makefs/cd9660.h#3 integrate .. //depot/projects/mjacob-dev/usr.sbin/makefs/cd9660/cd9660_conversion.c#2 integrate .. //depot/projects/mjacob-dev/usr.sbin/makefs/cd9660/cd9660_eltorito.c#4 integrate .. //depot/projects/mjacob-dev/usr.sbin/makefs/cd9660/cd9660_write.c#3 integrate .. //depot/projects/mjacob-dev/usr.sbin/makefs/cd9660/iso9660_rrip.c#2 integrate .. //depot/projects/mjacob-dev/usr.sbin/mergemaster/mergemaster.8#2 integrate .. //depot/projects/mjacob-dev/usr.sbin/mergemaster/mergemaster.sh#2 integrate .. //depot/projects/mjacob-dev/usr.sbin/pmcstat/pmcstat.c#3 integrate .. //depot/projects/mjacob-dev/usr.sbin/pmcstat/pmcstat.h#2 integrate .. //depot/projects/mjacob-dev/usr.sbin/pmcstat/pmcstat_log.c#2 integrate .. //depot/projects/mjacob-dev/usr.sbin/service/service.8#2 integrate Differences ... ==== //depot/projects/mjacob-dev/MAINTAINERS#5 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/MAINTAINERS,v 1.165 2011/05/14 17:44:12 cperciva Exp $ +$FreeBSD: src/MAINTAINERS,v 1.166 2011/08/10 15:49:24 rafan Exp $ Please note that the content of this file is strictly advisory. No locks listed here are valid. The only strict review requirements @@ -115,7 +115,6 @@ usr.bin/bluetooth emax Pre-commit review preferred. usr.sbin/bluetooth emax Pre-commit review preferred. gnu/usr.bin/send-pr bugmaster Pre-commit review requested. -ncurses rafan Heads-up appreciated, try not to break it. *env(3) secteam Due to the problematic security history of this code, please have patches reviewed by secteam. share/zoneinfo edwin Heads-up appreciated, since our data is coming ==== //depot/projects/mjacob-dev/Makefile.inc1#10 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.701 2011/06/16 12:28:37 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.702 2011/08/11 10:29:10 ru Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -1014,6 +1014,10 @@ _yacc= usr.bin/yacc .endif +.if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041 +_awk= usr.bin/awk +.endif + .if ${BOOTSTRAPPING} < 700018 _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif @@ -1052,6 +1056,7 @@ ${_groff} \ ${_ar} \ ${_dtc} \ + ${_awk} \ usr.bin/lorder \ usr.bin/makewhatis \ ${_mklocale} \ ==== //depot/projects/mjacob-dev/UPDATING#8 (text+ko) ==== @@ -22,6 +22,16 @@ machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110815: + During the merge of Capsicum features, the fget(9) KPI was modified. + This may require the rebuilding of out-of-tree device drivers -- + issues have been reported specifically with the nVidia device driver. + __FreeBSD_version is bumped to 900041. + + Also, there is a period between 20110811 and 20110814 where the + special devices /dev/{stdin,stdout,stderr} did not work correctly. + Building world from a kernel during that window may not work. + 20110628: The packet filter (pf) code has been updated to OpenBSD 4.5. You need to update userland tools to be in sync with kernel. @@ -1473,4 +1483,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.698 2011/06/29 13:12:15 bz Exp $ +$FreeBSD: src/UPDATING,v 1.699 2011/08/15 07:30:48 rwatson Exp $ ==== //depot/projects/mjacob-dev/contrib/gdb/FREEBSD-diffs#2 (text+ko) ==== @@ -927,3 +927,39 @@ +#include "ia64/tm-ia64.h" + +#endif /* TM_FBSD_H */ +Index: gdb/sparc64fbsd-tdep.c +=================================================================== +--- gdb/sparc64fbsd-tdep.c (revision 223862) ++++ gdb/sparc64fbsd-tdep.c (working copy) +@@ -64,6 +64,31 @@ sparc64fbsd_supply_fpregset (const struct regset * + { + sparc64_supply_fpregset (regcache, regnum, fpregs); + } ++ ++void ++supply_gregset (const void *gregs) ++{ ++ sparc64_supply_gregset (&sparc64fbsd_gregset, current_regcache, -1, gregs); ++} ++ ++void ++supply_fpregset (const void *fpregs) ++{ ++ sparc64_supply_fpregset (current_regcache, -1, fpregs); ++} ++ ++void ++fill_gregset (void *gregs, int regnum) ++{ ++ sparc64_collect_gregset (&sparc64fbsd_gregset, current_regcache, regnum, ++ gregs); ++} ++ ++void ++fill_fpregset (void *fpregs, int regnum) ++{ ++ sparc64_collect_fpregset (current_regcache, regnum, fpregs); ++} + + + /* Signal trampolines. */ ==== //depot/projects/mjacob-dev/contrib/gdb/gdb/sparc64fbsd-tdep.c#2 (text+ko) ==== @@ -64,6 +64,31 @@ { sparc64_supply_fpregset (regcache, regnum, fpregs); } + +void +supply_gregset (const void *gregs) +{ + sparc64_supply_gregset (&sparc64fbsd_gregset, current_regcache, -1, gregs); +} + +void +supply_fpregset (const void *fpregs) +{ + sparc64_supply_fpregset (current_regcache, -1, fpregs); +} + +void +fill_gregset (void *gregs, int regnum) +{ + sparc64_collect_gregset (&sparc64fbsd_gregset, current_regcache, regnum, + gregs); +} + +void +fill_fpregset (void *fpregs, int regnum) +{ + sparc64_collect_fpregset (current_regcache, regnum, fpregs); +} /* Signal trampolines. */ ==== //depot/projects/mjacob-dev/contrib/one-true-awk/FIXES#3 (text+ko) ==== @@ -25,6 +25,28 @@ This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +Aug 10, 2011: + another fix to avoid core dump with delete(ARGV); again, many thanks + to ruslan ermilov. + +Aug 7, 2011: + split(s, a, //) now behaves the same as split(s, a, "") + +Jun 12, 2011: + /pat/, \n /pat/ {...} is now legal, though bad style to use. + + added checks to new -v code that permits -vnospace; thanks to + ruslan ermilov for spotting this and providing the patch. + + removed fixed limit on number of open files; thanks to aleksey + cheusov and christos zoulos. + + fixed day 1 bug that resurrected deleted elements of ARGV when + used as filenames (in lib.c). + + minor type fiddles to make gcc -Wall -pedantic happier (but not + totally so); turned on -fno-strict-aliasing in makefile. + May 6, 2011: added #ifdef for isblank. now allows -ffoo as well as -f foo arguments. ==== //depot/projects/mjacob-dev/contrib/one-true-awk/awkgram.y#2 (text+ko) ==== @@ -174,8 +174,8 @@ pa_stat: pa_pat { $$ = stat2(PASTAT, $1, stat2(PRINT, rectonode(), NIL)); } | pa_pat lbrace stmtlist '}' { $$ = stat2(PASTAT, $1, $3); } - | pa_pat ',' pa_pat { $$ = pa2stat($1, $3, stat2(PRINT, rectonode(), NIL)); } - | pa_pat ',' pa_pat lbrace stmtlist '}' { $$ = pa2stat($1, $3, $5); } + | pa_pat ',' opt_nl pa_pat { $$ = pa2stat($1, $4, stat2(PRINT, rectonode(), NIL)); } + | pa_pat ',' opt_nl pa_pat lbrace stmtlist '}' { $$ = pa2stat($1, $4, $6); } | lbrace stmtlist '}' { $$ = stat2(PASTAT, NIL, $2); } | XBEGIN lbrace stmtlist '}' { beginloc = linkum(beginloc, $3); $$ = 0; } ==== //depot/projects/mjacob-dev/contrib/one-true-awk/b.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ /* lasciate ogne speranza, voi ch'intrate. */ #include -__FBSDID("$FreeBSD: src/contrib/one-true-awk/b.c,v 1.4 2011/05/03 11:47:19 ru Exp $"); +__FBSDID("$FreeBSD: src/contrib/one-true-awk/b.c,v 1.5 2011/08/09 12:54:43 ru Exp $"); #define DEBUG @@ -234,7 +234,7 @@ /* in the parsing of regular expressions, metacharacters like . have */ /* to be seen literally; \056 is not a metacharacter. */ -int hexstr(char **pp) /* find and eval hex string at pp, return new p */ +int hexstr(uschar **pp) /* find and eval hex string at pp, return new p */ { /* only pick up one 8-bit byte (2 chars) */ uschar *p; int n = 0; @@ -248,16 +248,16 @@ else if (*p >= 'A' && *p <= 'F') n = 16 * n + *p - 'A' + 10; } - *pp = (char *) p; + *pp = (uschar *) p; return n; } #define isoctdigit(c) ((c) >= '0' && (c) <= '7') /* multiple use of arg */ -int quoted(char **pp) /* pick up next thing after a \\ */ +int quoted(uschar **pp) /* pick up next thing after a \\ */ /* and increment *pp */ { - char *p = *pp; + uschar *p = *pp; int c; if ((c = *p++) == 't') @@ -314,13 +314,13 @@ bp = buf; for (i = 0; (c = *p++) != 0; ) { if (c == '\\') { - c = quoted((char **) &p); + c = quoted(&p); } else if (c == '-' && i > 0 && bp[-1] != 0) { if (*p != 0) { c = bp[-1]; c2 = *p++; if (c2 == '\\') - c2 = quoted((char **) &p); + c2 = quoted(&p); if (collate_range_cmp(c, c2) > 0) { bp--; i--; @@ -807,7 +807,7 @@ case ')': return c; case '\\': - rlxval = quoted((char **) &prestr); + rlxval = quoted(&prestr); return CHAR; default: rlxval = c; ==== //depot/projects/mjacob-dev/contrib/one-true-awk/lex.c#2 (text+ko) ==== @@ -411,7 +411,7 @@ } *px = 0; unput(c); - sscanf(xbuf, "%x", &n); + sscanf(xbuf, "%x", (unsigned int *) &n); *bp++ = n; break; } ==== //depot/projects/mjacob-dev/contrib/one-true-awk/lib.c#3 (text+ko) ==== @@ -89,8 +89,13 @@ char *p; for (i = 1; i < *ARGC; i++) { - if (!isclvar(p = getargv(i))) { /* find 1st real filename */ - setsval(lookup("FILENAME", symtab), getargv(i)); + p = getargv(i); /* find 1st real filename */ + if (p == NULL || *p == '\0') { /* deleted or zapped */ + argno++; + continue; + } + if (!isclvar(p)) { + setsval(lookup("FILENAME", symtab), p); return; } setclvar(p); /* a commandline assignment before filename */ @@ -124,7 +129,7 @@ dprintf( ("argno=%d, file=|%s|\n", argno, file) ); if (infile == NULL) { /* have to open a new file */ file = getargv(argno); - if (*file == '\0') { /* it's been zapped */ + if (file == NULL || *file == '\0') { /* deleted or zapped */ argno++; continue; } @@ -187,6 +192,7 @@ if (strlen(*FS) >= sizeof(inputFS)) FATAL("field separator %.10s... is too long", *FS); + /*fflush(stdout); avoids some buffering problem but makes it 25% slower*/ strcpy(inputFS, *FS); /* for subsequent field splitting */ if ((sep = **RS) == 0) { sep = '\n'; @@ -227,6 +233,8 @@ extern Array *ARGVtab; sprintf(temp, "%d", n); + if (lookup(temp, ARGVtab) == NULL) + return NULL; x = setsymtab(temp, "", 0.0, STR, ARGVtab); s = getsval(x); dprintf( ("getargv(%d) returns |%s|\n", n, s) ); @@ -477,14 +485,14 @@ if (!adjbuf(&record, &recsize, 2+r-record, recsize, &r, "recbld 3")) FATAL("built giant record `%.30s...'", record); *r = '\0'; - dprintf( ("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, fldtab[0]) ); + dprintf( ("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, (void*)fldtab[0]) ); if (freeable(fldtab[0])) xfree(fldtab[0]->sval); fldtab[0]->tval = REC | STR | DONTFREE; fldtab[0]->sval = record; - dprintf( ("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, fldtab[0]) ); + dprintf( ("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, (void*)fldtab[0]) ); dprintf( ("recbld = |%s|\n", record) ); donerec = 1; } ==== //depot/projects/mjacob-dev/contrib/one-true-awk/main.c#3 (text+ko) ==== @@ -23,9 +23,9 @@ ****************************************************************/ #include -__FBSDID("$FreeBSD: src/contrib/one-true-awk/main.c,v 1.5 2011/05/06 14:21:46 ru Exp $"); +__FBSDID("$FreeBSD: src/contrib/one-true-awk/main.c,v 1.7 2011/08/11 10:29:10 ru Exp $"); -const char *version = "version 20110506 (FreeBSD)"; +const char *version = "version 20110810 (FreeBSD)"; #define DEBUG #include @@ -125,10 +125,20 @@ WARNING("field separator FS is empty"); break; case 'v': /* -v a=1 to be done NOW. one -v for each */ - if (argv[1][2] == '\0' && --argc > 1 && isclvar((++argv)[1])) - setclvar(argv[1]); - else if (argv[1][2] != '\0') - setclvar(&argv[1][2]); + if (argv[1][2] != 0) { /* arg is -vsomething */ + if (isclvar(&argv[1][2])) + setclvar(&argv[1][2]); + else + FATAL("invalid -v option argument: %s", &argv[1][2]); + } else { /* arg is -v something */ + argc--; argv++; + if (argc <= 1) + FATAL("no variable name"); + if (isclvar(argv[1])) + setclvar(argv[1]); + else + FATAL("invalid -v option argument: %s", argv[1]); + } break; case 'd': dbg = atoi(&argv[1][2]); ==== //depot/projects/mjacob-dev/contrib/one-true-awk/makefile#3 (text+ko) ==== @@ -30,7 +30,7 @@ CC = cc CC = gcc -Wall -g -Wwrite-strings CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov -CC = gcc -O4 +CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing YACC = bison -y YACC = yacc ==== //depot/projects/mjacob-dev/contrib/one-true-awk/proto.h#2 (text+ko) ==== @@ -43,8 +43,8 @@ extern int makeinit(fa *, int); extern void penter(Node *); extern void freetr(Node *); -extern int hexstr(char **); -extern int quoted(char **); +extern int hexstr(uschar **); +extern int quoted(uschar **); extern char *cclenter(const char *); extern void overflo(const char *); extern void cfoll(fa *, Node *); ==== //depot/projects/mjacob-dev/contrib/one-true-awk/run.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ ****************************************************************/ #include -__FBSDID("$FreeBSD: src/contrib/one-true-awk/run.c,v 1.4 2011/05/03 11:47:19 ru Exp $"); +__FBSDID("$FreeBSD: src/contrib/one-true-awk/run.c,v 1.5 2011/08/09 12:54:43 ru Exp $"); #define DEBUG #include @@ -1239,6 +1239,12 @@ ap->sval = (char *) makesymtab(NSYMTAB); n = 0; + if (arg3type == REGEXPR && strlen((char*)((fa*)a[2])->restr) == 0) { + /* split(s, a, //); have to arrange that it looks like empty sep */ + arg3type = 0; + fs = ""; + sep = 0; + } if (*s != '\0' && (strlen(fs) > 1 || arg3type == REGEXPR)) { /* reg expr */ fa *pfa; if (arg3type == REGEXPR) { /* it's ready already */ @@ -1621,17 +1627,25 @@ FILE *fp; const char *fname; int mode; /* '|', 'a', 'w' => LE/LT, GT */ -} files[FOPEN_MAX] ={ - { NULL, "/dev/stdin", LT }, /* watch out: don't free this! */ - { NULL, "/dev/stdout", GT }, - { NULL, "/dev/stderr", GT } -}; +} *files; + +int nfiles; void stdinit(void) /* in case stdin, etc., are not constants */ { - files[0].fp = stdin; - files[1].fp = stdout; - files[2].fp = stderr; + nfiles = FOPEN_MAX; + files = calloc(nfiles, sizeof(*files)); + if (files == NULL) + FATAL("can't allocate file memory for %u files", nfiles); + files[0].fp = stdin; + files[0].fname = "/dev/stdin"; + files[0].mode = LT; + files[1].fp = stdout; + files[1].fname = "/dev/stdout"; + files[1].mode = GT; + files[2].fp = stderr; + files[2].fname = "/dev/stderr"; + files[2].mode = GT; } FILE *openfile(int a, const char *us) @@ -1642,7 +1656,7 @@ if (*s == '\0') FATAL("null file name in print or getline"); - for (i=0; i < FOPEN_MAX; i++) + for (i=0; i < nfiles; i++) if (files[i].fname && strcmp(s, files[i].fname) == 0) { if (a == files[i].mode || (a==APPEND && files[i].mode==GT)) return files[i].fp; @@ -1652,11 +1666,19 @@ if (a == FFLUSH) /* didn't find it, so don't create it! */ return NULL; - for (i=0; i < FOPEN_MAX; i++) + for (i=0; i < nfiles; i++) if (files[i].fp == 0) break; - if (i >= FOPEN_MAX) - FATAL("%s makes too many open files", s); + if (i >= nfiles) { + struct files *nf; + int nnf = nfiles + FOPEN_MAX; + nf = realloc(files, nnf * sizeof(*nf)); + if (nf == NULL) + FATAL("cannot grow files for %s and %d files", s, nnf); + memset(&nf[nfiles], 0, FOPEN_MAX * sizeof(*nf)); + nfiles = nnf; + files = nf; + } fflush(stdout); /* force a semblance of order */ m = a; if (a == GT) { @@ -1684,7 +1706,7 @@ { int i; - for (i = 0; i < FOPEN_MAX; i++) + for (i = 0; i < nfiles; i++) if (fp == files[i].fp) return files[i].fname; return "???"; @@ -1699,7 +1721,7 @@ x = execute(a[0]); getsval(x); stat = -1; - for (i = 0; i < FOPEN_MAX; i++) { + for (i = 0; i < nfiles; i++) { if (files[i].fname && strcmp(x->sval, files[i].fname) == 0) { if (ferror(files[i].fp)) WARNING( "i/o error occurred on %s", files[i].fname ); @@ -1743,7 +1765,7 @@ { int i; - for (i = 0; i < FOPEN_MAX; i++) + for (i = 0; i < nfiles; i++) if (files[i].fp) fflush(files[i].fp); } ==== //depot/projects/mjacob-dev/contrib/one-true-awk/tran.c#2 (text+ko) ==== @@ -212,7 +212,7 @@ if (n != NULL && (p = lookup(n, tp)) != NULL) { dprintf( ("setsymtab found %p: n=%s s=\"%s\" f=%g t=%o\n", - p, NN(p->nval), NN(p->sval), p->fval, p->tval) ); + (void*)p, NN(p->nval), NN(p->sval), p->fval, p->tval) ); return(p); } p = (Cell *) malloc(sizeof(Cell)); @@ -231,7 +231,7 @@ p->cnext = tp->tab[h]; tp->tab[h] = p; dprintf( ("setsymtab set %p: n=%s s=\"%s\" f=%g t=%o\n", - p, p->nval, p->sval, p->fval, p->tval) ); + (void*)p, p->nval, p->sval, p->fval, p->tval) ); return(p); } @@ -298,7 +298,7 @@ xfree(vp->sval); /* free any previous string */ vp->tval &= ~STR; /* mark string invalid */ vp->tval |= NUM; /* mark number ok */ - dprintf( ("setfval %p: %s = %g, t=%o\n", vp, NN(vp->nval), f, vp->tval) ); + dprintf( ("setfval %p: %s = %g, t=%o\n", (void*)vp, NN(vp->nval), f, vp->tval) ); return vp->fval = f; } @@ -318,7 +318,7 @@ int fldno; dprintf( ("starting setsval %p: %s = \"%s\", t=%o, r,f=%d,%d\n", - vp, NN(vp->nval), s, vp->tval, donerec, donefld) ); + (void*)vp, NN(vp->nval), s, vp->tval, donerec, donefld) ); if ((vp->tval & (NUM | STR)) == 0) funnyvar(vp, "assign to"); if (isfld(vp)) { @@ -338,7 +338,7 @@ vp->tval |= STR; vp->tval &= ~DONTFREE; dprintf( ("setsval %p: %s = \"%s (%p) \", t=%o r,f=%d,%d\n", - vp, NN(vp->nval), t,t, vp->tval, donerec, donefld) ); + (void*)vp, NN(vp->nval), t,t, vp->tval, donerec, donefld) ); return(vp->sval = t); } @@ -355,7 +355,8 @@ if (is_number(vp->sval) && !(vp->tval&CON)) vp->tval |= NUM; /* make NUM only sparingly */ } - dprintf( ("getfval %p: %s = %g, t=%o\n", vp, NN(vp->nval), vp->fval, vp->tval) ); + dprintf( ("getfval %p: %s = %g, t=%o\n", + (void*)vp, NN(vp->nval), vp->fval, vp->tval) ); return(vp->fval); } @@ -381,7 +382,8 @@ vp->tval &= ~DONTFREE; vp->tval |= STR; } - dprintf( ("getsval %p: %s = \"%s (%p)\", t=%o\n", vp, NN(vp->nval), vp->sval, vp->sval, vp->tval) ); + dprintf( ("getsval %p: %s = \"%s (%p)\", t=%o\n", + (void*)vp, NN(vp->nval), vp->sval, vp->sval, vp->tval) ); return(vp->sval); } ==== //depot/projects/mjacob-dev/etc/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 -# $FreeBSD: src/etc/Makefile,v 1.387 2011/02/22 08:13:49 uqs Exp $ +# $FreeBSD: src/etc/Makefile,v 1.390 2011/08/10 20:52:02 dougb Exp $ .include @@ -256,6 +256,10 @@ ${DESTDIR}/boot/device.hints .endif .endif +.if ${MK_NIS} == "no" + sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ + ${DESTDIR}/etc/nsswitch.conf +.endif distrib-dirs: mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ ==== //depot/projects/mjacob-dev/etc/nsswitch.conf#2 (text) ==== @@ -1,6 +1,6 @@ # # nsswitch.conf(5) - name service switch configuration file -# $FreeBSD: src/etc/nsswitch.conf,v 1.1 2006/05/03 15:14:47 ume Exp $ +# $FreeBSD: src/etc/nsswitch.conf,v 1.3 2011/08/10 20:52:02 dougb Exp $ # group: compat group_compat: nis ==== //depot/projects/mjacob-dev/gnu/usr.bin/gdb/arch/sparc64/Makefile#2 (text+ko) ==== @@ -1,6 +1,7 @@ -# $FreeBSD: src/gnu/usr.bin/gdb/arch/sparc64/Makefile,v 1.3 2004/12/05 06:59:01 marcel Exp $ +# $FreeBSD: src/gnu/usr.bin/gdb/arch/sparc64/Makefile,v 1.4 2011/08/06 17:53:45 marius Exp $ .if !defined(GDB_CROSS_DEBUGGER) +LIBSRCS+= fbsd-threads.c LIBSRCS+= solib.c solib-legacy.c solib-svr4.c LIBSRCS+= sparc-nat.c sparc64-nat.c sparc64fbsd-nat.c .endif ==== //depot/projects/mjacob-dev/gnu/usr.bin/gdb/arch/sparc64/init.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/gnu/usr.bin/gdb/arch/sparc64/init.c,v 1.2 2004/12/05 06:59:01 marcel Exp $ */ +/* $FreeBSD: src/gnu/usr.bin/gdb/arch/sparc64/init.c,v 1.3 2011/08/06 17:53:45 marius Exp $ */ /* Do not modify this file. */ /* It is created automatically by the Makefile. */ @@ -11,6 +11,7 @@ extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; +extern initialize_file_ftype _initialize_thread_db; extern initialize_file_ftype _initialize_sparc64fbsd_nat; extern initialize_file_ftype _initialize_sparc64_nat; extern initialize_file_ftype _initialize_sparc_nat; @@ -124,6 +125,7 @@ _initialize_ser_pipe (); _initialize_ser_tcp (); #ifndef CROSS_DEBUGGER + _initialize_thread_db (); _initialize_sparc64fbsd_nat (); _initialize_sparc64_nat (); _initialize_sparc_nat (); ==== //depot/projects/mjacob-dev/lib/libarchive/archive_read.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.56 2010/11/05 05:11:54 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.57 2011/08/07 08:42:36 mm Exp $"); #ifdef HAVE_ERRNO_H #include @@ -377,6 +377,12 @@ /* If no bidder, we're done. */ if (best_bidder == NULL) { + /* Verify the final pipelin by asking it for some data. */ + __archive_read_filter_ahead(a->filter, 1, &avail); + if (avail < 0) { + cleanup_filters(a); + return (ARCHIVE_FATAL); + } a->archive.compression_name = a->filter->name; a->archive.compression_code = a->filter->code; return (ARCHIVE_OK); @@ -389,18 +395,12 @@ filter->bidder = best_bidder; filter->archive = a; filter->upstream = a->filter; - r = (best_bidder->init)(filter); + a->filter = filter; + r = (best_bidder->init)(a->filter); if (r != ARCHIVE_OK) { - free(filter); + cleanup_filters(a); return (r); } - a->filter = filter; - /* Verify the filter by asking it for some data. */ - __archive_read_filter_ahead(filter, 1, &avail); - if (avail < 0) { - cleanup_filters(a); - return (ARCHIVE_FATAL); - } } } ==== //depot/projects/mjacob-dev/lib/libarchive/archive_read_support_compression_uu.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_uu.c,v 1.2 2011/07/17 21:27:38 mm Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_uu.c,v 1.3 2011/08/07 08:42:36 mm Exp $"); #ifdef HAVE_ERRNO_H #include @@ -381,7 +381,17 @@ unsigned char *ptr; size_t newsize; - newsize = uudecode->in_allocated << 1; + /* + * Calculate a new buffer size for in_buff. + * Increase its value until it has enough size we need. + */ + newsize = uudecode->in_allocated; + do { + if (newsize < IN_BUFF_SIZE*32) + newsize <<= 1; + else >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Aug 16 14:52:08 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E53631065673; Tue, 16 Aug 2011 14:52:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7F8E106566C for ; Tue, 16 Aug 2011 14:52:07 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 7C3088FC08 for ; Tue, 16 Aug 2011 14:52:07 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7GEq7Pr097783 for ; Tue, 16 Aug 2011 14:52:07 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7GEq74h097780 for perforce@freebsd.org; Tue, 16 Aug 2011 14:52:07 GMT (envelope-from cnicutar@freebsd.org) Date: Tue, 16 Aug 2011 14:52:07 GMT Message-Id: <201108161452.p7GEq74h097780@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197726 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2011 14:52:08 -0000 http://p4web.freebsd.org/@@197726?ac=10 Change 197726 by cnicutar@cnicutar_cronos on 2011/08/16 14:51:25 Add function that drops tcp connections using UTO. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_subr.c#3 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_var.h#4 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_subr.c#3 (text+ko) ==== @@ -1034,6 +1034,48 @@ } /* + * This function walks the list of TCP connections and attempts to free + * up space by dropping connections. + * + * XXX-CN This should be considered a work in progress. In particular + * it's not yet clear wether this should be merged with tcp_drain (which + * also iterates over TCP connections but uses a read lock for tcbinfo). + * + * In the future this function could be modified to drop more types of + * TCP connections. + */ +void +tcp_drop_uto(void) +{ + VNET_ITERATOR_DECL(vnet_iter); + VNET_LIST_RLOCK_NOSLEEP(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + struct inpcb *inp; + struct tcpcb *tp; + + /* + * Drop connections that wouldn't have survived without + * UTO. + * XXX-CN This negates the advantages of UTO for everyone + * instead of just dropping misbehaving connections. + */ + INP_INFO_WLOCK(&V_tcbinfo); + LIST_FOREACH(inp, V_tcbinfo.ipi_listhead, inp_list) { + INP_WLOCK(inp); + if ((tp = intotcpcb(inp)) != NULL) { + if (tp->t_rxtshift > TCP_MAXRXTSHIFT) + tcp_drop(tp, ETIMEDOUT); + } + INP_WUNLOCK(inp); + } + INP_INFO_WUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK_NOSLEEP(); +} + +/* * Notify a tcp user of an asynchronous error; * store error as soft error, but wake up user * (for now, won't do anything until can select for soft error). ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_var.h#4 (text+ko) ==== @@ -678,6 +678,7 @@ struct tcpcb * tcp_drop(struct tcpcb *, int); void tcp_drain(void); +void tcp_drop_uto(void); void tcp_init(void); #ifdef VIMAGE void tcp_destroy(void); From owner-p4-projects@FreeBSD.ORG Wed Aug 17 08:18:47 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F2C871065673; Wed, 17 Aug 2011 08:18:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9747B1065670 for ; Wed, 17 Aug 2011 08:18:46 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 8565B8FC0C for ; Wed, 17 Aug 2011 08:18:46 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7H8Ikjk003925 for ; Wed, 17 Aug 2011 08:18:46 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7H8Ik5f003921 for perforce@freebsd.org; Wed, 17 Aug 2011 08:18:46 GMT (envelope-from cnicutar@freebsd.org) Date: Wed, 17 Aug 2011 08:18:46 GMT Message-Id: <201108170818.p7H8Ik5f003921@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197759 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2011 08:18:47 -0000 http://p4web.freebsd.org/@@197759?ac=10 Change 197759 by cnicutar@cnicutar_cronos on 2011/08/17 08:18:09 Change the behavior of TCP_RCVUTO_TIMEOUT to allow the application to impose a per-connection maximum timeout. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_syncache.c#5 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_syncache.h#4 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_timer.c#4 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_usrreq.c#3 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_var.h#5 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_syncache.c#5 (text+ko) ==== @@ -835,6 +835,7 @@ tp->t_flags |= TF_RCV_UTO; /* Regardless of SCF_RCV_UTO. */ tp->rcv_uto = sc->sc_rcv_uto; + tp->max_uto = sc->sc_max_uto; } if (sc->sc_flags & SCF_ECN) @@ -1053,7 +1054,7 @@ * socket accept suggestions?). */ uint16_t rcv_uto_tf; - uint32_t rcv_uto = 0; + uint32_t rcv_uto = 0, max_uto = 0; INP_INFO_WLOCK_ASSERT(&V_tcbinfo); INP_WLOCK_ASSERT(inp); /* listen socket */ @@ -1089,6 +1090,7 @@ /* Remember received UTO regardless of disposition and clear it. */ rcv_uto_tf = (tp->t_flags & TF_RCV_UTO) ? SCF_RCV_UTO : 0; rcv_uto = tp->rcv_uto; + max_uto = tp->max_uto; tp->rcv_uto = 0; /* By the time we drop the lock these should no longer be used. */ @@ -1307,6 +1309,7 @@ /* Inherit received UTO, regardless of disposition. */ sc->sc_flags |= rcv_uto_tf; sc->sc_rcv_uto = rcv_uto; + sc->sc_max_uto = max_uto; if (V_tcp_syncookies) { syncookie_generate(sch, sc, &flowtmp); ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_syncache.h#4 (text+ko) ==== @@ -84,6 +84,7 @@ u_int32_t sc_snd_uto; /* Sent UTO (seconds) */ u_int32_t sc_rcv_uto; /* Received UTO (seconds) */ + u_int32_t sc_max_uto; /* Maximum UTO (seconds) */ }; /* ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_timer.c#4 (text+ko) ==== @@ -504,9 +504,9 @@ * compute how much time we've got left. */ uto_left = 0; - if (tp->t_flags & TF_RCV_UTO) + if (tp->t_flags & TF_RCV_UTO && tp->rcv_uto) /* Clamping the received value. */ - uto_left = min(V_uto_max_timeout, + uto_left = min(tp->max_uto, max(V_uto_min_timeout, tp->rcv_uto)); /* Taking the longer timeout. */ ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_usrreq.c#3 (text+ko) ==== @@ -1356,8 +1356,15 @@ if (optval <= 0) /* This connection will ignore suggestions. */ tp->t_flags &= ~TF_RCV_UTO; - else + else { tp->t_flags |= TF_RCV_UTO; + /* + * If optval > 1, we'll use it as the max + * acceptable suggestion. + */ + tp->max_uto = (optval > 1) ? + optval : V_uto_max_timeout; + } INP_WUNLOCK(inp); break; case TCP_NODELAY: ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_var.h#5 (text+ko) ==== @@ -203,12 +203,13 @@ struct cc_var *ccv; /* congestion control specific vars */ struct osd *osd; /* storage for Khelp module data */ - uint32_t t_ispare[9]; /* 4 keep timers, 2 UTO, 3 TBD */ + uint32_t t_ispare[8]; /* 4 keep timers, 1 UTO, 3 TBD */ void *t_pspare2[4]; /* 4 TBD */ uint64_t _pad[6]; /* 6 TBD (1-2 CC/RTT?) */ uint32_t snd_uto; /* sent timeout (seconds) */ uint32_t rcv_uto; /* received suggestion (seconds) */ + uint32_t max_uto; /* max received uto (seconds) */ int t_suto; /* uto starting time (ticks) */ }; From owner-p4-projects@FreeBSD.ORG Wed Aug 17 10:25:42 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6809F1065672; Wed, 17 Aug 2011 10:25:42 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A83B106564A for ; Wed, 17 Aug 2011 10:25:42 +0000 (UTC) (envelope-from ilya@FreeBSD.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 178668FC16 for ; Wed, 17 Aug 2011 10:25:42 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7HAPfpj029737 for ; Wed, 17 Aug 2011 10:25:41 GMT (envelope-from ilya@FreeBSD.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7HAPfro029734 for perforce@freebsd.org; Wed, 17 Aug 2011 10:25:41 GMT (envelope-from ilya@FreeBSD.org) Date: Wed, 17 Aug 2011 10:25:41 GMT Message-Id: <201108171025.p7HAPfro029734@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to ilya@FreeBSD.org using -f From: Ilya Putsikau To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197765 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2011 10:25:42 -0000 http://p4web.freebsd.org/@@197765?ac=10 Change 197765 by ilya@ilya_triton2011 on 2011/08/17 10:25:06 Add Google copyright to files Affected files ... .. //depot/projects/soc2011/ilya_fuse/COPYRIGHT#2 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse.h#3 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_debug.h#1 add .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_device.c#2 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_file.c#4 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_file.h#3 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_internal.c#3 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_internal.h#2 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_io.c#4 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_io.h#2 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_ipc.c#3 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_ipc.h#4 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_main.c#2 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_node.c#4 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_node.h#4 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_param.h#2 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_vfsops.c#3 edit .. //depot/projects/soc2011/ilya_fuse/fuse/fuse_vnops.c#5 edit Differences ... ==== //depot/projects/soc2011/ilya_fuse/COPYRIGHT#2 (text+ko) ==== @@ -1,4 +1,5 @@ -Copyright (C) 2005 Csaba Henk. All rights reserved. +Copyright (C) 2005 Csaba Henk. +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -20,3 +21,42 @@ 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. + + +Copyright (c) 2007-2009 Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* 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. +* Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 THE COPYRIGHT +OWNER 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. + + +Portions of this package were derived from code developed by other authors. +Please read further for specific details. + +* fusefs/fuse_kernel.h is an unmodified copy of the interface header from + the Linux FUSE distribution (http://fuse.sourceforge.net). fuse_kernel.h + can be redistributed either under the GPL or under the BSD license. It + is being redistributed here under the BSD license. ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse.h#3 (text+ko) ==== @@ -1,6 +1,7 @@ /* - * Just macros for switching some features on and off, some allover used macros - * and debugging. + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. */ #include "fuse_version.h" ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_device.c#2 (text+ko) ==== @@ -1,5 +1,7 @@ /* - * I/O methods for fuse devices. + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. */ #include ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_file.c#4 (text+ko) ==== @@ -1,6 +1,8 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. */ #include ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_file.h#3 (text+ko) ==== @@ -1,6 +1,8 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. */ #ifndef _FUSE_FILE_H_ ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_internal.c#3 (text+ko) ==== @@ -1,6 +1,8 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. */ #include ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_internal.h#2 (text+ko) ==== @@ -1,6 +1,8 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. */ #ifndef _FUSE_INTERNAL_H_ ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_io.c#4 (text+ko) ==== @@ -1,3 +1,9 @@ +/* + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. + */ + #include #include #include ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_io.h#2 (text+ko) ==== @@ -1,3 +1,9 @@ +/* + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. + */ + #ifndef _FUSE_IO_H_ #define _FUSE_IO_H_ ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_ipc.c#3 (text+ko) ==== @@ -1,6 +1,8 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. */ #include ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_ipc.h#4 (text+ko) ==== @@ -1,6 +1,8 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. + * See COPYRIGHT file for additional information. */ #ifndef _FUSE_IPC_H_ ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_main.c#2 (text+ko) ==== @@ -1,5 +1,6 @@ /* - * Module load/unload stuff. + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. */ #include ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_node.c#4 (text+ko) ==== @@ -1,6 +1,7 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. */ #include ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_node.h#4 (text+ko) ==== @@ -1,6 +1,7 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. */ #ifndef _FUSE_NODE_H_ ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_param.h#2 (text+ko) ==== @@ -1,6 +1,6 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * All Rights Reserved. */ #ifndef _FUSE_PARAM_H_ ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_vfsops.c#3 (text+ko) ==== @@ -1,6 +1,7 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. */ #include ==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_vnops.c#5 (text+ko) ==== @@ -1,6 +1,7 @@ /* - * Copyright (C) 2006-2008 Google. All Rights Reserved. - * Amit Singh + * Copyright (C) 2006-2008 Google. Amit Singh + * Copyright (C) 2005 Csaba Henk. + * All Rights Reserved. */ #include From owner-p4-projects@FreeBSD.ORG Wed Aug 17 12:01:07 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0D2E61065672; Wed, 17 Aug 2011 12:01:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C568F106566C for ; Wed, 17 Aug 2011 12:01:06 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id AB45D8FC0A for ; Wed, 17 Aug 2011 12:01:06 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7HC16XS050276 for ; Wed, 17 Aug 2011 12:01:06 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7HC160f050273 for perforce@freebsd.org; Wed, 17 Aug 2011 12:01:06 GMT (envelope-from cnicutar@freebsd.org) Date: Wed, 17 Aug 2011 12:01:06 GMT Message-Id: <201108171201.p7HC160f050273@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197768 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2011 12:01:07 -0000 http://p4web.freebsd.org/@@197768?ac=10 Change 197768 by cnicutar@cnicutar_cronos on 2011/08/17 12:00:14 Drop UTO connections from tcp_drain. Turn tcp_drain into a wrapper for tcp_drain_internal. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_subr.c#4 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_var.h#6 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_subr.c#4 (text+ko) ==== @@ -994,78 +994,62 @@ return (tp); } +/* + * Wrapper function for tcp_drain_internal. + */ void tcp_drain(void) { - VNET_ITERATOR_DECL(vnet_iter); - - if (!do_tcpdrain) - return; - - VNET_LIST_RLOCK_NOSLEEP(); - VNET_FOREACH(vnet_iter) { - CURVNET_SET(vnet_iter); - struct inpcb *inpb; - struct tcpcb *tcpb; - - /* - * Walk the tcpbs, if existing, and flush the reassembly queue, - * if there is one... - * XXX: The "Net/3" implementation doesn't imply that the TCP - * reassembly queue should be flushed, but in a situation - * where we're really low on mbufs, this is potentially - * usefull. - */ - INP_INFO_RLOCK(&V_tcbinfo); - LIST_FOREACH(inpb, V_tcbinfo.ipi_listhead, inp_list) { - if (inpb->inp_flags & INP_TIMEWAIT) - continue; - INP_WLOCK(inpb); - if ((tcpb = intotcpcb(inpb)) != NULL) { - tcp_reass_flush(tcpb); - tcp_clean_sackreport(tcpb); - } - INP_WUNLOCK(inpb); - } - INP_INFO_RUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - } - VNET_LIST_RUNLOCK_NOSLEEP(); + if (do_tcpdrain) + return tcp_drain_internal(TCP_DRAIN_CLASSIC); } -/* - * This function walks the list of TCP connections and attempts to free - * up space by dropping connections. - * - * XXX-CN This should be considered a work in progress. In particular - * it's not yet clear wether this should be merged with tcp_drain (which - * also iterates over TCP connections but uses a read lock for tcbinfo). - * - * In the future this function could be modified to drop more types of - * TCP connections. - */ void -tcp_drop_uto(void) +tcp_drain_internal(u_int flags) { VNET_ITERATOR_DECL(vnet_iter); + + if (!flags) + return; + VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); struct inpcb *inp; struct tcpcb *tp; - - /* - * Drop connections that wouldn't have survived without - * UTO. - * XXX-CN This negates the advantages of UTO for everyone - * instead of just dropping misbehaving connections. - */ + + /* Walk the connections and try to free up space. */ INP_INFO_WLOCK(&V_tcbinfo); LIST_FOREACH(inp, V_tcbinfo.ipi_listhead, inp_list) { + if (inp->inp_flags & INP_TIMEWAIT) + continue; INP_WLOCK(inp); - if ((tp = intotcpcb(inp)) != NULL) { - if (tp->t_rxtshift > TCP_MAXRXTSHIFT) - tcp_drop(tp, ETIMEDOUT); + if ((tp = intotcpcb(inp)) == NULL) { + INP_WUNLOCK(inp); + continue; + } + + /* + * Drop connections that wouldn't have survived without + * UTO. + * XXX-CN This negates the advantages of UTO for + * everyone instead of just dropping misbehaving + * connections. + */ + if (flags & TCP_DRAIN_UTO && + tp->t_rxtshift > TCP_MAXRXTSHIFT) + tcp_drop(tp, ETIMEDOUT); + + /* + * Flush the reassembly queue, if there is one. + * XXX: The "Net/3" implementation doesn't imply that + * the TCP reassembly queue should be flushed, but in a + * situation where we're really low on mbufs, this is + * potentially usefull. + */ + if (flags & TCP_DRAIN_CLASSIC) { + tcp_reass_flush(tp); + tcp_clean_sackreport(tp); } INP_WUNLOCK(inp); } ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_var.h#6 (text+ko) ==== @@ -328,6 +328,13 @@ #define UTO_MINS 0x8000 /* Highest bit set means "minutes". */ #define UTO_MINS_TH 3600 /* Send minutes if >= one hour. */ +/* + * Flags for tcp_drain_internal. + */ +#define TCP_DRAIN_CLASSIC 0x1 /* Flushes the reassembly queue. */ +#define TCP_DRAIN_UTO 0x2 /* Drops connections outside the + normal resend window. */ + struct hc_metrics_lite { /* must stay in sync with hc_metrics */ u_long rmx_mtu; /* MTU for this path */ u_long rmx_ssthresh; /* outbound gateway buffer limit */ @@ -679,7 +686,7 @@ struct tcpcb * tcp_drop(struct tcpcb *, int); void tcp_drain(void); -void tcp_drop_uto(void); +void tcp_drain_internal(u_int flags); void tcp_init(void); #ifdef VIMAGE void tcp_destroy(void); From owner-p4-projects@FreeBSD.ORG Thu Aug 18 13:40:15 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 84F58106566C; Thu, 18 Aug 2011 13:40:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 491CF106564A for ; Thu, 18 Aug 2011 13:40:15 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 3769A8FC14 for ; Thu, 18 Aug 2011 13:40:15 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7IDeFXk065624 for ; Thu, 18 Aug 2011 13:40:15 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7IDeFMJ065620 for perforce@freebsd.org; Thu, 18 Aug 2011 13:40:15 GMT (envelope-from cnicutar@freebsd.org) Date: Thu, 18 Aug 2011 13:40:15 GMT Message-Id: <201108181340.p7IDeFMJ065620@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197818 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2011 13:40:15 -0000 http://p4web.freebsd.org/@@197818?ac=10 Change 197818 by cnicutar@cnicutar_cronos on 2011/08/18 13:39:38 Fixed a test case. The comment said "the client requests a large UTO" but in the test it was the other way around. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/long_uto.c#2 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/long_uto.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ err(EX_OSERR, "fork"); break; case 0: - server_disconnect(saddr, port, DOWNTIME, UTO, 1); + server_disconnect(saddr, port, DOWNTIME, 0, 1); exit(EX_OK); break; } @@ -59,7 +59,7 @@ err(EX_OSERR, "fork"); break; case 0: - client_generic(caddr, saddr, port, 0, 1); + client_generic(caddr, saddr, port, UTO, 1); exit(EX_OK); break; } From owner-p4-projects@FreeBSD.ORG Thu Aug 18 17:11:15 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 409CC10656A9; Thu, 18 Aug 2011 17:11:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 013E910656B5 for ; Thu, 18 Aug 2011 17:11:15 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id E2EF18FC19 for ; Thu, 18 Aug 2011 17:11:14 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7IHBEaH008560 for ; Thu, 18 Aug 2011 17:11:14 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7IHBE9f008557 for perforce@freebsd.org; Thu, 18 Aug 2011 17:11:14 GMT (envelope-from cnicutar@freebsd.org) Date: Thu, 18 Aug 2011 17:11:14 GMT Message-Id: <201108181711.p7IHBE9f008557@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197825 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2011 17:11:15 -0000 http://p4web.freebsd.org/@@197825?ac=10 Change 197825 by cnicutar@cnicutar_cronos on 2011/08/18 17:10:17 Clean up tests and remove duplicate code. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/Makefile.generic_uto#1 add .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/Makefile.long_uto#2 delete .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/Makefile.short_uto#2 delete .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/generic_uto.c#1 add .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/long_uto.c#3 delete .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/runtest.sh#2 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/short_uto.c#2 delete Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/runtest.sh#2 (text+ko) ==== @@ -1,5 +1,6 @@ #!/bin/sh + # Bring down two loopback interfaces lo_down() { @@ -7,7 +8,7 @@ ifconfig lo3 destroy } -# Create two loopback interfaces and assign example addresses +# Create two loopback interfaces and assign addresses lo_up() { # Just in case they are still around @@ -38,8 +39,6 @@ # Run a test and display results runtest() { - args=$1 # Test arguments - killall "$bin" > /dev/null 2>&1 if ! make -f "Makefile.${bin}" > /dev/null 2>&1 @@ -47,9 +46,11 @@ echo "not ok $no - $name # make failed" exit 1 fi - + # Finally run the test - if ./$bin > /dev/null 2>&1 $args + ./$bin $testargs >/dev/null 2>&1 + + if [ "$?" -eq "$expect" ] then echo "ok $no - $name" else @@ -58,77 +59,143 @@ lo_down > /dev/null 2>&1 } +# Setup loopback interfaces before starting the test program and bring them +# down afterwards. test_with_loopback() { - lo1=$1 - lo2=$2 - # Make sure we run as root needroot # Create loopback interfaces - lo_up $lo1 $lo2 > /dev/null 2>&1 + lo_up $client $server > /dev/null 2>&1 # Run the atual test - runtest "$lo1 $lo2 $PORT" + runtest # Destroy loopback interfaces lo_down > /dev/null 2>&1 } -PORT="1296" - no=$1 case "$no" in + # The test passes if the UTO values are correctly exchanged. "1") - name="Send UTO" + name="Send UTO IPv4" bin="send_uto" addr="127.0.0.1" - - runtest "$addr $PORT" + port="1296" + expect=0 # Normal exit + + testargs="$addr $port" + runtest ;; + # In this scenario the server imposes a very small timeout. After the + # handshake the connection is broken and the client can't receive data + # (and thus can't acknowledge it). * + # The server wait a period longer than UTO before trying to write again; + # this triggers an EPIPE error which means the connection is broken. + # + # The test passes if the program exits abnormally with EX_IOERR. "2") - name="short_uto" - bin="short_uto" + name="Short UTO IPv4" + bin="generic_uto" + expect=74 # EX_IOERR + + # Test arguments client="192.0.2.2" server="192.0.2.3" + port="1296" + client_snd="0" + client_rcv="1" + server_snd="10" + server_rcv="1" + downtime="20" - test_with_loopback $client $server + testargs="$client $server $port $client_snd $client_rcv + $server_snd $server_rcv $downtime" + + test_with_loopback ;; + + # In this scenario the client requests a large UTO value and the server + # accepts it. The network is unavailable for a period < UTO. After the + # network picks up, the client should eventually receive the data and + # acknowledge it. + # + # The test passes if the program exits normally. "3") - name="long_uto" - bin="long_uto" + name="Long UTO IPv4" + bin="generic_uto" + expect=0 # Normal exit + + # Test arguments client="192.0.2.2" server="192.0.2.3" + port="1296" + client_snd="1200" # 20 minutes UTO + client_rcv="1" + server_snd="0" + server_rcv="1" + downtime="300" # 5 minutes downtime - test_with_loopback $client $server + testargs="$client $server $port $client_snd $client_rcv + $server_snd $server_rcv $downtime" + + test_with_loopback ;; + # Same as test 1, with IPv6 "4") - name="send_uto_ipv6" + name="Send UTO IPv6" bin="send_uto" - addr="127.0.0.1" + addr="::1" + port="1296" + expect=0 # Normal exit - runtest "$addr $PORT" + testargs="$addr $port" + runtest ;; + # Same as test 2, with IPv6 "5") - name="short_utov6" - bin="short_uto" + name="Short UTO IPv6" + bin="generic_uto" + ipv6="yes" + expect=74 # EX_IOERR + + # Test arguments client="2001:db80:5::2" server="2001:db80:5::3" - ipv6="yes" + port="1296" + client_snd="0" + client_rcv="1" + server_snd="10" + server_rcv="1" + downtime="20" + + testargs="$client $server $port $client_snd $client_rcv + $server_snd $server_rcv $downtime" - test_with_loopback $client $server + test_with_loopback ;; + # Same as test 3, with IPv6 "6") - name="long_utov6" - bin="long_uto" + name="Long UTO IPv6" + bin="generic_uto" + ipv6="yes" + expect=0 # Normal exit + + # Test arguments client="2001:db80:5::2" server="2001:db80:5::3" - ipv6="yes" + port="1296" + client_snd="1200" # 20 minutes UTO + client_rcv="1" + server_snd="0" + server_rcv="1" + downtime="300" # 5 minutes downtime + + testargs="$client $server $port $client_snd $client_rcv + $server_snd $server_rcv $downtime" - test_with_loopback $client $server + test_with_loopback ;; - esac - - From owner-p4-projects@FreeBSD.ORG Fri Aug 19 00:47:05 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AEBEF106566C; Fri, 19 Aug 2011 00:47:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 703F4106567A for ; Fri, 19 Aug 2011 00:47:05 +0000 (UTC) (envelope-from jceel@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 5DD928FC29 for ; Fri, 19 Aug 2011 00:47:05 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7J0l5n2099427 for ; Fri, 19 Aug 2011 00:47:05 GMT (envelope-from jceel@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7J0l5DY099424 for perforce@freebsd.org; Fri, 19 Aug 2011 00:47:05 GMT (envelope-from jceel@freebsd.org) Date: Fri, 19 Aug 2011 00:47:05 GMT Message-Id: <201108190047.p7J0l5DY099424@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jceel@freebsd.org using -f From: Jakub Wojciech Klama To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197847 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2011 00:47:05 -0000 http://p4web.freebsd.org/@@197847?ac=10 Change 197847 by jceel@jceel_cyclone on 2011/08/19 00:46:29 * Initial version of working MMC/SD controller driver. Reads are working stable, but writes are still unstable. Only 1-bit databus. * Some minor cleanups in lpc_dmac.c Affected files ... .. //depot/projects/soc2011/jceel_lpc/sys/arm/conf/EA3250#11 edit .. //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpc_dmac.c#4 edit .. //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpc_mmc.c#5 edit .. //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpcreg.h#11 edit .. //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpcvar.h#8 edit .. //depot/projects/soc2011/jceel_lpc/sys/dev/mmc/mmc.c#4 edit Differences ... ==== //depot/projects/soc2011/jceel_lpc/sys/arm/conf/EA3250#11 (text+ko) ==== @@ -20,6 +20,7 @@ options NFSCL #Network Filesystem Client options NFSLOCKD #Network Lock Manager options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options MSDOSFS options BOOTP options BOOTP_NFSROOT options BOOTP_NFSV3 @@ -56,7 +57,7 @@ options KTR options KTR_COMPILE=(KTR_DEV|KTR_GEOM|KTR_INTR|KTR_PROC) options KTR_MASK=(KTR_DEV|KTR_GEOM|KTR_INTR|KTR_PROC) -options KTR_CPUMASK=0x3 +options KTR_CPUMASK=("0x3") options KTR_ENTRIES=8192 # Pseudo devices ==== //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpc_dmac.c#4 (text+ko) ==== @@ -47,6 +47,8 @@ #include #include +#include + #include #include @@ -82,9 +84,9 @@ #define lpc_dmac_write_4(_sc, _reg, _value) \ bus_space_write_4(_sc->ld_bst, _sc->ld_bsh, _reg, _value) #define lpc_dmac_read_ch_4(_sc, _n, _reg) \ - bus_space_read_4(_sc->ld_bst, _sc->ld_bsh, _reg + (_n * LPC_DMAC_CHSIZE)) + bus_space_read_4(_sc->ld_bst, _sc->ld_bsh, (_reg + LPC_DMAC_CHADDR(_n))) #define lpc_dmac_write_ch_4(_sc, _n, _reg, _value) \ - bus_space_write_4(_sc->ld_bst, _sc->ld_bsh, _reg + (_n * LPC_DMAC_CHSIZE), _value) + bus_space_write_4(_sc->ld_bst, _sc->ld_bsh, (_reg + LPC_DMAC_CHADDR(_n)), _value) static int lpc_dmac_probe(device_t dev) { @@ -134,6 +136,10 @@ lpc_dmac_sc = sc; lpc_pwr_write(dev, LPC_CLKPWR_DMACLK_CTRL, LPC_CLKPWR_DMACLK_CTRL_EN); + lpc_dmac_write_4(sc, LPC_DMAC_CONFIG, LPC_DMAC_CONFIG_ENABLE); + + lpc_dmac_write_4(sc, LPC_DMAC_INTTCCLEAR, 0xff); + lpc_dmac_write_4(sc, LPC_DMAC_INTERRCLEAR, 0xff); return (0); } @@ -156,11 +162,17 @@ tcstat = lpc_dmac_read_4(sc, LPC_DMAC_INTTCSTAT); errstat = lpc_dmac_read_4(sc, LPC_DMAC_INTERRSTAT); - if (tcstat & (1 << i)) - ch->ldc_config->ldc_success_handler(); + if (tcstat & (1 << i)) { + ch->ldc_config->ldc_success_handler( + ch->ldc_config->ldc_handler_arg); + lpc_dmac_write_4(sc, LPC_DMAC_INTTCCLEAR, (1 << i)); + } - if (errstat & (1 << i)) - ch->ldc_config->ldc_error_handler(); + if (errstat & (1 << i)) { + ch->ldc_config->ldc_error_handler( + ch->ldc_config->ldc_handler_arg); + lpc_dmac_write_4(sc, LPC_DMAC_INTERRCLEAR, (1 << i)); + } } } while (intstat); @@ -197,27 +209,27 @@ ctrl = LPC_DMAC_CH_CONTROL_I | (ch->ldc_config->ldc_dst_incr ? LPC_DMAC_CH_CONTROL_DI : 0) | (ch->ldc_config->ldc_src_incr ? LPC_DMAC_CH_CONTROL_SI : 0) | - LPC_DMAC_CH_CONTROL_DWIDTH(2) | - LPC_DMAC_CH_CONTROL_SWIDTH(2) | - LPC_DMAC_CH_CONTROL_DBSIZE(ch->ldc_config->ldc_dst_width) | - LPC_DMAC_CH_CONTROL_SBSIZE(ch->ldc_config->ldc_src_width) | + LPC_DMAC_CH_CONTROL_DWIDTH(ch->ldc_config->ldc_dst_width) | + LPC_DMAC_CH_CONTROL_SWIDTH(ch->ldc_config->ldc_src_width) | + LPC_DMAC_CH_CONTROL_DBSIZE(ch->ldc_config->ldc_dst_burst) | + LPC_DMAC_CH_CONTROL_SBSIZE(ch->ldc_config->ldc_src_burst) | size; cfg = LPC_DMAC_CH_CONFIG_ITC | LPC_DMAC_CH_CONFIG_IE | LPC_DMAC_CH_CONFIG_FLOWCNTL(ch->ldc_config->ldc_fcntl) | LPC_DMAC_CH_CONFIG_DESTP(ch->ldc_config->ldc_dst_periph) | - LPC_DMAC_CH_CONFIG_SRCP(ch->ldc_config->ldc_src_periph); - + LPC_DMAC_CH_CONFIG_SRCP(ch->ldc_config->ldc_src_periph) | LPC_DMAC_CH_CONFIG_E; // XXX lpc_dmac_write_ch_4(sc, chno, LPC_DMAC_CH_SRCADDR, src); lpc_dmac_write_ch_4(sc, chno, LPC_DMAC_CH_DSTADDR, dst); lpc_dmac_write_ch_4(sc, chno, LPC_DMAC_CH_LLI, 0); lpc_dmac_write_ch_4(sc, chno, LPC_DMAC_CH_CONTROL, ctrl); lpc_dmac_write_ch_4(sc, chno, LPC_DMAC_CH_CONFIG, cfg); + return 0; } int -lpc_dmac_enable_transfer(device_t dev, int chno) +lpc_dmac_enable_channel(device_t dev, int chno) { struct lpc_dmac_softc *sc = lpc_dmac_sc; uint32_t cfg; @@ -233,6 +245,32 @@ return 0; } +int +lpc_dmac_disable_channel(device_t dev, int chno) +{ + struct lpc_dmac_softc *sc = lpc_dmac_sc; + uint32_t cfg; + + if (sc == NULL) + return (ENXIO); + + cfg = lpc_dmac_read_ch_4(sc, chno, LPC_DMAC_CH_CONFIG); + cfg &= ~LPC_DMAC_CH_CONFIG_E; + + lpc_dmac_write_ch_4(sc, chno, LPC_DMAC_CH_CONFIG, cfg); + + return 0; +} + +int +lpc_dmac_start_burst(device_t dev, int id) +{ + struct lpc_dmac_softc *sc = lpc_dmac_sc; + + lpc_dmac_write_4(sc, LPC_DMAC_SOFTBREQ, (1 << id)); + return (0); +} + static device_method_t lpc_dmac_methods[] = { /* Device interface */ DEVMETHOD(device_probe, lpc_dmac_probe), ==== //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpc_mmc.c#5 (text+ko) ==== @@ -65,6 +65,20 @@ #include #include +#define DEBUG +//#undef DEBUG + +#ifdef DEBUG +#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ + printf(fmt,##args); } while (0) +#else +#define debugf(fmt, args...) +#endif + +struct lpc_mmc_dmamap_arg { + bus_addr_t lm_dma_busaddr; +}; + struct lpc_mmc_softc { device_t lm_dev; struct mtx lm_mtx; @@ -83,9 +97,17 @@ #define DIRECTION_WRITE 1 int lm_xfer_done; int lm_bus_busy; + bus_dma_tag_t lm_dma_tag; + bus_dmamap_t lm_dma_map; + bus_addr_t lm_buffer_phys; + void * lm_buffer; }; -#define LPC_SD_BLOCKSIZE 512 +#define LPC_SD_MAX_BLOCKSIZE 1024 +/* XXX */ +#define LPC_MMC_DMACH_READ 1 +#define LPC_MMC_DMACH_WRITE 0 + static int lpc_mmc_probe(device_t); static int lpc_mmc_attach(device_t); @@ -94,8 +116,6 @@ static void lpc_mmc_cmd(struct lpc_mmc_softc *, struct mmc_command *); static void lpc_mmc_setup_xfer(struct lpc_mmc_softc *, struct mmc_data *); -static void lpc_mmc_fifo_read(struct lpc_mmc_softc *); -static void lpc_mmc_fifo_write(struct lpc_mmc_softc *); static int lpc_mmc_update_ios(device_t, device_t); static int lpc_mmc_request(device_t, device_t, struct mmc_request *); @@ -103,6 +123,13 @@ static int lpc_mmc_acquire_host(device_t, device_t); static int lpc_mmc_release_host(device_t, device_t); +static void lpc_mmc_dma_rxfinish(void *); +static void lpc_mmc_dma_rxerror(void *); +static void lpc_mmc_dma_txfinish(void *); +static void lpc_mmc_dma_txerror(void *); + +static void lpc_mmc_dmamap_cb(void *, bus_dma_segment_t *, int, int); + #define lpc_mmc_lock(_sc) \ mtx_lock(&_sc->lm_mtx); #define lpc_mmc_unlock(_sc) \ @@ -112,6 +139,34 @@ #define lpc_mmc_write_4(_sc, _reg, _value) \ bus_space_write_4(_sc->lm_bst, _sc->lm_bsh, _reg, _value) +static struct lpc_dmac_channel_config lpc_mmc_dma_rxconf = { + .ldc_fcntl = LPC_DMAC_FLOW_D_P2M, + .ldc_src_periph = LPC_DMAC_SD_ID, + .ldc_src_width = LPC_DMAC_CH_CONTROL_WIDTH_4, + .ldc_src_incr = 0, + .ldc_src_burst = LPC_DMAC_CH_CONTROL_BURST_8, + .ldc_dst_periph = LPC_DMAC_SD_ID, + .ldc_dst_width = LPC_DMAC_CH_CONTROL_WIDTH_4, + .ldc_dst_incr = 1, + .ldc_dst_burst = LPC_DMAC_CH_CONTROL_BURST_8, + .ldc_success_handler = lpc_mmc_dma_rxfinish, + .ldc_error_handler = lpc_mmc_dma_rxerror, +}; + +static struct lpc_dmac_channel_config lpc_mmc_dma_txconf = { + .ldc_fcntl = LPC_DMAC_FLOW_P_M2P, + .ldc_src_periph = LPC_DMAC_SD_ID, + .ldc_src_width = LPC_DMAC_CH_CONTROL_WIDTH_4, + .ldc_src_incr = 1, + .ldc_src_burst = LPC_DMAC_CH_CONTROL_BURST_8, + .ldc_dst_periph = LPC_DMAC_SD_ID, + .ldc_dst_width = LPC_DMAC_CH_CONTROL_WIDTH_4, + .ldc_dst_incr = 0, + .ldc_dst_burst = LPC_DMAC_CH_CONTROL_BURST_8, + .ldc_success_handler = lpc_mmc_dma_txfinish, + .ldc_error_handler = lpc_mmc_dma_txerror, +}; + static int lpc_mmc_probe(device_t dev) { @@ -126,8 +181,9 @@ lpc_mmc_attach(device_t dev) { struct lpc_mmc_softc *sc = device_get_softc(dev); + struct lpc_mmc_dmamap_arg ctx; device_t child; - int rid; + int rid, err; sc->lm_dev = dev; sc->lm_req = NULL; @@ -145,7 +201,7 @@ sc->lm_bst = rman_get_bustag(sc->lm_mem_res); sc->lm_bsh = rman_get_bushandle(sc->lm_mem_res); - device_printf(dev, "virtual register space: 0x%08lx\n", sc->lm_bsh); + debugf("virtual register space: 0x%08lx\n", sc->lm_bsh); rid = 0; sc->lm_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -166,9 +222,12 @@ } sc->lm_host.f_min = 312500; - sc->lm_host.f_max = 25000000; - sc->lm_host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; + sc->lm_host.f_max = 2500000; + sc->lm_host.host_ocr = MMC_OCR_300_310 | MMC_OCR_310_320 | + MMC_OCR_320_330 | MMC_OCR_330_340; +#if 0 sc->lm_host.caps = MMC_CAP_4_BIT_DATA; +#endif lpc_pwr_write(dev, LPC_CLKPWR_MS_CTRL, LPC_CLKPWR_MS_CTRL_CLOCK_EN | LPC_CLKPWR_MS_CTRL_SD_CLOCK | 1); @@ -185,17 +244,68 @@ return (ENXIO); } + /* Alloc DMA memory */ + err = bus_dma_tag_create( + bus_get_dma_tag(sc->lm_dev), + 4, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + LPC_SD_MAX_BLOCKSIZE, 1, /* maxsize, nsegments */ + LPC_SD_MAX_BLOCKSIZE, 0, /* maxsegsize, flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->lm_dma_tag); + + err = bus_dmamem_alloc(sc->lm_dma_tag, (void **)&sc->lm_buffer, + 0, &sc->lm_dma_map); + if (err) { + device_printf(dev, "cannot allocate framebuffer\n"); + goto fail; + } + + err = bus_dmamap_load(sc->lm_dma_tag, sc->lm_dma_map, sc->lm_buffer, + LPC_SD_MAX_BLOCKSIZE, lpc_mmc_dmamap_cb, &ctx, BUS_DMA_NOWAIT); + if (err) { + device_printf(dev, "cannot load DMA map\n"); + goto fail; + } + + sc->lm_buffer_phys = ctx.lm_dma_busaddr; + + lpc_mmc_dma_rxconf.ldc_handler_arg = (void *)sc; + err = lpc_dmac_config_channel(dev, LPC_MMC_DMACH_READ, &lpc_mmc_dma_rxconf); + if (err) { + device_printf(dev, "cannot allocate RX DMA channel\n"); + goto fail; + } + + + lpc_mmc_dma_txconf.ldc_handler_arg = (void *)sc; + err = lpc_dmac_config_channel(dev, LPC_MMC_DMACH_WRITE, &lpc_mmc_dma_txconf); + if (err) { + device_printf(dev, "cannot allocate TX DMA channel\n"); + goto fail; + } + bus_generic_probe(dev); bus_generic_attach(dev); - device_printf(dev, "attached\n"); + return (0); - return (0); +fail: + if (sc->lm_intrhand) + bus_teardown_intr(dev, sc->lm_irq_res, sc->lm_intrhand); + if (sc->lm_irq_res) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->lm_irq_res); + if (sc->lm_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->lm_mem_res); + return (err); } static int lpc_mmc_detach(device_t dev) { + /* XXX */ return (0); } @@ -208,35 +318,21 @@ status = lpc_mmc_read_4(sc, LPC_SD_STATUS); - device_printf(sc->lm_dev, "interrupt: 0x%08x\n", status); - - if (status & LPC_SD_STATUS_TXACTIVE) { - device_printf(sc->lm_dev, "TX active\n"); - lpc_mmc_fifo_write(sc); - } - - if (status & LPC_SD_STATUS_RXACTIVE) { - device_printf(sc->lm_dev, "RX active\n"); - lpc_mmc_fifo_read(sc); - } + debugf("interrupt: 0x%08x\n", status); if (status & LPC_SD_STATUS_CMDCRCFAIL) { - device_printf(sc->lm_dev, "command CRC error\n"); cmd = sc->lm_req->cmd; - cmd->error = MMC_ERR_NONE; + cmd->error = sc->lm_flags & LPC_SD_FLAGS_IGNORECRC + ? MMC_ERR_NONE : MMC_ERR_BADCRC; cmd->resp[0] = lpc_mmc_read_4(sc, LPC_SD_RESP0); sc->lm_req->done(sc->lm_req); sc->lm_req = NULL; lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_CMDCRCFAIL); } -#if 0 - if (status & LPC_SD_STATUS_DATACRCFAIL) { - } -#endif if (status & LPC_SD_STATUS_CMDACTIVE) { - device_printf(sc->lm_dev, "command active\n"); + debugf("command active\n"); cmd = sc->lm_req->cmd; cmd->resp[0] = lpc_mmc_read_4(sc, LPC_SD_RESP0); sc->lm_req->done(sc->lm_req); @@ -247,20 +343,16 @@ device_printf(sc->lm_dev, "data timeout\n"); lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_DATATIMEOUT); } -#if 0 + if (status & LPC_SD_STATUS_TXUNDERRUN) { - + device_printf(sc->lm_dev, "TX underrun\n"); + lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_TXUNDERRUN); } - - if (status & LPC_SD_STATUS_RXOVERRUN) { - - } -#endif + if (status & LPC_SD_STATUS_CMDRESPEND) { - device_printf(sc->lm_dev, "command response\n"); - device_printf(sc->lm_dev, "req: %p\n", sc->lm_req); - device_printf(sc->lm_dev, "cmd: %p\n", sc->lm_req->cmd); + debugf("command response\n"); cmd = sc->lm_req->cmd; + if (cmd->flags & MMC_RSP_136) { cmd->resp[3] = lpc_mmc_read_4(sc, LPC_SD_RESP3); cmd->resp[2] = lpc_mmc_read_4(sc, LPC_SD_RESP2); @@ -269,53 +361,79 @@ cmd->resp[0] = lpc_mmc_read_4(sc, LPC_SD_RESP0); cmd->error = MMC_ERR_NONE; - - sc->lm_req->done(sc->lm_req); - sc->lm_req = NULL; + + if (cmd->data && (cmd->data->flags & MMC_DATA_WRITE)) + lpc_mmc_setup_xfer(sc, sc->lm_req->cmd->data); + + if (!cmd->data) { + sc->lm_req->done(sc->lm_req); + sc->lm_req = NULL; + } + lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_CMDRESPEND); - device_printf(sc->lm_dev, "command response done\n"); } if (status & LPC_SD_STATUS_CMDSENT) { - device_printf(sc->lm_dev, "command sent\n"); + debugf("command sent\n"); cmd = sc->lm_req->cmd; cmd->error = MMC_ERR_NONE; sc->lm_req->done(sc->lm_req); sc->lm_req = NULL; lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_CMDSENT); } -#if 0 + if (status & LPC_SD_STATUS_DATAEND) { + if (sc->lm_xfer_direction == DIRECTION_READ) + lpc_dmac_start_burst(sc->lm_dev, LPC_DMAC_SD_ID); + + lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_DATAEND); + } + if (status & LPC_SD_STATUS_CMDTIMEOUT) { + device_printf(sc->lm_dev, "command response timeout\n"); + cmd = sc->lm_req->cmd; + cmd->error = MMC_ERR_TIMEOUT; + sc->lm_req->done(sc->lm_req); + sc->lm_req = NULL; + lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_CMDTIMEOUT); + return; } if (status & LPC_SD_STATUS_STARTBITERR) { + device_printf(sc->lm_dev, "start bit error\n"); + lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_STARTBITERR); + } - } + if (status & LPC_SD_STATUS_DATACRCFAIL) { + device_printf(sc->lm_dev, "data CRC error\n"); + debugf("data buffer: %p\n", sc->lm_buffer); + cmd = sc->lm_req->cmd; + cmd->error = MMC_ERR_BADCRC; + sc->lm_req->done(sc->lm_req); + sc->lm_req = NULL; - if (status & LPC_SD_STATUS_DATABLOCKEND) { + if (sc->lm_xfer_direction == DIRECTION_READ) + lpc_dmac_start_burst(sc->lm_dev, LPC_DMAC_SD_ID); + lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_DATACRCFAIL); } - if (status & LPC_SD_STATUS_CMDACTIVE) { - if (sc->lm_req == NULL) - return; + if (status & LPC_SD_STATUS_DATABLOCKEND) { + debugf("data block end\n"); + if (sc->lm_xfer_direction == DIRECTION_READ) + memcpy(sc->lm_data->data, sc->lm_buffer, sc->lm_data->len); - cmd = sc->lm_req->cmd; - printf("sc=%p req=%p\n", sc, sc->lm_req); - printf("cmd=%p\n", cmd); - - cmd->resp[0] = lpc_mmc_read_4(sc, LPC_SD_RESP0); - cmd->error = MMC_ERR_NONE; + if (sc->lm_xfer_direction == DIRECTION_WRITE) { + lpc_dmac_disable_channel(sc->lm_dev, LPC_MMC_DMACH_WRITE); + lpc_mmc_write_4(sc, LPC_SD_DATACTRL, 0); + } + sc->lm_req->done(sc->lm_req); sc->lm_req = NULL; - lpc_mmc_write_4(sc, LPC_SD_MASK0, (0xffffffff & ~LPC_SD_STATUS_CMDACTIVE)); + lpc_mmc_write_4(sc, LPC_SD_CLEAR, LPC_SD_STATUS_DATABLOCKEND); } -#endif - lpc_mmc_write_4(sc, LPC_SD_CLEAR, 0xfff); - lpc_mmc_write_4(sc, LPC_SD_MASK0, 0); - device_printf(sc->lm_dev, "isr done\n"); + debugf("done\n"); } static int @@ -323,14 +441,20 @@ { struct lpc_mmc_softc *sc = device_get_softc(bus); - device_printf(bus, "lpc_mmc_request: %p\n", req); + debugf("request: %p\n", req); lpc_mmc_lock(sc); if (sc->lm_req) return (EBUSY); sc->lm_req = req; - //sc->lm_state = STARTED_CMD; + + if (req->cmd->data && req->cmd->data->flags & MMC_DATA_WRITE) { + memcpy(sc->lm_buffer, req->cmd->data->data, req->cmd->data->len); + lpc_mmc_cmd(sc, req->cmd); + lpc_mmc_unlock(sc); + return (0); + } if (req->cmd->data) lpc_mmc_setup_xfer(sc, req->cmd->data); @@ -344,10 +468,16 @@ static void lpc_mmc_cmd(struct lpc_mmc_softc *sc, struct mmc_command *cmd) { - //struct mmc_data *data = cmd->data; uint32_t cmdreg = 0; - device_printf(sc->lm_dev, "cmd: %d arg: 0x%08x\n", cmd->opcode, cmd->arg); + debugf("cmd: %d arg: 0x%08x\n", cmd->opcode, cmd->arg); + + if (lpc_mmc_read_4(sc, LPC_SD_COMMAND) & LPC_SD_COMMAND_ENABLE) { + lpc_mmc_write_4(sc, LPC_SD_COMMAND, 0); + DELAY(1000); + } + + sc->lm_flags &= ~LPC_SD_FLAGS_IGNORECRC; if (cmd->flags & MMC_RSP_PRESENT) cmdreg |= LPC_SD_COMMAND_RESPONSE; @@ -365,85 +495,46 @@ lpc_mmc_write_4(sc, LPC_SD_MASK1, 0xffffffff); lpc_mmc_write_4(sc, LPC_SD_ARGUMENT, cmd->arg); lpc_mmc_write_4(sc, LPC_SD_COMMAND, cmdreg); - - device_printf(sc->lm_dev, "cmdarg: 0x%08x, cmdreg: 0x%08x\n", cmd->arg, cmdreg); } static void lpc_mmc_setup_xfer(struct lpc_mmc_softc *sc, struct mmc_data *data) { uint32_t datactrl = 0; + int data_words = data->len / 4; sc->lm_data = data; sc->lm_xfer_done = 0; - device_printf(sc->lm_dev, "setup_xfer data: %p\n", data); + debugf("data: %p, len: %d, %s\n", data, + data->len, (data->flags & MMC_DATA_READ) ? "read" : "write"); - if (data->flags & MMC_DATA_READ) + if (data->flags & MMC_DATA_READ) { sc->lm_xfer_direction = DIRECTION_READ; + lpc_dmac_setup_transfer(sc->lm_dev, LPC_MMC_DMACH_READ, + LPC_SD_BASE + LPC_SD_FIFO, sc->lm_buffer_phys, + data_words, 0); + } - if (data->flags & MMC_DATA_WRITE) + if (data->flags & MMC_DATA_WRITE) { sc->lm_xfer_direction = DIRECTION_WRITE; + lpc_dmac_setup_transfer(sc->lm_dev, LPC_MMC_DMACH_WRITE, + sc->lm_buffer_phys, LPC_SD_BASE + LPC_SD_FIFO, + data_words, 0); + } datactrl |= (sc->lm_xfer_direction ? LPC_SD_DATACTRL_WRITE : LPC_SD_DATACTRL_READ); - datactrl |= LPC_SD_DATACTRL_ENABLE; + datactrl |= LPC_SD_DATACTRL_DMAENABLE | LPC_SD_DATACTRL_ENABLE; + datactrl |= (ffs(data->len) - 1) << 4; - if (data->len > LPC_SD_BLOCKSIZE) - datactrl |= 0x90; + debugf("datactrl: 0x%08x\n", datactrl); - device_printf(sc->lm_dev, "setup_xfer: datactrl=0x%08x\n", datactrl); - - lpc_mmc_write_4(sc, LPC_SD_DATATIMER, 0x100000); + lpc_mmc_write_4(sc, LPC_SD_DATATIMER, 0xFFFF0000); lpc_mmc_write_4(sc, LPC_SD_DATALENGTH, data->len); lpc_mmc_write_4(sc, LPC_SD_DATACTRL, datactrl); - - if (sc->lm_xfer_direction == DIRECTION_WRITE) - lpc_mmc_fifo_write(sc); -} - -static void -lpc_mmc_fifo_read(struct lpc_mmc_softc *sc) -{ - do { - uint32_t *data = sc->lm_data->data; - int i; - int todo = sc->lm_data->len > 16 ? 16 : (sc->lm_data->len / 4) - sc->lm_xfer_done; - device_printf(sc->lm_dev, "reading from fifo %d words [%d of %d words done]\n", - todo, sc->lm_xfer_done, (sc->lm_data->len / 4)); - - for (i = 0; i < 16; i++) { - data[sc->lm_xfer_done] = - lpc_mmc_read_4(sc, LPC_SD_FIFO); - sc->lm_xfer_done++; - } - - /* - bus_space_read_region_4(sc->lm_bst, sc->lm_bsh, - LPC_SD_FIFO, - &data[sc->lm_xfer_done], - todo); - */ - - //sc->lm_xfer_done += 16; - device_printf(sc->lm_dev, "currently done %d\n", sc->lm_xfer_done); - kdb_enter("data read", "data read"); - } while (lpc_mmc_read_4(sc, LPC_SD_STATUS) & LPC_SD_STATUS_RXDATAAVLBL); - - device_printf(sc->lm_dev, "partial read done\n"); -} - -static void -lpc_mmc_fifo_write(struct lpc_mmc_softc *sc) -{ - do { - lpc_mmc_write_4(sc, LPC_SD_FIFO, - ((uint32_t *)sc->lm_data->data)[sc->lm_xfer_done]); - - sc->lm_xfer_done++; - } while (lpc_mmc_read_4(sc, LPC_SD_STATUS) & LPC_SD_STATUS_TXDATAAVLBL); } static int @@ -548,7 +639,7 @@ { struct lpc_mmc_softc *sc = device_get_softc(bus); struct mmc_ios *ios = &sc->lm_host.ios; - uint32_t clkdiv = 0; + uint32_t clkdiv = 0, pwr = 0; if (ios->bus_width == bus_width_4) clkdiv |= LPC_SD_CLOCK_WIDEBUS; @@ -560,9 +651,32 @@ if ((LPC_SD_CLK / (2 * (clkdiv + 1))) > ios->clock) clkdiv++; - device_printf(bus, "clock: %dHz, clkdiv: %d\n", ios->clock, clkdiv); + debugf("clock: %dHz, clkdiv: %d\n", ios->clock, clkdiv); + + if (ios->bus_width == bus_width_4) { + debugf("using wide bus mode\n"); + clkdiv |= LPC_SD_CLOCK_WIDEBUS; + } lpc_mmc_write_4(sc, LPC_SD_CLOCK, clkdiv | LPC_SD_CLOCK_ENABLE); + + switch (ios->power_mode) { + case power_off: + pwr |= LPC_SD_POWER_CTRL_OFF; + break; + case power_up: + pwr |= LPC_SD_POWER_CTRL_UP; + break; + case power_on: + pwr |= LPC_SD_POWER_CTRL_ON; + break; + } + + if (ios->bus_mode == opendrain) + pwr |= LPC_SD_POWER_OPENDRAIN; + + lpc_mmc_write_4(sc, LPC_SD_POWER, pwr); + return (0); } @@ -600,6 +714,38 @@ return (0); } +static void lpc_mmc_dma_rxfinish(void *arg) +{ +} + +static void lpc_mmc_dma_rxerror(void *arg) +{ + struct lpc_mmc_softc *sc = (struct lpc_mmc_softc *)arg; + device_printf(sc->lm_dev, "DMA RX error\n"); +} + +static void lpc_mmc_dma_txfinish(void *arg) +{ +} + +static void lpc_mmc_dma_txerror(void *arg) +{ + struct lpc_mmc_softc *sc = (struct lpc_mmc_softc *)arg; + device_printf(sc->lm_dev, "DMA TX error\n"); +} + +static void +lpc_mmc_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) +{ + struct lpc_mmc_dmamap_arg *ctx; + + if (err) + return; + + ctx = (struct lpc_mmc_dmamap_arg *)arg; + ctx->lm_dma_busaddr = segs[0].ds_addr; +} + static device_method_t lpc_mmc_methods[] = { /* Device interface */ DEVMETHOD(device_probe, lpc_mmc_probe), ==== //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpcreg.h#11 (text+ko) ==== @@ -216,6 +216,7 @@ #define LPC_SD_POWER 0x00 #define LPC_SD_POWER_OPENDRAIN (1 << 6) #define LPC_SD_POWER_CTRL_OFF 0x00 +#define LPC_SD_POWER_CTRL_UP 0x02 #define LPC_SD_POWER_CTRL_ON 0x03 #define LPC_SD_CLOCK 0x04 #define LPC_SD_CLOCK_WIDEBUS (1 << 11) @@ -558,7 +559,7 @@ #define LPC_DMAC_INTTCSTAT 0x04 #define LPC_DMAC_INTTCCLEAR 0x08 #define LPC_DMAC_INTERRSTAT 0x0c -#define LPC_DMAC_INTERRCLR 0x10 +#define LPC_DMAC_INTERRCLEAR 0x10 #define LPC_DMAC_RAWINTTCSTAT 0x14 #define LPC_DMAC_RAWINTERRSTAT 0x18 #define LPC_DMAC_ENABLED_CHANNELS 0x1c @@ -583,8 +584,10 @@ #define LPC_DMAC_CH_CONTROL_SI (1 << 26) #define LPC_DMAC_CH_CONTROL_D (1 << 25) #define LPC_DMAC_CH_CONTROL_S (1 << 24) +#define LPC_DMAC_CH_CONTROL_WIDTH_4 2 #define LPC_DMAC_CH_CONTROL_DWIDTH(_n) ((_n & 0x7) << 21) #define LPC_DMAC_CH_CONTROL_SWIDTH(_n) ((_n & 0x7) << 18) +#define LPC_DMAC_CH_CONTROL_BURST_8 2 #define LPC_DMAC_CH_CONTROL_DBSIZE(_n) ((_n & 0x7) << 15) #define LPC_DMAC_CH_CONTROL_SBSIZE(_n) ((_n & 0x7) << 12) #define LPC_DMAC_CH_CONTROL_XFERLEN(_n) (_n & 0xfff) @@ -595,14 +598,20 @@ #define LPC_DMAC_CH_CONFIG_ITC (1 << 15) #define LPC_DMAC_CH_CONFIG_IE (1 << 14) #define LPC_DMAC_CH_CONFIG_FLOWCNTL(_n) ((_n & 0x7) << 11) -#define LPC_DMAC_CH_FCNTL_MEM_TO_MEM 0 -#define LPC_DMAC_CH_FCNTL_MEM_TO_DEV 1 -#define LPC_DMAC_CH_FCNTL_DEV_TO_MEM 2 -#define LPC_DMAC_CH_FCNTL_DEV_TO_DEV 3 #define LPC_DMAC_CH_CONFIG_DESTP(_n) ((_n & 0x1f) << 6) #define LPC_DMAC_CH_CONFIG_SRCP(_n) ((_n & 0x1f) << 1) #define LPC_DMAC_CH_CONFIG_E (1 << 0) +/* DMA flow control values */ +#define LPC_DMAC_FLOW_D_M2M 0 +#define LPC_DMAC_FLOW_D_M2P 1 +#define LPC_DMAC_FLOW_D_P2M 2 +#define LPC_DMAC_FLOW_D_P2P 3 +#define LPC_DMAC_FLOW_DP_P2P 4 +#define LPC_DMAC_FLOW_P_M2P 5 +#define LPC_DMAC_FLOW_P_P2M 6 +#define LPC_DMAC_FLOW_SP_P2P 7 + /* DMA peripheral ID's */ #define LPC_DMAC_I2S0_DMA0_ID 0 #define LPC_DMAC_NAND_ID 1 ==== //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpcvar.h#8 (text+ko) ==== @@ -48,15 +48,20 @@ int ldc_src_periph; int ldc_src_width; int ldc_src_incr; + int ldc_src_burst; int ldc_dst_periph; int ldc_dst_width; int ldc_dst_incr; - void (*ldc_success_handler)(void); - void (*ldc_error_handler)(void); + int ldc_dst_burst; + void (*ldc_success_handler)(void *); + void (*ldc_error_handler)(void *); + void * ldc_handler_arg; }; int lpc_dmac_config_channel(device_t, int, struct lpc_dmac_channel_config *); int lpc_dmac_setup_transfer(device_t, int, bus_addr_t, bus_addr_t, bus_size_t, int); -int lpc_dmac_enable_transfer(device_t, int); +int lpc_dmac_enable_channel(device_t, int); +int lpc_dmac_disable_channel(device_t, int); +int lpc_dmac_start_burst(device_t, int); #endif /* _ARM_LPC_LPCVAR_H */ ==== //depot/projects/soc2011/jceel_lpc/sys/dev/mmc/mmc.c#4 (text+ko) ==== @@ -107,7 +107,7 @@ SYSCTL_NODE(_hw, OID_AUTO, mmc, CTLFLAG_RD, NULL, "mmc driver"); -static int mmc_debug = 3; +static int mmc_debug = 0;//3; SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RW, &mmc_debug, 0, "Debug level"); /* bus entry points */ From owner-p4-projects@FreeBSD.ORG Fri Aug 19 19:55:54 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 13E191065674; Fri, 19 Aug 2011 19:55:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAA7A106566B for ; Fri, 19 Aug 2011 19:55:53 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id B74088FC0C for ; Fri, 19 Aug 2011 19:55:53 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7JJtriQ033467 for ; Fri, 19 Aug 2011 19:55:53 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7JJtrGg033464 for perforce@freebsd.org; Fri, 19 Aug 2011 19:55:53 GMT (envelope-from cnicutar@freebsd.org) Date: Fri, 19 Aug 2011 19:55:53 GMT Message-Id: <201108191955.p7JJtrGg033464@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197883 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2011 19:55:54 -0000 http://p4web.freebsd.org/@@197883?ac=10 Change 197883 by cnicutar@cnicutar_cronos on 2011/08/19 19:55:28 Add 2 new UTO tests and README. Make stylistic changes & add comments. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/README#1 add .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/runtest.sh#3 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/test_utils.c#2 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/runtest.sh#3 (text+ko) ==== @@ -1,5 +1,8 @@ #!/bin/sh +EX_OK=0; +EX_IOERR=74 + # Bring down two loopback interfaces lo_down() @@ -8,7 +11,7 @@ ifconfig lo3 destroy } -# Create two loopback interfaces and assign addresses +# Create two loopback interfaces and assign example addresses lo_up() { # Just in case they are still around @@ -99,7 +102,7 @@ "2") name="Short UTO IPv4" bin="generic_uto" - expect=74 # EX_IOERR + expect=$EX_IOERR # Test arguments client="192.0.2.2" @@ -107,9 +110,9 @@ port="1296" client_snd="0" client_rcv="1" - server_snd="10" + server_snd="10" # Server imposes 10 seconds timeout server_rcv="1" - downtime="20" + downtime="20" # Downtime lasts 20 seconds testargs="$client $server $port $client_snd $client_rcv $server_snd $server_rcv $downtime" @@ -135,7 +138,7 @@ client_snd="1200" # 20 minutes UTO client_rcv="1" server_snd="0" - server_rcv="1" + server_rcv="1" # Server accepts UTO suggestion downtime="300" # 5 minutes downtime testargs="$client $server $port $client_snd $client_rcv @@ -159,7 +162,7 @@ name="Short UTO IPv6" bin="generic_uto" ipv6="yes" - expect=74 # EX_IOERR + expect=$EX_IOERR # Test arguments client="2001:db80:5::2" @@ -167,9 +170,9 @@ port="1296" client_snd="0" client_rcv="1" - server_snd="10" + server_snd="10" # Server imposes 10 seconds timeout server_rcv="1" - downtime="20" + downtime="20" # Downtime lasts 20 seconds testargs="$client $server $port $client_snd $client_rcv $server_snd $server_rcv $downtime" @@ -187,10 +190,10 @@ client="2001:db80:5::2" server="2001:db80:5::3" port="1296" - client_snd="1200" # 20 minutes UTO + client_snd="1200" # Client requests 20 minutes UTO client_rcv="1" server_snd="0" - server_rcv="1" + server_rcv="1" # Server accepts UTO suggestions downtime="300" # 5 minutes downtime testargs="$client $server $port $client_snd $client_rcv @@ -198,4 +201,53 @@ test_with_loopback ;; + # In this scenario the server doesn't accept the suggestion of the + # client so the connection should fail. + # + # The test passes if the program exits abnormally with EX_IOERR. + "7") + name="Refused UTO" + bin="generic_uto" + expect=$EX_IOERR + + # Test arguments + client="192.0.2.2" + server="192.0.2.3" + port="1296" + client_snd="3600" # Client requests 1 hour + client_rcv="1" + server_snd="0" + server_rcv="0" # Server refuses UTO + downtime="600" # 10 minutes downtime + + testargs="$client $server $port $client_snd $client_rcv + $server_snd $server_rcv $downtime" + + test_with_loopback + ;; + # In this scenario the client requests one hour of UTO but the + # server accepts only 300 seconds. + # + # The test passes if the program exits with EX_IOERR. + "8") + name="Partial UTO IPv6" + bin="generic_uto" + ipv6="yes" + expect=$EX_IOERR + + # Test arguments + client="2001:db80:5::2" + server="2001:db80:5::3" + port="1296" + client_snd="3600" # Client requests 1 hour + client_rcv="1" + server_snd="0" + server_rcv="300" # Server accepts max 5 minutes + downtime="600" # 10 minutes downtime + + testargs="$client $server $port $client_snd $client_rcv + $server_snd $server_rcv $downtime" + + test_with_loopback + ;; esac ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/tools/regression/netinet/tcputo/test_utils.c#2 (text+ko) ==== @@ -15,11 +15,16 @@ #include "test_utils.h" +/* + * These are utility functions used by UTO tests. + */ + /* * Bind a socket to an address, using the SO_REUSEADDR socket option. */ -int tcp_bind(char *addr, char *port) +int +tcp_bind(char *addr, char *port) { int s, rc, yes = 1; struct addrinfo hints; @@ -64,8 +69,11 @@ return (rp == NULL) ? -1 : s; } - -int tcp_connect(int s, char *addr, char *port) +/* + * Try to connect an existing socket to and address. + */ +int +tcp_connect(int s, char *addr, char *port) { int rc; struct addrinfo hints; @@ -169,6 +177,10 @@ /* * Simulate broken connectivity by diverting the traffic to an unlistened * port. + * + * XXX-CN This is a hack. The problem is that there's no easy way to filter + * the traffic on loopback devices in a way that doesn't interfere with + * syscalls. */ void port_down(char *port) @@ -182,7 +194,7 @@ } /* - * Remove the rule added by port_down. + * Remove the rule added by port_down, thus ending the downtime. */ void port_up() @@ -214,7 +226,7 @@ if (sock < 0) err(EX_UNAVAILABLE, "accept"); - /* Take the route down and then attempt to send data. */ + /* Take the link down and then attempt to send data. */ if (downtime) port_down(lport); @@ -222,7 +234,7 @@ if (bytes < 0) err(EX_IOERR, "send"); - /* Sleep through downtime and then bring the route back up. */ + /* Sleep through downtime and then bring the link back up. */ if (downtime) { sleep(downtime); port_up(); From owner-p4-projects@FreeBSD.ORG Sat Aug 20 09:41:33 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EF81D1065670; Sat, 20 Aug 2011 09:41:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9B83106566B for ; Sat, 20 Aug 2011 09:41:32 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 7EB0B8FC08 for ; Sat, 20 Aug 2011 09:41:32 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7K9fWbC003628 for ; Sat, 20 Aug 2011 09:41:32 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7K9fWw3003625 for perforce@freebsd.org; Sat, 20 Aug 2011 09:41:32 GMT (envelope-from cnicutar@freebsd.org) Date: Sat, 20 Aug 2011 09:41:32 GMT Message-Id: <201108200941.p7K9fWw3003625@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197905 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 09:41:33 -0000 http://p4web.freebsd.org/@@197905?ac=10 Change 197905 by cnicutar@cnicutar_cronos on 2011/08/20 09:40:36 Take uto_enable into account when handling connections. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_input.c#4 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_usrreq.c#4 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_var.h#7 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_input.c#4 (text+ko) ==== @@ -3196,8 +3196,6 @@ case TCPOPT_UTO: if (optlen != TCPOLEN_UTO) continue; - if (!V_uto_enable) - continue; to->to_flags |= TOF_UTO; bcopy((char *)cp + 2, (char *)&to->to_uto, sizeof(to->to_uto)); ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_usrreq.c#4 (text+ko) ==== @@ -1330,7 +1330,8 @@ return (error); INP_WLOCK_RECHECK(inp); - if (optval == 0) { + /* Silently turn it off if !V_uto_enable. */ + if (!V_uto_enable || optval <= 0) { /* Disable sending the option. */ tp->t_flags &= ~TF_SND_UTO; tp->snd_uto = 0; @@ -1353,16 +1354,18 @@ return (error); INP_WLOCK_RECHECK(inp); - if (optval <= 0) + if (!V_uto_enable || optval <= 0) /* This connection will ignore suggestions. */ tp->t_flags &= ~TF_RCV_UTO; else { tp->t_flags |= TF_RCV_UTO; /* * If optval > 1, we'll use it as the max - * acceptable suggestion. + * acceptable suggestion (or silently truncate + * it to V_uto_max_timeout). */ - tp->max_uto = (optval > 1) ? + tp->max_uto = (optval > 1 && + optval < V_uto_max_timeout) ? optval : V_uto_max_timeout; } INP_WUNLOCK(inp); ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_var.h#7 (text+ko) ==== @@ -262,8 +262,8 @@ #define BYTES_THIS_ACK(tp, th) (th->th_ack - tp->snd_una) -#define USING_UTO(tp) (tp)->snd_uto || \ - (((tp)->t_flags & TF_RCV_UTO) && (tp)->rcv_uto) +#define USING_UTO(tp) V_uto_enable && ((tp)->snd_uto || \ + (((tp)->t_flags & TF_RCV_UTO) && (tp)->rcv_uto)) #define UTO_VALUE(to) ((to).to_uto & UTO_MINS) ? \ ((to).to_uto & ~(UTO_MINS)) * 60 : (to).to_uto From owner-p4-projects@FreeBSD.ORG Sat Aug 20 11:10:18 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 82E16106564A; Sat, 20 Aug 2011 11:10:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CC0C106566C for ; Sat, 20 Aug 2011 11:10:17 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 1A3828FC12 for ; Sat, 20 Aug 2011 11:10:17 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7KBAGpQ022461 for ; Sat, 20 Aug 2011 11:10:16 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7KBAGHk022458 for perforce@freebsd.org; Sat, 20 Aug 2011 11:10:16 GMT (envelope-from cnicutar@freebsd.org) Date: Sat, 20 Aug 2011 11:10:16 GMT Message-Id: <201108201110.p7KBAGHk022458@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197907 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 11:10:18 -0000 http://p4web.freebsd.org/@@197907?ac=10 Change 197907 by cnicutar@cnicutar_cronos on 2011/08/20 11:10:09 Change tcp(4) to reflect the updated semantics of TCP_RCVUTO_TIMEOUT. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/share/man/man4/tcp.4#3 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/share/man/man4/tcp.4#3 (text+ko) ==== @@ -237,11 +237,14 @@ This option is silently left out if (due to other options) not enough space is available. .It Dv TCP_RCVUTO_TIMEOUT -By setting this option to a value larger than 1 the user allows a TCP to -accept the timeout suggestion sent by the peer. +When setting this value to 1, the application specifies any value (up to +.Dv uto.max_timeout +) is acceptable. +If the application specifies a value larger than 1, that is considered +the maximum acceptable timeout for the connection. The default value is 0. -By getting this option the user can determine the actual timeout (in seconds) -as advertised by the peer. +By retriving this option the user can determine the actual timeout (in +seconds) advertised by the peer. .Pp When using both .Dv TCP_RCVUTO_TIMEOUT @@ -254,9 +257,9 @@ .Xr getsockopt 2 the most recent value received is returned. .Pp -A possible use of this option is allowing a user to request a large timeout +A possible use of this option is allowing a peer to request a large timeout (several hours) for a connection. -Even if the user is offline for long periods of time the connection will be +Even if the peer is offline for long periods of time the connection will be maintained. .Pp This option has security implications. From owner-p4-projects@FreeBSD.ORG Sat Aug 20 11:56:25 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9CAC7106567B; Sat, 20 Aug 2011 11:56:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F2DF1065679 for ; Sat, 20 Aug 2011 11:56:25 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 32C9A8FC15 for ; Sat, 20 Aug 2011 11:56:25 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7KBuPNK032389 for ; Sat, 20 Aug 2011 11:56:25 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7KBuPjE032386 for perforce@freebsd.org; Sat, 20 Aug 2011 11:56:25 GMT (envelope-from cnicutar@freebsd.org) Date: Sat, 20 Aug 2011 11:56:25 GMT Message-Id: <201108201156.p7KBuPjE032386@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197909 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 11:56:25 -0000 http://p4web.freebsd.org/@@197909?ac=10 Change 197909 by cnicutar@cnicutar_cronos on 2011/08/20 11:56:07 Add conditional compilation for UTO support in openssh. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/crypto/openssh/readconf.c#3 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/crypto/openssh/servconf.c#3 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/crypto/openssh/ssh.c#3 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/crypto/openssh/readconf.c#3 (text+ko) ==== @@ -227,7 +227,11 @@ { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, { "rekeylimit", oRekeyLimit }, { "connecttimeout", oConnectTimeout }, +#ifdef TCP_SNDUTO_TIMEOUT { "usertimeout", oUserTimeout }, +#else + { "usertimeout", oUnsupported }, +#endif { "addressfamily", oAddressFamily }, { "serveraliveinterval", oServerAliveInterval }, { "serveralivecountmax", oServerAliveCountMax }, ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/crypto/openssh/servconf.c#3 (text+ko) ==== @@ -423,7 +423,11 @@ { "keepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, /* obsolete alias */ { "allowtcpforwarding", sAllowTcpForwarding, SSHCFG_ALL }, { "allowagentforwarding", sAllowAgentForwarding, SSHCFG_ALL }, +#ifdef TCP_RCVUTO_TIMEOUT { "allowusertimeout", sAllowUserTimeout, SSHCFG_ALL }, +#else + { "allowusertimeout", sUnsupported, SSHCFG_ALL }, +#endif { "allowusers", sAllowUsers, SSHCFG_GLOBAL }, { "denyusers", sDenyUsers, SSHCFG_GLOBAL }, { "allowgroups", sAllowGroups, SSHCFG_GLOBAL }, ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/crypto/openssh/ssh.c#3 (text+ko) ==== @@ -394,9 +394,14 @@ tty_flag = 1; break; case 'u': +#ifdef TCP_SNDUTO_TIMEOUT options.user_timeout = convtime(optarg); if (options.user_timeout == -1) fatal("Invalid User Timeout value"); +#else + fprintf(stderr, "Warning, TCP_SNDUTO_TIMEOUT not" + " supported, timeout ignored\n"); +#endif break; case 'v': if (debug_flag == 0) { From owner-p4-projects@FreeBSD.ORG Sat Aug 20 12:29:21 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DCE391065670; Sat, 20 Aug 2011 12:29:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F6FB106564A for ; Sat, 20 Aug 2011 12:29:20 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 8C4668FC17 for ; Sat, 20 Aug 2011 12:29:20 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7KCTKrc038775 for ; Sat, 20 Aug 2011 12:29:20 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7KCTKcs038772 for perforce@freebsd.org; Sat, 20 Aug 2011 12:29:20 GMT (envelope-from cnicutar@freebsd.org) Date: Sat, 20 Aug 2011 12:29:20 GMT Message-Id: <201108201229.p7KCTKcs038772@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197913 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 12:29:21 -0000 http://p4web.freebsd.org/@@197913?ac=10 Change 197913 by cnicutar@cnicutar_cronos on 2011/08/20 12:28:18 Add conditional compilation for UTO support in telnet. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/contrib/telnet/telnet/commands.c#3 edit .. //depot/projects/soc2011/cnicutar_tcputo_9/src/contrib/telnet/telnetd/telnetd.c#3 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/contrib/telnet/telnet/commands.c#3 (text+ko) ==== @@ -924,6 +924,7 @@ void set_timeout(char *s) { +#ifdef TCP_SNDUTO_TIMEOUT if (s == NULL) { uto = 0; /* There is not way to "take it back". */ @@ -934,6 +935,9 @@ if (uto && net > 0 && setsockopt(net, IPPROTO_TCP, TCP_SNDUTO_TIMEOUT, &uto, sizeof(uto))) perror("setsockopt UTO"); +#else + fprintf(stderr, "Warning: UTO not supported. timeout ignored\n"); +#endif } static int ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/contrib/telnet/telnetd/telnetd.c#3 (text+ko) ==== @@ -288,8 +288,12 @@ break; case 't': +#ifdef TCP_RCVUTO_TIMEOUT /* Enable TCP_RCVUTO_TIMEOUT after authentication.*/ uto = 1; +#else + warnx("UTO not supported."); +#endif break; case 'u': From owner-p4-projects@FreeBSD.ORG Sat Aug 20 13:57:08 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 24A8D106566C; Sat, 20 Aug 2011 13:57:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB636106564A for ; Sat, 20 Aug 2011 13:57:07 +0000 (UTC) (envelope-from cnicutar@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id C8B108FC15 for ; Sat, 20 Aug 2011 13:57:07 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7KDv78e056199 for ; Sat, 20 Aug 2011 13:57:07 GMT (envelope-from cnicutar@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7KDv77k056196 for perforce@freebsd.org; Sat, 20 Aug 2011 13:57:07 GMT (envelope-from cnicutar@freebsd.org) Date: Sat, 20 Aug 2011 13:57:07 GMT Message-Id: <201108201357.p7KDv77k056196@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to cnicutar@freebsd.org using -f From: Catalin Nicutar To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197920 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 13:57:08 -0000 http://p4web.freebsd.org/@@197920?ac=10 Change 197920 by cnicutar@cnicutar_cronos on 2011/08/20 13:56:20 Update tcp(4) to add granularity information. Affected files ... .. //depot/projects/soc2011/cnicutar_tcputo_9/src/share/man/man4/tcp.4#4 edit Differences ... ==== //depot/projects/soc2011/cnicutar_tcputo_9/src/share/man/man4/tcp.4#4 (text+ko) ==== @@ -38,7 +38,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD: src/share/man/man4/tcp.4,v 1.63 2011/02/21 11:56:11 lstewart Exp $ .\" -.Dd August 05, 2011 +.Dd August 20, 2011 .Dt TCP 4 .Os .Sh NAME @@ -236,6 +236,9 @@ value. This option is silently left out if (due to other options) not enough space is available. +When specifying more that 3600 seconds of UTO, +.Dv TCP_SNDUTO_TIMEOUT +will set the granularity bit and send the value in minutes. .It Dv TCP_RCVUTO_TIMEOUT When setting this value to 1, the application specifies any value (up to .Dv uto.max_timeout From owner-p4-projects@FreeBSD.ORG Sat Aug 20 14:08:07 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0F5E41065670; Sat, 20 Aug 2011 14:08:07 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C559E106564A for ; Sat, 20 Aug 2011 14:08:06 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id B16138FC17 for ; Sat, 20 Aug 2011 14:08:06 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p7KE86JR058053 for ; Sat, 20 Aug 2011 14:08:06 GMT (envelope-from rene@FreeBSD.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p7KE86KR058050 for perforce@freebsd.org; Sat, 20 Aug 2011 14:08:06 GMT (envelope-from rene@FreeBSD.org) Date: Sat, 20 Aug 2011 14:08:06 GMT Message-Id: <201108201408.p7KE86KR058050@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to rene@FreeBSD.org using -f From: Rene Ladan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 197922 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 14:08:07 -0000 http://p4web.freebsd.org/@@197922?ac=10 Change 197922 by rene@rene_acer on 2011/08/20 14:07:08 contrib.additional.sgml: add George Liaskos for www/chromium IFC Affected files ... .. //depot/projects/docproj_nl/en_US.ISO8859-1/articles/contributing-ports/article.sgml#3 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#100 edit .. //depot/projects/docproj_nl/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml#64 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/porters-handbook/book.sgml#110 integrate .. //depot/projects/docproj_nl/share/sgml/mirrors.xml#27 integrate .. //depot/projects/docproj_nl/www/en/advocacy/index.sgml#2 integrate .. //depot/projects/docproj_nl/www/en/cgi/cgi-style.pl#9 integrate .. //depot/projects/docproj_nl/www/en/developers.sgml#59 integrate .. //depot/projects/docproj_nl/www/en/index.xsl#9 integrate .. //depot/projects/docproj_nl/www/en/layout/js/Makefile#2 integrate .. //depot/projects/docproj_nl/www/en/layout/js/google.js#1 branch .. //depot/projects/docproj_nl/www/en/news/news.sgml#4 integrate .. //depot/projects/docproj_nl/www/en/platforms/ppc.sgml#7 integrate .. //depot/projects/docproj_nl/www/share/sgml/header.ent#9 integrate .. //depot/projects/docproj_nl/www/share/sgml/news.xml#113 integrate .. //depot/projects/docproj_nl/www/share/sgml/usergroups.xml#27 integrate Differences ... ==== //depot/projects/docproj_nl/en_US.ISO8859-1/articles/contributing-ports/article.sgml#3 (text+ko) ==== @@ -7,7 +7,7 @@ Contributing to the FreeBSD Ports Collection - $FreeBSD: doc/en_US.ISO8859-1/articles/contributing-ports/article.sgml,v 1.5 2009/11/26 21:20:01 miwi Exp $ + $FreeBSD: doc/en_US.ISO8859-1/articles/contributing-ports/article.sgml,v 1.6 2011/08/14 11:13:46 ryusuke Exp $ Abstract @@ -373,7 +373,7 @@ Please do not submit a &man.shar.1; archive of the - entire port; instead, use &man.diff.1; -r. + entire port; instead, use &man.diff.1; -ruN. In this way, committers can much more easily see exactly what changes are being made. The Porter's Handbook section on ==== //depot/projects/docproj_nl/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#100 (text+ko) ==== @@ -1,4 +1,4 @@ - + + lang/moscow_ml for an example), or through a shell-wrapper which sets LD_LIBRARY_PATH before invoking the binary, like - www/mozilla does. + www/seamonkey does. When installing 32-bit libraries on 64-bit system, use USE_LDCONFIG32 instead. @@ -6170,8 +6170,8 @@ List of space-separated suitable Java versions for the port. An optional "+" allows you to specify a range of versions (allowed values: - 1.1[+] 1.2[+] 1.3[+] 1.4[+] 1.5[+] - 1.6[+]). + 1.5[+] 1.6[+] 1.7[+] + ). @@ -6185,7 +6185,7 @@ JAVA_VENDOR List of space-separated suitable JDK port vendors for the port (allowed values: freebsd bsdjava sun - blackdown openjdk). + openjdk). @@ -6205,22 +6205,6 @@ When set, it means that the selected JDK port should be added to the extract dependencies of the port. - - - USE_JIKES - Whether the port should or should not use the - jikes bytecode compiler to build. When - no value is set for this variable, the port will use - jikes to build if available. You may - also explicitly forbid or enforce the use of - jikes (by setting 'no' - or 'yes'). In the later case, devel/jikes will be added to build - dependencies of the port. In any case that jikes - is actually used in place of javac, then the - HAVE_JIKES variable is defined by - bsd.java.mk. - @@ -6242,13 +6226,13 @@ JAVA_PORT The name of the JDK port (e.g. - 'java/jdk14'). + 'java/diablo-jdk16'). JAVA_PORT_VERSION The full version of the JDK port (e.g. - '1.4.2'). If you only need the first + '1.6.0'). If you only need the first two digits of this version number, use ${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/}. @@ -6256,19 +6240,19 @@ JAVA_PORT_OS The operating system used by the JDK port (e.g. - 'linux'). + 'native'). JAVA_PORT_VENDOR The vendor of the JDK port (e.g. - 'sun'). + 'freebsd'). JAVA_PORT_OS_DESCRIPTION Description of the operating system used by the JDK port - (e.g. 'Linux'). + (e.g. 'Native'). @@ -6280,34 +6264,34 @@ JAVA_HOME Path to the installation directory of the JDK (e.g. - '/usr/local/jdk1.3.1'). + '/usr/local/diablo-jdk1.6.0'). JAVAC Path to the Java compiler to use (e.g. - '/usr/local/jdk1.3.1/bin/javac' or - '/usr/local/bin/jikes'). + '/usr/local/diablo-jdk1.6.0/bin/javac'). + JAR Path to the jar tool to use (e.g. - '/usr/local/jdk1.3.1/bin/jar' or + '/usr/local/diablo-jdk1.6.0/bin/jar' or '/usr/local/bin/fastjar'). APPLETVIEWER Path to the appletviewer utility (e.g. - '/usr/local/linux-jdk1.3.1/bin/appletviewer'). + '/usr/local/diablo-jdk1.6.0/bin/appletviewer'). JAVA Path to the java executable. Use this for executing Java programs (e.g. - '/usr/local/jdk1.3.1/bin/java'). + '/usr/local/diablo-jdk1.6.0/bin/java'). @@ -6369,12 +6353,6 @@ Path to the archive that contains the JDK class files, ${JAVA_HOME}/jre/lib/rt.jar. - - - HAVE_JIKES - Defined whenever jikes is used by - the port (see USE_JIKES above). - @@ -6440,11 +6418,6 @@ This is similar to the USE_GMAKE mechanism, which is documented in . - If jikes is used in place of - javac (see USE_JIKES in - ), then Ant will automatically - use it to build the port. - @@ -14320,6 +14293,12 @@ 9.0-CURRENT after importing pf from OpenBSD 4.5. + + 900041 + August 13, 2011 + 9.0-CURRENT after the implementation of Capsicum + capabilities; fget(9) gains a rights argument. + @@ -14499,92 +14478,6 @@ shorthand solution. - - Clang: new C/C++ compiler - - As of version 9.0, &os; will have the Clang C/C++ compiler as - its base compiler, next to GCC. Some modifications to the - Ports Collection are necessary for Clang. In general, these involve - generalizing the port and making the - source code portable. More specifically: - - - - Respect the CC and - CXX variables. Do not use any of the - programs cc, - c89, c99, - gcc, c++, or - g++ in a port directly. - - - - Respect LD, do not use - ld in a port directly. - - - - Do not use cpp for reformatting - manual pages or shell scripts. Try to use something more - suitable instead, possibly falling back to - CPP. - - - - - Clang uses the gnu99 standard by default, while GCC - uses the gnu89 standard by default. Therefore, if there - are any linker errors caused by the different semantics of - inline, compiler errors caused by the - use of reserved C99 keywords (i.e. restrict) or calls to - unimplemented ISO C99 math routines, try to add - USE_CSTD=gnu89 to the port - Makefile. - - - - The -traditional option is not - supported, so existing occurrences have to be removed. - No consensus has yet been reached on ports which abuse - this option to preserve white space in text formatting. - Note that the Clang preprocessor does not preserve white - space. - - - - Explicit type indication of variables must be used in - built-in assembler code. - - - - The main function must be properly declared as: - - int main(int argc, char **argv) - - or, if there are no parameters, as: - - int main(void) - - - - Some temporary hacks that might be used if all else fails: - - - - Adding -fheinous-gnu-extensions. - Note that this option is already deprecated. - - - - Reducing the warning level by adding - --diasable-werror or - --disable-strict, or by disabling - --warn-common or - -Werror. - - - - Respect both <makevar>CC</makevar> and <makevar>CXX</makevar> ==== //depot/projects/docproj_nl/share/sgml/mirrors.xml#27 (text+ko) ==== @@ -2,7 +2,7 @@ - $FreeBSD: doc/share/sgml/mirrors.xml,v 1.125 2011/06/07 22:04:45 simon Exp $ + $FreeBSD: doc/share/sgml/mirrors.xml,v 1.126 2011/08/15 18:23:48 blackend Exp $ @@ -604,6 +604,11 @@ + ftp4.fr.FreeBSD.org + ftp://ftp4.fr.FreeBSD.org/pub/FreeBSD/ + + + ftp5.fr.FreeBSD.org ftp://ftp5.fr.FreeBSD.org/pub/FreeBSD/ ==== //depot/projects/docproj_nl/www/en/advocacy/index.sgml#2 (text+ko) ==== @@ -1,6 +1,6 @@ - + ]> @@ -52,14 +52,6 @@

Sites using FreeBSD