From owner-p4-projects@FreeBSD.ORG Sun Feb 3 02:04:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 15CAF16A421; Sun, 3 Feb 2008 02:04:24 +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 B52D816A417 for ; Sun, 3 Feb 2008 02:04:23 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A04D013C45A for ; Sun, 3 Feb 2008 02:04:23 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1324N81006912 for ; Sun, 3 Feb 2008 02:04:23 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1324Ae0006900 for perforce@freebsd.org; Sun, 3 Feb 2008 02:04:10 GMT (envelope-from marcel@freebsd.org) Date: Sun, 3 Feb 2008 02:04:10 GMT Message-Id: <200802030204.m1324Ae0006900@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 134688 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 02:04:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=134688 Change 134688 by marcel@marcel_xcllnt on 2008/02/03 02:03:47 IFC @134687 Affected files ... .. //depot/projects/usiii/Makefile#2 integrate .. //depot/projects/usiii/amd64/acpica/madt.c#2 integrate .. //depot/projects/usiii/amd64/amd64/dump_machdep.c#2 integrate .. //depot/projects/usiii/amd64/amd64/identcpu.c#3 integrate .. //depot/projects/usiii/amd64/amd64/machdep.c#3 integrate .. //depot/projects/usiii/amd64/amd64/minidump_machdep.c#2 integrate .. //depot/projects/usiii/amd64/amd64/mp_watchdog.c#2 integrate .. //depot/projects/usiii/amd64/amd64/pmap.c#3 integrate .. //depot/projects/usiii/amd64/conf/GENERIC#4 integrate .. //depot/projects/usiii/amd64/conf/NOTES#3 integrate .. //depot/projects/usiii/amd64/include/_types.h#2 integrate .. //depot/projects/usiii/amd64/include/float.h#2 integrate .. //depot/projects/usiii/amd64/include/ieeefp.h#2 integrate .. //depot/projects/usiii/amd64/include/pmap.h#2 integrate .. //depot/projects/usiii/amd64/include/proc.h#2 integrate .. //depot/projects/usiii/amd64/include/specialreg.h#3 integrate .. //depot/projects/usiii/amd64/include/vmparam.h#3 integrate .. //depot/projects/usiii/amd64/isa/clock.c#4 integrate .. //depot/projects/usiii/arm/arm/dump_machdep.c#2 integrate .. //depot/projects/usiii/arm/arm/pmap.c#4 integrate .. //depot/projects/usiii/arm/arm/support.S#3 integrate .. //depot/projects/usiii/arm/at91/at91.c#2 integrate .. //depot/projects/usiii/arm/at91/if_ate.c#3 integrate .. //depot/projects/usiii/arm/at91/kb920x_machdep.c#3 integrate .. //depot/projects/usiii/arm/at91/uart_dev_at91usart.c#2 integrate .. //depot/projects/usiii/arm/include/pmap.h#2 integrate .. //depot/projects/usiii/arm/include/vmparam.h#3 integrate .. //depot/projects/usiii/arm/xscale/ixp425/if_npe.c#3 integrate .. //depot/projects/usiii/boot/arm/at91/boot2/bwct_board.c#2 integrate .. //depot/projects/usiii/boot/arm/at91/libat91/spi_flash.c#2 integrate .. //depot/projects/usiii/boot/forth/loader.conf.5#2 integrate .. //depot/projects/usiii/boot/forth/support.4th#2 integrate .. //depot/projects/usiii/boot/powerpc/Makefile#2 integrate .. //depot/projects/usiii/boot/powerpc/loader/Makefile#2 delete .. //depot/projects/usiii/boot/powerpc/loader/conf.c#2 delete .. //depot/projects/usiii/boot/powerpc/loader/help.ofw#2 delete .. //depot/projects/usiii/boot/powerpc/loader/ldscript.powerpc#2 delete .. //depot/projects/usiii/boot/powerpc/loader/metadata.c#2 delete .. //depot/projects/usiii/boot/powerpc/loader/start.c#2 delete .. //depot/projects/usiii/boot/powerpc/loader/version#2 delete .. //depot/projects/usiii/boot/powerpc/ofw/Makefile#1 branch .. //depot/projects/usiii/boot/powerpc/ofw/conf.c#1 branch .. //depot/projects/usiii/boot/powerpc/ofw/help.ofw#1 branch .. //depot/projects/usiii/boot/powerpc/ofw/ldscript.powerpc#1 branch .. //depot/projects/usiii/boot/powerpc/ofw/metadata.c#1 branch .. //depot/projects/usiii/boot/powerpc/ofw/start.c#1 branch .. //depot/projects/usiii/boot/powerpc/ofw/version#1 branch .. //depot/projects/usiii/cam/cam_xpt.c#3 integrate .. //depot/projects/usiii/cam/scsi/scsi_da.c#2 integrate .. //depot/projects/usiii/cam/scsi/scsi_low.h#2 integrate .. //depot/projects/usiii/compat/freebsd32/freebsd32_misc.c#3 integrate .. //depot/projects/usiii/compat/freebsd32/freebsd32_proto.h#3 integrate .. //depot/projects/usiii/compat/freebsd32/freebsd32_syscall.h#3 integrate .. //depot/projects/usiii/compat/freebsd32/freebsd32_syscalls.c#3 integrate .. //depot/projects/usiii/compat/freebsd32/freebsd32_sysent.c#3 integrate .. //depot/projects/usiii/compat/freebsd32/syscalls.master#3 integrate .. //depot/projects/usiii/compat/linprocfs/linprocfs.c#3 integrate .. //depot/projects/usiii/compat/linux/linux_file.c#3 integrate .. //depot/projects/usiii/compat/linux/linux_getcwd.c#3 integrate .. //depot/projects/usiii/compat/linux/linux_misc.c#3 integrate .. //depot/projects/usiii/compat/linux/linux_stats.c#3 integrate .. //depot/projects/usiii/compat/ndis/kern_ndis.c#2 integrate .. //depot/projects/usiii/compat/ndis/subr_ndis.c#3 integrate .. //depot/projects/usiii/compat/ndis/subr_ntoskrnl.c#3 integrate .. //depot/projects/usiii/compat/opensolaris/kern/opensolaris_kmem.c#2 integrate .. //depot/projects/usiii/compat/opensolaris/kern/opensolaris_kobj.c#2 integrate .. //depot/projects/usiii/compat/opensolaris/kern/opensolaris_vfs.c#3 integrate .. //depot/projects/usiii/compat/opensolaris/sys/kmem.h#3 integrate .. //depot/projects/usiii/compat/opensolaris/sys/vnode.h#2 integrate .. //depot/projects/usiii/compat/pecoff/imgact_pecoff.c#3 integrate .. //depot/projects/usiii/compat/svr4/imgact_svr4.c#3 integrate .. //depot/projects/usiii/compat/svr4/svr4_fcntl.c#3 integrate .. //depot/projects/usiii/compat/svr4/svr4_misc.c#3 integrate .. //depot/projects/usiii/compat/svr4/svr4_stream.c#2 integrate .. //depot/projects/usiii/conf/NOTES#5 integrate .. //depot/projects/usiii/conf/files#4 integrate .. //depot/projects/usiii/conf/files.amd64#3 integrate .. //depot/projects/usiii/conf/files.i386#3 integrate .. //depot/projects/usiii/conf/files.powerpc#3 integrate .. //depot/projects/usiii/conf/kern.pre.mk#2 integrate .. //depot/projects/usiii/conf/options#4 integrate .. //depot/projects/usiii/conf/options.powerpc#2 integrate .. //depot/projects/usiii/contrib/dev/acpica/evgpe.c#2 integrate .. //depot/projects/usiii/contrib/opensolaris/uts/common/fs/gfs.c#2 integrate .. //depot/projects/usiii/contrib/opensolaris/uts/common/fs/zfs/arc.c#5 integrate .. //depot/projects/usiii/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c#2 integrate .. //depot/projects/usiii/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c#2 integrate .. //depot/projects/usiii/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#3 integrate .. //depot/projects/usiii/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#2 integrate .. //depot/projects/usiii/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c#3 integrate .. //depot/projects/usiii/crypto/rijndael/rijndael-api.c#2 integrate .. //depot/projects/usiii/crypto/rijndael/test00.c#2 integrate .. //depot/projects/usiii/ddb/db_capture.c#1 branch .. //depot/projects/usiii/ddb/db_command.c#2 integrate .. //depot/projects/usiii/ddb/db_command.h#2 integrate .. //depot/projects/usiii/ddb/db_input.c#2 integrate .. //depot/projects/usiii/ddb/db_lex.c#2 integrate .. //depot/projects/usiii/ddb/db_lex.h#2 integrate .. //depot/projects/usiii/ddb/db_main.c#2 integrate .. //depot/projects/usiii/ddb/db_output.c#2 integrate .. //depot/projects/usiii/ddb/db_script.c#1 branch .. //depot/projects/usiii/ddb/db_textdump.c#1 branch .. //depot/projects/usiii/ddb/ddb.h#2 integrate .. //depot/projects/usiii/dev/aac/aac.c#3 integrate .. //depot/projects/usiii/dev/acpica/Osd/OsdDebug.c#2 integrate .. //depot/projects/usiii/dev/acpica/Osd/OsdSchedule.c#2 integrate .. //depot/projects/usiii/dev/acpica/acpi.c#4 integrate .. //depot/projects/usiii/dev/acpica/acpi_hpet.c#3 integrate .. //depot/projects/usiii/dev/acpica/acpi_hpet.h#1 branch .. //depot/projects/usiii/dev/acpica/acpi_thermal.c#3 integrate .. //depot/projects/usiii/dev/amr/amr.c#3 integrate .. //depot/projects/usiii/dev/amr/amr_cam.c#3 integrate .. //depot/projects/usiii/dev/amr/amr_pci.c#3 integrate .. //depot/projects/usiii/dev/amr/amrreg.h#2 integrate .. //depot/projects/usiii/dev/amr/amrvar.h#2 integrate .. //depot/projects/usiii/dev/an/if_an.c#4 integrate .. //depot/projects/usiii/dev/an/if_an_pci.c#2 integrate .. //depot/projects/usiii/dev/an/if_anreg.h#3 integrate .. //depot/projects/usiii/dev/ata/ata-all.h#3 integrate .. //depot/projects/usiii/dev/ata/ata-chipset.c#4 integrate .. //depot/projects/usiii/dev/ata/ata-disk.c#3 integrate .. //depot/projects/usiii/dev/ata/ata-dma.c#3 integrate .. //depot/projects/usiii/dev/ata/ata-lowlevel.c#2 integrate .. //depot/projects/usiii/dev/ath/if_ath.c#4 integrate .. //depot/projects/usiii/dev/atkbdc/atkbd.c#2 integrate .. //depot/projects/usiii/dev/atkbdc/atkbd_atkbdc.c#2 integrate .. //depot/projects/usiii/dev/bfe/if_bfe.c#3 integrate .. //depot/projects/usiii/dev/bfe/if_bfereg.h#2 integrate .. //depot/projects/usiii/dev/bge/if_bge.c#5 integrate .. //depot/projects/usiii/dev/bge/if_bgereg.h#2 integrate .. //depot/projects/usiii/dev/ciss/ciss.c#3 integrate .. //depot/projects/usiii/dev/coretemp/coretemp.c#3 integrate .. //depot/projects/usiii/dev/cxgb/common/cxgb_t3_cpl.h#2 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_adapter.h#3 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_config.h#2 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_include.h#3 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_main.c#3 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_multiq.c#1 branch .. //depot/projects/usiii/dev/cxgb/cxgb_offload.c#2 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_offload.h#3 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_osdep.h#3 integrate .. //depot/projects/usiii/dev/cxgb/cxgb_sge.c#3 integrate .. //depot/projects/usiii/dev/cxgb/sys/cxgb_support.c#1 branch .. //depot/projects/usiii/dev/cxgb/sys/mbufq.h#2 integrate .. //depot/projects/usiii/dev/cxgb/sys/mvec.h#2 integrate .. //depot/projects/usiii/dev/cxgb/sys/uipc_mvec.c#2 integrate .. //depot/projects/usiii/dev/cxgb/t3cdev.h#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/toecore/cxgb_toedev.h#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/toecore/toedev.c#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/toecore/toedev.h#2 delete .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_cpl_io.c#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_defs.h#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_listen.c#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_t3_ddp.h#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_tcp.h#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_tcp_subr.c#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_tcp_usrreq.c#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_toepcb.h#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_tom.c#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_tom.h#1 branch .. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c#1 branch .. //depot/projects/usiii/dev/dcons/dcons_os.c#2 integrate .. //depot/projects/usiii/dev/drm/drm_drv.c#2 integrate .. //depot/projects/usiii/dev/ed/if_ed_pci.c#2 integrate .. //depot/projects/usiii/dev/ed/if_ed_rtl80x9.c#2 integrate .. //depot/projects/usiii/dev/fb/creator.c#2 integrate .. //depot/projects/usiii/dev/fb/fb.c#2 integrate .. //depot/projects/usiii/dev/fb/fbreg.h#2 integrate .. //depot/projects/usiii/dev/fb/machfb.c#2 integrate .. //depot/projects/usiii/dev/fb/splash_bmp.c#2 integrate .. //depot/projects/usiii/dev/fb/splash_pcx.c#2 integrate .. //depot/projects/usiii/dev/fb/vga.c#2 integrate .. //depot/projects/usiii/dev/fdc/fdc.c#3 integrate .. //depot/projects/usiii/dev/gem/if_gem.c#5 integrate .. //depot/projects/usiii/dev/gem/if_gem_pci.c#4 integrate .. //depot/projects/usiii/dev/gem/if_gemreg.h#4 integrate .. //depot/projects/usiii/dev/gem/if_gemvar.h#4 integrate .. //depot/projects/usiii/dev/hatm/if_hatm_intr.c#2 integrate .. //depot/projects/usiii/dev/hptrr/amd64-elf.hptrr_lib.o.uu#1 branch .. //depot/projects/usiii/dev/hptrr/array.h#1 branch .. //depot/projects/usiii/dev/hptrr/him.h#1 branch .. //depot/projects/usiii/dev/hptrr/himfuncs.h#1 branch .. //depot/projects/usiii/dev/hptrr/hptintf.h#1 branch .. //depot/projects/usiii/dev/hptrr/hptrr_config.c#1 branch .. //depot/projects/usiii/dev/hptrr/hptrr_config.h#1 branch .. //depot/projects/usiii/dev/hptrr/hptrr_os_bsd.c#1 branch .. //depot/projects/usiii/dev/hptrr/hptrr_osm_bsd.c#1 branch .. //depot/projects/usiii/dev/hptrr/i386-elf.hptrr_lib.o.uu#1 branch .. //depot/projects/usiii/dev/hptrr/ldm.h#1 branch .. //depot/projects/usiii/dev/hptrr/list.h#1 branch .. //depot/projects/usiii/dev/hptrr/os_bsd.h#1 branch .. //depot/projects/usiii/dev/hptrr/osm.h#1 branch .. //depot/projects/usiii/dev/hwpmc/hwpmc_mod.c#3 integrate .. //depot/projects/usiii/dev/ichwd/ichwd.c#3 integrate .. //depot/projects/usiii/dev/ichwd/ichwd.h#3 integrate .. //depot/projects/usiii/dev/if_ndis/if_ndis.c#3 integrate .. //depot/projects/usiii/dev/iir/iir.c#2 integrate .. //depot/projects/usiii/dev/iscsi/initiator/isc_soc.c#3 integrate .. //depot/projects/usiii/dev/kbd/kbd.c#2 integrate .. //depot/projects/usiii/dev/kbd/kbdreg.h#2 integrate .. //depot/projects/usiii/dev/kbdmux/kbdmux.c#2 integrate .. //depot/projects/usiii/dev/le/am7990.c#2 integrate .. //depot/projects/usiii/dev/le/am79900.c#2 integrate .. //depot/projects/usiii/dev/lge/if_lge.c#3 integrate .. //depot/projects/usiii/dev/md/md.c#3 integrate .. //depot/projects/usiii/dev/mfi/mfi.c#2 integrate .. //depot/projects/usiii/dev/mfi/mfi_pci.c#2 integrate .. //depot/projects/usiii/dev/mfi/mfireg.h#2 integrate .. //depot/projects/usiii/dev/mii/amphy.c#3 integrate .. //depot/projects/usiii/dev/mii/brgphy.c#2 integrate .. //depot/projects/usiii/dev/mii/miidevs#3 integrate .. //depot/projects/usiii/dev/mii/nsphy.c#3 integrate .. //depot/projects/usiii/dev/mii/nsphyter.c#1 branch .. //depot/projects/usiii/dev/mii/nsphyterreg.h#1 branch .. //depot/projects/usiii/dev/msk/if_msk.c#3 integrate .. //depot/projects/usiii/dev/mxge/eth_z8e.h#2 integrate .. //depot/projects/usiii/dev/mxge/ethp_z8e.h#2 integrate .. //depot/projects/usiii/dev/mxge/if_mxge.c#3 integrate .. //depot/projects/usiii/dev/mxge/if_mxge_var.h#3 integrate .. //depot/projects/usiii/dev/mxge/mxge_lro.c#2 integrate .. //depot/projects/usiii/dev/mxge/mxge_mcp.h#2 integrate .. //depot/projects/usiii/dev/mxge/mxge_rss_eth_z8e.c#1 branch .. //depot/projects/usiii/dev/mxge/mxge_rss_ethp_z8e.c#1 branch .. //depot/projects/usiii/dev/mxge/rss_eth_z8e.h#1 branch .. //depot/projects/usiii/dev/mxge/rss_ethp_z8e.h#1 branch .. //depot/projects/usiii/dev/nfe/if_nfe.c#4 integrate .. //depot/projects/usiii/dev/ofw/ofw_console.c#2 integrate .. //depot/projects/usiii/dev/ofw/openpromio.c#2 integrate .. //depot/projects/usiii/dev/patm/if_patm_rx.c#2 integrate .. //depot/projects/usiii/dev/pci/pci.c#5 integrate .. //depot/projects/usiii/dev/pci/pci_user.c#4 integrate .. //depot/projects/usiii/dev/powermac_nvram/powermac_nvram.c#2 integrate .. //depot/projects/usiii/dev/ppbus/ppbconf.c#2 integrate .. //depot/projects/usiii/dev/ppbus/ppbconf.h#2 integrate .. //depot/projects/usiii/dev/puc/pucdata.c#2 integrate .. //depot/projects/usiii/dev/re/if_re.c#3 integrate .. //depot/projects/usiii/dev/sf/if_sf.c#1 branch .. //depot/projects/usiii/dev/sf/if_sfreg.h#1 branch .. //depot/projects/usiii/dev/sf/starfire_rx.h#1 branch .. //depot/projects/usiii/dev/sf/starfire_tx.h#1 branch .. //depot/projects/usiii/dev/sio/sio.c#3 integrate .. //depot/projects/usiii/dev/sk/if_sk.c#3 integrate .. //depot/projects/usiii/dev/snp/snp.c#3 integrate .. //depot/projects/usiii/dev/sound/pci/hda/hdac.c#3 integrate .. //depot/projects/usiii/dev/sound/pci/ich.c#2 integrate .. //depot/projects/usiii/dev/sound/pci/maestro.c#2 integrate .. //depot/projects/usiii/dev/stge/if_stge.c#3 integrate .. //depot/projects/usiii/dev/stge/if_stgereg.h#2 integrate .. //depot/projects/usiii/dev/streams/streams.c#2 integrate .. //depot/projects/usiii/dev/syscons/blank/blank_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/daemon/daemon_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/dragon/dragon_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/fade/fade_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/fire/fire_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/green/green_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/logo/logo_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/rain/rain_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/scgfbrndr.c#2 integrate .. //depot/projects/usiii/dev/syscons/scvgarndr.c#2 integrate .. //depot/projects/usiii/dev/syscons/scvidctl.c#2 integrate .. //depot/projects/usiii/dev/syscons/snake/snake_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/star/star_saver.c#2 integrate .. //depot/projects/usiii/dev/syscons/syscons.c#3 integrate .. //depot/projects/usiii/dev/syscons/syscons.h#3 integrate .. //depot/projects/usiii/dev/syscons/warp/warp_saver.c#2 integrate .. //depot/projects/usiii/dev/ti/if_ti.c#3 integrate .. //depot/projects/usiii/dev/uart/uart_core.c#2 integrate .. //depot/projects/usiii/dev/uart/uart_cpu_powerpc.c#2 integrate .. //depot/projects/usiii/dev/usb/ehci.c#2 integrate .. //depot/projects/usiii/dev/usb/if_rum.c#5 integrate .. //depot/projects/usiii/dev/usb/if_udav.c#2 integrate .. //depot/projects/usiii/dev/usb/if_zyd.c#5 integrate .. //depot/projects/usiii/dev/usb/uark.c#2 integrate .. //depot/projects/usiii/dev/usb/uftdi.c#2 integrate .. //depot/projects/usiii/dev/usb/uftdireg.h#2 integrate .. //depot/projects/usiii/dev/usb/ukbd.c#3 integrate .. //depot/projects/usiii/dev/usb/umass.c#2 integrate .. //depot/projects/usiii/dev/usb/ums.c#2 integrate .. //depot/projects/usiii/dev/usb/uplcom.c#2 integrate .. //depot/projects/usiii/dev/usb/usbdevs#4 integrate .. //depot/projects/usiii/dev/vkbd/vkbd.c#2 integrate .. //depot/projects/usiii/dev/wpi/if_wpi.c#2 integrate .. //depot/projects/usiii/fs/cd9660/cd9660_lookup.c#2 integrate .. //depot/projects/usiii/fs/cd9660/cd9660_vfsops.c#3 integrate .. //depot/projects/usiii/fs/coda/cnode.h#2 integrate .. //depot/projects/usiii/fs/coda/coda_namecache.h#2 integrate .. //depot/projects/usiii/fs/coda/coda_psdev.c#2 integrate .. //depot/projects/usiii/fs/coda/coda_vfsops.c#3 integrate .. //depot/projects/usiii/fs/coda/coda_vnops.c#2 integrate .. //depot/projects/usiii/fs/devfs/devfs_devs.c#3 integrate .. //depot/projects/usiii/fs/devfs/devfs_vfsops.c#2 integrate .. //depot/projects/usiii/fs/devfs/devfs_vnops.c#3 integrate .. //depot/projects/usiii/fs/fdescfs/fdesc_vfsops.c#3 integrate .. //depot/projects/usiii/fs/fdescfs/fdesc_vnops.c#2 integrate .. //depot/projects/usiii/fs/fifofs/fifo_vnops.c#2 integrate .. //depot/projects/usiii/fs/hpfs/hpfs_subr.h#2 integrate .. //depot/projects/usiii/fs/hpfs/hpfs_vfsops.c#3 integrate .. //depot/projects/usiii/fs/hpfs/hpfs_vnops.c#2 integrate .. //depot/projects/usiii/fs/msdosfs/msdosfs_denode.c#3 integrate .. //depot/projects/usiii/fs/msdosfs/msdosfs_lookup.c#4 integrate .. //depot/projects/usiii/fs/msdosfs/msdosfs_vfsops.c#3 integrate .. //depot/projects/usiii/fs/msdosfs/msdosfs_vnops.c#4 integrate .. //depot/projects/usiii/fs/ntfs/ntfs_subr.c#2 integrate .. //depot/projects/usiii/fs/ntfs/ntfs_vfsops.c#4 integrate .. //depot/projects/usiii/fs/ntfs/ntfs_vnops.c#2 integrate .. //depot/projects/usiii/fs/nullfs/null_subr.c#3 integrate .. //depot/projects/usiii/fs/nullfs/null_vfsops.c#3 integrate .. //depot/projects/usiii/fs/nullfs/null_vnops.c#3 integrate .. //depot/projects/usiii/fs/nwfs/nwfs_node.c#2 integrate .. //depot/projects/usiii/fs/nwfs/nwfs_vfsops.c#3 integrate .. //depot/projects/usiii/fs/nwfs/nwfs_vnops.c#2 integrate .. //depot/projects/usiii/fs/portalfs/portal_vfsops.c#3 integrate .. //depot/projects/usiii/fs/portalfs/portal_vnops.c#2 integrate .. //depot/projects/usiii/fs/procfs/procfs.c#2 integrate .. //depot/projects/usiii/fs/procfs/procfs_map.c#2 integrate .. //depot/projects/usiii/fs/pseudofs/pseudofs_vncache.c#2 integrate .. //depot/projects/usiii/fs/pseudofs/pseudofs_vnops.c#3 integrate .. //depot/projects/usiii/fs/smbfs/smbfs_io.c#2 integrate .. //depot/projects/usiii/fs/smbfs/smbfs_node.c#2 integrate .. //depot/projects/usiii/fs/smbfs/smbfs_vfsops.c#3 integrate .. //depot/projects/usiii/fs/smbfs/smbfs_vnops.c#2 integrate .. //depot/projects/usiii/fs/tmpfs/tmpfs_subr.c#3 integrate .. //depot/projects/usiii/fs/tmpfs/tmpfs_vfsops.c#3 integrate .. //depot/projects/usiii/fs/tmpfs/tmpfs_vnops.c#3 integrate .. //depot/projects/usiii/fs/udf/udf_vfsops.c#3 integrate .. //depot/projects/usiii/fs/udf/udf_vnops.c#2 integrate .. //depot/projects/usiii/fs/unionfs/union_subr.c#3 integrate .. //depot/projects/usiii/fs/unionfs/union_vfsops.c#3 integrate .. //depot/projects/usiii/fs/unionfs/union_vnops.c#3 integrate .. //depot/projects/usiii/geom/geom_dev.c#2 integrate .. //depot/projects/usiii/geom/geom_io.c#3 integrate .. //depot/projects/usiii/geom/part/g_part_bsd.c#2 integrate .. //depot/projects/usiii/gnu/fs/ext2fs/ext2_lookup.c#2 integrate .. //depot/projects/usiii/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/usiii/gnu/fs/ext2fs/ext2_vnops.c#2 integrate .. //depot/projects/usiii/gnu/fs/ext2fs/fs.h#2 integrate .. //depot/projects/usiii/gnu/fs/reiserfs/reiserfs_inode.c#2 integrate .. //depot/projects/usiii/gnu/fs/reiserfs/reiserfs_namei.c#2 integrate .. //depot/projects/usiii/gnu/fs/reiserfs/reiserfs_vfsops.c#3 integrate .. //depot/projects/usiii/gnu/fs/xfs/FreeBSD/xfs_buf.c#2 integrate .. //depot/projects/usiii/gnu/fs/xfs/FreeBSD/xfs_buf.h#2 integrate .. //depot/projects/usiii/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c#2 integrate .. //depot/projects/usiii/gnu/fs/xfs/FreeBSD/xfs_mountops.c#2 integrate .. //depot/projects/usiii/gnu/fs/xfs/FreeBSD/xfs_super.c#2 integrate .. //depot/projects/usiii/gnu/fs/xfs/FreeBSD/xfs_vnode.c#2 integrate .. //depot/projects/usiii/gnu/fs/xfs/FreeBSD/xfs_vnops.c#2 integrate .. //depot/projects/usiii/i386/acpica/madt.c#3 integrate .. //depot/projects/usiii/i386/conf/GENERIC#4 integrate .. //depot/projects/usiii/i386/conf/GENERIC.hints#3 integrate .. //depot/projects/usiii/i386/conf/NOTES#3 integrate .. //depot/projects/usiii/i386/conf/PAE#3 integrate .. //depot/projects/usiii/i386/i386/dump_machdep.c#2 integrate .. //depot/projects/usiii/i386/i386/machdep.c#3 integrate .. //depot/projects/usiii/i386/i386/minidump_machdep.c#2 integrate .. //depot/projects/usiii/i386/i386/mp_watchdog.c#2 integrate .. //depot/projects/usiii/i386/i386/pmap.c#3 integrate .. //depot/projects/usiii/i386/ibcs2/ibcs2_misc.c#3 integrate .. //depot/projects/usiii/i386/ibcs2/imgact_coff.c#3 integrate .. //depot/projects/usiii/i386/include/ieeefp.h#2 integrate .. //depot/projects/usiii/i386/include/pmap.h#3 integrate .. //depot/projects/usiii/i386/include/proc.h#2 integrate .. //depot/projects/usiii/i386/include/vmparam.h#3 integrate .. //depot/projects/usiii/i386/isa/clock.c#3 integrate .. //depot/projects/usiii/i386/linux/imgact_linux.c#3 integrate .. //depot/projects/usiii/i386/pci/pci_pir.c#2 integrate .. //depot/projects/usiii/i386/xbox/xboxfb.c#2 integrate .. //depot/projects/usiii/ia64/conf/GENERIC#4 integrate .. //depot/projects/usiii/ia64/ia64/dump_machdep.c#2 integrate .. //depot/projects/usiii/ia64/ia64/machdep.c#3 integrate .. //depot/projects/usiii/ia64/ia64/pmap.c#3 integrate .. //depot/projects/usiii/ia64/include/vmparam.h#3 integrate .. //depot/projects/usiii/isa/vga_isa.c#2 integrate .. //depot/projects/usiii/kern/Makefile#2 integrate .. //depot/projects/usiii/kern/genassym.sh#2 integrate .. //depot/projects/usiii/kern/imgact_aout.c#3 integrate .. //depot/projects/usiii/kern/imgact_elf.c#3 integrate .. //depot/projects/usiii/kern/imgact_gzip.c#3 integrate .. //depot/projects/usiii/kern/init_main.c#4 integrate .. //depot/projects/usiii/kern/init_sysent.c#2 integrate .. //depot/projects/usiii/kern/kern_acct.c#4 integrate .. //depot/projects/usiii/kern/kern_alq.c#3 integrate .. //depot/projects/usiii/kern/kern_clock.c#4 integrate .. //depot/projects/usiii/kern/kern_cpu.c#3 integrate .. //depot/projects/usiii/kern/kern_descrip.c#3 integrate .. //depot/projects/usiii/kern/kern_event.c#2 integrate .. //depot/projects/usiii/kern/kern_exec.c#4 integrate .. //depot/projects/usiii/kern/kern_exit.c#3 integrate .. //depot/projects/usiii/kern/kern_jail.c#3 integrate .. //depot/projects/usiii/kern/kern_ktrace.c#4 integrate .. //depot/projects/usiii/kern/kern_linker.c#3 integrate .. //depot/projects/usiii/kern/kern_lock.c#3 integrate .. //depot/projects/usiii/kern/kern_mbuf.c#3 integrate .. //depot/projects/usiii/kern/kern_mib.c#3 integrate .. //depot/projects/usiii/kern/kern_mutex.c#3 integrate .. //depot/projects/usiii/kern/kern_proc.c#4 integrate .. //depot/projects/usiii/kern/kern_resource.c#2 integrate .. //depot/projects/usiii/kern/kern_rwlock.c#3 integrate .. //depot/projects/usiii/kern/kern_shutdown.c#3 integrate .. //depot/projects/usiii/kern/kern_sig.c#3 integrate .. //depot/projects/usiii/kern/kern_sx.c#3 integrate .. //depot/projects/usiii/kern/kern_synch.c#4 integrate .. //depot/projects/usiii/kern/kern_tc.c#2 integrate .. //depot/projects/usiii/kern/kern_thread.c#4 integrate .. //depot/projects/usiii/kern/kern_time.c#2 integrate .. //depot/projects/usiii/kern/kern_umtx.c#3 integrate .. //depot/projects/usiii/kern/link_elf.c#3 integrate .. //depot/projects/usiii/kern/link_elf_obj.c#3 integrate .. //depot/projects/usiii/kern/sched_4bsd.c#4 integrate .. //depot/projects/usiii/kern/sched_ule.c#5 integrate .. //depot/projects/usiii/kern/subr_bus.c#3 integrate .. //depot/projects/usiii/kern/subr_kdb.c#3 integrate .. //depot/projects/usiii/kern/subr_lock.c#4 integrate .. //depot/projects/usiii/kern/subr_sleepqueue.c#4 integrate .. //depot/projects/usiii/kern/subr_smp.c#4 integrate .. //depot/projects/usiii/kern/subr_witness.c#4 integrate .. //depot/projects/usiii/kern/sys_generic.c#3 integrate .. //depot/projects/usiii/kern/sys_pipe.c#3 integrate .. //depot/projects/usiii/kern/sys_socket.c#3 integrate .. //depot/projects/usiii/kern/syscalls.c#2 integrate .. //depot/projects/usiii/kern/syscalls.master#3 integrate .. //depot/projects/usiii/kern/systrace_args.c#2 integrate .. //depot/projects/usiii/kern/tty.c#2 integrate .. //depot/projects/usiii/kern/tty_cons.c#2 integrate .. //depot/projects/usiii/kern/tty_pty.c#3 integrate .. //depot/projects/usiii/kern/uipc_cow.c#2 integrate .. //depot/projects/usiii/kern/uipc_debug.c#2 integrate .. //depot/projects/usiii/kern/uipc_mbuf.c#3 integrate .. //depot/projects/usiii/kern/uipc_mqueue.c#2 integrate .. //depot/projects/usiii/kern/uipc_sem.c#3 integrate .. //depot/projects/usiii/kern/uipc_shm.c#1 branch .. //depot/projects/usiii/kern/uipc_sockbuf.c#3 integrate .. //depot/projects/usiii/kern/uipc_socket.c#3 integrate .. //depot/projects/usiii/kern/uipc_syscalls.c#3 integrate .. //depot/projects/usiii/kern/uipc_usrreq.c#3 integrate .. //depot/projects/usiii/kern/vfs_acl.c#3 integrate .. //depot/projects/usiii/kern/vfs_aio.c#3 integrate .. //depot/projects/usiii/kern/vfs_bio.c#4 integrate .. //depot/projects/usiii/kern/vfs_cache.c#4 integrate .. //depot/projects/usiii/kern/vfs_default.c#2 integrate .. //depot/projects/usiii/kern/vfs_extattr.c#3 integrate .. //depot/projects/usiii/kern/vfs_lookup.c#4 integrate .. //depot/projects/usiii/kern/vfs_mount.c#4 integrate .. //depot/projects/usiii/kern/vfs_subr.c#4 integrate .. //depot/projects/usiii/kern/vfs_syscalls.c#4 integrate .. //depot/projects/usiii/kern/vfs_vnops.c#3 integrate .. //depot/projects/usiii/kern/vnode_if.src#2 integrate .. //depot/projects/usiii/modules/Makefile#5 integrate .. //depot/projects/usiii/modules/cxgb/Makefile#3 integrate .. //depot/projects/usiii/modules/cxgb/cxgb/Makefile#1 branch .. //depot/projects/usiii/modules/cxgb/toecore/Makefile#1 branch .. //depot/projects/usiii/modules/cxgb/tom/Makefile#1 branch .. //depot/projects/usiii/modules/hptrr/Makefile#1 branch .. //depot/projects/usiii/modules/mii/Makefile#2 integrate .. //depot/projects/usiii/modules/mxge/Makefile#2 integrate .. //depot/projects/usiii/modules/mxge/mxge_rss_eth_z8e/Makefile#1 branch .. //depot/projects/usiii/modules/mxge/mxge_rss_ethp_z8e/Makefile#1 branch .. //depot/projects/usiii/modules/sf/Makefile#2 integrate .. //depot/projects/usiii/net/bpf.c#4 integrate .. //depot/projects/usiii/net/bpf.h#3 integrate .. //depot/projects/usiii/net/bpf_filter.c#3 integrate .. //depot/projects/usiii/net/ieee8023ad_lacp.c#3 integrate .. //depot/projects/usiii/net/ieee8023ad_lacp.h#2 integrate .. //depot/projects/usiii/net/if.h#2 integrate .. //depot/projects/usiii/net/if_bridge.c#4 integrate .. //depot/projects/usiii/net/if_enc.c#3 integrate .. //depot/projects/usiii/net/if_lagg.c#4 integrate .. //depot/projects/usiii/net/netisr.h#2 integrate .. //depot/projects/usiii/net/route.c#3 integrate .. //depot/projects/usiii/net/route.h#2 integrate .. //depot/projects/usiii/net80211/ieee80211_ht.c#5 integrate .. //depot/projects/usiii/net80211/ieee80211_ht.h#4 integrate .. //depot/projects/usiii/net80211/ieee80211_radiotap.h#2 integrate .. //depot/projects/usiii/netgraph/netflow/netflow.c#2 integrate .. //depot/projects/usiii/netgraph/netflow/ng_netflow.c#2 integrate .. //depot/projects/usiii/netgraph/netgraph.h#3 integrate .. //depot/projects/usiii/netgraph/ng_base.c#3 integrate .. //depot/projects/usiii/netgraph/ng_bpf.c#2 integrate .. //depot/projects/usiii/netgraph/ng_car.c#2 integrate .. //depot/projects/usiii/netgraph/ng_car.h#2 integrate .. //depot/projects/usiii/netgraph/ng_iface.c#2 integrate .. //depot/projects/usiii/netgraph/ng_l2tp.c#3 integrate .. //depot/projects/usiii/netgraph/ng_ppp.c#3 integrate .. //depot/projects/usiii/netgraph/ng_pppoe.c#4 integrate .. //depot/projects/usiii/netgraph/ng_pppoe.h#2 integrate .. //depot/projects/usiii/netgraph/ng_pred1.c#2 integrate .. //depot/projects/usiii/netgraph/ng_socket.c#3 integrate .. //depot/projects/usiii/netinet/if_ether.c#3 integrate .. //depot/projects/usiii/netinet/if_ether.h#2 integrate .. //depot/projects/usiii/netinet/in.c#3 integrate .. //depot/projects/usiii/netinet/in_pcb.c#3 integrate .. //depot/projects/usiii/netinet/ip_dummynet.c#3 integrate .. //depot/projects/usiii/netinet/ip_fw.h#2 integrate .. //depot/projects/usiii/netinet/ip_fw2.c#5 integrate .. //depot/projects/usiii/netinet/ip_options.c#3 integrate .. //depot/projects/usiii/netinet/ip_output.c#3 integrate .. //depot/projects/usiii/netinet/sctp_auth.c#3 integrate .. //depot/projects/usiii/netinet/sctp_bsd_addr.c#4 integrate .. //depot/projects/usiii/netinet/sctp_indata.c#4 integrate .. //depot/projects/usiii/netinet/sctp_input.c#4 integrate .. //depot/projects/usiii/netinet/sctp_pcb.c#4 integrate .. //depot/projects/usiii/netinet/sctp_peeloff.c#3 integrate .. //depot/projects/usiii/netinet/sctputil.c#4 integrate .. //depot/projects/usiii/netinet/tcp.h#2 integrate .. //depot/projects/usiii/netinet/tcp_offload.c#1 branch .. //depot/projects/usiii/netinet/tcp_offload.h#1 branch .. //depot/projects/usiii/netinet/tcp_subr.c#5 integrate .. //depot/projects/usiii/netinet/tcp_syncache.c#3 integrate .. //depot/projects/usiii/netinet/tcp_syncache.h#2 integrate .. //depot/projects/usiii/netinet/tcp_usrreq.c#5 integrate .. //depot/projects/usiii/netinet/tcp_var.h#5 integrate .. //depot/projects/usiii/netinet/toedev.h#1 branch .. //depot/projects/usiii/netinet6/dest6.c#2 integrate .. //depot/projects/usiii/netinet6/frag6.c#2 integrate .. //depot/projects/usiii/netinet6/icmp6.c#2 integrate .. //depot/projects/usiii/netinet6/in6.c#3 integrate .. //depot/projects/usiii/netinet6/in6.h#2 integrate .. //depot/projects/usiii/netinet6/in6_cksum.c#2 integrate .. //depot/projects/usiii/netinet6/in6_gif.c#2 integrate .. //depot/projects/usiii/netinet6/in6_gif.h#2 integrate .. //depot/projects/usiii/netinet6/in6_ifattach.c#2 integrate .. //depot/projects/usiii/netinet6/in6_ifattach.h#2 integrate .. //depot/projects/usiii/netinet6/in6_pcb.c#2 integrate .. //depot/projects/usiii/netinet6/in6_pcb.h#2 integrate .. //depot/projects/usiii/netinet6/in6_proto.c#2 integrate .. //depot/projects/usiii/netinet6/in6_rmx.c#2 integrate .. //depot/projects/usiii/netinet6/in6_src.c#2 integrate .. //depot/projects/usiii/netinet6/in6_var.h#2 integrate .. //depot/projects/usiii/netinet6/ip6_ecn.h#2 integrate .. //depot/projects/usiii/netinet6/ip6_forward.c#2 integrate .. //depot/projects/usiii/netinet6/ip6_id.c#2 integrate .. //depot/projects/usiii/netinet6/ip6_input.c#2 integrate .. //depot/projects/usiii/netinet6/ip6_ipsec.c#2 integrate .. //depot/projects/usiii/netinet6/ip6_ipsec.h#2 integrate .. //depot/projects/usiii/netinet6/ip6_mroute.c#2 integrate .. //depot/projects/usiii/netinet6/ip6_mroute.h#2 integrate .. //depot/projects/usiii/netinet6/ip6_output.c#3 integrate .. //depot/projects/usiii/netinet6/ip6_var.h#2 integrate .. //depot/projects/usiii/netinet6/ip6protosw.h#2 integrate .. //depot/projects/usiii/netinet6/mld6.c#2 integrate .. //depot/projects/usiii/netinet6/mld6_var.h#2 integrate .. //depot/projects/usiii/netinet6/nd6.c#3 integrate .. //depot/projects/usiii/netinet6/nd6.h#2 integrate .. //depot/projects/usiii/netinet6/nd6_nbr.c#2 integrate .. //depot/projects/usiii/netinet6/nd6_rtr.c#2 integrate .. //depot/projects/usiii/netinet6/pim6.h#2 integrate .. //depot/projects/usiii/netinet6/pim6_var.h#2 integrate .. //depot/projects/usiii/netinet6/raw_ip6.c#2 integrate .. //depot/projects/usiii/netinet6/raw_ip6.h#2 integrate .. //depot/projects/usiii/netinet6/route6.c#2 integrate .. //depot/projects/usiii/netinet6/scope6.c#2 integrate .. //depot/projects/usiii/netinet6/scope6_var.h#2 integrate .. //depot/projects/usiii/netinet6/sctp6_usrreq.c#3 integrate .. //depot/projects/usiii/netinet6/sctp6_var.h#3 integrate .. //depot/projects/usiii/netinet6/tcp6_var.h#2 integrate .. //depot/projects/usiii/netinet6/udp6_usrreq.c#4 integrate .. //depot/projects/usiii/netinet6/udp6_var.h#2 integrate .. //depot/projects/usiii/netipsec/ipsec.c#3 integrate .. //depot/projects/usiii/netipsec/ipsec.h#3 integrate .. //depot/projects/usiii/netipsec/ipsec6.h#2 integrate .. //depot/projects/usiii/netncp/ncp_conn.c#2 integrate .. //depot/projects/usiii/netncp/ncp_rq.c#2 integrate .. //depot/projects/usiii/netncp/ncp_sock.c#2 integrate .. //depot/projects/usiii/netncp/ncp_sock.h#2 integrate .. //depot/projects/usiii/netsmb/smb_conn.c#2 integrate .. //depot/projects/usiii/netsmb/smb_trantcp.c#2 integrate .. //depot/projects/usiii/nfs4client/nfs4_idmap.c#2 integrate .. //depot/projects/usiii/nfs4client/nfs4_vfsops.c#3 integrate .. //depot/projects/usiii/nfs4client/nfs4_vnops.c#2 integrate .. //depot/projects/usiii/nfsclient/nfs_node.c#2 integrate .. //depot/projects/usiii/nfsclient/nfs_socket.c#3 integrate .. //depot/projects/usiii/nfsclient/nfs_subs.c#3 integrate .. //depot/projects/usiii/nfsclient/nfs_vfsops.c#3 integrate .. //depot/projects/usiii/nfsclient/nfs_vnops.c#3 integrate .. //depot/projects/usiii/nfsserver/nfs_serv.c#3 integrate .. //depot/projects/usiii/nfsserver/nfs_srvsubs.c#3 integrate .. //depot/projects/usiii/opencrypto/cryptodev.c#3 integrate .. //depot/projects/usiii/pc98/cbus/gdc.c#2 integrate .. //depot/projects/usiii/pc98/cbus/pckbd.c#2 integrate .. //depot/projects/usiii/pc98/cbus/scgdcrndr.c#2 integrate .. //depot/projects/usiii/pc98/cbus/sio.c#3 integrate .. //depot/projects/usiii/pc98/conf/GENERIC#4 integrate .. //depot/projects/usiii/pc98/pc98/machdep.c#3 integrate .. //depot/projects/usiii/pci/amdsmb.c#2 integrate .. //depot/projects/usiii/pci/if_rlreg.h#3 integrate .. //depot/projects/usiii/pci/if_sf.c#3 delete .. //depot/projects/usiii/pci/if_sfreg.h#2 delete .. //depot/projects/usiii/pci/if_wb.c#3 integrate .. //depot/projects/usiii/pci/nfsmb.c#3 integrate .. //depot/projects/usiii/powerpc/aim/clock.c#1 branch .. //depot/projects/usiii/powerpc/aim/copyinout.c#1 branch .. //depot/projects/usiii/powerpc/aim/interrupt.c#1 branch .. //depot/projects/usiii/powerpc/aim/locore.S#1 branch .. //depot/projects/usiii/powerpc/aim/machdep.c#1 branch .. //depot/projects/usiii/powerpc/aim/mmu_oea.c#1 branch .. //depot/projects/usiii/powerpc/aim/nexus.c#1 branch .. //depot/projects/usiii/powerpc/aim/ofw_machdep.c#1 branch .. //depot/projects/usiii/powerpc/aim/ofwmagic.S#1 branch .. //depot/projects/usiii/powerpc/aim/swtch.S#1 branch .. //depot/projects/usiii/powerpc/aim/trap.c#1 branch .. //depot/projects/usiii/powerpc/aim/trap_subr.S#1 branch .. //depot/projects/usiii/powerpc/aim/uio_machdep.c#1 branch .. //depot/projects/usiii/powerpc/aim/uma_machdep.c#1 branch .. //depot/projects/usiii/powerpc/aim/vm_machdep.c#1 branch .. //depot/projects/usiii/powerpc/conf/GENERIC#4 integrate .. //depot/projects/usiii/powerpc/conf/NOTES#4 integrate .. //depot/projects/usiii/powerpc/include/_bus.h#2 integrate .. //depot/projects/usiii/powerpc/include/bus.h#2 integrate .. //depot/projects/usiii/powerpc/include/fpu.h#2 integrate .. //depot/projects/usiii/powerpc/include/vmparam.h#3 integrate .. //depot/projects/usiii/powerpc/powermac/ata_kauai.c#2 integrate .. //depot/projects/usiii/powerpc/powermac/grackle.c#3 integrate .. //depot/projects/usiii/powerpc/powermac/macio.c#2 integrate .. //depot/projects/usiii/powerpc/powermac/pswitch.c#2 integrate .. //depot/projects/usiii/powerpc/powermac/uninorth.c#3 integrate .. //depot/projects/usiii/powerpc/powerpc/bus_machdep.c#1 branch .. //depot/projects/usiii/powerpc/powerpc/clock.c#3 delete .. //depot/projects/usiii/powerpc/powerpc/copyinout.c#2 delete .. //depot/projects/usiii/powerpc/powerpc/db_memrw.c#2 delete .. //depot/projects/usiii/powerpc/powerpc/interrupt.c#2 delete .. //depot/projects/usiii/powerpc/powerpc/locore.S#2 delete .. //depot/projects/usiii/powerpc/powerpc/machdep.c#3 delete .. //depot/projects/usiii/powerpc/powerpc/mmu_oea.c#3 delete .. //depot/projects/usiii/powerpc/powerpc/nexus.c#2 delete .. //depot/projects/usiii/powerpc/powerpc/ofw_machdep.c#2 delete .. //depot/projects/usiii/powerpc/powerpc/ofwmagic.S#2 delete .. //depot/projects/usiii/powerpc/powerpc/pmap_dispatch.c#3 integrate .. //depot/projects/usiii/powerpc/powerpc/swtch.S#3 delete .. //depot/projects/usiii/powerpc/powerpc/trap.c#3 delete .. //depot/projects/usiii/powerpc/powerpc/trap_subr.S#2 delete .. //depot/projects/usiii/powerpc/powerpc/uio_machdep.c#2 delete .. //depot/projects/usiii/powerpc/powerpc/uma_machdep.c#3 delete .. //depot/projects/usiii/powerpc/powerpc/vm_machdep.c#3 delete .. //depot/projects/usiii/powerpc/psim/iobus.c#2 integrate .. //depot/projects/usiii/security/audit/audit.c#3 integrate .. //depot/projects/usiii/security/audit/audit_arg.c#2 integrate .. //depot/projects/usiii/security/audit/audit_bsm.c#3 integrate .. //depot/projects/usiii/security/audit/audit_bsm_klib.c#3 integrate .. //depot/projects/usiii/security/audit/audit_pipe.c#3 integrate .. //depot/projects/usiii/security/audit/audit_syscalls.c#3 integrate .. //depot/projects/usiii/security/audit/audit_worker.c#3 integrate .. //depot/projects/usiii/security/mac/mac_framework.h#4 integrate .. //depot/projects/usiii/security/mac/mac_policy.h#4 integrate .. //depot/projects/usiii/security/mac/mac_posix_sem.c#3 integrate .. //depot/projects/usiii/security/mac/mac_posix_shm.c#1 branch .. //depot/projects/usiii/security/mac/mac_process.c#3 integrate .. //depot/projects/usiii/security/mac/mac_syscalls.c#3 integrate .. //depot/projects/usiii/security/mac_mls/mac_mls.c#4 integrate .. //depot/projects/usiii/security/mac_stub/mac_stub.c#4 integrate .. //depot/projects/usiii/security/mac_test/mac_test.c#4 integrate .. //depot/projects/usiii/sparc64/conf/GENERIC#4 integrate .. //depot/projects/usiii/sparc64/include/vmparam.h#3 integrate .. //depot/projects/usiii/sparc64/pci/psycho.c#6 integrate .. //depot/projects/usiii/sparc64/sparc64/dump_machdep.c#2 integrate .. //depot/projects/usiii/sparc64/sparc64/machdep.c#3 integrate .. //depot/projects/usiii/sparc64/sparc64/pmap.c#3 integrate .. //depot/projects/usiii/sparc64/sparc64/trap.c#2 integrate .. //depot/projects/usiii/sparc64/sparc64/tsb.c#2 integrate .. //depot/projects/usiii/sun4v/include/vmparam.h#3 integrate .. //depot/projects/usiii/sun4v/sun4v/dump_machdep.c#2 integrate .. //depot/projects/usiii/sun4v/sun4v/hvcons.c#2 integrate .. //depot/projects/usiii/sun4v/sun4v/machdep.c#3 integrate .. //depot/projects/usiii/sun4v/sun4v/pmap.c#3 integrate .. //depot/projects/usiii/sun4v/sun4v/trap.c#3 integrate .. //depot/projects/usiii/sys/_lock.h#2 integrate .. //depot/projects/usiii/sys/ata.h#3 integrate .. //depot/projects/usiii/sys/buf.h#2 integrate .. //depot/projects/usiii/sys/bus.h#2 integrate .. //depot/projects/usiii/sys/conf.h#2 integrate .. //depot/projects/usiii/sys/copyright.h#2 integrate .. //depot/projects/usiii/sys/event.h#2 integrate .. //depot/projects/usiii/sys/fcntl.h#2 integrate .. //depot/projects/usiii/sys/file.h#2 integrate .. //depot/projects/usiii/sys/kdb.h#2 integrate .. //depot/projects/usiii/sys/kernel.h#3 integrate .. //depot/projects/usiii/sys/kerneldump.h#2 integrate .. //depot/projects/usiii/sys/lock_profile.h#3 integrate .. //depot/projects/usiii/sys/lockmgr.h#3 integrate .. //depot/projects/usiii/sys/mbuf.h#3 integrate .. //depot/projects/usiii/sys/mman.h#2 integrate .. //depot/projects/usiii/sys/param.h#4 integrate .. //depot/projects/usiii/sys/pcpu.h#3 integrate .. //depot/projects/usiii/sys/pmc.h#3 integrate .. //depot/projects/usiii/sys/priv.h#3 integrate .. //depot/projects/usiii/sys/proc.h#4 integrate .. //depot/projects/usiii/sys/selinfo.h#2 integrate .. //depot/projects/usiii/sys/signal.h#3 integrate .. //depot/projects/usiii/sys/socket.h#3 integrate .. //depot/projects/usiii/sys/socketvar.h#2 integrate .. //depot/projects/usiii/sys/sx.h#2 integrate .. //depot/projects/usiii/sys/syscall.h#2 integrate .. //depot/projects/usiii/sys/syscall.mk#2 integrate .. //depot/projects/usiii/sys/syscallsubr.h#2 integrate .. //depot/projects/usiii/sys/sysctl.h#3 integrate .. //depot/projects/usiii/sys/sysproto.h#2 integrate .. //depot/projects/usiii/sys/systm.h#3 integrate .. //depot/projects/usiii/sys/time.h#3 integrate .. //depot/projects/usiii/sys/tree.h#2 integrate .. //depot/projects/usiii/sys/tty.h#2 integrate .. //depot/projects/usiii/sys/unpcb.h#2 integrate .. //depot/projects/usiii/sys/user.h#4 integrate .. //depot/projects/usiii/sys/vnode.h#3 integrate .. //depot/projects/usiii/ufs/ffs/ffs_balloc.c#3 integrate .. //depot/projects/usiii/ufs/ffs/ffs_rawread.c#2 integrate .. //depot/projects/usiii/ufs/ffs/ffs_snapshot.c#3 integrate .. //depot/projects/usiii/ufs/ffs/ffs_softdep.c#3 integrate .. //depot/projects/usiii/ufs/ffs/ffs_vfsops.c#3 integrate .. //depot/projects/usiii/ufs/ffs/ffs_vnops.c#3 integrate .. //depot/projects/usiii/ufs/ufs/ufs_extattr.c#2 integrate .. //depot/projects/usiii/ufs/ufs/ufs_lookup.c#3 integrate .. //depot/projects/usiii/ufs/ufs/ufs_quota.c#2 integrate .. //depot/projects/usiii/ufs/ufs/ufs_vnops.c#3 integrate .. //depot/projects/usiii/vm/pmap.h#3 integrate .. //depot/projects/usiii/vm/swap_pager.c#3 integrate .. //depot/projects/usiii/vm/vm.h#2 integrate .. //depot/projects/usiii/vm/vm_contig.c#4 integrate .. //depot/projects/usiii/vm/vm_fault.c#4 integrate .. //depot/projects/usiii/vm/vm_kern.c#3 integrate .. //depot/projects/usiii/vm/vm_map.c#4 integrate .. //depot/projects/usiii/vm/vm_mmap.c#3 integrate .. //depot/projects/usiii/vm/vm_object.c#5 integrate .. //depot/projects/usiii/vm/vm_object.h#3 integrate .. //depot/projects/usiii/vm/vm_page.c#5 integrate .. //depot/projects/usiii/vm/vm_phys.c#3 integrate .. //depot/projects/usiii/vm/vm_phys.h#3 integrate .. //depot/projects/usiii/vm/vm_reserv.c#1 branch .. //depot/projects/usiii/vm/vm_reserv.h#1 branch .. //depot/projects/usiii/vm/vnode_pager.c#3 integrate Differences ... ==== //depot/projects/usiii/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/Makefile,v 1.45 2007/07/12 21:04:55 rwatson Exp $ +# $FreeBSD: src/sys/Makefile,v 1.46 2008/01/23 08:50:34 maxim Exp $ .include @@ -8,11 +8,11 @@ .endif # Directories to include in cscope name file and TAGS. -CSCOPEDIRS= bsm cam compat conf contrib crypto ddb dev fs geom gnu \ +CSCOPEDIRS= boot bsm cam compat conf contrib crypto ddb dev fs gdb geom gnu \ i4b isa kern libkern modules net net80211 netatalk netatm \ netgraph netinet netinet6 netipsec netipx netnatm netncp \ - netsmb nfs nfsclient nfs4client rpc pccard pci security sys \ - ufs vm ${ARCHDIR} + netsmb nfs nfs4client nfsclient nfsserver opencrypto pccard \ + pci rpc security sys ufs vm ${ARCHDIR} ARCHDIR ?= ${MACHINE} ==== //depot/projects/usiii/amd64/acpica/madt.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.24 2007/05/08 22:01:02 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.25 2008/01/31 16:51:42 jhb Exp $"); #include #include @@ -109,9 +109,11 @@ /* * Code to abuse the crashdump map to map in the tables for the early * probe. We cheat and make the following assumptions about how we - * use this KVA: page 0 is used to map in the first page of each table - * found via the RSDT or XSDT and pages 1 to n are used to map in the - * RSDT or XSDT. The offset is in pages; the length is in bytes. + * use this KVA: pages 0 and 1 are used to map in the header of each + * table found via the RSDT or XSDT and pages 2 to n are used to map + * in the RSDT or XSDT. We have to use 2 pages for the table headers + * in case a header spans a page boundary. The offset is in pages; + * the length is in bytes. */ static void * madt_map(vm_paddr_t pa, int offset, vm_offset_t length) @@ -232,7 +234,7 @@ printf("MADT: RSDP failed extended checksum\n"); return (ENXIO); } - xsdt = madt_map_table(rsdp->XsdtPhysicalAddress, 1, + xsdt = madt_map_table(rsdp->XsdtPhysicalAddress, 2, ACPI_SIG_XSDT); if (xsdt == NULL) { if (bootverbose) @@ -246,7 +248,7 @@ break; madt_unmap_table(xsdt); } else { - rsdt = madt_map_table(rsdp->RsdtPhysicalAddress, 1, + rsdt = madt_map_table(rsdp->RsdtPhysicalAddress, 2, ACPI_SIG_RSDT); if (rsdt == NULL) { if (bootverbose) ==== //depot/projects/usiii/amd64/amd64/dump_machdep.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/dump_machdep.c,v 1.12 2006/04/21 04:24:50 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/dump_machdep.c,v 1.13 2008/01/28 19:04:06 ru Exp $"); #include #include @@ -140,7 +140,7 @@ ptr += len; sz -= len; if (fragsz == DEV_BSIZE) { - error = di->dumper(di->priv, buffer, 0, dumplo, + error = dump_write(di, buffer, 0, dumplo, DEV_BSIZE); if (error) return error; @@ -160,7 +160,7 @@ if (fragsz == 0) return (0); - error = di->dumper(di->priv, buffer, 0, dumplo, DEV_BSIZE); + error = dump_write(di, buffer, 0, dumplo, DEV_BSIZE); dumplo += DEV_BSIZE; fragsz = 0; return (error); @@ -201,7 +201,7 @@ a = pa + i * PAGE_SIZE; va = pmap_kenter_temporary(trunc_page(a), i); } - error = di->dumper(di->priv, va, 0, dumplo, sz); + error = dump_write(di, va, 0, dumplo, sz); if (error) break; dumplo += sz; @@ -327,7 +327,7 @@ ehdr.e_phnum); /* Dump leader */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; dumplo += sizeof(kdh); @@ -358,12 +358,12 @@ goto fail; /* Dump trailer */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; /* Signal completion, signoff and exit stage left. */ - di->dumper(di->priv, NULL, 0, 0, 0); + dump_write(di, NULL, 0, 0, 0); printf("\nDump complete\n"); return; ==== //depot/projects/usiii/amd64/amd64/identcpu.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.155 2007/12/08 21:13:01 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.157 2008/02/02 23:17:27 das Exp $"); #include "opt_cpu.h" @@ -223,7 +223,7 @@ "\020" "\001SSE3" /* SSE3 */ "\002" - "\003RSVD2" /* "Reserved" bit 2 */ + "\003DTES64" /* 64-bit Debug Trace */ "\004MON" /* MONITOR/MWAIT Instructions */ "\005DS_CPL" /* CPL Qualified Debug Store */ "\006VMX" /* Virtual Machine Extensions */ @@ -240,11 +240,11 @@ "\021" "\022" "\023DCA" /* Direct Cache Access */ - "\024" - "\025" - "\026" + "\024SSE4.1" + "\025SSE4.2" + "\026x2APIC" /* xAPIC Extensions */ "\027" - "\030" + "\030POPCNT" "\031" "\032" "\033" ==== //depot/projects/usiii/amd64/amd64/machdep.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.678 2007/11/15 22:00:57 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.680 2007/12/25 17:51:55 rwatson Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -155,6 +155,10 @@ extern vm_offset_t ksym_start, ksym_end; #endif +/* Intel ICH registers */ +#define ICH_PMBASE 0x400 +#define ICH_SMI_EN ICH_PMBASE + 0x30 + int _udatasel, _ucodesel, _ucode32sel; int cold = 1; @@ -192,6 +196,27 @@ cpu_startup(dummy) void *dummy; { + char *sysenv; + + /* + * On MacBooks, we need to disallow the legacy USB circuit to + * generate an SMI# because this can cause several problems, + * namely: incorrect CPU frequency detection and failure to + * start the APs. + * We do this by disabling a bit in the SMI_EN (SMI Control and + * Enable register) of the Intel ICH LPC Interface Bridge. + */ + sysenv = getenv("smbios.system.product"); + if (sysenv != NULL) { + if (strncmp(sysenv, "MacBook", 7) == 0) { + if (bootverbose) + printf("Disabling LEGACY_USB_EN bit on " + "Intel ICH.\n"); + outl(ICH_SMI_EN, inl(ICH_SMI_EN) & ~0x8); + } + freeenv(sysenv); + } + /* * Good {morning,afternoon,evening,night}. */ @@ -1252,7 +1277,8 @@ #ifdef KDB if (boothowto & RB_KDB) - kdb_enter("Boot flags requested debugger"); + kdb_enter(KDB_WHY_BOOTFLAGS, + "Boot flags requested debugger"); #endif identify_cpu(); /* Final stage of CPU initialization */ ==== //depot/projects/usiii/amd64/amd64/minidump_machdep.c#2 (text) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/minidump_machdep.c,v 1.2 2006/12/05 11:31:33 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/minidump_machdep.c,v 1.3 2008/01/28 19:04:06 ru Exp $"); #include #include @@ -111,7 +111,7 @@ if (fragsz == 0) return (0); - error = di->dumper(di->priv, dump_va, 0, dumplo, fragsz); + error = dump_write(di, dump_va, 0, dumplo, fragsz); dumplo += fragsz; fragsz = 0; return (error); @@ -153,7 +153,7 @@ counter &= (1<<24) - 1; } if (ptr) { - error = di->dumper(di->priv, ptr, 0, dumplo, len); + error = dump_write(di, ptr, 0, dumplo, len); if (error) return (error); dumplo += len; @@ -284,7 +284,7 @@ printf("Dumping %llu MB:", (long long)dumpsize >> 20); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Feb 3 02:38:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 06C5516A41A; Sun, 3 Feb 2008 02:38:01 +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 C093116A41B for ; Sun, 3 Feb 2008 02:38:00 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AC52E13C465 for ; Sun, 3 Feb 2008 02:38:00 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m132c0in009305 for ; Sun, 3 Feb 2008 02:38:00 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m132c07w009302 for perforce@freebsd.org; Sun, 3 Feb 2008 02:38:00 GMT (envelope-from cognet@freebsd.org) Date: Sun, 3 Feb 2008 02:38:00 GMT Message-Id: <200802030238.m132c07w009302@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 134690 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 02:38:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=134690 Change 134690 by cognet@cognet-mips on 2008/02/03 02:37:32 Make sure SR_KX is preserved in context switches. I didn't make it conditional on TARGET_OCTEON, I think it won't hurt. As the Cavium port does, allocate 3 pages for the kstack, and if td_kstack is not 8kB aligned, use td_kstack + 4kB instead. This is not optimal, but this way, we do not have to touch MI bits in sys/vm. I thought we had another solution, if I did something stupid, feel free to backout those bits (but be sure to keep the SR_KX ones). Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/param.h#7 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/proc.h#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#11 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/genassym.c#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#22 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/nexus.c#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#18 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#10 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#13 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/param.h#7 (text+ko) ==== @@ -124,7 +124,7 @@ * Therefore, any code imported from OpenBSD which depends on * UADDR, UVPN and KERNELSTACK requires porting. */ -#define KSTACK_PAGES 2 /* kernel stack*/ +#define KSTACK_PAGES 3 /* kernel stack*/ #define KSTACK_GUARD_PAGES 0 /* pages of kstack guard; 0 disables */ #define UPAGES 2 ==== //depot/projects/mips2-jnpr/src/sys/mips/include/proc.h#5 (text+ko) ==== @@ -53,6 +53,7 @@ int md_pc_ctrl; /* performance counter control */ int md_pc_count; /* performance counter */ int md_pc_spill; /* performance counter spill */ + vm_offset_t md_realstack; }; /* md_flags */ ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#11 (text+ko) ==== @@ -1041,7 +1041,7 @@ sys_stk_chk: GET_CPU_PCPU(k0) lw k0, PC_CURTHREAD(k0) - lw k0, TD_KSTACK(k0) + lw k0, TD_REALKSTACK(k0) sltu k0, sp, k0 # check for stack overflow beqz k0, _C_LABEL(MipsKernGenException) # not stack overflow nop ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/genassym.c#5 (text+ko) ==== @@ -65,7 +65,7 @@ ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TD_UPTE, offsetof(struct thread, td_md.md_upte)); -ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack)); +ASSYM(TD_REALKSTACK, offsetof(struct thread, td_md.md_realstack)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#22 (text+ko) ==== @@ -265,6 +265,10 @@ proc_linkup(&proc0, &thread0); thread0.td_kstack = kstack0; thread0.td_kstack_pages = KSTACK_PAGES; + if (thread0.td_kstack & (1 << PAGE_SHIFT)) + thread0.td_md.md_realstack = thread0.td_kstack + PAGE_SIZE; + else + thread0.td_md.md_realstack = thread0.td_kstack; /* Initialize pcpu info of cpu-zero */ #ifdef SMP pcpu_init(&__pcpu[0], 0, sizeof(struct pcpu)); @@ -276,8 +280,8 @@ * thread0 is the only thread that has kstack located in KSEG0 * while cpu_thread_alloc handles kstack allocated in KSEG2. */ - thread0.td_pcb = (struct pcb *)(thread0.td_kstack + - thread0.td_kstack_pages * PAGE_SIZE) - 1; + thread0.td_pcb = (struct pcb *)(thread0.td_md.md_realstack + + (thread0.td_kstack_pages - 1) * PAGE_SIZE) - 1; thread0.td_frame = &thread0.td_pcb->pcb_regs; /* * There is no need to initialize md_upte array for thread0 as it's ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/nexus.c#4 (text+ko) ==== ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#18 (text+ko) ==== ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#10 (text+ko) ==== @@ -263,7 +263,9 @@ mfc0 t0, COP_0_STATUS_REG # t0 = saved status register nop nop - mtc0 zero, COP_0_STATUS_REG # Disable all interrupts + + and a3, t0, SR_KX + mtc0 a3, COP_0_STATUS_REG # Disable all interrupts ITLBNOPFIX j mips_sw1 # We're not interested in old # thread's context, so jump @@ -281,7 +283,8 @@ mfc0 t0, COP_0_STATUS_REG # t0 = saved status register nop nop - mtc0 zero, COP_0_STATUS_REG # Disable all interrupts + and a3, t0, SR_KX + mtc0 a3, COP_0_STATUS_REG # Disable all interrupts ITLBNOPFIX beqz a0, mips_sw1 move a3, a0 @@ -326,7 +329,7 @@ sw a1, PC_CURTHREAD(a3) lw a2, TD_PCB(a1) sw a2, PC_CURPCB(a3) - lw v0, TD_KSTACK(a1) + lw v0, TD_REALKSTACK(a1) li s0, (MIPS_KSEG2_START+VM_KERNEL_ALLOC_OFFSET) # If Uarea addr is below kseg2, bltu v0, s0, sw2 # no need to insert in TLB. lw a1, TD_UPTE+0(s7) # t0 = first u. pte ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#13 (text+ko) ==== @@ -114,10 +114,13 @@ if ((flags & RFPROC) == 0) return; - + if(td2->td_kstack & (1 << PAGE_SHIFT)) + td2->td_md.md_realstack = td2->td_kstack + PAGE_SIZE; + else + td2->td_md.md_realstack = td2->td_kstack; /* Point the pcb to the top of the stack */ - pcb2 = (struct pcb *)(td2->td_kstack + - td2->td_kstack_pages * PAGE_SIZE) - 1; + pcb2 = (struct pcb *)(td2->td_md.md_realstack + + (td2->td_kstack_pages - 1) * PAGE_SIZE) - 1; td2->td_pcb = pcb2; /* Copy p1's pcb */ @@ -248,8 +251,13 @@ pt_entry_t *pte; int i; - td->td_pcb = (struct pcb *)(td->td_kstack + - td->td_kstack_pages * PAGE_SIZE) - 1; + if(td->td_kstack & (1 << PAGE_SHIFT)) + td->td_md.md_realstack = td->td_kstack + PAGE_SIZE; + else + td->td_md.md_realstack = td->td_kstack; + + td->td_pcb = (struct pcb *)(td->td_md.md_realstack + + (td->td_kstack_pages - 1) * PAGE_SIZE) - 1; td->td_frame = &td->td_pcb->pcb_regs; if (!(pte = pmap_segmap(kernel_pmap, (vm_offset_t)td->td_kstack))) From owner-p4-projects@FreeBSD.ORG Sun Feb 3 07:18:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CFED016A419; Sun, 3 Feb 2008 07:18: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 957D016A417 for ; Sun, 3 Feb 2008 07:18:54 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 814A513C458 for ; Sun, 3 Feb 2008 07:18:54 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m137IsHt041210 for ; Sun, 3 Feb 2008 07:18:54 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m137IrmC041207 for perforce@freebsd.org; Sun, 3 Feb 2008 07:18:53 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 3 Feb 2008 07:18:53 GMT Message-Id: <200802030718.m137IrmC041207@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134697 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 07:18:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=134697 Change 134697 by kmacy@kmacy:storage:toehead on 2008/02/03 07:18:30 - fix socket buffer accounting - use sbappendstream Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#14 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#15 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#14 (text+ko) ==== @@ -586,12 +586,19 @@ int dack_mode, must_send, read; u32 thres, credits, dack = 0; + so = tp->t_inpcb->inp_socket; if (!((tp->t_state == TCPS_ESTABLISHED) || (tp->t_state == TCPS_FIN_WAIT_1) || - (tp->t_state == TCPS_FIN_WAIT_2))) + (tp->t_state == TCPS_FIN_WAIT_2))) { + if (copied) { + SOCKBUF_LOCK(&so->so_rcv); + toep->tp_copied_seq += copied; + SOCKBUF_UNLOCK(&so->so_rcv); + } + return; - INP_LOCK_ASSERT(tp->t_inpcb); + } - so = tp->t_inpcb->inp_socket; + INP_LOCK_ASSERT(tp->t_inpcb); SOCKBUF_LOCK(&so->so_rcv); if (copied) toep->tp_copied_seq += copied; @@ -1755,9 +1762,12 @@ "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u lskb->len %u", m->m_seq, q->cur_buf, m->m_pkthdr.len); #endif - sbappend(&so->so_rcv, m); + SOCKBUF_LOCK(&so->so_rcv); + sbappendstream_locked(&so->so_rcv, m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) - sorwakeup(so); + sorwakeup_locked(so); + else + SOCKBUF_UNLOCK(&so->so_rcv); } /* @@ -1895,11 +1905,12 @@ "new_rx_data: seq 0x%x len %u", m->m_seq, m->m_pkthdr.len); #endif + INP_UNLOCK(tp->t_inpcb); SOCKBUF_LOCK(&so->so_rcv); if (sb_notify(&so->so_rcv)) DPRINTF("rx_data so=%p flags=0x%x len=%d\n", so, so->so_rcv.sb_flags, m->m_pkthdr.len); - sbappend_locked(&so->so_rcv, m); + sbappendstream_locked(&so->so_rcv, m); #ifdef notyet /* @@ -1912,7 +1923,7 @@ so, so->so_rcv.sb_cc, so->so_rcv.sb_mbmax)); #endif - INP_UNLOCK(tp->t_inpcb); + DPRINTF("sb_cc=%d sb_mbcnt=%d\n", so->so_rcv.sb_cc, so->so_rcv.sb_mbcnt); @@ -2134,11 +2145,12 @@ tp->rcv_nxt += m->m_len; tp->t_rcvtime = ticks; + SOCKBUF_LOCK(&so->so_rcv); sbappendstream_locked(&so->so_rcv, m); if ((so->so_state & SS_NOFDREF) == 0) sorwakeup_locked(so); - + SOCKBUF_UNLOCK(&so->so_rcv); TRACE_EXIT; } @@ -2230,7 +2242,7 @@ if (!(bsp->flags & DDP_BF_NOFLIP)) q->cur_buf ^= 1; tp->t_rcvtime = ticks; - sbappend(&so->so_rcv, m); + sbappendstream(&so->so_rcv, m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) sorwakeup(so); return (1); ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#15 (text+ko) ==== @@ -41,12 +41,14 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include @@ -525,7 +527,42 @@ return pru_sosend(so, addr, uio, top, control, flags, td); } +/* + * Following replacement or removal of the first mbuf on the first mbuf chain + * of a socket buffer, push necessary state changes back into the socket + * buffer so that other consumers see the values consistently. 'nextrecord' + * is the callers locally stored value of the original value of + * sb->sb_mb->m_nextpkt which must be restored when the lead mbuf changes. + * NOTE: 'nextrecord' may be NULL. + */ +#if 1 +static __inline void +sockbuf_pushsync(struct sockbuf *sb, struct mbuf *nextrecord) +{ + + SOCKBUF_LOCK_ASSERT(sb); + /* + * First, update for the new value of nextrecord. If necessary, make + * it the first record. + */ + if (sb->sb_mb != NULL) + sb->sb_mb->m_nextpkt = nextrecord; + else + sb->sb_mb = nextrecord; + /* + * Now update any dependent socket buffer fields to reflect the new + * state. This is an expanded inline of SB_EMPTY_FIXUP(), with the + * addition of a second clause that takes care of the case where + * sb_mb has been updated, but remains the last record. + */ + if (sb->sb_mb == NULL) { + sb->sb_mbtail = NULL; + sb->sb_lastrecord = NULL; + } else if (sb->sb_mb->m_nextpkt == NULL) + sb->sb_lastrecord = sb->sb_mb; +} +#endif #define IS_NONBLOCKING(so) ((so)->so_state & SS_NBIO) @@ -536,14 +573,13 @@ struct toepcb *toep = tp->t_toe; struct mbuf *m; uint32_t offset; - int err, flags, avail, len, buffers_freed, copied, copied_unacked; + int err, flags, avail, len, copied, copied_unacked; int target; /* Read at least this many bytes */ int user_ddp_ok, user_ddp_pending = 0; struct ddp_state *p; struct inpcb *inp = sotoinpcb(so); - - copied = copied_unacked = buffers_freed = 0; + avail = offset = copied = copied_unacked = 0; flags = flagsp ? (*flagsp &~ MSG_EOR) : 0; err = sblock(&so->so_rcv, SBLOCKWAIT(flags)); @@ -583,6 +619,8 @@ so->so_error = 0; goto done; } + if (so->so_rcv.sb_state & SBS_CANTRCVMORE) + goto done; if (so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED)) goto done; if (tp->t_state == TCPS_CLOSED) { @@ -625,15 +663,23 @@ } else if (copied >= target) goto done; else { - SOCKBUF_UNLOCK(&so->so_rcv); - INP_LOCK(inp); - t3_cleanup_rbuf(tp, copied_unacked); - INP_UNLOCK(inp); - SOCKBUF_LOCK(&so->so_rcv); - copied_unacked = 0; + int i = 0; + if (copied_unacked) { + SOCKBUF_UNLOCK(&so->so_rcv); + INP_LOCK(inp); + t3_cleanup_rbuf(tp, copied_unacked); + INP_UNLOCK(inp); + copied_unacked = 0; + if (mp_ncpus > 1) + while (i++ < 200 && so->so_rcv.sb_mb == NULL) + cpu_spinwait(); + SOCKBUF_LOCK(&so->so_rcv); + } + if (so->so_rcv.sb_mb) goto restart; - printf("sbwaiting 2 copied=%d target=%d\n", copied, target); + printf("sbwaiting 2 copied=%d target=%d avail=%d so=%p mb=%p cc=%d\n", copied, target, avail, so, + so->so_rcv.sb_mb, so->so_rcv.sb_cc); if ((err = sbwait(&so->so_rcv)) != 0) goto done; } @@ -642,24 +688,27 @@ if (m->m_pkthdr.len == 0) { if ((m->m_ddp_flags & DDP_BF_NOCOPY) == 0) panic("empty mbuf and NOCOPY not set\n"); + printf("dropping empty mbuf\n"); user_ddp_pending = 0; - sbfree(&so->so_rcv, m); - m = so->so_rcv.sb_mb = m_free(m); + sbdroprecord_locked(&so->so_rcv); goto done; } + offset = toep->tp_copied_seq + copied_unacked - m->m_seq; DPRINTF("m=%p copied_seq=0x%x copied_unacked=%d m_seq=0x%x offset=%d pktlen=%d is_ddp(m)=%d\n", m, toep->tp_copied_seq, copied_unacked, m->m_seq, offset, m->m_pkthdr.len, !!is_ddp(m)); + if (offset >= m->m_pkthdr.len) panic("t3_soreceive: OFFSET >= LEN offset %d copied_seq 0x%x seq 0x%x " "pktlen %d ddp flags 0x%x", offset, toep->tp_copied_seq + copied_unacked, m->m_seq, m->m_pkthdr.len, m->m_ddp_flags); + avail = m->m_pkthdr.len - offset; if (len < avail) { - if (is_ddp(m) && (m->m_ddp_flags & DDP_BF_NOCOPY)) + if (is_ddp(m) && (m->m_ddp_flags & DDP_BF_NOCOPY)) panic("bad state in t3_soreceive\n"); avail = len; - } + } #ifdef URGENT_DATA_SUPPORTED /* * Check if the data we are preparing to copy contains urgent @@ -720,16 +769,15 @@ goto done_unlocked; } SOCKBUF_LOCK(&so->so_rcv); - if (!(resid > uio->uio_resid)) - printf("copied zero bytes :-/ resid=%d uio_resid=%d copied=%d copied_unacked=%d\n", - resid, uio->uio_resid, copied, copied_unacked); - } - - sbdrop_locked(&so->so_rcv, avail); - buffers_freed++; + if (avail != (resid - uio->uio_resid)) + printf("didn't copy all bytes :-/ avail=%d offset=%d pktlen=%d resid=%d uio_resid=%d copied=%d copied_unacked=%d is_ddp(m)=%d\n", + avail, offset, m->m_pkthdr.len, resid, uio->uio_resid, copied, copied_unacked, is_ddp(m)); + } + copied += avail; copied_unacked += avail; len -= avail; + #ifdef URGENT_DATA_SUPPORTED skip_copy: if (tp->urg_data && after(tp->copied_seq + copied_unacked, tp->urg_seq)) @@ -741,7 +789,8 @@ */ if (avail + offset >= m->m_pkthdr.len) { unsigned int fl = m->m_ddp_flags; - int exitnow, got_psh = 0, nomoredata = 0; + int exitnow, count, got_psh = 0, nomoredata = 0; + struct mbuf *nextrecord; if (p->kbuf[0] != NULL && is_ddp(m) && (fl & 1)) { if (is_ddp_psh(m) && user_ddp_pending) @@ -757,25 +806,47 @@ p->ubuf_ddp_ready = 1; } } + + nextrecord = m->m_nextpkt; + count = m->m_pkthdr.len; + while (count) { + count -= m->m_len; + sbfree(&so->so_rcv, m); + so->so_rcv.sb_mb = m_free(m); + m = so->so_rcv.sb_mb; + } + sockbuf_pushsync(&so->so_rcv, nextrecord); + exitnow = got_psh || nomoredata; - if ((so->so_rcv.sb_mb == NULL) && exitnow) + if ((so->so_rcv.sb_mb == NULL) && exitnow) { + printf("exiting\n"); goto done; - } - if (len > 0) + } + if (copied_unacked > (so->so_rcv.sb_hiwat >> 2)) { + SOCKBUF_UNLOCK(&so->so_rcv); + INP_LOCK(inp); + t3_cleanup_rbuf(tp, copied_unacked); + INP_UNLOCK(inp); + copied_unacked = 0; + SOCKBUF_LOCK(&so->so_rcv); + } + } + if (len > 0) goto restart; + + done: -done: /* * If we can still receive decide what to do in preparation for the * next receive. Note that RCV_SHUTDOWN is set if the connection * transitioned to CLOSE but not if it was in that state to begin with. */ if (__predict_true((so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED)) == 0)) { - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_rcv); if (user_ddp_pending) { + SOCKBUF_UNLOCK(&so->so_rcv); + SOCKBUF_LOCK(&so->so_rcv); user_ddp_ok = 0; t3_cancel_ubuf(toep); if (so->so_rcv.sb_mb) { @@ -810,12 +881,11 @@ #endif SOCKBUF_UNLOCK(&so->so_rcv); done_unlocked: - if (copied) { + if (copied_unacked) { INP_LOCK(inp); t3_cleanup_rbuf(tp, copied_unacked); INP_UNLOCK(inp); } - sbunlock(&so->so_rcv); return (err); @@ -844,27 +914,22 @@ * - iovcnt is 1 * */ + if ((tp->t_flags & TF_TOE) && ((flags & (MSG_WAITALL|MSG_OOB|MSG_PEEK|MSG_DONTWAIT)) == 0) -#ifdef notyet - && ((so->so_state & SS_NBIO) == 0) -#endif && (uio->uio_iovcnt == 1) && ((so->so_rcv.sb_state & SBS_CANTRCVMORE) == 0) && (mp0 == NULL)) { tdev = TOE_DEV(so); zcopy_thres = TOM_TUNABLE(tdev, ddp_thres); zcopy_enabled = TOM_TUNABLE(tdev, ddp); - if ((uio->uio_resid > zcopy_thres) && (uio->uio_iovcnt == 1) -#if 0 - && ((so->so_state & SS_NBIO) == 0) -#endif && zcopy_enabled) { rv = t3_soreceive(so, flagsp, uio); if (rv != EAGAIN) return (rv); - } - } + } + } else if (tp->t_flags & TF_TOE) + printf("skipping t3_soreceive\n"); return pru_soreceive(so, psa, uio, mp0, controlp, flagsp); } From owner-p4-projects@FreeBSD.ORG Sun Feb 3 10:08:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2789C16A420; Sun, 3 Feb 2008 10:08:55 +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 C759516A419 for ; Sun, 3 Feb 2008 10:08:54 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B705A13C448 for ; Sun, 3 Feb 2008 10:08:54 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13A8s4k063709 for ; Sun, 3 Feb 2008 10:08:54 GMT (envelope-from andre@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13A8rwr063706 for perforce@freebsd.org; Sun, 3 Feb 2008 10:08:53 GMT (envelope-from andre@freebsd.org) Date: Sun, 3 Feb 2008 10:08:53 GMT Message-Id: <200802031008.m13A8rwr063706@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andre@freebsd.org using -f From: Andre Oppermann To: Perforce Change Reviews Cc: Subject: PERFORCE change 134708 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 10:08:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=134708 Change 134708 by andre@andre_flirtbox on 2008/02/03 10:08:53 Integrate @134705 Affected files ... .. //depot/projects/tcp_new/amd64/acpica/madt.c#2 integrate .. //depot/projects/tcp_new/amd64/amd64/identcpu.c#2 integrate .. //depot/projects/tcp_new/amd64/conf/GENERIC#2 integrate .. //depot/projects/tcp_new/amd64/conf/NOTES#2 integrate .. //depot/projects/tcp_new/amd64/include/proc.h#2 integrate .. //depot/projects/tcp_new/amd64/include/specialreg.h#2 integrate .. //depot/projects/tcp_new/arm/arm/pmap.c#2 integrate .. //depot/projects/tcp_new/arm/include/pmap.h#2 integrate .. //depot/projects/tcp_new/compat/ndis/kern_ndis.c#2 integrate .. //depot/projects/tcp_new/conf/files.amd64#2 integrate .. //depot/projects/tcp_new/conf/files.i386#2 integrate .. //depot/projects/tcp_new/conf/files.powerpc#2 integrate .. //depot/projects/tcp_new/conf/kern.pre.mk#2 integrate .. //depot/projects/tcp_new/ddb/db_textdump.c#2 integrate .. //depot/projects/tcp_new/dev/bfe/if_bfe.c#2 integrate .. //depot/projects/tcp_new/dev/bfe/if_bfereg.h#2 integrate .. //depot/projects/tcp_new/dev/cxgb/cxgb_sge.c#2 integrate .. //depot/projects/tcp_new/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#2 integrate .. //depot/projects/tcp_new/dev/hatm/if_hatm_intr.c#2 integrate .. //depot/projects/tcp_new/dev/iscsi/initiator/isc_soc.c#2 integrate .. //depot/projects/tcp_new/dev/lge/if_lge.c#2 integrate .. //depot/projects/tcp_new/dev/mfi/mfi.c#2 integrate .. //depot/projects/tcp_new/dev/mfi/mfireg.h#2 integrate .. //depot/projects/tcp_new/dev/msk/if_msk.c#2 integrate .. //depot/projects/tcp_new/dev/nfe/if_nfe.c#2 integrate .. //depot/projects/tcp_new/dev/patm/if_patm_rx.c#2 integrate .. //depot/projects/tcp_new/dev/pci/pci.c#2 integrate .. //depot/projects/tcp_new/dev/rr232x/LICENSE#2 delete .. //depot/projects/tcp_new/dev/rr232x/README#2 delete .. //depot/projects/tcp_new/dev/rr232x/amd64-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/tcp_new/dev/rr232x/array.h#2 delete .. //depot/projects/tcp_new/dev/rr232x/him.h#2 delete .. //depot/projects/tcp_new/dev/rr232x/himfuncs.h#2 delete .. //depot/projects/tcp_new/dev/rr232x/hptintf.h#2 delete .. //depot/projects/tcp_new/dev/rr232x/i386-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/tcp_new/dev/rr232x/ldm.h#2 delete .. //depot/projects/tcp_new/dev/rr232x/list.h#2 delete .. //depot/projects/tcp_new/dev/rr232x/os_bsd.c#2 delete .. //depot/projects/tcp_new/dev/rr232x/os_bsd.h#2 delete .. //depot/projects/tcp_new/dev/rr232x/osm.h#2 delete .. //depot/projects/tcp_new/dev/rr232x/osm_bsd.c#2 delete .. //depot/projects/tcp_new/dev/rr232x/rr232x_config.c#2 delete .. //depot/projects/tcp_new/dev/rr232x/rr232x_config.h#2 delete .. //depot/projects/tcp_new/dev/sk/if_sk.c#2 integrate .. //depot/projects/tcp_new/dev/ti/if_ti.c#2 integrate .. //depot/projects/tcp_new/dev/wpi/if_wpi.c#2 integrate .. //depot/projects/tcp_new/i386/acpica/madt.c#2 integrate .. //depot/projects/tcp_new/i386/conf/GENERIC#2 integrate .. //depot/projects/tcp_new/i386/conf/NOTES#2 integrate .. //depot/projects/tcp_new/i386/include/proc.h#2 integrate .. //depot/projects/tcp_new/kern/kern_mbuf.c#2 integrate .. //depot/projects/tcp_new/kern/uipc_cow.c#2 integrate .. //depot/projects/tcp_new/kern/uipc_mbuf.c#2 integrate .. //depot/projects/tcp_new/kern/uipc_sockbuf.c#2 integrate .. //depot/projects/tcp_new/kern/uipc_socket.c#2 integrate .. //depot/projects/tcp_new/kern/uipc_syscalls.c#2 integrate .. //depot/projects/tcp_new/kern/vfs_aio.c#2 integrate .. //depot/projects/tcp_new/modules/Makefile#2 integrate .. //depot/projects/tcp_new/modules/rr232x/Makefile#2 delete .. //depot/projects/tcp_new/net/bpf.c#2 integrate .. //depot/projects/tcp_new/net80211/ieee80211_ht.c#2 integrate .. //depot/projects/tcp_new/net80211/ieee80211_ht.h#2 integrate .. //depot/projects/tcp_new/netgraph/netgraph.h#2 integrate .. //depot/projects/tcp_new/netgraph/ng_base.c#2 integrate .. //depot/projects/tcp_new/netgraph/ng_iface.c#2 integrate .. //depot/projects/tcp_new/netgraph/ng_pppoe.c#2 integrate .. //depot/projects/tcp_new/netinet/ip_output.c#2 integrate .. //depot/projects/tcp_new/netinet/sctp_input.c#2 integrate .. //depot/projects/tcp_new/netinet/sctp_peeloff.c#2 integrate .. //depot/projects/tcp_new/netinet/sctputil.c#2 integrate .. //depot/projects/tcp_new/netinet6/ip6_output.c#2 integrate .. //depot/projects/tcp_new/netipsec/ipsec.c#2 integrate .. //depot/projects/tcp_new/netipsec/ipsec.h#2 integrate .. //depot/projects/tcp_new/netipsec/ipsec6.h#2 integrate .. //depot/projects/tcp_new/pci/if_wb.c#2 integrate .. //depot/projects/tcp_new/sys/mbuf.h#2 integrate .. //depot/projects/tcp_new/sys/param.h#2 integrate .. //depot/projects/tcp_new/sys/proc.h#2 integrate .. //depot/projects/tcp_new/sys/socketvar.h#2 integrate Differences ... ==== //depot/projects/tcp_new/amd64/acpica/madt.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.24 2007/05/08 22:01:02 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.25 2008/01/31 16:51:42 jhb Exp $"); #include #include @@ -109,9 +109,11 @@ /* * Code to abuse the crashdump map to map in the tables for the early * probe. We cheat and make the following assumptions about how we - * use this KVA: page 0 is used to map in the first page of each table - * found via the RSDT or XSDT and pages 1 to n are used to map in the - * RSDT or XSDT. The offset is in pages; the length is in bytes. + * use this KVA: pages 0 and 1 are used to map in the header of each + * table found via the RSDT or XSDT and pages 2 to n are used to map + * in the RSDT or XSDT. We have to use 2 pages for the table headers + * in case a header spans a page boundary. The offset is in pages; + * the length is in bytes. */ static void * madt_map(vm_paddr_t pa, int offset, vm_offset_t length) @@ -232,7 +234,7 @@ printf("MADT: RSDP failed extended checksum\n"); return (ENXIO); } - xsdt = madt_map_table(rsdp->XsdtPhysicalAddress, 1, + xsdt = madt_map_table(rsdp->XsdtPhysicalAddress, 2, ACPI_SIG_XSDT); if (xsdt == NULL) { if (bootverbose) @@ -246,7 +248,7 @@ break; madt_unmap_table(xsdt); } else { - rsdt = madt_map_table(rsdp->RsdtPhysicalAddress, 1, + rsdt = madt_map_table(rsdp->RsdtPhysicalAddress, 2, ACPI_SIG_RSDT); if (rsdt == NULL) { if (bootverbose) ==== //depot/projects/tcp_new/amd64/amd64/identcpu.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.155 2007/12/08 21:13:01 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.157 2008/02/02 23:17:27 das Exp $"); #include "opt_cpu.h" @@ -223,7 +223,7 @@ "\020" "\001SSE3" /* SSE3 */ "\002" - "\003RSVD2" /* "Reserved" bit 2 */ + "\003DTES64" /* 64-bit Debug Trace */ "\004MON" /* MONITOR/MWAIT Instructions */ "\005DS_CPL" /* CPL Qualified Debug Store */ "\006VMX" /* Virtual Machine Extensions */ @@ -240,11 +240,11 @@ "\021" "\022" "\023DCA" /* Direct Cache Access */ - "\024" - "\025" - "\026" + "\024SSE4.1" + "\025SSE4.2" + "\026x2APIC" /* xAPIC Extensions */ "\027" - "\030" + "\030POPCNT" "\031" "\032" "\033" ==== //depot/projects/tcp_new/amd64/conf/GENERIC#2 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.491 2008/01/07 21:40:09 jhb Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.492 2008/02/03 07:07:30 scottl Exp $ cpu HAMMER ident GENERIC @@ -133,7 +133,6 @@ device dpt # DPT Smartcache III, IV - See NOTES for options device hptmv # Highpoint RocketRAID 182x device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx -device rr232x # Highpoint RocketRAID 232x device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID ==== //depot/projects/tcp_new/amd64/conf/NOTES#2 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.74 2007/12/28 22:50:04 rpaulo Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.75 2008/02/03 07:07:30 scottl Exp $ # # @@ -381,11 +381,6 @@ device hptrr # -# Highpoint RocketRAID 232x. This is software RAID but with hardware -# acceleration assistance for RAID_5. -device rr232x - -# # Highpoint RocketRaid 3xxx series SATA RAID device hptiop ==== //depot/projects/tcp_new/amd64/include/proc.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)proc.h 7.1 (Berkeley) 5/15/91 - * $FreeBSD: src/sys/amd64/include/proc.h,v 1.24 2005/04/04 21:53:52 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/proc.h,v 1.25 2008/01/31 08:24:27 mav Exp $ */ #ifndef _MACHINE_PROC_H_ @@ -44,4 +44,17 @@ struct mdproc { }; +#ifdef _KERNEL + +/* Get the current kernel thread stack usage. */ +#define GET_STACK_USAGE(total, used) do { \ + struct thread *td = curthread; \ + (total) = td->td_kstack_pages * PAGE_SIZE; \ + (used) = (char *)td->td_kstack + \ + td->td_kstack_pages * PAGE_SIZE - \ + (char *)&td; \ +} while (0) + +#endif /* _KERNEL */ + #endif /* !_MACHINE_PROC_H_ */ ==== //depot/projects/tcp_new/amd64/include/specialreg.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.41 2007/12/08 21:13:01 alc Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.43 2008/02/02 23:17:27 das Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -113,6 +113,7 @@ #define CPUID_PBE 0x80000000 #define CPUID2_SSE3 0x00000001 +#define CPUID2_DTES64 0x00000004 #define CPUID2_MON 0x00000008 #define CPUID2_DS_CPL 0x00000010 #define CPUID2_VMX 0x00000020 @@ -125,6 +126,10 @@ #define CPUID2_XTPR 0x00004000 #define CPUID2_PDCM 0x00008000 #define CPUID2_DCA 0x00040000 +#define CPUID2_SSE41 0x00080000 +#define CPUID2_SSE42 0x00100000 +#define CPUID2_X2APIC 0x00200000 +#define CPUID2_POPCNT 0x00800000 /* * Important bits in the AMD extended cpuid flags ==== //depot/projects/tcp_new/arm/arm/pmap.c#2 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.97 2008/01/17 12:41:59 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.98 2008/01/31 00:05:40 cognet Exp $"); #include #include #include @@ -199,11 +199,8 @@ static void pmap_enter_locked(pmap_t, vm_offset_t, vm_page_t, vm_prot_t, boolean_t, int); -static void pmap_vac_me_harder(struct vm_page *, pmap_t, - vm_offset_t); -static void pmap_vac_me_kpmap(struct vm_page *, pmap_t, +static __inline void pmap_fix_cache(struct vm_page *, pmap_t, vm_offset_t); -static void pmap_vac_me_user(struct vm_page *, pmap_t, vm_offset_t); static void pmap_alloc_l1(pmap_t); static void pmap_free_l1(pmap_t); static void pmap_use_l1(pmap_t); @@ -1260,276 +1257,147 @@ #endif /* - * Since we have a virtually indexed cache, we may need to inhibit caching if - * there is more than one mapping and at least one of them is writable. - * Since we purge the cache on every context switch, we only need to check for - * other mappings within the same pmap, or kernel_pmap. - * This function is also called when a page is unmapped, to possibly reenable - * caching on any remaining mappings. - * - * The code implements the following logic, where: - * - * KW = # of kernel read/write pages - * KR = # of kernel read only pages - * UW = # of user read/write pages - * UR = # of user read only pages - * - * KC = kernel mapping is cacheable - * UC = user mapping is cacheable - * - * KW=0,KR=0 KW=0,KR>0 KW=1,KR=0 KW>1,KR>=0 - * +--------------------------------------------- - * UW=0,UR=0 | --- KC=1 KC=1 KC=0 - * UW=0,UR>0 | UC=1 KC=1,UC=1 KC=0,UC=0 KC=0,UC=0 - * UW=1,UR=0 | UC=1 KC=0,UC=0 KC=0,UC=0 KC=0,UC=0 - * UW>1,UR>=0 | UC=0 KC=0,UC=0 KC=0,UC=0 KC=0,UC=0 + * cacheable == -1 means we must make the entry uncacheable, 1 means + * cacheable; */ - -static const int pmap_vac_flags[4][4] = { - {-1, 0, 0, PVF_KNC}, - {0, 0, PVF_NC, PVF_NC}, - {0, PVF_NC, PVF_NC, PVF_NC}, - {PVF_UNC, PVF_NC, PVF_NC, PVF_NC} -}; - -static PMAP_INLINE int -pmap_get_vac_flags(const struct vm_page *pg) -{ - int kidx, uidx; - - kidx = 0; - if (pg->md.kro_mappings || pg->md.krw_mappings > 1) - kidx |= 1; - if (pg->md.krw_mappings) - kidx |= 2; - - uidx = 0; - if (pg->md.uro_mappings || pg->md.urw_mappings > 1) - uidx |= 1; - if (pg->md.urw_mappings) - uidx |= 2; - - return (pmap_vac_flags[uidx][kidx]); -} - static __inline void -pmap_vac_me_harder(struct vm_page *pg, pmap_t pm, vm_offset_t va) +pmap_set_cache_entry(pv_entry_t pv, pmap_t pm, vm_offset_t va, int cacheable) { - int nattr; + struct l2_bucket *l2b; + pt_entry_t *ptep, pte; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - nattr = pmap_get_vac_flags(pg); + l2b = pmap_get_l2_bucket(pv->pv_pmap, pv->pv_va); + ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; - if (nattr < 0) { - pg->md.pvh_attrs &= ~PVF_NC; - return; + if (cacheable == 1) { + pte = (*ptep & ~L2_S_CACHE_MASK) | pte_l2_s_cache_mode; + if (l2pte_valid(pte)) { + if (PV_BEEN_EXECD(pv->pv_flags)) { + pmap_tlb_flushID_SE(pv->pv_pmap, pv->pv_va); + } else if (PV_BEEN_REFD(pv->pv_flags)) { + pmap_tlb_flushD_SE(pv->pv_pmap, pv->pv_va); + } + } + } else { + pte = *ptep &~ L2_S_CACHE_MASK; + if ((va != pv->pv_va || pm != pv->pv_pmap) && + l2pte_valid(pte)) { + if (PV_BEEN_EXECD(pv->pv_flags)) { + pmap_idcache_wbinv_range(pv->pv_pmap, + pv->pv_va, PAGE_SIZE); + pmap_tlb_flushID_SE(pv->pv_pmap, pv->pv_va); + } else if (PV_BEEN_REFD(pv->pv_flags)) { + pmap_dcache_wb_range(pv->pv_pmap, + pv->pv_va, PAGE_SIZE, TRUE, + (pv->pv_flags & PVF_WRITE) == 0); + pmap_tlb_flushD_SE(pv->pv_pmap, + pv->pv_va); + } + } } - - if (nattr == 0 && (pg->md.pvh_attrs & PVF_NC) == 0) { - return; - } - - if (pm == pmap_kernel()) - pmap_vac_me_kpmap(pg, pm, va); - else - pmap_vac_me_user(pg, pm, va); - - pg->md.pvh_attrs = (pg->md.pvh_attrs & ~PVF_NC) | nattr; + *ptep = pte; + PTE_SYNC_CURRENT(pv->pv_pmap, ptep); } static void -pmap_vac_me_kpmap(struct vm_page *pg, pmap_t pm, vm_offset_t va) +pmap_fix_cache(struct vm_page *pg, pmap_t pm, vm_offset_t va) { - u_int u_cacheable, u_entries; + int pmwc = 0; + int writable = 0, kwritable = 0, uwritable = 0; + int entries = 0, kentries = 0, uentries = 0; struct pv_entry *pv; - pmap_t last_pmap = pm; - /* - * Pass one, see if there are both kernel and user pmaps for - * this page. Calculate whether there are user-writable or - * kernel-writable pages. - */ - u_cacheable = 0; - TAILQ_FOREACH(pv, &pg->md.pv_list, pv_list) { - if (pv->pv_pmap != pm && (pv->pv_flags & PVF_NC) == 0) - u_cacheable++; - } + mtx_assert(&vm_page_queue_mtx, MA_OWNED); - u_entries = pg->md.urw_mappings + pg->md.uro_mappings; - - /* - * We know we have just been updating a kernel entry, so if - * all user pages are already cacheable, then there is nothing - * further to do. + /* the cache gets written back/invalidated on context switch. + * therefore, if a user page shares an entry in the same page or + * with the kernel map and at least one is writable, then the + * cache entry must be set write-through. */ - if (pg->md.k_mappings == 0 && u_cacheable == u_entries) - return; - if (u_entries) { - /* - * Scan over the list again, for each entry, if it - * might not be set correctly, call pmap_vac_me_user - * to recalculate the settings. - */ - TAILQ_FOREACH(pv, &pg->md.pv_list, pv_list) { - /* - * We know kernel mappings will get set - * correctly in other calls. We also know - * that if the pmap is the same as last_pmap - * then we've just handled this entry. - */ - if (pv->pv_pmap == pm || pv->pv_pmap == last_pmap) - continue; - - /* - * If there are kernel entries and this page - * is writable but non-cacheable, then we can - * skip this entry also. - */ - if (pg->md.k_mappings && - (pv->pv_flags & (PVF_NC | PVF_WRITE)) == - (PVF_NC | PVF_WRITE)) - continue; - - /* - * Similarly if there are no kernel-writable - * entries and the page is already - * read-only/cacheable. - */ - if (pg->md.krw_mappings == 0 && - (pv->pv_flags & (PVF_NC | PVF_WRITE)) == 0) - continue; - - /* - * For some of the remaining cases, we know - * that we must recalculate, but for others we - * can't tell if they are correct or not, so - * we recalculate anyway. - */ - pmap_vac_me_user(pg, (last_pmap = pv->pv_pmap), 0); + TAILQ_FOREACH(pv, &pg->md.pv_list, pv_list) { + /* generate a count of the pv_entry uses */ + if (pv->pv_flags & PVF_WRITE) { + if (pv->pv_pmap == pmap_kernel()) + kwritable++; + else if (pv->pv_pmap == pm) + uwritable++; + writable++; + } + if (pv->pv_pmap == pmap_kernel()) + kentries++; + else { + if (pv->pv_pmap == pm) + uentries++; + entries++; } - - if (pg->md.k_mappings == 0) - return; } + /* + * check if the user duplicate mapping has + * been removed. + */ + if ((pm != pmap_kernel()) && (((uentries > 1) && uwritable) || + (uwritable > 1))) + pmwc = 1; - pmap_vac_me_user(pg, pm, va); -} - -static void -pmap_vac_me_user(struct vm_page *pg, pmap_t pm, vm_offset_t va) -{ - pmap_t kpmap = pmap_kernel(); - struct pv_entry *pv, *npv; - struct l2_bucket *l2b; - pt_entry_t *ptep, pte; - u_int entries = 0; - u_int writable = 0; - u_int cacheable_entries = 0; - u_int kern_cacheable = 0; - u_int other_writable = 0; - - /* - * Count mappings and writable mappings in this pmap. - * Include kernel mappings as part of our own. - * Keep a pointer to the first one. - */ - npv = TAILQ_FIRST(&pg->md.pv_list); TAILQ_FOREACH(pv, &pg->md.pv_list, pv_list) { - /* Count mappings in the same pmap */ - if (pm == pv->pv_pmap || kpmap == pv->pv_pmap) { - if (entries++ == 0) - npv = pv; + /* check for user uncachable conditions - order is important */ + if (pm != pmap_kernel() && + (pv->pv_pmap == pm || pv->pv_pmap == pmap_kernel())) { - /* Cacheable mappings */ - if ((pv->pv_flags & PVF_NC) == 0) { - cacheable_entries++; - if (kpmap == pv->pv_pmap) - kern_cacheable++; - } + if ((uentries > 1 && uwritable) || uwritable > 1) { - /* Writable mappings */ - if (pv->pv_flags & PVF_WRITE) - ++writable; - } else - if (pv->pv_flags & PVF_WRITE) - other_writable = 1; - } + /* user duplicate mapping */ + if (pv->pv_pmap != pmap_kernel()) + pv->pv_flags |= PVF_MWC; - /* - * Enable or disable caching as necessary. - * Note: the first entry might be part of the kernel pmap, - * so we can't assume this is indicative of the state of the - * other (maybe non-kpmap) entries. - */ - if ((entries > 1 && writable) || - (entries > 0 && pm == kpmap && other_writable)) { - if (cacheable_entries == 0) - return; - - for (pv = npv; pv; pv = TAILQ_NEXT(pv, pv_list)) { - if ((pm != pv->pv_pmap && kpmap != pv->pv_pmap) || - (pv->pv_flags & PVF_NC)) + if (!(pv->pv_flags & PVF_NC)) { + pv->pv_flags |= PVF_NC; + pmap_set_cache_entry(pv, pm, va, -1); + } continue; + } else /* no longer a duplicate user */ + pv->pv_flags &= ~PVF_MWC; + } - pv->pv_flags |= PVF_NC; + /* + * check for kernel uncachable conditions + * kernel writable or kernel readable with writable user entry + */ + if ((kwritable && entries) || + ((kwritable != writable) && kentries && + (pv->pv_pmap == pmap_kernel() || + (pv->pv_flags & PVF_WRITE) || + (pv->pv_flags & PVF_MWC)))) { - l2b = pmap_get_l2_bucket(pv->pv_pmap, pv->pv_va); - ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; - pte = *ptep & ~L2_S_CACHE_MASK; - - if ((va != pv->pv_va || pm != pv->pv_pmap) && - l2pte_valid(pte)) { - if (PV_BEEN_EXECD(pv->pv_flags)) { - pmap_idcache_wbinv_range(pv->pv_pmap, - pv->pv_va, PAGE_SIZE); - pmap_tlb_flushID_SE(pv->pv_pmap, - pv->pv_va); - } else - if (PV_BEEN_REFD(pv->pv_flags)) { - pmap_dcache_wb_range(pv->pv_pmap, - pv->pv_va, PAGE_SIZE, TRUE, - (pv->pv_flags & PVF_WRITE) == 0); - pmap_tlb_flushD_SE(pv->pv_pmap, - pv->pv_va); - } + if (!(pv->pv_flags & PVF_NC)) { + pv->pv_flags |= PVF_NC; + pmap_set_cache_entry(pv, pm, va, -1); } + continue; + } - *ptep = pte; - PTE_SYNC_CURRENT(pv->pv_pmap, ptep); - } - cpu_cpwait(); - } else - if (entries > cacheable_entries) { - /* - * Turn cacheing back on for some pages. If it is a kernel - * page, only do so if there are no other writable pages. - */ - for (pv = npv; pv; pv = TAILQ_NEXT(pv, pv_list)) { - if (!(pv->pv_flags & PVF_NC) || (pm != pv->pv_pmap && - (kpmap != pv->pv_pmap || other_writable))) - continue; + /* kernel and user are cachable */ + if ((pm == pmap_kernel()) && !(pv->pv_flags & PVF_MWC) && + (pv->pv_flags & PVF_NC)) { pv->pv_flags &= ~PVF_NC; + pmap_set_cache_entry(pv, pm, va, 1); + continue; + } + /* user is no longer sharable and writable */ + if (pm != pmap_kernel() && (pv->pv_pmap == pm) && + !pmwc && (pv->pv_flags & PVF_NC)) { - l2b = pmap_get_l2_bucket(pv->pv_pmap, pv->pv_va); - ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; - pte = (*ptep & ~L2_S_CACHE_MASK) | pte_l2_s_cache_mode; + pv->pv_flags &= ~(PVF_NC | PVF_MWC); + pmap_set_cache_entry(pv, pm, va, 1); + } + } - if (l2pte_valid(pte)) { - if (PV_BEEN_EXECD(pv->pv_flags)) { - pmap_tlb_flushID_SE(pv->pv_pmap, - pv->pv_va); - } else - if (PV_BEEN_REFD(pv->pv_flags)) { - pmap_tlb_flushD_SE(pv->pv_pmap, - pv->pv_va); - } - } - - *ptep = pte; - PTE_SYNC_CURRENT(pv->pv_pmap, ptep); - } + if ((kwritable == 0) && (writable == 0)) { + pg->md.pvh_attrs &= ~PVF_MOD; + vm_page_flag_clear(pg, PG_WRITEABLE); + return; } } @@ -1551,6 +1419,8 @@ mtx_assert(&vm_page_queue_mtx, MA_OWNED); + if (maskbits & PVF_WRITE) + maskbits |= PVF_MOD; /* * Clear saved attributes (modify, reference) */ @@ -1567,6 +1437,21 @@ va = pv->pv_va; pm = pv->pv_pmap; oflags = pv->pv_flags; + + if (!(oflags & maskbits)) { + if ((maskbits & PVF_WRITE) && (pv->pv_flags & PVF_NC)) { + /* It is safe to re-enable cacheing here. */ + PMAP_LOCK(pm); + l2b = pmap_get_l2_bucket(pm, va); + ptep = &l2b->l2b_kva[l2pte_index(va)]; + *ptep |= pte_l2_s_cache_mode; + PTE_SYNC(ptep); + PMAP_UNLOCK(pm); + pv->pv_flags &= ~(PVF_NC | PVF_MWC); + + } + continue; + } pv->pv_flags &= ~maskbits; PMAP_LOCK(pm); @@ -1584,16 +1469,16 @@ * Don't turn caching on again if this is a * modified emulation. This would be * inconsitent with the settings created by - * pmap_vac_me_harder(). Otherwise, it's safe + * pmap_fix_cache(). Otherwise, it's safe * to re-enable cacheing. * - * There's no need to call pmap_vac_me_harder() + * There's no need to call pmap_fix_cache() * here: all pages are losing their write * permission. */ if (maskbits & PVF_WRITE) { npte |= pte_l2_s_cache_mode; - pv->pv_flags &= ~PVF_NC; + pv->pv_flags &= ~(PVF_NC | PVF_MWC); } } else if (opte & L2_S_PROT_W) { @@ -1616,22 +1501,6 @@ /* make the pte read only */ npte &= ~L2_S_PROT_W; - - if (maskbits & PVF_WRITE) { - /* - * Keep alias accounting up to date - */ - if (pv->pv_pmap == pmap_kernel()) { - if (oflags & PVF_WRITE) { - pg->md.krw_mappings--; - pg->md.kro_mappings++; - } - } else - if (oflags & PVF_WRITE) { - pg->md.urw_mappings--; - pg->md.uro_mappings++; - } - } } if (maskbits & PVF_REF) { @@ -1728,17 +1597,6 @@ TAILQ_INSERT_HEAD(&pg->md.pv_list, pve, pv_list); TAILQ_INSERT_HEAD(&pm->pm_pvlist, pve, pv_plist); pg->md.pvh_attrs |= flags & (PVF_REF | PVF_MOD); - if (pm == pmap_kernel()) { - if (flags & PVF_WRITE) - pg->md.krw_mappings++; - else - pg->md.kro_mappings++; - } else { - if (flags & PVF_WRITE) - pg->md.urw_mappings++; - else - pg->md.uro_mappings++; - } pg->md.pv_list_count++; if (pve->pv_flags & PVF_WIRED) ++pm->pm_stats.wired_count; @@ -1808,27 +1666,22 @@ pg->md.pv_list_count--; if (pg->md.pvh_attrs & PVF_MOD) vm_page_dirty(pg); - if (pm == pmap_kernel()) { - if (pve->pv_flags & PVF_WRITE) - pg->md.krw_mappings--; - else - pg->md.kro_mappings--; - } else - if (pve->pv_flags & PVF_WRITE) - pg->md.urw_mappings--; - else - pg->md.uro_mappings--; - if (TAILQ_FIRST(&pg->md.pv_list) == NULL || - (pg->md.krw_mappings == 0 && pg->md.urw_mappings == 0)) { - pg->md.pvh_attrs &= ~PVF_MOD; - if (TAILQ_FIRST(&pg->md.pv_list) == NULL) - pg->md.pvh_attrs &= ~PVF_REF; - vm_page_flag_clear(pg, PG_WRITEABLE); + if (TAILQ_FIRST(&pg->md.pv_list) == NULL) + pg->md.pvh_attrs &= ~PVF_REF; + else + vm_page_flag_set(pg, PG_REFERENCED); + if ((pve->pv_flags & PVF_NC) && ((pm == pmap_kernel()) || + (pve->pv_flags & PVF_WRITE) || !(pve->pv_flags & PVF_MWC))) + pmap_fix_cache(pg, pm, 0); + else if (pve->pv_flags & PVF_WRITE) { + TAILQ_FOREACH(pve, &pg->md.pv_list, pv_list) + if (pve->pv_flags & PVF_WRITE) + break; + if (!pve) { + pg->md.pvh_attrs &= ~PVF_MOD; + vm_page_flag_clear(pg, PG_WRITEABLE); + } } - if (TAILQ_FIRST(&pg->md.pv_list)) - vm_page_flag_set(pg, PG_REFERENCED); - if (pve->pv_flags & PVF_WRITE) - pmap_vac_me_harder(pg, pm, 0); } static struct pv_entry * @@ -1855,8 +1708,6 @@ * * => caller should hold lock on vm_page [so that attrs can be adjusted] * => caller should NOT adjust pmap's wire_count - * => caller must call pmap_vac_me_harder() if writable status of a page - * may have changed. * => we return the old flags * * Modify a physical-virtual mapping in the pv table @@ -1890,29 +1741,8 @@ --pm->pm_stats.wired_count; } - if ((flags ^ oflags) & PVF_WRITE) { - if (pm == pmap_kernel()) { - if (flags & PVF_WRITE) { - pg->md.krw_mappings++; - pg->md.kro_mappings--; - } else { - pg->md.kro_mappings++; - pg->md.krw_mappings--; - } - } else - if (flags & PVF_WRITE) { - pg->md.urw_mappings++; - pg->md.uro_mappings--; - } else { - pg->md.uro_mappings++; - pg->md.urw_mappings--; - } - if (pg->md.krw_mappings == 0 && pg->md.urw_mappings == 0) { - pg->md.pvh_attrs &= ~PVF_MOD; - vm_page_flag_clear(pg, PG_WRITEABLE); - } - pmap_vac_me_harder(pg, pm, 0); - } + if ((flags ^ oflags) & PVF_WRITE) + pmap_fix_cache(pg, pm, 0); return (oflags); } @@ -2073,7 +1903,7 @@ /* * Re-enable write permissions for the page. No need to call - * pmap_vac_me_harder(), since this is just a + * pmap_fix_cache(), since this is just a * modified-emulation fault, and the PVF_WRITE bit isn't * changing. We've already set the cacheable bits based on * the assumption that we can write to this page. @@ -2787,6 +2617,7 @@ vm_page_lock_queues(); PMAP_LOCK(pmap); + cpu_idcache_wbinv_all(); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { if (pv->pv_flags & PVF_WIRED) { /* The page is wired, cannot remove it now. */ @@ -2813,7 +2644,6 @@ pmap_free_l2_bucket(pmap, l2b, 1); } vm_page_unlock_queues(); - cpu_idcache_wbinv_all(); cpu_tlb_flushID(); cpu_cpwait(); PMAP_UNLOCK(pmap); @@ -3180,6 +3010,7 @@ if (TAILQ_EMPTY(&m->md.pv_list)) return; mtx_assert(&vm_page_queue_mtx, MA_OWNED); + pmap_remove_write(m); curpm = vmspace_pmap(curproc->p_vmspace); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { if (flush == FALSE && (pv->pv_pmap == curpm || @@ -3569,7 +3400,7 @@ if (m) - pmap_vac_me_harder(m, pmap, va); + pmap_fix_cache(m, pmap, va); } } @@ -3828,7 +3659,7 @@ bzero(&pmap->pm_stats, sizeof pmap->pm_stats); pmap->pm_stats.resident_count = 1; if (vector_page < KERNBASE) { - pmap_enter(pmap, vector_page, + pmap_enter(pmap, vector_page, VM_PROT_READ, PHYS_TO_VM_PAGE(systempage.pv_pa), VM_PROT_READ, 1); } @@ -3867,25 +3698,20 @@ return ret_value; } - /* * Remove the given range of addresses from the specified map. * * It is assumed that the start and end are properly * rounded to the page size. */ -#define PMAP_REMOVE_CLEAN_LIST_SIZE 3 +#define PMAP_REMOVE_CLEAN_LIST_SIZE 3 void pmap_remove(pmap_t pm, vm_offset_t sva, vm_offset_t eva) { struct l2_bucket *l2b; vm_offset_t next_bucket; pt_entry_t *ptep; - u_int cleanlist_idx, total, cnt; - struct { - vm_offset_t va; - pt_entry_t *pte; - } cleanlist[PMAP_REMOVE_CLEAN_LIST_SIZE]; + u_int total; u_int mappings, is_exec, is_refd; int flushall = 0; @@ -3896,11 +3722,6 @@ vm_page_lock_queues(); PMAP_LOCK(pm); - if (!pmap_is_current(pm)) { - cleanlist_idx = PMAP_REMOVE_CLEAN_LIST_SIZE + 1; - } else - cleanlist_idx = 0; - total = 0; while (sva < eva) { /* @@ -3956,89 +3777,35 @@ } } - if (!l2pte_valid(pte)) { - *ptep = 0; - PTE_SYNC_CURRENT(pm, ptep); - sva += PAGE_SIZE; - ptep++; - mappings++; - continue; - } - - if (cleanlist_idx < PMAP_REMOVE_CLEAN_LIST_SIZE) { - /* Add to the clean list. */ - cleanlist[cleanlist_idx].pte = ptep; - cleanlist[cleanlist_idx].va = - sva | (is_exec & 1); - cleanlist_idx++; - } else - if (cleanlist_idx == PMAP_REMOVE_CLEAN_LIST_SIZE) { - /* Nuke everything if needed. */ - pmap_idcache_wbinv_all(pm); - pmap_tlb_flushID(pm); - - /* - * Roll back the previous PTE list, - * and zero out the current PTE. - */ - for (cnt = 0; - cnt < PMAP_REMOVE_CLEAN_LIST_SIZE; cnt++) { - *cleanlist[cnt].pte = 0; + if (l2pte_valid(pte) && pmap_is_current(pm)) { + if (total < PMAP_REMOVE_CLEAN_LIST_SIZE) { + total++; + if (is_exec) { + cpu_idcache_wbinv_range(sva, + PAGE_SIZE); + cpu_tlb_flushID_SE(sva); + } else if (is_refd) { + cpu_dcache_wbinv_range(sva, + PAGE_SIZE); + cpu_tlb_flushD_SE(sva); + } + } else if (total == PMAP_REMOVE_CLEAN_LIST_SIZE) { + /* flushall will also only get set for + * for a current pmap >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Feb 3 10:48:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C172216A421; Sun, 3 Feb 2008 10:48:37 +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 8502C16A417 for ; Sun, 3 Feb 2008 10:48:37 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 758D613C4D1 for ; Sun, 3 Feb 2008 10:48:37 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13AmbaS066416 for ; Sun, 3 Feb 2008 10:48:37 GMT (envelope-from andre@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13AmbeD066413 for perforce@freebsd.org; Sun, 3 Feb 2008 10:48:37 GMT (envelope-from andre@freebsd.org) Date: Sun, 3 Feb 2008 10:48:37 GMT Message-Id: <200802031048.m13AmbeD066413@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andre@freebsd.org using -f From: Andre Oppermann To: Perforce Change Reviews Cc: Subject: PERFORCE change 134712 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 10:48:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=134712 Change 134712 by andre@andre_flirtbox on 2008/02/03 10:48:06 Push work in progress on TCP rewrite from my local branch into perforce. TCP input is completely rewritten and restructured. This condenses it down quite a bit and makes it very readable and understandable again. Details: - tcp_do_segment() rewritten and condensed - all cruft removed - all congestion control removed to reappear in modular tcp_congest.c - window update handling fixed and moved to its own function - connection timing handling move to its own function (rtt, srtt) - urgent data handling move to its own function Please note that this is work in progress and neither complete nor functional at the moment. The other modified files to follow one by one. Affected files ... .. //depot/projects/tcp_new/netinet/tcp_input.c#2 edit Differences ... ==== //depot/projects/tcp_new/netinet/tcp_input.c#2 (text+ko) ==== @@ -153,6 +153,8 @@ static void tcp_dooptions(struct tcpopt *, u_char *, int, int); static void tcp_do_segment(struct mbuf *, struct tcphdr *, struct socket *, struct tcpcb *, int, int); +static void tcp_do_time(struct tcpcb *tp, struct tcphdr *th, + struct tcpopt *to); static void tcp_dropwithreset(struct mbuf *, struct tcphdr *, struct tcpcb *, int, int); static void tcp_pulloutofband(struct socket *, @@ -864,392 +866,87 @@ return; } +#define tcplog (s = tcp_log_addrs(tcpcbtoinc(tp), th, NULL, NULL)) + static void tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcpcb *tp, int drop_hdrlen, int tlen) { - int thflags, acked, ourfinisacked, needoutput = 0; - int headlocked = 1; - int rstreason, todrop, win; - u_long tiwin; + int thflags, acked, ourfinisacked, nudgeoutput = 0; + int rstreason, todrop, rwin; + tcp_win tiwin; struct tcpopt to; + char *s = NULL; -#ifdef TCPDEBUG - /* - * The size of tcp_saveipgen must be the size of the max ip header, - * now IPv6. - */ - u_char tcp_saveipgen[IP6_HDR_LEN]; - struct tcphdr tcp_savetcp; - short ostate = 0; -#endif - thflags = th->th_flags; - INP_INFO_WLOCK_ASSERT(&tcbinfo); INP_LOCK_ASSERT(tp->t_inpcb); - KASSERT(tp->t_state > TCPS_LISTEN, ("%s: TCPS_LISTEN", - __func__)); - KASSERT(tp->t_state != TCPS_TIME_WAIT, ("%s: TCPS_TIME_WAIT", - __func__)); + KASSERT(tp->t_state > TCPS_LISTEN, + ("%s: TCPS_LISTEN", __func__)); + KASSERT(tp->t_state != TCPS_TIME_WAIT, + ("%s: TCPS_TIME_WAIT", __func__)); /* - * Segment received on connection. - * Reset idle time and keep-alive timer. - * XXX: This should be done after segment - * validation to ignore broken/spoofed segs. + * Store the flags in a variable for easy manipulation. */ - tp->t_rcvtime = ticks; - if (TCPS_HAVEESTABLISHED(tp->t_state)) - tcp_timer_activate(tp, TT_KEEP, tcp_keepidle); + thflags = th->th_flags; /* * Unscale the window into a 32-bit value. - * For the SYN_SENT state the scale is zero. + * + * NB: For the SYN_SENT state the scale is zero. */ tiwin = th->th_win << tp->snd_scale; /* - * Parse options on any incoming segment. + * Parse options on any incoming segment (if present). */ - tcp_dooptions(&to, (u_char *)(th + 1), - (th->th_off << 2) - sizeof(struct tcphdr), - (thflags & TH_SYN) ? TO_SYN : 0); + if ((th->th_off << 2) != sizeof(struct tcphdr)) + tcp_dooptions(&to, (u_char *)(th + 1), + (th->th_off << 2) - sizeof(struct tcphdr), + (thflags & TH_SYN) ? TO_SYN : 0); + else + to.to_flags = 0; /* - * If echoed timestamp is later than the current time, - * fall back to non RFC1323 RTT calculation. Normalize - * timestamp if syncookies were used when this connection - * was established. + * Normalize timestamp if syncookies were used when this + * connection was established. */ - if ((to.to_flags & TOF_TS) && (to.to_tsecr != 0)) { + if (to.to_flags & TOF_TS) to.to_tsecr -= tp->ts_offset; - if (TSTMP_GT(to.to_tsecr, ticks)) - to.to_tsecr = 0; - } /* - * Process options only when we get SYN/ACK back. The SYN case - * for incoming connections is handled in tcp_syncache. - * According to RFC1323 the window field in a SYN (i.e., a - * or ) segment itself is never scaled. - * XXX this is traditional behavior, may need to be cleaned up. + * Calculate amount of space in receive window. + * Receive window is amount of space in rcv queue, + * but not less than advertised window. */ - if (tp->t_state == TCPS_SYN_SENT && (thflags & TH_SYN)) { - if ((to.to_flags & TOF_SCALE) && - (tp->t_flags & TF_REQ_SCALE)) { - tp->t_flags |= TF_RCVD_SCALE; - tp->snd_scale = to.to_wscale; - } - /* - * Initial send window. It will be updated with - * the next incoming segment to the scaled value. - */ - tp->snd_wnd = th->th_win; - if (to.to_flags & TOF_TS) { - tp->t_flags |= TF_RCVD_TSTMP; - tp->ts_recent = to.to_tsval; - tp->ts_recent_age = ticks; - } - if (to.to_flags & TOF_MSS) - tcp_mss(tp, to.to_mss); - if ((tp->t_flags & TF_SACK_PERMIT) && - (to.to_flags & TOF_SACKPERM) == 0) - tp->t_flags &= ~TF_SACK_PERMIT; - } + rwin = sbspace(&so->so_rcv); + rwin = imax(rwin, (int)(tp->rcv_adv - tp->rcv_nxt)); /* - * Header prediction: check for the two common cases - * of a uni-directional data xfer. If the packet has - * no control flags, is in-sequence, the window didn't - * change and we're not retransmitting, it's a - * candidate. If the length is zero and the ack moved - * forward, we're the sender side of the xfer. Just - * free the data acked & wake any higher level process - * that was blocked waiting for space. If the length - * is non-zero and the ack didn't move, we're the - * receiver side. If we're getting packets in-order - * (the reassembly queue is empty), add the data to - * the socket buffer and note that we need a delayed ack. - * Make sure that the hidden state-flags are also off. - * Since we check for TCPS_ESTABLISHED first, it can only - * be TH_NEEDSYN. - */ - if (tp->t_state == TCPS_ESTABLISHED && - th->th_seq == tp->rcv_nxt && - (thflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) == TH_ACK && - tp->snd_nxt == tp->snd_max && - tiwin && tiwin == tp->snd_wnd && - ((tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) == 0) && - LIST_EMPTY(&tp->t_segq) && - ((to.to_flags & TOF_TS) == 0 || - TSTMP_GEQ(to.to_tsval, tp->ts_recent)) ) { - - /* - * If last ACK falls within this segment's sequence numbers, - * record the timestamp. - * NOTE that the test is modified according to the latest - * proposal of the tcplw@cray.com list (Braden 1993/04/26). - */ - if ((to.to_flags & TOF_TS) != 0 && - SEQ_LEQ(th->th_seq, tp->last_ack_sent)) { - tp->ts_recent_age = ticks; - tp->ts_recent = to.to_tsval; - } - - if (tlen == 0) { - if (SEQ_GT(th->th_ack, tp->snd_una) && - SEQ_LEQ(th->th_ack, tp->snd_max) && - tp->snd_cwnd >= tp->snd_wnd && - ((!tcp_do_newreno && - !(tp->t_flags & TF_SACK_PERMIT) && - tp->t_dupacks < tcprexmtthresh) || - ((tcp_do_newreno || - (tp->t_flags & TF_SACK_PERMIT)) && - !IN_FASTRECOVERY(tp) && - (to.to_flags & TOF_SACK) == 0 && - TAILQ_EMPTY(&tp->snd_holes)))) { - KASSERT(headlocked, - ("%s: headlocked", __func__)); - INP_INFO_WUNLOCK(&tcbinfo); - headlocked = 0; - /* - * This is a pure ack for outstanding data. - */ - ++tcpstat.tcps_predack; - /* - * "bad retransmit" recovery. - */ - if (tp->t_rxtshift == 1 && - ticks < tp->t_badrxtwin) { - ++tcpstat.tcps_sndrexmitbad; - tp->snd_cwnd = tp->snd_cwnd_prev; - tp->snd_ssthresh = - tp->snd_ssthresh_prev; - tp->snd_recover = tp->snd_recover_prev; - if (tp->t_flags & TF_WASFRECOVERY) - ENTER_FASTRECOVERY(tp); - tp->snd_nxt = tp->snd_max; - tp->t_badrxtwin = 0; - } - - /* - * Recalculate the transmit timer / rtt. - * - * Some boxes send broken timestamp replies - * during the SYN+ACK phase, ignore - * timestamps of 0 or we could calculate a - * huge RTT and blow up the retransmit timer. - */ - if ((to.to_flags & TOF_TS) != 0 && - to.to_tsecr) { - if (!tp->t_rttlow || - tp->t_rttlow > ticks - to.to_tsecr) - tp->t_rttlow = ticks - to.to_tsecr; - tcp_xmit_timer(tp, - ticks - to.to_tsecr + 1); - } else if (tp->t_rtttime && - SEQ_GT(th->th_ack, tp->t_rtseq)) { - if (!tp->t_rttlow || - tp->t_rttlow > ticks - tp->t_rtttime) - tp->t_rttlow = ticks - tp->t_rtttime; - tcp_xmit_timer(tp, - ticks - tp->t_rtttime); - } - tcp_xmit_bandwidth_limit(tp, th->th_ack); - acked = th->th_ack - tp->snd_una; - tcpstat.tcps_rcvackpack++; - tcpstat.tcps_rcvackbyte += acked; - sbdrop(&so->so_snd, acked); - if (SEQ_GT(tp->snd_una, tp->snd_recover) && - SEQ_LEQ(th->th_ack, tp->snd_recover)) - tp->snd_recover = th->th_ack - 1; - tp->snd_una = th->th_ack; - /* - * Pull snd_wl2 up to prevent seq wrap relative - * to th_ack. - */ - tp->snd_wl2 = th->th_ack; - tp->t_dupacks = 0; - m_freem(m); - ND6_HINT(tp); /* Some progress has been made. */ - - /* - * If all outstanding data are acked, stop - * retransmit timer, otherwise restart timer - * using current (possibly backed-off) value. - * If process is waiting for space, - * wakeup/selwakeup/signal. If data - * are ready to send, let tcp_output - * decide between more output or persist. - */ -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) - tcp_trace(TA_INPUT, ostate, tp, - (void *)tcp_saveipgen, - &tcp_savetcp, 0); -#endif - if (tp->snd_una == tp->snd_max) - tcp_timer_activate(tp, TT_REXMT, 0); - else if (!tcp_timer_active(tp, TT_PERSIST)) - tcp_timer_activate(tp, TT_REXMT, - tp->t_rxtcur); - sowwakeup(so); - if (so->so_snd.sb_cc) - (void) tcp_output(tp); - goto check_delack; - } - } else if (th->th_ack == tp->snd_una && - tlen <= sbspace(&so->so_rcv)) { - int newsize = 0; /* automatic sockbuf scaling */ - - KASSERT(headlocked, ("%s: headlocked", __func__)); - INP_INFO_WUNLOCK(&tcbinfo); - headlocked = 0; - /* - * This is a pure, in-sequence data packet - * with nothing on the reassembly queue and - * we have enough buffer space to take it. - */ - /* Clean receiver SACK report if present */ - if ((tp->t_flags & TF_SACK_PERMIT) && tp->rcv_numsacks) - tcp_clean_sackreport(tp); - ++tcpstat.tcps_preddat; - tp->rcv_nxt += tlen; - /* - * Pull snd_wl1 up to prevent seq wrap relative to - * th_seq. - */ - tp->snd_wl1 = th->th_seq; - /* - * Pull rcv_up up to prevent seq wrap relative to - * rcv_nxt. - */ - tp->rcv_up = tp->rcv_nxt; - tcpstat.tcps_rcvpack++; - tcpstat.tcps_rcvbyte += tlen; - ND6_HINT(tp); /* Some progress has been made */ -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) - tcp_trace(TA_INPUT, ostate, tp, - (void *)tcp_saveipgen, &tcp_savetcp, 0); -#endif - /* - * Automatic sizing of receive socket buffer. Often the send - * buffer size is not optimally adjusted to the actual network - * conditions at hand (delay bandwidth product). Setting the - * buffer size too small limits throughput on links with high - * bandwidth and high delay (eg. trans-continental/oceanic links). - * - * On the receive side the socket buffer memory is only rarely - * used to any significant extent. This allows us to be much - * more aggressive in scaling the receive socket buffer. For - * the case that the buffer space is actually used to a large - * extent and we run out of kernel memory we can simply drop - * the new segments; TCP on the sender will just retransmit it - * later. Setting the buffer size too big may only consume too - * much kernel memory if the application doesn't read() from - * the socket or packet loss or reordering makes use of the - * reassembly queue. - * - * The criteria to step up the receive buffer one notch are: - * 1. the number of bytes received during the time it takes - * one timestamp to be reflected back to us (the RTT); - * 2. received bytes per RTT is within seven eighth of the - * current socket buffer size; - * 3. receive buffer size has not hit maximal automatic size; - * - * This algorithm does one step per RTT at most and only if - * we receive a bulk stream w/o packet losses or reorderings. - * Shrinking the buffer during idle times is not necessary as - * it doesn't consume any memory when idle. - * - * TODO: Only step up if the application is actually serving - * the buffer to better manage the socket buffer resources. - */ - if (tcp_do_autorcvbuf && - to.to_tsecr && - (so->so_rcv.sb_flags & SB_AUTOSIZE)) { - if (to.to_tsecr > tp->rfbuf_ts && - to.to_tsecr - tp->rfbuf_ts < hz) { - if (tp->rfbuf_cnt > - (so->so_rcv.sb_hiwat / 8 * 7) && - so->so_rcv.sb_hiwat < - tcp_autorcvbuf_max) { - newsize = - min(so->so_rcv.sb_hiwat + - tcp_autorcvbuf_inc, - tcp_autorcvbuf_max); - } - /* Start over with next RTT. */ - tp->rfbuf_ts = 0; - tp->rfbuf_cnt = 0; - } else - tp->rfbuf_cnt += tlen; /* add up */ - } - - /* Add data to socket buffer. */ - SOCKBUF_LOCK(&so->so_rcv); - if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { - m_freem(m); - } else { - /* - * Set new socket buffer size. - * Give up when limit is reached. - */ - if (newsize) - if (!sbreserve_locked(&so->so_rcv, - newsize, so, curthread)) - so->so_rcv.sb_flags &= ~SB_AUTOSIZE; - m_adj(m, drop_hdrlen); /* delayed header drop */ - sbappendstream_locked(&so->so_rcv, m); - } - /* NB: sorwakeup_locked() does an implicit unlock. */ - sorwakeup_locked(so); - if (DELAY_ACK(tp)) { - tp->t_flags |= TF_DELACK; - } else { - tp->t_flags |= TF_ACKNOW; - tcp_output(tp); - } - goto check_delack; - } - } - - /* - * Calculate amount of space in receive window, - * and then do TCP input processing. - * Receive window is amount of space in rcv queue, - * but not less than advertised window. + * Validation checks. We may get any shit here. Have to be careful. */ - win = sbspace(&so->so_rcv); - if (win < 0) - win = 0; - tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); - - /* Reset receive buffer auto scaling when not in bulk receive mode. */ - tp->rfbuf_ts = 0; - tp->rfbuf_cnt = 0; - switch (tp->t_state) { - /* * If the state is SYN_RECEIVED: - * if seg contains an ACK, but not for our SYN/ACK, send a RST. + * syncache handled all validation, socket, inpcb and tcpcb + * setup for us. All that is left is the state transition + * into established state and initializations of the timers. */ case TCPS_SYN_RECEIVED: - if ((thflags & TH_ACK) && - (SEQ_LEQ(th->th_ack, tp->snd_una) || - SEQ_GT(th->th_ack, tp->snd_max))) { - rstreason = BANDLIM_RST_OPENPORT; - goto dropwithreset; - } + tp->t_starttime = ticks; + tp->t_state = TCPS_ESTABLISHED; + + soisconnected(so); + tcp_timer_activate(tp, TT_KEEP, tcp_keepidle); /* XXX: not here */ + + tcpstat.tcps_connects++; break; /* * If the state is SYN_SENT: + * if seg contains a RST, then drop the connection. + * if seg does not contain SYN and ACK, then drop it. * if seg contains an ACK, but not for our SYN, drop the input. - * if seg contains a RST, then drop the connection. - * if seg does not contain SYN, then drop it. * Otherwise this is an acceptable SYN segment * initialize tp->rcv_nxt and tp->irs * if seg contains ack then advance tp->snd_una @@ -1258,771 +955,527 @@ * continue processing rest of data/controls, beginning with URG */ case TCPS_SYN_SENT: - if ((thflags & TH_ACK) && - (SEQ_LEQ(th->th_ack, tp->iss) || - SEQ_GT(th->th_ack, tp->snd_max))) { - rstreason = BANDLIM_UNLIMITED; + /* + * RST is handled below. + */ + if (thflags & TH_RST) + break; + + /* + * SYN|ACK must be present. + */ + if (thflags & (TH_SYN|TH_ACK) != (TH_SYN|TH_ACK)) { + tcplog("Missing SYN|ACK, segment ignored"); + goto drop; + } + + /* + * ACK must ack our ISN and any data we may + * have sent with our SYN. + */ + if (SEQ_LEQ(th->th_ack, tp->snd_iss) || + SEQ_GEQ(th->th_ack, tp->snd_nxt) || + SEQ_LT(th->th_ack, tp->snd_una)) { + tcplog("Incorrect ACK, segment rejected"); + /* XXXAO: Close connection? Or ignore. */ goto dropwithreset; } - if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) - tp = tcp_drop(tp, ECONNREFUSED); - if (thflags & TH_RST) - goto drop; - if (!(thflags & TH_SYN)) - goto drop; + + /* + * Option processing: + * + * If there wasn't a MSS option fall back to + * default mss. + */ + if (!(tp->t_flags & TF_NOOPT) && (to.to_flags & TOF_MSS)) + tcp_mss(tp, to.to_mss); + else if (tcp_do_path_mtu_discovery) + /* MTU of interface... */ + else + tcp_mss(tp, tcp_mssdflt); - tp->irs = th->th_seq; - tcp_rcvseqinit(tp); - if (thflags & TH_ACK) { - tcpstat.tcps_connects++; - soisconnected(so); -#ifdef MAC - SOCK_LOCK(so); - mac_socketpeer_set_from_mbuf(m, so); - SOCK_UNLOCK(so); -#endif - /* Do window scaling on this connection? */ - if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) == - (TF_RCVD_SCALE|TF_REQ_SCALE)) { - tp->rcv_scale = tp->request_r_scale; - } - tp->rcv_adv += tp->rcv_wnd; - tp->snd_una++; /* SYN is acked */ + /* + * Do window scaling on this connection? + * + * NB: According to RFC1323 the window field + * in a SYN (i.e., a or ) + * segment itself is never scaled. + */ + if ((tp->t_flags & TF_WINSCALE) && + (to.to_flags & TOF_SCALE)) { + tp->snd_scale = to.to_wscale; + } else if (tp->t_flags & TF_WINSCALE) { + tp->t_flags &= ~TF_WINSCALE; + tp->rcv_scale = 0; + } else if (to.to_flags & TOF_SCALE) { /* - * If there's data, delay ACK; if there's also a FIN - * ACKNOW will be turned on later. + * The remote end doesn't play right with us + * and introduces options we haven't sent. */ - if (DELAY_ACK(tp) && tlen != 0) - tcp_timer_activate(tp, TT_DELACK, - tcp_delacktime); - else - tp->t_flags |= TF_ACKNOW; + tcplog("Window Scaling Option unexpected, " + "connection aborted"); + tp->t_error = ENETRESET; /* XXX: Correct error? */ + tp = tcp_close(tp); + rstreason = BANDLIM_UNLIMITED; + goto dropwithreset; + } + + /* + * Do timestamps on this connection? + */ + if ((tp->t_flags & TF_TIMESTAMP) && + !(to.to_flags & TOF_TS)) + tp->t_flags &= ~TF_TIMESTAMP; + if (!(tp->t_flags & TF_TIMESTAMP) && + (to.to_flags & TOF_TS)) { /* - * Received in SYN_SENT[*] state. - * Transitions: - * SYN_SENT --> ESTABLISHED - * SYN_SENT* --> FIN_WAIT_1 + * The remote end doesn't play right with us + * and introduces options we haven't sent. */ - tp->t_starttime = ticks; - if (tp->t_flags & TF_NEEDFIN) { - tp->t_state = TCPS_FIN_WAIT_1; - tp->t_flags &= ~TF_NEEDFIN; - thflags &= ~TH_SYN; - } else { - tp->t_state = TCPS_ESTABLISHED; - tcp_timer_activate(tp, TT_KEEP, tcp_keepidle); - } - } else { + tcplog("Timestamp unexpected, " + "connection aborted"); + tp->t_error = ENETRESET; + tp = tcp_close(tp); + rstreason = BANDLIM_UNLIMITED; + goto dropwithreset; + } + + /* + * Do SACK on this connection? + */ + if ((tp->t_flags & TF_SACK_PERMIT) && + !(to.to_flags & TOF_SACKPERM)) + tp->t_flags &= ~TF_SACK_PERMIT; + if (!(tp->t_flags & TF_SACK_PERMIT) && + (to.to_flags & TOF_SACKPERM)) { /* - * Received initial SYN in SYN-SENT[*] state => - * simultaneous open. If segment contains CC option - * and there is a cached CC, apply TAO test. - * If it succeeds, connection is * half-synchronized. - * Otherwise, do 3-way handshake: - * SYN-SENT -> SYN-RECEIVED - * SYN-SENT* -> SYN-RECEIVED* - * If there was no CC option, clear cached CC value. + * The remote end doesn't play right with us + * and introduces options we haven't sent. */ - tp->t_flags |= (TF_ACKNOW | TF_NEEDSYN); - tcp_timer_activate(tp, TT_REXMT, 0); - tp->t_state = TCPS_SYN_RECEIVED; + tcplog("SACK Permitted unexpected, " + "connection aborted"); + tp->t_error = ENETRESET; + tp = tcp_close(tp); + rstreason = BANDLIM_UNLIMITED; + goto dropwithreset; } - KASSERT(headlocked, ("%s: trimthenstep6: head not locked", - __func__)); - INP_LOCK_ASSERT(tp->t_inpcb); - /* - * Advance th->th_seq to correspond to first data byte. - * If data, trim to stay within window, - * dropping FIN if necessary. + * Initialize receive structure. */ - th->th_seq++; - if (tlen > tp->rcv_wnd) { - todrop = tlen - tp->rcv_wnd; - m_adj(m, -todrop); - tlen = tp->rcv_wnd; - thflags &= ~TH_FIN; - tcpstat.tcps_rcvpackafterwin++; - tcpstat.tcps_rcvbyteafterwin += todrop; - } - tp->snd_wl1 = th->th_seq - 1; + tp->rcv_adv += rwin; /* XXX */ + tp->irs = th->th_seq; tp->rcv_up = th->th_seq; + tcp_rcvseqinit(tp); + /* - * Client side of transaction: already sent SYN and data. - * If the remote host used T/TCP to validate the SYN, - * our data will be ACK'd; if so, enter normal data segment - * processing in the middle of step 5, ack processing. - * Otherwise, goto step 6. + * Process SYN and integrate sequence number. */ - if (thflags & TH_ACK) - goto process_ACK; + tp->snd_una++; + tp->snd_wu_seq = th->th_seq; + tp->snd_wu_ack = th->th_ack; + th->th_seq++; /* SYN is acked */ + thflags &= ~TH_SYN; /* SYN is processed */ - goto step6; + tp->t_starttime = ticks; + tp->t_state = TCPS_ESTABLISHED; +#ifdef MAC + SOCK_LOCK(so); + mac_set_socket_peer_from_mbuf(m, so); + SOCK_UNLOCK(so); +#endif + soisconnected(so); + tcp_timer_activate(tp, TT_KEEP, tcp_keepidle); /* XXX */ + tcpstat.tcps_connects++; + break; /* - * If the state is LAST_ACK or CLOSING or TIME_WAIT: - * do normal processing. - * - * NB: Leftover from RFC1644 T/TCP. Cases to be reused later. + * All other states where a connection was established before. */ + case TCPS_ESTABLISHED: + case TCPS_CLOSE_WAIT: + case TCPS_FIN_WAIT_1: + case TCPS_CLOSING: case TCPS_LAST_ACK: - case TCPS_CLOSING: - break; /* continue normal processing */ - } + case TCPS_FIN_WAIT_2: + /* + * SYN and RST are handled separately below. + */ + if (thflags & (TH_SYN|TH_RST)) + break; + + /* + * Segments without ACK are invalid. + */ + if (!(thflags & TH_ACK)) { + tcplog("ACK missing, segment ignored"); + goto drop; + } + + /* + * Don't accept ack'ing of older than previously ack'd data. + * XXXAO: Careful with out-of-order data. Must check seq too. + * reordering and bidirectional data transfer. + * XXXAO: Is this check really useful? + */ + if (SEQ_LT(th->th_ack, tp->snd_una) && + SEQ_LT(th->th_seq, tp->rcv_nxt)) { + tcplog("Acking old data, segment ignored, " + "sending challenge ACK"); + goto dropafterack; + } + + /* + * Don't accept ack'ing of more than actually sent data. + */ + if (SEQ_GT(th->th_ack, tp->snd_max)) { + tcplog("Acking data not yet sent, segment ignored, " + "sending challenge ACK"); + tcpstat.tcps_rcvacktoomuch++; + goto dropafterack; + } + + /* + * Don't accept start of SEQ beyond receive window. + * Allow for a window probe with one byte. + * XXXAO: Window probe statistics. + */ + if (SEQ_GT(th->th_seq, tp->rcv_nxt + tp->rcv_win)) { + tcplog("Data beyond window, segment ignored, " + "sending challenge ACK"); + goto dropafterack; + } + + /* + * Don't accept too old retransmits. + * XXXAO: Use largest window we've ever sent. + * sb_hiwat is pretty much that. We normally + * don't shrink the receive socket buffer. + */ + if (SEQ_LT(th->th_seq, + tp->rcv_nxt - so->so_rcv.sb_hiwat - tlen)) { + tcplog("Too old retransmit, segment ignored, " + "sending challenge ACK"); + goto dropafterack; + } - /* - * States other than LISTEN or SYN_SENT. - * First check the RST flag and sequence number since reset segments - * are exempt from the timestamp and connection count tests. This - * fixes a bug introduced by the Stevens, vol. 2, p. 960 bugfix - * below which allowed reset segments in half the sequence space - * to fall though and be processed (which gives forged reset - * segments with a random sequence number a 50 percent chance of - * killing a connection). - * Then check timestamp, if present. - * Then check the connection count, if present. - * Then check that at least some bytes of segment are within - * receive window. If segment begins before rcv_nxt, - * drop leading data (and SYN); if nothing left, just ack. - * - * - * If the RST bit is set, check the sequence number to see - * if this is a valid reset segment. - * RFC 793 page 37: - * In all states except SYN-SENT, all reset (RST) segments - * are validated by checking their SEQ-fields. A reset is - * valid if its sequence number is in the window. - * Note: this does not take into account delayed ACKs, so - * we should test against last_ack_sent instead of rcv_nxt. - * The sequence number in the reset segment is normally an - * echo of our outgoing acknowlegement numbers, but some hosts - * send a reset with the sequence number at the rightmost edge - * of our receive window, and we have to handle this case. - * Note 2: Paul Watson's paper "Slipping in the Window" has shown - * that brute force RST attacks are possible. To combat this, - * we use a much stricter check while in the ESTABLISHED state, - * only accepting RSTs where the sequence number is equal to - * last_ack_sent. In all other states (the states in which a - * RST is more likely), the more permissive check is used. - * If we have multiple segments in flight, the intial reset - * segment sequence numbers will be to the left of last_ack_sent, - * but they will eventually catch up. - * In any case, it never made sense to trim reset segments to - * fit the receive window since RFC 1122 says: - * 4.2.2.12 RST Segment: RFC-793 Section 3.4 - * - * A TCP SHOULD allow a received RST segment to include data. - * - * DISCUSSION - * It has been suggested that a RST segment could contain - * ASCII text that encoded and explained the cause of the - * RST. No standard has yet been established for such - * data. - * - * If the reset segment passes the sequence number test examine - * the state: - * SYN_RECEIVED STATE: - * If passive open, return to LISTEN state. - * If active open, inform user that connection was refused. - * ESTABLISHED, FIN_WAIT_1, FIN_WAIT_2, CLOSE_WAIT STATES: - * Inform user that connection was reset, and close tcb. - * CLOSING, LAST_ACK STATES: - * Close the tcb. - * TIME_WAIT STATE: - * Drop the segment - see Stevens, vol. 2, p. 964 and - * RFC 1337. - */ - if (thflags & TH_RST) { - if (SEQ_GEQ(th->th_seq, tp->last_ack_sent - 1) && - SEQ_LEQ(th->th_seq, tp->last_ack_sent + tp->rcv_wnd)) { - switch (tp->t_state) { + /* + * Don't accept missing TS when TS was negotiated and + * vice versa. + */ + if ((tp->t_flags & TF_TIMESTAMP) && !(to.to_flags & TOF_TS)) { + tcplog("Timestamp missing, segment ignored"); + goto drop; + } + if (!(tp->t_flags & TF_TIMESTAMP) && (to.to_flags & TOF_TS)) { + tcplog("Timestamp unexpected, segment ignored"); + goto drop; + } - case TCPS_SYN_RECEIVED: - so->so_error = ECONNREFUSED; - goto close; + /* + * Don't accept remote ts older than already seen, + * reflected ts newer than what we send last. + * + * TODO-AO: + * PAWS + */ + if ((to.to_flags & TOF_TS) && + ticks - tp->t_rcvtime < PAWS && + (!TSTMP_LT(to.to_tsval, tp->snd_tsecr)) || + TSTMP_GT(to.to_tsecr, tp->snd_tsval))) { + tcplog("Timestamp too old or new, segment ignored"); + goto drop; + } - case TCPS_ESTABLISHED: - if (tcp_insecure_rst == 0 && - !(SEQ_GEQ(th->th_seq, tp->rcv_nxt - 1) && - SEQ_LEQ(th->th_seq, tp->rcv_nxt + 1)) && - !(SEQ_GEQ(th->th_seq, tp->last_ack_sent - 1) && - SEQ_LEQ(th->th_seq, tp->last_ack_sent + 1))) { - tcpstat.tcps_badrst++; - goto drop; - } - /* FALLTHROUGH */ - case TCPS_FIN_WAIT_1: - case TCPS_FIN_WAIT_2: - case TCPS_CLOSE_WAIT: - so->so_error = ECONNRESET; - close: - tp->t_state = TCPS_CLOSED; - tcpstat.tcps_drops++; - KASSERT(headlocked, ("%s: trimthenstep6: " - "tcp_close: head not locked", __func__)); - tp = tcp_close(tp); - break; + /* + * We may receive a retransmit before we sent the delayed + * ACK for the segment in question. This should normally + * not happen and indicates either a timing problem at the + * sender or we delay the ACK too much. + */ + if (SEQ_GT(th->th_seq, tp->snd_lastack) && + SEQ_LT(th->th_seq, tp->rcv_nxt) { + tcplog("Received retransmit before we sent delayed ACK, no action"); + } - case TCPS_CLOSING: - case TCPS_LAST_ACK: - KASSERT(headlocked, ("%s: trimthenstep6: " - "tcp_close.2: head not locked", __func__)); - tp = tcp_close(tp); - break; - } + /* + * Don't accept SACK when is wasn't negotiated at + * connection setup time. + */ + if ((to.to_flags & TOF_SACK) && + !(tp->t_flags & TF_SACK_PERM)) { + tcplog("SACK unexpected, segment ignored"); + goto drop; } + + /* XXX: stats */ + break; + + /* + * Sanity check. + */ + default: + KASSERT(1 == 0, ("%s: Invalid TCP FSM state", __func__)); goto drop; } +#ifdef TCP_SIGNATURE /* - * RFC 1323 PAWS: If we have a timestamp reply on this segment - * and it's less than ts_recent, drop it. + * TCP-MD5 is done after the general acceptability checks + * to run only on most likely valid segments through the + * expensive MD5 hash computation. + * In SYN_RECEIVED case syncache verified the signature + * already. + */ + if ((tp->t_flags & TF_SIGNATURE) && notalreadydone) { + /* Copy signature and compare. */ + tcp_signature_compute(m, sizeof(struct ip), len, optlen, + (u_char *)(th + 1) + sigoff, IPSEC_DIR_INBOUND); + if (!bcomp(orig, computed)) { + tcplog("MD5 signature does not match, " + "segment ignored"); + goto drop; + } + } +#endif + /* + * Fast path for ACK-only segments. */ - if ((to.to_flags & TOF_TS) != 0 && tp->ts_recent && - TSTMP_LT(to.to_tsval, tp->ts_recent)) { + if (tlen == 0 && (thflags & (TH_ACK|TH_RST|TH_SYN)) == TH_ACK) + goto doack; - /* Check to see if ts_recent is over 24 days old. */ - if ((int)(ticks - tp->ts_recent_age) > TCP_PAWS_IDLE) { + /* + * Handle SYN and RST flags for existing connections. + * + * NB: The SYN_SENT case has removed the SYN bit from thflags + * if the segment was accepted. + */ + if (thflags & TH_RST) { + /* + * Any RST after TCPS_SYN_SENT must NOT carry the ACK flag. + * RFC 793 page 65, section SEGMENT ARRIVES. + */ + if (tp->t_state > TCPS_SYN_SENT && + (thflags & TH_ACK)) { + tcplog("RST with ACK invalid, segment ignored"); + tcpstat.tcps_badrst++; + goto drop; + } + /* + * Check if the sequence number is NOT acceptable to us. + */ + if (tp->t_state == TCPS_SYN_SENT) { /* - * Invalidate ts_recent. If this segment updates - * ts_recent, the age will be reset later and ts_recent - * will get a valid value. If it does not, setting - * ts_recent to zero will at least satisfy the - * requirement that zero be placed in the timestamp - * echo reply when ts_recent isn't valid. The - * age isn't reset until we get a valid ts_recent - * because we don't want out-of-order segments to be - * dropped when ts_recent is old. + * In TCPS_SYN_SENT the RST MUST carry the ACK flag. */ - tp->ts_recent = 0; - } else { - tcpstat.tcps_rcvduppack++; - tcpstat.tcps_rcvdupbyte += tlen; - tcpstat.tcps_pawsdrop++; - if (tlen) - goto dropafterack; + if (!(thflags & TH_ACK)) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Feb 3 16:27:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1382516A419; Sun, 3 Feb 2008 16:27:36 +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 B33CC16A417 for ; Sun, 3 Feb 2008 16:27:35 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9378E13C442 for ; Sun, 3 Feb 2008 16:27:35 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13GRZpd004905 for ; Sun, 3 Feb 2008 16:27:35 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13GRZ4x004902 for perforce@freebsd.org; Sun, 3 Feb 2008 16:27:35 GMT (envelope-from rrs@cisco.com) Date: Sun, 3 Feb 2008 16:27:35 GMT Message-Id: <200802031627.m13GRZ4x004902@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 134726 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 16:27:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=134726 Change 134726 by rrs@rrs-mips2-jnpr on 2008/02/03 16:27:23 Adds all the registers from the OCT 16550 UART. Will use to replace ns16550.h soon. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/oct16550.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sun Feb 3 18:33:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A691D16A46B; Sun, 3 Feb 2008 18:33:47 +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 5318816A468 for ; Sun, 3 Feb 2008 18:33:47 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4B60F13C457 for ; Sun, 3 Feb 2008 18:33:47 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13IXlur034331 for ; Sun, 3 Feb 2008 18:33:47 GMT (envelope-from andre@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13IXlJp034327 for perforce@freebsd.org; Sun, 3 Feb 2008 18:33:47 GMT (envelope-from andre@freebsd.org) Date: Sun, 3 Feb 2008 18:33:47 GMT Message-Id: <200802031833.m13IXlJp034327@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andre@freebsd.org using -f From: Andre Oppermann To: Perforce Change Reviews Cc: Subject: PERFORCE change 134732 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 18:33:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=134732 Change 134732 by andre@andre_flirtbox on 2008/02/03 18:33:20 Handle FIN queueing in reassembly queue and cover all edge cases. Sprinkle appropriate KASSERTs. Affected files ... .. //depot/projects/tcp_new/netinet/tcp_input.c#3 edit .. //depot/projects/tcp_reass/netinet/tcp_input.c#4 edit .. //depot/projects/tcp_reass/netinet/tcp_reass.c#16 edit .. //depot/projects/tcp_reass/netinet/tcp_var.h#7 edit Differences ... ==== //depot/projects/tcp_new/netinet/tcp_input.c#3 (text+ko) ==== ==== //depot/projects/tcp_reass/netinet/tcp_input.c#4 (text+ko) ==== @@ -2254,7 +2254,7 @@ * m_adj() doesn't actually frees any mbufs * when trimming from the head. */ - thflags = tcp_reass(tp, th, &tlen, m); + thflags |= tcp_reass(tp, th, &tlen, m); tp->t_flags |= TF_ACKNOW; } #if 0 ==== //depot/projects/tcp_reass/netinet/tcp_reass.c#16 (text+ko) ==== @@ -174,7 +174,7 @@ struct trq *tqe, *tqen; struct socket *so = tp->t_inpcb->inp_socket; struct mbuf *n; - int i, flags = 0, mcnt; + int i, thflags = 0, mcnt; struct trq tqes; INP_LOCK_ASSERT(tp->t_inpcb); @@ -192,6 +192,7 @@ return (0); goto present; } + thflags = (th->th_flags & TH_FIN); /* Check if it is really neccessary to do all the work. */ if (!tcp_reass_enabled && TAILQ_EMPTY(&tp->t_trq)) { @@ -221,6 +222,8 @@ KASSERT(tqen == NULL || SEQ_LT(tqe->trq_seq + tqe->trq_len, tqen->trq_seq), ("%s: overlapping blocks", __func__)); + KASSERT(!(thflags & TH_FIN) || tqe == TAILQ_LAST(&tp->t_trq, trq_head), + ("%s: FIN on block before last one", __func__)); i++; } LIST_FOREACH(tqe, &tp->t_trq_sack, trq_s) { @@ -276,8 +279,33 @@ mcnt += (n->m_flags & M_EXT) ? n->m_ext.ext_size + MSIZE : MSIZE; - /* Check if this segment attaches to the end. */ + /* Check if we've already received FIN; we can't accept data beyond it. */ tqe = TAILQ_LAST(&tp->t_trq, trq_head); + if (tqe && (tqe->trq_thflags & TH_FIN) && SEQ_LEQ(tqe->trq_seq, th->th_seq)) { + /* Properly count retransmitted perfect matching FIN. */ + if (tqe->trq_seq == th->th_seq && *tlenp > 0) + tcpstat.tcps_rcvoopack++; + else { + tcpstat.tcps_rcvpackafterfin++; + tcpstat.tcps_rcvbyteafterfin += *tlenp; + } + m_freem(m); + *tlenp = 0; + return (0); + } + + /* Check if this segments FIN is before the end of the last block. */ + if (tqe && (thflags & TH_FIN) && + SEQ_GT(tqe->trq_seq + tqe->trq_len, th->th_seq + *tlenp)) { + /* TCP statistics. */ + tcpstat.tcps_rcvpackafterfin++; + tcpstat.tcps_rcvbyteafterfin += *tlenp; + m_freem(m); + *tlenp = 0; + return (0); + } + + /* Check if this segment directly attaches to the end. */ if (tqe && tqe->trq_seq + tqe->trq_len == th->th_seq) { tqe->trq_len += *tlenp; tqe->trq_mcnt += mcnt; @@ -285,6 +313,7 @@ tcp_reass_mcnt += mcnt; tqe->trq_ml->m_next = m; tqe->trq_ml = m_last(m); + tqe->trq_thflags |= thflags; if (LIST_FIRST(&tp->t_trq_sack) != tqe) { LIST_REMOVE(tqe, trq_s); LIST_INSERT_HEAD(&tp->t_trq_sack, tqe, trq_s); @@ -355,6 +384,7 @@ tcpstat.tcps_rcvduppack++; tcpstat.tcps_rcvdupbyte += *tlenp; tcpstat.tcps_reass_covered++; + tqe->trq_thflags |= thflags; /* XXXAO: What to SACK report when duplicate? */ if (LIST_FIRST(&tp->t_trq_sack) != tqe) { LIST_REMOVE(tqe, trq_s); @@ -378,6 +408,7 @@ tqe->trq_seq = th->th_seq; tqe->trq_m = m; tqe->trq_ml = m_last(m); + tqe->trq_thflags |= thflags; /* Check if segment bridges next block to merge. */ if (tqen != NULL && SEQ_GEQ(tqe->trq_seq + tqe->trq_len, tqen->trq_seq)) @@ -394,6 +425,8 @@ if (SEQ_GT(tqe->trq_seq, th->th_seq) && SEQ_LEQ(tqe->trq_seq, th->th_seq + *tlenp) && SEQ_GEQ(tqe->trq_seq + tqe->trq_len, th->th_seq + *tlenp)) { + KASSERT(!(thflags & TH_FIN), + ("%s: new segment with FIN can't prepend", __func__)); /* Trim tail of segment. */ if ((i = SEQ_DELTA(tqe->trq_seq, th->th_seq + *tlenp))) { m_adj(m, -i); @@ -440,6 +473,7 @@ tcp_reass_mcnt += mcnt; tqe->trq_ml->m_next = m; tqe->trq_ml = m_last(m); + tqe->trq_thflags |= thflags; /* Check if segment bridges two blocks to merge. */ if (tqen != NULL && SEQ_GEQ(tqe->trq_seq + tqe->trq_len, tqen->trq_seq)) @@ -480,6 +514,7 @@ tcp_reass_mcnt += mcnt; tqen->trq_m = m; tqen->trq_ml = m_last(m); + tqen->trq_thflags |= thflags; /* Where to insert. */ if (tqe != NULL && SEQ_LT(tqe->trq_seq + tqe->trq_len, th->th_seq)) @@ -521,15 +556,14 @@ ("%s: block overlaps into next one", __func__)); if (tqe->trq_seq != tp->rcv_nxt) break; -#if 1 - /* XXX: This is bogus if we had a FIN. */ - flags = tqe->trq_flags; -#endif if (so->so_rcv.sb_state & SBS_CANTRCVMORE) m_freem(tqe->trq_m); else sbappendstream_locked(&so->so_rcv, tqe->trq_m); tp->rcv_nxt += tqe->trq_len; + thflags = tqe->trq_thflags; + KASSERT(!(thflags & TH_FIN) || tqe == TAILQ_LAST(&tp->t_trq, trq_head), + ("%s: FIN not on last block", __func__)); tp->t_trqmcnt -= tqe->trq_mcnt; tcp_reass_mcnt -= tqe->trq_mcnt; TAILQ_REMOVE(&tp->t_trq, tqe, trq_q); @@ -552,11 +586,7 @@ tcp_timer_activate(tp, TT_REASS, 0); ND6_HINT(tp); -#if 1 - return (flags); -#else - return (0); -#endif + return (thflags); } /* ==== //depot/projects/tcp_reass/netinet/tcp_var.h#7 (text+ko) ==== @@ -47,8 +47,7 @@ tcp_seq trq_seq; /* start of block */ int trq_len; /* length of block */ int trq_mcnt; /* gross mbuf size of block */ - int trq_flags; /* flags for segment chain */ -#define TRQ_FIN 0x01 /* FIN was on last segment */ + int trq_thflags; /* thflags for segment chain */ struct mbuf *trq_m; /* mbuf chain of data */ struct mbuf *trq_ml; /* last mbuf in chain of data */ }; @@ -387,6 +386,8 @@ u_long tcps_rcvpackafterwin; /* packets with data after window */ u_long tcps_rcvbyteafterwin; /* bytes rcvd after window */ u_long tcps_rcvafterclose; /* packets rcvd after "close" */ + u_long tcps_rcvpackafterfin; /* packets rcvd after FIN */ + u_long tcps_rcvbyteafterfin; /* bytes rcvd after FIN */ u_long tcps_rcvwinprobe; /* rcvd window probe packets */ u_long tcps_rcvdupack; /* rcvd duplicate acks */ u_long tcps_rcvacktoomuch; /* rcvd acks for unsent data */ From owner-p4-projects@FreeBSD.ORG Sun Feb 3 18:46:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B300516A46C; Sun, 3 Feb 2008 18:46:03 +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 78DC716A419 for ; Sun, 3 Feb 2008 18:46:03 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BD53513C4EA for ; Sun, 3 Feb 2008 18:46:02 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13Ik2mI036074 for ; Sun, 3 Feb 2008 18:46:02 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13Ik24f036071 for perforce@freebsd.org; Sun, 3 Feb 2008 18:46:02 GMT (envelope-from cognet@freebsd.org) Date: Sun, 3 Feb 2008 18:46:02 GMT Message-Id: <200802031846.m13Ik24f036071@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 134734 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 18:46:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=134734 Change 134734 by cognet@cognet-mips on 2008/02/03 18:45:26 Wicked bad evil naughty cognet. the cpu_switch() code uses an hardcoded KSTACK_PAGES of 2, so just map the relevant entries. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#14 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#14 (text+ko) ==== @@ -143,11 +143,11 @@ td2->td_frame->v1 = 1; td2->td_frame->a3 = 0; - if (!(pte = pmap_segmap(kernel_pmap, (vm_offset_t)td2->td_kstack))) + if (!(pte = pmap_segmap(kernel_pmap, td2->td_md.md_realstack))) panic("cpu_fork: invalid segmap"); - pte += ((vm_offset_t)td2->td_kstack >> PGSHIFT) & (NPTEPG - 1); + pte += ((vm_offset_t)td2->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); - for (i = 0; i < KSTACK_PAGES; i++) { + for (i = 0; i < KSTACK_PAGES - 1; i++) { td2->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); pte++; } @@ -230,11 +230,11 @@ * part of the thread struct so cpu_switch() can quickly map in * the pcb struct and kernel stack. */ - if (!(pte = pmap_segmap(kernel_pmap, (vm_offset_t)td->td_kstack))) + if (!(pte = pmap_segmap(kernel_pmap, td->td_md.md_realstack))) panic("cpu_thread_swapin: invalid segmap"); - pte += ((vm_offset_t)td->td_kstack >> PGSHIFT) & (NPTEPG - 1); + pte += ((vm_offset_t)td->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); - for (i = 0; i < KSTACK_PAGES; i++) { + for (i = 0; i < KSTACK_PAGES - 1; i++) { td->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); pte++; } @@ -260,9 +260,9 @@ (td->td_kstack_pages - 1) * PAGE_SIZE) - 1; td->td_frame = &td->td_pcb->pcb_regs; - if (!(pte = pmap_segmap(kernel_pmap, (vm_offset_t)td->td_kstack))) + if (!(pte = pmap_segmap(kernel_pmap, td->td_md.md_realstack))) panic("cpu_thread_alloc: invalid segmap"); - pte += ((vm_offset_t)td->td_kstack >> PGSHIFT) & (NPTEPG - 1); + pte += ((vm_offset_t)td->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); for (i = 0; i < KSTACK_PAGES; i++) { td->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); From owner-p4-projects@FreeBSD.ORG Sun Feb 3 18:50:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 38FFC16A468; Sun, 3 Feb 2008 18:50: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 F2DB616A419 for ; Sun, 3 Feb 2008 18:50:06 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D32A713C478 for ; Sun, 3 Feb 2008 18:50:06 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13Io6mA036309 for ; Sun, 3 Feb 2008 18:50:06 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13Io6Xa036306 for perforce@freebsd.org; Sun, 3 Feb 2008 18:50:06 GMT (envelope-from cognet@freebsd.org) Date: Sun, 3 Feb 2008 18:50:06 GMT Message-Id: <200802031850.m13Io6Xa036306@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 134735 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 18:50:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=134735 Change 134735 by cognet@cognet-mips on 2008/02/03 18:49:20 grrr, KSTACK_PAGES - 1, not KSTACK_PAGES Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#15 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#15 (text+ko) ==== @@ -264,7 +264,7 @@ panic("cpu_thread_alloc: invalid segmap"); pte += ((vm_offset_t)td->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); - for (i = 0; i < KSTACK_PAGES; i++) { + for (i = 0; i < KSTACK_PAGES - 1; i++) { td->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); pte++; } From owner-p4-projects@FreeBSD.ORG Sun Feb 3 18:50:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9404016A50B; Sun, 3 Feb 2008 18:50: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 2684816A420 for ; Sun, 3 Feb 2008 18:50:07 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 06F1013C47E for ; Sun, 3 Feb 2008 18:50:07 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13Io6jv036315 for ; Sun, 3 Feb 2008 18:50:06 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13Io62R036312 for perforce@freebsd.org; Sun, 3 Feb 2008 18:50:06 GMT (envelope-from cognet@freebsd.org) Date: Sun, 3 Feb 2008 18:50:06 GMT Message-Id: <200802031850.m13Io62R036312@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 134736 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 18:50:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=134736 Change 134736 by cognet@cognet-mips on 2008/02/03 18:49:39 More on the KSTACK_PAGES - 1 line. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#23 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#23 (text+ko) ==== @@ -264,7 +264,7 @@ { proc_linkup(&proc0, &thread0); thread0.td_kstack = kstack0; - thread0.td_kstack_pages = KSTACK_PAGES; + thread0.td_kstack_pages = KSTACK_PAGES - 1; if (thread0.td_kstack & (1 << PAGE_SHIFT)) thread0.td_md.md_realstack = thread0.td_kstack + PAGE_SIZE; else From owner-p4-projects@FreeBSD.ORG Sun Feb 3 21:27:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B5B9916A41A; Sun, 3 Feb 2008 21:27:58 +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 7B68C16A418 for ; Sun, 3 Feb 2008 21:27:58 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4A513C4DB for ; Sun, 3 Feb 2008 21:27:53 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13LRrVx060171 for ; Sun, 3 Feb 2008 21:27:53 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13LRrPG060168 for perforce@freebsd.org; Sun, 3 Feb 2008 21:27:53 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 3 Feb 2008 21:27:53 GMT Message-Id: <200802032127.m13LRrPG060168@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134740 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 21:27:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=134740 Change 134740 by rwatson@rwatson_freebsd_capabilities on 2008/02/03 21:27:35 Add a bit of a todo list. Affected files ... .. //depot/projects/trustedbsd/capabilities/TODO#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sun Feb 3 21:31:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 383BC16A420; Sun, 3 Feb 2008 21:31:58 +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 F1D5E16A417 for ; Sun, 3 Feb 2008 21:31:57 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E8FE713C44B for ; Sun, 3 Feb 2008 21:31:57 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13LVv0i060378 for ; Sun, 3 Feb 2008 21:31:57 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13LVvUB060375 for perforce@freebsd.org; Sun, 3 Feb 2008 21:31:57 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 3 Feb 2008 21:31:57 GMT Message-Id: <200802032131.m13LVvUB060375@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134741 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 21:31:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=134741 Change 134741 by rwatson@rwatson_freebsd_capabilities on 2008/02/03 21:31:40 Spell fexecve correctly; accidentally not submitted previousl. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/capabilities.conf#5 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/capabilities.conf#5 (text+ko) ==== @@ -5,7 +5,7 @@ # - sys_exit() and close() are very important. # - Sorted alphabeetically, please keep it that way. # -# $P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/capabilities.conf#4 $ +# $P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/capabilities.conf#5 $ # __acl_aclcheck_fd __acl_delete_fd @@ -69,7 +69,7 @@ # scoped. # fcntl -fexec +fexecve flock fork fpathconf From owner-p4-projects@FreeBSD.ORG Sun Feb 3 21:35:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CD75E16A41A; Sun, 3 Feb 2008 21:35:02 +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 900EC16A419 for ; Sun, 3 Feb 2008 21:35:02 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 86D2A13C442 for ; Sun, 3 Feb 2008 21:35:02 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13LZ2Kg060614 for ; Sun, 3 Feb 2008 21:35:02 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13LZ2Gq060611 for perforce@freebsd.org; Sun, 3 Feb 2008 21:35:02 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 3 Feb 2008 21:35:02 GMT Message-Id: <200802032135.m13LZ2Gq060611@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134744 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 21:35:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=134744 Change 134744 by rwatson@rwatson_freebsd_capabilities on 2008/02/03 21:34:40 Update TODO list, a few things are done, but more needs doing. Affected files ... .. //depot/projects/trustedbsd/capabilities/TODO#2 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/TODO#2 (text+ko) ==== @@ -5,22 +5,17 @@ High-level TODO list: -- New file descriptor type "capability" that allows restricting the rights - associated with more general file descriptor rights. cap_new(2) creates - a capability from an existing file descriptor and requested rights mask. - -- New execution mode "capability mode", in which access to objects is done - [almost] entirely through file descriptors or capabilities. cap_enter() - enters this mode. - -- Implement fexec(2), so that new programs can be launched in capability - mode. - - Implement capfs(3), a library service to provide subsetted file access to a capability mode process, such as read capabilities on certain global or user databases, libraries, etc, with a POSIX interface within the capability mode process. +- Implement scoping for pid-based system calls, tracking a new "inheritence" + relationship to authorize such calls. Unclear what the most efficient way + to do this is, but it only matters for processes actually in capability + mode so won't affect general performance, just capability mode performance + until optimizations are found. + - man pages for system calls - ... bigger and better things ... From owner-p4-projects@FreeBSD.ORG Sun Feb 3 21:41:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 29E1C16A469; Sun, 3 Feb 2008 21:41:10 +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 E351F16A420 for ; Sun, 3 Feb 2008 21:41:09 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D98C013C459 for ; Sun, 3 Feb 2008 21:41:09 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13Lf9he060911 for ; Sun, 3 Feb 2008 21:41:09 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13Lf9pQ060908 for perforce@freebsd.org; Sun, 3 Feb 2008 21:41:09 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 3 Feb 2008 21:41:09 GMT Message-Id: <200802032141.m13Lf9pQ060908@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134745 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 21:41:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=134745 Change 134745 by rwatson@rwatson_freebsd_capabilities on 2008/02/03 21:40:37 Move TODO list in sys_capabilities.c to global TODO, and reference it. Trim some done items, such as fexecve(2), capability mode flagging for system calls from the list on the way. Affected files ... .. //depot/projects/trustedbsd/capabilities/TODO#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#11 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/TODO#3 (text+ko) ==== @@ -22,3 +22,25 @@ Low-level TODO list: +- Review poll/select/kqueue behavior, and in particular decide if/how we want + CAP_EVENT to work. + +- UNIX domain socket passing of file descriptors may need modification to + take into account indirectly referenced descriptors hung off of + capabilities in its GC routine. + +- Consider moving to per-class capability masks, such as CAP_SOCK_FOO, and a + per-class mask identifying possible rights. + +- Look at multi-operation calls such as getsockopt(), setsockopt(), ioctl(), + fcntl(), etc, which may have both global implications and also reflect a + diverse set of rights. Should we do something more fine-grained and + request a specific capability based on arguments and other context? + +- Should there be a priv(9) privilege to expand capability rights? (no) + +- Refine access control on sysctl infrastructure sysctls, such as name + lookup, etc. + +- mmap(2) needs to look at capability masks, not just file flags to determine + maxprot. ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#11 (text+ko) ==== @@ -37,29 +37,11 @@ * nesting, we directly reference the underlying object but with a new mask, * rather than referencing the previous capability. * - * XXXRW: - * - Some operations, such as poll/select/kqueue are explicitly aware of file - * descriptors and may need adapting. - * - UNIX domain socket passing of file descriptors will likely need work, - * especially relating to garbage collection. Do we need to teach the GC - * routines to walk through capabilities to the underlying object - * descriptors so it knows they are reachable? - * - The list of capability rights is probably inadequate. - * - Should there be a privilege to expand capability rights? - * - Should different underlying object sets have different valid capability - * rights? I.e., CAP_SOCK_*, CAP_VNODE_*, etc? - * - Need a way to mask system calls based on capability mode and only allow - * approved system calls. A flag in syscalls.master? - * - Need to refine access control on sysctl infrastructe sysctls, such as - * name lookup. - * - mmap should incorporate capability rights into maxprot, not just file - * flags. - * - Need fexec() or similar primitive to launch code in a sandbox. What - * should this look like? + * XXXRW: See the global TODO for things that need to be done. */ #include -__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#10 $"); +__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#11 $"); #include #include From owner-p4-projects@FreeBSD.ORG Sun Feb 3 21:56:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6D21D16A418; Sun, 3 Feb 2008 21:56: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 1A0D416A469 for ; Sun, 3 Feb 2008 21:56:32 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 104D313C4E5 for ; Sun, 3 Feb 2008 21:56:32 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m13LuVq3061463 for ; Sun, 3 Feb 2008 21:56:31 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m13LuQ87061460 for perforce@freebsd.org; Sun, 3 Feb 2008 21:56:26 GMT (envelope-from cognet@freebsd.org) Date: Sun, 3 Feb 2008 21:56:26 GMT Message-Id: <200802032156.m13LuQ87061460@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 134746 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 21:56:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=134746 Change 134746 by cognet@cognet-mips on 2008/02/03 21:56:13 grrr switch to using KSEG0 for td_kframe for now. If we keep it that way, please remember to switch back KSTACK_PAGES to 2. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#16 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#16 (text+ko) ==== @@ -107,17 +107,23 @@ { register struct proc *p1; struct pcb *pcb2; +#if 0 pt_entry_t *pte; int i; +#endif p1 = td1->td_proc; if ((flags & RFPROC) == 0) return; +#if 0 if(td2->td_kstack & (1 << PAGE_SHIFT)) td2->td_md.md_realstack = td2->td_kstack + PAGE_SIZE; else td2->td_md.md_realstack = td2->td_kstack; +#endif + td2->td_md.md_realstack = + MIPS_PHYS_TO_KSEG0(MIPS_CACHED_TO_PHYS((vm_offset_t)td2->td_kstack)); /* Point the pcb to the top of the stack */ pcb2 = (struct pcb *)(td2->td_md.md_realstack + (td2->td_kstack_pages - 1) * PAGE_SIZE) - 1; @@ -143,6 +149,7 @@ td2->td_frame->v1 = 1; td2->td_frame->a3 = 0; +#if 0 if (!(pte = pmap_segmap(kernel_pmap, td2->td_md.md_realstack))) panic("cpu_fork: invalid segmap"); pte += ((vm_offset_t)td2->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); @@ -151,6 +158,7 @@ td2->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); pte++; } +#endif if (td1 == PCPU_GET(fpcurthread)) MipsSaveCurFPState(td1); @@ -221,6 +229,7 @@ void cpu_thread_swapin(struct thread *td) { +#if 0 pt_entry_t *pte; int i; @@ -238,6 +247,7 @@ td->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); pte++; } +#endif } void @@ -248,6 +258,7 @@ void cpu_thread_alloc(struct thread *td) { +#if 0 pt_entry_t *pte; int i; @@ -255,11 +266,15 @@ td->td_md.md_realstack = td->td_kstack + PAGE_SIZE; else td->td_md.md_realstack = td->td_kstack; +#endif + td->td_md.md_realstack = + MIPS_PHYS_TO_KSEG0(MIPS_CACHED_TO_PHYS((vm_offset_t)td->td_kstack)); td->td_pcb = (struct pcb *)(td->td_md.md_realstack + (td->td_kstack_pages - 1) * PAGE_SIZE) - 1; td->td_frame = &td->td_pcb->pcb_regs; +#if 0 if (!(pte = pmap_segmap(kernel_pmap, td->td_md.md_realstack))) panic("cpu_thread_alloc: invalid segmap"); pte += ((vm_offset_t)td->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); @@ -268,6 +283,7 @@ td->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); pte++; } +#endif } /* From owner-p4-projects@FreeBSD.ORG Mon Feb 4 00:31:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5B8EF16A421; Mon, 4 Feb 2008 00:31:35 +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 066B216A417 for ; Mon, 4 Feb 2008 00:31:34 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A96C413C461 for ; Mon, 4 Feb 2008 00:31:34 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m140VYlH074005 for ; Mon, 4 Feb 2008 00:31:34 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m140VFuS074002 for perforce@freebsd.org; Mon, 4 Feb 2008 00:31:15 GMT (envelope-from sephe@FreeBSD.org) Date: Mon, 4 Feb 2008 00:31:15 GMT Message-Id: <200802040031.m140VFuS074002@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 134753 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 00:31:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=134753 Change 134753 by sephe@sephe_enigma:sam_wifi on 2008/02/04 00:30:32 IFC Affected files ... .. //depot/projects/wifi/LOCKS#3 integrate .. //depot/projects/wifi/MAINTAINERS#17 integrate .. //depot/projects/wifi/Makefile#18 integrate .. //depot/projects/wifi/Makefile.inc1#39 integrate .. //depot/projects/wifi/ObsoleteFiles.inc#25 integrate .. //depot/projects/wifi/UPDATING#37 integrate .. //depot/projects/wifi/contrib/binutils/libiberty/cp-demangle.c#2 integrate .. //depot/projects/wifi/contrib/cvs/AUTHORS#2 integrate .. //depot/projects/wifi/contrib/cvs/BUGS#2 integrate .. //depot/projects/wifi/contrib/cvs/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/cvs/FAQ#2 integrate .. //depot/projects/wifi/contrib/cvs/FREEBSD-Xlist#2 integrate .. //depot/projects/wifi/contrib/cvs/FREEBSD-upgrade#2 integrate .. //depot/projects/wifi/contrib/cvs/HACKING#2 integrate .. //depot/projects/wifi/contrib/cvs/INSTALL#2 integrate .. //depot/projects/wifi/contrib/cvs/Makefile.in#2 integrate .. //depot/projects/wifi/contrib/cvs/NEWS#2 integrate .. //depot/projects/wifi/contrib/cvs/README#2 integrate .. //depot/projects/wifi/contrib/cvs/TESTS#2 integrate .. //depot/projects/wifi/contrib/cvs/TODO#2 integrate .. //depot/projects/wifi/contrib/cvs/acinclude.m4#2 integrate .. //depot/projects/wifi/contrib/cvs/aclocal.m4#2 integrate .. //depot/projects/wifi/contrib/cvs/config.h.in#2 integrate .. //depot/projects/wifi/contrib/cvs/configure#2 integrate .. //depot/projects/wifi/contrib/cvs/configure.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/Makefile.am#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/Makefile.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/README#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/clmerge.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/cln_hist.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/commit_prep.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/cvs2vendor.sh#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/cvs_acls.html#1 branch .. //depot/projects/wifi/contrib/cvs/contrib/cvs_acls.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/cvscheck.sh#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/debug_check_log.sh#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/descend.sh#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/log.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/log_accum.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/mfpipe.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/pvcs2rcs.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/rcs-to-cvs.sh#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/rcs2log.sh#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/rcs2sccs.sh#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/rcslock.in#2 integrate .. //depot/projects/wifi/contrib/cvs/contrib/sccs2rcs.in#2 integrate .. //depot/projects/wifi/contrib/cvs/diff/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/cvs/diff/Makefile.am#2 integrate .. //depot/projects/wifi/contrib/cvs/diff/Makefile.in#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/Makefile.am#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/Makefile.in#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/cvs.1#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/cvs.man.footer#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/cvs.man.header#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/cvs.texinfo#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/cvsclient.texi#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/mkman.in#2 delete .. //depot/projects/wifi/contrib/cvs/doc/mkman.pl#1 branch .. //depot/projects/wifi/contrib/cvs/doc/stamp-1#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/stamp-vti#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/version-client.texi#2 integrate .. //depot/projects/wifi/contrib/cvs/doc/version.texi#2 integrate .. //depot/projects/wifi/contrib/cvs/lib/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/cvs/lib/Makefile.am#2 integrate .. //depot/projects/wifi/contrib/cvs/lib/Makefile.in#2 integrate .. //depot/projects/wifi/contrib/cvs/lib/fncase.c#2 integrate .. //depot/projects/wifi/contrib/cvs/lib/getdate#1 branch .. //depot/projects/wifi/contrib/cvs/lib/getpass.c#2 integrate .. //depot/projects/wifi/contrib/cvs/lib/regex.c#2 integrate .. //depot/projects/wifi/contrib/cvs/lib/system.h#2 integrate .. //depot/projects/wifi/contrib/cvs/lib/test-getdate.sh#1 branch .. //depot/projects/wifi/contrib/cvs/lib/xtime.h#2 integrate .. //depot/projects/wifi/contrib/cvs/man/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/cvs/man/Makefile.am#2 integrate .. //depot/projects/wifi/contrib/cvs/man/Makefile.in#2 integrate .. //depot/projects/wifi/contrib/cvs/man/cvs.1#3 integrate .. //depot/projects/wifi/contrib/cvs/src/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/cvs/src/Makefile.am#2 integrate .. //depot/projects/wifi/contrib/cvs/src/Makefile.in#2 integrate .. //depot/projects/wifi/contrib/cvs/src/add.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/admin.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/annotate.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/buffer.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/buffer.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/checkin.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/checkout.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/classify.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/client.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/client.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/commit.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/create_adm.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/cvs.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/cvsrc.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/diff.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/edit.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/entries.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/expand_path.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/fileattr.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/filesubr.c#3 integrate .. //depot/projects/wifi/contrib/cvs/src/find_names.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/hardlink.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/hardlink.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/hash.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/hash.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/history.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/history.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/ignore.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/import.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/lock.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/log.c#3 integrate .. //depot/projects/wifi/contrib/cvs/src/login.c#3 integrate .. //depot/projects/wifi/contrib/cvs/src/logmsg.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/main.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/mkmodules.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/modules.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/myndbm.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/myndbm.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/no_diff.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/parseinfo.c#3 integrate .. //depot/projects/wifi/contrib/cvs/src/patch.c#3 integrate .. //depot/projects/wifi/contrib/cvs/src/rcs.c#3 integrate .. //depot/projects/wifi/contrib/cvs/src/rcs.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/rcscmds.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/recurse.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/release.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/remove.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/repos.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/root.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/root.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/run.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/sanity.sh#2 integrate .. //depot/projects/wifi/contrib/cvs/src/server.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/server.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/stack.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/stack.h#2 integrate .. //depot/projects/wifi/contrib/cvs/src/status.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/subr.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/tag.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/update.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/vers_ts.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/version.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/watch.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/wrapper.c#2 integrate .. //depot/projects/wifi/contrib/cvs/src/zlib.c#2 integrate .. //depot/projects/wifi/contrib/cvs/tools/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/cvs/tools/Makefile.am#2 integrate .. //depot/projects/wifi/contrib/cvs/tools/Makefile.in#2 integrate .. //depot/projects/wifi/contrib/cvs/tools/README#2 integrate .. //depot/projects/wifi/contrib/file/ChangeLog#5 integrate .. //depot/projects/wifi/contrib/file/FREEBSD-upgrade#4 integrate .. //depot/projects/wifi/contrib/file/Magdir/acorn#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/animation#5 integrate .. //depot/projects/wifi/contrib/file/Magdir/apple#3 integrate .. //depot/projects/wifi/contrib/file/Magdir/archive#5 integrate .. //depot/projects/wifi/contrib/file/Magdir/audio#5 integrate .. //depot/projects/wifi/contrib/file/Magdir/bFLT#2 delete .. //depot/projects/wifi/contrib/file/Magdir/blender#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/chi#2 delete .. //depot/projects/wifi/contrib/file/Magdir/commands#4 integrate .. //depot/projects/wifi/contrib/file/Magdir/console#5 integrate .. //depot/projects/wifi/contrib/file/Magdir/cvs#2 delete .. //depot/projects/wifi/contrib/file/Magdir/database#4 integrate .. //depot/projects/wifi/contrib/file/Magdir/efi#1 branch .. //depot/projects/wifi/contrib/file/Magdir/elf#5 integrate .. //depot/projects/wifi/contrib/file/Magdir/filesystems#5 integrate .. //depot/projects/wifi/contrib/file/Magdir/fortran#1 branch .. //depot/projects/wifi/contrib/file/Magdir/hdf#2 delete .. //depot/projects/wifi/contrib/file/Magdir/impulse#2 delete .. //depot/projects/wifi/contrib/file/Magdir/java#4 integrate .. //depot/projects/wifi/contrib/file/Magdir/macintosh#3 integrate .. //depot/projects/wifi/contrib/file/Magdir/msdos#5 integrate .. //depot/projects/wifi/contrib/file/Magdir/pdf#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/sgi#3 integrate .. //depot/projects/wifi/contrib/file/Magdir/wordperfect#2 delete .. //depot/projects/wifi/contrib/file/Makefile.am#5 integrate .. //depot/projects/wifi/contrib/file/Makefile.in#5 integrate .. //depot/projects/wifi/contrib/file/acconfig.h#2 delete .. //depot/projects/wifi/contrib/file/acinclude.m4#2 integrate .. //depot/projects/wifi/contrib/file/aclocal.m4#4 integrate .. //depot/projects/wifi/contrib/file/apprentice.c#5 integrate .. //depot/projects/wifi/contrib/file/ascmagic.c#5 integrate .. //depot/projects/wifi/contrib/file/compress.c#5 integrate .. //depot/projects/wifi/contrib/file/config.h.in#5 integrate .. //depot/projects/wifi/contrib/file/configure#5 integrate .. //depot/projects/wifi/contrib/file/configure.in#5 integrate .. //depot/projects/wifi/contrib/file/file.c#5 integrate .. //depot/projects/wifi/contrib/file/file.h#5 integrate .. //depot/projects/wifi/contrib/file/file.man#3 integrate .. //depot/projects/wifi/contrib/file/file_opts.h#1 branch .. //depot/projects/wifi/contrib/file/fsmagic.c#5 integrate .. //depot/projects/wifi/contrib/file/funcs.c#5 integrate .. //depot/projects/wifi/contrib/file/install-sh#4 integrate .. //depot/projects/wifi/contrib/file/is_tar.c#4 integrate .. //depot/projects/wifi/contrib/file/libmagic.man#3 integrate .. //depot/projects/wifi/contrib/file/magic.c#5 integrate .. //depot/projects/wifi/contrib/file/magic.h#4 integrate .. //depot/projects/wifi/contrib/file/magic.man#3 integrate .. //depot/projects/wifi/contrib/file/magic.mime#5 integrate .. //depot/projects/wifi/contrib/file/missing#2 delete .. //depot/projects/wifi/contrib/file/mkinstalldirs#4 integrate .. //depot/projects/wifi/contrib/file/names.h#4 integrate .. //depot/projects/wifi/contrib/file/patchlevel.h#5 integrate .. //depot/projects/wifi/contrib/file/print.c#5 integrate .. //depot/projects/wifi/contrib/file/readelf.c#5 integrate .. //depot/projects/wifi/contrib/file/readelf.h#4 integrate .. //depot/projects/wifi/contrib/file/softmagic.c#5 integrate .. //depot/projects/wifi/contrib/file/stamp-h.in#2 delete .. //depot/projects/wifi/contrib/gdb/FREEBSD-diffs#1 branch .. //depot/projects/wifi/contrib/libiberty/cp-demangle.c#2 delete .. //depot/projects/wifi/contrib/openpam/include/security/openpam_version.h#5 integrate .. //depot/projects/wifi/contrib/top/display.c#3 integrate .. //depot/projects/wifi/contrib/top/layout.h#2 integrate .. //depot/projects/wifi/contrib/top/machine.h#5 integrate .. //depot/projects/wifi/contrib/top/top.c#8 integrate .. //depot/projects/wifi/contrib/top/top.h#3 integrate .. //depot/projects/wifi/crypto/openssl/crypto/engine/eng_cryptodev.c#2 integrate .. //depot/projects/wifi/etc/defaults/rc.conf#34 integrate .. //depot/projects/wifi/etc/devd.conf#18 integrate .. //depot/projects/wifi/etc/netstart#5 integrate .. //depot/projects/wifi/etc/periodic/security/100.chksetuid#4 integrate .. //depot/projects/wifi/etc/rc#6 integrate .. //depot/projects/wifi/etc/rc.d/dhclient#12 integrate .. //depot/projects/wifi/etc/rc.d/hostid#3 integrate .. //depot/projects/wifi/etc/rc.d/ipfw#7 integrate .. //depot/projects/wifi/etc/rc.d/jail#11 integrate .. //depot/projects/wifi/etc/rc.d/kerberos#5 integrate .. //depot/projects/wifi/etc/rc.d/mountcritremote#9 integrate .. //depot/projects/wifi/etc/rc.d/netif#11 integrate .. //depot/projects/wifi/etc/rc.d/ppp#6 integrate .. //depot/projects/wifi/etc/rc.firewall#7 integrate .. //depot/projects/wifi/etc/rc.firewall6#4 integrate .. //depot/projects/wifi/etc/rc.subr#16 integrate .. //depot/projects/wifi/gnu/lib/csu/Makefile#4 integrate .. //depot/projects/wifi/gnu/usr.bin/Makefile#8 integrate .. //depot/projects/wifi/gnu/usr.bin/cvs/Makefile#3 integrate .. //depot/projects/wifi/gnu/usr.bin/cvs/contrib/Makefile#3 integrate .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/Makefile#4 integrate .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/kgdb.h#7 integrate .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/kld.c#1 branch .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/kthr.c#8 integrate .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/main.c#10 integrate .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/trgt.c#6 integrate .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/trgt_i386.c#6 integrate .. //depot/projects/wifi/include/fts.h#3 integrate .. //depot/projects/wifi/include/unistd.h#9 integrate .. //depot/projects/wifi/lib/libarchive/Makefile#31 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_extract.c#17 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_support_format_cpio.c#13 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_support_format_tar.c#24 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_support_format_zip.c#12 integrate .. //depot/projects/wifi/lib/libarchive/archive_write_disk.c#10 integrate .. //depot/projects/wifi/lib/libarchive/archive_write_set_format_ar.c#5 integrate .. //depot/projects/wifi/lib/libarchive/archive_write_set_format_cpio_newc.c#3 integrate .. //depot/projects/wifi/lib/libarchive/test/Makefile#10 integrate .. //depot/projects/wifi/lib/libarchive/test/test_compat_tar_hardlink.c#1 branch .. //depot/projects/wifi/lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu#1 branch .. //depot/projects/wifi/lib/libarchive/test/test_read_format_tar.c#3 integrate .. //depot/projects/wifi/lib/libarchive/test/test_write_disk.c#6 integrate .. //depot/projects/wifi/lib/libarchive/test/test_write_disk_hardlink.c#1 branch .. //depot/projects/wifi/lib/libarchive/test/test_write_format_cpio_newc.c#2 integrate .. //depot/projects/wifi/lib/libc/amd64/_fpmath.h#4 integrate .. //depot/projects/wifi/lib/libc/gen/Makefile.inc#12 integrate .. //depot/projects/wifi/lib/libc/gen/Symbol.map#8 integrate .. //depot/projects/wifi/lib/libc/gen/fts-compat.c#2 integrate .. //depot/projects/wifi/lib/libc/gen/fts-compat.h#2 integrate .. //depot/projects/wifi/lib/libc/gen/fts.3#4 integrate .. //depot/projects/wifi/lib/libc/gen/fts.c#3 integrate .. //depot/projects/wifi/lib/libc/gen/getttyent.c#5 integrate .. //depot/projects/wifi/lib/libc/i386/_fpmath.h#4 integrate .. //depot/projects/wifi/lib/libc/ia64/_fpmath.h#4 integrate .. //depot/projects/wifi/lib/libc/inet/inet_network.c#4 integrate .. //depot/projects/wifi/lib/libc/locale/Makefile.inc#4 integrate .. //depot/projects/wifi/lib/libc/locale/ascii.c#1 branch .. //depot/projects/wifi/lib/libc/locale/mblocal.h#4 integrate .. //depot/projects/wifi/lib/libc/locale/setrunelocale.c#5 integrate .. //depot/projects/wifi/lib/libc/sparc64/_fpmath.h#4 integrate .. //depot/projects/wifi/lib/libc/stdlib/grantpt.c#7 integrate .. //depot/projects/wifi/lib/libc/stdlib/heapsort.c#3 integrate .. //depot/projects/wifi/lib/libc/stdlib/qsort.c#3 integrate .. //depot/projects/wifi/lib/libc/sys/access.2#4 integrate .. //depot/projects/wifi/lib/libc/sys/extattr_get_file.2#6 integrate .. //depot/projects/wifi/lib/libc/sys/flock.2#4 integrate .. //depot/projects/wifi/lib/libdevstat/devstat.h#3 integrate .. //depot/projects/wifi/lib/libfetch/ftp.c#7 integrate .. //depot/projects/wifi/lib/libkse/sys/lock.c#2 integrate .. //depot/projects/wifi/lib/libmagic/config.h#5 integrate .. //depot/projects/wifi/lib/libpmc/pmc.3#12 integrate .. //depot/projects/wifi/lib/libthr/Makefile#16 integrate .. //depot/projects/wifi/lib/libutil/pty.3#2 integrate .. //depot/projects/wifi/lib/libutil/pty.c#5 integrate .. //depot/projects/wifi/lib/msun/Makefile#18 integrate .. //depot/projects/wifi/lib/msun/Symbol.map#5 integrate .. //depot/projects/wifi/lib/msun/amd64/Makefile.inc#6 integrate .. //depot/projects/wifi/lib/msun/amd64/s_llrintl.S#1 branch .. //depot/projects/wifi/lib/msun/amd64/s_lrintl.S#1 branch .. //depot/projects/wifi/lib/msun/amd64/s_rintl.S#1 branch .. //depot/projects/wifi/lib/msun/i387/Makefile.inc#7 integrate .. //depot/projects/wifi/lib/msun/i387/s_llrintl.S#1 branch .. //depot/projects/wifi/lib/msun/i387/s_lrintl.S#1 branch .. //depot/projects/wifi/lib/msun/i387/s_rintl.S#1 branch .. //depot/projects/wifi/lib/msun/ld128/s_exp2l.c#1 branch .. //depot/projects/wifi/lib/msun/ld80/s_exp2l.c#1 branch .. //depot/projects/wifi/lib/msun/man/exp.3#7 integrate .. //depot/projects/wifi/lib/msun/man/log.3#1 branch .. //depot/projects/wifi/lib/msun/man/lrint.3#2 integrate .. //depot/projects/wifi/lib/msun/man/rint.3#4 integrate .. //depot/projects/wifi/lib/msun/src/e_expf.c#5 integrate .. //depot/projects/wifi/lib/msun/src/k_cos.c#4 integrate .. //depot/projects/wifi/lib/msun/src/k_rem_pio2.c#3 integrate .. //depot/projects/wifi/lib/msun/src/k_rem_pio2f.c#4 delete .. //depot/projects/wifi/lib/msun/src/math.h#11 integrate .. //depot/projects/wifi/lib/msun/src/math_private.h#6 integrate .. //depot/projects/wifi/lib/msun/src/s_exp2.c#2 integrate .. //depot/projects/wifi/lib/msun/src/s_exp2f.c#2 integrate .. //depot/projects/wifi/lib/msun/src/s_llrintl.c#1 branch .. //depot/projects/wifi/lib/msun/src/s_log1p.c#3 integrate .. //depot/projects/wifi/lib/msun/src/s_log1pf.c#3 integrate .. //depot/projects/wifi/lib/msun/src/s_lrintl.c#1 branch .. //depot/projects/wifi/lib/msun/src/s_nearbyint.c#2 integrate .. //depot/projects/wifi/lib/msun/src/s_rint.c#4 integrate .. //depot/projects/wifi/lib/msun/src/s_rintf.c#3 integrate .. //depot/projects/wifi/lib/msun/src/s_rintl.c#1 branch .. //depot/projects/wifi/release/amd64/boot_crunch.conf#4 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/article.sgml#7 integrate .. //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#27 integrate .. //depot/projects/wifi/release/fixit.profile#3 integrate .. //depot/projects/wifi/release/i386/boot_crunch.conf#4 integrate .. //depot/projects/wifi/release/ia64/boot_crunch.conf#4 integrate .. //depot/projects/wifi/release/pc98/boot_crunch.conf#4 integrate .. //depot/projects/wifi/release/powerpc/boot_crunch.conf#3 integrate .. //depot/projects/wifi/release/sparc64/boot_crunch.conf#3 integrate .. //depot/projects/wifi/release/sun4v/boot_crunch.conf#2 integrate .. //depot/projects/wifi/sbin/dhclient/dhclient-script#13 integrate .. //depot/projects/wifi/sbin/ffsinfo/ffsinfo.c#6 integrate .. //depot/projects/wifi/sbin/fsck_msdosfs/boot.c#2 integrate .. //depot/projects/wifi/sbin/fsck_msdosfs/fat.c#2 integrate .. //depot/projects/wifi/sbin/gpt/gpt.c#7 integrate .. //depot/projects/wifi/sbin/ipfw/ipfw2.c#23 integrate .. //depot/projects/wifi/sbin/natd/natd.8#4 integrate .. //depot/projects/wifi/sbin/quotacheck/Makefile#2 integrate .. //depot/projects/wifi/sbin/quotacheck/preen.c#3 integrate .. //depot/projects/wifi/sbin/quotacheck/quotacheck.8#5 integrate .. //depot/projects/wifi/sbin/quotacheck/quotacheck.c#7 integrate .. //depot/projects/wifi/sbin/quotacheck/quotacheck.h#1 branch .. //depot/projects/wifi/sbin/setkey/parse.y#4 integrate .. //depot/projects/wifi/share/man/man4/Makefile#44 integrate .. //depot/projects/wifi/share/man/man4/ath.4#19 integrate .. //depot/projects/wifi/share/man/man4/atkbd.4#5 integrate .. //depot/projects/wifi/share/man/man4/awi.4#8 integrate .. //depot/projects/wifi/share/man/man4/axe.4#8 integrate .. //depot/projects/wifi/share/man/man4/coda.4#1 branch .. //depot/projects/wifi/share/man/man4/dcons.4#6 integrate .. //depot/projects/wifi/share/man/man4/ed.4#13 integrate .. //depot/projects/wifi/share/man/man4/man4.i386/snc.4#3 integrate .. //depot/projects/wifi/share/man/man4/mfi.4#4 integrate .. //depot/projects/wifi/share/man/man4/oldcard.4#4 delete .. //depot/projects/wifi/share/man/man4/pcib.4#2 integrate .. //depot/projects/wifi/share/man/man4/puc.4#2 integrate .. //depot/projects/wifi/share/man/man4/rr232x.4#3 delete .. //depot/projects/wifi/share/man/man4/sched_4bsd.4#5 integrate .. //depot/projects/wifi/share/man/man4/sched_ule.4#6 integrate .. //depot/projects/wifi/share/man/man4/sf.4#7 integrate .. //depot/projects/wifi/share/man/man4/syncache.4#5 integrate .. //depot/projects/wifi/share/man/man4/vlan.4#14 integrate .. //depot/projects/wifi/share/man/man4/wi.4#13 integrate .. //depot/projects/wifi/share/man/man4/xl.4#11 integrate .. //depot/projects/wifi/share/man/man5/fstab.5#3 integrate .. //depot/projects/wifi/share/man/man5/rc.conf.5#34 integrate .. //depot/projects/wifi/share/man/man5/src.conf.5#10 integrate .. //depot/projects/wifi/share/man/man7/clocks.7#4 integrate .. //depot/projects/wifi/share/man/man7/ports.7#13 integrate .. //depot/projects/wifi/share/man/man9/BUF_ISLOCKED.9#1 branch .. //depot/projects/wifi/share/man/man9/BUF_RECURSED.9#1 branch .. //depot/projects/wifi/share/man/man9/BUF_REFCNT.9#3 delete .. //depot/projects/wifi/share/man/man9/Makefile#25 integrate .. //depot/projects/wifi/share/man/man9/VOP_LOCK.9#6 integrate .. //depot/projects/wifi/share/man/man9/lock.9#8 integrate .. //depot/projects/wifi/share/man/man9/mbuf.9#11 integrate .. //depot/projects/wifi/share/man/man9/mbuf_tags.9#5 integrate .. //depot/projects/wifi/share/man/man9/style.9#12 integrate .. //depot/projects/wifi/share/misc/bsd-family-tree#20 integrate .. //depot/projects/wifi/share/misc/pci_vendors#6 integrate .. //depot/projects/wifi/share/mk/bsd.dep.mk#4 integrate .. //depot/projects/wifi/share/mk/bsd.own.mk#13 integrate .. //depot/projects/wifi/share/mklocale/la_LN.US-ASCII.src#2 integrate .. //depot/projects/wifi/share/msgdef/Makefile#5 integrate .. //depot/projects/wifi/share/msgdef/ko_KR.UTF-8.src#1 branch .. //depot/projects/wifi/share/msgdef/ko_KR.eucKR.src#2 integrate .. //depot/projects/wifi/share/zoneinfo/leapseconds#10 integrate .. //depot/projects/wifi/sys/Makefile#12 integrate .. //depot/projects/wifi/sys/amd64/acpica/madt.c#11 integrate .. //depot/projects/wifi/sys/amd64/amd64/dump_machdep.c#4 integrate .. //depot/projects/wifi/sys/amd64/amd64/identcpu.c#12 integrate .. //depot/projects/wifi/sys/amd64/amd64/minidump_machdep.c#3 integrate .. //depot/projects/wifi/sys/amd64/amd64/pmap.c#25 integrate .. //depot/projects/wifi/sys/amd64/conf/GENERIC#26 integrate .. //depot/projects/wifi/sys/amd64/conf/NOTES#26 integrate .. //depot/projects/wifi/sys/amd64/include/_types.h#6 integrate .. //depot/projects/wifi/sys/amd64/include/float.h#3 integrate .. //depot/projects/wifi/sys/amd64/include/proc.h#4 integrate .. //depot/projects/wifi/sys/amd64/include/specialreg.h#9 integrate .. //depot/projects/wifi/sys/amd64/isa/clock.c#17 integrate .. //depot/projects/wifi/sys/arm/arm/dump_machdep.c#3 integrate .. //depot/projects/wifi/sys/arm/arm/pmap.c#25 integrate .. //depot/projects/wifi/sys/arm/arm/support.S#9 integrate .. //depot/projects/wifi/sys/arm/include/pmap.h#16 integrate .. //depot/projects/wifi/sys/arm/xscale/ixp425/if_npe.c#7 integrate .. //depot/projects/wifi/sys/boot/forth/loader.conf.5#5 integrate .. //depot/projects/wifi/sys/cam/cam_xpt.c#25 integrate .. //depot/projects/wifi/sys/cam/scsi/scsi_da.c#19 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_proto.h#15 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_syscall.h#15 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_syscalls.c#15 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_sysent.c#15 integrate .. //depot/projects/wifi/sys/compat/freebsd32/syscalls.master#16 integrate .. //depot/projects/wifi/sys/compat/linux/linux_file.c#13 integrate .. //depot/projects/wifi/sys/compat/linux/linux_misc.c#23 integrate .. //depot/projects/wifi/sys/compat/ndis/kern_ndis.c#22 integrate .. //depot/projects/wifi/sys/compat/ndis/subr_ndis.c#23 integrate .. //depot/projects/wifi/sys/compat/opensolaris/kern/opensolaris_kmem.c#3 integrate .. //depot/projects/wifi/sys/compat/opensolaris/kern/opensolaris_kobj.c#5 integrate .. //depot/projects/wifi/sys/compat/opensolaris/kern/opensolaris_vfs.c#6 integrate .. //depot/projects/wifi/sys/compat/opensolaris/sys/kmem.h#4 integrate .. //depot/projects/wifi/sys/compat/opensolaris/sys/vnode.h#5 integrate .. //depot/projects/wifi/sys/compat/pecoff/imgact_pecoff.c#10 integrate .. //depot/projects/wifi/sys/compat/svr4/imgact_svr4.c#5 integrate .. //depot/projects/wifi/sys/compat/svr4/svr4_fcntl.c#8 integrate .. //depot/projects/wifi/sys/compat/svr4/svr4_misc.c#17 integrate .. //depot/projects/wifi/sys/conf/files#63 integrate .. //depot/projects/wifi/sys/conf/files.amd64#28 integrate .. //depot/projects/wifi/sys/conf/files.i386#32 integrate .. //depot/projects/wifi/sys/conf/files.powerpc#12 integrate .. //depot/projects/wifi/sys/conf/kern.pre.mk#20 integrate .. //depot/projects/wifi/sys/conf/options#43 integrate .. //depot/projects/wifi/sys/contrib/dev/acpica/evgpe.c#5 integrate .. //depot/projects/wifi/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#6 integrate .. //depot/projects/wifi/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c#6 integrate .. //depot/projects/wifi/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c#5 integrate .. //depot/projects/wifi/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#9 integrate .. //depot/projects/wifi/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c#6 integrate .. //depot/projects/wifi/sys/crypto/rijndael/rijndael-api.c#2 integrate .. //depot/projects/wifi/sys/crypto/rijndael/test00.c#2 integrate .. //depot/projects/wifi/sys/ddb/db_capture.c#2 integrate .. //depot/projects/wifi/sys/ddb/db_textdump.c#2 integrate .. //depot/projects/wifi/sys/dev/acpica/Osd/OsdSchedule.c#11 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi.c#32 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_hpet.c#9 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_hpet.h#1 branch .. //depot/projects/wifi/sys/dev/amr/amr.c#16 integrate .. //depot/projects/wifi/sys/dev/amr/amrreg.h#4 integrate .. //depot/projects/wifi/sys/dev/amr/amrvar.h#11 integrate .. //depot/projects/wifi/sys/dev/an/if_an.c#24 integrate .. //depot/projects/wifi/sys/dev/an/if_an_pci.c#4 integrate .. //depot/projects/wifi/sys/dev/an/if_anreg.h#6 integrate .. //depot/projects/wifi/sys/dev/ath/if_ath.c#153 integrate .. //depot/projects/wifi/sys/dev/bfe/if_bfe.c#14 integrate .. //depot/projects/wifi/sys/dev/bfe/if_bfereg.h#5 integrate .. //depot/projects/wifi/sys/dev/bge/if_bge.c#28 integrate .. //depot/projects/wifi/sys/dev/bge/if_bgereg.h#18 integrate .. //depot/projects/wifi/sys/dev/ciss/ciss.c#22 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_adapter.h#10 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_main.c#13 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_multiq.c#1 branch .. //depot/projects/wifi/sys/dev/cxgb/cxgb_osdep.h#7 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_sge.c#13 integrate .. //depot/projects/wifi/sys/dev/cxgb/sys/cxgb_support.c#2 integrate .. //depot/projects/wifi/sys/dev/cxgb/sys/mvec.h#6 integrate .. //depot/projects/wifi/sys/dev/cxgb/sys/uipc_mvec.c#5 integrate .. //depot/projects/wifi/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#2 integrate .. //depot/projects/wifi/sys/dev/cxgb/ulp/tom/cxgb_tcp.h#2 integrate .. //depot/projects/wifi/sys/dev/drm/drm_drv.c#4 integrate .. //depot/projects/wifi/sys/dev/gem/if_gem.c#16 integrate .. //depot/projects/wifi/sys/dev/hatm/if_hatm_intr.c#8 integrate .. //depot/projects/wifi/sys/dev/hptrr/hptrr_osm_bsd.c#2 integrate .. //depot/projects/wifi/sys/dev/hwpmc/hwpmc_mod.c#14 integrate .. //depot/projects/wifi/sys/dev/if_ndis/if_ndis.c#35 integrate .. //depot/projects/wifi/sys/dev/iscsi/initiator/isc_soc.c#3 integrate .. //depot/projects/wifi/sys/dev/lge/if_lge.c#15 integrate .. //depot/projects/wifi/sys/dev/md/md.c#19 integrate .. //depot/projects/wifi/sys/dev/mfi/mfi.c#11 integrate .. //depot/projects/wifi/sys/dev/mfi/mfireg.h#6 integrate .. //depot/projects/wifi/sys/dev/mii/amphy.c#8 integrate .. //depot/projects/wifi/sys/dev/mii/brgphy.c#16 integrate .. //depot/projects/wifi/sys/dev/mii/miidevs#12 integrate .. //depot/projects/wifi/sys/dev/mii/nsphy.c#8 integrate .. //depot/projects/wifi/sys/dev/mii/nsphyter.c#1 branch .. //depot/projects/wifi/sys/dev/mii/nsphyterreg.h#1 branch .. //depot/projects/wifi/sys/dev/msk/if_msk.c#10 integrate .. //depot/projects/wifi/sys/dev/mxge/eth_z8e.h#3 integrate .. //depot/projects/wifi/sys/dev/mxge/ethp_z8e.h#3 integrate .. //depot/projects/wifi/sys/dev/mxge/if_mxge.c#18 integrate .. //depot/projects/wifi/sys/dev/mxge/if_mxge_var.h#9 integrate .. //depot/projects/wifi/sys/dev/mxge/mxge_lro.c#4 integrate .. //depot/projects/wifi/sys/dev/mxge/mxge_mcp.h#7 integrate .. //depot/projects/wifi/sys/dev/mxge/mxge_rss_eth_z8e.c#1 branch .. //depot/projects/wifi/sys/dev/mxge/mxge_rss_ethp_z8e.c#1 branch .. //depot/projects/wifi/sys/dev/mxge/rss_eth_z8e.h#1 branch .. //depot/projects/wifi/sys/dev/mxge/rss_ethp_z8e.h#1 branch .. //depot/projects/wifi/sys/dev/nfe/if_nfe.c#8 integrate .. //depot/projects/wifi/sys/dev/patm/if_patm_rx.c#5 integrate .. //depot/projects/wifi/sys/dev/pci/pci.c#32 integrate .. //depot/projects/wifi/sys/dev/pci/pci_user.c#7 integrate .. //depot/projects/wifi/sys/dev/puc/pucdata.c#12 integrate .. //depot/projects/wifi/sys/dev/ral/rt2560.c#29 integrate .. //depot/projects/wifi/sys/dev/ral/rt2560reg.h#5 integrate .. //depot/projects/wifi/sys/dev/ral/rt2560var.h#9 integrate .. //depot/projects/wifi/sys/dev/re/if_re.c#25 integrate .. //depot/projects/wifi/sys/dev/rr232x/LICENSE#2 delete .. //depot/projects/wifi/sys/dev/rr232x/README#2 delete .. //depot/projects/wifi/sys/dev/rr232x/amd64-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/wifi/sys/dev/rr232x/array.h#2 delete .. //depot/projects/wifi/sys/dev/rr232x/him.h#2 delete .. //depot/projects/wifi/sys/dev/rr232x/himfuncs.h#2 delete .. //depot/projects/wifi/sys/dev/rr232x/hptintf.h#2 delete .. //depot/projects/wifi/sys/dev/rr232x/i386-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/wifi/sys/dev/rr232x/ldm.h#2 delete .. //depot/projects/wifi/sys/dev/rr232x/list.h#2 delete .. //depot/projects/wifi/sys/dev/rr232x/os_bsd.c#2 delete .. //depot/projects/wifi/sys/dev/rr232x/os_bsd.h#2 delete .. //depot/projects/wifi/sys/dev/rr232x/osm.h#2 delete .. //depot/projects/wifi/sys/dev/rr232x/osm_bsd.c#5 delete .. //depot/projects/wifi/sys/dev/rr232x/rr232x_config.c#2 delete .. //depot/projects/wifi/sys/dev/rr232x/rr232x_config.h#2 delete .. //depot/projects/wifi/sys/dev/sf/if_sf.c#1 branch .. //depot/projects/wifi/sys/dev/sf/if_sfreg.h#1 branch .. //depot/projects/wifi/sys/dev/sf/starfire_rx.h#1 branch .. //depot/projects/wifi/sys/dev/sf/starfire_tx.h#1 branch .. //depot/projects/wifi/sys/dev/sk/if_sk.c#9 integrate .. //depot/projects/wifi/sys/dev/stge/if_stge.c#7 integrate .. //depot/projects/wifi/sys/dev/stge/if_stgereg.h#3 integrate .. //depot/projects/wifi/sys/dev/syscons/syscons.c#13 integrate .. //depot/projects/wifi/sys/dev/ti/if_ti.c#6 integrate .. //depot/projects/wifi/sys/dev/usb/ehci.c#19 integrate .. //depot/projects/wifi/sys/dev/usb/if_udav.c#20 integrate .. //depot/projects/wifi/sys/dev/usb/uark.c#8 integrate .. //depot/projects/wifi/sys/dev/usb/uftdi.c#11 integrate .. //depot/projects/wifi/sys/dev/usb/uftdireg.h#2 integrate .. //depot/projects/wifi/sys/fs/cd9660/cd9660_lookup.c#3 integrate .. //depot/projects/wifi/sys/fs/cd9660/cd9660_vfsops.c#4 integrate .. //depot/projects/wifi/sys/fs/coda/cnode.h#2 integrate .. //depot/projects/wifi/sys/fs/coda/coda_namecache.h#2 integrate .. //depot/projects/wifi/sys/fs/coda/coda_psdev.c#2 integrate .. //depot/projects/wifi/sys/fs/coda/coda_vfsops.c#4 integrate .. //depot/projects/wifi/sys/fs/coda/coda_vnops.c#4 integrate .. //depot/projects/wifi/sys/fs/devfs/devfs_devs.c#14 integrate .. //depot/projects/wifi/sys/fs/devfs/devfs_vfsops.c#15 integrate .. //depot/projects/wifi/sys/fs/devfs/devfs_vnops.c#39 integrate .. //depot/projects/wifi/sys/fs/fdescfs/fdesc_vnops.c#11 integrate .. //depot/projects/wifi/sys/fs/fifofs/fifo_vnops.c#19 integrate .. //depot/projects/wifi/sys/fs/hpfs/hpfs_subr.h#4 integrate .. //depot/projects/wifi/sys/fs/hpfs/hpfs_vfsops.c#15 integrate .. //depot/projects/wifi/sys/fs/hpfs/hpfs_vnops.c#15 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_denode.c#15 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_lookup.c#9 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_vfsops.c#23 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_vnops.c#18 integrate .. //depot/projects/wifi/sys/fs/ntfs/ntfs_subr.c#9 integrate .. //depot/projects/wifi/sys/fs/ntfs/ntfs_vfsops.c#20 integrate .. //depot/projects/wifi/sys/fs/ntfs/ntfs_vnops.c#16 integrate .. //depot/projects/wifi/sys/fs/nullfs/null_vfsops.c#16 integrate .. //depot/projects/wifi/sys/fs/nullfs/null_vnops.c#20 integrate .. //depot/projects/wifi/sys/fs/nwfs/nwfs_node.c#11 integrate .. //depot/projects/wifi/sys/fs/nwfs/nwfs_vfsops.c#12 integrate .. //depot/projects/wifi/sys/fs/nwfs/nwfs_vnops.c#12 integrate .. //depot/projects/wifi/sys/fs/procfs/procfs.c#7 integrate .. //depot/projects/wifi/sys/fs/pseudofs/pseudofs_vncache.c#12 integrate .. //depot/projects/wifi/sys/fs/pseudofs/pseudofs_vnops.c#14 integrate .. //depot/projects/wifi/sys/fs/smbfs/smbfs_node.c#14 integrate .. //depot/projects/wifi/sys/fs/smbfs/smbfs_vfsops.c#14 integrate .. //depot/projects/wifi/sys/fs/smbfs/smbfs_vnops.c#17 integrate .. //depot/projects/wifi/sys/fs/tmpfs/tmpfs_vfsops.c#7 integrate .. //depot/projects/wifi/sys/fs/tmpfs/tmpfs_vnops.c#7 integrate .. //depot/projects/wifi/sys/fs/udf/udf_vfsops.c#17 integrate .. //depot/projects/wifi/sys/fs/udf/udf_vnops.c#24 integrate .. //depot/projects/wifi/sys/fs/unionfs/union_subr.c#14 integrate .. //depot/projects/wifi/sys/fs/unionfs/union_vfsops.c#12 integrate .. //depot/projects/wifi/sys/fs/unionfs/union_vnops.c#23 integrate .. //depot/projects/wifi/sys/gnu/fs/ext2fs/ext2_lookup.c#5 integrate .. //depot/projects/wifi/sys/gnu/fs/ext2fs/ext2_vfsops.c#12 integrate .. //depot/projects/wifi/sys/gnu/fs/ext2fs/ext2_vnops.c#8 integrate .. //depot/projects/wifi/sys/gnu/fs/ext2fs/fs.h#4 integrate .. //depot/projects/wifi/sys/gnu/fs/reiserfs/reiserfs_inode.c#4 integrate .. //depot/projects/wifi/sys/gnu/fs/reiserfs/reiserfs_namei.c#5 integrate .. //depot/projects/wifi/sys/gnu/fs/reiserfs/reiserfs_vfsops.c#9 integrate .. //depot/projects/wifi/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c#3 integrate .. //depot/projects/wifi/sys/gnu/fs/xfs/FreeBSD/xfs_buf.h#3 integrate .. //depot/projects/wifi/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#7 integrate .. //depot/projects/wifi/sys/gnu/fs/xfs/FreeBSD/xfs_super.c#5 integrate .. //depot/projects/wifi/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.c#4 integrate .. //depot/projects/wifi/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c#5 integrate .. //depot/projects/wifi/sys/i386/acpica/madt.c#12 integrate .. //depot/projects/wifi/sys/i386/conf/GENERIC#24 integrate .. //depot/projects/wifi/sys/i386/conf/NOTES#31 integrate .. //depot/projects/wifi/sys/i386/i386/dump_machdep.c#4 integrate .. //depot/projects/wifi/sys/i386/i386/minidump_machdep.c#3 integrate .. //depot/projects/wifi/sys/i386/i386/pmap.c#28 integrate .. //depot/projects/wifi/sys/i386/ibcs2/ibcs2_misc.c#10 integrate .. //depot/projects/wifi/sys/i386/ibcs2/imgact_coff.c#8 integrate .. //depot/projects/wifi/sys/i386/include/pmap.h#11 integrate .. //depot/projects/wifi/sys/i386/include/proc.h#5 integrate .. //depot/projects/wifi/sys/i386/isa/clock.c#16 integrate .. //depot/projects/wifi/sys/i386/linux/imgact_linux.c#6 integrate .. //depot/projects/wifi/sys/ia64/ia64/dump_machdep.c#4 integrate .. //depot/projects/wifi/sys/kern/genassym.sh#2 integrate .. //depot/projects/wifi/sys/kern/imgact_aout.c#10 integrate .. //depot/projects/wifi/sys/kern/imgact_elf.c#16 integrate .. //depot/projects/wifi/sys/kern/imgact_gzip.c#7 integrate .. //depot/projects/wifi/sys/kern/init_sysent.c#20 integrate .. //depot/projects/wifi/sys/kern/kern_acct.c#18 integrate .. //depot/projects/wifi/sys/kern/kern_alq.c#11 integrate .. //depot/projects/wifi/sys/kern/kern_cpu.c#13 integrate .. //depot/projects/wifi/sys/kern/kern_descrip.c#31 integrate .. //depot/projects/wifi/sys/kern/kern_exec.c#28 integrate .. //depot/projects/wifi/sys/kern/kern_exit.c#25 integrate .. //depot/projects/wifi/sys/kern/kern_jail.c#14 integrate .. //depot/projects/wifi/sys/kern/kern_ktrace.c#16 integrate .. //depot/projects/wifi/sys/kern/kern_linker.c#11 integrate .. //depot/projects/wifi/sys/kern/kern_lock.c#21 integrate .. //depot/projects/wifi/sys/kern/kern_mbuf.c#16 integrate .. //depot/projects/wifi/sys/kern/kern_mib.c#12 integrate .. //depot/projects/wifi/sys/kern/kern_rwlock.c#12 integrate .. //depot/projects/wifi/sys/kern/kern_shutdown.c#12 integrate .. //depot/projects/wifi/sys/kern/kern_sig.c#26 integrate .. //depot/projects/wifi/sys/kern/kern_time.c#15 integrate .. //depot/projects/wifi/sys/kern/link_elf.c#10 integrate .. //depot/projects/wifi/sys/kern/link_elf_obj.c#8 integrate .. //depot/projects/wifi/sys/kern/sched_ule.c#31 integrate .. //depot/projects/wifi/sys/kern/subr_bus.c#25 integrate .. //depot/projects/wifi/sys/kern/subr_sleepqueue.c#17 integrate .. //depot/projects/wifi/sys/kern/syscalls.c#20 integrate .. //depot/projects/wifi/sys/kern/syscalls.master#21 integrate .. //depot/projects/wifi/sys/kern/systrace_args.c#5 integrate .. //depot/projects/wifi/sys/kern/tty_cons.c#9 integrate .. //depot/projects/wifi/sys/kern/tty_pty.c#13 integrate .. //depot/projects/wifi/sys/kern/uipc_cow.c#6 integrate .. //depot/projects/wifi/sys/kern/uipc_mbuf.c#22 integrate .. //depot/projects/wifi/sys/kern/uipc_mqueue.c#10 integrate .. //depot/projects/wifi/sys/kern/uipc_shm.c#2 integrate .. //depot/projects/wifi/sys/kern/uipc_sockbuf.c#8 integrate .. //depot/projects/wifi/sys/kern/uipc_socket.c#33 integrate .. //depot/projects/wifi/sys/kern/uipc_syscalls.c#29 integrate .. //depot/projects/wifi/sys/kern/uipc_usrreq.c#23 integrate .. //depot/projects/wifi/sys/kern/vfs_acl.c#3 integrate .. //depot/projects/wifi/sys/kern/vfs_aio.c#21 integrate .. //depot/projects/wifi/sys/kern/vfs_bio.c#29 integrate .. //depot/projects/wifi/sys/kern/vfs_cache.c#16 integrate .. //depot/projects/wifi/sys/kern/vfs_default.c#26 integrate .. //depot/projects/wifi/sys/kern/vfs_extattr.c#3 integrate .. //depot/projects/wifi/sys/kern/vfs_lookup.c#23 integrate .. //depot/projects/wifi/sys/kern/vfs_mount.c#37 integrate .. //depot/projects/wifi/sys/kern/vfs_subr.c#46 integrate .. //depot/projects/wifi/sys/kern/vfs_syscalls.c#28 integrate .. //depot/projects/wifi/sys/kern/vfs_vnops.c#25 integrate .. //depot/projects/wifi/sys/kern/vnode_if.src#16 integrate .. //depot/projects/wifi/sys/modules/Makefile#46 integrate .. //depot/projects/wifi/sys/modules/cxgb/cxgb/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/mii/Makefile#6 integrate .. //depot/projects/wifi/sys/modules/mxge/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/mxge/mxge_rss_eth_z8e/Makefile#1 branch .. //depot/projects/wifi/sys/modules/mxge/mxge_rss_ethp_z8e/Makefile#1 branch .. //depot/projects/wifi/sys/modules/rr232x/Makefile#2 delete .. //depot/projects/wifi/sys/modules/sf/Makefile#3 integrate .. //depot/projects/wifi/sys/net/bpf.c#28 integrate .. //depot/projects/wifi/sys/net/if_bridge.c#19 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_ht.c#8 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_ht.h#7 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#113 integrate .. //depot/projects/wifi/sys/netgraph/netflow/netflow.c#15 integrate .. //depot/projects/wifi/sys/netgraph/netflow/ng_netflow.c#10 integrate .. //depot/projects/wifi/sys/netgraph/netgraph.h#19 integrate .. //depot/projects/wifi/sys/netgraph/ng_base.c#28 integrate .. //depot/projects/wifi/sys/netgraph/ng_bpf.c#5 integrate .. //depot/projects/wifi/sys/netgraph/ng_iface.c#12 integrate .. //depot/projects/wifi/sys/netgraph/ng_ppp.c#13 integrate .. //depot/projects/wifi/sys/netgraph/ng_pppoe.c#12 integrate .. //depot/projects/wifi/sys/netgraph/ng_pred1.c#2 integrate .. //depot/projects/wifi/sys/netinet/in.c#19 integrate .. //depot/projects/wifi/sys/netinet/ip_fw.h#14 integrate .. //depot/projects/wifi/sys/netinet/ip_fw2.c#33 integrate .. //depot/projects/wifi/sys/netinet/ip_options.c#5 integrate .. //depot/projects/wifi/sys/netinet/ip_output.c#23 integrate .. //depot/projects/wifi/sys/netinet/sctp_auth.c#12 integrate .. //depot/projects/wifi/sys/netinet/sctp_bsd_addr.c#12 integrate .. //depot/projects/wifi/sys/netinet/sctp_indata.c#21 integrate .. //depot/projects/wifi/sys/netinet/sctp_input.c#23 integrate .. //depot/projects/wifi/sys/netinet/sctp_pcb.c#24 integrate .. //depot/projects/wifi/sys/netinet/sctp_peeloff.c#12 integrate .. //depot/projects/wifi/sys/netinet/sctputil.c#23 integrate .. //depot/projects/wifi/sys/netinet/tcp_usrreq.c#31 integrate .. //depot/projects/wifi/sys/netinet6/in6.c#16 integrate .. //depot/projects/wifi/sys/netinet6/in6_src.c#14 integrate .. //depot/projects/wifi/sys/netinet6/ip6_output.c#19 integrate .. //depot/projects/wifi/sys/netinet6/ip6_var.h#13 integrate .. //depot/projects/wifi/sys/netinet6/raw_ip6.c#18 integrate .. //depot/projects/wifi/sys/netinet6/udp6_usrreq.c#15 integrate .. //depot/projects/wifi/sys/netipsec/ipsec.c#11 integrate .. //depot/projects/wifi/sys/netipsec/ipsec.h#6 integrate .. //depot/projects/wifi/sys/netipsec/ipsec6.h#4 integrate .. //depot/projects/wifi/sys/netncp/ncp_conn.c#7 integrate .. //depot/projects/wifi/sys/netsmb/smb_conn.c#7 integrate .. //depot/projects/wifi/sys/nfs4client/nfs4_idmap.c#3 integrate .. //depot/projects/wifi/sys/nfs4client/nfs4_vfsops.c#13 integrate .. //depot/projects/wifi/sys/nfs4client/nfs4_vnops.c#18 integrate .. //depot/projects/wifi/sys/nfsclient/nfs_node.c#16 integrate .. //depot/projects/wifi/sys/nfsclient/nfs_subs.c#13 integrate .. //depot/projects/wifi/sys/nfsclient/nfs_vfsops.c#21 integrate .. //depot/projects/wifi/sys/nfsclient/nfs_vnops.c#28 integrate .. //depot/projects/wifi/sys/nfsserver/nfs_serv.c#16 integrate .. //depot/projects/wifi/sys/nfsserver/nfs_srvsubs.c#14 integrate .. //depot/projects/wifi/sys/pci/amdsmb.c#5 integrate .. //depot/projects/wifi/sys/pci/if_rlreg.h#15 integrate .. //depot/projects/wifi/sys/pci/if_sf.c#16 delete .. //depot/projects/wifi/sys/pci/if_sfreg.h#9 delete .. //depot/projects/wifi/sys/pci/if_wb.c#14 integrate .. //depot/projects/wifi/sys/pci/nfsmb.c#6 integrate .. //depot/projects/wifi/sys/powerpc/powermac/ata_kauai.c#10 integrate .. //depot/projects/wifi/sys/security/audit/audit.c#13 integrate .. //depot/projects/wifi/sys/security/audit/audit_arg.c#10 integrate .. //depot/projects/wifi/sys/security/audit/audit_bsm.c#8 integrate .. //depot/projects/wifi/sys/security/audit/audit_syscalls.c#12 integrate .. //depot/projects/wifi/sys/security/audit/audit_worker.c#7 integrate .. //depot/projects/wifi/sys/security/mac/mac_process.c#8 integrate .. //depot/projects/wifi/sys/security/mac/mac_syscalls.c#5 integrate .. //depot/projects/wifi/sys/security/mac_mls/mac_mls.c#15 integrate .. //depot/projects/wifi/sys/sparc64/conf/GENERIC#22 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/dump_machdep.c#3 integrate .. //depot/projects/wifi/sys/sun4v/sun4v/dump_machdep.c#2 integrate .. //depot/projects/wifi/sys/sys/buf.h#18 integrate .. //depot/projects/wifi/sys/sys/bus.h#13 integrate .. //depot/projects/wifi/sys/sys/conf.h#20 integrate .. //depot/projects/wifi/sys/sys/event.h#9 integrate .. //depot/projects/wifi/sys/sys/lockmgr.h#11 integrate .. //depot/projects/wifi/sys/sys/mbuf.h#28 integrate .. //depot/projects/wifi/sys/sys/param.h#34 integrate .. //depot/projects/wifi/sys/sys/pmc.h#9 integrate .. //depot/projects/wifi/sys/sys/priv.h#9 integrate .. //depot/projects/wifi/sys/sys/proc.h#37 integrate .. //depot/projects/wifi/sys/sys/signal.h#7 integrate .. //depot/projects/wifi/sys/sys/socketvar.h#15 integrate .. //depot/projects/wifi/sys/sys/syscall.h#19 integrate .. //depot/projects/wifi/sys/sys/syscall.mk#19 integrate .. //depot/projects/wifi/sys/sys/sysproto.h#19 integrate .. //depot/projects/wifi/sys/sys/time.h#9 integrate .. //depot/projects/wifi/sys/sys/user.h#11 integrate .. //depot/projects/wifi/sys/sys/vnode.h#36 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_rawread.c#12 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_snapshot.c#24 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_softdep.c#23 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_vfsops.c#33 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_vnops.c#22 integrate .. //depot/projects/wifi/sys/ufs/ufs/ufs_extattr.c#15 integrate .. //depot/projects/wifi/sys/ufs/ufs/ufs_lookup.c#10 integrate .. //depot/projects/wifi/sys/ufs/ufs/ufs_quota.c#14 integrate .. //depot/projects/wifi/sys/ufs/ufs/ufs_vnops.c#28 integrate .. //depot/projects/wifi/sys/vm/swap_pager.c#24 integrate .. //depot/projects/wifi/sys/vm/vm_contig.c#18 integrate .. //depot/projects/wifi/sys/vm/vm_object.c#26 integrate .. //depot/projects/wifi/sys/vm/vnode_pager.c#29 integrate .. //depot/projects/wifi/tools/build/Makefile#4 integrate .. //depot/projects/wifi/tools/build/mk/OptionalObsoleteFiles.inc#7 integrate .. //depot/projects/wifi/tools/build/options/WITHOUT_FORTRAN#2 delete .. //depot/projects/wifi/tools/regression/lib/msun/Makefile#6 integrate .. //depot/projects/wifi/tools/regression/lib/msun/test-exponential.c#1 branch .. //depot/projects/wifi/tools/regression/lib/msun/test-exponential.t#1 branch .. //depot/projects/wifi/tools/regression/lib/msun/test-lrint.c#2 integrate .. //depot/projects/wifi/tools/regression/posixshm/Makefile#1 branch .. //depot/projects/wifi/tools/regression/posixshm/posixshm.c#1 branch .. //depot/projects/wifi/tools/regression/posixshm/posixshm.t#1 branch .. //depot/projects/wifi/tools/regression/posixshm/test.c#1 branch .. //depot/projects/wifi/tools/regression/posixshm/test.h#1 branch .. //depot/projects/wifi/tools/regression/sockets/unix_sorflush/Makefile#1 branch .. //depot/projects/wifi/tools/regression/sockets/unix_sorflush/unix_sorflush.c#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/Makefile#6 integrate .. //depot/projects/wifi/tools/regression/usr.bin/tr/Makefile#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.00.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.01.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.02.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.03.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.04.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.05.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.06.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.07.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.08.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.09.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.0a.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.0b.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.in#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.sh#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress.t#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/tr/regress2.in#1 branch .. //depot/projects/wifi/tools/sched/schedgraph.py#8 integrate .. //depot/projects/wifi/tools/tools/aac/aac_checkq.c#3 integrate .. //depot/projects/wifi/tools/tools/nanobsd/nanobsd.sh#12 integrate .. //depot/projects/wifi/usr.bin/file/Makefile#3 integrate .. //depot/projects/wifi/usr.bin/file/config.h#5 integrate .. //depot/projects/wifi/usr.bin/file/file.1#6 delete .. //depot/projects/wifi/usr.bin/file/magic.5#6 delete .. //depot/projects/wifi/usr.bin/fstat/Makefile#3 integrate .. //depot/projects/wifi/usr.bin/fstat/zfs/Makefile#2 integrate .. //depot/projects/wifi/usr.bin/kdump/Makefile#3 integrate .. //depot/projects/wifi/usr.bin/kdump/mkioctls#4 integrate .. //depot/projects/wifi/usr.bin/kdump/mksubr#5 integrate .. //depot/projects/wifi/usr.bin/mklocale/mklocale.1#4 integrate .. //depot/projects/wifi/usr.bin/mklocale/yacc.y#6 integrate .. //depot/projects/wifi/usr.bin/mt/mt.1#6 integrate .. //depot/projects/wifi/usr.bin/procstat/procstat_files.c#2 integrate .. //depot/projects/wifi/usr.bin/systat/cmds.c#2 integrate .. //depot/projects/wifi/usr.bin/systat/convtbl.c#4 integrate .. //depot/projects/wifi/usr.bin/systat/devs.c#2 integrate .. //depot/projects/wifi/usr.bin/systat/fetch.c#2 integrate .. //depot/projects/wifi/usr.bin/systat/icmp.c#3 integrate .. //depot/projects/wifi/usr.bin/systat/icmp6.c#3 integrate .. //depot/projects/wifi/usr.bin/systat/iostat.c#4 integrate .. //depot/projects/wifi/usr.bin/systat/ip.c#3 integrate .. //depot/projects/wifi/usr.bin/systat/ip6.c#3 integrate .. //depot/projects/wifi/usr.bin/systat/keyboard.c#2 integrate .. //depot/projects/wifi/usr.bin/systat/main.c#3 integrate .. //depot/projects/wifi/usr.bin/systat/mbufs.c#4 integrate .. //depot/projects/wifi/usr.bin/systat/netcmds.c#2 integrate .. //depot/projects/wifi/usr.bin/systat/netstat.c#5 integrate .. //depot/projects/wifi/usr.bin/systat/pigs.c#6 integrate .. //depot/projects/wifi/usr.bin/systat/swap.c#4 integrate .. //depot/projects/wifi/usr.bin/systat/tcp.c#4 integrate .. //depot/projects/wifi/usr.bin/systat/vmstat.c#5 integrate .. //depot/projects/wifi/usr.bin/tar/bsdtar.1#14 integrate .. //depot/projects/wifi/usr.bin/tar/bsdtar.c#15 integrate .. //depot/projects/wifi/usr.bin/top/machine.c#11 integrate .. //depot/projects/wifi/usr.bin/truss/Makefile#4 integrate .. //depot/projects/wifi/usr.bin/vmstat/vmstat.c#13 integrate .. //depot/projects/wifi/usr.bin/wall/wall.c#3 integrate .. //depot/projects/wifi/usr.bin/xargs/xargs.1#6 integrate .. //depot/projects/wifi/usr.sbin/Makefile#27 integrate .. //depot/projects/wifi/usr.sbin/adduser/adduser.8#5 integrate .. //depot/projects/wifi/usr.sbin/adduser/adduser.sh#7 integrate .. //depot/projects/wifi/usr.sbin/bootparamd/bootparamd/bootparamd.c#4 integrate .. //depot/projects/wifi/usr.sbin/bootparamd/bootparamd/main.c#3 integrate .. //depot/projects/wifi/usr.sbin/inetd/inetd.8#6 integrate .. //depot/projects/wifi/usr.sbin/iostat/iostat.c#8 integrate .. //depot/projects/wifi/usr.sbin/kbdcontrol/kbdcontrol.1#8 integrate .. //depot/projects/wifi/usr.sbin/kbdcontrol/kbdmap.5#2 integrate .. //depot/projects/wifi/usr.sbin/newsyslog/newsyslog.c#7 integrate .. //depot/projects/wifi/usr.sbin/ofwdump/Makefile#2 integrate .. //depot/projects/wifi/usr.sbin/ofwdump/ofwdump.8#2 integrate .. //depot/projects/wifi/usr.sbin/pw/pw.8#5 integrate .. //depot/projects/wifi/usr.sbin/setfmac/setfmac.c#4 integrate .. //depot/projects/wifi/usr.sbin/sysinstall/disks.c#6 integrate .. //depot/projects/wifi/usr.sbin/sysinstall/menus.c#18 integrate .. //depot/projects/wifi/usr.sbin/watch/watch.c#3 integrate Differences ... ==== //depot/projects/wifi/LOCKS#3 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/LOCKS,v 1.3 2006/01/13 06:51:43 ru Exp $ +$FreeBSD: src/LOCKS,v 1.4 2008/01/24 22:07:03 cperciva Exp $ This file documents formal review/approval requirements that have been approved by core. @@ -10,3 +10,4 @@ src/* RELENG_4_* Requires Security Officer approval. src/* RELENG_5_* Requires Security Officer approval. src/* RELENG_6_* Requires Security Officer approval. +src/* RELENG_7_* Requires Security Officer approval. ==== //depot/projects/wifi/MAINTAINERS#17 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/MAINTAINERS,v 1.145 2007/05/23 21:47:19 jfv Exp $ +$FreeBSD: src/MAINTAINERS,v 1.146 2008/01/26 21:58:52 brueffer Exp $ Please note that the content of this file is strictly advisory. No locks listed here are valid. The only strict review requirements @@ -33,7 +33,6 @@ ahc(4) gibbs Pre-commit review requested. ahd(4) gibbs Pre-commit review requested. NEWCARD imp Pre-commit review requested. -OLDCARD imp Pre-commit review requested. pci bus imp,jhb Pre-commit review requested. cdboot jhb Pre-commit review requested. pxeboot jhb Pre-commit review requested. ==== //depot/projects/wifi/Makefile#18 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile,v 1.344 2007/12/13 00:08:02 imp Exp $ +# $FreeBSD: src/Makefile,v 1.345 2008/01/30 19:33:18 jhb Exp $ # # The user-driven targets are: # @@ -75,6 +75,8 @@ # developer convenience only. They are intentionally not documented and # completely subject to change without notice. # +# For more information, see the build(7) manual page. +# TGTS= all all-man buildenv buildenvvars buildkernel buildworld \ check-old check-old-dirs check-old-files check-old-libs \ checkdpadd clean cleandepend cleandir \ ==== //depot/projects/wifi/Makefile.inc1#39 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.591 2007/12/04 12:55:27 yar Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.596 2008/01/23 22:21:36 ru Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -227,7 +227,7 @@ # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - -DWITHOUT_FORTRAN -DWITHOUT_GDB + -DWITHOUT_GDB # world stage WMAKEENV= ${CROSSENV} \ @@ -841,8 +841,8 @@ # legacy: Build compatibility shims for the next three targets # legacy: -.if ${BOOTSTRAPPING} < 503000 - @echo "ERROR: Source upgrades from versions prior to 5.3 not supported."; \ +.if ${BOOTSTRAPPING} < 600034 && ${BOOTSTRAPPING} != 0 + @echo "ERROR: Source upgrades from versions prior to 6.0 not supported."; \ false .endif .for _tool in tools/build @@ -871,26 +871,6 @@ .endif .endif -.if ${BOOTSTRAPPING} < 600029 -_texinfo= gnu/usr.bin/texinfo -.endif - -.if ${BOOTSTRAPPING} < 600015 -_cap_mkdb= usr.bin/cap_mkdb -.endif - -.if ${BOOTSTRAPPING} < 600018 -_colldef= usr.bin/colldef -.endif - -.if ${BOOTSTRAPPING} < 600017 -_gencat= usr.bin/gencat -.endif - -.if ${BOOTSTRAPPING} < 600016 -_mklocale= usr.bin/mklocale -.endif - .if ${BOOTSTRAPPING} < 700018 _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif @@ -900,28 +880,23 @@ _crunchgen= usr.sbin/crunch/crunchgen .endif -.if ${BOOTSTRAPPING} < 600020 -_pwd_mkdb= usr.sbin/pwd_mkdb +.if ${BOOTSTRAPPING} < 800013 +_mklocale= usr.bin/mklocale .endif bootstrap-tools: .for _tool in \ + ${_mklocale} \ ${_strfile} \ ${_gperf} \ ${_groff} \ - ${_texinfo} \ - ${_cap_mkdb} \ - ${_colldef} \ - ${_gencat} \ usr.bin/lorder \ usr.bin/makewhatis \ - ${_mklocale} \ usr.bin/rpcgen \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ - ${_crunchgen} \ - ${_pwd_mkdb} + ${_crunchgen} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ==== //depot/projects/wifi/ObsoleteFiles.inc#25 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Feb 4 03:25:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B5E2A16A41A; Mon, 4 Feb 2008 03:25:38 +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 6344E16A418 for ; Mon, 4 Feb 2008 03:25:38 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8F013C43E for ; Mon, 4 Feb 2008 03:25:38 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m143PcvA002078 for ; Mon, 4 Feb 2008 03:25:38 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m143Pb9S002075 for perforce@freebsd.org; Mon, 4 Feb 2008 03:25:37 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 4 Feb 2008 03:25:37 GMT Message-Id: <200802040325.m143Pb9S002075@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134757 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 03:25:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=134757 Change 134757 by kmacy@kmacy:storage:toehead on 2008/02/04 03:25:24 don't overwrite ext_type (it causes a cluster leak) Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/sys/mvec.h#7 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/sys/mvec.h#7 (text+ko) ==== @@ -79,7 +79,7 @@ #define m_seq m_pkthdr.csum_data /* stored sequence */ #define m_ddp_gl m_ext.ext_buf /* ddp list */ #define m_ddp_flags m_pkthdr.csum_flags /* ddp flags */ -#define m_ulp_mode m_ext.ext_type /* upper level protocol */ +#define m_ulp_mode m_pkthdr.tso_segsz /* upper level protocol */ extern uma_zone_t zone_miovec; From owner-p4-projects@FreeBSD.ORG Mon Feb 4 04:34:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3229916A420; Mon, 4 Feb 2008 04:34:52 +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 E2BC516A41B for ; Mon, 4 Feb 2008 04:34:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B5E0513C4F3 for ; Mon, 4 Feb 2008 04:34:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m144Ypwh006835 for ; Mon, 4 Feb 2008 04:34:51 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m144YolO006832 for perforce@freebsd.org; Mon, 4 Feb 2008 04:34:50 GMT (envelope-from sam@freebsd.org) Date: Mon, 4 Feb 2008 04:34:50 GMT Message-Id: <200802040434.m144YolO006832@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 134760 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 04:34:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=134760 Change 134760 by sam@sam_ebb on 2008/02/04 04:34:03 IFC @ 134759 Affected files ... .. //depot/projects/vap/contrib/file/Magdir/bFLT#3 delete .. //depot/projects/vap/contrib/file/Magdir/chi#3 delete .. //depot/projects/vap/contrib/file/Magdir/cvs#3 delete .. //depot/projects/vap/contrib/file/Magdir/hdf#3 delete .. //depot/projects/vap/contrib/file/Magdir/impulse#3 delete .. //depot/projects/vap/contrib/file/Magdir/wordperfect#3 delete .. //depot/projects/vap/contrib/file/acconfig.h#3 delete .. //depot/projects/vap/contrib/file/magic.c#4 integrate .. //depot/projects/vap/contrib/file/missing#3 delete .. //depot/projects/vap/contrib/file/stamp-h.in#3 delete .. //depot/projects/vap/etc/periodic/security/100.chksetuid#3 integrate .. //depot/projects/vap/etc/rc.d/dhclient#4 integrate .. //depot/projects/vap/include/pthread_np.h#4 integrate .. //depot/projects/vap/lib/libc/net/getaddrinfo.c#3 integrate .. //depot/projects/vap/lib/libc/sys/sendfile.2#3 integrate .. //depot/projects/vap/lib/libpmc/pmc.3#4 integrate .. //depot/projects/vap/lib/libthr/pthread.map#4 integrate .. //depot/projects/vap/lib/libthr/thread/thr_mutex.c#4 integrate .. //depot/projects/vap/release/doc/en_US.ISO8859-1/hardware/article.sgml#4 integrate .. //depot/projects/vap/release/doc/share/misc/dev.archlist.txt#5 integrate .. //depot/projects/vap/sbin/mount/mount.c#3 integrate .. //depot/projects/vap/share/man/man4/Makefile#5 integrate .. //depot/projects/vap/share/man/man4/hptiop.4#3 integrate .. //depot/projects/vap/share/man/man4/rr232x.4#3 delete .. //depot/projects/vap/share/mk/bsd.dep.mk#3 integrate .. //depot/projects/vap/sys/amd64/amd64/identcpu.c#7 integrate .. //depot/projects/vap/sys/amd64/conf/GENERIC#7 integrate .. //depot/projects/vap/sys/amd64/conf/NOTES#7 integrate .. //depot/projects/vap/sys/amd64/include/specialreg.h#6 integrate .. //depot/projects/vap/sys/conf/files.amd64#7 integrate .. //depot/projects/vap/sys/conf/files.i386#7 integrate .. //depot/projects/vap/sys/conf/kern.pre.mk#6 integrate .. //depot/projects/vap/sys/dev/hptiop/hptiop.c#3 integrate .. //depot/projects/vap/sys/dev/hptiop/hptiop.h#3 integrate .. //depot/projects/vap/sys/dev/mfi/mfi.c#4 integrate .. //depot/projects/vap/sys/dev/mfi/mfireg.h#3 integrate .. //depot/projects/vap/sys/dev/ral/rt2560.c#13 integrate .. //depot/projects/vap/sys/dev/ral/rt2560reg.h#4 integrate .. //depot/projects/vap/sys/dev/ral/rt2560var.h#9 integrate .. //depot/projects/vap/sys/dev/rr232x/LICENSE#3 delete .. //depot/projects/vap/sys/dev/rr232x/README#3 delete .. //depot/projects/vap/sys/dev/rr232x/amd64-elf.rr232x_lib.o.uu#3 delete .. //depot/projects/vap/sys/dev/rr232x/array.h#3 delete .. //depot/projects/vap/sys/dev/rr232x/him.h#3 delete .. //depot/projects/vap/sys/dev/rr232x/himfuncs.h#3 delete .. //depot/projects/vap/sys/dev/rr232x/hptintf.h#3 delete .. //depot/projects/vap/sys/dev/rr232x/i386-elf.rr232x_lib.o.uu#3 delete .. //depot/projects/vap/sys/dev/rr232x/ldm.h#3 delete .. //depot/projects/vap/sys/dev/rr232x/list.h#3 delete .. //depot/projects/vap/sys/dev/rr232x/os_bsd.c#3 delete .. //depot/projects/vap/sys/dev/rr232x/os_bsd.h#3 delete .. //depot/projects/vap/sys/dev/rr232x/osm.h#3 delete .. //depot/projects/vap/sys/dev/rr232x/osm_bsd.c#3 delete .. //depot/projects/vap/sys/dev/rr232x/rr232x_config.c#3 delete .. //depot/projects/vap/sys/dev/rr232x/rr232x_config.h#3 delete .. //depot/projects/vap/sys/i386/conf/NOTES#7 integrate .. //depot/projects/vap/sys/ia64/ia64/locore.S#5 integrate .. //depot/projects/vap/sys/ia64/ia64/machdep.c#7 integrate .. //depot/projects/vap/sys/ia64/include/md_var.h#5 integrate .. //depot/projects/vap/sys/kern/uipc_syscalls.c#8 integrate .. //depot/projects/vap/sys/modules/Makefile#11 integrate .. //depot/projects/vap/sys/modules/rr232x/Makefile#3 delete .. //depot/projects/vap/sys/net/bpf.c#7 integrate .. //depot/projects/vap/sys/net80211/ieee80211_ht.h#6 integrate .. //depot/projects/vap/sys/net80211/ieee80211_input.c#26 integrate .. //depot/projects/vap/sys/netgraph/netflow/ng_netflow.c#7 integrate .. //depot/projects/vap/sys/netgraph/ng_base.c#8 integrate .. //depot/projects/vap/sys/netgraph/ng_tee.c#5 integrate .. //depot/projects/vap/sys/netinet/ip_output.c#6 integrate .. //depot/projects/vap/sys/netinet6/ip6_output.c#8 integrate .. //depot/projects/vap/sys/netipsec/ipsec.c#6 integrate .. //depot/projects/vap/sys/netipsec/ipsec.h#5 integrate .. //depot/projects/vap/sys/netipsec/ipsec6.h#5 integrate .. //depot/projects/vap/sys/sys/socket.h#7 integrate .. //depot/projects/vap/tools/regression/pthread/mutex_islocked_np/Makefile#1 branch .. //depot/projects/vap/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c#1 branch .. //depot/projects/vap/usr.bin/kdump/Makefile#3 integrate .. //depot/projects/vap/usr.bin/kdump/mkioctls#3 integrate .. //depot/projects/vap/usr.bin/kdump/mksubr#3 integrate .. //depot/projects/vap/usr.bin/truss/Makefile#3 integrate .. //depot/projects/vap/usr.sbin/ypserv/yp_main.c#3 integrate .. //depot/projects/vap/usr.sbin/ypserv/ypserv.8#3 integrate Differences ... ==== //depot/projects/vap/contrib/file/magic.c#4 (text+ko) ==== @@ -218,6 +218,7 @@ */ #ifdef HAVE_UTIMES struct timeval utsbuf[2]; + memset(utsbuf, 0, sizeof(struct timeval) * 2); utsbuf[0].tv_sec = sb->st_atime; utsbuf[1].tv_sec = sb->st_mtime; @@ -225,6 +226,7 @@ #elif defined(HAVE_UTIME_H) || defined(HAVE_SYS_UTIME_H) struct utimbuf utbuf; + memset(&utbuf, 0, sizeof(struct utimbuf)); utbuf.actime = sb->st_atime; utbuf.modtime = sb->st_mtime; (void) utime(name, &utbuf); /* don't care if loses */ ==== //depot/projects/vap/etc/periodic/security/100.chksetuid#3 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/periodic/security/100.chksetuid,v 1.9 2007/11/23 13:00:31 ru Exp $ +# $FreeBSD: src/etc/periodic/security/100.chksetuid,v 1.11 2008/02/03 00:33:05 des Exp $ # # If there is a global system configuration file, suck it in. @@ -43,22 +43,16 @@ [Yy][Ee][Ss]) echo "" echo 'Checking setuid files and devices:' - # XXX Note that there is the possibility of overrunning the args to ls - MP=`mount -t ufs,zfs | egrep -v " no(suid|exec)" | awk '{ print $3 }' | sort` - if [ -n "${MP}" ] - then - set ${MP} - while [ $# -ge 1 ]; do - mount=$1 - shift - find $mount -xdev -type f \ - \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ - \( -perm -u+s -or -perm -g+s \) -print0 - done | xargs -0 -n 20 ls -liTd | sed 's/^ *//' | sort -k 11 | - check_diff setuid - "${host} setuid diffs:" - rc=$? - fi;; - *) rc=0;; + MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` + find -sx $MP /dev/null -type f \ + \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ + \( -perm -u+s -or -perm -g+s \) -exec ls -liTd \{\} \+ | + check_diff setuid - "${host} setuid diffs:" + rc=$? + ;; + *) + rc=0 + ;; esac exit $rc ==== //depot/projects/vap/etc/rc.d/dhclient#4 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/dhclient,v 1.30 2007/12/08 22:27:18 dougb Exp $ +# $FreeBSD: src/etc/rc.d/dhclient,v 1.31 2008/02/01 23:43:58 brooks Exp $ # # PROVIDE: dhclient @@ -21,7 +21,11 @@ if [ -x /bin/pgrep ]; then pids=`/bin/pgrep -f "dhclient: $ifn(\$| .*)"` if [ -n "$pids" ]; then - exit 0 + sleep 1 + pids=`/bin/pgrep -f "dhclient: $ifn(\$| .*)"` + if [ -n "$pids" ]; then + exit 0 + fi fi fi ==== //depot/projects/vap/include/pthread_np.h#4 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/include/pthread_np.h,v 1.18 2007/12/14 06:25:56 davidxu Exp $ + * $FreeBSD: src/include/pthread_np.h,v 1.19 2008/02/03 22:38:10 des Exp $ */ #ifndef _PTHREAD_NP_H_ #define _PTHREAD_NP_H_ @@ -53,6 +53,7 @@ int pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); int pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count); int pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count); +int pthread_mutex_islocked_np(pthread_mutex_t *mutex); int pthread_single_np(void); void pthread_suspend_all_np(void); int pthread_suspend_np(pthread_t); ==== //depot/projects/vap/lib/libc/net/getaddrinfo.c#3 (text+ko) ==== @@ -54,7 +54,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.86 2007/09/05 18:08:14 jinmei Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.87 2008/02/03 19:07:55 ume Exp $"); #include "namespace.h" #include @@ -425,27 +425,6 @@ } /* - * post-2553: AI_ALL and AI_V4MAPPED are effective only against - * AF_INET6 query. They need to be ignored if specified in other - * occassions. - */ - switch (pai->ai_flags & (AI_ALL | AI_V4MAPPED)) { - case AI_V4MAPPED: - case AI_ALL | AI_V4MAPPED: - if (pai->ai_family != AF_INET6) - pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED); - break; - case AI_ALL: -#if 1 - /* illegal */ - ERR(EAI_BADFLAGS); -#else - pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED); -#endif - break; - } - - /* * check for special cases. (1) numeric servname is disallowed if * socktype/protocol are left unspecified. (2) servname is disallowed * for raw and other inet{,6} sockets. ==== //depot/projects/vap/lib/libc/sys/sendfile.2#3 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/sendfile.2,v 1.31 2006/11/24 11:44:19 yar Exp $ +.\" $FreeBSD: src/lib/libc/sys/sendfile.2,v 1.32 2008/02/03 15:54:40 phk Exp $ .\" .Dd November 24, 2006 .Dt SENDFILE 2 @@ -103,7 +103,9 @@ .Pp The .Fa flags -argument has one possible value: +argument is a bitmap of these values: +.Bl -item -offset indent +.It .Dv SF_NODISKIO . This flag causes any .Fn sendfile @@ -112,6 +114,17 @@ .Er EBUSY . Busy servers may benefit by transferring requests that would block to a separate I/O worker thread. +.It +.Dv SF_MNOWAIT . +(description missing) +.It +.Dv SF_SYNC , +.Nm +sleeps until the network stack no longer references the VM pages +of the file, making subsequent modifications to it safe. +Please note that this is not a guarantee that the data has actually +been sent. +.El .Pp When using a socket marked for non-blocking I/O, .Fn sendfile ==== //depot/projects/vap/lib/libpmc/pmc.3#4 (text+ko) ==== @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $FreeBSD: src/lib/libpmc/pmc.3,v 1.15 2007/12/03 10:59:23 jkoshy Exp $ +.\" $FreeBSD: src/lib/libpmc/pmc.3,v 1.16 2008/02/03 06:04:38 jkoshy Exp $ .\" .Dd November 25, 2007 .Os @@ -2212,7 +2212,7 @@ uop will be counted. .It Li p4-b2b-cycles .Pq "TI event" -Count back-to-back bys cycles. +Count back-to-back bus cycles. Further documentation for this event is unavailable. .It Li p4-bnr .Pq "TI event" ==== //depot/projects/vap/lib/libthr/pthread.map#4 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * $FreeBSD: src/lib/libthr/pthread.map,v 1.21 2007/12/20 04:32:28 davidxu Exp $ + * $FreeBSD: src/lib/libthr/pthread.map,v 1.22 2008/02/03 22:38:10 des Exp $ */ /* @@ -395,3 +395,18 @@ local: *; }; + +FBSD_1.1 { +global: + pthread_mutex_islocked_np; +local: + *; +} FBSD_1.0; + +FBSDprivate_1.1 { +global: + _pthread_mutex_islocked_np; +local: + *; +} FBSDprivate_1.0; + ==== //depot/projects/vap/lib/libthr/thread/thr_mutex.c#4 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.66 2007/12/17 02:53:11 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.67 2008/02/03 22:38:10 des Exp $ */ #include "namespace.h" @@ -87,6 +87,7 @@ int _pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count); int _pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count); int __pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count); +int _pthread_mutex_islocked_np(pthread_mutex_t *mutex); static int mutex_self_trylock(pthread_mutex_t); static int mutex_self_lock(pthread_mutex_t, @@ -111,6 +112,7 @@ __weak_reference(__pthread_mutex_setyieldloops_np, pthread_mutex_setyieldloops_np); __weak_reference(_pthread_mutex_getyieldloops_np, pthread_mutex_getyieldloops_np); +__weak_reference(_pthread_mutex_islocked_np, pthread_mutex_islocked_np); static int mutex_init(pthread_mutex_t *mutex, @@ -863,3 +865,17 @@ (*mutex)->m_yieldloops = count; return (0); } + +int +_pthread_mutex_islocked_np(pthread_mutex_t *mutex) +{ + struct pthread *curthread = _get_curthread(); + int ret; + + if (__predict_false(*mutex == NULL)) { + ret = init_static(curthread, mutex); + if (__predict_false(ret)) + return (ret); + } + return ((*mutex)->m_qe.tqe_prev != NULL); +} ==== //depot/projects/vap/release/doc/en_US.ISO8859-1/hardware/article.sgml#4 (text+ko) ==== @@ -18,7 +18,7 @@ The &os; Documentation Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.328 2007/12/16 13:14:47 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.329 2008/02/03 09:43:08 brueffer Exp $ 2000 @@ -558,8 +558,6 @@ &hwlist.pst; - &hwlist.rr232x; - &hwlist.stg; &hwlist.sym; ==== //depot/projects/vap/release/doc/share/misc/dev.archlist.txt#5 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.102 2008/01/21 09:00:09 brueffer Exp $ +# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.103 2008/02/03 09:43:08 brueffer Exp $ # # @@ -103,7 +103,6 @@ pcn i386,pc98,ia64,amd64 pst i386 rc i386 -rr232x i386,amd64 ral i386,amd64 rue i386,pc98,amd64 rum i386,amd64 ==== //depot/projects/vap/sbin/mount/mount.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/mount/mount.c,v 1.96 2007/06/25 05:06:54 rafan Exp $"; + "$FreeBSD: src/sbin/mount/mount.c,v 1.97 2008/02/03 17:23:58 matteo Exp $"; #endif /* not lint */ #include @@ -81,7 +81,7 @@ int, const char *, const char *); void remopt(char *, const char *); void prmount(struct statfs *); -void putfsent(const struct statfs *); +void putfsent(struct statfs *); void usage(void); char *flags2opts(int); @@ -805,7 +805,7 @@ } void -putfsent(const struct statfs *ent) +putfsent(struct statfs *ent) { struct fstab *fst; char *opts; @@ -813,6 +813,12 @@ opts = flags2opts(ent->f_flags); + if (strncmp(ent->f_mntfromname, "", 7) == 0 || + strncmp(ent->f_mntfromname, "", 7) == 0) { + strcpy(ent->f_mntfromname, (strnstr(ent->f_mntfromname, ":", 8) + +1)); + } + /* * "rw" is not a real mount option; this is why we print NULL as "rw" * if opts is still NULL here. ==== //depot/projects/vap/share/man/man4/Makefile#5 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD: src/share/man/man4/Makefile,v 1.404 2008/01/26 20:23:25 brueffer Exp $ +# $FreeBSD: src/share/man/man4/Makefile,v 1.407 2008/02/03 16:42:22 brueffer Exp $ MAN= aac.4 \ acpi.4 \ @@ -282,7 +282,6 @@ rndtest.4 \ route.4 \ rp.4 \ - ${_rr232x.4} \ rue.4 \ rum.4 \ sa.4 \ @@ -464,6 +463,7 @@ MLINKS+=gre.4 if_gre.4 MLINKS+=hatm.4 if_hatm.4 MLINKS+=hme.4 if_hme.4 +MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=idt.4 if_idt.4 MLINKS+=if_bridge.4 bridge.4 MLINKS+=ip.4 rawip.4 ==== //depot/projects/vap/share/man/man4/hptiop.4#3 (text+ko) ==== @@ -22,14 +22,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/hptiop.4,v 1.1 2007/05/11 22:52:19 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/hptiop.4,v 1.2 2008/02/03 16:16:38 scottl Exp $ .\" .Dd May 12, 2007 .Dt HPTIOP 4 .Os .Sh NAME .Nm hptiop -.Nd "HighPoint RocketRAID 3xxx device driver" +.Nd "HighPoint RocketRAID 3xxx/4xxx device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your @@ -49,25 +49,48 @@ .Sh DESCRIPTION The .Nm -driver provides support for the HighPoint RocketRAID 3xxx series -of SATA RAID controllers. +driver provides support for the HighPoint RocketRAID 3xxx/4xxx series +of SAS and SATA RAID controllers. .Sh HARDWARE The .Nm -driver supports the following SATA RAID controllers: +driver supports the following SAS and SATA RAID controllers: .Pp .Bl -bullet -compact .It +HighPoint RocketRAID 4320 +.It HighPoint RocketRAID 3220 +.It +HighPoint RocketRAID 3320 +.It +HighPoint RocketRAID 3410 +.It +HighPoint RocketRAID 3520 +.It +HighPoint RocketRAID 3510 +.It +HighPoint RocketRAID 3511 +.It +HighPoint RocketRAID 3521 +.It +HighPoint RocketRAID 3522 +.It +HighPoint RocketRAID 3540 +.It +HighPoint RocketRAID 3120 +.It +HighPoint RocketRAID 3122 +.It +HighPoint RocketRAID 3020 .El .Sh NOTES The .Nm -driver only works on the i386 and amd64 platforms. +driver has only been tested on the i386 and amd64 platforms. .Sh SEE ALSO .Xr cam 4 , .Xr hptmv 4 , -.Xr rr232x 4 .Sh HISTORY The .Nm ==== //depot/projects/vap/share/mk/bsd.dep.mk#3 (text+ko) ==== @@ -1,10 +1,12 @@ -# $FreeBSD: src/share/mk/bsd.dep.mk,v 1.48 2005/01/06 11:12:43 krion Exp $ +# $FreeBSD: src/share/mk/bsd.dep.mk,v 1.49 2008/02/03 11:34:55 des Exp $ # # The include file handles Makefile dependencies. # # # +++ variables +++ # +# CLEANDEPFILES Additional files to clean when doing cleandepend +# # CTAGS A tags file generation program [gtags] # # CTAGSFLAGS Options for ctags(1) [not set] @@ -182,6 +184,9 @@ .if defined(HTML) rm -rf HTML .endif +.if defined(CLEANDEPFILES) + rm -f ${CLEANDEPFILES} +.endif .endif .endif .endif ==== //depot/projects/vap/sys/amd64/amd64/identcpu.c#7 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.155 2007/12/08 21:13:01 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.157 2008/02/02 23:17:27 das Exp $"); #include "opt_cpu.h" @@ -223,7 +223,7 @@ "\020" "\001SSE3" /* SSE3 */ "\002" - "\003RSVD2" /* "Reserved" bit 2 */ + "\003DTES64" /* 64-bit Debug Trace */ "\004MON" /* MONITOR/MWAIT Instructions */ "\005DS_CPL" /* CPL Qualified Debug Store */ "\006VMX" /* Virtual Machine Extensions */ @@ -240,11 +240,11 @@ "\021" "\022" "\023DCA" /* Direct Cache Access */ - "\024" - "\025" - "\026" + "\024SSE4.1" + "\025SSE4.2" + "\026x2APIC" /* xAPIC Extensions */ "\027" - "\030" + "\030POPCNT" "\031" "\032" "\033" ==== //depot/projects/vap/sys/amd64/conf/GENERIC#7 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.491 2008/01/07 21:40:09 jhb Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.492 2008/02/03 07:07:30 scottl Exp $ cpu HAMMER ident GENERIC @@ -133,7 +133,6 @@ device dpt # DPT Smartcache III, IV - See NOTES for options device hptmv # Highpoint RocketRAID 182x device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx -device rr232x # Highpoint RocketRAID 232x device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID ==== //depot/projects/vap/sys/amd64/conf/NOTES#7 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.74 2007/12/28 22:50:04 rpaulo Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.75 2008/02/03 07:07:30 scottl Exp $ # # @@ -381,11 +381,6 @@ device hptrr # -# Highpoint RocketRAID 232x. This is software RAID but with hardware -# acceleration assistance for RAID_5. -device rr232x - -# # Highpoint RocketRaid 3xxx series SATA RAID device hptiop ==== //depot/projects/vap/sys/amd64/include/specialreg.h#6 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.41 2007/12/08 21:13:01 alc Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.43 2008/02/02 23:17:27 das Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -113,6 +113,7 @@ #define CPUID_PBE 0x80000000 #define CPUID2_SSE3 0x00000001 +#define CPUID2_DTES64 0x00000004 #define CPUID2_MON 0x00000008 #define CPUID2_DS_CPL 0x00000010 #define CPUID2_VMX 0x00000020 @@ -125,6 +126,10 @@ #define CPUID2_XTPR 0x00004000 #define CPUID2_PDCM 0x00008000 #define CPUID2_DCA 0x00040000 +#define CPUID2_SSE41 0x00080000 +#define CPUID2_SSE42 0x00100000 +#define CPUID2_X2APIC 0x00200000 +#define CPUID2_POPCNT 0x00800000 /* * Important bits in the AMD extended cpuid flags ==== //depot/projects/vap/sys/conf/files.amd64#7 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.117 2007/12/15 00:56:15 scottl Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.118 2008/02/03 07:07:29 scottl Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -77,11 +77,6 @@ compile-with "uudecode < $S/dev/hptrr/amd64-elf.hptrr_lib.o.uu" \ no-implicit-rule # -rr232x_lib.o optional rr232x \ - dependency "$S/dev/rr232x/amd64-elf.rr232x_lib.o.uu" \ - compile-with "uudecode < $S/dev/rr232x/amd64-elf.rr232x_lib.o.uu" \ - no-implicit-rule -# amd64/acpica/OsdEnvironment.c optional acpi amd64/acpica/acpi_machdep.c optional acpi amd64/acpica/acpi_wakeup.c optional acpi @@ -199,9 +194,6 @@ dev/nfe/if_nfe.c optional nfe pci dev/nve/if_nve.c optional nve pci dev/nvram/nvram.c optional nvram isa -dev/rr232x/os_bsd.c optional rr232x -dev/rr232x/osm_bsd.c optional rr232x -dev/rr232x/rr232x_config.c optional rr232x dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/sio/sio_pccard.c optional sio pccard ==== //depot/projects/vap/sys/conf/files.i386#7 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.591 2007/12/25 22:41:29 wkoszek Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.592 2008/02/03 07:07:29 scottl Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -82,11 +82,6 @@ compile-with "uudecode < $S/dev/hptrr/i386-elf.hptrr_lib.o.uu" \ no-implicit-rule # -rr232x_lib.o optional rr232x \ - dependency "$S/dev/rr232x/i386-elf.rr232x_lib.o.uu" \ - compile-with "uudecode < $S/dev/rr232x/i386-elf.rr232x_lib.o.uu" \ - no-implicit-rule -# compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs compat/linux/linux_emul.c optional compat_linux @@ -231,9 +226,6 @@ dev/nvram/nvram.c optional nvram isa dev/pcf/pcf_isa.c optional pcf dev/random/nehemiah.c optional random -dev/rr232x/os_bsd.c optional rr232x -dev/rr232x/osm_bsd.c optional rr232x -dev/rr232x/rr232x_config.c optional rr232x dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_isa.c optional sbni isa dev/sbni/if_sbni_pci.c optional sbni pci ==== //depot/projects/vap/sys/conf/kern.pre.mk#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.92 2007/08/08 19:12:06 marcel Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.97 2008/02/02 19:55:28 imp Exp $ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. @@ -12,6 +12,8 @@ KERNEL_KO?= kernel KERNEL?= kernel KODIR?= /boot/${KERNEL} +LDSCRIPT_NAME?= ldscript.$M +LDSCRIPT?= $S/conf/${LDSCRIPT_NAME} M= ${MACHINE_ARCH} @@ -87,12 +89,8 @@ CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} CFLAGS+= --param inline-unit-growth=100 CFLAGS+= --param large-function-growth=1000 -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" || \ - ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "sparc64" WERROR?= -Werror .endif -.endif # XXX LOCORE means "don't declare C stuff" not "for locore.s". ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} @@ -134,12 +132,12 @@ SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} SYSTEM_OBJS+= hack.So -SYSTEM_LD= @${LD} -Bdynamic -T $S/conf/ldscript.$M \ +SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \ -warn-common -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ ${SIZE} ${.TARGET} ; chmod 755 ${.TARGET} -SYSTEM_DEP+= $S/conf/ldscript.$M +SYSTEM_DEP+= ${LDSCRIPT} # MKMODULESENV is set here so that port makefiles can augment # them. ==== //depot/projects/vap/sys/dev/hptiop/hptiop.c#3 (text+ko) ==== @@ -1,6 +1,7 @@ /* - * HighPoint RR3xxx RAID Driver for FreeBSD - * Copyright (C) 2005-2007 HighPoint Technologies, Inc. All Rights Reserved. + * HighPoint RR3xxx/4xxx RAID Driver for FreeBSD + * Copyright (C) 2007-2008 HighPoint Technologies, 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: @@ -22,9 +23,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - + #include -__FBSDID("$FreeBSD: src/sys/dev/hptiop/hptiop.c,v 1.2 2007/06/17 05:55:50 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/hptiop/hptiop.c,v 1.3 2008/02/03 16:07:12 scottl Exp $"); #include #include @@ -89,35 +90,65 @@ #include -static struct hpt_iop_hba * g_hba[4]; -static int iop_count = 0; static char driver_name[] = "hptiop"; -static char driver_version[] = "v1.2 (041307)"; -static int osm_max_targets = 32; +static char driver_version[] = "v1.3 (010208)"; static devclass_t hptiop_devclass; -static void os_request_callback(struct hpt_iop_hba * hba, u_int32_t req); -static void os_message_callback(struct hpt_iop_hba * hba, u_int32_t msg); -static int hptiop_do_ioctl(struct hpt_iop_hba * hba, struct hpt_iop_ioctl_param * pParams); +static int hptiop_send_sync_msg(struct hpt_iop_hba *hba, + u_int32_t msg, u_int32_t millisec); +static void hptiop_request_callback_itl(struct hpt_iop_hba *hba, + u_int32_t req); +static void hptiop_request_callback_mv(struct hpt_iop_hba *hba, u_int64_t req); +static void hptiop_os_message_callback(struct hpt_iop_hba *hba, u_int32_t msg); +static int hptiop_do_ioctl_itl(struct hpt_iop_hba *hba, + struct hpt_iop_ioctl_param *pParams); +static int hptiop_do_ioctl_mv(struct hpt_iop_hba *hba, + struct hpt_iop_ioctl_param *pParams); static void hptiop_bus_scan_cb(struct cam_periph *periph, union ccb *ccb); -static int hptiop_rescan_bus(struct hpt_iop_hba * hba); -static int hptiop_post_ioctl_command(struct hpt_iop_hba * hba, - struct hpt_iop_request_ioctl_command * req, struct hpt_iop_ioctl_param * pParams); -static int os_query_remove_device(struct hpt_iop_hba * hba, int target_id); +static int hptiop_rescan_bus(struct hpt_iop_hba *hba); +static int hptiop_alloc_pci_res_itl(struct hpt_iop_hba *hba); +static int hptiop_alloc_pci_res_mv(struct hpt_iop_hba *hba); +static int hptiop_get_config_itl(struct hpt_iop_hba *hba, + struct hpt_iop_request_get_config *config); +static int hptiop_get_config_mv(struct hpt_iop_hba *hba, + struct hpt_iop_request_get_config *config); +static int hptiop_set_config_itl(struct hpt_iop_hba *hba, + struct hpt_iop_request_set_config *config); +static int hptiop_set_config_mv(struct hpt_iop_hba *hba, + struct hpt_iop_request_set_config *config); +static int hptiop_internal_memalloc_mv(struct hpt_iop_hba *hba); +static int hptiop_internal_memfree_mv(struct hpt_iop_hba *hba); +static int hptiop_post_ioctl_command_itl(struct hpt_iop_hba *hba, + u_int32_t req32, struct hpt_iop_ioctl_param *pParams); +static int hptiop_post_ioctl_command_mv(struct hpt_iop_hba *hba, + struct hpt_iop_request_ioctl_command *req, + struct hpt_iop_ioctl_param *pParams); +static void hptiop_post_req_itl(struct hpt_iop_hba *hba, + struct hpt_iop_srb *srb, + bus_dma_segment_t *segs, int nsegs); +static void hptiop_post_req_mv(struct hpt_iop_hba *hba, + struct hpt_iop_srb *srb, + bus_dma_segment_t *segs, int nsegs); +static void hptiop_post_msg_itl(struct hpt_iop_hba *hba, u_int32_t msg); +static void hptiop_post_msg_mv(struct hpt_iop_hba *hba, u_int32_t msg); +static void hptiop_enable_intr_itl(struct hpt_iop_hba *hba); +static void hptiop_enable_intr_mv(struct hpt_iop_hba *hba); +static void hptiop_disable_intr_itl(struct hpt_iop_hba *hba); +static void hptiop_disable_intr_mv(struct hpt_iop_hba *hba); +static void hptiop_free_srb(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb); +static int hptiop_os_query_remove_device(struct hpt_iop_hba *hba, int tid); static int hptiop_probe(device_t dev); static int hptiop_attach(device_t dev); static int hptiop_detach(device_t dev); static int hptiop_shutdown(device_t dev); static void hptiop_action(struct cam_sim *sim, union ccb *ccb); static void hptiop_poll(struct cam_sim *sim); -static void hptiop_async(void * callback_arg, u_int32_t code, - struct cam_path * path, void * arg); +static void hptiop_async(void *callback_arg, u_int32_t code, + struct cam_path *path, void *arg); static void hptiop_pci_intr(void *arg); -static void hptiop_release_resource(struct hpt_iop_hba * hba); -static int hptiop_reset_adapter(struct hpt_iop_hba * hba); -static void hptiop_enable_interrupts(struct hpt_iop_hba * hba); -static void hptiop_disable_interrupts(struct hpt_iop_hba * hba); +static void hptiop_release_resource(struct hpt_iop_hba *hba); +static int hptiop_reset_adapter(struct hpt_iop_hba *hba); static d_open_t hptiop_open; static d_close_t hptiop_close; @@ -147,13 +178,27 @@ #define hba_from_dev(dev) ((struct hpt_iop_hba *)(dev)->si_drv1) #else #define hba_from_dev(dev) \ - ((struct hpt_iop_hba *)devclass_get_softc(hptiop_devclass, minor(dev))) + ((struct hpt_iop_hba *)devclass_get_softc(hptiop_devclass, minor(dev))) #endif +#define BUS_SPACE_WRT4_ITL(offset, value) bus_space_write_4(hba->bar0t,\ + hba->bar0h, offsetof(struct hpt_iopmu_itl, offset), (value)) +#define BUS_SPACE_RD4_ITL(offset) bus_space_read_4(hba->bar0t,\ + hba->bar0h, offsetof(struct hpt_iopmu_itl, offset)) + +#define BUS_SPACE_WRT4_MV0(offset, value) bus_space_write_4(hba->bar0t,\ + hba->bar0h, offsetof(struct hpt_iopmv_regs, offset), value) +#define BUS_SPACE_RD4_MV0(offset) bus_space_read_4(hba->bar0t,\ + hba->bar0h, offsetof(struct hpt_iopmv_regs, offset)) +#define BUS_SPACE_WRT4_MV2(offset, value) bus_space_write_4(hba->bar2t,\ + hba->bar2h, offsetof(struct hpt_iopmu_mv, offset), value) +#define BUS_SPACE_RD4_MV2(offset) bus_space_read_4(hba->bar2t,\ + hba->bar2h, offsetof(struct hpt_iopmu_mv, offset)) + static int hptiop_open(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t proc) { - struct hpt_iop_hba * hba = hba_from_dev(dev); + struct hpt_iop_hba *hba = hba_from_dev(dev); if (hba==NULL) return ENXIO; @@ -166,7 +211,7 @@ static int hptiop_close(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t proc) { - struct hpt_iop_hba * hba = hba_from_dev(dev); + struct hpt_iop_hba *hba = hba_from_dev(dev); hba->flag &= ~(u_int32_t)HPT_IOCTL_FLAG_OPEN; return 0; } @@ -175,7 +220,7 @@ int flags, ioctl_thread_t proc) { int ret = EFAULT; - struct hpt_iop_hba * hba = hba_from_dev(dev); + struct hpt_iop_hba *hba = hba_from_dev(dev); #if (__FreeBSD_version >= 500000) mtx_lock(&Giant); @@ -183,7 +228,8 @@ switch (cmd) { case HPT_DO_IOCONTROL: - ret = hptiop_do_ioctl(hba, (struct hpt_iop_ioctl_param *)data); + ret = hba->ops->do_ioctl(hba, + (struct hpt_iop_ioctl_param *)data); break; case HPT_SCAN_BUS: ret = hptiop_rescan_bus(hba); @@ -197,103 +243,422 @@ return ret; } -static __inline void * iop_get_inbound_request(struct hpt_iopmu * iop) +static u_int64_t hptiop_mv_outbound_read(struct hpt_iop_hba *hba) { - u_int32_t m = readl(&iop->inbound_queue); - return (m == 0xFFFFFFFF)? 0 : ((char *)iop + m); + u_int64_t p; + u_int32_t outbound_tail = BUS_SPACE_RD4_MV2(outbound_tail); + u_int32_t outbound_head = BUS_SPACE_RD4_MV2(outbound_head); + + if (outbound_tail != outbound_head) { + bus_space_read_region_4(hba->bar2t, hba->bar2h, + offsetof(struct hpt_iopmu_mv, + outbound_q[outbound_tail]), + (u_int32_t *)&p, 2); + + outbound_tail++; + + if (outbound_tail == MVIOP_QUEUE_LEN) >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Feb 4 04:46:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7F3B816A419; Mon, 4 Feb 2008 04:46: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 2C94F16A41B for ; Mon, 4 Feb 2008 04:46:07 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 025E313C478 for ; Mon, 4 Feb 2008 04:46:07 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m144k54F007309 for ; Mon, 4 Feb 2008 04:46:05 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m144k5lN007306 for perforce@freebsd.org; Mon, 4 Feb 2008 04:46:05 GMT (envelope-from sephe@FreeBSD.org) Date: Mon, 4 Feb 2008 04:46:05 GMT Message-Id: <200802040446.m144k5lN007306@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 134761 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 04:46:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=134761 Change 134761 by sephe@sephe_enigma:sam_wifi on 2008/02/04 04:45:34 Forcing long slot time Affected files ... .. //depot/projects/wifi/sys/dev/ral/rt2560.c#30 edit Differences ... ==== //depot/projects/wifi/sys/dev/ral/rt2560.c#30 (text) ==== @@ -2483,6 +2483,7 @@ uint16_t tx_sifs, tx_pifs, tx_difs, eifs; uint32_t tmp; +#define FORCE_SLOTTIME #ifndef FORCE_SLOTTIME slottime = (ic->ic_flags & IEEE80211_F_SHSLOT) ? 9 : 20; #else From owner-p4-projects@FreeBSD.ORG Mon Feb 4 07:38:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C1ADE16A63B; Mon, 4 Feb 2008 07:38:04 +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 6247516A625 for ; Mon, 4 Feb 2008 07:38:04 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4D95213C4D9 for ; Mon, 4 Feb 2008 07:38:04 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m147c422033229 for ; Mon, 4 Feb 2008 07:38:04 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m147c44K033226 for perforce@freebsd.org; Mon, 4 Feb 2008 07:38:04 GMT (envelope-from sephe@FreeBSD.org) Date: Mon, 4 Feb 2008 07:38:04 GMT Message-Id: <200802040738.m147c44K033226@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 134764 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 07:38:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=134764 Change 134764 by sephe@sephe_zealot:sam_wifi on 2008/02/04 07:37:51 Utilize ieee80211_{ack,compute}_duration() Affected files ... .. //depot/projects/wifi/sys/dev/ral/rt2560.c#31 edit Differences ... ==== //depot/projects/wifi/sys/dev/ral/rt2560.c#31 (text) ==== @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -109,11 +110,9 @@ static void rt2560_beacon_expire(struct rt2560_softc *); static void rt2560_wakeup_expire(struct rt2560_softc *); static uint8_t rt2560_rxrate(struct rt2560_rx_desc *); -static int rt2560_ack_rate(struct ieee80211com *, int); static void rt2560_scan_start(struct ieee80211com *); static void rt2560_scan_end(struct ieee80211com *); static void rt2560_set_channel(struct ieee80211com *); -static uint16_t rt2560_txtime(int, int, uint32_t); static uint8_t rt2560_plcp_signal(int); static void rt2560_setup_tx_desc(struct rt2560_softc *, struct rt2560_tx_desc *, uint32_t, int, int, int, @@ -1401,14 +1400,7 @@ RAL_UNLOCK(sc); } -/* quickly determine if a given rate is CCK or OFDM */ -#define RAL_RATE_IS_OFDM(rate) ((rate) >= 12 && (rate) != 22) - -#define RAL_ACK_SIZE 14 /* 10 + 4(FCS) */ -#define RAL_CTS_SIZE 14 /* 10 + 4(FCS) */ - #define RAL_SIFS 10 /* us */ - #define RT2560_TXRX_TURNAROUND 10 /* us */ /* @@ -1442,66 +1434,6 @@ return 2; /* should not get there */ } -/* - * Return the expected ack rate for a frame transmitted at rate `rate'. - * XXX: this should depend on the destination node basic rate set. - */ -static int -rt2560_ack_rate(struct ieee80211com *ic, int rate) -{ - switch (rate) { - /* CCK rates */ - case 2: - return 2; - case 4: - case 11: - case 22: - return (ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate; - - /* OFDM rates */ - case 12: - case 18: - return 12; - case 24: - case 36: - return 24; - case 48: - case 72: - case 96: - case 108: - return 48; - } - - /* default to 1Mbps */ - return 2; -} - -/* - * Compute the duration (in us) needed to transmit `len' bytes at rate `rate'. - * The function automatically determines the operating mode depending on the - * given rate. `flags' indicates whether short preamble is in use or not. - */ -static uint16_t -rt2560_txtime(int len, int rate, uint32_t flags) -{ - uint16_t txtime; - - if (RAL_RATE_IS_OFDM(rate)) { - /* IEEE Std 802.11a-1999, pp. 37 */ - txtime = (8 + 4 * len + 3 + rate - 1) / rate; - txtime = 16 + 4 + 4 * txtime + 6; - } else { - /* IEEE Std 802.11b-1999, pp. 28 */ - txtime = (16 * len + rate - 1) / rate; - if (rate != 2 && (flags & IEEE80211_F_SHPREAMBLE)) - txtime += 72 + 24; - else - txtime += 144 + 48; - } - - return txtime; -} - static uint8_t rt2560_plcp_signal(int rate) { @@ -1549,7 +1481,7 @@ desc->plcp_service = 4; len += IEEE80211_CRC_LEN; - if (RAL_RATE_IS_OFDM(rate)) { + if (ieee80211_rate2phytype(ic->ic_curchan, rate) == IEEE80211_T_OFDM) { desc->flags |= htole32(RT2560_TX_OFDM); plcp_length = len & 0xfff; @@ -1687,8 +1619,8 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2560_TX_ACK; - dur = rt2560_txtime(RAL_ACK_SIZE, rate, ic->ic_flags) + - RAL_SIFS; + dur = ieee80211_ack_duration(ic->ic_curchan, rate, + ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); /* tell hardware to add timestamp for probe responses */ @@ -1868,15 +1800,17 @@ m0->m_pkthdr.len > ic->ic_rtsthreshold) { struct mbuf *m; uint16_t dur; - int rtsrate, ackrate; + int rtsrate; rtsrate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; - ackrate = rt2560_ack_rate(ic, rate); - dur = rt2560_txtime(m0->m_pkthdr.len + 4, rate, ic->ic_flags) + - rt2560_txtime(RAL_CTS_SIZE, rtsrate, ic->ic_flags) + - rt2560_txtime(RAL_ACK_SIZE, ackrate, ic->ic_flags) + - 3 * RAL_SIFS; + dur = ieee80211_ack_duration(ic->ic_curchan, + rtsrate, ic->ic_flags) + + ieee80211_compute_duration(ic->ic_curchan, + m0->m_pkthdr.len + IEEE80211_CRC_LEN, rate, + ic->ic_flags) + + ieee80211_ack_duration(ic->ic_curchan, + rate, ic->ic_flags); m = rt2560_get_rts(sc, wh, dur); @@ -1982,8 +1916,8 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2560_TX_ACK; - dur = rt2560_txtime(RAL_ACK_SIZE, rt2560_ack_rate(ic, rate), - ic->ic_flags) + RAL_SIFS; + dur = ieee80211_ack_duration(ic->ic_curchan, rate, + ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); } From owner-p4-projects@FreeBSD.ORG Mon Feb 4 08:43:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B7BE216A41B; Mon, 4 Feb 2008 08:43:55 +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 63DCD16A419 for ; Mon, 4 Feb 2008 08:43:55 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5BD13C448 for ; Mon, 4 Feb 2008 08:43:55 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m148htmj037995 for ; Mon, 4 Feb 2008 08:43:55 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m148htF0037992 for perforce@freebsd.org; Mon, 4 Feb 2008 08:43:55 GMT (envelope-from rrs@cisco.com) Date: Mon, 4 Feb 2008 08:43:55 GMT Message-Id: <200802040843.m148htF0037992@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 134769 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 08:43:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=134769 Change 134769 by rrs@rrs-mips2-jnpr on 2008/02/04 08:43:01 Ok, It still works but now uses the correct registers. Now, only question I have is if the MCR is used properly. What was being done before does not match any valid register need to figure out what its trying to do with the ioctl. There may be other strange things like this too. Need to go through the driver and look for other strange things. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs#9 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#11 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs#9 (text+ko) ==== @@ -33,7 +33,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -options ISA_MIPS32 +options ISA_MIPS64 options CPU_NOFPU options DDB @@ -79,6 +79,6 @@ # # Use the following for RFS in mem-device -options MD_ROOT +#options MD_ROOT # options ROOTDEVNAME = \"ufs:md0\" -options MD_ROOT_SIZE = 25200 +#options MD_ROOT_SIZE = 25200 ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#11 (text+ko) ==== ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#4 (text+ko) ==== @@ -69,16 +69,13 @@ #include #include -#include +#include /* Octeon specific includes with loads of in-lines */ #include #include /* Cavium specific defines pulled from there update of ns16559.h */ -#define IIR_BUSY 0x7 -#define com_usr 39 /* Octeon 16750/16550 Uart Status Reg */ -#define REG_USR com_usr #define USR_TXFIFO_NOTFULL 2 /* Uart TX FIFO Not full */ #include "uart_if.h" @@ -98,19 +95,19 @@ { uint8_t iir; - iir = uart_getreg(bas, REG_IIR); + iir = uart_getreg(bas, OCT_REG_IIR); while ((iir & IIR_NOPEND) == 0) { iir &= IIR_IMASK; if (iir == IIR_RLS) - (void)uart_getreg(bas, REG_LSR); + (void)uart_getreg(bas, OCT_REG_LSR); else if (iir == IIR_RXRDY || iir == IIR_RXTOUT) - (void)uart_getreg(bas, REG_DATA); + (void)uart_getreg(bas, OCT_REG_RBR); else if (iir == IIR_MLSC) - (void)uart_getreg(bas, REG_MSR); + (void)uart_getreg(bas, OCT_REG_MSR); else if (iir == IIR_BUSY) - (void)uart_getreg(bas, REG_USR); + (void)uart_getreg(bas, OCT_REG_USR); uart_barrier(bas); - iir = uart_getreg(bas, REG_IIR); + iir = uart_getreg(bas, OCT_REG_IIR); } } @@ -126,12 +123,12 @@ if (!delay_changed) return delay; delay_changed = 0; - lcr = uart_getreg(bas, REG_LCR); - uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); + lcr = uart_getreg(bas, OCT_REG_LCR); + uart_setreg(bas, OCT_REG_LCR, lcr | LCR_DLAB); uart_barrier(bas); - divisor = uart_getreg(bas, REG_DLL) | (uart_getreg(bas, REG_DLH) << 8); + divisor = uart_getreg(bas, OCT_REG_DLL) | (uart_getreg(bas, OCT_REG_DLH) << 8); uart_barrier(bas); - uart_setreg(bas, REG_LCR, lcr); + uart_setreg(bas, OCT_REG_LCR, lcr); uart_barrier(bas); if (!bas->rclk) @@ -182,7 +179,7 @@ * high enough to handle large FIFOs. */ limit = 10 * 10 * 10 * 1024; - while ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0 && --limit) + while ((uart_getreg(bas, OCT_REG_LSR) & LSR_TEMT) == 0 && --limit) DELAY(delay); if (limit == 0) { /* @@ -202,8 +199,8 @@ * UART is first activated. */ limit = 10 * 4096; - while ((uart_getreg(bas, REG_LSR) & LSR_RXRDY) && --limit) { - (void)uart_getreg(bas, REG_DATA); + while ((uart_getreg(bas, OCT_REG_LSR) & LSR_RXRDY) && --limit) { + (void)uart_getreg(bas, OCT_REG_RBR); uart_barrier(bas); DELAY(delay << 2); } @@ -229,7 +226,7 @@ fcr |= FCR_XMT_RST; if (what & UART_FLUSH_RECEIVER) fcr |= FCR_RCV_RST; - uart_setreg(bas, REG_FCR, fcr); + uart_setreg(bas, OCT_REG_FCR, fcr); uart_barrier(bas); } @@ -258,15 +255,15 @@ divisor = oct16550_divisor(bas->rclk, baudrate); if (divisor == 0) return (EINVAL); - uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); + uart_setreg(bas, OCT_REG_LCR, lcr | LCR_DLAB); uart_barrier(bas); - uart_setreg(bas, REG_DLL, divisor & 0xff); - uart_setreg(bas, REG_DLH, (divisor >> 8) & 0xff); + uart_setreg(bas, OCT_REG_DLL, divisor & 0xff); + uart_setreg(bas, OCT_REG_DLH, (divisor >> 8) & 0xff); uart_barrier(bas); delay_changed = 1; } /* Set LCR and clear DLAB. */ - uart_setreg(bas, REG_LCR, lcr); + uart_setreg(bas, OCT_REG_LCR, lcr); uart_barrier(bas); return (0); } @@ -296,13 +293,13 @@ u_char val; /* Check known 0 bits that don't depend on DLAB. */ - val = uart_getreg(bas, REG_IIR); + val = uart_getreg(bas, OCT_REG_IIR); if (val & 0x30) return (ENXIO); - val = uart_getreg(bas, REG_MCR); + val = uart_getreg(bas, OCT_REG_MCR); if (val & 0xc0) return (ENXIO); - val = uart_getreg(bas, REG_USR); + val = uart_getreg(bas, OCT_REG_USR); if (val & 0xe0) return (ENXIO); return (0); @@ -317,16 +314,16 @@ oct16550_param(bas, baudrate, databits, stopbits, parity); /* Disable all interrupt sources. */ - ier = uart_getreg(bas, REG_IER) & 0x0; - uart_setreg(bas, REG_IER, ier); + ier = uart_getreg(bas, OCT_REG_IER) & 0x0; + uart_setreg(bas, OCT_REG_IER, ier); uart_barrier(bas); /* Disable the FIFO (if present). */ - //uart_setreg(bas, REG_FCR, 0); + //uart_setreg(bas, OCT_REG_FCR, 0); uart_barrier(bas); /* Set RTS & DTR. */ - uart_setreg(bas, REG_MCR, MCR_RTS | MCR_DTR); + uart_setreg(bas, OCT_REG_MCR, MCR_RTS | MCR_DTR); uart_barrier(bas); oct16550_clrint(bas); @@ -337,17 +334,17 @@ { /* Clear RTS & DTR. */ - uart_setreg(bas, REG_MCR, 0); + uart_setreg(bas, OCT_REG_MCR, 0); uart_barrier(bas); } static inline void oct16550_wait_txhr_empty(struct uart_bas *bas, int limit, int delay) { - while (((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) && - ((uart_getreg(bas, REG_USR) & USR_TXFIFO_NOTFULL) == 0) && --limit) + while (((uart_getreg(bas, OCT_REG_LSR) & LSR_THRE) == 0) && + ((uart_getreg(bas, OCT_REG_USR) & USR_TX_FIFO_NOTFULL) == 0) && --limit) DELAY(delay); -} +} static void oct16550_putc(struct uart_bas *bas, int c) @@ -357,7 +354,7 @@ /* 1/10th the time to transmit 1 character (estimate). */ delay = oct16550_delay(bas); oct16550_wait_txhr_empty(bas, 100, delay); - uart_setreg(bas, REG_DATA, c); + uart_setreg(bas, OCT_REG_THR, c); uart_barrier(bas); oct16550_wait_txhr_empty(bas, 100, delay); } @@ -366,7 +363,7 @@ oct16550_rxready(struct uart_bas *bas) { - return ((uart_getreg(bas, REG_LSR) & LSR_RXRDY) != 0 ? 1 : 0); + return ((uart_getreg(bas, OCT_REG_LSR) & LSR_RXRDY) != 0 ? 1 : 0); } static int @@ -379,13 +376,13 @@ /* 1/10th the time to transmit 1 character (estimate). */ delay = oct16550_delay(bas); - while ((uart_getreg(bas, REG_LSR) & LSR_RXRDY) == 0) { + while ((uart_getreg(bas, OCT_REG_LSR) & LSR_RXRDY) == 0) { uart_unlock(hwmtx); DELAY(delay); uart_lock(hwmtx); } - c = uart_getreg(bas, REG_DATA); + c = uart_getreg(bas, OCT_REG_RBR); uart_unlock(hwmtx); @@ -456,9 +453,9 @@ bas = &sc->sc_bas; oct16550_drain(bas, UART_DRAIN_TRANSMITTER); - oct16550->mcr = uart_getreg(bas, REG_MCR); - oct16550->fcr = FCR_ENABLE | FCR_RX_HIGH; - uart_setreg(bas, REG_FCR, oct16550->fcr); + oct16550->mcr = uart_getreg(bas, OCT_REG_MCR); + oct16550->fcr = FCR_ENABLE | FCR_RX_MEDH; + uart_setreg(bas, OCT_REG_FCR, oct16550->fcr); uart_barrier(bas); oct16550_bus_flush(sc, UART_FLUSH_RECEIVER | UART_FLUSH_TRANSMITTER); @@ -469,9 +466,9 @@ oct16550_bus_getsig(sc); oct16550_clrint(bas); - oct16550->ier = uart_getreg(bas, REG_IER) & 0xf0; + oct16550->ier = uart_getreg(bas, OCT_REG_IER) & 0xf0; oct16550->ier |= IER_EMSC | IER_ERLS | IER_ERXRDY; - uart_setreg(bas, REG_IER, oct16550->ier); + uart_setreg(bas, OCT_REG_IER, oct16550->ier); uart_barrier(bas); /* @@ -489,8 +486,8 @@ u_char ier; bas = &sc->sc_bas; - ier = uart_getreg(bas, REG_IER) & 0xf0; - uart_setreg(bas, REG_IER, ier); + ier = uart_getreg(bas, OCT_REG_IER) & 0xf0; + uart_setreg(bas, OCT_REG_IER, ier); uart_barrier(bas); oct16550_clrint(bas); return (0); @@ -507,7 +504,7 @@ uart_lock(sc->sc_hwmtx); if (sc->sc_rxfifosz > 1) { oct16550_flush(bas, what); - uart_setreg(bas, REG_FCR, oct16550->fcr); + uart_setreg(bas, OCT_REG_FCR, oct16550->fcr); uart_barrier(bas); error = 0; } else @@ -526,7 +523,7 @@ old = sc->sc_hwsig; sig = old; uart_lock(sc->sc_hwmtx); - msr = uart_getreg(&sc->sc_bas, REG_MSR); + msr = uart_getreg(&sc->sc_bas, OCT_REG_MSR); uart_unlock(sc->sc_hwmtx); SIGCHG(msr & MSR_DSR, sig, SER_DSR, SER_DDSR); SIGCHG(msr & MSR_CTS, sig, SER_CTS, SER_DCTS); @@ -549,52 +546,57 @@ uart_lock(sc->sc_hwmtx); switch (request) { case UART_IOCTL_BREAK: - lcr = uart_getreg(bas, REG_LCR); + lcr = uart_getreg(bas, OCT_REG_LCR); if (data) - lcr |= LCR_SBREAK; + + lcr |= LCR_SBREAK; else lcr &= ~LCR_SBREAK; - uart_setreg(bas, REG_LCR, lcr); + uart_setreg(bas, OCT_REG_LCR, lcr); uart_barrier(bas); break; case UART_IOCTL_IFLOW: - lcr = uart_getreg(bas, REG_LCR); + lcr = uart_getreg(bas, OCT_REG_LCR); uart_barrier(bas); - uart_setreg(bas, REG_LCR, 0xbf); + /* What does EFR_ENABLE do?? RRS */ + uart_setreg(bas, OCT_REG_LCR, LCR_EFR_ENABLE); uart_barrier(bas); - efr = uart_getreg(bas, REG_EFR); + /* Don't know if this is correct ?? RRS */ + efr = uart_getreg(bas, OCT_REG_MCR); if (data) - efr |= EFR_RTS; + efr |= MCR_RTS; else - efr &= ~EFR_RTS; - uart_setreg(bas, REG_EFR, efr); + efr &= ~MCR_RTS; + uart_setreg(bas, OCT_REG_MCR, efr); uart_barrier(bas); - uart_setreg(bas, REG_LCR, lcr); + uart_setreg(bas, OCT_REG_LCR, lcr); uart_barrier(bas); break; case UART_IOCTL_OFLOW: - lcr = uart_getreg(bas, REG_LCR); + lcr = uart_getreg(bas, OCT_REG_LCR); uart_barrier(bas); - uart_setreg(bas, REG_LCR, 0xbf); + /* Don't know if this is correct ?? RRS */ + uart_setreg(bas, OCT_REG_LCR, LCR_EFR_ENABLE); uart_barrier(bas); - efr = uart_getreg(bas, REG_EFR); + /* Don't know if this is correct ?? RRS */ + efr = uart_getreg(bas, OCT_REG_MCR); if (data) - efr |= EFR_CTS; + efr |= MCR_DTR; else - efr &= ~EFR_CTS; - uart_setreg(bas, REG_EFR, efr); + efr &= ~MCR_DTR; + uart_setreg(bas, OCT_REG_MCR, efr); uart_barrier(bas); - uart_setreg(bas, REG_LCR, lcr); + uart_setreg(bas, OCT_REG_LCR, lcr); uart_barrier(bas); break; case UART_IOCTL_BAUD: - lcr = uart_getreg(bas, REG_LCR); - uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); + lcr = uart_getreg(bas, OCT_REG_LCR); + uart_setreg(bas, OCT_REG_LCR, lcr | LCR_DLAB); uart_barrier(bas); - divisor = uart_getreg(bas, REG_DLL) | - (uart_getreg(bas, REG_DLH) << 8); + divisor = uart_getreg(bas, OCT_REG_DLL) | + (uart_getreg(bas, OCT_REG_DLH) << 8); uart_barrier(bas); - uart_setreg(bas, REG_LCR, lcr); + uart_setreg(bas, OCT_REG_LCR, lcr); uart_barrier(bas); baudrate = (divisor > 0) ? bas->rclk / divisor / 16 : 0; delay_changed = 1; @@ -622,11 +624,11 @@ bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - iir = uart_getreg(bas, REG_IIR) & IIR_IMASK; + iir = uart_getreg(bas, OCT_REG_IIR) & IIR_IMASK; if (iir != IIR_NOPEND) { if (iir == IIR_RLS) { - lsr = uart_getreg(bas, REG_LSR); + lsr = uart_getreg(bas, OCT_REG_LSR); if (lsr & LSR_OE) ipend |= SER_INT_OVERRUN; if (lsr & LSR_BI) @@ -647,7 +649,7 @@ ipend |= SER_INT_SIGCHG; } else if (iir == IIR_BUSY) { - (void)uart_getreg(bas, REG_USR); + (void)uart_getreg(bas, OCT_REG_USR); } } uart_unlock(sc->sc_hwmtx); @@ -693,7 +695,7 @@ if (error) { return (error); } - uart_setreg(bas, REG_MCR, (MCR_DTR | MCR_RTS)); + uart_setreg(bas, OCT_REG_MCR, (MCR_DTR | MCR_RTS)); /* * Enable FIFOs. And check that the UART has them. If not, we're @@ -703,7 +705,7 @@ oct16550_drain(bas, UART_DRAIN_TRANSMITTER); #define ENABLE_OCTEON_FIFO 1 #ifdef ENABLE_OCTEON_FIFO - uart_setreg(bas, REG_FCR, FCR_ENABLE | FCR_XMT_RST | FCR_RCV_RST); + uart_setreg(bas, OCT_REG_FCR, FCR_ENABLE | FCR_XMT_RST | FCR_RCV_RST); #endif uart_barrier(bas); @@ -749,31 +751,31 @@ bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - lsr = uart_getreg(bas, REG_LSR); + lsr = uart_getreg(bas, OCT_REG_LSR); while (lsr & LSR_RXRDY) { if (uart_rx_full(sc)) { sc->sc_rxbuf[sc->sc_rxput] = UART_STAT_OVERRUN; break; } - xc = uart_getreg(bas, REG_DATA); + xc = uart_getreg(bas, OCT_REG_RBR); if (lsr & LSR_FE) xc |= UART_STAT_FRAMERR; if (lsr & LSR_PE) xc |= UART_STAT_PARERR; uart_rx_put(sc, xc); - lsr = uart_getreg(bas, REG_LSR); + lsr = uart_getreg(bas, OCT_REG_LSR); } /* Discard everything left in the Rx FIFO. */ /* * First do a read/discard anyway, in case the UART was lying to us. * This was seen, when IIR said RBR, but LSR said no RXRDY */ - (void)uart_getreg(bas, REG_DATA); + (void)uart_getreg(bas, OCT_REG_RBR); while (lsr & LSR_RXRDY) { - (void)uart_getreg(bas, REG_DATA); + (void)uart_getreg(bas, OCT_REG_RBR); uart_barrier(bas); - lsr = uart_getreg(bas, REG_LSR); + lsr = uart_getreg(bas, OCT_REG_LSR); } uart_unlock(sc->sc_hwmtx); return (0); @@ -805,7 +807,7 @@ oct16550->mcr |= MCR_DTR; if (new & SER_RTS) oct16550->mcr |= MCR_RTS; - uart_setreg(bas, REG_MCR, oct16550->mcr); + uart_setreg(bas, OCT_REG_MCR, oct16550->mcr); uart_barrier(bas); uart_unlock(sc->sc_hwmtx); return (0); @@ -827,11 +829,11 @@ #else oct16550_wait_txhr_empty(bas, 100, oct16550_delay(bas)); - uart_setreg(bas, REG_IER, oct16550->ier | IER_ETXRDY); + uart_setreg(bas, OCT_REG_IER, oct16550->ier | IER_ETXRDY); uart_barrier(bas); for (i = 0; i < sc->sc_txdatasz; i++) { - uart_setreg(bas, REG_DATA, sc->sc_txbuf[i]); + uart_setreg(bas, OCT_REG_THR, sc->sc_txbuf[i]); uart_barrier(bas); } sc->sc_txbusy = 1; From owner-p4-projects@FreeBSD.ORG Mon Feb 4 09:45:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D828B16A41B; Mon, 4 Feb 2008 09:45:00 +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 826FF16A418 for ; Mon, 4 Feb 2008 09:45:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5FC13C4D3 for ; Mon, 4 Feb 2008 09:45:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m149j0kG051684 for ; Mon, 4 Feb 2008 09:45:00 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m149j03m051681 for perforce@freebsd.org; Mon, 4 Feb 2008 09:45:00 GMT (envelope-from jb@freebsd.org) Date: Mon, 4 Feb 2008 09:45:00 GMT Message-Id: <200802040945.m149j03m051681@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134771 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 09:45:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=134771 Change 134771 by jb@jb_freebsd1 on 2008/02/04 09:44:33 Fix an endian test. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cg.c#10 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cg.c#10 (text) ==== @@ -369,7 +369,7 @@ * input register to width cte_bits, and cmask as the mask used to * pass through the containing bits and zero the field bits. */ -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN shift = clp2(P2ROUNDUP(e.cte_bits, NBBY) / NBBY) * NBBY - (m.ctm_offset % NBBY + e.cte_bits); #else From owner-p4-projects@FreeBSD.ORG Mon Feb 4 12:10:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AABB816A478; Mon, 4 Feb 2008 12:10:31 +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 7066616A46E for ; Mon, 4 Feb 2008 12:10:31 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5B30313C4F6 for ; Mon, 4 Feb 2008 12:10:31 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14CAVM6062486 for ; Mon, 4 Feb 2008 12:10:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14CAV7q062483 for perforce@freebsd.org; Mon, 4 Feb 2008 12:10:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 4 Feb 2008 12:10:31 GMT Message-Id: <200802041210.m14CAV7q062483@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134773 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 12:10:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=134773 Change 134773 by rwatson@rwatson_sesame on 2008/02/04 12:10:18 Submit chicken scratchings I found on an old notebook. Nothing to see, move along. Affected files ... .. //depot/projects/trustedbsd/acl_nfsv4/src/sys/sys/acl.h#6 edit Differences ... ==== //depot/projects/trustedbsd/acl_nfsv4/src/sys/sys/acl.h#6 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2001, 2005 Robert N. M. Watson + * Copyright (c) 1999-2001, 2005-2006 Robert N. M. Watson * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. @@ -57,13 +57,23 @@ }; typedef struct acl_entry *acl_entry_t; -/* internal ACL structure */ -struct acl { +/* + * In the first FreeBSD POSIX.1e implementation, there was a fixed maximum + * number of ACEs in the ACL array, ACL_MAX_ENTRIES. In the new version, a + * variable sizes storage array is supported. An old version of the + * structure is provided for compatibility purposes. + */ +struct acl_old { int acl_cnt; struct acl_entry acl_entry[ACL_MAX_ENTRIES]; }; -/* external ACL structure */ +struct acl { + int acl_len; /* Space for ACEs in array. */ + int acl_cnt; /* In use ACEs in array. */ + struct acl_entry *acl_entries; /* ACE array. */ +}; + struct acl_t_struct { struct acl ats_acl; int ats_cur_entry; @@ -75,6 +85,7 @@ */ #define ACL_TYPE_ACCESS 0x00000000 #define ACL_TYPE_DEFAULT 0x00000001 +#define ACL_TYPE_NFSV4 0x00000002 /* * Possible entry_id values for acl_get_entry() From owner-p4-projects@FreeBSD.ORG Mon Feb 4 13:18:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9CFE516A478; Mon, 4 Feb 2008 13:18:48 +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 620C316A475 for ; Mon, 4 Feb 2008 13:18:48 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4811313C4F4 for ; Mon, 4 Feb 2008 13:18:48 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14DImwu079744 for ; Mon, 4 Feb 2008 13:18:48 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14DIlJU079741 for perforce@freebsd.org; Mon, 4 Feb 2008 13:18:47 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 4 Feb 2008 13:18:47 GMT Message-Id: <200802041318.m14DIlJU079741@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134778 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 13:18:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=134778 Change 134778 by rwatson@rwatson_freebsd_capabilities on 2008/02/04 13:17:51 Remove fchdir(2) from set if system calls allowed in capability mode. Regenreate. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/capabilities.conf#6 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/init_sysent.c#12 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/syscalls.c#12 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/systrace_args.c#12 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/syscall.h#12 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/syscall.mk#12 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/sysproto.h#12 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/capabilities.conf#6 (text+ko) ==== @@ -5,7 +5,7 @@ # - sys_exit() and close() are very important. # - Sorted alphabeetically, please keep it that way. # -# $P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/capabilities.conf#5 $ +# $P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/capabilities.conf#6 $ # __acl_aclcheck_fd __acl_delete_fd @@ -56,11 +56,6 @@ extattr_get_fd extattr_list_fd extattr_set_fd -# -# Possibly fchdir() should be excluded on the basis that this implies access -# to the global namespace, and isn't really useful without it. -# -fchdir fchflags fchmod fchown ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/init_sysent.c#12 (text+ko) ==== @@ -42,7 +42,7 @@ { AS(unlink_args), (sy_call_t *)unlink, AUE_UNLINK, NULL, 0, 0, 0 }, /* 10 = unlink */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 11 = obsolete execv */ { AS(chdir_args), (sy_call_t *)chdir, AUE_CHDIR, NULL, 0, 0, 0 }, /* 12 = chdir */ - { AS(fchdir_args), (sy_call_t *)fchdir, AUE_FCHDIR, NULL, 0, 0, SYF_CAPENABLED }, /* 13 = fchdir */ + { AS(fchdir_args), (sy_call_t *)fchdir, AUE_FCHDIR, NULL, 0, 0, 0 }, /* 13 = fchdir */ { AS(mknod_args), (sy_call_t *)mknod, AUE_MKNOD, NULL, 0, 0, 0 }, /* 14 = mknod */ { AS(chmod_args), (sy_call_t *)chmod, AUE_CHMOD, NULL, 0, 0, 0 }, /* 15 = chmod */ { AS(chown_args), (sy_call_t *)chown, AUE_CHOWN, NULL, 0, 0, 0 }, /* 16 = chown */ ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/syscalls.c#12 (text+ko) ==== ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/systrace_args.c#12 (text+ko) ==== ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/syscall.h#12 (text+ko) ==== ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/syscall.mk#12 (text+ko) ==== ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/sysproto.h#12 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Mon Feb 4 14:12:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4F55816A41A; Mon, 4 Feb 2008 14:12:45 +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 F105D16A417 for ; Mon, 4 Feb 2008 14:12:44 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DDBED13C4E3 for ; Mon, 4 Feb 2008 14:12:44 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14ECimb084585 for ; Mon, 4 Feb 2008 14:12:44 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14ECila084582 for perforce@freebsd.org; Mon, 4 Feb 2008 14:12:44 GMT (envelope-from gonzo@FreeBSD.org) Date: Mon, 4 Feb 2008 14:12:44 GMT Message-Id: <200802041412.m14ECila084582@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 134779 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 14:12:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=134779 Change 134779 by gonzo@gonzo_jeeves on 2008/02/04 14:12:06 o Fix MCHECK exception caused by tlbwi instruction in octeon emulation. The solution is to use bogus EntryHi value based on TLB entry index instead of fixed value. Tested by: cognet Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tlb.S#6 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tlb.S#6 (text+ko) ==== @@ -81,12 +81,14 @@ #define _MFC0 dmfc0 #define _MTC0 dmtc0 #define WIRED_SHIFT 34 +#define PAGE_SHIFT 34 #else #define _SLL sll #define _SRL srl #define _MFC0 mfc0 #define _MTC0 mtc0 #define WIRED_SHIFT 2 +#define PAGE_SHIFT 2 #endif .set noreorder # Noreorder is default style! #if defined(ISA_MIPS32) @@ -287,9 +289,15 @@ tlbp # Probe for the entry. MIPS_CPU_NOP_DELAY mfc0 v0, COP_0_TLB_INDEX # See what we got - li t1, MIPS_KSEG0_START # Load invalid entry. + li t1, MIPS_KSEG0_START + 0x0fff0000 bltz v0, 1f # index < 0 => !found nop + # Load invalid entry, each TLB entry should have it's own bogus + # address calculated by following expression: + # MIPS_KSEG0_START + 0x0fff0000 + 2 * i * PAGE_SIZE; + # One bogus value for every TLB entry might cause MCHECK exception + sll v0, PAGE_SHIFT + 1 + addu t1, v0 _MTC0 t1, COP_0_TLB_HI # Mark entry high as invalid _MTC0 zero, COP_0_TLB_LO0 # Zero out low entry. From owner-p4-projects@FreeBSD.ORG Mon Feb 4 14:35:09 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C014A16A41B; Mon, 4 Feb 2008 14:35: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 6BC4E16A418 for ; Mon, 4 Feb 2008 14:35:08 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5564F13C4D3 for ; Mon, 4 Feb 2008 14:35:08 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14EZ8tR086321 for ; Mon, 4 Feb 2008 14:35:08 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14EZ7Zs086318 for perforce@freebsd.org; Mon, 4 Feb 2008 14:35:08 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 4 Feb 2008 14:35:08 GMT Message-Id: <200802041435.m14EZ7Zs086318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134780 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 14:35:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=134780 Change 134780 by rwatson@rwatson_freebsd_capabilities on 2008/02/04 14:34:36 Remove CAP_FCHDIR, fchdir() no longer permitted in capability mode so notrequired. Remove CAP_GETDIRENTRIES and just use CAP_READ, since CAP_READ allows reading directory contents anyway. Teach vfs_acl.c and vfs_extattr.c to use getvnode_cap(), which requires making it non-static. Use ACL and EXTATTR capabilities. Define cap_rights_t in types.h (and _types.h) and nested include that from capability.h. As a result, explicit includes of capability.h are now required in any .c file that uses a CAP_ constant, so update. We no longer leak the include of capability.h all over the place though. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/dev/aac/aac_linux.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/dev/amr/amr_linux.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/dev/hwpmc/hwpmc_logging.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/dev/iscsi/initiator/iscsi.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/dev/tdfx/tdfx_linux.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/fs/fdescfs/fdesc_vnops.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/i386/ibcs2/ibcs2_fcntl.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/i386/ibcs2/ibcs2_ioctl.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_event.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_exec.c#8 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_generic.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_acl.c#2 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_aio.c#4 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_extattr.c#2 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_syscalls.c#5 edit .. //depot/projects/trustedbsd/capabilities/src/sys/nfsserver/nfs_syscalls.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/_types.h#2 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/capability.h#10 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/file.h#4 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/filedesc.h#2 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/types.h#2 edit .. //depot/projects/trustedbsd/capabilities/src/sys/vm/vm_mmap.c#3 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/dev/aac/aac_linux.c#3 (text+ko) ==== @@ -33,6 +33,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/dev/amr/amr_linux.c#3 (text+ko) ==== @@ -30,6 +30,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/dev/hwpmc/hwpmc_logging.c#3 (text+ko) ==== @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_logging.c,v 1.9 2007/12/07 08:20:15 jkoshy Exp $"); #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/dev/iscsi/initiator/iscsi.c#3 (text+ko) ==== @@ -35,6 +35,7 @@ #include "opt_iscsi_initiator.h" #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/dev/tdfx/tdfx_linux.c#3 (text) ==== @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD: src/sys/dev/tdfx/tdfx_linux.c,v 1.1 2006/03/03 21:37:36 yar Exp $"); #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/fs/fdescfs/fdesc_vnops.c#3 (text+ko) ==== @@ -40,6 +40,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/i386/ibcs2/ibcs2_fcntl.c#3 (text+ko) ==== @@ -32,6 +32,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/i386/ibcs2/ibcs2_ioctl.c#3 (text+ko) ==== @@ -31,6 +31,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_event.c#3 (text+ko) ==== @@ -32,6 +32,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_exec.c#8 (text+ko) ==== @@ -34,6 +34,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_generic.c#3 (text+ko) ==== @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_acl.c#2 (text+ko) ==== @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -272,7 +273,8 @@ struct file *fp; int vfslocked, error; - error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); + error = getvnode_cap(td->td_proc->p_fd, uap->filedes, CAP_ACL_GET, + &fp); if (error == 0) { vfslocked = VFS_LOCK_GIANT(fp->f_vnode->v_mount); error = vacl_get_acl(td, fp->f_vnode, uap->type, uap->aclp); @@ -291,7 +293,8 @@ struct file *fp; int vfslocked, error; - error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); + error = getvnode_cap(td->td_proc->p_fd, uap->filedes, CAP_ACL_SET, + &fp); if (error == 0) { vfslocked = VFS_LOCK_GIANT(fp->f_vnode->v_mount); error = vacl_set_acl(td, fp->f_vnode, uap->type, uap->aclp); @@ -350,7 +353,8 @@ struct file *fp; int vfslocked, error; - error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); + error = getvnode_cap(td->td_proc->p_fd, uap->filedes, CAP_ACL_DELETE, + &fp); if (error == 0) { vfslocked = VFS_LOCK_GIANT(fp->f_vnode->v_mount); error = vacl_delete(td, fp->f_vnode, uap->type); @@ -409,7 +413,8 @@ struct file *fp; int vfslocked, error; - error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); + error = getvnode_cap(td->td_proc->p_fd, uap->filedes, CAP_ACL_CHECK, + &fp); if (error == 0) { vfslocked = VFS_LOCK_GIANT(fp->f_vnode->v_mount); error = vacl_aclcheck(td, fp->f_vnode, uap->type, uap->aclp); ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_aio.c#4 (text+ko) ==== @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_extattr.c#2 (text+ko) ==== @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -219,7 +220,8 @@ return (error); AUDIT_ARG(text, attrname); - error = getvnode(td->td_proc->p_fd, uap->fd, &fp); + error = getvnode_cap(td->td_proc->p_fd, uap->fd, CAP_EXTATTR_SET, + &fp); if (error) return (error); @@ -400,7 +402,8 @@ return (error); AUDIT_ARG(text, attrname); - error = getvnode(td->td_proc->p_fd, uap->fd, &fp); + error = getvnode_cap(td->td_proc->p_fd, uap->fd, CAP_EXTATTR_GET, + &fp); if (error) return (error); @@ -551,7 +554,8 @@ return (error); AUDIT_ARG(text, attrname); - error = getvnode(td->td_proc->p_fd, uap->fd, &fp); + error = getvnode_cap(td->td_proc->p_fd, uap->fd, CAP_EXTATTR_DELETE, + &fp); if (error) return (error); @@ -711,7 +715,8 @@ AUDIT_ARG(fd, uap->fd); AUDIT_ARG(value, uap->attrnamespace); - error = getvnode(td->td_proc->p_fd, uap->fd, &fp); + error = getvnode_cap(td->td_proc->p_fd, uap->fd, CAP_EXTATTR_LIST, + &fp); if (error) return (error); ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_syscalls.c#5 (text+ko) ==== @@ -142,7 +142,7 @@ * it is a capability, the right rights are present. A reference on the file * entry is held upon returning. */ -static int +int getvnode_cap(struct filedesc *fdp, int fd, cap_rights_t rights, struct file **fpp) { @@ -811,7 +811,7 @@ int error; AUDIT_ARG(fd, uap->fd); - if ((error = getvnode_cap(fdp, uap->fd, CAP_FCHDIR, &fp)) != 0) + if ((error = getvnode(fdp, uap->fd, &fp)) != 0) return (error); vp = fp->f_vnode; VREF(vp); @@ -3618,8 +3618,8 @@ /* XXX arbitrary sanity limit on `count'. */ if (uap->count > 64 * 1024) return (EINVAL); - if ((error = getvnode_cap(td->td_proc->p_fd, uap->fd, - CAP_GETDIRENTRIES, &fp)) != 0) + if ((error = getvnode_cap(td->td_proc->p_fd, uap->fd, CAP_GETREAD, + &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { fdrop(fp, td); @@ -3761,8 +3761,8 @@ int error, eofflag; AUDIT_ARG(fd, uap->fd); - if ((error = getvnode_cap(td->td_proc->p_fd, uap->fd, - CAP_GETDIRENTRIES, &fp)) != 0) + if ((error = getvnode_cap(td->td_proc->p_fd, uap->fd, CAP_READ, + &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { fdrop(fp, td); ==== //depot/projects/trustedbsd/capabilities/src/sys/nfsserver/nfs_syscalls.c#3 (text+ko) ==== @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/_types.h#2 (text+ko) ==== @@ -38,6 +38,7 @@ typedef __uint32_t __blksize_t; /* file block size */ typedef __int64_t __blkcnt_t; /* file block count */ typedef __int32_t __clockid_t; /* clock_gettime()... */ +typedef __uint64_t __cap_rights_t; /* capability rights */ typedef __uint32_t __fflags_t; /* file flags */ typedef __uint64_t __fsblkcnt_t; typedef __uint64_t __fsfilcnt_t; ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/capability.h#10 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/sys/sys/capability.h#9 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/sys/sys/capability.h#10 $ */ /* @@ -32,19 +32,13 @@ #ifndef _SYS_CAPABILITY_H_ #define _SYS_CAPABILITY_H_ -/* - * cap_rights_t defines a mask of rights on a capability. In the future, - * perhaps this should be a type supporting more than 64 rights on a - * capability. - */ -typedef u_int64_t cap_rights_t; +#include /* * Possibly rights on capabilities. */ #define CAP_READ 0x0000000000000001ULL /* read/recv */ #define CAP_WRITE 0x0000000000000002ULL /* write/send */ -#define CAP_FCHDIR 0x0000000000000004ULL /* fchdir */ #define CAP_SEEK 0x0000000000000008ULL /* lseek, various io */ #define CAP_GETPEERNAME 0x0000000000000010ULL /* getpeername */ #define CAP_GETSOCKNAME 0x0000000000000020ULL /* getsockname */ @@ -59,7 +53,6 @@ #define CAP_FCHMOD 0x0000000000004000ULL /* fchmod */ #define CAP_FTRUNCATE 0x0000000000008000ULL /* ftruncate */ #define CAP_FLOCK 0x0000000000010000ULL /* flock */ -#define CAP_GETDIRENTRIES 0x0000000000020000ULL /* getdirentries */ #define CAP_FSTATFS 0x0000000000040000ULL /* fstatfs */ #define CAP_REVOKE 0x0000000000080000ULL /* revoke */ #define CAP_FEXECVE 0x0000000000100000ULL /* fexecve */ @@ -84,7 +77,7 @@ #define CAP_LISTEN 0x0000008000000000ULL /* listen */ #define CAP_SHUTDOWN 0x0000010000000000ULL /* shutdown */ #define CAP_PEELOFF 0x0000020000000000ULL /* sctp_peeloff */ -#define CAP_MASK_VALID 0x000003ffffffffffULL +#define CAP_MASK_VALID 0x000003fffffdfffbULL /* * Notes: ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/file.h#4 (text+ko) ==== @@ -38,7 +38,6 @@ #include #include #else -#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/filedesc.h#2 (text+ko) ==== @@ -126,6 +126,8 @@ filedesc_to_leader_alloc(struct filedesc_to_leader *old, struct filedesc *fdp, struct proc *leader); int getvnode(struct filedesc *fdp, int fd, struct file **fpp); +int getvnode_cap(struct filedesc *fdp, int fd, cap_rights_t rights, + struct file **fpp); void mountcheckdirs(struct vnode *olddp, struct vnode *newdp); void setugidsafety(struct thread *td); ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/types.h#2 (text+ko) ==== @@ -129,6 +129,8 @@ #define _BLKCNT_T_DECLARED #endif +typedef __cap_rights_t cap_rights_t; + #ifndef _CLOCK_T_DECLARED typedef __clock_t clock_t; #define _CLOCK_T_DECLARED ==== //depot/projects/trustedbsd/capabilities/src/sys/vm/vm_mmap.c#3 (text+ko) ==== @@ -49,6 +49,7 @@ #include #include +#include #include #include #include From owner-p4-projects@FreeBSD.ORG Mon Feb 4 14:58:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7586416A46C; Mon, 4 Feb 2008 14:58:33 +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 0A1B716A469 for ; Mon, 4 Feb 2008 14:58:33 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D12EA13C515 for ; Mon, 4 Feb 2008 14:58:32 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14EwWFQ087379 for ; Mon, 4 Feb 2008 14:58:32 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14EwWfk087376 for perforce@freebsd.org; Mon, 4 Feb 2008 14:58:32 GMT (envelope-from cognet@freebsd.org) Date: Mon, 4 Feb 2008 14:58:32 GMT Message-Id: <200802041458.m14EwWfk087376@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 134781 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 14:58:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=134781 Change 134781 by cognet@cognet-mips on 2008/02/04 14:57:55 Define IIR_BUSY. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/oct16550.h#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/oct16550.h#2 (text+ko) ==== @@ -48,6 +48,7 @@ #define OCT_REG_IIR 0x02 #define IIR_IMASK 0x0f #define IIR_RXTOUT 0x0c +#define IIR_BUSY 0x07 #define IIR_RLS 0x06 #define IIR_RXRDY 0x04 #define IIR_TXRDY 0x02 From owner-p4-projects@FreeBSD.ORG Mon Feb 4 14:59:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5F27916A46B; Mon, 4 Feb 2008 14:59:34 +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 0CA5816A420 for ; Mon, 4 Feb 2008 14:59:34 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EDBF413C455 for ; Mon, 4 Feb 2008 14:59:33 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14ExXbm087420 for ; Mon, 4 Feb 2008 14:59:33 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14ExXDw087417 for perforce@freebsd.org; Mon, 4 Feb 2008 14:59:33 GMT (envelope-from cognet@freebsd.org) Date: Mon, 4 Feb 2008 14:59:33 GMT Message-Id: <200802041459.m14ExXDw087417@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 134782 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 14:59:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=134782 Change 134782 by cognet@cognet-mips on 2008/02/04 14:58:39 Apply the same hack gonzo did in tlb.S to swtch.S, and revert back to td_kstack in KSEG2 (gonzo is my hero). Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#12 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#17 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#12 (text+ko) ==== @@ -81,12 +81,14 @@ #define _MFC0 dmfc0 #define _MTC0 dmtc0 #define WIRED_SHIFT 34 +#define PAGE_SHIFT 34 #else #define _SLL sll #define _SRL srl #define _MFC0 mfc0 #define _MTC0 mtc0 #define WIRED_SHIFT 2 +#define PAGE_SHIFT 2 #endif .set noreorder # Noreorder is default style! #if defined(ISA_MIPS32) @@ -356,8 +358,10 @@ nop pgm: bltz s0, entry0set - li s0, MIPS_KSEG0_START # invalidate tlb entry - mtc0 s0, COP_0_TLB_HI + li t1, MIPS_KSEG0_START + 0x0fff0000 # invalidate tlb entry + sll s0, PAGE_SHIFT + 1 + addu t1, s0 + mtc0 t1, COP_0_TLB_HI mtc0 zero, COP_0_TLB_LO0 mtc0 zero, COP_0_TLB_LO1 HAZARD_DELAY ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#17 (text+ko) ==== @@ -107,23 +107,17 @@ { register struct proc *p1; struct pcb *pcb2; -#if 0 pt_entry_t *pte; int i; -#endif p1 = td1->td_proc; if ((flags & RFPROC) == 0) return; -#if 0 if(td2->td_kstack & (1 << PAGE_SHIFT)) td2->td_md.md_realstack = td2->td_kstack + PAGE_SIZE; else td2->td_md.md_realstack = td2->td_kstack; -#endif - td2->td_md.md_realstack = - MIPS_PHYS_TO_KSEG0(MIPS_CACHED_TO_PHYS((vm_offset_t)td2->td_kstack)); /* Point the pcb to the top of the stack */ pcb2 = (struct pcb *)(td2->td_md.md_realstack + (td2->td_kstack_pages - 1) * PAGE_SIZE) - 1; @@ -149,7 +143,6 @@ td2->td_frame->v1 = 1; td2->td_frame->a3 = 0; -#if 0 if (!(pte = pmap_segmap(kernel_pmap, td2->td_md.md_realstack))) panic("cpu_fork: invalid segmap"); pte += ((vm_offset_t)td2->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); @@ -158,7 +151,6 @@ td2->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); pte++; } -#endif if (td1 == PCPU_GET(fpcurthread)) MipsSaveCurFPState(td1); @@ -229,7 +221,6 @@ void cpu_thread_swapin(struct thread *td) { -#if 0 pt_entry_t *pte; int i; @@ -247,7 +238,6 @@ td->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); pte++; } -#endif } void @@ -258,7 +248,6 @@ void cpu_thread_alloc(struct thread *td) { -#if 0 pt_entry_t *pte; int i; @@ -266,15 +255,11 @@ td->td_md.md_realstack = td->td_kstack + PAGE_SIZE; else td->td_md.md_realstack = td->td_kstack; -#endif - td->td_md.md_realstack = - MIPS_PHYS_TO_KSEG0(MIPS_CACHED_TO_PHYS((vm_offset_t)td->td_kstack)); td->td_pcb = (struct pcb *)(td->td_md.md_realstack + (td->td_kstack_pages - 1) * PAGE_SIZE) - 1; td->td_frame = &td->td_pcb->pcb_regs; -#if 0 if (!(pte = pmap_segmap(kernel_pmap, td->td_md.md_realstack))) panic("cpu_thread_alloc: invalid segmap"); pte += ((vm_offset_t)td->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); @@ -283,7 +268,6 @@ td->td_md.md_upte[i] = *pte & ~(PG_RO|PG_WIRED); pte++; } -#endif } /* From owner-p4-projects@FreeBSD.ORG Mon Feb 4 16:30:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB6DF16A46D; Mon, 4 Feb 2008 16:30:12 +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 8082F16A421 for ; Mon, 4 Feb 2008 16:30:12 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6CAC413C4D1 for ; Mon, 4 Feb 2008 16:30:12 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14GUCMI096352 for ; Mon, 4 Feb 2008 16:30:12 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14GUCjI096349 for perforce@freebsd.org; Mon, 4 Feb 2008 16:30:12 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 4 Feb 2008 16:30:12 GMT Message-Id: <200802041630.m14GUCjI096349@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134786 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 16:30:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=134786 Change 134786 by rwatson@rwatson_freebsd_capabilities on 2008/02/04 16:30:04 More include updates and one CAP_FCHDIR gone update. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/compat/linux/linux_file.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/compat/linux/linux_ioctl.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/dev/mfi/mfi_linux.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/dev/snp/snp.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/fs/portalfs/portal_vfsops.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/gnu/fs/xfs/xfs_dfrag.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/i386/linux/linux_machdep.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/uipc_mqueue.c#3 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/compat/linux/linux_file.c#3 (text+ko) ==== @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -214,9 +215,10 @@ } else { /* * XXXRW: Not ideal, possibly fixed with native freebsd _at - * support? + * support? Do we even allow _at() variations in capability + * mode? */ - error = fget(td, dirfd, CAP_FCHDIR, &fp); + error = fget(td, dirfd, 0, &fp); if (error) return (error); dvp = fp->f_vnode; ==== //depot/projects/trustedbsd/capabilities/src/sys/compat/linux/linux_ioctl.c#3 (text+ko) ==== @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#3 (text+ko) ==== @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/dev/mfi/mfi_linux.c#3 (text) ==== @@ -29,6 +29,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/dev/snp/snp.c#3 (text+ko) ==== @@ -19,6 +19,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/fs/portalfs/portal_vfsops.c#3 (text+ko) ==== @@ -40,6 +40,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/gnu/fs/xfs/xfs_dfrag.c#3 (text+ko) ==== @@ -46,6 +46,7 @@ #include "xfs_mac.h" #include "xfs_rw.h" +#include #include /* ==== //depot/projects/trustedbsd/capabilities/src/sys/i386/linux/linux_machdep.c#3 (text+ko) ==== @@ -31,6 +31,7 @@ #include #include +#include #include #include #include ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/uipc_mqueue.c#3 (text+ko) ==== @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include From owner-p4-projects@FreeBSD.ORG Mon Feb 4 16:30:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3339616A538; Mon, 4 Feb 2008 16:30:13 +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 BB15D16A46C for ; Mon, 4 Feb 2008 16:30:12 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 90D6B13C4D3 for ; Mon, 4 Feb 2008 16:30:12 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14GUCUK096358 for ; Mon, 4 Feb 2008 16:30:12 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14GUCUW096355 for perforce@freebsd.org; Mon, 4 Feb 2008 16:30:12 GMT (envelope-from cognet@freebsd.org) Date: Mon, 4 Feb 2008 16:30:12 GMT Message-Id: <200802041630.m14GUCUW096355@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 134787 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 16:30:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=134787 Change 134787 by cognet@cognet-mips on 2008/02/04 16:30:05 Switch back to MIPS_ISA32. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs#10 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs#10 (text+ko) ==== @@ -33,7 +33,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -options ISA_MIPS64 +options ISA_MIPS32 options CPU_NOFPU options DDB From owner-p4-projects@FreeBSD.ORG Mon Feb 4 16:56:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E412416A46B; Mon, 4 Feb 2008 16:56:47 +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 A985D16A41B for ; Mon, 4 Feb 2008 16:56:47 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9589513C4E1 for ; Mon, 4 Feb 2008 16:56:47 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14Gug5a006577 for ; Mon, 4 Feb 2008 16:56:42 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14Gugt9006564 for perforce@freebsd.org; Mon, 4 Feb 2008 16:56:42 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 4 Feb 2008 16:56:42 GMT Message-Id: <200802041656.m14Gugt9006564@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134789 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 16:56:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=134789 Change 134789 by rwatson@rwatson_freebsd_capabilities on 2008/02/04 16:56:11 Add basic man pages for cap_enter(2), cap_getmode(2), cap_getrights(2), and cap_new(2). More to be done here. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libc/sys/Makefile.inc#2 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libc/sys/cap_enter.2#1 add .. //depot/projects/trustedbsd/capabilities/src/lib/libc/sys/cap_new.2#1 add Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libc/sys/Makefile.inc#2 (text+ko) ==== @@ -61,7 +61,7 @@ MAN+= _exit.2 abort2.2 accept.2 access.2 acct.2 adjtime.2 \ aio_cancel.2 aio_error.2 aio_read.2 aio_return.2 \ aio_suspend.2 aio_waitcomplete.2 aio_write.2 \ - bind.2 brk.2 chdir.2 chflags.2 \ + bind.2 brk.2 cap_enter.2 cap_new.2 chdir.2 chflags.2 \ chmod.2 chown.2 chroot.2 clock_gettime.2 close.2 \ connect.2 dup.2 execve.2 extattr_get_file.2 \ fcntl.2 fhopen.2 flock.2 fork.2 fsync.2 \ From owner-p4-projects@FreeBSD.ORG Mon Feb 4 17:00:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8286516A469; Mon, 4 Feb 2008 17:00:47 +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 2ED0D16A421 for ; Mon, 4 Feb 2008 17:00:47 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5D113C4EB for ; Mon, 4 Feb 2008 17:00:47 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14H0kBU006828 for ; Mon, 4 Feb 2008 17:00:46 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14H0kDr006825 for perforce@freebsd.org; Mon, 4 Feb 2008 17:00:46 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 4 Feb 2008 17:00:46 GMT Message-Id: <200802041700.m14H0kDr006825@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134790 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 17:00:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=134790 Change 134790 by rwatson@rwatson_freebsd_capabilities on 2008/02/04 17:00:10 Remove CAP_AIO since aio_fsync(), aio_read(), and aio_write() are basically juse fsync(), read(), and write(). Check them as such. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_aio.c#5 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/capability.h#11 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_aio.c#5 (text+ko) ==== @@ -1412,16 +1412,16 @@ fd = aiocbe->uaiocb.aio_fildes; switch (opcode) { case LIO_WRITE: - error = fget_write(td, fd, CAP_WRITE | CAP_AIO, &fp); + error = fget_write(td, fd, CAP_WRITE, &fp); break; case LIO_READ: - error = fget_read(td, fd, CAP_READ | CAP_AIO, &fp); + error = fget_read(td, fd, CAP_READ, &fp); break; case LIO_SYNC: - error = fget(td, fd, CAP_FSYNC | CAP_AIO, &fp); + error = fget(td, fd, CAP_FSYNC, &fp); break; case LIO_NOP: - error = fget(td, fd, CAP_AIO, &fp); + error = fget(td, fd, 0, &fp); break; default: error = EINVAL; @@ -1799,7 +1799,7 @@ struct vnode *vp; /* Lookup file object. */ - error = fget(td, uap->fd, CAP_AIO, &fp); + error = fget(td, uap->fd, 0, &fp); if (error) return (error); ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/capability.h#11 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/sys/sys/capability.h#10 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/sys/sys/capability.h#11 $ */ /* @@ -39,45 +39,44 @@ */ #define CAP_READ 0x0000000000000001ULL /* read/recv */ #define CAP_WRITE 0x0000000000000002ULL /* write/send */ -#define CAP_SEEK 0x0000000000000008ULL /* lseek, various io */ -#define CAP_GETPEERNAME 0x0000000000000010ULL /* getpeername */ -#define CAP_GETSOCKNAME 0x0000000000000020ULL /* getsockname */ -#define CAP_FCHFLAGS 0x0000000000000040ULL /* fchflags */ -#define CAP_IOCTL 0x0000000000000080ULL /* ioctl */ -#define CAP_FSTAT 0x0000000000000100ULL /* fstat */ -#define CAP_MMAP 0x0000000000000200ULL /* mmap */ -#define CAP_FCNTL 0x0000000000000400ULL /* fcntl */ -#define CAP_EVENT 0x0000000000000800ULL /* select/poll */ -#define CAP_FSYNC 0x0000000000001000ULL /* fsync */ -#define CAP_FCHOWN 0x0000000000002000ULL /* fchown */ -#define CAP_FCHMOD 0x0000000000004000ULL /* fchmod */ -#define CAP_FTRUNCATE 0x0000000000008000ULL /* ftruncate */ -#define CAP_FLOCK 0x0000000000010000ULL /* flock */ -#define CAP_FSTATFS 0x0000000000040000ULL /* fstatfs */ -#define CAP_REVOKE 0x0000000000080000ULL /* revoke */ -#define CAP_FEXECVE 0x0000000000100000ULL /* fexecve */ -#define CAP_FPATHCONF 0x0000000000200000ULL /* fpathconf */ -#define CAP_FUTIMES 0x0000000000400000ULL /* futimes */ -#define CAP_AIO 0x0000000000800000ULL /* aio_* */ -#define CAP_ACL_GET 0x0000000001000000ULL /* acl_get_fd */ -#define CAP_ACL_SET 0x0000000002000000ULL /* acl_set_fd */ -#define CAP_ACL_DELETE 0x0000000004000000ULL /* acl_delete_fd */ -#define CAP_ACL_CHECK 0x0000000008000000ULL /* acl_list_fd */ -#define CAP_EXTATTR_GET 0x0000000010000000ULL /* extattr_get_fd */ -#define CAP_EXTATTR_SET 0x0000000020000000ULL /* extattr_set_fd */ -#define CAP_EXTATTR_DELETE 0x0000000040000000ULL /* extattr_delete_fd */ -#define CAP_EXTATTR_LIST 0x0000000080000000ULL /* extattr_list_fd */ -#define CAP_MAC_GET 0x0000000100000000ULL /* mac_get_fd */ -#define CAP_MAC_SET 0x0000000200000000ULL /* mac_set_fd */ -#define CAP_ACCEPT 0x0000000400000000ULL /* accept */ -#define CAP_CONNECT 0x0000000800000000ULL /* connect/sendto */ -#define CAP_BIND 0x0000001000000000ULL /* bind */ -#define CAP_GETSOCKOPT 0x0000002000000000ULL /* getsockopt */ -#define CAP_SETSOCKOPT 0x0000004000000000ULL /* setsockopt */ -#define CAP_LISTEN 0x0000008000000000ULL /* listen */ -#define CAP_SHUTDOWN 0x0000010000000000ULL /* shutdown */ -#define CAP_PEELOFF 0x0000020000000000ULL /* sctp_peeloff */ -#define CAP_MASK_VALID 0x000003fffffdfffbULL +#define CAP_SEEK 0x0000000000000004ULL /* lseek, various io */ +#define CAP_GETPEERNAME 0x0000000000000008ULL /* getpeername */ +#define CAP_GETSOCKNAME 0x0000000000000010ULL /* getsockname */ +#define CAP_FCHFLAGS 0x0000000000000020ULL /* fchflags */ +#define CAP_IOCTL 0x0000000000000040ULL /* ioctl */ +#define CAP_FSTAT 0x0000000000000080ULL /* fstat */ +#define CAP_MMAP 0x0000000000000100ULL /* mmap */ +#define CAP_FCNTL 0x0000000000000200ULL /* fcntl */ +#define CAP_EVENT 0x0000000000000400ULL /* select/poll */ +#define CAP_FSYNC 0x0000000000000800ULL /* fsync */ +#define CAP_FCHOWN 0x0000000000001000ULL /* fchown */ +#define CAP_FCHMOD 0x0000000000002000ULL /* fchmod */ +#define CAP_FTRUNCATE 0x0000000000004000ULL /* ftruncate */ +#define CAP_FLOCK 0x0000000000008000ULL /* flock */ +#define CAP_FSTATFS 0x0000000000010000ULL /* fstatfs */ +#define CAP_REVOKE 0x0000000000020000ULL /* revoke */ +#define CAP_FEXECVE 0x0000000000040000ULL /* fexecve */ +#define CAP_FPATHCONF 0x0000000000080000ULL /* fpathconf */ +#define CAP_FUTIMES 0x0000000000100000ULL /* futimes */ +#define CAP_ACL_GET 0x0000000000200000ULL /* acl_get_fd */ +#define CAP_ACL_SET 0x0000000000400000ULL /* acl_set_fd */ +#define CAP_ACL_DELETE 0x0000000000800000ULL /* acl_delete_fd */ +#define CAP_ACL_CHECK 0x0000000001000000ULL /* acl_list_fd */ +#define CAP_EXTATTR_GET 0x0000000002000000ULL /* extattr_get_fd */ +#define CAP_EXTATTR_SET 0x0000000004000000ULL /* extattr_set_fd */ +#define CAP_EXTATTR_DELETE 0x0000000008000000ULL /* extattr_delete_fd */ +#define CAP_EXTATTR_LIST 0x0000000010000000ULL /* extattr_list_fd */ +#define CAP_MAC_GET 0x0000000020000000ULL /* mac_get_fd */ +#define CAP_MAC_SET 0x0000000040000000ULL /* mac_set_fd */ +#define CAP_ACCEPT 0x0000000080000000ULL /* accept */ +#define CAP_CONNECT 0x0000000100000000ULL /* connect/sendto */ +#define CAP_BIND 0x0000000200000000ULL /* bind */ +#define CAP_GETSOCKOPT 0x0000000400000000ULL /* getsockopt */ +#define CAP_SETSOCKOPT 0x0000000800000000ULL /* setsockopt */ +#define CAP_LISTEN 0x0000001000000000ULL /* listen */ +#define CAP_SHUTDOWN 0x0000002000000000ULL /* shutdown */ +#define CAP_PEELOFF 0x0000004000000000ULL /* sctp_peeloff */ +#define CAP_MASK_VALID 0x0000007fffffffffULL /* * Notes: @@ -92,9 +91,6 @@ * * CAP_EVENT covers select, poll, and kqueue registration for a capability. * - * CAP_AIO is combined with other capabilities to authorize specific AIO - * operations, such as AIO_READ. aio_cancel just requires CAP_AIO. - * * sendfile is authorized using CAP_READ on the file and CAP_WRITE on the * socket. * From owner-p4-projects@FreeBSD.ORG Mon Feb 4 17:56:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 39D2E16A419; Mon, 4 Feb 2008 17:56:48 +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 DB75F16A421 for ; Mon, 4 Feb 2008 17:56:47 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C8DCE13C4DD for ; Mon, 4 Feb 2008 17:56:47 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14HulRl011706 for ; Mon, 4 Feb 2008 17:56:47 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14HulvT011703 for perforce@freebsd.org; Mon, 4 Feb 2008 17:56:47 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 4 Feb 2008 17:56:47 GMT Message-Id: <200802041756.m14HulvT011703@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134792 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 17:56:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=134792 Change 134792 by rwatson@rwatson_freebsd_capabilities on 2008/02/04 17:56:38 Update comments. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#12 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#12 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#11 $"); +__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#12 $"); #include #include @@ -69,8 +69,9 @@ }; /* - * XXXRW: This is inadequate, as there are some VFS and socket operations - * that are not handled via fileops. + * Capabilities have a fileops vector, but in practice none should ever be + * called except for fo_close, as the capability will normally not be + * returned during a file descriptor lookup in the system call code. */ static fo_rdwr_t capability_read; static fo_rdwr_t capability_write; @@ -126,8 +127,6 @@ * pointer in *fp will remain valid, so no extra reference management is * required, and the caller should fdrop() fp_cap as normal when done with * both. - * - * XXXRW: This will almost certainly change. */ int cap_fextract(struct file *fp_cap, cap_rights_t rights, struct file **fpp) From owner-p4-projects@FreeBSD.ORG Mon Feb 4 18:04:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9BA1116A421; Mon, 4 Feb 2008 18:04:56 +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 48CCC16A41B for ; Mon, 4 Feb 2008 18:04:56 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 35E6A13C442 for ; Mon, 4 Feb 2008 18:04:56 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14I4ufF013247 for ; Mon, 4 Feb 2008 18:04:56 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14I4u9E013244 for perforce@freebsd.org; Mon, 4 Feb 2008 18:04:56 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 4 Feb 2008 18:04:56 GMT Message-Id: <200802041804.m14I4u9E013244@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134793 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 18:04:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=134793 Change 134793 by rwatson@rwatson_freebsd_capabilities on 2008/02/04 18:04:23 Update comments. Use ENOTCAPABLE rather than EPERM since expanding capability rights fails due to a lack of capability rights. We don't want privilege to be able to override this in the current thinking. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#13 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#13 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#12 $"); +__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#13 $"); #include #include @@ -211,14 +211,11 @@ * If a new capability is being derived from an existing capability, * then the new capability rights must be a subset of the existing * rights. - * - * XXXRW: Should we have a priv_check() here that can override this - * policy? */ if (fp->f_type == DTYPE_CAPABILITY) { c_old = fp->f_data; if ((c_old->cap_rights | uap->rights) != c_old->cap_rights) { - error = EPERM; + error = ENOTCAPABLE; goto fail2; } } @@ -232,7 +229,10 @@ /* * Rather than nesting capabilities, directly reference the object an - * existing capability references. + * existing capability references. There's nothing else interesting + * to preserve for future use, as we've incorporated the previous + * rights mask into the new one. This prevents us from having to + * deal with capability chains. */ if (fp->f_type == DTYPE_CAPABILITY) fp_object = ((struct capability *)fp->f_data)->cap_file; From owner-p4-projects@FreeBSD.ORG Mon Feb 4 18:15:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4746D16A46C; Mon, 4 Feb 2008 18:15: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 0CD5D16A469 for ; Mon, 4 Feb 2008 18:15:08 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EDD5C13C4D5 for ; Mon, 4 Feb 2008 18:15:07 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14IF7lg014890 for ; Mon, 4 Feb 2008 18:15:07 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14IF72E014887 for perforce@freebsd.org; Mon, 4 Feb 2008 18:15:07 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 4 Feb 2008 18:15:07 GMT Message-Id: <200802041815.m14IF72E014887@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134795 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 18:15:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=134795 Change 134795 by rwatson@rwatson_freebsd_capabilities on 2008/02/04 18:14:44 Remove OBE capability tests, add a couple more combinations to try. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/regression/security/cap_test/cap_test_capabilities.c#2 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/regression/security/cap_test/cap_test_capabilities.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/tools/regression/security/cap_test/cap_test_capabilities.c#1 $"); +__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/tools/regression/security/cap_test/cap_test_capabilities.c#2 $"); #include #include @@ -307,6 +307,8 @@ try_file_ops(fd, CAP_READ | CAP_SEEK); try_file_ops(fd, CAP_WRITE); try_file_ops(fd, CAP_WRITE | CAP_SEEK); + try_file_ops(fd, CAP_READ | CAP_WRITE); + try_file_ops(fd, CAP_READ | CAP_WRITE | CAP_SEEK); try_file_ops(fd, CAP_SEEK); try_file_ops(fd, CAP_FCHFLAGS); try_file_ops(fd, CAP_IOCTL); @@ -325,17 +327,6 @@ try_file_ops(fd, CAP_FSTATFS); try_file_ops(fd, CAP_FPATHCONF); try_file_ops(fd, CAP_FUTIMES); - try_file_ops(fd, CAP_AIO); - try_file_ops(fd, CAP_AIO | CAP_FSYNC); - try_file_ops(fd, CAP_AIO | CAP_FSYNC | CAP_READ); - try_file_ops(fd, CAP_AIO | CAP_FSYNC | CAP_WRITE); - try_file_ops(fd, CAP_AIO | CAP_FSYNC | CAP_READ | CAP_WRITE); - try_file_ops(fd, CAP_AIO | CAP_READ); - try_file_ops(fd, CAP_AIO | CAP_READ | CAP_WRITE); - try_file_ops(fd, CAP_AIO | CAP_WRITE); - - try_file_ops(fd, CAP_FCHDIR); - try_file_ops(fd, CAP_GETDIRENTRIES); try_file_ops(fd, CAP_ACL_GET); try_file_ops(fd, CAP_ACL_SET); try_file_ops(fd, CAP_ACL_DELETE); From owner-p4-projects@FreeBSD.ORG Mon Feb 4 20:51:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B8C4C16A46E; Mon, 4 Feb 2008 20:51:16 +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 64BD616A419; Mon, 4 Feb 2008 20:51:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D405D13C468; Mon, 4 Feb 2008 20:51:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m14KlZwi099935; Mon, 4 Feb 2008 13:47:36 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 04 Feb 2008 13:49:30 -0700 (MST) Message-Id: <20080204.134930.-1350498280.imp@bsdimp.com> To: rrs@freebsd.org From: "M. Warner Losh" In-Reply-To: <200802040843.m148htF0037992@repoman.freebsd.org> References: <200802040843.m148htF0037992@repoman.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@freebsd.org Subject: Re: PERFORCE change 134769 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 20:51:17 -0000 In message: <200802040843.m148htF0037992@repoman.freebsd.org> "Randall R. Stewart" writes: : http://perforce.freebsd.org/chv.cgi?CH=134769 : : Change 134769 by rrs@rrs-mips2-jnpr on 2008/02/04 08:43:01 : : Ok, It still works but now uses the correct registers. : Now, only question I have is if the MCR is used properly. : What was being done before does not match any valid register : need to figure out what its trying to do with the ioctl. : There may be other strange things like this too. Need to : go through the driver and look for other strange things. : : Affected files ... : : .. //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs#9 edit : .. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#11 edit : .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#4 edit : : Differences ... : : ==== //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs#9 (text+ko) ==== : : @@ -33,7 +33,7 @@ : : makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols : : -options ISA_MIPS32 : +options ISA_MIPS64 : options CPU_NOFPU I don't think you want this change. it is wrong because we don't support ISA_MIPS64's notion of 64-bit registers correctly. : options DDB : @@ -79,6 +79,6 @@ : : # : # Use the following for RFS in mem-device : -options MD_ROOT : +#options MD_ROOT : # options ROOTDEVNAME = \"ufs:md0\" : -options MD_ROOT_SIZE = 25200 : +#options MD_ROOT_SIZE = 25200 : : ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#11 (text+ko) ==== : : : ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#4 (text+ko) ==== : : @@ -69,16 +69,13 @@ : #include : #include : : -#include : +#include : : /* Octeon specific includes with loads of in-lines */ : #include : #include : : /* Cavium specific defines pulled from there update of ns16559.h */ : -#define IIR_BUSY 0x7 : -#define com_usr 39 /* Octeon 16750/16550 Uart Status Reg */ : -#define REG_USR com_usr : #define USR_TXFIFO_NOTFULL 2 /* Uart TX FIFO Not full */ : : #include "uart_if.h" : @@ -98,19 +95,19 @@ : { : uint8_t iir; : : - iir = uart_getreg(bas, REG_IIR); : + iir = uart_getreg(bas, OCT_REG_IIR); : while ((iir & IIR_NOPEND) == 0) { : iir &= IIR_IMASK; : if (iir == IIR_RLS) : - (void)uart_getreg(bas, REG_LSR); : + (void)uart_getreg(bas, OCT_REG_LSR); : else if (iir == IIR_RXRDY || iir == IIR_RXTOUT) : - (void)uart_getreg(bas, REG_DATA); : + (void)uart_getreg(bas, OCT_REG_RBR); : else if (iir == IIR_MLSC) : - (void)uart_getreg(bas, REG_MSR); : + (void)uart_getreg(bas, OCT_REG_MSR); : else if (iir == IIR_BUSY) : - (void)uart_getreg(bas, REG_USR); : + (void)uart_getreg(bas, OCT_REG_USR); : uart_barrier(bas); : - iir = uart_getreg(bas, REG_IIR); : + iir = uart_getreg(bas, OCT_REG_IIR); : } : } : : @@ -126,12 +123,12 @@ : if (!delay_changed) : return delay; : delay_changed = 0; : - lcr = uart_getreg(bas, REG_LCR); : - uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); : + lcr = uart_getreg(bas, OCT_REG_LCR); : + uart_setreg(bas, OCT_REG_LCR, lcr | LCR_DLAB); : uart_barrier(bas); : - divisor = uart_getreg(bas, REG_DLL) | (uart_getreg(bas, REG_DLH) << 8); : + divisor = uart_getreg(bas, OCT_REG_DLL) | (uart_getreg(bas, OCT_REG_DLH) << 8); : uart_barrier(bas); : - uart_setreg(bas, REG_LCR, lcr); : + uart_setreg(bas, OCT_REG_LCR, lcr); : uart_barrier(bas); : : if (!bas->rclk) : @@ -182,7 +179,7 @@ : * high enough to handle large FIFOs. : */ : limit = 10 * 10 * 10 * 1024; : - while ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0 && --limit) : + while ((uart_getreg(bas, OCT_REG_LSR) & LSR_TEMT) == 0 && --limit) : DELAY(delay); : if (limit == 0) { : /* : @@ -202,8 +199,8 @@ : * UART is first activated. : */ : limit = 10 * 4096; : - while ((uart_getreg(bas, REG_LSR) & LSR_RXRDY) && --limit) { : - (void)uart_getreg(bas, REG_DATA); : + while ((uart_getreg(bas, OCT_REG_LSR) & LSR_RXRDY) && --limit) { : + (void)uart_getreg(bas, OCT_REG_RBR); : uart_barrier(bas); : DELAY(delay << 2); : } : @@ -229,7 +226,7 @@ : fcr |= FCR_XMT_RST; : if (what & UART_FLUSH_RECEIVER) : fcr |= FCR_RCV_RST; : - uart_setreg(bas, REG_FCR, fcr); : + uart_setreg(bas, OCT_REG_FCR, fcr); : uart_barrier(bas); : } : : @@ -258,15 +255,15 @@ : divisor = oct16550_divisor(bas->rclk, baudrate); : if (divisor == 0) : return (EINVAL); : - uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); : + uart_setreg(bas, OCT_REG_LCR, lcr | LCR_DLAB); : uart_barrier(bas); : - uart_setreg(bas, REG_DLL, divisor & 0xff); : - uart_setreg(bas, REG_DLH, (divisor >> 8) & 0xff); : + uart_setreg(bas, OCT_REG_DLL, divisor & 0xff); : + uart_setreg(bas, OCT_REG_DLH, (divisor >> 8) & 0xff); : uart_barrier(bas); : delay_changed = 1; : } : /* Set LCR and clear DLAB. */ : - uart_setreg(bas, REG_LCR, lcr); : + uart_setreg(bas, OCT_REG_LCR, lcr); : uart_barrier(bas); : return (0); : } : @@ -296,13 +293,13 @@ : u_char val; : : /* Check known 0 bits that don't depend on DLAB. */ : - val = uart_getreg(bas, REG_IIR); : + val = uart_getreg(bas, OCT_REG_IIR); : if (val & 0x30) : return (ENXIO); : - val = uart_getreg(bas, REG_MCR); : + val = uart_getreg(bas, OCT_REG_MCR); : if (val & 0xc0) : return (ENXIO); : - val = uart_getreg(bas, REG_USR); : + val = uart_getreg(bas, OCT_REG_USR); : if (val & 0xe0) : return (ENXIO); : return (0); : @@ -317,16 +314,16 @@ : oct16550_param(bas, baudrate, databits, stopbits, parity); : : /* Disable all interrupt sources. */ : - ier = uart_getreg(bas, REG_IER) & 0x0; : - uart_setreg(bas, REG_IER, ier); : + ier = uart_getreg(bas, OCT_REG_IER) & 0x0; : + uart_setreg(bas, OCT_REG_IER, ier); : uart_barrier(bas); : : /* Disable the FIFO (if present). */ : - //uart_setreg(bas, REG_FCR, 0); : + //uart_setreg(bas, OCT_REG_FCR, 0); : uart_barrier(bas); : : /* Set RTS & DTR. */ : - uart_setreg(bas, REG_MCR, MCR_RTS | MCR_DTR); : + uart_setreg(bas, OCT_REG_MCR, MCR_RTS | MCR_DTR); : uart_barrier(bas); : : oct16550_clrint(bas); : @@ -337,17 +334,17 @@ : { : : /* Clear RTS & DTR. */ : - uart_setreg(bas, REG_MCR, 0); : + uart_setreg(bas, OCT_REG_MCR, 0); : uart_barrier(bas); : } : : static inline void : oct16550_wait_txhr_empty(struct uart_bas *bas, int limit, int delay) : { : - while (((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) && : - ((uart_getreg(bas, REG_USR) & USR_TXFIFO_NOTFULL) == 0) && --limit) : + while (((uart_getreg(bas, OCT_REG_LSR) & LSR_THRE) == 0) && : + ((uart_getreg(bas, OCT_REG_USR) & USR_TX_FIFO_NOTFULL) == 0) && --limit) : DELAY(delay); : -} : +} : : static void : oct16550_putc(struct uart_bas *bas, int c) : @@ -357,7 +354,7 @@ : /* 1/10th the time to transmit 1 character (estimate). */ : delay = oct16550_delay(bas); : oct16550_wait_txhr_empty(bas, 100, delay); : - uart_setreg(bas, REG_DATA, c); : + uart_setreg(bas, OCT_REG_THR, c); : uart_barrier(bas); : oct16550_wait_txhr_empty(bas, 100, delay); : } : @@ -366,7 +363,7 @@ : oct16550_rxready(struct uart_bas *bas) : { : : - return ((uart_getreg(bas, REG_LSR) & LSR_RXRDY) != 0 ? 1 : 0); : + return ((uart_getreg(bas, OCT_REG_LSR) & LSR_RXRDY) != 0 ? 1 : 0); : } : : static int : @@ -379,13 +376,13 @@ : /* 1/10th the time to transmit 1 character (estimate). */ : delay = oct16550_delay(bas); : : - while ((uart_getreg(bas, REG_LSR) & LSR_RXRDY) == 0) { : + while ((uart_getreg(bas, OCT_REG_LSR) & LSR_RXRDY) == 0) { : uart_unlock(hwmtx); : DELAY(delay); : uart_lock(hwmtx); : } : : - c = uart_getreg(bas, REG_DATA); : + c = uart_getreg(bas, OCT_REG_RBR); : : uart_unlock(hwmtx); : : @@ -456,9 +453,9 @@ : bas = &sc->sc_bas; : : oct16550_drain(bas, UART_DRAIN_TRANSMITTER); : - oct16550->mcr = uart_getreg(bas, REG_MCR); : - oct16550->fcr = FCR_ENABLE | FCR_RX_HIGH; : - uart_setreg(bas, REG_FCR, oct16550->fcr); : + oct16550->mcr = uart_getreg(bas, OCT_REG_MCR); : + oct16550->fcr = FCR_ENABLE | FCR_RX_MEDH; : + uart_setreg(bas, OCT_REG_FCR, oct16550->fcr); : uart_barrier(bas); : oct16550_bus_flush(sc, UART_FLUSH_RECEIVER | UART_FLUSH_TRANSMITTER); : : @@ -469,9 +466,9 @@ : oct16550_bus_getsig(sc); : : oct16550_clrint(bas); : - oct16550->ier = uart_getreg(bas, REG_IER) & 0xf0; : + oct16550->ier = uart_getreg(bas, OCT_REG_IER) & 0xf0; : oct16550->ier |= IER_EMSC | IER_ERLS | IER_ERXRDY; : - uart_setreg(bas, REG_IER, oct16550->ier); : + uart_setreg(bas, OCT_REG_IER, oct16550->ier); : uart_barrier(bas); : : /* : @@ -489,8 +486,8 @@ : u_char ier; : : bas = &sc->sc_bas; : - ier = uart_getreg(bas, REG_IER) & 0xf0; : - uart_setreg(bas, REG_IER, ier); : + ier = uart_getreg(bas, OCT_REG_IER) & 0xf0; : + uart_setreg(bas, OCT_REG_IER, ier); : uart_barrier(bas); : oct16550_clrint(bas); : return (0); : @@ -507,7 +504,7 @@ : uart_lock(sc->sc_hwmtx); : if (sc->sc_rxfifosz > 1) { : oct16550_flush(bas, what); : - uart_setreg(bas, REG_FCR, oct16550->fcr); : + uart_setreg(bas, OCT_REG_FCR, oct16550->fcr); : uart_barrier(bas); : error = 0; : } else : @@ -526,7 +523,7 @@ : old = sc->sc_hwsig; : sig = old; : uart_lock(sc->sc_hwmtx); : - msr = uart_getreg(&sc->sc_bas, REG_MSR); : + msr = uart_getreg(&sc->sc_bas, OCT_REG_MSR); : uart_unlock(sc->sc_hwmtx); : SIGCHG(msr & MSR_DSR, sig, SER_DSR, SER_DDSR); : SIGCHG(msr & MSR_CTS, sig, SER_CTS, SER_DCTS); : @@ -549,52 +546,57 @@ : uart_lock(sc->sc_hwmtx); : switch (request) { : case UART_IOCTL_BREAK: : - lcr = uart_getreg(bas, REG_LCR); : + lcr = uart_getreg(bas, OCT_REG_LCR); : if (data) : - lcr |= LCR_SBREAK; : + : + lcr |= LCR_SBREAK; : else : lcr &= ~LCR_SBREAK; : - uart_setreg(bas, REG_LCR, lcr); : + uart_setreg(bas, OCT_REG_LCR, lcr); : uart_barrier(bas); : break; : case UART_IOCTL_IFLOW: : - lcr = uart_getreg(bas, REG_LCR); : + lcr = uart_getreg(bas, OCT_REG_LCR); : uart_barrier(bas); : - uart_setreg(bas, REG_LCR, 0xbf); : + /* What does EFR_ENABLE do?? RRS */ : + uart_setreg(bas, OCT_REG_LCR, LCR_EFR_ENABLE); : uart_barrier(bas); : - efr = uart_getreg(bas, REG_EFR); : + /* Don't know if this is correct ?? RRS */ : + efr = uart_getreg(bas, OCT_REG_MCR); : if (data) : - efr |= EFR_RTS; : + efr |= MCR_RTS; : else : - efr &= ~EFR_RTS; : - uart_setreg(bas, REG_EFR, efr); : + efr &= ~MCR_RTS; : + uart_setreg(bas, OCT_REG_MCR, efr); : uart_barrier(bas); : - uart_setreg(bas, REG_LCR, lcr); : + uart_setreg(bas, OCT_REG_LCR, lcr); : uart_barrier(bas); : break; : case UART_IOCTL_OFLOW: : - lcr = uart_getreg(bas, REG_LCR); : + lcr = uart_getreg(bas, OCT_REG_LCR); : uart_barrier(bas); : - uart_setreg(bas, REG_LCR, 0xbf); : + /* Don't know if this is correct ?? RRS */ : + uart_setreg(bas, OCT_REG_LCR, LCR_EFR_ENABLE); : uart_barrier(bas); : - efr = uart_getreg(bas, REG_EFR); : + /* Don't know if this is correct ?? RRS */ : + efr = uart_getreg(bas, OCT_REG_MCR); : if (data) : - efr |= EFR_CTS; : + efr |= MCR_DTR; : else : - efr &= ~EFR_CTS; : - uart_setreg(bas, REG_EFR, efr); : + efr &= ~MCR_DTR; : + uart_setreg(bas, OCT_REG_MCR, efr); : uart_barrier(bas); : - uart_setreg(bas, REG_LCR, lcr); : + uart_setreg(bas, OCT_REG_LCR, lcr); : uart_barrier(bas); : break; : case UART_IOCTL_BAUD: : - lcr = uart_getreg(bas, REG_LCR); : - uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); : + lcr = uart_getreg(bas, OCT_REG_LCR); : + uart_setreg(bas, OCT_REG_LCR, lcr | LCR_DLAB); : uart_barrier(bas); : - divisor = uart_getreg(bas, REG_DLL) | : - (uart_getreg(bas, REG_DLH) << 8); : + divisor = uart_getreg(bas, OCT_REG_DLL) | : + (uart_getreg(bas, OCT_REG_DLH) << 8); : uart_barrier(bas); : - uart_setreg(bas, REG_LCR, lcr); : + uart_setreg(bas, OCT_REG_LCR, lcr); : uart_barrier(bas); : baudrate = (divisor > 0) ? bas->rclk / divisor / 16 : 0; : delay_changed = 1; : @@ -622,11 +624,11 @@ : bas = &sc->sc_bas; : uart_lock(sc->sc_hwmtx); : : - iir = uart_getreg(bas, REG_IIR) & IIR_IMASK; : + iir = uart_getreg(bas, OCT_REG_IIR) & IIR_IMASK; : if (iir != IIR_NOPEND) { : : if (iir == IIR_RLS) { : - lsr = uart_getreg(bas, REG_LSR); : + lsr = uart_getreg(bas, OCT_REG_LSR); : if (lsr & LSR_OE) : ipend |= SER_INT_OVERRUN; : if (lsr & LSR_BI) : @@ -647,7 +649,7 @@ : ipend |= SER_INT_SIGCHG; : : } else if (iir == IIR_BUSY) { : - (void)uart_getreg(bas, REG_USR); : + (void)uart_getreg(bas, OCT_REG_USR); : } : } : uart_unlock(sc->sc_hwmtx); : @@ -693,7 +695,7 @@ : if (error) { : return (error); : } : - uart_setreg(bas, REG_MCR, (MCR_DTR | MCR_RTS)); : + uart_setreg(bas, OCT_REG_MCR, (MCR_DTR | MCR_RTS)); : : /* : * Enable FIFOs. And check that the UART has them. If not, we're : @@ -703,7 +705,7 @@ : oct16550_drain(bas, UART_DRAIN_TRANSMITTER); : #define ENABLE_OCTEON_FIFO 1 : #ifdef ENABLE_OCTEON_FIFO : - uart_setreg(bas, REG_FCR, FCR_ENABLE | FCR_XMT_RST | FCR_RCV_RST); : + uart_setreg(bas, OCT_REG_FCR, FCR_ENABLE | FCR_XMT_RST | FCR_RCV_RST); : #endif : uart_barrier(bas); : : @@ -749,31 +751,31 @@ : : bas = &sc->sc_bas; : uart_lock(sc->sc_hwmtx); : - lsr = uart_getreg(bas, REG_LSR); : + lsr = uart_getreg(bas, OCT_REG_LSR); : : while (lsr & LSR_RXRDY) { : if (uart_rx_full(sc)) { : sc->sc_rxbuf[sc->sc_rxput] = UART_STAT_OVERRUN; : break; : } : - xc = uart_getreg(bas, REG_DATA); : + xc = uart_getreg(bas, OCT_REG_RBR); : if (lsr & LSR_FE) : xc |= UART_STAT_FRAMERR; : if (lsr & LSR_PE) : xc |= UART_STAT_PARERR; : uart_rx_put(sc, xc); : - lsr = uart_getreg(bas, REG_LSR); : + lsr = uart_getreg(bas, OCT_REG_LSR); : } : /* Discard everything left in the Rx FIFO. */ : /* : * First do a read/discard anyway, in case the UART was lying to us. : * This was seen, when IIR said RBR, but LSR said no RXRDY : */ : - (void)uart_getreg(bas, REG_DATA); : + (void)uart_getreg(bas, OCT_REG_RBR); : while (lsr & LSR_RXRDY) { : - (void)uart_getreg(bas, REG_DATA); : + (void)uart_getreg(bas, OCT_REG_RBR); : uart_barrier(bas); : - lsr = uart_getreg(bas, REG_LSR); : + lsr = uart_getreg(bas, OCT_REG_LSR); : } : uart_unlock(sc->sc_hwmtx); : return (0); : @@ -805,7 +807,7 @@ : oct16550->mcr |= MCR_DTR; : if (new & SER_RTS) : oct16550->mcr |= MCR_RTS; : - uart_setreg(bas, REG_MCR, oct16550->mcr); : + uart_setreg(bas, OCT_REG_MCR, oct16550->mcr); : uart_barrier(bas); : uart_unlock(sc->sc_hwmtx); : return (0); : @@ -827,11 +829,11 @@ : #else : : oct16550_wait_txhr_empty(bas, 100, oct16550_delay(bas)); : - uart_setreg(bas, REG_IER, oct16550->ier | IER_ETXRDY); : + uart_setreg(bas, OCT_REG_IER, oct16550->ier | IER_ETXRDY); : uart_barrier(bas); : : for (i = 0; i < sc->sc_txdatasz; i++) { : - uart_setreg(bas, REG_DATA, sc->sc_txbuf[i]); : + uart_setreg(bas, OCT_REG_THR, sc->sc_txbuf[i]); : uart_barrier(bas); : } : sc->sc_txbusy = 1; : ` From owner-p4-projects@FreeBSD.ORG Mon Feb 4 20:52:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4CD916A421; Mon, 4 Feb 2008 20:52:57 +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 5138316A418 for ; Mon, 4 Feb 2008 20:52:57 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2AC1213C442 for ; Mon, 4 Feb 2008 20:52:57 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14KqvKS040124 for ; Mon, 4 Feb 2008 20:52:57 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14KqubG040121 for perforce@freebsd.org; Mon, 4 Feb 2008 20:52:56 GMT (envelope-from imp@freebsd.org) Date: Mon, 4 Feb 2008 20:52:56 GMT Message-Id: <200802042052.m14KqubG040121@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 134802 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 20:52:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=134802 Change 134802 by imp@imp_lighthouse on 2008/02/04 20:52:02 Nits. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/reg.h#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/reg.h#5 (text+ko) ==== @@ -41,11 +41,9 @@ #ifndef _MACHINE_REG_H_ #define _MACHINE_REG_H_ + /* - * Location of the users' stored - * registers relative to ZERO. - * Usage is p->p_regs[XX]. - * + * Location of the users' stored registers relative to ZERO. * must be visible to assembly code. */ #include From owner-p4-projects@FreeBSD.ORG Mon Feb 4 23:36:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E00D16A481; Mon, 4 Feb 2008 23:36:41 +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 0A55D16A496 for ; Mon, 4 Feb 2008 23:36:41 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F0C1113C461 for ; Mon, 4 Feb 2008 23:36:40 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m14NaeQ4053329 for ; Mon, 4 Feb 2008 23:36:40 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m14Naesd053326 for perforce@freebsd.org; Mon, 4 Feb 2008 23:36:40 GMT (envelope-from jb@freebsd.org) Date: Mon, 4 Feb 2008 23:36:40 GMT Message-Id: <200802042336.m14Naesd053326@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134809 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 23:36:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=134809 Change 134809 by jb@jb_freebsd1 on 2008/02/04 23:36:01 Generate another function for the systrace (syscall) DTrace provider to get the argument types. This is of dubious value since the things that we really want typed are the structures which all come to us as user space addresses, so we have to do a copyin() to get them.. and in the process of doing that we have to use the uintptr_t address value not it's typed equivalent... and then copyin() gives us a void pointer. Sigh. Note also that as a hack I have to use gawk because this change causes the one-true-awk to exceed FOPEN_MAX. Sigh. Affected files ... .. //depot/projects/dtrace/src/sys/kern/init_sysent.c#20 edit .. //depot/projects/dtrace/src/sys/kern/makesyscalls.sh#10 edit .. //depot/projects/dtrace/src/sys/kern/syscalls.c#19 edit .. //depot/projects/dtrace/src/sys/kern/systrace_args.c#15 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/init_sysent.c#20 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/init_sysent.c,v 1.232 2008/01/20 23:44:23 rwatson Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.236 2008/01/20 23:43:06 rwatson Exp */ ==== //depot/projects/dtrace/src/sys/kern/makesyscalls.sh#10 (text+ko) ==== @@ -34,10 +34,11 @@ sysinc="sysinc.switch.$$" sysarg="sysarg.switch.$$" sysprotoend="sysprotoend.$$" +systracetmp="systrace.$$" -trap "rm $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend" 0 +trap "rm $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp" 0 -touch $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend +touch $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp case $# in 0) echo "usage: $0 input-file " 1>&2 @@ -61,7 +62,7 @@ 2,${ /^#/!s/\([{}()*,]\)/ \1 /g } -' < $1 | awk " +' < $1 | gawk " BEGIN { sysaue = \"$sysaue\" sysdcl = \"$sysdcl\" @@ -82,6 +83,7 @@ syshdr = \"$syshdr\" sysmk = \"$sysmk\" systrace = \"$systrace\" + systracetmp = \"$systracetmp\" compat = \"$compat\" compat4 = \"$compat4\" compat6 = \"$compat6\" @@ -159,6 +161,9 @@ printf "\tint64_t *iarg = (int64_t *) uarg;\n" > systrace printf "\tswitch (sysnum) {\n" > systrace + printf "static void\nsystrace_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)\n{\n\tconst char *p = NULL;\n" > systracetmp + printf "\tswitch (sysnum) {\n" > systracetmp + next } NF == 0 || $1 ~ /^;/ { @@ -316,9 +321,12 @@ || $3 == "NOIMPL" || $3 == "NOSTD" { parseline() printf("\t/* %s */\n\tcase %d: {\n", funcname, syscall) > systrace + printf("\t/* %s */\n\tcase %d:\n", funcname, syscall) > systracetmp if (argc > 0) { + printf("\t\tswitch(ndx) {\n") > systracetmp printf("\t\tstruct %s *p = params;\n", argalias) > systrace for (i = 1; i <= argc; i++) { + printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, argtype[i]) > systracetmp if (index(argtype[i], "*") > 0 || argtype[i] == "caddr_t") printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \ i - 1, \ @@ -332,8 +340,10 @@ i - 1, \ argname[i], argtype[i]) > systrace } + printf("\t\tdefault:\n\t\t\tbreak;\n\t\t};\n") > systracetmp } printf("\t\t*n_args = %d;\n\t\tbreak;\n\t}\n", argc) > systrace + printf("\t\tbreak;\n") > systracetmp if ((!nosys || funcname != "nosys") && \ (funcname != "lkmnosys") && (funcname != "lkmressys")) { if (argc != 0 && $3 != "NOARGS" && $3 != "NOPROTO") { @@ -529,6 +539,7 @@ printf("#define\t%sMAXSYSCALL\t%d\n", syscallprefix, syscall) \ > syshdr printf "\tdefault:\n\t\t*n_args = 0;\n\t\tbreak;\n\t};\n}\n" > systrace + printf "\tdefault:\n\t\tbreak;\n\t};\n\tif (p != NULL)\n\t\tstrlcpy(desc, p, descsz);\n}\n" > systracetmp } ' cat $sysinc $sysent >> $syssw @@ -537,4 +548,5 @@ $syscompat4 $syscompat4dcl \ $syscompat6 $syscompat6dcl \ $sysaue $sysprotoend > $sysproto +cat $systracetmp >> $systrace ==== //depot/projects/dtrace/src/sys/kern/syscalls.c#19 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/syscalls.c,v 1.216 2008/01/20 23:44:23 rwatson Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.236 2008/01/20 23:43:06 rwatson Exp */ ==== //depot/projects/dtrace/src/sys/kern/systrace_args.c#15 (text+ko) ==== @@ -2,7 +2,7 @@ * System call argument to DTrace register array converstion. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/systrace_args.c,v 1.16 2008/01/20 23:44:23 rwatson Exp $ + * $FreeBSD$ * This file is part of the DTrace syscall provider. */ @@ -2892,3 +2892,4727 @@ break; }; } +static void +systrace_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) +{ + const char *p = NULL; + switch (sysnum) { + /* nosys */ + case 0: + break; + /* sys_exit */ + case 1: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* fork */ + case 2: + break; + /* read */ + case 3: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "void *"; + break; + case 2: + p = "size_t"; + break; + default: + break; + }; + break; + /* write */ + case 4: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "const void *"; + break; + case 2: + p = "size_t"; + break; + default: + break; + }; + break; + /* open */ + case 5: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* close */ + case 6: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* wait4 */ + case 7: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "struct rusage *"; + break; + default: + break; + }; + break; + /* link */ + case 9: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + default: + break; + }; + break; + /* unlink */ + case 10: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* chdir */ + case 12: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* fchdir */ + case 13: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* mknod */ + case 14: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* chmod */ + case 15: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* chown */ + case 16: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* obreak */ + case 17: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* getpid */ + case 20: + break; + /* mount */ + case 21: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "caddr_t"; + break; + default: + break; + }; + break; + /* unmount */ + case 22: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* setuid */ + case 23: + switch(ndx) { + case 0: + p = "uid_t"; + break; + default: + break; + }; + break; + /* getuid */ + case 24: + break; + /* geteuid */ + case 25: + break; + /* ptrace */ + case 26: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "pid_t"; + break; + case 2: + p = "caddr_t"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* recvmsg */ + case 27: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct msghdr *"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* sendmsg */ + case 28: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct msghdr *"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* recvfrom */ + case 29: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "caddr_t"; + break; + case 2: + p = "size_t"; + break; + case 3: + p = "int"; + break; + case 4: + p = "struct sockaddr *__restrict"; + break; + case 5: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* accept */ + case 30: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct sockaddr *__restrict"; + break; + case 2: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* getpeername */ + case 31: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct sockaddr *__restrict"; + break; + case 2: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* getsockname */ + case 32: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct sockaddr *__restrict"; + break; + case 2: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* access */ + case 33: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* chflags */ + case 34: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* fchflags */ + case 35: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* sync */ + case 36: + break; + /* kill */ + case 37: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* getppid */ + case 39: + break; + /* dup */ + case 41: + switch(ndx) { + case 0: + p = "u_int"; + break; + default: + break; + }; + break; + /* pipe */ + case 42: + break; + /* getegid */ + case 43: + break; + /* profil */ + case 44: + switch(ndx) { + case 0: + p = "caddr_t"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "size_t"; + break; + case 3: + p = "u_int"; + break; + default: + break; + }; + break; + /* ktrace */ + case 45: + switch(ndx) { + case 0: + p = "const char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* getgid */ + case 47: + break; + /* getlogin */ + case 49: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "u_int"; + break; + default: + break; + }; + break; + /* setlogin */ + case 50: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* acct */ + case 51: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* sigaltstack */ + case 53: + switch(ndx) { + case 0: + p = "stack_t *"; + break; + case 1: + p = "stack_t *"; + break; + default: + break; + }; + break; + /* ioctl */ + case 54: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "u_long"; + break; + case 2: + p = "caddr_t"; + break; + default: + break; + }; + break; + /* reboot */ + case 55: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* revoke */ + case 56: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* symlink */ + case 57: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + default: + break; + }; + break; + /* readlink */ + case 58: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* execve */ + case 59: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char **"; + break; + case 2: + p = "char **"; + break; + default: + break; + }; + break; + /* umask */ + case 60: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* chroot */ + case 61: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* msync */ + case 65: + switch(ndx) { + case 0: + p = "void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* vfork */ + case 66: + break; + /* sbrk */ + case 69: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* sstk */ + case 70: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* ovadvise */ + case 72: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* munmap */ + case 73: + switch(ndx) { + case 0: + p = "void *"; + break; + case 1: + p = "size_t"; + break; + default: + break; + }; + break; + /* mprotect */ + case 74: + switch(ndx) { + case 0: + p = "const void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* madvise */ + case 75: + switch(ndx) { + case 0: + p = "void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* mincore */ + case 78: + switch(ndx) { + case 0: + p = "const void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "char *"; + break; + default: + break; + }; + break; + /* getgroups */ + case 79: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "gid_t *"; + break; + default: + break; + }; + break; + /* setgroups */ + case 80: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "gid_t *"; + break; + default: + break; + }; + break; + /* getpgrp */ + case 81: + break; + /* setpgid */ + case 82: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* setitimer */ + case 83: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "struct itimerval *"; + break; + case 2: + p = "struct itimerval *"; + break; + default: + break; + }; + break; + /* swapon */ + case 85: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* getitimer */ + case 86: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "struct itimerval *"; + break; + default: + break; + }; + break; + /* getdtablesize */ + case 89: + break; + /* dup2 */ + case 90: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "u_int"; + break; + default: + break; + }; + break; + /* fcntl */ + case 92: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "long"; + break; + default: >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Feb 5 00:07:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BCA0316A41A; Tue, 5 Feb 2008 00:07:12 +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 7D87E16A417 for ; Tue, 5 Feb 2008 00:07:12 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6D51813C4DD for ; Tue, 5 Feb 2008 00:07:12 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1507CXW056318 for ; Tue, 5 Feb 2008 00:07:12 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1507CiE056315 for perforce@freebsd.org; Tue, 5 Feb 2008 00:07:12 GMT (envelope-from jb@freebsd.org) Date: Tue, 5 Feb 2008 00:07:12 GMT Message-Id: <200802050007.m1507CiE056315@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134810 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 00:07:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=134810 Change 134810 by jb@jb_freebsd1 on 2008/02/05 00:06:19 Putting fasttrap in here was a bit premature. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/dtraceall/dtraceall.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/dtraceall/dtraceall.c#5 (text+ko) ==== @@ -64,9 +64,6 @@ MODULE_DEPEND(dtraceall, cyclic, 1, 1, 1); MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); -#if defined(__amd64__) -MODULE_DEPEND(dtraceall, fasttrap, 1, 1, 1); -#endif #if defined(__amd64__) || defined(__i386__) MODULE_DEPEND(dtraceall, fbt, 1, 1, 1); #endif From owner-p4-projects@FreeBSD.ORG Tue Feb 5 03:13:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E935416A41B; Tue, 5 Feb 2008 03:13:29 +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 AEAC216A419 for ; Tue, 5 Feb 2008 03:13:29 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9F28913C447 for ; Tue, 5 Feb 2008 03:13:29 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m153DT3g079813 for ; Tue, 5 Feb 2008 03:13:29 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m153DT0Q079810 for perforce@freebsd.org; Tue, 5 Feb 2008 03:13:29 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 5 Feb 2008 03:13:29 GMT Message-Id: <200802050313.m153DT0Q079810@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134813 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 03:13:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=134813 Change 134813 by kmacy@pandemonium:kmacy:xen31 on 2008/02/05 03:13:12 make sound build Affected files ... .. //depot/projects/xen31/sys/dev/sound/pcm/sound.h#2 edit Differences ... ==== //depot/projects/xen31/sys/dev/sound/pcm/sound.h#2 (text+ko) ==== @@ -31,12 +31,13 @@ * first, include kernel header files. */ -#ifndef _OS_H_ -#define _OS_H_ +#ifndef _SOUND_IS_A_PAIN_IN_MY_ASS_H_ +#define _SOUND_IS_A_PAIN_IN_MY_ASS_H_ #ifdef _KERNEL #include #include +#include #include #include #include @@ -545,17 +546,14 @@ int sndstat_unregister(device_t dev); int sndstat_unregisterfile(char *str); -#define SND_DECLARE_FILE(version) \ - _SND_DECLARE_FILE(__LINE__, version) - -#define _SND_DECLARE_FILE(uniq, version) \ - __SND_DECLARE_FILE(uniq, version) - #define __SND_DECLARE_FILE(uniq, version) \ - static char sndstat_vinfo[] = version; \ + static char sndstat_vinfo[] = version; \ SYSINIT(sdf_ ## uniq, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, sndstat_registerfile, sndstat_vinfo); \ SYSUNINIT(sdf_ ## uniq, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, sndstat_unregisterfile, sndstat_vinfo); +#define SND_DECLARE_FILE(version) \ + __SND_DECLARE_FILE(__LINE__, (version)) + /* usage of flags in device config entry (config file) */ #define DV_F_DRQ_MASK 0x00000007 /* mask for secondary drq */ #define DV_F_DUAL_DMA 0x00000010 /* set to use secondary dma channel */ From owner-p4-projects@FreeBSD.ORG Tue Feb 5 05:03:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E95D116A41B; Tue, 5 Feb 2008 05:03:28 +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 967E516A419 for ; Tue, 5 Feb 2008 05:03:28 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8724213C469 for ; Tue, 5 Feb 2008 05:03:28 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1553S8F096327 for ; Tue, 5 Feb 2008 05:03:28 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1553SHh096324 for perforce@freebsd.org; Tue, 5 Feb 2008 05:03:28 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 5 Feb 2008 05:03:28 GMT Message-Id: <200802050503.m1553SHh096324@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134816 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 05:03:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=134816 Change 134816 by kmacy@kmacy:storage:toehead on 2008/02/05 05:02:47 allow users to get link status without bringing the interface up Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#5 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#5 (text+ko) ==== @@ -1119,9 +1119,6 @@ struct port_info *pi = &adapter->port[port_id]; struct cmac *mac = &adapter->port[port_id].mac; - if ((pi->ifp->if_flags & IFF_UP) == 0) - return; - if (link_status) { t3_mac_enable(mac, MAC_DIRECTION_RX); if_link_state_change(pi->ifp, LINK_STATE_UP); @@ -1806,6 +1803,12 @@ break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: + /* + * This is a convenient place to check the link status when + * no interfaces are up and thus the callout is not running + */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + cxgb_tick_handler(p->adapter, 0); error = ifmedia_ioctl(ifp, ifr, &p->media, command); break; case SIOCSIFCAP: From owner-p4-projects@FreeBSD.ORG Tue Feb 5 05:38:06 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2FF0616A41A; Tue, 5 Feb 2008 05:38:06 +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 D186E16A418 for ; Tue, 5 Feb 2008 05:38:05 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C280213C455 for ; Tue, 5 Feb 2008 05:38:05 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m155c5fV098617 for ; Tue, 5 Feb 2008 05:38:05 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m155c5rc098614 for perforce@freebsd.org; Tue, 5 Feb 2008 05:38:05 GMT (envelope-from jb@freebsd.org) Date: Tue, 5 Feb 2008 05:38:05 GMT Message-Id: <200802050538.m155c5rc098614@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134819 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 05:38:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=134819 Change 134819 by jb@jb_freebsd1 on 2008/02/05 05:37:35 Follow-up change to match the fact that entry and return probes have the same arguments. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/systrace/systrace.c#8 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/systrace/systrace.c#8 (text+ko) ==== @@ -75,6 +75,7 @@ static d_open_t systrace_open; static int systrace_unload(void); +static void systrace_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *); static void systrace_args(int, void *, u_int64_t *, int *); static void systrace_probe(u_int32_t, int, struct sysent *, void *); static void systrace_provide(void *, dtrace_probedesc_t *); @@ -104,7 +105,7 @@ systrace_disable, NULL, NULL, - NULL, + systrace_getargdesc, NULL, NULL, systrace_destroy @@ -119,33 +120,18 @@ */ #include -/* ARGSUSED */ static void systrace_probe(u_int32_t id, int sysnum, struct sysent *sysent, void *params) { int n_args = 0; u_int64_t uargs[8]; - /* Is this a return syscall? */ - if (sysent == NULL) { - /* - * Yes. Just convert the first two parameters which are - * both set to the return error number. - */ - int64_t *iargs = (int64_t *) uargs; - int *iparams = (int *) params; - iargs[0] = iparams[0]; - iargs[1] = iparams[1]; - uargs[2] = 0; - uargs[3] = 0; - uargs[4] = 0; - /* * Check if this syscall has a custom argument conversion * function registered. If so, it is a syscall registered * by a loaded module. */ - } else if (sysent->sy_systrace_args_func != NULL) + if (sysent->sy_systrace_args_func != NULL) /* * Convert the syscall parameters using the registered * function. @@ -164,7 +150,17 @@ dtrace_probe(id, uargs[0], uargs[1], uargs[2], uargs[3], uargs[4]); } -/*ARGSUSED*/ +static void +systrace_getargdesc(void *arg, dtrace_id_t id, void *parg, dtrace_argdesc_t *desc) +{ + int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); + + systrace_setargdesc(sysnum, desc->dtargd_ndx, desc->dtargd_native, + sizeof(desc->dtargd_native)); + + return; +} + static void systrace_provide(void *arg, dtrace_probedesc_t *desc) { @@ -187,7 +183,6 @@ } } -/* ARGSUSED */ static void systrace_destroy(void *arg, dtrace_id_t id, void *parg) { @@ -206,7 +201,6 @@ #endif } -/* ARGSUSED */ static void systrace_enable(void *arg, dtrace_id_t id, void *parg) { @@ -218,7 +212,6 @@ sysent[sysnum].sy_return = id; } -/* ARGSUSED */ static void systrace_disable(void *arg, dtrace_id_t id, void *parg) { @@ -258,7 +251,6 @@ return (error); } -/* ARGSUSED */ static int systrace_modevent(module_t mod __unused, int type, void *data __unused) { @@ -282,7 +274,6 @@ return (error); } -/* ARGSUSED */ static int systrace_open(struct cdev *dev __unused, int oflags __unused, int devtype __unused, struct thread *td __unused) { From owner-p4-projects@FreeBSD.ORG Tue Feb 5 06:50:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 37C1E16A468; Tue, 5 Feb 2008 06:50: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 D8EDD16A417 for ; Tue, 5 Feb 2008 06:50:24 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C5CA313C442 for ; Tue, 5 Feb 2008 06:50:24 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m156oOgm003803 for ; Tue, 5 Feb 2008 06:50:24 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m156oOKk003800 for perforce@freebsd.org; Tue, 5 Feb 2008 06:50:24 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 5 Feb 2008 06:50:24 GMT Message-Id: <200802050650.m156oOKk003800@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134821 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 06:50:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=134821 Change 134821 by kmacy@kmacy:storage:toehead on 2008/02/05 06:49:56 ensure that all locks get destroyed at unload Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/cxgb_l2t.c#4 edit .. //depot/projects/toehead/sys/dev/cxgb/cxgb_offload.c#5 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_l2t.c#4 (text+ko) ==== @@ -543,6 +543,12 @@ void t3_free_l2t(struct l2t_data *d) { + int i; + + rw_destroy(&d->lock); + for (i = 0; i < d->nentries; ++i) + mtx_destroy(&d->l2tab[i].lock); + cxgb_free_mem(d); } ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_offload.c#5 (text+ko) ==== @@ -1166,7 +1166,6 @@ free(addr, M_CXGB); } - /* * Allocate and initialize the TID tables. Returns 0 on success. */ @@ -1215,6 +1214,8 @@ static void free_tid_maps(struct tid_info *t) { + mtx_destroy(&t->stid_lock); + mtx_destroy(&t->atid_lock); cxgb_free_mem(t->tid_tab); } @@ -1234,11 +1235,6 @@ rw_wunlock(&adapter_list_lock); } -/* - * XXX - */ -#define t3_free_l2t(...) - int cxgb_offload_activate(struct adapter *adapter) { @@ -1272,8 +1268,6 @@ device_printf(adapter->dev, "%s: t3_init_l2t failed\n", __FUNCTION__); goto out_free; } - - natids = min(tid_range.num / 2, MAX_ATIDS); err = init_tid_tabs(&t->tid_maps, tid_range.num, natids, stid_range.num, ATID_BASE, stid_range.base); @@ -1337,6 +1331,7 @@ T3C_DATA(tdev) = NULL; t3_free_l2t(L2DATA(tdev)); L2DATA(tdev) = NULL; + mtx_destroy(&t->tid_release_lock); free(t, M_CXGB); } From owner-p4-projects@FreeBSD.ORG Tue Feb 5 06:52:28 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B04DC16A419; Tue, 5 Feb 2008 06:52:28 +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 3EA6216A417 for ; Tue, 5 Feb 2008 06:52:28 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3022C13C43E for ; Tue, 5 Feb 2008 06:52:28 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m156qSw5003883 for ; Tue, 5 Feb 2008 06:52:28 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m156qSgL003880 for perforce@freebsd.org; Tue, 5 Feb 2008 06:52:28 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 5 Feb 2008 06:52:28 GMT Message-Id: <200802050652.m156qSgL003880@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134822 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 06:52:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=134822 Change 134822 by kmacy@kmacy:storage:toehead on 2008/02/05 06:52:13 add sysctl to dump control queue fix context fetching for tunnel queue remove redundant taskqueue shutdown Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/cxgb_sge.c#7 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_sge.c#7 (text+ko) ==== @@ -81,7 +81,8 @@ extern int cxgb_txq_buf_ring_size; int cxgb_cached_allocations; int cxgb_cached; -int cxgb_ext_freed; +int cxgb_ext_freed = 0; +int cxgb_ext_inited = 0; extern int cxgb_use_16k_clusters; extern int cxgb_pcpu_cache_enable; @@ -780,14 +781,6 @@ void t3_sge_deinit_sw(adapter_t *sc) { - int i; - - callout_drain(&sc->sge_timer_ch); - if (sc->tq) - taskqueue_drain(sc->tq, &sc->slow_intr_task); - for (i = 0; i < sc->params.nports; i++) - if (sc->port[i].tq != NULL) - taskqueue_drain(sc->port[i].tq, &sc->port[i].timer_reclaim_task); mi_deinit(); } @@ -2447,7 +2440,8 @@ bzero(cl, header_size); m = (struct mbuf *)cl; - + + cxgb_ext_inited++; SLIST_INIT(&m->m_pkthdr.tags); m->m_type = MT_DATA; m->m_flags = flags | M_NOFREE | M_EXT; @@ -2991,12 +2985,8 @@ return (err); } - -/* - * broken by recent mbuf changes - */ static int -t3_dump_txq(SYSCTL_HANDLER_ARGS) +t3_dump_txq_eth(SYSCTL_HANDLER_ARGS) { struct sge_txq *txq; struct sge_qset *qs; @@ -3025,7 +3015,7 @@ txq->txq_dump_start = 0; return (EINVAL); } - err = t3_sge_read_ecntxt(qs->port->adapter, txq->cntxt_id, data); + err = t3_sge_read_ecntxt(qs->port->adapter, qs->rspq.cntxt_id, data); if (err) return (err); @@ -3069,7 +3059,68 @@ return (err); } +static int +t3_dump_txq_ctrl(SYSCTL_HANDLER_ARGS) +{ + struct sge_txq *txq; + struct sge_qset *qs; + int i, j, err, dump_end; + static int multiplier = 1; + struct sbuf *sb; + struct tx_desc *txd; + uint32_t *WR, wr_hi, wr_lo, gen; + + txq = arg1; + qs = txq_to_qset(txq, TXQ_CTRL); + if (txq->txq_dump_count == 0) { + return (0); + } + if (txq->txq_dump_count > 256) { + log(LOG_WARNING, + "dump count is too large %d\n", txq->txq_dump_count); + txq->txq_dump_count = 1; + return (EINVAL); + } + if (txq->txq_dump_start > 255) { + log(LOG_WARNING, + "dump start of %d is greater than queue size\n", + txq->txq_dump_start); + txq->txq_dump_start = 0; + return (EINVAL); + } + +retry_sbufops: + sb = sbuf_new(NULL, NULL, QDUMP_SBUF_SIZE*multiplier, SBUF_FIXEDLEN); + sbuf_printf(sb, " qid=%d start=%d -> end=%d\n", qs->idx, + txq->txq_dump_start, + (txq->txq_dump_start + txq->txq_dump_count) & 255); + dump_end = txq->txq_dump_start + txq->txq_dump_count; + for (i = txq->txq_dump_start; i < dump_end; i++) { + txd = &txq->desc[i & (255)]; + WR = (uint32_t *)txd->flit; + wr_hi = ntohl(WR[0]); + wr_lo = ntohl(WR[1]); + gen = G_WR_GEN(wr_lo); + + sbuf_printf(sb," wr_hi %08x wr_lo %08x gen %d\n", + wr_hi, wr_lo, gen); + for (j = 2; j < 30; j += 4) + sbuf_printf(sb, "\t%08x %08x %08x %08x \n", + WR[j], WR[j + 1], WR[j + 2], WR[j + 3]); + + } + if (sbuf_overflowed(sb)) { + sbuf_delete(sb); + multiplier++; + goto retry_sbufops; + } + sbuf_finish(sb); + err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + sbuf_delete(sb); + return (err); +} + static int t3_lro_enable(SYSCTL_HANDLER_ARGS) { @@ -3194,6 +3245,10 @@ CTLFLAG_RD, &cxgb_ext_freed, 0, "#times a cluster was freed through ext_free"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, + "ext_inited", + CTLFLAG_RD, &cxgb_ext_inited, + 0, "#times a cluster was initialized for ext_free"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "mbufs_outstanding", CTLFLAG_RD, &cxgb_mbufs_outstanding, 0, "#mbufs in flight in the driver"); @@ -3243,8 +3298,8 @@ for (j = 0; j < pi->nqsets; j++) { struct sge_qset *qs = &sc->sge.qs[pi->first_qset + j]; - struct sysctl_oid *qspoid, *rspqpoid, *txqpoid; - struct sysctl_oid_list *qspoidlist, *rspqpoidlist, *txqpoidlist; + struct sysctl_oid *qspoid, *rspqpoid, *txqpoid, *ctrlqpoid; + struct sysctl_oid_list *qspoidlist, *rspqpoidlist, *txqpoidlist, *ctrlqpoidlist; struct sge_txq *txq = &qs->txq[TXQ_ETH]; snprintf(qs->namebuf, QS_NAME_LEN, "qs%d", j); @@ -3261,8 +3316,10 @@ txq_names[0], CTLFLAG_RD, NULL, "txq statistics"); txqpoidlist = SYSCTL_CHILDREN(txqpoid); - - + ctrlqpoid = SYSCTL_ADD_NODE(ctx, qspoidlist, OID_AUTO, + txq_names[2], CTLFLAG_RD, NULL, "ctrlq statistics"); + ctrlqpoidlist = SYSCTL_CHILDREN(ctrlqpoid); + SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "size", CTLFLAG_RD, &qs->rspq.size, 0, "#entries in response queue"); @@ -3285,8 +3342,7 @@ CTLTYPE_STRING | CTLFLAG_RD, &qs->rspq, 0, t3_dump_rspq, "A", "dump of the response queue"); - - + SYSCTL_ADD_INT(ctx, txqpoidlist, OID_AUTO, "dropped", CTLFLAG_RD, &qs->txq[TXQ_ETH].txq_drops, 0, "#tunneled packets dropped"); @@ -3343,7 +3399,22 @@ 0, "txq #entries to dump"); SYSCTL_ADD_PROC(ctx, txqpoidlist, OID_AUTO, "qdump", CTLTYPE_STRING | CTLFLAG_RD, &qs->txq[TXQ_ETH], - 0, t3_dump_txq, "A", "dump of the transmit queue"); + 0, t3_dump_txq_eth, "A", "dump of the transmit queue"); + + SYSCTL_ADD_UINT(ctx, ctrlqpoidlist, OID_AUTO, "dump_start", + CTLFLAG_RW, &qs->txq[TXQ_CTRL].txq_dump_start, + 0, "ctrlq start idx for dump"); + SYSCTL_ADD_UINT(ctx, ctrlqpoidlist, OID_AUTO, "dump_count", + CTLFLAG_RW, &qs->txq[TXQ_CTRL].txq_dump_count, + 0, "ctrl #entries to dump"); + SYSCTL_ADD_PROC(ctx, ctrlqpoidlist, OID_AUTO, "qdump", + CTLTYPE_STRING | CTLFLAG_RD, &qs->txq[TXQ_CTRL], + 0, t3_dump_txq_ctrl, "A", "dump of the transmit queue"); + + + + + } } } From owner-p4-projects@FreeBSD.ORG Tue Feb 5 06:53:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A5BD416A41A; Tue, 5 Feb 2008 06:53:29 +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 6AD4916A419 for ; Tue, 5 Feb 2008 06:53:29 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5D1B913C447 for ; Tue, 5 Feb 2008 06:53:29 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m156rTIO003921 for ; Tue, 5 Feb 2008 06:53:29 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m156rTcH003918 for perforce@freebsd.org; Tue, 5 Feb 2008 06:53:29 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 5 Feb 2008 06:53:29 GMT Message-Id: <200802050653.m156rTcH003918@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134823 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 06:53:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=134823 Change 134823 by kmacy@kmacy:storage:toehead on 2008/02/05 06:52:57 fix shutdown so that module unload works Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#6 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#6 (text+ko) ==== @@ -654,11 +654,7 @@ bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->msix_regs_rid, sc->msix_regs_res); } - - if (sc->tq != NULL) { - taskqueue_drain(sc->tq, &sc->ext_intr_task); - taskqueue_drain(sc->tq, &sc->tick_task); - } + t3_sge_deinit_sw(sc); /* * Wait for last callout @@ -672,8 +668,11 @@ } bus_generic_detach(sc->dev); - if (sc->tq != NULL) + if (sc->tq != NULL) { taskqueue_free(sc->tq); + sc->tq = NULL; + } + if (is_offload(sc)) { cxgb_adapter_unofld(sc); if (isset(&sc->open_device_map, OFFLOAD_DEVMAP_BIT)) @@ -682,6 +681,8 @@ printf("cxgb_free: DEVMAP_BIT not set\n"); } else printf("not offloading set\n"); + + cxgb_offload_deactivate(sc); free(sc->filters, M_DEVBUF); t3_sge_free(sc); @@ -1526,7 +1527,6 @@ static void cxgb_down_locked(struct adapter *sc) { - int i; t3_sge_stop(sc); t3_intr_disable(sc); @@ -1543,20 +1543,24 @@ sc->irq_res = NULL; } - if (sc->flags & USING_MSIX) + if (sc->flags & USING_MSIX) cxgb_teardown_msix(sc); - ADAPTER_UNLOCK(sc); - + callout_stop(&sc->cxgb_tick_ch); callout_stop(&sc->sge_timer_ch); callout_drain(&sc->cxgb_tick_ch); callout_drain(&sc->sge_timer_ch); if (sc->tq != NULL) { + printf("draining slow intr\n"); + taskqueue_drain(sc->tq, &sc->slow_intr_task); - for (i = 0; i < sc->params.nports; i++) - taskqueue_drain(sc->tq, &sc->port[i].timer_reclaim_task); + printf("draining ext intr\n"); + taskqueue_drain(sc->tq, &sc->ext_intr_task); + printf("draining tick task\n"); + taskqueue_drain(sc->tq, &sc->tick_task); } + ADAPTER_UNLOCK(sc); } static int @@ -1635,7 +1639,6 @@ cxgb_down_locked(adapter); else ADAPTER_UNLOCK(adapter); - cxgb_offload_deactivate(adapter); return (0); } @@ -1983,20 +1986,21 @@ struct port_info *p = &sc->port[i]; struct ifnet *ifp = p->ifp; - PORT_LOCK(p); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && + (ifp->if_flags & IFF_UP)) running = 1; - PORT_UNLOCK(p); } if (running == 0) return; - taskqueue_enqueue(sc->tq, &sc->tick_task); + - if (sc->open_device_map != 0) + if (sc->open_device_map != 0) { + taskqueue_enqueue(sc->tq, &sc->tick_task); callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); + } } static void From owner-p4-projects@FreeBSD.ORG Tue Feb 5 06:54:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0899616A420; Tue, 5 Feb 2008 06:54:31 +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 C250916A417 for ; Tue, 5 Feb 2008 06:54:30 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B4AAC13C442 for ; Tue, 5 Feb 2008 06:54:30 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m156sUGK003956 for ; Tue, 5 Feb 2008 06:54:30 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m156sUWj003953 for perforce@freebsd.org; Tue, 5 Feb 2008 06:54:30 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 5 Feb 2008 06:54:30 GMT Message-Id: <200802050654.m156sUWj003953@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134824 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 06:54:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=134824 Change 134824 by kmacy@kmacy:storage:toehead on 2008/02/05 06:53:46 don't proceed with tx if the intorface isn't up or the driver isn't running Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/cxgb_multiq.c#2 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_multiq.c#2 (text+ko) ==== @@ -422,13 +422,16 @@ txq = &qs->txq[TXQ_ETH]; mtx_assert(&txq->lock, MA_OWNED); - KASSERT(qs->idx == 0, ("invalid qs %d", qs->idx)); retry: if (!pi->link_config.link_ok) initerr = ENXIO; else if (qs->qs_flags & QS_EXITING) initerr = ENXIO; + else if ((pi->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + initerr = ENXIO; + else if ((pi->ifp->if_flags & IFF_UP) == 0) + initerr = ENXIO; else if (immpkt) { if (!buf_ring_empty(&txq->txq_mr)) From owner-p4-projects@FreeBSD.ORG Tue Feb 5 07:20:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BDEFC16A46B; Tue, 5 Feb 2008 07:20:13 +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 6ABA316A417 for ; Tue, 5 Feb 2008 07:20:13 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5C5F713C46E for ; Tue, 5 Feb 2008 07:20:13 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m157KD3F006969 for ; Tue, 5 Feb 2008 07:20:13 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m157KD1e006963 for perforce@freebsd.org; Tue, 5 Feb 2008 07:20:13 GMT (envelope-from jb@freebsd.org) Date: Tue, 5 Feb 2008 07:20:13 GMT Message-Id: <200802050720.m157KD1e006963@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134826 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 07:20:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=134826 Change 134826 by jb@jb_freebsd1 on 2008/02/05 07:20:02 WIP. Perforce is my backup server. :-P Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap.c#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap.c#7 (text+ko) ==== @@ -158,9 +158,7 @@ #define FASTTRAP_PID_NAME "pid" -#ifdef DOODAD -static struct callout_handle fasttrap_timeout; -#endif +static struct callout_handle fasttrap_timeout = CALLOUT_HANDLE_INITIALIZER(&fasttrap_timeout); static struct mtx fasttrap_cleanup_mtx; MTX_SYSINIT(fasttrap_cleanup_mtx, &fasttrap_cleanup_mtx, "Fasttrap cleanup", MTX_DEF); static uint_t fasttrap_cleanup_work; @@ -177,22 +175,16 @@ #define FASTTRAP_ENABLE_FAIL 1 #define FASTTRAP_ENABLE_PARTIAL 2 -#ifdef DOODAD static int fasttrap_tracepoint_enable(proc_t *, fasttrap_probe_t *, uint_t); static void fasttrap_tracepoint_disable(proc_t *, fasttrap_probe_t *, uint_t); -#endif -#ifdef DOODAD static fasttrap_provider_t *fasttrap_provider_lookup(pid_t, const char *, const dtrace_pattr_t *); -#endif static void fasttrap_provider_free(fasttrap_provider_t *); static void fasttrap_provider_retire(pid_t, const char *, int); -#ifdef DOODAD static fasttrap_proc_t *fasttrap_proc_lookup(pid_t); static void fasttrap_proc_release(fasttrap_proc_t *); -#endif #define FASTTRAP_PROVS_INDEX(pid, name) \ ((fasttrap_hash_str(name) + (pid)) & fasttrap_provs.fth_mask) @@ -264,7 +256,6 @@ #endif } -#ifdef DOODAD /* * This function ensures that no threads are actively using the memory * associated with probes that were formerly live. @@ -272,6 +263,8 @@ static void fasttrap_mod_barrier(uint64_t gen) { +printf("%s(%d): DOODAD\n",__func__,__LINE__); +#ifdef DOODAD int i; if (gen < fasttrap_mod_gen) @@ -283,10 +276,9 @@ mtx_lock(&cpu_core[i].cpuc_pid_lock); mtx_unlock(&cpu_core[i].cpuc_pid_lock); } +#endif } -#endif -#ifdef DOODAD /* * This is the timeout's callback for cleaning up the providers and their * probes. @@ -297,7 +289,7 @@ fasttrap_provider_t **fpp, *fp; fasttrap_bucket_t *bucket; dtrace_provider_id_t provid; - int i, later; + int i, later = 0; static volatile int in = 0; ASSERT(in == 0); @@ -385,19 +377,16 @@ * get a chance to do that work if and when the timeout is reenabled * (if detach fails). */ -#ifdef DOODAD - if (later > 0 && fasttrap_timeout != (struct callout_handle)1) + if (later > 0 && fasttrap_timeout.callout != (struct callout *)(uintptr_t)1) fasttrap_timeout = timeout(&fasttrap_pid_cleanup_cb, NULL, hz); else if (later > 0) fasttrap_cleanup_work = 1; else - fasttrap_timeout = 0; -#endif + fasttrap_timeout.callout = NULL; mtx_unlock(&fasttrap_cleanup_mtx); in = 0; } -#endif /* * Activates the asynchronous cleanup mechanism. @@ -405,13 +394,10 @@ static void fasttrap_pid_cleanup(void) { -printf("%s(%d): DOODAD\n",__func__,__LINE__); mtx_lock(&fasttrap_cleanup_mtx); fasttrap_cleanup_work = 1; -#ifdef DOODAD - if (fasttrap_timeout == 0) + if (fasttrap_timeout.callout == NULL) fasttrap_timeout = timeout(&fasttrap_pid_cleanup_cb, NULL, 1); -#endif mtx_unlock(&fasttrap_cleanup_mtx); } @@ -422,7 +408,11 @@ pid_t ppid = p->p_pid; int i; +#ifdef DOODAD ASSERT(curproc == p); +#else + if (curproc != p) printf("%s(%d): Warning curproc != p\n",__func__,__LINE__); +#endif /* * This would be simpler and faster if we maintained per-process @@ -477,9 +467,9 @@ /* * There are no "default" pid probes. */ +printf("%s(%d): There are no default pid probes\n",__func__,__LINE__); } -#ifdef DOODAD static int fasttrap_tracepoint_enable(proc_t *p, fasttrap_probe_t *probe, uint_t index) { @@ -497,8 +487,6 @@ ASSERT(probe->ftp_tps[index].fit_tp->ftt_pid == pid); - ASSERT(!(p->p_flag & SVFORK)); - /* * Before we make any modifications, make sure we've imposed a barrier * on the generation in which this probe was last modified. @@ -516,7 +504,9 @@ * * A tracepoint whose process is defunct is also considered defunct. */ +#ifdef DOODAD again: +#endif mtx_lock(&bucket->ftb_mtx); for (tp = bucket->ftb_data; tp != NULL; tp = tp->ftt_next) { if (tp->ftt_pid != pid || tp->ftt_pc != pc || @@ -544,17 +534,25 @@ case DTFTP_OFFSETS: case DTFTP_IS_ENABLED: id->fti_next = tp->ftt_ids; +#ifdef DOODAD membar_producer(); +#endif tp->ftt_ids = id; +#ifdef DOODAD membar_producer(); +#endif break; case DTFTP_RETURN: case DTFTP_POST_OFFSETS: id->fti_next = tp->ftt_retids; +#ifdef DOODAD membar_producer(); +#endif tp->ftt_retids = id; +#ifdef DOODAD membar_producer(); +#endif break; default: @@ -579,9 +577,13 @@ int rc = 0; new_tp->ftt_next = bucket->ftb_data; +#ifdef DOODAD membar_producer(); +#endif bucket->ftb_data = new_tp; +#ifdef DOODAD membar_producer(); +#endif mtx_unlock(&bucket->ftb_mtx); /* @@ -597,8 +599,10 @@ * Increment the count of the number of tracepoints active in * the victim process. */ +#ifdef DOODAD ASSERT(p->p_proc_flag & P_PR_LOCK); p->p_dtrace_count++; +#endif return (rc); } @@ -634,21 +638,22 @@ ASSERT(0); } +printf("%s(%d): DOODAD\n",__func__,__LINE__); +#ifdef DOODAD /* * If the ISA-dependent initialization goes to plan, go back to the * beginning and try to install this freshly made tracepoint. */ if (fasttrap_tracepoint_init(p, new_tp, pc, id->fti_ptype) == 0) goto again; +#endif new_tp->ftt_ids = NULL; new_tp->ftt_retids = NULL; return (FASTTRAP_ENABLE_FAIL); } -#endif -#ifdef DOODAD static void fasttrap_tracepoint_disable(proc_t *p, fasttrap_probe_t *probe, uint_t index) { @@ -709,7 +714,9 @@ id = *idp; *idp = id->fti_next; +#ifdef DOODAD membar_producer(); +#endif ASSERT(id->fti_probe == probe); @@ -792,8 +799,10 @@ * Decrement the count of the number of tracepoints active * in the victim process. */ +#ifdef DOODAD ASSERT(p->p_proc_flag & P_PR_LOCK); p->p_dtrace_count--; +#endif } /* @@ -808,7 +817,9 @@ } *pp = tp->ftt_next; +#ifdef DOODAD membar_producer(); +#endif mtx_unlock(&bucket->ftb_mtx); @@ -817,10 +828,8 @@ */ probe->ftp_gen = fasttrap_mod_gen; } -#endif -#ifdef DOODAD -static void +static void __unused fasttrap_enable_callbacks(void) { /* @@ -830,6 +839,8 @@ * function pointer yet. */ mtx_lock(&fasttrap_count_mtx); +printf("%s(%d): DOODAD\n",__func__,__LINE__); +#ifdef DOODAD if (fasttrap_pid_count == 0) { ASSERT(dtrace_pid_probe_ptr == NULL); ASSERT(dtrace_return_probe_ptr == NULL); @@ -838,18 +849,19 @@ } ASSERT(dtrace_pid_probe_ptr == &fasttrap_pid_probe); ASSERT(dtrace_return_probe_ptr == &fasttrap_return_probe); +#endif fasttrap_pid_count++; mtx_unlock(&fasttrap_count_mtx); } -#endif -#ifdef DOODAD -static void +static void __unused fasttrap_disable_callbacks(void) { ASSERT(MUTEX_HELD(&cpu_lock)); mtx_lock(&fasttrap_count_mtx); +printf("%s(%d): DOODAD\n",__func__,__LINE__); +#ifdef DOODAD ASSERT(fasttrap_pid_count > 0); fasttrap_pid_count--; if (fasttrap_pid_count == 0) { @@ -868,15 +880,13 @@ rw_exit(&cur->cpu_ft_lock); } } +#endif mtx_unlock(&fasttrap_count_mtx); } -#endif static void fasttrap_pid_enable(void *arg, dtrace_id_t id, void *parg) { -printf("%s(%d): DOODAD\n",__func__,__LINE__); -#ifdef DOODAD fasttrap_probe_t *probe = parg; proc_t *p; int i, rc; @@ -904,6 +914,8 @@ if (probe->ftp_prov->ftp_retired) return; +printf("%s(%d): DOODAD\n",__func__,__LINE__); +#ifdef DOODAD /* * If we can't find the process, it may be that we're in the context of * a fork in which the traced process is being born and we're copying @@ -932,6 +944,9 @@ ASSERT(!(p->p_flag & SVFORK)); mtx_unlock(&p->p_lock); +#else + p = pfind(probe->ftp_pid); +#endif /* * We have to enable the trap entry point before any user threads have @@ -965,8 +980,10 @@ i--; } +#ifdef DOODAD mtx_lock(&p->p_lock); sprunlock(p); +#endif /* * Since we're not actually enabling this probe, @@ -977,11 +994,12 @@ } } +#ifdef DOODAD mtx_lock(&p->p_lock); sprunlock(p); +#endif probe->ftp_enabled = 1; -#endif } static void @@ -1135,7 +1153,7 @@ { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, }; -static dtrace_pops_t pid_pops __unused = { +static dtrace_pops_t pid_pops = { fasttrap_pid_provide, NULL, fasttrap_pid_enable, @@ -1143,12 +1161,12 @@ NULL, NULL, fasttrap_pid_getargdesc, - fasttrap_pid_getarg, + NULL /*fasttrap_pid_getarg*/, NULL, fasttrap_pid_destroy }; -static dtrace_pops_t usdt_pops __unused = { +static dtrace_pops_t usdt_pops = { fasttrap_pid_provide, NULL, fasttrap_pid_enable, @@ -1156,12 +1174,11 @@ NULL, NULL, fasttrap_pid_getargdesc, - fasttrap_usdt_getarg, + NULL /*fasttrap_usdt_getarg*/, NULL, fasttrap_pid_destroy }; -#ifdef DOODAD static fasttrap_proc_t * fasttrap_proc_lookup(pid_t pid) { @@ -1221,9 +1238,7 @@ return (new_fprc); } -#endif -#ifdef DOODAD static void fasttrap_proc_release(fasttrap_proc_t *proc) { @@ -1270,9 +1285,7 @@ kmem_free(fprc, sizeof (fasttrap_proc_t)); } -#endif -#ifdef DOODAD /* * Lookup a fasttrap-managed provider based on its name and associated pid. * If the pattr argument is non-NULL, this function instantiates the provider @@ -1287,7 +1300,9 @@ fasttrap_bucket_t *bucket; char provname[DTRACE_PROVNAMELEN]; proc_t *p; +#ifdef DOODAD cred_t *cred; +#endif ASSERT(strlen(name) < sizeof (fp->ftp_name)); ASSERT(pattr != NULL); @@ -1313,6 +1328,7 @@ */ mtx_unlock(&bucket->ftb_mtx); +#ifdef DOODAD /* * Make sure the process exists, isn't a child created as the result * of a vfork(2), and isn't a zombie (but may be in fork). @@ -1345,6 +1361,9 @@ cred = p->p_cred; mtx_unlock(&p->p_crlock); mtx_unlock(&p->p_lock); +#else + p = pfind(pid); +#endif new_fp = kmem_zalloc(sizeof (fasttrap_provider_t), KM_SLEEP); new_fp->ftp_pid = pid; @@ -1364,7 +1383,9 @@ mtx_lock(&fp->ftp_mtx); mtx_unlock(&bucket->ftb_mtx); fasttrap_provider_free(new_fp); +#ifdef DOODAD crfree(cred); +#endif return (fp); } } @@ -1378,15 +1399,19 @@ * the full provider name -- we keep it in pieces in the provider * structure. */ +printf("%s(%d): provname '%s%u'\n", __func__, __LINE__, name, (uint_t)pid); if (snprintf(provname, sizeof (provname), "%s%u", name, (uint_t)pid) >= sizeof (provname) || dtrace_register(provname, pattr, - DTRACE_PRIV_PROC | DTRACE_PRIV_OWNER | DTRACE_PRIV_ZONEOWNER, cred, + DTRACE_PRIV_PROC | DTRACE_PRIV_OWNER | DTRACE_PRIV_ZONEOWNER, NULL /*cred*/, pattr == &pid_attr ? &pid_pops : &usdt_pops, new_fp, &new_fp->ftp_provid) != 0) { +printf("%s(%d): could not register!\n",__func__,__LINE__); mtx_unlock(&bucket->ftb_mtx); fasttrap_provider_free(new_fp); +#ifdef DOODAD crfree(cred); +#endif return (NULL); } @@ -1396,10 +1421,11 @@ mtx_lock(&new_fp->ftp_mtx); mtx_unlock(&bucket->ftb_mtx); +#ifdef DOODAD crfree(cred); +#endif return (new_fp); } -#endif static void fasttrap_provider_free(fasttrap_provider_t *provider) @@ -1408,6 +1434,7 @@ #ifdef DOODAD pid_t pid = provider->ftp_pid; proc_t *p; +#endif /* * There need to be no associated enabled probes, no consumers @@ -1421,6 +1448,7 @@ kmem_free(provider, sizeof (fasttrap_provider_t)); +#ifdef DOODAD /* * Decrement p_dtrace_probes on the process whose provider we're * freeing. We don't have to worry about clobbering somone else's @@ -1506,25 +1534,20 @@ fasttrap_pid_cleanup(); } -#ifdef DOODAD -static int +static int __unused fasttrap_uint32_cmp(const void *ap, const void *bp) { return (*(const uint32_t *)ap - *(const uint32_t *)bp); } -#endif -#ifdef DOODAD static int fasttrap_uint64_cmp(const void *ap, const void *bp) { return (*(const uint64_t *)ap - *(const uint64_t *)bp); } -#endif -#ifdef DOODAD -static int -fasttrap_add_probe(fasttrap_probe_spec_t *pdata) +static int __unused +fasttrap_add_probe (fasttrap_probe_spec_t *pdata) { fasttrap_provider_t *provider; fasttrap_probe_t *pp; @@ -1704,13 +1727,10 @@ return (ENOMEM); } -#endif static void * fasttrap_meta_provide(void *arg, dtrace_helper_provdesc_t *dhpv, pid_t pid) { -printf("%s(%d): DOODAD\n",__func__,__LINE__); -#ifdef DOODAD fasttrap_provider_t *provider; /* @@ -1720,8 +1740,7 @@ */ if (strlen(dhpv->dthpv_provname) + 10 >= sizeof (provider->ftp_name)) { - cmn_err(CE_WARN, "failed to instantiate provider %s: " - "name too long to accomodate pid", dhpv->dthpv_provname); + printf("failed to instantiate provider %s: name too long to accomodate pid\n", dhpv->dthpv_provname); return (NULL); } @@ -1729,8 +1748,7 @@ * Don't let folks spoof the true pid provider. */ if (strcmp(dhpv->dthpv_provname, FASTTRAP_PID_NAME) == 0) { - cmn_err(CE_WARN, "failed to instantiate provider %s: " - "%s is an invalid name", dhpv->dthpv_provname, + printf("failed to instantiate provider %s: %s is an invalid name\n", dhpv->dthpv_provname, FASTTRAP_PID_NAME); return (NULL); } @@ -1752,8 +1770,7 @@ if ((provider = fasttrap_provider_lookup(pid, dhpv->dthpv_provname, &dhpv->dthpv_pattr)) == NULL) { - cmn_err(CE_WARN, "failed to instantiate provider %s for " - "process %u", dhpv->dthpv_provname, (uint_t)pid); + printf("failed to instantiate provider %s for process %u\n", dhpv->dthpv_provname, (uint_t)pid); return (NULL); } @@ -1766,8 +1783,6 @@ mtx_unlock(&provider->ftp_mtx); return (provider); -#endif - return (NULL); } static void @@ -2000,10 +2015,8 @@ { int error = 0; int i, fail = 0; + struct callout_handle tmp; -#ifdef DOODAD - struct callout_handle tmp; -#endif /* Reset our calback hooks. */ dtrace_fasttrap_fork = NULL; dtrace_fasttrap_exec = NULL; @@ -2020,8 +2033,6 @@ dtrace_meta_unregister(fasttrap_meta_id) != 0) return (ENOENT); -printf("%s(%d): DOODAD\n",__func__,__LINE__); -#ifdef DOODAD /* * Prevent any new timeouts from running by setting fasttrap_timeout * to a non-zero value, and wait for the current timeout to complete. @@ -2029,20 +2040,19 @@ mtx_lock(&fasttrap_cleanup_mtx); fasttrap_cleanup_work = 0; - while (fasttrap_timeout != (struct callout_handle)1) { + while (fasttrap_timeout.callout != (struct callout *)(uintptr_t)1) { tmp = fasttrap_timeout; - fasttrap_timeout = (struct callout_handle)1; + fasttrap_timeout.callout = (struct callout *)(uintptr_t)1; - if (tmp != 0) { + if (tmp.callout != NULL) { mtx_unlock(&fasttrap_cleanup_mtx); - (void) untimeout(tmp); + (void) untimeout(&fasttrap_pid_cleanup_cb, NULL, tmp); mtx_lock(&fasttrap_cleanup_mtx); } } fasttrap_cleanup_work = 0; mtx_unlock(&fasttrap_cleanup_mtx); -#endif /* * Iterate over all of our providers. If there's still a process @@ -2085,9 +2095,7 @@ * we've been unsuccessfully trying to detach. */ mtx_lock(&fasttrap_cleanup_mtx); -#ifdef DOODAD - fasttrap_timeout = 0; -#endif + fasttrap_timeout.callout = NULL; work = fasttrap_cleanup_work; mtx_unlock(&fasttrap_cleanup_mtx); From owner-p4-projects@FreeBSD.ORG Tue Feb 5 07:31:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D52D416A418; Tue, 5 Feb 2008 07:31:58 +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 99CDC16A468; Tue, 5 Feb 2008 07:31:58 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 5FF2413C46A; Tue, 5 Feb 2008 07:31:58 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 816C51CC0C; Tue, 5 Feb 2008 08:31:31 +0100 (CET) Date: Tue, 5 Feb 2008 08:31:31 +0100 From: Ed Schouten To: "M. Warner Losh" Message-ID: <20080205073131.GR1179@hoeg.nl> References: <200802040843.m148htF0037992@repoman.freebsd.org> <20080204.134930.-1350498280.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2/Dpz40iF3jpiHxF" Content-Disposition: inline In-Reply-To: <20080204.134930.-1350498280.imp@bsdimp.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: rrs@freebsd.org, perforce@freebsd.org Subject: Re: PERFORCE change 134769 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 07:31:59 -0000 --2/Dpz40iF3jpiHxF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * M. Warner Losh wrote: > I don't think you want this change. it is wrong because we don't > support ISA_MIPS64's notion of 64-bit registers correctly. Just tracking the commits a little; you mean that the MIPS port doesn't yet support 64 bits registers in the CPU context switching code? --=20 Ed Schouten WWW: http://g-rave.nl/ --2/Dpz40iF3jpiHxF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkeoENMACgkQ52SDGA2eCwXufgCfc02cNwQ4COncJKtujQW0r6Q5 PX4AmgIZic6mkiU03oTOBPsWBQiWqM2J =ul6g -----END PGP SIGNATURE----- --2/Dpz40iF3jpiHxF-- From owner-p4-projects@FreeBSD.ORG Tue Feb 5 07:39:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0EC0D16A41A; Tue, 5 Feb 2008 07:39:37 +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 9754D16A418 for ; Tue, 5 Feb 2008 07:39:36 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8467713C458 for ; Tue, 5 Feb 2008 07:39:36 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m157daVm007604 for ; Tue, 5 Feb 2008 07:39:36 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m157da2Q007601 for perforce@freebsd.org; Tue, 5 Feb 2008 07:39:36 GMT (envelope-from jb@freebsd.org) Date: Tue, 5 Feb 2008 07:39:36 GMT Message-Id: <200802050739.m157da2Q007601@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134827 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 07:39:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=134827 Change 134827 by jb@jb_freebsd1 on 2008/02/05 07:38:56 The DTrace tracemem() action has the disadvantage that the size argument must be a constant, so it's not terribly useful when trying to trace memory which varies in size. I have bumped into this problem so often that I decided I needed to actually extend Sun's DTrace design to do something more convenient for dumping memory. Another problem with tracemem() is that it uses dt_print_bytes() which tries to be clever and recognise text and 4 and 8 byte integers. What I _really_ want to to dump memory in hex. I just can't recognise 8 byte integers output in decimal when I _really_ want to see each byte. And to have to specify _exactly_ the memory length when I write the D script is really, _really_, *REALLY* annoying. Part of the problem is that DIF executed with each action is only capable of returning a single 64-bit value. To implement a variable length memory trace, I really need to return a memory address _and_ a size (or length). To work around the DIF emulation return variable limitation, introduce a 'memref' subroutine to combine the address and length into a 'memref' variable allocated in scratch space and return a pointer to that as the single return value. Then, when back in the action execution code for PRINTM, unravel the 'memref' to get the size and adjust the variables so that the BYREF code uses the size obtained from the DIF code as well as the address. We still have to specify the size in the printm() action because the enabling control block code wants to know what buffer size it requires up-front, presumable to avoid having to check for buffer overrun while executing the actions. So... the new action is: printm(size_t, uint64_t *) where the size_t *must* be a constant. This allocates the maximum buffer space we reserve. In the event that the traced memory is shorter than this value, we just waste the space. The second argument to printm() is the 'memref' which is a double uint64_t value (array) containing the memory address as the first entry and the size as the second entry. To trace a variable length memory buffer: printf(512, memref(ptr, len)); where 512 is the maximum buffer length we'll accept; ptr is a pointer to the memory we are tracing; and len is the length of memory we want to trace. Both 'ptr' and 'len' are the result of a DIF expression. If the memory address is in user space, then it's a little bit more obscure: printm(512, memref(copyin(addr, len), len)); where 'addr' is the address in user space. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cc.c#9 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#11 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h#5 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_impl.h#19 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#23 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#32 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#33 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cc.c#9 (text) ==== @@ -949,6 +949,37 @@ } static void +dt_action_printm(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) +{ + dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp); + + dt_node_t *size = dnp->dn_args; + dt_node_t *addr = dnp->dn_args->dn_list; + + char n[DT_TYPE_NAMELEN]; + + if (dt_node_is_posconst(size) == 0) { + dnerror(size, D_PRINTM_SIZE, "printm( ) argument #1 must " + "be a non-zero positive integral constant expression\n"); + } + + if (dt_node_is_pointer(addr) == 0) { + dnerror(addr, D_PRINTM_ADDR, + "tracemem( ) argument #2 is incompatible with " + "prototype:\n\tprototype: integer\n" + "\t argument: %s\n", + dt_node_type_name(addr, n, sizeof (n))); + } + + dt_cg(yypcb, addr); + ap->dtad_difo = dt_as(yypcb); + ap->dtad_kind = DTRACEACT_PRINTM; + + ap->dtad_difo->dtdo_rtype.dtdt_flags |= DIF_TF_BYREF; + ap->dtad_difo->dtdo_rtype.dtdt_size = size->dn_value + sizeof(uint64_t); +} + +static void dt_action_commit(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) { dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp); @@ -1014,6 +1045,9 @@ case DT_ACT_PRINTF: dt_action_printflike(dtp, dnp->dn_expr, sdp, DTRACEACT_PRINTF); break; + case DT_ACT_PRINTM: + dt_action_printm(dtp, dnp->dn_expr, sdp); + break; case DT_ACT_RAISE: dt_action_raise(dtp, dnp->dn_expr, sdp); break; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#11 (text) ==== @@ -375,7 +375,7 @@ /*ARGSUSED*/ int dt_print_bytes(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, - size_t nbytes, int width, int quiet) + size_t nbytes, int width, int quiet, int raw) { /* * If the byte stream is a series of printable characters, followed by @@ -388,7 +388,7 @@ if (nbytes == 0) return (0); - if (dtp->dt_options[DTRACEOPT_RAWBYTES] != DTRACEOPT_UNSET) + if (raw || dtp->dt_options[DTRACEOPT_RAWBYTES] != DTRACEOPT_UNSET) goto raw; for (i = 0; i < nbytes; i++) { @@ -797,6 +797,16 @@ #endif } +int +dt_print_memory(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr) +{ + int quiet = (dtp->dt_options[DTRACEOPT_QUIET] != DTRACEOPT_UNSET); + size_t nbytes = *((uint64_t *) addr); + + return (dt_print_bytes(dtp, fp, addr + sizeof(uint64_t), + nbytes, 50, quiet, 1)); +} + static int dt_print_sym(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr) { @@ -1113,7 +1123,7 @@ (uint32_t)normal); break; default: - err = dt_print_bytes(dtp, fp, addr, size, 50, 0); + err = dt_print_bytes(dtp, fp, addr, size, 50, 0, 0); break; } @@ -1488,6 +1498,12 @@ goto nextrec; } + if (act == DTRACEACT_PRINTM) { + if (dt_print_memory(dtp, fp, addr) < 0) + return (-1); + goto nextrec; + } + if (DTRACEACT_ISPRINTFLIKE(act)) { void *fmtdata; int (*func)(dtrace_hdl_t *, FILE *, void *, @@ -1618,7 +1634,7 @@ break; default: n = dt_print_bytes(dtp, fp, addr, - rec->dtrd_size, 33, quiet); + rec->dtrd_size, 33, quiet, 0); break; } ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h#5 (text) ==== @@ -235,7 +235,9 @@ D_FREOPEN_INVALID, /* frename() filename is invalid */ D_LQUANT_MATCHBASE, /* lquantize() mismatch on base */ D_LQUANT_MATCHLIM, /* lquantize() mismatch on limit */ - D_LQUANT_MATCHSTEP /* lquantize() mismatch on step */ + D_LQUANT_MATCHSTEP, /* lquantize() mismatch on step */ + D_PRINTM_ADDR, /* printm() address bad type */ + D_PRINTM_SIZE /* printm() size bad type */ } dt_errtag_t; extern const char *dt_errtag(dt_errtag_t); ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_impl.h#19 (text) ==== @@ -430,6 +430,7 @@ #define DT_ACT_UMOD DT_ACT(26) /* umod() action */ #define DT_ACT_UADDR DT_ACT(27) /* uaddr() action */ #define DT_ACT_SETOPT DT_ACT(28) /* setopt() action */ +#define DT_ACT_PRINTM DT_ACT(29) /* printm() action */ /* * Sentinel to tell freopen() to restore the saved stdout. This must not ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#23 (text) ==== @@ -272,6 +272,8 @@ &dt_idops_func, "void(@, int32_t, int32_t, ...)" }, { "max", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MAX, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@)" }, +{ "memref", DT_IDENT_FUNC, 0, DIF_SUBR_MEMREF, DT_ATTR_STABCMN, DT_VERS_1_1, + &dt_idops_func, "uint64_t *(void *, size_t)" }, { "min", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MIN, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@)" }, { "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN, @@ -312,6 +314,8 @@ &dt_idops_func, "void(@, ...)" }, { "printf", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTF, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@, ...)" }, +{ "printm", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTM, DT_ATTR_STABCMN, DT_VERS_1_0, + &dt_idops_func, "void(size_t, uint64_t *)" }, { "probefunc", DT_IDENT_SCALAR, 0, DIF_VAR_PROBEFUNC, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" }, { "probemod", DT_IDENT_SCALAR, 0, DIF_VAR_PROBEMOD, ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#32 (text) ==== @@ -4493,7 +4493,35 @@ break; } + case DIF_SUBR_MEMREF: { + uint64_t size = 2 * sizeof(uint64_t); + uint64_t *memref = (uint64_t *) P2ROUNDUP(mstate->dtms_scratch_ptr, 8); + size_t scratch_size = ((uintptr_t) memref - mstate->dtms_scratch_ptr) + size; + + /* address and length */ + memref[0] = tupregs[0].dttk_value; + memref[1] = tupregs[1].dttk_value; + + regs[rd] = (uintptr_t) memref; + mstate->dtms_scratch_ptr += scratch_size; + break; } + + case DIF_SUBR_TYPEREF: { + uint64_t size = 3 * sizeof(uint64_t); + uint64_t *typeref = (uint64_t *) P2ROUNDUP(mstate->dtms_scratch_ptr, 8); + size_t scratch_size = ((uintptr_t) typeref - mstate->dtms_scratch_ptr) + size; + + /* type, length and address */ + typeref[0] = tupregs[0].dttk_value; + typeref[1] = tupregs[1].dttk_value; + typeref[2] = tupregs[2].dttk_value; + + regs[rd] = (uintptr_t) typeref; + mstate->dtms_scratch_ptr += scratch_size; + break; + } + } } /* @@ -5997,6 +6025,43 @@ ecb->dte_epid); continue; + case DTRACEACT_PRINTM: { + /* The DIF returns a 'memref'. */ + uint64_t *memref = (uint64_t *) val; + + /* Get the size from the memref. */ + size = memref[1]; + + /* + * Check if the size exceeds the allocated + * buffer size. + */ + if (size + sizeof(uint64_t) > dp->dtdo_rtype.dtdt_size) { + /* Flag a drop! */ + *flags |= CPU_DTRACE_DROP; + continue; + } + + /* Store the size in the buffer first. */ + DTRACE_STORE(uint64_t, tomax, + valoffs, size); + + /* + * Offset the buffer address to the start + * of the data. + */ + valoffs += sizeof(uint64_t); + + /* + * Reset to the memory address rather than + * the memref array, then let the BYREF + * code below do the work to store the + * memory data in the buffer. + */ + val = memref[0]; + break; + } + case DTRACEACT_CHILL: if (dtrace_priv_kernel_destructive(state)) dtrace_action_chill(&mstate, val); @@ -8515,7 +8580,9 @@ subr == DIF_SUBR_HTONLL || subr == DIF_SUBR_NTOHS || subr == DIF_SUBR_NTOHL || - subr == DIF_SUBR_NTOHLL) + subr == DIF_SUBR_NTOHLL || + subr == DIF_SUBR_MEMREF || + subr == DIF_SUBR_TYPEREF) break; err += efunc(pc, "invalid subr %u\n", subr); @@ -9787,6 +9854,10 @@ state->dts_speculates = 1; break; + case DTRACEACT_PRINTM: + size = dp->dtdo_rtype.dtdt_size; + break; + case DTRACEACT_COMMIT: { dtrace_action_t *act = ecb->dte_action; ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#33 (text) ==== @@ -295,8 +295,10 @@ #define DIF_SUBR_INET_NTOP 41 #define DIF_SUBR_INET_NTOA 42 #define DIF_SUBR_INET_NTOA6 43 +#define DIF_SUBR_MEMREF 44 +#define DIF_SUBR_TYPEREF 45 -#define DIF_SUBR_MAX 43 /* max subroutine value */ +#define DIF_SUBR_MAX 45 /* max subroutine value */ typedef uint32_t dif_instr_t; @@ -405,6 +407,7 @@ #define DTRACEACT_PRINTF 3 /* printf() action */ #define DTRACEACT_PRINTA 4 /* printa() action */ #define DTRACEACT_LIBACT 5 /* library-controlled action */ +#define DTRACEACT_PRINTM 6 /* printm() action */ #define DTRACEACT_PROC 0x0100 #define DTRACEACT_USTACK (DTRACEACT_PROC + 1) From owner-p4-projects@FreeBSD.ORG Tue Feb 5 08:16:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 65FE116A469; Tue, 5 Feb 2008 08:16:19 +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 264BD16A417 for ; Tue, 5 Feb 2008 08:16:18 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9118613C442 for ; Tue, 5 Feb 2008 08:16:18 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m158GIBg011090 for ; Tue, 5 Feb 2008 08:16:18 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m158GHA9011087 for perforce@freebsd.org; Tue, 5 Feb 2008 08:16:17 GMT (envelope-from jb@freebsd.org) Date: Tue, 5 Feb 2008 08:16:17 GMT Message-Id: <200802050816.m158GHA9011087@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134828 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 08:16:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=134828 Change 134828 by jb@jb_freebsd1 on 2008/02/05 08:15:38 Super Tuesday IFC. Affected files ... .. //depot/projects/dtrace/doc/el_GR.ISO8859-7/books/faq/book.sgml#3 integrate .. //depot/projects/dtrace/doc/el_GR.ISO8859-7/books/handbook/linuxemu/chapter.sgml#3 integrate .. //depot/projects/dtrace/doc/el_GR.ISO8859-7/books/handbook/users/chapter.sgml#4 integrate .. //depot/projects/dtrace/doc/el_GR.ISO8859-7/books/handbook/x11/chapter.sgml#4 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#61 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/portbuild/article.sgml#10 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/problem-reports/article.sgml#5 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/relaydelay/article.sgml#4 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/developers-handbook/tools/chapter.sgml#4 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml#7 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml#6 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/security/chapter.sgml#21 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#56 integrate .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/articles/Makefile#6 integrate .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/articles/version-guide/Makefile#1 branch .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/articles/version-guide/article.sgml#1 branch .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/flyer/flyer.tex#3 integrate .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/Makefile#6 integrate .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/book.sgml#5 integrate .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/chapters.ent#4 integrate .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/firewalls/Makefile#1 branch .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/firewalls/chapter.sgml#1 branch .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/security/chapter.sgml#7 integrate .. //depot/projects/dtrace/doc/mn_MN.UTF-8/books/handbook/linuxemu/chapter.sgml#2 integrate .. //depot/projects/dtrace/doc/mn_MN.UTF-8/books/handbook/ppp-and-slip/chapter.sgml#2 integrate .. //depot/projects/dtrace/doc/mn_MN.UTF-8/books/handbook/security/chapter.sgml#5 integrate .. //depot/projects/dtrace/doc/zh_CN.GB2312/books/arch-handbook/jail/chapter.sgml#5 integrate .. //depot/projects/dtrace/ports/UPDATING#51 integrate .. //depot/projects/dtrace/src/etc/periodic/security/100.chksetuid#6 integrate .. //depot/projects/dtrace/src/include/pthread_np.h#8 integrate .. //depot/projects/dtrace/src/lib/libc/net/getaddrinfo.c#8 integrate .. //depot/projects/dtrace/src/lib/libc/sys/sendfile.2#5 integrate .. //depot/projects/dtrace/src/lib/libelf/gelf_fsize.3#4 integrate .. //depot/projects/dtrace/src/lib/libpmc/pmc.3#7 integrate .. //depot/projects/dtrace/src/lib/librpcsvc/Makefile#4 integrate .. //depot/projects/dtrace/src/lib/librpcsvc/xcrypt.c#4 integrate .. //depot/projects/dtrace/src/lib/libthr/pthread.map#10 integrate .. //depot/projects/dtrace/src/lib/libthr/thread/thr_mutex.c#17 integrate .. //depot/projects/dtrace/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#5 integrate .. //depot/projects/dtrace/src/release/doc/share/misc/dev.archlist.txt#16 integrate .. //depot/projects/dtrace/src/sbin/geom/core/geom.c#7 integrate .. //depot/projects/dtrace/src/sbin/ifconfig/ifieee80211.c#10 integrate .. //depot/projects/dtrace/src/sbin/mount/mount.c#11 integrate .. //depot/projects/dtrace/src/sbin/natd/natd.8#7 integrate .. //depot/projects/dtrace/src/share/colldef/el_GR.ISO8859-7.src#4 integrate .. //depot/projects/dtrace/src/share/man/man4/Makefile#29 integrate .. //depot/projects/dtrace/src/share/man/man4/hptiop.4#2 integrate .. //depot/projects/dtrace/src/share/man/man4/rr232x.4#4 delete .. //depot/projects/dtrace/src/share/mk/bsd.dep.mk#4 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/identcpu.c#10 integrate .. //depot/projects/dtrace/src/sys/amd64/conf/GENERIC#32 integrate .. //depot/projects/dtrace/src/sys/amd64/conf/NOTES#15 integrate .. //depot/projects/dtrace/src/sys/amd64/include/specialreg.h#10 integrate .. //depot/projects/dtrace/src/sys/conf/files.amd64#26 integrate .. //depot/projects/dtrace/src/sys/conf/files.i386#31 integrate .. //depot/projects/dtrace/src/sys/dev/hptiop/hptiop.c#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptiop/hptiop.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/ral/rt2560.c#11 integrate .. //depot/projects/dtrace/src/sys/dev/ral/rt2560reg.h#4 integrate .. //depot/projects/dtrace/src/sys/dev/ral/rt2560var.h#5 integrate .. //depot/projects/dtrace/src/sys/dev/rr232x/LICENSE#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/README#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/amd64-elf.rr232x_lib.o.uu#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/array.h#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/him.h#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/himfuncs.h#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/hptintf.h#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/i386-elf.rr232x_lib.o.uu#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/ldm.h#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/list.h#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/os_bsd.c#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/os_bsd.h#6 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/osm.h#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/osm_bsd.c#5 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/rr232x_config.c#3 delete .. //depot/projects/dtrace/src/sys/dev/rr232x/rr232x_config.h#3 delete .. //depot/projects/dtrace/src/sys/i386/conf/GENERIC#29 integrate .. //depot/projects/dtrace/src/sys/i386/conf/NOTES#18 integrate .. //depot/projects/dtrace/src/sys/ia64/ia64/locore.S#5 integrate .. //depot/projects/dtrace/src/sys/ia64/ia64/machdep.c#14 integrate .. //depot/projects/dtrace/src/sys/ia64/include/md_var.h#5 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_sockbuf.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_socket.c#20 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_syscalls.c#24 integrate .. //depot/projects/dtrace/src/sys/modules/Makefile#36 integrate .. //depot/projects/dtrace/src/sys/modules/rr232x/Makefile#4 delete .. //depot/projects/dtrace/src/sys/net80211/ieee80211_input.c#11 integrate .. //depot/projects/dtrace/src/sys/netgraph/netflow/ng_netflow.c#7 integrate .. //depot/projects/dtrace/src/sys/netgraph/ng_bpf.c#6 integrate .. //depot/projects/dtrace/src/sys/netgraph/ng_tee.c#4 integrate .. //depot/projects/dtrace/src/sys/sys/socket.h#10 integrate .. //depot/projects/dtrace/src/sys/sys/socketvar.h#9 integrate .. //depot/projects/dtrace/src/tools/regression/pthread/mutex_islocked_np/Makefile#1 branch .. //depot/projects/dtrace/src/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c#1 branch .. //depot/projects/dtrace/src/usr.bin/kdump/Makefile#5 integrate .. //depot/projects/dtrace/src/usr.bin/kdump/mkioctls#5 integrate .. //depot/projects/dtrace/src/usr.bin/kdump/mksubr#7 integrate .. //depot/projects/dtrace/src/usr.bin/truss/Makefile#5 integrate .. //depot/projects/dtrace/src/usr.sbin/ypserv/yp_main.c#4 integrate .. //depot/projects/dtrace/src/usr.sbin/ypserv/ypserv.8#4 integrate .. //depot/projects/dtrace/www/de/administration.sgml#4 integrate .. //depot/projects/dtrace/www/de/community.sgml#5 integrate .. //depot/projects/dtrace/www/de/developers.sgml#7 integrate .. //depot/projects/dtrace/www/de/news/2006/Makefile#1 branch .. //depot/projects/dtrace/www/de/news/2006/news.xml#1 branch .. //depot/projects/dtrace/www/de/news/2006/press.xml#1 branch .. //depot/projects/dtrace/www/de/news/Makefile#6 integrate .. //depot/projects/dtrace/www/de/security/security.sgml#12 integrate .. //depot/projects/dtrace/www/de/share/sgml/header.l10n.ent#6 integrate .. //depot/projects/dtrace/www/de/share/sgml/libcommon.xsl#5 integrate .. //depot/projects/dtrace/www/de/share/sgml/news.xml#17 integrate .. //depot/projects/dtrace/www/de/share/sgml/press.xml#15 integrate .. //depot/projects/dtrace/www/en/marketing/index.sgml#5 integrate .. //depot/projects/dtrace/www/en/releases/6.3R/errata.html#2 integrate .. //depot/projects/dtrace/www/fr/copyright/freebsd-doc-license.sgml#5 integrate .. //depot/projects/dtrace/www/fr/copyright/freebsd-license.sgml#5 integrate Differences ... ==== //depot/projects/dtrace/doc/el_GR.ISO8859-7/books/faq/book.sgml#3 (text+ko) ==== @@ -21,7 +21,7 @@ Ç ÏìÜäá Ôåêìçñßùóçò ôïõ &os; - $FreeBSD: doc/el_GR.ISO8859-7/books/faq/book.sgml,v 1.2 2008/01/22 07:44:13 keramida Exp $ + $FreeBSD: doc/el_GR.ISO8859-7/books/faq/book.sgml,v 1.4 2008/02/03 02:34:48 keramida Exp $ 1995 @@ -1212,20 +1212,21 @@ - Which file do I download to get FreeBSD? + Ðïéï áñ÷åßï ðñÝðåé íá êáôåâÜóù ãéá íá ðÜñù ôï &os;; - You need three floppy images: + ×ñåéÜæåóôå ôñßá images (åéêüíåò) äéóêåôþí: floppies/boot.flp, - floppies/kern1.flp, and - floppies/kern2.flp. These images need to - be copied onto floppies by tools like - fdimage or &man.dd.1;. + floppies/kern1.flp, êáé + floppies/kern2.flp. Ôá images áõôÜ ðñÝðåé íá + íá ôá ãñÜøåôå óå äéóêÝôåò ÷ñçóéìïðïéþíôáò êÜðïéï åñãáëåßï üðùò ôï + fdimage Þ ôï &man.dd.1;. - If you need to download the distributions yourself (for a - DOS filesystem install, for instance), below are some - recommendations for distributions to grab: + Áí ðñÝðåé íá êáôåâÜóåôå ìüíïé óáò ôá óåô äéáíïìþí + (distributions) (ãéá ðáñÜäåéãìá ãéá ìéá åãêáôÜóôáóç ìÝóù óõóôÞìáôïò + áñ÷åßùí DOS), èá âñåßôå ðáñáêÜôù ìåñéêÝò óõóôÜóåéò ó÷åôéêÜ ìå ôï + ðïéåò äéáíïìÝò íá êáôåâÜóåôå: @@ -1251,61 +1252,69 @@ - Full instructions on this procedure and a little bit more - about installation issues in general can be found in the - Handbook entry on - installing FreeBSD. + ÐëÞñåéò ïäçãßåò ó÷åôéêÜ ìå ôç äéáäéêáóßá êáèùò êáé + ðåñéóóüôåñåò ðëçñïöïñßåò ó÷åôéêÜ ìå ãåíéêÜ ðñïâëÞìáôá êáôÜ ôçí + åãêáôÜóôáóç ìðïñåßôå íá âñåßôå óôï + ÊåöÜëáéï ôïõ + Åã÷åéñéäßïõ ó÷åôéêÜ ìå ôçí åãêáôÜóôáóç ôïõ &os;. - What do I do if the floppy images does not fit on a single - floppy? + Ôé ìðïñþ íá êÜíù áí ôï image ôçò äéóêÝôáò äåí ÷ùñÜåé óå ìéá + ìüíï äéóêÝôá; - A 3.5 inch (1.44MB) floppy can accommodate 1474560 bytes - of data. The boot image is exactly 1474560 bytes in size. + Ìéá äéóêÝôá ôùí 3.5 éíôóþí (1.44MB) ìðïñåß íá ÷ùñÝóåé ùò + 1474560 bytes äåäïìÝíùí. Ôï áñ÷åßï image ôçò äéóêÝôáò åêêßíçóçò + åßíáé áêñéâþò áõôü ôï ìÝãåèïò. - Common mistakes when preparing the boot floppy are: + ÓõíçèéóìÝíá ëÜèç êáôÜ ôçí ðñïåôïéìáóßá ôçò äéóêÝôáò + åêêßíçóçò: - Not downloading the floppy image in - binary mode when using - FTP. + ÊáôÝâáóìá ôçò äéóêÝôáò ÷ùñßò ôç ÷ñÞóç ôïõ + äõáäéêïý (binary) ôñüðïõ üôáí + ÷ñçóéìïðïéåßôáé åîõðçñåôçôÞò FTP. - Some FTP clients default their transfer mode to - ascii and attempt to change any - end-of-line characters received to match the conventions - used by the client's system. This will almost invariably - corrupt the boot image. Check the size of the downloaded - boot image: if it is not exactly that - on the server, then the download process is suspect. + ÊÜðïéá ðñïãñÜììáôá-ðåëÜôåò ãéá FTP, ÷ñçóéìïðïéïýí áðü + ðñïåðéëïãÞ ôïí ascii (êåéìÝíïõ) ôñüðï + ìåôáöïñÜò äåäïìÝíùí êáé ðñïóðáèïýí íá áëëÜîïõí ôïõò ÷áñáêôÞñåò + ôÝëïõò ãñáììÞò þóôå íá ôáéñéÜæïõí ìå ôéò óõìâÜóåéò ðïõ + ÷ñçóéìïðïéïýíôáé áðü ôï óýóôçìá óôï ïðïßï ãßíåôáé ç ëÞøç. + Áõôü ó÷åäüí óßãïõñá èá êáôáóôñÝøåé ôçí åéêüíá åêêßíçóçò. + ¸ëåãîôå ôï ìÝãåèïò ôïõ image åêêßíçóçò ðïõ êáôåâÜóáôå: Áí äåí + åßíáé áêñéâþò áõôü ðïõ öáßíåôáé óôïí + åîõðçñåôçôÞ, ç äéáäéêáóßá ôïõ êáôåâÜóìáôïò èá ðñÝðåé íá + èåùñåßôáé ýðïðôç. - To workaround: type binary at the - FTP command prompt after getting connected to the server - and before starting the download of the image. + Ãéá íá ðáñáêÜìøåôå ôï ðñüâëçìá: ãñÜøôå + binary óôçí ãñáììÞ åíôïëþí ôïõ FTP, ìåôÜ + ðïõ èá óõíäåèåßôå óôïí åîõðçñåôçôÞ êáé ðñéí îåêéíÞóåôå íá + êáôåâÜæåôå ôï image. - Using the DOS copy command (or - equivalent GUI tool) to transfer the boot image to - floppy. + ×ñÞóç ôçò åíôïëÞò copy ôïõ DOS (ç + áíôßóôïé÷ïõ ãñáöéêïý åñãáëåßïõ) ãéá ôç ìåôáöïñÜ ôïõ áñ÷åßïõ + image óôç äéóêÝôá. - Programs like copy will not work as - the boot image has been created to be booted into directly. - The image has the complete content of the floppy, track for - track, and is not meant to be placed on the floppy as a - regular file. You have to transfer it to the floppy - raw, using the low-level tools (e.g. - fdimage or rawrite) - described in the installation guide to - FreeBSD. + ÐñïãñÜììáôá üðùò ôï copy äåí èá + ëåéôïõñãÞóïõí óùóôÜ êáèþò ôï image åêêßíçóçò Ý÷åé öôéá÷ôåß + þóôå íá åêêéíåß Üìåóá. Ôï image Ý÷åé ôá ðëÞñç ðåñéå÷üìåíá + ôçò äéóêÝôáò, ôñï÷éÜ ðñïò ôñï÷éÜ, êáé äåí ðñÝðåé íá ãñáöåß + óôç äéóêÝôá ùò êáíïíéêü áñ÷åßï. Èá ðñÝðåé íá ôï ìåôáöÝñåôå + óôç äéóêÝôá ìå ùìü ôñüðï, ÷ñçóéìïðïéþíôáò + åñãáëåßá ÷áìçëïý åðéðÝäïõ (low-level) (üðùò ð.÷ ôï + fdimage Þ ôï rawrite) + ðïõ ðåñéãñÜöïíôáé óôïí ïäçãü åãêáôÜóôáóçò ôïõ + &os;. @@ -1313,127 +1322,137 @@ - Where are the instructions for installing FreeBSD? + Ðïõ âñßóêïíôáé ïé ïäçãßåò ãéá ôçí åãêáôÜóôáóç ôïõ &os;; - Installation instructions can be found in the - Handbook entry on installing FreeBSD. + Ìðïñåßôå íá âñåßôå ôéò ïäçãßåò óôçí + êáôá÷þñçóç ôïõ + Åã÷åéñéäßïõ ó÷åôéêÜ ìå ôçí åãêáôÜóôáóç ôïõ &os;. - What do I need in order to run FreeBSD? + Ôé ÷ñåéÜæïìáé ãéá íá åêôåëÝóù ôï &os;; - For &os; 5.X and later you will need a 486 or better - PC, with 24 MB or more of RAM and at least 150 MB of hard disk - space. + Ãéá åêäüóåéò ôïõ &os; áðü ôï 5.X êáé ìåôÜ ÷ñåéÜæåóôå Ýíá PC + ìå åðåîåñãáóôÞ 486 Þ êáëýôåñï, ìå 24 MB Þ ðåñéóóüôåñç RAM, êáé + ôïõëÜ÷éóôïí 150 MB ÷þñïõ óôï óêëçñü óáò äßóêï. - All versions of &os; can run with a low - end MDA graphics card but to run &xorg;, a VGA or better video - card is needed. + Ìðïñåßôå íá åêôåëÝóåôå üëåò ôéò åêäüóåéò ôïõ &os; ìå ìéá + ÷áìçëþí ðñïäéáãñáöþí, ìïíü÷ñùìç (MDA) êÜñôá ãñáöéêþí, áëëÜ ãéá + íá ÷ñçóéìïðïéÞóåôå ôï &xorg;, èá ÷ñåéáóôåßôå êÜñôá VGA Þ + êáëýôåñç. - See also . + Äåßôå åðßóçò êáé ôï . - How can I make my own custom install floppy? + Ðùò ìðïñþ íá äçìéïõñãÞóù ôç äéêÞ ìïõ, ðñïóáñìïóìÝíç + äéóêÝôá åãêáôÜóôáóçò; - Currently there is no way to just - make a custom install floppy. You have to cut a whole new - release, which will include your install floppy. + Ôç äåäïìÝíç óôéãìÞ, äåí õðÜñ÷åé ôñüðïò íá öôéÜîåôå + áðëþò ìéá ðñïóáñìïóìÝíç äéóêÝôá åãêáôÜóôáóçò. + Èá ðñÝðåé íá äçìéïõñãÞóåôå ïëüêëçñç íÝá Ýêäïóç, ç ïðïßá èá + ðåñéëáìâÜíåé êáé ôçí ðñïóáñìïóìÝíç äéóêÝôá åãêáôÜóôáóçò óáò. + - To make a custom release, follow the instructions in the - Release - Engineering article. + Ãéá íá äçìéïõñãÞóåôå ìéá ðñïóáñìïóìÝíç Ýêäïóç, áêïëïõèÞóôå ôéò + ïäçãßåò óôï Üñèñï ó÷åôéêÜ ìå ôçí + ÏñãÜíùóç Åêäüóåùí + . - Can I have more than one operating system on my PC? + Ìðïñþ íá Ý÷ù ðåñéóóüôåñá áðü Ýíá ëåéôïõñãéêÜ óõóôÞìáôá óôïí + õðïëïãéóôÞ ìïõ; - Have a look at + Ñßîôå ìéá ìáôéÜ óôçí - the multi-OS page. + óåëßäá ðïëëáðëþí ëåéôïõñãéêþí. - Can &windows; co-exist with FreeBSD? + Ìðïñïýí íá óõíõðÜñîïõí ôá &windows; ìå ôï &os;; - Install &windows; first, then FreeBSD. - FreeBSD's boot manager will then manage to boot &windows; and - FreeBSD. If you install &windows; second, it will boorishly - overwrite your boot manager without even asking. If that - happens, see the next section. + ÅãêáôáóôÞóôå ðñþôá ôá &windows;, êáé ìåôÜ ôï &os;. + Ï äéá÷åéñéóôÞò åêêßíçóçò ôïõ &os; èá óáò åðéôñÝðåé Ýðåéôá íá + åðéëÝîåôå ôçí åêêßíçóç åßôå ôùí &windows; åßôå ôïõ &os;. Áí + åãêáôáóôÞóåôå ôá &windows; ìåôÜ ôï &os;, èá óáò óâÞóïõí ôïí + äéá÷åéñéóôÞ åêêßíçóçò, ÷ùñßò êáí íá óáò ñùôÞóïõí. Áí óáò óõìâåß, + áõôü äåßôå ôï åðüìåíï ôìÞìá. - &windows; killed my boot manager! - How do I get it back? + Ôá &windows; êáôÝóôñåøáí ôï äéá÷åéñéóôÞ åêêßíçóçò ìïõ! + Ðùò èá ôïí åðáíáöÝñù; - You can reinstall the boot manager FreeBSD comes with in - one of three ways: + Ìðïñåßôå íá åðáíåãêáôáóôÞóåôå ôï äéá÷åéñéóôÞ åêêßíçóçò ôïõ + &os; ÷ñçóéìïðïéþíôáò Ýíáí áðü ôïõò ôñåéò ðáñáêÜôù ôñüðïõò: - Running DOS, go into the tools/ directory of your - FreeBSD distribution and look for - bootinst.exe. You run it like - so: + Åêôåëþíôáò ôï DOS, ìåôáêéíçèåßôå óôïí êáôÜëïãï tools/ ôçò + &os; äéáíïìÞò óáò, êáé øÜîôå ãéá ôï áñ÷åßï + bootinst.exe. ÅêôåëÝóôå ôï üðùò öáßíåôáé + ðáñáêÜôù: ...\TOOLS> bootinst.exe boot.bin - and the boot manager will be reinstalled. + êáé ï äéá÷åéñéóôÞò åêêßíçóçò èá åðáíåãêáôáóôáèåß. - Boot the FreeBSD boot floppy again and go to the - Custom installation menu item. Choose Partition. Select the - drive which used to contain your boot manager (likely the - first one) and when you come to the partition editor for - it, as the very first thing (e.g. do not make any changes) - select (W)rite. This will ask for confirmation, say yes, - and when you get the Boot Manager selection prompt, be - sure to select Boot Manager. This will - re-write the boot manager to disk. Now quit out of the - installation menu and reboot off the hard disk as - normal. + ÎåêéíÞóôå îáíÜ ÷ñçóéìïðïéþíôáò ôç äéóêÝôá åêêßíçóçò ôïõ + &os; êáé ðçãáßíåôå óôçí åðéëïãÞ Custom Installation ôïõ + ìåíïý. ÅðéëÝîôå Partition. ÅðéëÝîôå ôïí ïäçãü ðïõ êáíïíéêÜ + èá ðåñéåß÷å ôïí äéá÷åéñéóôÞ åêêßíçóçò óáò (öõóéïëïãéêÜ ôïí + ðñþôï) êáé üôáí öôÜóåôå óôïí åðåîåñãáóôÞ êáôáôìÞóåùí + (partition editor) ãéá ôïí ïäçãü áõôü, ôï ðñþôï ðñÜãìá + ðïõ èá êÜíåôå (÷ùñßò Üëëåò áëëáãÝò), åßíáé íá åðéëÝîåôå + (W)rite. ÅðéëÝîôå yes óôçí åðéâåâáßùóç ðïõ èá åìöáíéóôåß êáé + üôáí öôÜóåôå óôçí ðñïôñïðÞ åðéëïãÞò Äéá÷åéñéóôÞ Åêêßíçóçò, + åðéëÝîôå Boot Manager. Ìå ôïí ôñüðï áõôü + ï äéá÷åéñéóôÞò åêêßíçóçò èá ãñáöåß îáíÜ óôï äßóêï. Ìðïñåßôå + ôþñá íá âãåßôå áðü ôï ìåíïý ôçò åãêáôÜóôáóçò êáé íá + åðáíåêêéíÞóåôå áðü ôï óêëçñü äßóêï, üðùò óõíÞèùò. - Boot the FreeBSD boot floppy (or CDROM) and choose the - Fixit menu item. Select either the Fixit - floppy or CDROM #2 (the live filesystem - option) as appropriate and enter the fixit shell. Then - execute the following command: + ÎåêéíÞóôå ìå ôç âïÞèåéá ôçò äéóêÝôáò åêêßíçóçò (Þ ôïõ + CD) ôïõ &os; êáé åðéëÝîôå Fixit áðü ôï ìåíïý. + ÅðéëÝîôå åßôå ôç äéóêÝôá Fixit åßôå ôï CD #2 (ôï + live óýóôçìá áñ÷åßùí) êáé èá åéóÝëèåôå óôï + êÝëõöïò fixit. ÅêôåëÝóôå Ýðåéôá ôçí áêüëïõèç åíôïëÞ: Fixit# fdisk -B -b /boot/boot0 bootdevice - substituting bootdevice for - your real - boot device such as ad0 (first IDE - disk), ad4 (first IDE disk on - auxiliary controller), da0 (first - SCSI disk), etc. + áíôéêáèéóôþíôáò ôï bootdevice + ìå ôïí ðñáãìáôéêü óáò äßóêï åêêßíçóçò, üðùò ð.÷. + ad0 (ðñþôïò äßóêïò IDE), + ad4 (ðñþôïò äßóêïò IDE óôïí âïçèçôéêü + åëåãêôÞ), da0 (ðñþôïò äßóêïò SCSI), + ê.ë.ð. @@ -1441,59 +1460,62 @@ - My A, T, or X series IBM Thinkpad locks up when I first - booted up my FreeBSD installation. How can I solve this? + Ï öïñçôüò ìïõ õðïëïãéóôÞò óåéñÜò IBM Thinkpad, óåéñÜò Á, Ô Þ + ×, êïëëÜåé üôáí ðñïóðáèþ íá åêêéíÞóù ôï &os; ìåôÜ ôçí + åãêáôÜóôáóç. Ðùò ìðïñþ íá åðéëýóù áõôü ôï ðñüâëçìá; - A bug in early revisions of IBM's BIOS on these machines - mistakenly identifies the FreeBSD partition as a potential FAT - suspend-to-disk partition. When the BIOS tries to parse the - FreeBSD partition it hangs. + Ðñüêåéôáé ãéá Ýíá ðñüâëçìá óôéò áñ÷éêÝò åêäüóåéò ôïõ BIOS ôçò + ÉÂÌ óôá óõãêåêñéìÝíá ìç÷áíÞìáôá, ôï ïðïßï áíáãíùñßæåé ôçí + êáôÜôìçóç ôïõ &os; ùò ðéèáíü äéáìÝñéóìá FAT ãéá ôç ëåéôïõñãßá + áäñáíïðïßçóçò óôï äßóêï (suspend-to-disk). Ôï BIOS êïëëÜåé êáèþò + ðñïóðáèåß íá áíáëýóåé ôï äéáìÝñéóìá ôïõ &os;. - According to IBMIn an e-mail from Keith + Óýìöùíá ìå ôçí IBMÓå Ýíá e-mail áðü ôïí Keith Frechette - kfrechet@us.ibm.com., the - following model/BIOS release numbers incorporate the fix. + kfrechet@us.ibm.com., ôá + áêüëïõèá ìïíôÝëá êáé åêäüóåéò BIOS ðåñéëáìâÜíïõí ôéò áðáñáßôçôåò + äéïñèþóåéò. - Model - BIOS revision + ÌïíôÝëï + ¸êäïóç BIOS T20 - IYET49WW or later + IYET49WW Þ ìåôáãåíÝóôåñï T21 - KZET22WW or later + KZET22WW Þ ìåôáãåíÝóôåñï A20p - IVET62WW or later + IVET62WW Þ ìåôáãåíÝóôåñï A20m - IWET54WW or later + IWET54WW Þ ìåôáãåíÝóôåñï A21p - KYET27WW or later + KYET27WW Þ ìåôáãåíÝóôåñï A21m - KXET24WW or later + KXET24WW Þ ìåôáãåíÝóôåñï @@ -1504,495 +1526,534 @@ - It has been reported that later IBM BIOS revisions may - have reintroduced the bug. This - message from Jacques Vidrine to the &a.mobile; - describes a procedure which may work if your newer IBM - laptop does not boot FreeBSD properly, and you can upgrade - or downgrade the BIOS. - - If you have an earlier BIOS, and upgrading is not an option, a - workaround is to install FreeBSD, change the partition ID FreeBSD - uses, and install new boot blocks that can handle the different - partition ID. + ¸÷åé áíáöåñèåß üôé ìåôáãåíÝóôåñåò åêäüóåéò ôïõ BIOS ôçò ÉÂÌ, + ßóùò ðáñïõóéÜæïõí îáíÜ ôï ðñüâëçìá. + To ìýíçìá áõôü áðü ôïí Jacques Vidrine óôçí + &a.mobile; ðåñéãñÜöåé ìéá äéáäéêáóßá ç ïðïßá ßóùò äïõëÝøåé óå + íåüôåñá ìïíôÝëá öïñçôþí ôçò IBM ôá ïðïßá äåí åêêéíïýí êáíïíéêÜ + ôï &os;, êáé óôá ïðïßá ìðïñåßôå íá áíáâáèìßóåôå ôï BIOS Þ êáé íá + åðéóôñÝøåôå óå ðñïçãïýìåíç Ýêäïóç ôïõ. + + Áí Ý÷åôå ðáëéüôåñï BIOS, áëëÜ äåí Ý÷åôå ôçí åðéëïãÞ íá ôï + áíáâáèìßóåôå, Ýíáò ôñüðïò íá îåðåñÜóåôå ôï ðñüâëçìá åßíáé íá + åãêáôáóôÞóåôå ôï &os;, íá áëëÜîåôå ôïí áíáãíùñéóôéêü áñéèìü + (partition id) ôçò êáôÜôìçóçò, êáé íá åãêáôáóôÞóåôå íÝá boot + blocks ôá ïðïßá íá ìðïñïýí íá ÷åéñéóôïýí ôï äéáöïñåôéêü + áíáãíùñéóôéêü ôçò êáôÜôìçóçò. - First, you will need to restore the machine to a state where - it can get through its self-test screen. Doing this requires - powering up the machine without letting it find a FreeBSD - partition on its primary disk. One way is to remove the hard disk - and temporarily move it to an older ThinkPad (such as a ThinkPad - 600) or a desktop PC with an appropriate conversion cable. Once - it is there, you can delete the FreeBSD partition and move the hard - disk back. The ThinkPad should now be in a bootable state - again. + Áñ÷éêÜ, èá ðñÝðåé íá åðáíáöÝñåôå ôï ìç÷Üíçìá óå ìéá êáôÜóôáóç + þóôå íá ðåñíÜåé áðü ôçí áñ÷éêÞ äéáãíùóôéêÞ ïèüíç. Áõôü áðáéôåß + íá åíåñãïðïéÞóåôå ôï ìç÷Üíçìá ÷ùñßò íá ôï áöÞóåôå íá âñåé + ôçí êáôÜôìçóç ôïõ &os; óôïí êýñéï äßóêï ôïõ. ¸íáò ôñüðïò åßíáé + íá áðïìáêñýíåôå ôïí óêëçñü äßóêï êáé íá ôïí ìåôáêéíÞóåôå ðñïóùñéíÜ + óå Ýíá ðáëéüôåñï ThinkPad (üðùò ôï ThinkPad 600) Þ êÜðïéï + åðéôñáðÝæéï ìç÷Üíçìá, ÷ñçóéìïðïéþíôáò ôï êáôÜëëçëï êáëþäéï + ìåôáôñïðÞò. Óôï ìç÷Üíçìá áõôü ìðïñåßôå ðëÝïí íá äéáãñÜøåôå ôçí + êáôÜôìçóç ôïõ &os; êáé Ýðåéôá íá ìåôáêéíÞóåôå ôïí äßóêï óôï + áñ÷éêü ìç÷Üíçìá. Ôï ThinkPad èá ðñÝðåé ôþñá íá åêêéíåß + êáíïíéêÜ. - With the machine functional again, you can use the workaround - procedure described here to get a working FreeBSD - installation. + Ìå ôï ìç÷Üíçìá óå ëåéôïõñãéêÞ êáôÜóôáóç, ìðïñåßôå ôþñá íá + ÷ñçóéìïðïéÞóåôå ôçí äéáäéêáóßá ðïõ ðåñéãñÜöåôáé åäþ þóôå íá + Ý÷åôå ôåëéêÜ ìéá åãêáôÜóôáóç ôïõ &os; ðïõ íá ëåéôïõñãåß. - Download boot1 and - boot2 from ÊáôåâÜóôå ôéò äéóêÝôåò boot1 êáé + boot2 áðü . - Put these files somewhere you will be able to retrieve them - later. + Áðïèçêåýóôå ôá áñ÷åßá áõôÜ êÜðïõ ðïõ èá ìðïñåßôå íá ôá + îáíáâñåßôå áñãüôåñá. - Install FreeBSD as normal on to the ThinkPad. - Do not use Dangerously - Dedicated mode. Do not - reboot when the install has finished. + ÅãêáôáóôÞóôå êáíïíéêÜ ôï &os; óôï ThinkPad. + Ìçí ÷ñçóéìïðïéÞóåôå ôçí êáôÜóôáóç + Dangerously Dedicated. + Ìçí êÜíåôå åðáíåêêßíçóç üôáí ôåëåéþóåé + ç åãêáôÜóôáóç. - Either switch to the Emergency Holographic + ×ñçóéìïðïéÞóôå åßôå ôï Emergency Holographic Shell (ALT - F4) or start a - fixit shell. + F4) åßôå ôï êÝëõöïò + fixit. - Use &man.fdisk.8; to change the FreeBSD partition ID from - 165 to 166 (this is the - type used by OpenBSD). + ×ñçóéìïðïéÞóôå ôçí &man.fdisk.8; ãéá íá áëëÜîåôå ôïí + áíáãíùñéóôéêü áñéèìü ôçò êáôÜôìçóçò ôïõ &os; áðü + 165 óå 166 (áõôüò åßíáé + ï ôýðïò ðïõ ÷ñçóéìïðïéåßôáé áðü ôï OpenBSD). - Bring the boot1 and - boot2 files to the local - filesystem. + ÃñÜøôå ôá áñ÷åßá boot1 êáé + boot2 óôï ôïðéêü óýóôçìá áñ÷åßùí. - Use &man.disklabel.8; to write boot1 - and boot2 to your FreeBSD slice. + ×ñçóéìïðïéÞóôå ôï &man.disklabel.8; ãéá íá ãñÜøåôå ôá + boot1 êáé boot2 óôï + slice ôïõ &os;. &prompt.root; disklabel -B -b boot1 -s boot2 ad0sn - n is the number of the slice - where you installed FreeBSD. + Ôï n åßíáé ï áñéèìüò ôïõ slice + ðïõ Ý÷åôå åãêáôáóôÞóåé ôï &os;. - Reboot. At the boot prompt you will be given the option - of booting OpenBSD. This will actually - boot FreeBSD. + ÊÜíôå åðáíåêêßíçóç. Óôçí ðñïôñïðÞ åêêßíçóçò èá äåßôå ôçí + åðéëïãÞ íá îåêéíÞóåôå ôï OpenBSD. Óôçí + ðñáãìáôéêüôçôá, ìå áõôü ôïí ôñüðï èá îåêéíÞóåôå ôï &os;. + - Getting this to work in the case where you want to dual boot - OpenBSD and FreeBSD on the same laptop is left as an exercise for - the reader. + Ôï íá êÜíåôå ôï ðáñáðÜíù íá ëåéôïõñãÞóåé óôçí ðåñßðôùóç ðïõ + èÝëåôå íá Ý÷åôå äéðëÞ åêêßíçóç OpenBSD êáé &os; óôïí ßäéï öïñçôü + õðïëïãéóôÞ, ôï áöÞíïõìå ùò Üóêçóç óôïí áíáãíþóôç. - Can I install on a disk with bad blocks? + Ìðïñþ íá êÜíù åãêáôÜóôáóç óå Ýíá äßóêï ìå ÷áëáóìÝíïõò + ôïìÝéò; - You can, but it is a bad idea. + Ìðïñåßôå, áëëÜ åßíáé êáêÞ éäÝá. - If you are seeing bad block errors with a modern IDE - drive, chances are the drive is going to die very soon (the - drive's internal remapping functions are no longer sufficient - to fix the bad blocks, which means the disk is heavily - corrupted); we suggest you buy a new hard drive. + Áí äåßôå ÷áëáóìÝíïõò ôïìåßò óå Ýíá óýã÷ñïíï ïäçãü IDE, õðÜñ÷åé + ìåãÜëç ðéèáíüôçôá ï ïäçãüò áõôüò, ðïëý óýíôïìá, íá óôáìáôÞóåé íá + ëåéôïõñãåß åíôåëþò (ï ïäçãüò äåí Ý÷åé Üëëïõò åíáëëáêôéêïýò + êõëßíäñïõò ðïõ íá ìðïñïýí íá áíôéêáôáóôÞóïõí ôïõò ÷áëáóìÝíïõò ìÝóù + ôçò åóùôåñéêÞò ëåéôïõñãßáò åðáíáôïðïèÝôçóçò ôùí äåäïìÝíùí, êÜôé ôï + ïðïßï óçìáßíåé üôé ï äßóêïò Ý÷åé óçìáíôéêÞ öèïñÜ). Óáò óõíéóôïýìå + íá áãïñÜóåôå êáéíïýñéï äßóêï. - If you have a SCSI drive with bad blocks, see - this answer. + Áí Ý÷åôå ïäçãü SCSI ìå ÷áëáóìÝíïõò ôïìåßò äåßôå + áõôÞ ôçí áðÜíôçóç. - Strange things happen when I boot the install floppy! - What is happening? + ÄéÜöïñá ðåñßåñãá ðñÜãìáôá óõìâáßíïõí üôáí åêêéíþ ìå ôç + äéóêÝôá åêêßíçóçò! Ôé óõìâáßíåé; - If you are seeing things like the machine grinding to a halt - or spontaneously rebooting when you try to boot the install - floppy, here are three questions to ask yourself:- + Áí âëÝðåôå êáôáóôÜóåéò üðùò ôï ìç÷Üíçìá íá êïëëÜåé Þ íá êÜíåé + åðáíåêêßíçóç ìüíï ôïõ üôáí ðñïóðáèåßôå íá åêêéíÞóåôå ìå ôçí + äéóêÝôá åêêßíçóçò, èá ðñÝðåé íá êÜíåôå óôïí åáõôü óáò ôñåéò + åñùôÞóåéò:- - Did you use a new, freshly-formatted, error-free floppy - (preferably a brand-new one straight out of the box, as - opposed to the magazine cover disk that has been lying under - the bed for the last three years)? + ×ñçóéìïðïéÞóáôå êáéíïýñéåò, öñåóêï-äéáìïñöùìÝíåò, êáé + ÷ùñßò ëÜèç äéóêÝôåò (êáôÜ ðñïôßìçóç êáëÞò åôáéñßáò ôçò ïðïßåò + ìüëéò âãÜëáôå êáéíïýñéåò áðü ôï êïõôß ôïõò, óå áíôßèåóç ìå ôç + äéóêÝôá ðïõ ðÞñáôå ìáæß ìå êÜðïéï ðåñéïäéêü êáé ç ïðïßá + âñßóêïíôáí êÜôù áðü ôï êñåâÜôé ôá ôñßá ôåëåõôáßá ÷ñüíéá); + - Did you download the floppy image in binary (or image) - mode? (do not be embarrassed, even the best of us have - accidentally downloaded a binary file in ASCII mode at - least once!) + ÊáôåâÜóáôå ôï image ôçò äéóêÝôáò ìå äõáäéêü (binary Þ + image) ôñüðï ìåôáöïñÜò; (ìç íôñÝðåóôå, áêüìá êáé ïé êáëýôåñïé + áðü ìáò Ý÷ïõí êáôÜ ëÜèïò êáôåâÜóåé êÜðïéï äõáäéêü áñ÷åßï óå + êáôÜóôáóç ASCII (êåéìÝíïõ), ôïõëÜ÷éóôïí ìéá öïñÜ! - If you are using &windows; 95 or 98 did you run - fdimage or - rawrite in pure DOS mode? These - operating systems can interfere with programs that - write directly to hardware, which the disk creation - program does; even running it inside a DOS shell in - the GUI can cause this problem. + Áí ÷ñçóéìïðïéåßôå &windows; 95 or 98, åêôåëÝóáôå ôï + fdimage Þ ôï + rawrite óå êáèáñÞ êáôÜóôáóç DOS; ÁõôÜ ôá + ëåéôïõñãéêÜ óõóôÞìáôá ìðïñåß íá ðáñåìâëçèïýí óå ðñïãñÜììáôá ôá + ïðïßá ãñÜöïõí áðåõèåßáò óôï õëéêü, êÜôé ôï ïðïßï óõìâáßíåé êáé + ìå ôá ðñïãñÜììáôá äçìéïõñãßáò ôùí äéóêåôþí. Ìðïñåß íá + äçìéïõñãçèåß ðñüâëçìá, áêüìá êáé áí ôá ôñÝ÷åôå óå ðáñÜèõñï + DOS ìÝóá áðü ôï ãñáöéêü ðåñéâÜëëïí. - There have also been reports of &netscape; causing problems - when downloading the boot floppy, so it is probably best to use - a different FTP client if you can. + ¸÷ïõí åðßóçò áíáöåñèåß ðåñéðôþóåéò üðïõ ôï &netscape; + äçìéïõñãåß ðñïâëÞìáôá óôï êáôÝâáóìá ôçò äéóêÝôáò åêêßíçóçò, Ýôóé + åßíáé êáëýôåñá íá ÷ñçóéìïðïéÞóåôå êÜðïéï Üëëï ðñüãñáììá FTP, áí + áõôü åßíáé äõíáôüí. - I booted from my ATAPI CDROM, but the install program - says no CDROM is found. Where did it go? + Îåêßíçóá áðü ôï ATAPI CDROM ìïõ, áëëÜ ôï ðñüãñáììá + åãêáôÜóôáóçò ëÝåé üôé äåí âñßóêåé CDROM. Ðïõ ðÞãå; - The usual cause of this problem is a mis-configured CDROM - drive. Many PCs now ship with the CDROM as the slave device on - the secondary IDE controller, with no master device on that - controller. This is illegal according to the ATAPI specification, - but &windows; plays fast and loose with the specification, and the - BIOS ignores it when booting. This is why the BIOS was able to - see the CDROM to boot from it, but why FreeBSD cannot see it to - complete the install. + Ç óõíÞèçò áéôßá áõôïý ôïõ ðñïâëÞìáôïò åßíáé Ýíáò + êáêïñõèìéóìÝíïò ïäçãüò CDROM. ÐïëëÜ PC Ýñ÷ïíôáé ðëÝïí ìå ôï CDROM + ùò slave óõóêåõÞ óôï äåõôåñåýïíôá åëåãêôÞ, ÷ùñßò íá õðÜñ÷åé óôï + ßäéï êáíÜëé óõóêåõÞ master. Áõôü, óýìöùíá ìå ôéò ðñïäéáãñáöÝò ôïõ + ATAPI, äåí åßíáé Ýãêõñï, áëëÜ ôá &windows; ôçñïýí ôéò + ðñïäéáãñáöÝò ÷áëáñÜ, åíþ ôï BIOS ôï áãíïåß êáôÜ ôçí åêêßíçóç. + Áõôüò åßíáé êáé ï ëüãïò ðïõ ôï BIOS êáôÜöåñå íá äåé ôï CDROM êáé + íá ôï ÷ñçóéìïðïéÞóåé, áëëÜ êáé ï ëüãïò ðïõ ôï &os; äåí ìðüñåóå íá + ôï äåé ãéá íá óõíå÷ßóåé ôçí åãêáôÜóôáóç. - Reconfigure your system so that the CDROM is either the - master device on the IDE controller it is attached to, or make - sure that it is the slave on an IDE controller that also has a - master device. + Ñõèìßóôå îáíÜ ôï óýóôçìá óáò, þóôå ôï CDROM åßôå íá åßíáé ç + master óõóêåõÞ óôïí åëåãêôÞ ðïõ åßíáé óõíäåìÝíç, Þ âåâáéùèåßôå üôé + åßíáé slave óå Ýíá åëåãêôÞ IDE ï ïðïßïò üìùò Ý÷åé Üëëç óõóêåõÞ + óõíäåìÝíç ùò master. - Can I install on my laptop over PLIP (Parallel Line - IP)? + Ìðïñþ íá åãêáôáóôÞóù ôï &os; óôï öïñçôü ìïõ ÷ñçóéìïðïéþíôáò + PLIP (Parallel Line IP, IP ÐáñÜëëçëçò ÃñáììÞò); - Yes. Use a standard Laplink cable. If necessary, you - can check out the PLIP - section of the Handbook for details on parallel - port networking. + Íáé. ×ñçóéìïðïéÞóôå ôõðïðïéçìÝíï êáëþäéï ôýðïõ Laplink. Áí + ÷ñåéÜæåôáé, äéáâÜóôå ôï + ôìÞìá PLIP + ôïõ Åã÷åéñéäßïõ ãéá ëåðôïìÝñåéåò ó÷åôéêÝò ìå äéêôýùóç ìÝóù + ðáñÜëëçëçò èýñáò. - Which geometry should I use for a disk drive? + Ôé ãåùìåôñßá íá ÷ñçóéìïðïéÞóù ãéá ôï óêëçñü ìïõ äßóêï; - By the geometry of a disk, we mean - the number of cylinders, heads and sectors/track on a - disk. We will refer to this as C/H/S for - convenience. This is how the PC's BIOS works out which - area on a disk to read/write from. + Ìå ôïí üñï ãåùìåôñßá, åííïïýìå ôïí áñéèìü + ôùí êõëßíäñùí, êåöáëþí êáé ôïìÝùí áíÜ ôñï÷éÜ åíüò äßóêïõ. Ãéá + åõêïëßá, èá áíáöåñüìáóôå óôïí üñï áõôü ùò C/H/S (Cylinders / + Heads / Sectors). Áõôüò åßíáé êáé ï ôñüðïò ìå ôïí ïðïßï ôï + BIOS âñßóêåé óå ðïéá ðåñéï÷Þ ôïõ äßóêïõ íá ãñÜøåé. - This causes a lot of confusion among new system - administrators. First of all, the - physical geometry of a SCSI drive is - totally irrelevant, as FreeBSD works in term of disk - blocks. In fact, there is no such thing as - the physical geometry, as the sector - density varies across the disk. What manufacturers claim - is the physical geometry is usually the - geometry that they have determined wastes the least - space. For IDE disks, FreeBSD does work in terms of C/H/S, - but all modern drives internally convert this into block - references. + Ôï ðáñáðÜíù ðñïêáëåß óýã÷õóç óôïõ íÝïõò äéá÷åéñéóôÝò + óõóôçìÜôùí. Êáôáñ÷Þí, ç öõóéêÞ ãåùìåôñßá åíüò + ïäçãïý SCSI åßíáé óõíïëéêÜ Üó÷åôç, áöïý ôï &os; ëåéôïõñãåß ìå âÜóç + ôá ìðëïê äßóêïõ. Óôçí ðñáãìáôéêüôçôá, äåí õðÜñ÷åé êáí + áëçèéíÞ öõóéêÞ ãåùìåôñßá, êáèþò ç ðõêíüôçôá ôùí + ôïìÝùí ìåôáâÜëëåôáé áðü ðåñéï÷Þ óå ðåñéï÷Þ ôïõ äßóêïõ. Áõôü ðïõ + ïé êáôáóêåõáóôÝò áíáöÝñïõí óõ÷íÜ ùò + öõóéêÞ ãåùìåôñßá åßíáé óõíÞèùò ç ãåùìåôñßá ìå ôçí + üðïéá Ý÷ïõí áíáêáëýøåé üôé ãßíåôáé ç ìéêñüôåñç óðáôÜëç åëåýèåñïõ + ÷þñïõ. Ãéá äßóêïõò IDE, ôï &os; ÷ñçóéìïðïéåß ðñÜãìáôé ôï C/H/S, + áëëÜ üëïé ïé ìïíôÝñíïé ïäçãïß ìåôáôñÝðïõí åóùôåñéêÜ áõôÝò ôéò + áíáöïñÝò óå áíôßóôïé÷á ìðëïê. - All that matters is the logical - geometry. This is the answer that the BIOS gets when it - asks the drive what is your geometry? It - then uses this geometry to access the disk. As FreeBSD - uses the BIOS when booting, it is very important to get - this right. In particular, if you have more than one - operating system on a disk, they must all agree on the - geometry. Otherwise you will have serious problems - booting! + Ôï ìüíï ðïõ Ý÷åé ðñáãìáôéêÞ óçìáóßá åßíáé ç ëïãéêÞ + ãåùìåôñßá. ÁõôÞ åßíáé êáé ç áðÜíôçóç ðïõ äÝ÷åôáé ôï + BIOS üôáí ñùôÜåé ôï äßóêï + ðïéá åßíáé ç ãåùìåôñßá óïõ; ¸ðåéôá, ÷ñçóéìïðïéåß + áõôÞ ôç ãåùìåôñßá ãéá íá áðïêôÞóåé ðñüóâáóç óôï äßóêï. Êáèþò ôï + &os; ÷ñçóéìïðïéåß ôï BIOS êáôÜ ôçí åêêßíçóç, åßíáé ðïëý óçìáíôéêü + ç ãåùìåôñßá áõôÞ íá åßíáé óùóôÞ. Åéäéêüôåñá, áí Ý÷åôå ðåñéóóüôåñá + áðü Ýíá ëåéôïõñãéêÜ óõóôÞìáôá óôï äßóêï, ðñÝðåé üëá íá óõìöùíïýí + üóï áöïñÜ ôç ãåùìåôñßá. ÄéáöïñåôéêÜ èá Ý÷åôå óïâáñÜ ðñïâëÞìáôá + êáôÜ ôçí åêêßíçóç! - For SCSI disks, the geometry to use depends on whether - extended translation support is turned on in your - controller (this is often referred to as support for - DOS disks >1GB or something similar). If it is - turned off, then use N - cylinders, 64 heads and 32 sectors/track, where - N is the capacity of the disk in - MB. For example, a 2GB disk should pretend to have 2048 - cylinders, 64 heads and 32 sectors/track. + Ãéá äßóêïõò SCSI, ç ãåùìåôñßá ðïõ ðñÝðåé íá ÷ñçóéìïðïéçèåß, + åîáñôÜôáé áðü ôï áí åßíáé åíåñãïðïéçìÝíç ç õðïóôÞñéîç åêôåôáìÝíçò + ìåôÜöñáóçò (áõôü óõ÷íÜ áíáöÝñåôáé ùò õðïóôÞñéîç ãéá äßóêïõò + DOS >1GB Þ êÜôé áíôßóôïé÷ï). Áí åßíáé áðåíåñãïðïéçìÝíç, + ÷ñçóéìïðïéÞóôå N êõëßíäñïõò, 64 + êåöáëÝò êáé 32 ôïìåßò/ôñï÷éÜ, üðïõ ôï + N åßíáé ç ÷ùñçôéêüôçôá ôïõ äßóêïõ óå + ÌÂ. Ãéá ðáñÜäåéãìá, ãéá Ýíá äßóêï 2GB, èá ðñÝðåé íá Ý÷åôå 2048 + êõëßíäñïõò, 64 êåöáëÝò, êáé 32 ôïìåßò/ôñï÷éÜ. - If it is turned on (it is often - supplied this way to get around certain limitations in - &ms-dos;) and the disk capacity is more than 1GB, use M - cylinders, 63 sectors per track (not - 64), and 255 heads, where M is the disk capacity in MB - divided by 7.844238 (!). So our example 2GB drive would - have 261 cylinders, 63 sectors per track and 255 - heads. + Áí åßíáé åíåñãïðïéçìÝíï (êáé óõ÷íÜ + ðáñÝ÷åôáé Ýôóé þóôå íá îåðåñíïýíôáé êÜðïéïé ðåñéïñéóìïß óôï + &ms-dos;) êáé ç ÷ùñçôéêüôçôá ôïõ äßóêïõ åßíáé ìåãáëýôåñç áðü 1GB, + ÷ñçóéìïðïéÞóôå M êõëßíäñïõò, 63 ôïìåßò áíÜ ôñï÷éÜ (ü÷é + 64) êáé 255 êåöáëÝò, üðïõ M åßíáé + ç ÷ùñçôéêüôçôá ôïõ äßóêïõ óå MB, äéáéñåìÝíç ìå ôï 7.844238 (!). + ¸ôóé, óôï ðáñÜäåéãìá ìáò, ï äßóêïò ôùí 2GB èá åß÷å 261 êõëßíäñïõò, + 63 ôïìåßò áíÜ ôñï÷éÜ êáé 255 êåöáëÝò. - If you are not sure about this, or FreeBSD fails to - detect the geometry correctly during installation, the - simplest way around this is usually to create a small DOS - partition on the disk. The BIOS should then detect the - correct geometry, and you can always remove the DOS - partition in the partition editor if you do not want to - keep it. You might want to leave it around for - programming network cards and the like, however. + Áí äåí åßóôå óßãïõñïò ãéá ôï ðáñáðÜíù, Þ áí ôï &os; áðïôý÷åé + óôçí áíß÷íåõóç ôçò óùóôÞò ãåùìåôñßáò êáôÜ ôçí åãêáôÜóôáóç, ï + áðëïýóôåñïò ôñüðïò ãéá íá ôï ðáñáêÜìøåôå, åßíáé óõíÞèùò íá + äçìéïõñãÞóåôå Ýíá ìéêñü äéáìÝñéóìá DOS óôï äßóêï. Ôï BIOS Ýðåéôá + èá áíé÷íåýóåé ôç óùóôÞ ãåùìåôñßá, êáé ìðïñåßôå ðÜíôá íá äéáãñÜøåôå + ôï äéáìÝñéóìá DOS ìÝóá áðü ôïí åðåîåñãáóôÞ êáôáôìÞóåùí, áí + äå èÝëåôå íá ôï êñáôÞóåôå. Ìðïñåß ùóôüóï íá èåëÞóåôå íá ôï + áöÞóåôå, ãéá íá ðñïãñáììáôßæåôå êÜñôåò äéêôýïõ êáé íá êÜíåôå Üëëåò + áíôßóôïé÷åò åñãáóßåò. - Alternatively, there is a freely available utility - distributed with FreeBSD called - pfdisk.exe. You can find it in the - tools subdirectory on the FreeBSD - CDROM or on the various FreeBSD FTP sites. This program - can be used to work out what geometry the other operating - systems on the disk are using. You can then enter this - geometry in the partition editor. + ÅíáëëáêôéêÜ, õðÜñ÷åé Ýíá åëåýèåñá äéáèÝóéìï âïçèçôéêü + ðñüãñáììá ôï ïðïßï äéáíÝìåôáé ìå ôï &os; êáé ëÝãåôáé + pfdisk.exe. Ìðïñåßôå íá ôï âñåßôå óôïí + õðïêáôÜëïãï tools óôï CDROM ôïõ &os; Þ óôéò + äéêôõáêÝò ôïðïèåóßåò FTP ôïõ &os;. Ôï ðñüãñáììá áõôü ìðïñåß íá + ÷ñçóéìïðïéçèåß ãéá íá áíáêáëýøåé ôé ãåùìåôñßá ÷ñçóéìïðïéåßôáé áðü + ôá Üëëá ëåéôïõñãéêÜ óõóôÞìáôá óôï äßóêï ðïõ ÷ñçóéìïðïéåßôáé. + Ìðïñåßôå íá åéóÜãåôå áðåõèåßáò áõôÞ ôç ãåùìåôñßá óôïí åðåîåñãáóôÞ + êáôáôìÞóåùí. - Are there any restrictions on how I divide the disk up? + ÕðÜñ÷ïõí êÜðïéïé ðåñéïñéóìïß óôï ðùò ðñÝðåé íá ÷ùñßóù >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Feb 5 09:29:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE7F316A420; Tue, 5 Feb 2008 09:29:40 +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 9981F16A41A for ; Tue, 5 Feb 2008 09:29:40 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 74AE913C458 for ; Tue, 5 Feb 2008 09:29:40 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m159TeNC024649 for ; Tue, 5 Feb 2008 09:29:40 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m159Tc2s024644 for perforce@freebsd.org; Tue, 5 Feb 2008 09:29:38 GMT (envelope-from jb@freebsd.org) Date: Tue, 5 Feb 2008 09:29:38 GMT Message-Id: <200802050929.m159Tc2s024644@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134831 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 09:29:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=134831 Change 134831 by jb@jb_freebsd1 on 2008/02/05 09:29:08 We define FOPEN_MAX as 20. What a joke. Affected files ... .. //depot/projects/dtrace/src/contrib/one-true-awk/run.c#5 edit Differences ... ==== //depot/projects/dtrace/src/contrib/one-true-awk/run.c#5 (text+ko) ==== @@ -63,6 +63,8 @@ /* #ifndef RAND_MAX */ /* #define RAND_MAX 32767 */ /* all that ansi guarantees */ /* #endif */ +#undef FOPEN_MAX +#define FOPEN_MAX 40 jmp_buf env; extern int pairstack[]; From owner-p4-projects@FreeBSD.ORG Tue Feb 5 10:49:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B56E516A46D; Tue, 5 Feb 2008 10:49:02 +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 6242716A469; Tue, 5 Feb 2008 10:49:02 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0F89E13C458; Tue, 5 Feb 2008 10:49:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m15AjGdJ031769; Tue, 5 Feb 2008 03:45:16 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 05 Feb 2008 03:45:16 -0700 (MST) Message-Id: <20080205.034516.41658341.imp@bsdimp.com> To: ed@fxq.nl From: Warner Losh In-Reply-To: <20080205073131.GR1179@hoeg.nl> References: <200802040843.m148htF0037992@repoman.freebsd.org> <20080204.134930.-1350498280.imp@bsdimp.com> <20080205073131.GR1179@hoeg.nl> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: rrs@FreeBSD.org, perforce@FreeBSD.org Subject: Re: PERFORCE change 134769 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 10:49:03 -0000 > * M. Warner Losh wrote: > > I don't think you want this change. it is wrong because we don't > > support ISA_MIPS64's notion of 64-bit registers correctly. > > Just tracking the commits a little; you mean that the MIPS port doesn't > yet support 64 bits registers in the CPU context switching code? I mean that it doesn't support saving 64-bit registers when compiled for 32-bit operation. Just adding ISA_MIPS64 doesn't change the fact that the kernel is built with the o32 abi. Most fo the code to support the change is in place, but hasn't been fleshed out in a few key areas. Warner From owner-p4-projects@FreeBSD.ORG Tue Feb 5 11:29:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AF5AE16A41B; Tue, 5 Feb 2008 11:29:44 +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 5C50516A46D for ; Tue, 5 Feb 2008 11:29:44 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4D07913C46B for ; Tue, 5 Feb 2008 11:29:44 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m15BTiGm034897 for ; Tue, 5 Feb 2008 11:29:44 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m15BTikj034894 for perforce@freebsd.org; Tue, 5 Feb 2008 11:29:44 GMT (envelope-from sephe@FreeBSD.org) Date: Tue, 5 Feb 2008 11:29:44 GMT Message-Id: <200802051129.m15BTikj034894@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 134835 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 11:29:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=134835 Change 134835 by sephe@sephe_enigma:sam_wifi on 2008/02/05 11:29:08 Merge rate table changes from vap branch: Instead of installing rate table in channel during attach, drivers are now responsible to get rate table when channel switching happens. All duration calculatoin functions are not take rate table as their first parameter instead of channel. Reminded by: sam Affected files ... .. //depot/projects/wifi/sys/dev/ral/rt2560.c#32 edit .. //depot/projects/wifi/sys/dev/ral/rt2560var.h#10 edit .. //depot/projects/wifi/sys/dev/ral/rt2661.c#24 edit .. //depot/projects/wifi/sys/dev/ral/rt2661var.h#8 edit .. //depot/projects/wifi/sys/net80211/_ieee80211.h#28 edit .. //depot/projects/wifi/sys/net80211/ieee80211.c#61 edit .. //depot/projects/wifi/sys/net80211/ieee80211_phy.c#7 edit .. //depot/projects/wifi/sys/net80211/ieee80211_phy.h#4 edit Differences ... ==== //depot/projects/wifi/sys/dev/ral/rt2560.c#32 (text) ==== @@ -1481,7 +1481,7 @@ desc->plcp_service = 4; len += IEEE80211_CRC_LEN; - if (ieee80211_rate2phytype(ic->ic_curchan, rate) == IEEE80211_T_OFDM) { + if (ieee80211_rate2phytype(sc->sc_currates, rate) == IEEE80211_T_OFDM) { desc->flags |= htole32(RT2560_TX_OFDM); plcp_length = len & 0xfff; @@ -1619,7 +1619,7 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2560_TX_ACK; - dur = ieee80211_ack_duration(ic->ic_curchan, rate, + dur = ieee80211_ack_duration(sc->sc_currates, rate, ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); @@ -1804,12 +1804,12 @@ rtsrate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; - dur = ieee80211_ack_duration(ic->ic_curchan, + dur = ieee80211_ack_duration(sc->sc_currates, rtsrate, ic->ic_flags) - + ieee80211_compute_duration(ic->ic_curchan, + + ieee80211_compute_duration(sc->sc_currates, m0->m_pkthdr.len + IEEE80211_CRC_LEN, rate, ic->ic_flags) - + ieee80211_ack_duration(ic->ic_curchan, + + ieee80211_ack_duration(sc->sc_currates, rate, ic->ic_flags); m = rt2560_get_rts(sc, wh, dur); @@ -1916,7 +1916,7 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2560_TX_ACK; - dur = ieee80211_ack_duration(ic->ic_curchan, rate, + dur = ieee80211_ack_duration(sc->sc_currates, rate, ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); } @@ -2222,6 +2222,7 @@ chan = ieee80211_chan2ieee(ic, c); if (chan == 0 || chan == IEEE80211_CHAN_ANY) return; + sc->sc_currates = ieee80211_get_ratetable(c); if (IEEE80211_IS_CHAN_2GHZ(c)) power = min(sc->txpow[chan - 1], 31); ==== //depot/projects/wifi/sys/dev/ral/rt2560var.h#10 (text) ==== @@ -165,6 +165,7 @@ #define RT2560_F_PRIO_OACTIVE 0x2 #define RT2560_F_DATA_OACTIVE 0x4 int sc_flags; + const struct ieee80211_rate_table *sc_currates; }; int rt2560_attach(device_t, int); ==== //depot/projects/wifi/sys/dev/ral/rt2661.c#24 (text) ==== @@ -1356,7 +1356,7 @@ desc->plcp_service = 4; len += IEEE80211_CRC_LEN; - if (ieee80211_rate2phytype(ic->ic_curchan, rate) == IEEE80211_T_OFDM) { + if (ieee80211_rate2phytype(sc->sc_currates, rate) == IEEE80211_T_OFDM) { desc->flags |= htole32(RT2661_TX_OFDM); plcp_length = len & 0xfff; @@ -1442,7 +1442,7 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2661_TX_NEED_ACK; - dur = ieee80211_ack_duration(ic->ic_curchan, + dur = ieee80211_ack_duration(sc->sc_currates, rate, ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); @@ -1567,12 +1567,12 @@ rtsrate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; - dur = ieee80211_ack_duration(ic->ic_curchan, + dur = ieee80211_ack_duration(sc->sc_currates, rtsrate, ic->ic_flags) - + ieee80211_compute_duration(ic->ic_curchan, + + ieee80211_compute_duration(sc->sc_currates, m0->m_pkthdr.len + IEEE80211_CRC_LEN, rate, ic->ic_flags) - + ieee80211_ack_duration(ic->ic_curchan, + + ieee80211_ack_duration(sc->sc_currates, rate, ic->ic_flags); m = rt2661_get_rts(sc, wh, dur); @@ -1676,7 +1676,7 @@ if (!noack && !IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2661_TX_NEED_ACK; - dur = ieee80211_ack_duration(ic->ic_curchan, rate, + dur = ieee80211_ack_duration(sc->sc_currates, rate, ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); } @@ -2137,6 +2137,8 @@ if (chan == 0 || chan == IEEE80211_CHAN_ANY) return; + sc->sc_currates = ieee80211_get_ratetable(c); + /* select the appropriate RF settings based on what EEPROM says */ rfprog = (sc->rfprog == 0) ? rt2661_rf5225_1 : rt2661_rf5225_2; ==== //depot/projects/wifi/sys/dev/ral/rt2661var.h#8 (text) ==== @@ -168,6 +168,7 @@ int sc_txtap_len; #define RAL_INPUT_RUNNING 1 int sc_flags; + const struct ieee80211_rate_table *sc_currates; }; int rt2661_attach(device_t, int); ==== //depot/projects/wifi/sys/net80211/_ieee80211.h#28 (text+ko) ==== @@ -102,7 +102,6 @@ /* * Channels are specified by frequency and attributes. */ -struct ieee80211_rate_table; struct ieee80211_channel { uint32_t ic_flags; /* see below */ uint16_t ic_freq; /* setting in Mhz */ @@ -112,7 +111,6 @@ int8_t ic_minpower; /* minimum tx power in .5 dBm */ uint8_t ic_state; /* dynamic state */ uint8_t ic_extieee; /* HT40 extension channel number */ - const struct ieee80211_rate_table *ic_rt; /* rate table */ }; #define IEEE80211_CHAN_MAX 255 ==== //depot/projects/wifi/sys/net80211/ieee80211.c#61 (text+ko) ==== @@ -182,8 +182,6 @@ setbit(ic->ic_modecaps, IEEE80211_MODE_11NA); if (IEEE80211_IS_CHAN_HTG(c)) setbit(ic->ic_modecaps, IEEE80211_MODE_11NG); - - ieee80211_set_ratetable(c); } /* initialize candidate channels to all available */ memcpy(ic->ic_chan_active, ic->ic_chan_avail, ==== //depot/projects/wifi/sys/net80211/ieee80211_phy.c#7 (text+ko) ==== @@ -317,10 +317,10 @@ #undef N } -void -ieee80211_set_ratetable(struct ieee80211_channel *c) +const struct ieee80211_rate_table * +ieee80211_get_ratetable(const struct ieee80211_channel *c) { - const struct ieee80211_rate_table *rt; + const struct ieee80211_rate_table *rt = NULL; /* XXX HT */ if (IEEE80211_IS_CHAN_HALF(c)) @@ -348,7 +348,7 @@ panic("%s: no rate table for channel; freq %u flags 0x%x\n", __func__, c->ic_freq, c->ic_flags); } - c->ic_rt = rt; + return rt; } #ifdef notyet @@ -402,9 +402,8 @@ #endif /* notyet */ enum ieee80211_phytype -ieee80211_rate2phytype(const struct ieee80211_channel *c, uint8_t rate) +ieee80211_rate2phytype(const struct ieee80211_rate_table *rt, uint8_t rate) { - const struct ieee80211_rate_table *rt = c->ic_rt; uint8_t rix = rt->rateCodeToIndex[rate]; KASSERT(rix != (uint8_t)-1, ("rate %d has no info", rate)); @@ -418,10 +417,9 @@ * sent using rate, phy and short preamble setting. */ uint16_t -ieee80211_ack_duration(const struct ieee80211_channel *c, +ieee80211_ack_duration(const struct ieee80211_rate_table *rt, uint8_t rate, int flags) { - const struct ieee80211_rate_table *rt = c->ic_rt; uint8_t rix = rt->rateCodeToIndex[rate]; KASSERT(rix != (uint8_t)-1, ("rate %d has no info", rate)); @@ -437,10 +435,10 @@ } uint16_t -ieee80211_compute_duration(const struct ieee80211_channel *c, +ieee80211_compute_duration(const struct ieee80211_rate_table *rt, uint32_t frameLen, uint16_t rate, int flags) { - return ieee80211_compute_dur(c->ic_rt, frameLen, rate, flags); + return ieee80211_compute_dur(rt, frameLen, rate, flags); } /* ==== //depot/projects/wifi/sys/net80211/ieee80211_phy.h#4 (text+ko) ==== @@ -31,17 +31,19 @@ #ifdef _KERNEL struct ieee80211_channel; +struct ieee80211_rate_table; /* Initialization functions */ void ieee80211_phy_init(void); -void ieee80211_set_ratetable(struct ieee80211_channel *); +const struct ieee80211_rate_table *ieee80211_get_ratetable( + const struct ieee80211_channel *); -uint16_t ieee80211_ack_duration(const struct ieee80211_channel *, +uint16_t ieee80211_ack_duration(const struct ieee80211_rate_table *, uint8_t, int); -uint16_t ieee80211_compute_duration(const struct ieee80211_channel *, +uint16_t ieee80211_compute_duration(const struct ieee80211_rate_table *, uint32_t, uint16_t, int); enum ieee80211_phytype ieee80211_rate2phytype( - const struct ieee80211_channel *, uint8_t); + const struct ieee80211_rate_table *, uint8_t); #endif /* _KERNEL */ From owner-p4-projects@FreeBSD.ORG Tue Feb 5 13:29:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1623216A476; Tue, 5 Feb 2008 13:29:52 +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 CE0A516A524 for ; Tue, 5 Feb 2008 13:29:51 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BADD513C4CE for ; Tue, 5 Feb 2008 13:29:51 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m15DTpoI052739 for ; Tue, 5 Feb 2008 13:29:51 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m15DTp3P052736 for perforce@freebsd.org; Tue, 5 Feb 2008 13:29:51 GMT (envelope-from thioretic@FreeBSD.org) Date: Tue, 5 Feb 2008 13:29:51 GMT Message-Id: <200802051329.m15DTp3P052736@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 134837 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 13:29:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=134837 Change 134837 by thioretic@thioretic on 2008/02/05 13:29:02 Some minor fixes Affected files ... .. //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#7 edit .. //depot/projects/soc2007/thioretic_gidl2/sys/ior_types.h#1 add Differences ... ==== //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#7 (text+ko) ==== @@ -10,6 +10,7 @@ #include #include #include +#include static MALLOC_DEFINE(M_BUS_IO, "bus_io", "Bus io subsystem data structures"); @@ -29,20 +30,7 @@ int work_kthreads_to_wait_on; struct ior { -#define OPEN 1 -#define FDOPEN 2 -#define CLOSE 3 -#define READ 4 -#define WRITE 5 -#define IOCTL 6 -#define POLL 7 -#define MMAP 8 -#define STRATEGY 9 -#define DUMP 10 -#define KQFILTER 11 -#define PURGE 12 -#define SPARE2 13 - u_int32_t type; + u_int32_t type; //see sys/ior_types.h void* data; #define IORS_NONE 0 #define IORS_ENQUEUED 1<<0 @@ -79,7 +67,7 @@ ior_t todo; int flags; - struct mtx guard_spin_mtx; + struct mtx guard_mtx; }; static ior_queue ior_queues[IOR_QUEUES_NUM]; @@ -155,10 +143,10 @@ break; } TAILQ_INSERT_TAIL(&work_kthreads, pwk, link); - }while (work_kthreads_num < ++cur_work_kthreads_num); + }while (work_kthreads_num > ++cur_work_kthreads_num); } else{ - cur_work_kthreads_num = work_kthreads_num; + cur_work_kthreads_num = work_kthreads_num - old_work_kthreads_num; TAILQ_FOREACH(pwk, &work_kthreads, link){ if(cur_work_kthreads_num) cur_work_kthreads_num--; @@ -179,7 +167,7 @@ error = sysctl_handle_int(oidp, &value, sizeof(value), req); if (!error && req->newptr){ if (value > 0){ - old_work_kthreads_num = work_kthreds_num; + old_work_kthreads_num = work_kthreads_num; work_kthreads_num = value; reset_work_kthreads (); }else @@ -199,9 +187,9 @@ for (i = 0; i < IOR_QUEUES_NUM; i++){ ior_queues[i]->iors = TAILQ_HEAD_INITIALIZER(ior_queues[i]->iors); - mtx_init (&ior_queues[i]->guard_spin_mtx, + mtx_init (&ior_queues[i]->guard_mtx, "ior_queue_mtx", - NULL, MTX_SPIN); + NULL, MTX_DEF); } reset_work_kthreads(); @@ -216,23 +204,23 @@ retry: for (qid; qid < IOR_QUEUES_NUM; qid++){ q = ior_queues[qid]; - if (r = q.todo) + if (r = q.todo){ + ior_lock (r); + mtx_lock (&q.guard_mtx); break; + } } if (qid == IOR_QUEUES_NUM) return (1); - ior_lock (r); - mtx_lock_spin(&q.guard_spin_mtx); - if (r->state != IORS_ENQUEUED){ - mtx_unlock_spin (&q.guard_spin_mtx); + mtx_unlock (&q.guard_mtx); ior_unlock (r); goto retry; } q.todo = TAILQ_NEXT(r, link); - mtx_unlock_spin (&q.guard_spin_mtx); + mtx_unlock (&q.guard_mtx); r->state = IORS_OWNED; ior_unlock (r); @@ -386,13 +374,13 @@ return (); } - mtx_lock_spin (&q.guard_spin_mtx); + mtx_lock (&q.guard_mtx); TAILQ_INSERT_TAIL (&q.iors, r, link); if (q.todo == NULL) q.todo = r; - mtx_unlock_spin (&q.guard_spin_mtx); + mtx_unlock (&q.guard_mtx); r->queue_id = queue_id + 1; r->state = IORS_ENQUEUED; @@ -414,18 +402,18 @@ ior_lock (r); - if (r->state != IOR_ENQUEUED || r->children){ + if (r->state != IORS_ENQUEUED || r->children){ ior_unlock (r); return (1); } - mtx_lock_spin (&q.guard_spin_mtx); + mtx_lock (&q.guard_mtx); if (q.todo == r) q.todo = TAILQ_NEXT (r, link); TAILQ_REMOVE (&q.iors, r, link); - mtx_unlock_spin (&q.quard_spin_mtx); + mtx_unlock (&q.quard_mtx); r->state = IORS_NONE; From owner-p4-projects@FreeBSD.ORG Tue Feb 5 18:21:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 364F016A468; Tue, 5 Feb 2008 18:21:12 +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 D6C9716A420; Tue, 5 Feb 2008 18:21:11 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9B78613C455; Tue, 5 Feb 2008 18:21:11 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id AD52C47B86; Tue, 5 Feb 2008 13:21:10 -0500 (EST) Date: Tue, 5 Feb 2008 18:21:10 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Birrell In-Reply-To: <200802050929.m159Tc2s024644@repoman.freebsd.org> Message-ID: <20080205182026.D49855@fledge.watson.org> References: <200802050929.m159Tc2s024644@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Perforce Change Reviews Subject: Re: PERFORCE change 134831 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 18:21:12 -0000 On Tue, 5 Feb 2008, John Birrell wrote: > http://perforce.freebsd.org/chv.cgi?CH=134831 > > Change 134831 by jb@jb_freebsd1 on 2008/02/05 09:29:08 > > We define FOPEN_MAX as 20. What a joke. I thought the comment was entertaining, apparently I'd never noticed that before: /* * FOPEN_MAX is a minimum maximum, and is the number of streams that * stdio can provide without attempting to allocate further resources * (which could fail). Do not use this for anything. */ Some piece of code clearly loses on this front..? Robert N M Watson Computer Laboratory University of Cambridge > > Affected files ... > > .. //depot/projects/dtrace/src/contrib/one-true-awk/run.c#5 edit > > Differences ... > > ==== //depot/projects/dtrace/src/contrib/one-true-awk/run.c#5 (text+ko) ==== > > @@ -63,6 +63,8 @@ > /* #ifndef RAND_MAX */ > /* #define RAND_MAX 32767 */ /* all that ansi guarantees */ > /* #endif */ > +#undef FOPEN_MAX > +#define FOPEN_MAX 40 > > jmp_buf env; > extern int pairstack[]; > From owner-p4-projects@FreeBSD.ORG Tue Feb 5 20:10:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C399A16A469; Tue, 5 Feb 2008 20:10:02 +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 701C116A417; Tue, 5 Feb 2008 20:10:02 +0000 (UTC) (envelope-from jb@what-creek.com) Received: from what-creek.com (what-creek.com [66.111.37.70]) by mx1.freebsd.org (Postfix) with ESMTP id 37FB713C4E1; Tue, 5 Feb 2008 20:10:02 +0000 (UTC) (envelope-from jb@what-creek.com) Received: by what-creek.com (Postfix, from userid 102) id BFA7F732AD; Tue, 5 Feb 2008 20:10:01 +0000 (GMT) Date: Tue, 5 Feb 2008 20:10:01 +0000 From: John Birrell To: Robert Watson Message-ID: <20080205201001.GB24780@what-creek.com> References: <200802050929.m159Tc2s024644@repoman.freebsd.org> <20080205182026.D49855@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080205182026.D49855@fledge.watson.org> User-Agent: Mutt/1.4.2.3i Cc: John Birrell , Perforce Change Reviews Subject: Re: PERFORCE change 134831 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 20:10:03 -0000 On Tue, Feb 05, 2008 at 06:21:10PM +0000, Robert Watson wrote: > On Tue, 5 Feb 2008, John Birrell wrote: > > >http://perforce.freebsd.org/chv.cgi?CH=134831 > > > >Change 134831 by jb@jb_freebsd1 on 2008/02/05 09:29:08 > > > > We define FOPEN_MAX as 20. What a joke. > > I thought the comment was entertaining, apparently I'd never noticed that > before: > > /* > * FOPEN_MAX is a minimum maximum, and is the number of streams that > * stdio can provide without attempting to allocate further resources > * (which could fail). Do not use this for anything. > */ > > Some piece of code clearly loses on this front..? Yes, our awk. When I add another temporary file to sys/kern/makesyscalls.sh, awk can't handle it. "one-true-awk .... except when you need to use gawk." hehe -- John Birrell From owner-p4-projects@FreeBSD.ORG Tue Feb 5 20:54:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF7F816A41B; Tue, 5 Feb 2008 20:54:43 +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 6CBE316A41A for ; Tue, 5 Feb 2008 20:54:43 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5945B13C478 for ; Tue, 5 Feb 2008 20:54:43 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m15Ksh4F009130 for ; Tue, 5 Feb 2008 20:54:43 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m15KshZV009127 for perforce@freebsd.org; Tue, 5 Feb 2008 20:54:43 GMT (envelope-from thioretic@FreeBSD.org) Date: Tue, 5 Feb 2008 20:54:43 GMT Message-Id: <200802052054.m15KshZV009127@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 134858 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 20:54:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=134858 Change 134858 by thioretic@thioretic on 2008/02/05 20:54:39 Add io protos to bus.h Affected files ... .. //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#8 edit .. //depot/projects/soc2007/thioretic_gidl2/sys/bus.h#8 edit Differences ... ==== //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#8 (text+ko) ==== @@ -39,6 +39,7 @@ #define IORF_DONE 1<<0 #define IORF_INVALIDATE 1<<1 #define IORF_RETRY 1<<2 +#define IORF_TODESTROY 1<<3 u_int32_t flags; ior_link_list_t parents; /*ior_link_list_t*/ int children; @@ -51,7 +52,6 @@ TAILQ_ENTRY (ior) link; }; -typedef struct ior* ior_t; struct ior_link { ior_t iorp; @@ -70,6 +70,9 @@ struct mtx guard_mtx; }; +#define IOR_QUEUES_NUM 1 +#define IOR_QUEUE_DEF 0 + static ior_queue ior_queues[IOR_QUEUES_NUM]; static struct mtx iors_list_mtx; @@ -234,8 +237,8 @@ } ior_t -create_ior (device_t origin, int type, void* data, - ior_t* parents, int pcount, char* path, int enqueue){ +ior_create (device_t origin, int type, void* data, + ior_t* parents, int pcount, char* path, int enqueue, int queue_id){ ior_t new_ior; ior_link_t il, il2, cil, *ils; int i = 0, error = 0, path_len; @@ -277,13 +280,36 @@ new_ior->origin = origin; if (enqueue){ - ior_enqueue (new_ior); + ior_enqueue_adv (new_ior, queue_id); } return (new_ior); } +static void +ior_destroy_async (ior_t r){ + devicelink_t dl; + + while (dl = TAILQ_FIRST (&r->path)){ + TAILQ_REMOVE (&r->path, dl, link); + } + mtx_destroy (r->guard_spin_mtx); + free (r); +} + +int +ior_destroy (ior_t r){ + if (!TAILQ_EMPTY (&new_ior->parents)) + return (0); + if (ior_get_state (r) == IORS_NONE){ + ior_destroy_async (r); + } else { + ior_set_flags (r, ior_get_flags (r) | IORF_TODESTROY); + } + return (1); +} + void ior_set_state (ior_t r, u_int32_t val){ r->state = val; @@ -363,7 +389,7 @@ return (0); } -static void //static for now +void //static for now ior_enqueue_adv (ior_t r, int queue_id){ ior_queue q = ior_queues[queue_id]; @@ -427,17 +453,17 @@ return (ior_dequeue_adv (r, r->queue_id)); } -void +static void ior_lock (ior_t r){ mtx_lock_spin (&r->guard_spin_mtx); } -void +static void ior_unlock (ior_t r){ mtx_unlock_spin (&r->guard_spin_mtx); } -static int +static void ior_do (ior_t r){ devicelink_t nextdev; @@ -455,6 +481,11 @@ r->curdev = nextdev; IOR_DO (r->curdev->device_ptr, r); + if (ior_get_flags(r) & IORF_TODESTOY){ + ior_destroy_async (r); + return; + } + if ((nextdev = TAILQ_NEXT(r->curdev, link)) && (device_get_flags(nextdev->device_ptr) & DF_ENQUEUEIORS)) break; @@ -462,7 +493,7 @@ ior_enqueue_adv (r, r->queue_id); } -static int +static void ior_done (ior_t r){ devicelink_t nextdev; @@ -479,6 +510,11 @@ r->curdev = nextdev; IOR_DONE (r->curdev->device_ptr, r); + + if (ior_get_flags(r) & IORF_TODESTOY){ + ior_destroy_async (r); + return; + } if ((nextdev = TAILQ_NEXT(r->curdev, link)) && (device_get_flags(nextdev->device_ptr) & DF_ENQUEUEIORS)) ==== //depot/projects/soc2007/thioretic_gidl2/sys/bus.h#8 (text+ko) ==== @@ -743,6 +743,26 @@ REL_CHILD | REL_PARENT, /* EV_SHUTDOWN */ /* TODO */ }; +#define IOR_QUEUES_NUM 1 +#define IOR_QUEUE_DEF 0 + +struct ior; +typedef struct ior* ior_t; + +ior_t ior_create (device_t origin, int type, void* data, + ior_t *parents, int pcount, char* path, + int enqueue, int queue_id); +int ior_destroy (ior_t r); +void ior_set_state (ior_t r, u_int32_t val); +u_int32_t ior_get_state (ior_t r); +void ior_set_flags (ior_t r, u_int32_t val); +u_int32_t ior_get_flags (ior_t r); +int ior_set_path (ior_t r, device_t origin, char* path); +int ior_get_path (ior_t r, device_t** dev_path, int* path_len); +void ior_enqueue_adv (ior_t r, int queue_id); +void ior_enqueue (ior_t r); +int ior_dequeue (ior_t r); + #endif /* _KERNEL */ #endif /* !_SYS_BUS_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Feb 6 00:33:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9C76B16A419; Wed, 6 Feb 2008 00:33:33 +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 624B116A417 for ; Wed, 6 Feb 2008 00:33:33 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5C80313C45A for ; Wed, 6 Feb 2008 00:33:33 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m160XWV4030814 for ; Wed, 6 Feb 2008 00:33:32 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m160XWMD030811 for perforce@freebsd.org; Wed, 6 Feb 2008 00:33:32 GMT (envelope-from imp@freebsd.org) Date: Wed, 6 Feb 2008 00:33:32 GMT Message-Id: <200802060033.m160XWMD030811@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 134864 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 00:33:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=134864 Change 134864 by imp@imp_lighthouse on 2008/02/06 00:33:22 Get ASTs kinda sorta working, some of the time... this is lame and likely needs to be torn our of trap.c and moved to exception.S to get it to really work... Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#9 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#9 (text+ko) ==== @@ -828,7 +828,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); -#ifdef GONE_IN_7 /* * XXX ast still need to happen * @@ -872,7 +871,6 @@ if (curthread->td_flags & (TDF_ASTPENDING|TDF_NEEDRESCHED)) { ast(trapframe); } -#endif return (trapframe->pc); } @@ -1080,11 +1078,8 @@ */ userret(td, trapframe); mtx_assert(&Giant, MA_NOTOWNED); -#ifdef GONE_IN_7 - if (curthread->td_flags & (TDF_ASTPENDING | TDF_NEEDRESCHED)) { + if (curthread->td_flags & (TDF_ASTPENDING | TDF_NEEDRESCHED)) ast(trapframe); - } -#endif return (trapframe->pc); } From owner-p4-projects@FreeBSD.ORG Wed Feb 6 06:02:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 153FE16A468; Wed, 6 Feb 2008 06:02:55 +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 CF12B16A41B for ; Wed, 6 Feb 2008 06:02:54 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BE0BD13C457 for ; Wed, 6 Feb 2008 06:02:54 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1662sYZ073180 for ; Wed, 6 Feb 2008 06:02:54 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1662sa2073177 for perforce@freebsd.org; Wed, 6 Feb 2008 06:02:54 GMT (envelope-from imp@freebsd.org) Date: Wed, 6 Feb 2008 06:02:54 GMT Message-Id: <200802060602.m1662sa2073177@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 134877 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 06:02:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=134877 Change 134877 by imp@imp_lighthouse on 2008/02/06 06:02:38 from current. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/tools/embed_mfs.sh#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Wed Feb 6 06:47:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7DB1216A419; Wed, 6 Feb 2008 06:47: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 435DC16A41B for ; Wed, 6 Feb 2008 06:47:42 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3247713C46A for ; Wed, 6 Feb 2008 06:47:42 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m166lfWb076899 for ; Wed, 6 Feb 2008 06:47:41 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m166lfFl076896 for perforce@freebsd.org; Wed, 6 Feb 2008 06:47:41 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 6 Feb 2008 06:47:41 GMT Message-Id: <200802060647.m166lfFl076896@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134879 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 06:47:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=134879 Change 134879 by kmacy@kmacy:storage:toehead on 2008/02/06 06:46:58 fix endian issues and tcb fetch Affected files ... .. //depot/projects/toehead/usr.sbin/cxgbtool/cxgbtool.c#2 edit Differences ... ==== //depot/projects/toehead/usr.sbin/cxgbtool/cxgbtool.c#2 (text+ko) ==== @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -695,11 +696,9 @@ return 0; } -#if __BYTE_ORDER == __BIG_ENDIAN -# define ntohll(n) (n) -#else -# define ntohll(n) bswap_64(n) -#endif + +#define ntohll(n) be64toh((n)) + static int get_sge_desc(int argc, char *argv[], int start_arg, const char *iff_name) @@ -747,25 +746,28 @@ } #endif -#ifdef notyet static int get_tcb2(unsigned int tcb_idx, const char *iff_name) { uint64_t *d; unsigned int i; - struct toetool_mem_range *op; - - op = malloc(sizeof(*op) + TCB_SIZE); + struct ch_mem_range *op; + char buf[TCB_SIZE]; + + op = malloc(sizeof(*op)); if (!op) err(1, "get TCB"); - op->cmd = TOETOOL_GET_MEM; op->mem_id = MEM_CM; op->addr = tcb_idx * TCB_SIZE; op->len = TCB_SIZE; - - if (doit(iff_name, op) < 0) + op->buf = buf; + + if (doit(iff_name, CHELSIO_GET_MEM, op) < 0) { + printf("failed to get mem\n"); + err(1, "get TCB"); - + } + for (d = (uint64_t *)op->buf, i = 0; i < TCB_SIZE / 32; i++) { printf("%2u:", i); printf(" %08x %08x %08x %08x", (uint32_t)d[1], @@ -785,11 +787,11 @@ { int i; uint32_t *d; - struct toetool_tcb op; + struct ch_tcb op; if (argc != start_arg + 1) return -1; - op.cmd = TOETOOL_GET_TCB; + op.cmd = CH_GET_TCB; if (get_int_arg(argv[start_arg], &op.tcb_index)) return -1; @@ -797,9 +799,13 @@ * If this operation isn't directly supported by the driver we may * still be able to read TCBs using the generic memory dump operation. */ - if (doit(iff_name, &op) < 0) { - if (errno != EOPNOTSUPP) + if (doit(iff_name, CHELSIO_GET_TCB, &op) < 0) { + if (errno != EOPNOTSUPP) { + printf("fail\n"); + err(1, "get TCB"); + } + return get_tcb2(op.tcb_index, iff_name); } @@ -813,7 +819,7 @@ } return 0; } -#endif + #ifdef WRC /* * The following defines, typedefs and structures are defined in the FW and @@ -1755,8 +1761,10 @@ r = conf_pm(argc, argv, 3, iff_name); else if (!strcmp(argv[2], "tcam")) r = conf_tcam(argc, argv, 3, iff_name); +#endif else if (!strcmp(argv[2], "tcb")) r = get_tcb(argc, argv, 3, iff_name); +#ifdef notyet #ifdef WRC else if (!strcmp(argv[2], "wrc")) r = get_wrc(argc, argv, 3, iff_name); From owner-p4-projects@FreeBSD.ORG Wed Feb 6 13:13:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C8E816A418; Wed, 6 Feb 2008 13:13:49 +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 DD1E816A420 for ; Wed, 6 Feb 2008 13:13:48 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B3D2D13C447 for ; Wed, 6 Feb 2008 13:13:48 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16DDmGx017649 for ; Wed, 6 Feb 2008 13:13:48 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16DDcpI017614 for perforce@freebsd.org; Wed, 6 Feb 2008 13:13:38 GMT (envelope-from sephe@FreeBSD.org) Date: Wed, 6 Feb 2008 13:13:38 GMT Message-Id: <200802061313.m16DDcpI017614@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 134893 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 13:13:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=134893 Change 134893 by sephe@sephe_enigma:sam_wifi on 2008/02/06 13:12:51 IFC (with -id) Affected files ... .. //depot/projects/wifi/Makefile.inc1#40 integrate .. //depot/projects/wifi/contrib/hostapd/aes.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/ap_list.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/ap_list.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/beacon.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/beacon.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/build_config.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/des.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_aka.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_gpsk.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_gpsk_common.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_gpsk_common.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_methods.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_methods.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_sake.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_sake_common.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_sake_common.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/eap_vendor_test.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/eloop_none.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/eloop_win.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/hlr_auc_gw.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/hlr_auc_gw.milenage_db#2 integrate .. //depot/projects/wifi/contrib/hostapd/hostapd.vlan#2 integrate .. //depot/projects/wifi/contrib/hostapd/hw_features.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/hw_features.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/ieee802_11h.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/ieee802_11h.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/includes.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/md4.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/milenage.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/milenage.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/mlme.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/mlme.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/os.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/os_unix.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/pmksa_cache.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/pmksa_cache.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/preauth.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/preauth.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/reconfig.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/sha256.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/sha256.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/state_machine.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/tls_gnutls.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/vlan_init.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/vlan_init.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/wme.c#2 integrate .. //depot/projects/wifi/contrib/hostapd/wme.h#2 integrate .. //depot/projects/wifi/contrib/hostapd/wpa_common.h#2 integrate .. //depot/projects/wifi/contrib/pf/pflogd/pidfile.c#3 integrate .. //depot/projects/wifi/contrib/pf/pflogd/pidfile.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/aes.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/asn1.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/asn1.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/asn1_test.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/bignum.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/bignum.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/build_config.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/config_none.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/config_winreg.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/crypto_cryptoapi.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/crypto_internal.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/crypto_libtomcrypt.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/crypto_none.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_dbus.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_dbus.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_dbus_handlers.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_dbus_handlers.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_named_pipe.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_udp.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_unix.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/dbus-wpa_supplicant.conf#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/dbus_dict_helpers.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/dbus_dict_helpers.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/des.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/driver_ndis_.c#4 delete .. //depot/projects/wifi/contrib/wpa_supplicant/eap_gpsk.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eap_gpsk_common.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eap_gpsk_common.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eap_methods.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eap_methods.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eap_sake.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eap_sake_common.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eap_sake_common.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eap_vendor_test.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eloop_none.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/eloop_win.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/includes.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/libtommath.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/md4.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/mlme.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/mlme.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/nmake.mak#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/openssl-0.9.8d-tls-extensions.patch#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/os.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/os_unix.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/pmksa_cache.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/pmksa_cache.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/rsa.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/rsa.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/sha256.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/sha256.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/state_machine.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/tls_internal.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/tlsv1_client.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/tlsv1_client.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/tlsv1_common.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/tlsv1_common.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/wpa_common.h#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/wpa_gui-qt4/eventhistory.ui.h#3 delete .. //depot/projects/wifi/contrib/wpa_supplicant/wpa_gui-qt4/networkconfig.ui.h#3 delete .. //depot/projects/wifi/contrib/wpa_supplicant/wpa_gui-qt4/scanresults.ui.h#3 delete .. //depot/projects/wifi/contrib/wpa_supplicant/wpa_gui-qt4/userdatarequest.ui.h#3 delete .. //depot/projects/wifi/contrib/wpa_supplicant/wpa_gui-qt4/wpagui.ui.h#3 delete .. //depot/projects/wifi/contrib/wpa_supplicant/x509v3.c#2 integrate .. //depot/projects/wifi/contrib/wpa_supplicant/x509v3.h#2 integrate .. //depot/projects/wifi/include/pthread_np.h#4 integrate .. //depot/projects/wifi/lib/libc/net/getaddrinfo.c#13 integrate .. //depot/projects/wifi/lib/libc/stdlib/malloc.3#9 integrate .. //depot/projects/wifi/lib/libc/stdlib/malloc.c#11 integrate .. //depot/projects/wifi/lib/libc/sys/sendfile.2#5 integrate .. //depot/projects/wifi/lib/libelf/gelf_fsize.3#2 integrate .. //depot/projects/wifi/lib/librpcsvc/Makefile#7 integrate .. //depot/projects/wifi/lib/librpcsvc/xcrypt.c#3 integrate .. //depot/projects/wifi/lib/libthr/pthread.map#11 integrate .. //depot/projects/wifi/lib/libthr/thread/thr_mutex.c#10 integrate .. //depot/projects/wifi/lib/msun/src/e_expf.c#6 integrate .. //depot/projects/wifi/libexec/rtld-aout/support.c#3 delete .. //depot/projects/wifi/libexec/rtld-aout/support.h#3 delete .. //depot/projects/wifi/release/fixit.profile#4 integrate .. //depot/projects/wifi/sbin/geom/core/geom.8#9 integrate .. //depot/projects/wifi/sbin/geom/core/geom.c#14 integrate .. //depot/projects/wifi/sbin/gpt/gpt.8#11 integrate .. //depot/projects/wifi/sbin/gpt/migrate.c#6 integrate .. //depot/projects/wifi/sbin/gpt/show.c#6 integrate .. //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#74 integrate .. //depot/projects/wifi/sbin/iscontrol/misc.c#2 integrate .. //depot/projects/wifi/sbin/mount/mount.c#14 integrate .. //depot/projects/wifi/sbin/natd/natd.8#5 integrate .. //depot/projects/wifi/share/colldef/el_GR.ISO8859-7.src#2 integrate .. //depot/projects/wifi/share/man/man4/Makefile#45 integrate .. //depot/projects/wifi/share/man/man4/hptiop.4#2 integrate .. //depot/projects/wifi/share/man/man4/hptrr.4#2 integrate .. //depot/projects/wifi/share/man/man9/lock.9#9 integrate .. //depot/projects/wifi/share/misc/committers-src.dot#7 integrate .. //depot/projects/wifi/share/mk/bsd.dep.mk#5 integrate .. //depot/projects/wifi/sys/arm/arm/genassym.c#9 integrate .. //depot/projects/wifi/sys/arm/arm/locore.S#12 integrate .. //depot/projects/wifi/sys/arm/arm/swtch.S#15 integrate .. //depot/projects/wifi/sys/arm/include/asmacros.h#6 integrate .. //depot/projects/wifi/sys/arm/include/atomic.h#17 integrate .. //depot/projects/wifi/sys/arm/include/sysarch.h#4 integrate .. //depot/projects/wifi/sys/conf/Makefile.arm#15 integrate .. //depot/projects/wifi/sys/conf/kern.post.mk#16 integrate .. //depot/projects/wifi/sys/dev/hptiop/hptiop.c#3 integrate .. //depot/projects/wifi/sys/dev/hptiop/hptiop.h#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/array.h#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/him.h#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/himfuncs.h#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/hptintf.h#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/hptrr_config.c#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/hptrr_config.h#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/hptrr_os_bsd.c#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/hptrr_osm_bsd.c#3 integrate .. //depot/projects/wifi/sys/dev/hptrr/i386-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/ldm.h#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/list.h#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/os_bsd.h#2 integrate .. //depot/projects/wifi/sys/dev/hptrr/osm.h#2 integrate .. //depot/projects/wifi/sys/dev/wpi/if_wpi.c#4 integrate .. //depot/projects/wifi/sys/dev/wpi/if_wpireg.h#2 integrate .. //depot/projects/wifi/sys/dev/wpi/if_wpivar.h#2 integrate .. //depot/projects/wifi/sys/ia64/ia64/locore.S#4 integrate .. //depot/projects/wifi/sys/ia64/ia64/machdep.c#22 integrate .. //depot/projects/wifi/sys/ia64/include/md_var.h#7 integrate .. //depot/projects/wifi/sys/kern/kern_lock.c#22 integrate .. //depot/projects/wifi/sys/kern/kern_rwlock.c#13 integrate .. //depot/projects/wifi/sys/kern/kern_timeout.c#13 integrate .. //depot/projects/wifi/sys/kern/subr_lock.c#9 integrate .. //depot/projects/wifi/sys/kern/subr_turnstile.c#14 integrate .. //depot/projects/wifi/sys/kern/uipc_sockbuf.c#9 integrate .. //depot/projects/wifi/sys/kern/uipc_socket.c#34 integrate .. //depot/projects/wifi/sys/kern/uipc_syscalls.c#30 integrate .. //depot/projects/wifi/sys/modules/wpi/Makefile#3 integrate .. //depot/projects/wifi/sys/netgraph/ng_bpf.c#6 integrate .. //depot/projects/wifi/sys/netgraph/ng_tee.c#4 integrate .. //depot/projects/wifi/sys/sys/lockmgr.h#12 integrate .. //depot/projects/wifi/sys/sys/param.h#35 integrate .. //depot/projects/wifi/sys/sys/proc.h#38 integrate .. //depot/projects/wifi/sys/sys/rwlock.h#9 integrate .. //depot/projects/wifi/sys/sys/socket.h#13 integrate .. //depot/projects/wifi/sys/sys/socketvar.h#16 integrate .. //depot/projects/wifi/sys/tools/embed_mfs.sh#1 branch .. //depot/projects/wifi/tools/regression/pthread/mutex_islocked_np/Makefile#1 branch .. //depot/projects/wifi/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c#1 branch .. //depot/projects/wifi/tools/tools/crypto/cryptostats.c#2 integrate .. //depot/projects/wifi/tools/tools/crypto/cryptotest.c#5 integrate .. //depot/projects/wifi/usr.bin/calendar/calendars/calendar.freebsd#27 integrate .. //depot/projects/wifi/usr.bin/kdump/Makefile#4 integrate .. //depot/projects/wifi/usr.bin/logger/logger.c#5 integrate .. //depot/projects/wifi/usr.bin/truss/Makefile#5 integrate .. //depot/projects/wifi/usr.sbin/ypserv/yp_main.c#4 integrate .. //depot/projects/wifi/usr.sbin/ypserv/ypserv.8#4 integrate Differences ... ==== //depot/projects/wifi/Makefile.inc1#40 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.596 2008/01/23 22:21:36 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.598 2008/02/05 15:41:58 des Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -313,8 +313,9 @@ .endif .else rm -rf ${WORLDTMP}/legacy/usr/include -# XXX - These two can depend on any header file. +# XXX - These three can depend on any header file. rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c + rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ ==== //depot/projects/wifi/contrib/hostapd/aes.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/ap_list.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/ap_list.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/beacon.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/beacon.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/build_config.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/des.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_aka.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_gpsk.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_gpsk_common.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_gpsk_common.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_methods.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_methods.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_sake.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_sake_common.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_sake_common.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eap_vendor_test.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eloop_none.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/eloop_win.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/hlr_auc_gw.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/hlr_auc_gw.milenage_db#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/hostapd.vlan#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/hw_features.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/hw_features.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/ieee802_11h.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/ieee802_11h.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/includes.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/md4.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/milenage.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/milenage.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/mlme.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/mlme.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/os.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/os_unix.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/pmksa_cache.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/pmksa_cache.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/preauth.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/preauth.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/reconfig.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/sha256.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/sha256.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/state_machine.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/tls_gnutls.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/vlan_init.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/vlan_init.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/wme.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/wme.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/hostapd/wpa_common.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/pf/pflogd/pidfile.c#3 (text+ko) ==== ==== //depot/projects/wifi/contrib/pf/pflogd/pidfile.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/aes.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/asn1.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/asn1.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/asn1_test.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/bignum.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/bignum.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/build_config.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/config_none.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/config_winreg.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/crypto_cryptoapi.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/crypto_internal.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/crypto_libtomcrypt.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/crypto_none.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_dbus.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_dbus.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_dbus_handlers.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_dbus_handlers.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_named_pipe.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_udp.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/ctrl_iface_unix.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/dbus-wpa_supplicant.conf#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/dbus_dict_helpers.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/dbus_dict_helpers.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/des.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eap_gpsk.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eap_gpsk_common.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eap_gpsk_common.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eap_methods.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eap_methods.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eap_sake.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eap_sake_common.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eap_sake_common.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eap_vendor_test.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eloop_none.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/eloop_win.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/includes.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/libtommath.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/md4.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/mlme.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/mlme.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/nmake.mak#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/openssl-0.9.8d-tls-extensions.patch#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/os.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/os_unix.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/pmksa_cache.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/pmksa_cache.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/rsa.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/rsa.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/sha256.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/sha256.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/state_machine.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/tls_internal.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/tlsv1_client.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/tlsv1_client.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/tlsv1_common.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/tlsv1_common.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/wpa_common.h#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/x509v3.c#2 (text+ko) ==== ==== //depot/projects/wifi/contrib/wpa_supplicant/x509v3.h#2 (text+ko) ==== ==== //depot/projects/wifi/include/pthread_np.h#4 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/include/pthread_np.h,v 1.18 2007/12/14 06:25:56 davidxu Exp $ + * $FreeBSD: src/include/pthread_np.h,v 1.19 2008/02/03 22:38:10 des Exp $ */ #ifndef _PTHREAD_NP_H_ #define _PTHREAD_NP_H_ @@ -53,6 +53,7 @@ int pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); int pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count); int pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count); +int pthread_mutex_islocked_np(pthread_mutex_t *mutex); int pthread_single_np(void); void pthread_suspend_all_np(void); int pthread_suspend_np(pthread_t); ==== //depot/projects/wifi/lib/libc/net/getaddrinfo.c#13 (text+ko) ==== @@ -54,7 +54,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.86 2007/09/05 18:08:14 jinmei Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.87 2008/02/03 19:07:55 ume Exp $"); #include "namespace.h" #include @@ -425,27 +425,6 @@ } /* - * post-2553: AI_ALL and AI_V4MAPPED are effective only against - * AF_INET6 query. They need to be ignored if specified in other - * occassions. - */ - switch (pai->ai_flags & (AI_ALL | AI_V4MAPPED)) { - case AI_V4MAPPED: - case AI_ALL | AI_V4MAPPED: - if (pai->ai_family != AF_INET6) - pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED); - break; - case AI_ALL: -#if 1 - /* illegal */ - ERR(EAI_BADFLAGS); -#else - pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED); -#endif - break; - } - - /* * check for special cases. (1) numeric servname is disallowed if * socktype/protocol are left unspecified. (2) servname is disallowed * for raw and other inet{,6} sockets. ==== //depot/projects/wifi/lib/libc/stdlib/malloc.3#9 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.76 2008/01/03 23:22:13 jasone Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.77 2008/02/06 02:59:54 jasone Exp $ .\" -.Dd January 3, 2008 +.Dd February 5, 2008 .Dt MALLOC 3 .Os .Sh NAME @@ -95,7 +95,7 @@ The contents of the memory are unchanged up to the lesser of the new and old sizes. If the new size is larger, -the value of the newly allocated portion of the memory is undefined. +the contents of the newly allocated portion of the memory are undefined. Upon success, the memory referenced by .Fa ptr is freed and a pointer to the newly allocated memory is returned. @@ -204,15 +204,16 @@ See the .Dq M option for related information and interactions. -.It H -Use -.Xr madvise 2 -when pages within a chunk are no longer in use, but the chunk as a whole cannot -yet be deallocated. -This is primarily of use when swapping is a real possibility, due to the high -overhead of the -.Fn madvise -system call. +.It F +Double/halve the per-arena maximum number of dirty unused pages that are +allowed to accumulate before informing the kernel about at least half of those +pages via +.Xr madvise 2 . +This provides the kernel with sufficient information to recycle dirty pages if +physical memory becomes scarce and the pages remain unused. +The default is 512 pages per arena; +.Ev MALLOC_OPTIONS=10f +will prevent any dirty unused pages from accumulating. .It J Each byte of new memory allocated by .Fn malloc , @@ -384,11 +385,12 @@ Huge objects are used by applications infrequently enough that this single data structure is not a scalability issue. .Pp -Each chunk that is managed by an arena tracks its contents in a page map as -runs of contiguous pages (unused, backing a set of small objects, or backing -one large object). +Each chunk that is managed by an arena tracks its contents as runs of +contiguous pages (unused, backing a set of small objects, or backing one large +object). The combination of chunk alignment and chunk page maps makes it possible to -determine all metadata regarding small and large allocations in constant time. +determine all metadata regarding small and large allocations in +constant and logarithmic time, respectively. .Pp Small objects are managed in groups by page runs. Each run maintains a bitmap that tracks which regions are in use. ==== //depot/projects/wifi/lib/libc/stdlib/malloc.c#11 (text+ko) ==== @@ -134,7 +134,7 @@ #define MALLOC_DSS #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.161 2008/01/03 23:22:13 jasone Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.162 2008/02/06 02:59:54 jasone Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -254,6 +254,9 @@ */ #define CHUNK_2POW_DEFAULT 20 +/* Maximum number of dirty pages per arena. */ +#define DIRTY_MAX_DEFAULT (1U << 9) + /* * Maximum size of L1 cache line. This is used to avoid cache line aliasing, * so over-estimates are okay (up to a point), but under-estimates will @@ -294,7 +297,11 @@ #define RUN_MAX_OVRHD 0x0000003dU #define RUN_MAX_OVRHD_RELAX 0x00001800U -/* Put a cap on small object run size. This overrides RUN_MAX_OVRHD. */ +/* + * Put a cap on small object run size. This overrides RUN_MAX_OVRHD. Note + * that small runs must be small enough that page offsets can fit within the + * CHUNK_MAP_POS_MASK bits. + */ #define RUN_MAX_SMALL_2POW 15 #define RUN_MAX_SMALL (1U << RUN_MAX_SMALL_2POW) @@ -405,6 +412,15 @@ /* Number of bytes currently mapped. */ size_t mapped; + /* + * Total number of purge sweeps, total number of madvise calls made, + * and total pages purged in order to keep dirty unused memory under + * control. + */ + uint64_t npurge; + uint64_t nmadvise; + uint64_t purged; + /* Per-size-category statistics. */ size_t allocated_small; uint64_t nmalloc_small; @@ -440,37 +456,28 @@ /******************************************************************************/ /* - * Chunk data structures. + * Extent data structures. */ -/* Tree of chunks. */ -typedef struct chunk_node_s chunk_node_t; -struct chunk_node_s { - /* Linkage for the address-ordered chunk tree. */ - RB_ENTRY(chunk_node_s) link_ad; +/* Tree of extents. */ +typedef struct extent_node_s extent_node_t; +struct extent_node_s { + /* Linkage for the size/address-ordered tree. */ + RB_ENTRY(extent_node_s) link_szad; -#ifdef MALLOC_DSS - /* Linkage for the size/address-ordered chunk tree. */ - RB_ENTRY(chunk_node_s) link_szad; -#endif + /* Linkage for the address-ordered tree. */ + RB_ENTRY(extent_node_s) link_ad; - /* - * Pointer to the chunk that this tree node is responsible for. In some - * (but certainly not all) cases, this data structure is placed at the - * beginning of the corresponding chunk, so this field may point to this - * node. - */ - void *chunk; + /* Pointer to the extent that this tree node is responsible for. */ + void *addr; - /* Total chunk size. */ + /* Total region size. */ size_t size; }; -typedef struct chunk_tree_ad_s chunk_tree_ad_t; -RB_HEAD(chunk_tree_ad_s, chunk_node_s); -#ifdef MALLOC_DSS -typedef struct chunk_tree_szad_s chunk_tree_szad_t; -RB_HEAD(chunk_tree_szad_s, chunk_node_s); -#endif +typedef struct extent_tree_szad_s extent_tree_szad_t; +RB_HEAD(extent_tree_szad_s, extent_node_s); +typedef struct extent_tree_ad_s extent_tree_ad_t; +RB_HEAD(extent_tree_ad_s, extent_node_s); /******************************************************************************/ /* @@ -480,37 +487,21 @@ typedef struct arena_s arena_t; typedef struct arena_bin_s arena_bin_t; -typedef struct arena_chunk_map_s arena_chunk_map_t; -struct arena_chunk_map_s { - /* - * Number of pages in run. For a free run that has never been touched, - * this is NPAGES_EMPTY for the central pages, which allows us to avoid - * zero-filling untouched pages for calloc(). - */ -#define NPAGES_EMPTY ((uint32_t)0x0U) - uint32_t npages; - /* - * Position within run. For a free run, this is POS_EMPTY/POS_FREE for - * the first and last pages. The special values make it possible to - * quickly coalesce free runs. POS_EMPTY indicates that the run has - * never been touched, which allows us to avoid zero-filling untouched - * pages for calloc(). - * - * This is the limiting factor for chunksize; there can be at most 2^31 - * pages in a run. - * - * POS_EMPTY is assumed by arena_run_dalloc() to be less than POS_FREE. - */ -#define POS_EMPTY ((uint32_t)0xfffffffeU) -#define POS_FREE ((uint32_t)0xffffffffU) - uint32_t pos; -}; +/* + * Each map element contains several flags, plus page position for runs that + * service small allocations. + */ +typedef uint8_t arena_chunk_map_t; +#define CHUNK_MAP_UNTOUCHED 0x80U +#define CHUNK_MAP_DIRTY 0x40U +#define CHUNK_MAP_LARGE 0x20U +#define CHUNK_MAP_POS_MASK 0x1fU /* Arena chunk header. */ typedef struct arena_chunk_s arena_chunk_t; struct arena_chunk_s { /* Arena that owns the chunk. */ - arena_t *arena; + arena_t *arena; /* Linkage for the arena's chunk tree. */ RB_ENTRY(arena_chunk_s) link; @@ -519,22 +510,17 @@ * Number of pages in use. This is maintained in order to make * detection of empty chunks fast. */ - uint32_t pages_used; + size_t pages_used; - /* - * Every time a free run larger than this value is created/coalesced, - * this value is increased. The only way that the value decreases is if - * arena_run_alloc() fails to find a free run as large as advertised by - * this value. - */ - uint32_t max_frun_npages; + /* Number of dirty pages. */ + size_t ndirty; /* - * Every time a free run that starts at an earlier page than this value - * is created/coalesced, this value is decreased. It is reset in a - * similar fashion to max_frun_npages. + * Tree of extent nodes that are embedded in the arena chunk header + * page(s). These nodes are used by arena_chunk_node_alloc(). */ - uint32_t min_frun_ind; + extent_tree_ad_t nodes; + extent_node_t *nodes_past; /* * Map of pages within chunk that keeps track of free/large/small. For @@ -629,7 +615,8 @@ /* * In order to avoid rapid chunk allocation/deallocation when an arena * oscillates right on the cusp of needing a new chunk, cache the most - * recently freed chunk. This caching is disabled by opt_hint. + * recently freed chunk. The spare is left in the arena's chunk tree + * until it is deleted. * * There is one spare chunk per arena, rather than one spare total, in * order to avoid interactions between multiple threads that could make @@ -637,6 +624,25 @@ */ arena_chunk_t *spare; + /* + * Current count of pages within unused runs that are potentially + * dirty, and for which madvise(... MADV_FREE) has not been called. By + * tracking this, we can institute a limit on how much dirty unused + * memory is mapped for each arena. + */ + size_t ndirty; + + /* + * Trees of this arena's available runs. Two trees are maintained + * using one set of nodes, since one is needed for first-best-fit run + * allocation, and the other is needed for coalescing. + */ + extent_tree_szad_t runs_avail_szad; + extent_tree_ad_t runs_avail_ad; + + /* Tree of this arena's allocated (in-use) runs. */ + extent_tree_ad_t runs_alloced_ad; + #ifdef MALLOC_BALANCE /* * The arena load balancing machinery needs to keep track of how much @@ -709,8 +715,8 @@ /* Various chunk-related settings. */ static size_t chunksize; static size_t chunksize_mask; /* (chunksize - 1). */ -static unsigned chunk_npages; -static unsigned arena_chunk_header_npages; +static size_t chunk_npages; +static size_t arena_chunk_header_npages; static size_t arena_maxclass; /* Max size class for arenas. */ /********/ @@ -722,7 +728,7 @@ static malloc_mutex_t huge_mtx; /* Tree of chunks that are stand-alone huge allocations. */ -static chunk_tree_ad_t huge; +static extent_tree_ad_t huge; #ifdef MALLOC_DSS /* @@ -740,11 +746,11 @@ /* * Trees of chunks that were previously allocated (trees differ only in node * ordering). These are used when allocating chunks, in an attempt to re-use - * address space. Depending on funcition, different tree orderings are needed, + * address space. Depending on function, different tree orderings are needed, * which is why there are two trees with the same contents. */ -static chunk_tree_ad_t dss_chunks_ad; -static chunk_tree_szad_t dss_chunks_szad; +static extent_tree_szad_t dss_chunks_szad; +static extent_tree_ad_t dss_chunks_ad; #endif #ifdef MALLOC_STATS @@ -767,7 +773,7 @@ static void *base_pages; static void *base_next_addr; static void *base_past_addr; /* Addr immediately past base_pages. */ -static chunk_node_t *base_chunk_nodes; /* LIFO cache of chunk nodes. */ +static extent_node_t *base_nodes; static malloc_mutex_t base_mtx; #ifdef MALLOC_STATS static size_t base_mapped; @@ -791,7 +797,7 @@ static unsigned next_arena; # endif #endif -static pthread_mutex_t arenas_lock; /* Protects arenas initialization. */ +static pthread_mutex_t arenas_lock; /* Protects arenas initialization. */ #ifndef NO_TLS /* @@ -823,7 +829,7 @@ static bool opt_dss = true; static bool opt_mmap = true; #endif -static bool opt_hint = false; +static size_t opt_dirty_max = DIRTY_MAX_DEFAULT; #ifdef MALLOC_LAZY_FREE static int opt_lazy_free_2pow = LAZY_FREE_2POW_DEFAULT; #endif @@ -848,7 +854,10 @@ #define UTRACE(a, b, c) \ if (opt_utrace) { \ - malloc_utrace_t ut = {a, b, c}; \ + malloc_utrace_t ut; \ + ut.p = (a); \ + ut.s = (b); \ + ut.r = (c); \ utrace(&ut, sizeof(ut)); \ } @@ -865,36 +874,73 @@ static void malloc_printf(const char *format, ...); #endif static char *umax2s(uintmax_t x, char *s); +#ifdef MALLOC_DSS +static bool base_pages_alloc_dss(size_t minsize); +#endif +static bool base_pages_alloc_mmap(size_t minsize); static bool base_pages_alloc(size_t minsize); static void *base_alloc(size_t size); static void *base_calloc(size_t number, size_t size); -static chunk_node_t *base_chunk_node_alloc(void); -static void base_chunk_node_dealloc(chunk_node_t *node); +static extent_node_t *base_node_alloc(void); +static void base_node_dealloc(extent_node_t *node); #ifdef MALLOC_STATS static void stats_print(arena_t *arena); #endif static void *pages_map(void *addr, size_t size); static void pages_unmap(void *addr, size_t size); +#ifdef MALLOC_DSS >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Feb 6 14:07:27 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A821516A46B; Wed, 6 Feb 2008 14:07:27 +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 550E016A41B for ; Wed, 6 Feb 2008 14:07:27 +0000 (UTC) (envelope-from taleks@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 27BEE13C465 for ; Wed, 6 Feb 2008 14:07:27 +0000 (UTC) (envelope-from taleks@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16E7Ri5021364 for ; Wed, 6 Feb 2008 14:07:27 GMT (envelope-from taleks@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16E7R9l021360 for perforce@freebsd.org; Wed, 6 Feb 2008 14:07:27 GMT (envelope-from taleks@FreeBSD.org) Date: Wed, 6 Feb 2008 14:07:27 GMT Message-Id: <200802061407.m16E7R9l021360@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to taleks@FreeBSD.org using -f From: Alexey Tarasov To: Perforce Change Reviews Cc: Subject: PERFORCE change 134905 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 14:07:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=134905 Change 134905 by taleks@taleks_th on 2008/02/06 14:06:35 Added PXE_SOCK_NONBLOCKING flag for pxe_recv() function. Also included some stub functions for telnet client. Affected files ... .. //depot/projects/soc2007/taleks-pxe_http/httpfs.c#11 edit .. //depot/projects/soc2007/taleks-pxe_http/ptelnet/README#1 add .. //depot/projects/soc2007/taleks-pxe_http/ptelnet/pxe_telnet.c#1 add .. //depot/projects/soc2007/taleks-pxe_http/ptelnet/pxe_telnet.h#1 add .. //depot/projects/soc2007/taleks-pxe_http/pxe_dhcp.c#11 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_dns.c#8 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_http.c#14 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_ip6.h#1 add .. //depot/projects/soc2007/taleks-pxe_http/pxe_sock.c#21 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_sock.h#18 edit Differences ... ==== //depot/projects/soc2007/taleks-pxe_http/httpfs.c#11 (text+ko) ==== @@ -31,6 +31,7 @@ #include "pxe_core.h" #include "pxe_http.h" #include "pxe_ip.h" +#include "pxe_sock.h" static int http_open(const char *path, struct open_file *f); static int http_close(struct open_file *f); @@ -180,7 +181,7 @@ /* read all we have in buffer */ if (httpfile->cache_size != 0) { part1 = pxe_recv(httpfile->socket, addr2, - httpfile->cache_size); + httpfile->cache_size, PXE_SOCK_BLOCKING); #ifdef PXE_HTTP_DEBUG_HELL printf("http_read(): cache -> %ld/%lu/%lu/%u bytes\n", part1, to_read, size, httpfile->cache_size); @@ -236,7 +237,7 @@ return (EINVAL); } - result = pxe_recv(httpfile->socket, addr2, to_read); + result = pxe_recv(httpfile->socket, addr2, to_read, PXE_SOCK_BLOCKING); #ifdef PXE_HTTP_DEBUG_HELL printf("http_read(): cache > %ld/%lu/%lu/%u bytes\n", result, to_read, size, httpfile->cache_size); @@ -335,7 +336,7 @@ } #ifdef PXE_HTTPFS_CACHING /* if we seeked somewhere, cache failed, need clean it */ - pxe_recv(httpfile->socket, httpfile->cache_size, NULL); + pxe_recv(httpfile->socket, httpfile->cache_size, NULL, PXE_SOCK_BLOCKING); httpfile->cache_size = 0; #endif return (httpfile->offset); ==== //depot/projects/soc2007/taleks-pxe_http/pxe_dhcp.c#11 (text+ko) ==== @@ -370,7 +370,7 @@ case PXE_AWAIT_NEWPACKETS: /* some packets were received, need checking our socket */ size = pxe_recv(wait_data->socket, wait_data->data, - wait_data->size); + wait_data->size, PXE_SOCK_NONBLOCKING); if ( size > 0) { /* something felt to socket */ ==== //depot/projects/soc2007/taleks-pxe_http/pxe_dns.c#8 (text+ko) ==== @@ -488,7 +488,7 @@ case PXE_AWAIT_NEWPACKETS: size = pxe_recv(wait_data->socket, wait_data->data, - wait_data->size); + wait_data->size, PXE_SOCK_NONBLOCKING); if (size > 0) { #ifdef PXE_DEBUG ==== //depot/projects/soc2007/taleks-pxe_http/pxe_http.c#14 (text+ko) ==== @@ -140,7 +140,8 @@ char ch = '\0'; while (count < maxsize - 1) { - result = pxe_recv(socket, &data[count], maxsize - 1 - count); + result = pxe_recv(socket, &data[count], maxsize - 1 - count, + PXE_SOCK_BLOCKING); if (result == -1) { /* failed to recv */ #ifdef PXE_HTTP_DEBUG_HELL @@ -205,7 +206,7 @@ char ch = '\0'; while (count < maxsize - 1) { - result = pxe_recv(socket, &data[count], 1); + result = pxe_recv(socket, &data[count], 1, PXE_SOCK_BLOCKING); if (result == -1) { /* failed to recv */ #ifdef PXE_HTTP_DEBUG_HELL @@ -394,7 +395,8 @@ printf("%s", found + 4); while (1) { - result = pxe_recv(socket, http_data, PXE_MAX_HTTP_HDRLEN - 1); + result = pxe_recv(socket, http_data, PXE_MAX_HTTP_HDRLEN - 1, + PXE_SOCK_BLOCKING); if (result == -1) break; @@ -563,7 +565,7 @@ while (count < size_to_get) { result = pxe_recv(hh->socket, buffer + count, - size_to_get - count); + size_to_get - count, PXE_SOCK_BLOCKING); if (result == -1) break; @@ -737,7 +739,8 @@ pxe_memcpy((char *)found + 4, buffer, count); while (count < size_to_get) { - result = pxe_recv(socket, buffer + count, size_to_get - count); + result = pxe_recv(socket, buffer + count, size_to_get - count, + PXE_SOCK_BLOCKING); if (result == -1) break; ==== //depot/projects/soc2007/taleks-pxe_http/pxe_sock.c#21 (text+ko) ==== @@ -548,12 +548,13 @@ * socket - socket descriptor number to recieve data from * tobuf - buffer to receive data to * buflen - size of buffer + * flags - PXE_SOCK... flags * out: * -1 - failure * nonnegative - actual count of bytes received */ int -pxe_recv(int socket, void *tobuf, uint16_t buflen) +pxe_recv(int socket, void *tobuf, uint16_t buflen, int flags) { #ifdef PXE_SOCKET_ACCURATE if ( (socket >= PXE_DEFAULT_SOCKETS) || (socket == -1)) { @@ -595,7 +596,7 @@ result = pxe_tcp_read(sock, tobuf, buflen); } - if (result != 0) + if ((result != 0) || (flags == PXE_SOCK_NONBLOCKING)) break; if (timer > PXE_SOCKET_TIMEOUT) @@ -629,12 +630,13 @@ * tobuf - buffer to receive data to * buflen - size of buffer * src_ip - pointer to memory, where store IP of sender + * flags - one of PXE_SOCK... flags * out: * -1 - failure * nonnegative - actual count of bytes received */ int -pxe_recvfrom(int socket, void *tobuf, size_t buflen, uint32_t *src_ip) +pxe_recvfrom(int socket, void *tobuf, size_t buflen, uint32_t *src_ip, int flags) { #ifdef PXE_SOCKET_ACCURATE if ( (socket >= PXE_DEFAULT_SOCKETS) || (socket == -1)) { @@ -677,7 +679,7 @@ result = pxe_tcp_read(sock, tobuf, buflen); } - if (result != 0) + if ((result != 0) || (flags == PXE_SOCK_NONBLOCKING)) break; if (timer > PXE_SOCKET_TIMEOUT) ==== //depot/projects/soc2007/taleks-pxe_http/pxe_sock.h#18 (text+ko) ==== @@ -61,6 +61,9 @@ /* connection established. TODO: check if need */ #define PXE_SOCKET_ESTABLISHED 0x4 +#define PXE_SOCK_NONBLOCKING 0 +#define PXE_SOCK_BLOCKING 1 + /* socket */ typedef struct pxe_socket { PXE_BUFFER send_buffer; /* sending buffer */ @@ -121,7 +124,7 @@ int pxe_send(int socket, void *buf, uint16_t buflen); /* receive data from socket, blocking */ -int pxe_recv(int socket, void *buf, uint16_t buflen); +int pxe_recv(int socket, void *buf, uint16_t buflen, int flags); /* create new socket */ int pxe_socket(); From owner-p4-projects@FreeBSD.ORG Wed Feb 6 15:09:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 68CC416A421; Wed, 6 Feb 2008 15:09:35 +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 2E50316A418 for ; Wed, 6 Feb 2008 15:09:35 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 075BE13C4E8 for ; Wed, 6 Feb 2008 15:09:35 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16F9ZXN028561 for ; Wed, 6 Feb 2008 15:09:35 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16F9ZS8028558 for perforce@freebsd.org; Wed, 6 Feb 2008 15:09:35 GMT (envelope-from sephe@FreeBSD.org) Date: Wed, 6 Feb 2008 15:09:35 GMT Message-Id: <200802061509.m16F9ZS8028558@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 134908 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 15:09:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=134908 Change 134908 by sephe@sephe_enigma:sam_wifi on 2008/02/06 15:09:24 IFC (don't know why libexec/rtld-aout/support.[ch] are gone) Affected files ... .. //depot/projects/wifi/lib/libfetch/http.c#7 integrate .. //depot/projects/wifi/libexec/rtld-aout/support.c#4 add .. //depot/projects/wifi/libexec/rtld-aout/support.h#4 add .. //depot/projects/wifi/sys/dev/amr/amrreg.h#5 integrate .. //depot/projects/wifi/sys/kern/kern_lock.c#23 integrate Differences ... ==== //depot/projects/wifi/lib/libfetch/http.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libfetch/http.c,v 1.82 2007/12/19 00:26:36 des Exp $"); +__FBSDID("$FreeBSD: src/lib/libfetch/http.c,v 1.83 2008/02/06 11:39:55 des Exp $"); /* * The following copyright applies to the base64 code: @@ -150,7 +150,7 @@ *p - '0'; } else { io->chunksize = io->chunksize * 16 + - 10 + tolower(*p) - 'a'; + 10 + tolower((unsigned char)*p) - 'a'; } } @@ -434,7 +434,8 @@ static const char * http_match(const char *str, const char *hdr) { - while (*str && *hdr && tolower(*str++) == tolower(*hdr++)) + while (*str && *hdr && + tolower((unsigned char)*str++) == tolower((unsigned char)*hdr++)) /* nothing */; if (*str || *hdr != ':') return (NULL); ==== //depot/projects/wifi/sys/dev/amr/amrreg.h#5 (text+ko) ==== @@ -53,7 +53,7 @@ * SUCH DAMAGE. * * - * $FreeBSD: src/sys/dev/amr/amrreg.h,v 1.11 2008/01/24 07:26:53 scottl Exp $ + * $FreeBSD: src/sys/dev/amr/amrreg.h,v 1.12 2008/02/06 14:26:31 scottl Exp $ */ /******************************************************************************** @@ -126,7 +126,6 @@ #define AMR_CONFIG_READ_NVRAM_CONFIG 0x04 #define AMR_CONFIG_WRITE_NVRAM_CONFIG 0x0d -#define AMR_CONFIG_ENQ3_SOLICITED_NOTIFY 0x01 #define AMR_CONFIG_PRODUCT_INFO 0x0e #define AMR_CONFIG_ENQ3 0x0f #define AMR_CONFIG_ENQ3_SOLICITED_NOTIFY 0x01 ==== //depot/projects/wifi/sys/kern/kern_lock.c#23 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_lock.c,v 1.121 2008/02/06 00:37:14 attilio Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_lock.c,v 1.122 2008/02/06 13:26:01 attilio Exp $"); #include "opt_ddb.h" #include "opt_global.h" @@ -257,7 +257,7 @@ */ if (lkp->lk_lockholder != td) { lockflags = LK_HAVE_EXCL; - if (td != NULL && !(td->td_pflags & TDP_DEADLKTREAT)) + if (!(td->td_pflags & TDP_DEADLKTREAT)) lockflags |= LK_WANT_EXCL | LK_WANT_UPGRADE; error = acquire(&lkp, extflags, lockflags, &contested, &waitstart); if (error) From owner-p4-projects@FreeBSD.ORG Wed Feb 6 17:08:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 72ECA16A41A; Wed, 6 Feb 2008 17:08:41 +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 1FB1616A417 for ; Wed, 6 Feb 2008 17:08:41 +0000 (UTC) (envelope-from obrien@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 206D213C45A for ; Wed, 6 Feb 2008 17:08:40 +0000 (UTC) (envelope-from obrien@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16H8e6Z063439 for ; Wed, 6 Feb 2008 17:08:40 GMT (envelope-from obrien@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16H8e4l063436 for perforce@freebsd.org; Wed, 6 Feb 2008 17:08:40 GMT (envelope-from obrien@freebsd.org) Date: Wed, 6 Feb 2008 17:08:40 GMT Message-Id: <200802061708.m16H8e4l063436@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to obrien@freebsd.org using -f From: "David E. O'Brien" To: Perforce Change Reviews Cc: Subject: PERFORCE change 134911 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 17:08:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=134911 Change 134911 by obrien@obrien_trang on 2008/02/06 17:08:25 Fixup VCS ID's and minor style(9) Affected files ... .. //depot/projects/mips2-jnpr/src/lib/libthr/arch/mips/Makefile.inc#2 edit .. //depot/projects/mips2-jnpr/src/lib/libthr/arch/mips/include/pthread_md.h#2 edit .. //depot/projects/mips2-jnpr/src/lib/libthr/arch/mips/mips/pthread_md.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/lib/libthr/arch/mips/Makefile.inc#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libthr/arch/arm/Makefile.inc,v 1.2 2005/04/07 22:06:05 cognet Exp $ +# $FreeBSD$ .PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} ==== //depot/projects/mips2-jnpr/src/lib/libthr/arch/mips/include/pthread_md.h#2 (text+ko) ==== @@ -23,7 +23,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/arch/arm/include/pthread_md.h,v 1.3 2005/10/29 13:40:31 davidxu Exp $ + * from: src/lib/libthr/arch/arm/include/pthread_md.h,v 1.3 2005/10/29 13:40:31 davidxu + * $FreeBSD$ */ /* @@ -43,9 +44,9 @@ * Variant II tcb, first two members are required by rtld. */ struct tcb { - struct tcb *tcb_self; /* required by rtld */ - void *tcb_dtv; /* required by rtld */ - struct pthread *tcb_thread; /* our hook */ + struct tcb *tcb_self; /* required by rtld */ + void *tcb_dtv; /* required by rtld */ + struct pthread *tcb_thread; /* our hook */ void *tcb_spare[1]; }; ==== //depot/projects/mips2-jnpr/src/lib/libthr/arch/mips/mips/pthread_md.c#2 (text+ko) ==== @@ -23,9 +23,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/arch/arm/arm/pthread_md.c,v 1.2 2005/10/29 13:40:31 davidxu Exp $ + * from: src/lib/libthr/arch/arm/arm/pthread_md.c,v 1.2 2005/10/29 13:40:31 davidxu */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include From owner-p4-projects@FreeBSD.ORG Wed Feb 6 18:02:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CBC5A16A469; Wed, 6 Feb 2008 18:02:40 +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 78DB616A421 for ; Wed, 6 Feb 2008 18:02:40 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4216E13C45D for ; Wed, 6 Feb 2008 18:02:40 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16I2etD081303 for ; Wed, 6 Feb 2008 18:02:40 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16I2e6Y081300 for perforce@freebsd.org; Wed, 6 Feb 2008 18:02:40 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 6 Feb 2008 18:02:40 GMT Message-Id: <200802061802.m16I2e6Y081300@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134913 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 18:02:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=134913 Change 134913 by rwatson@rwatson_freebsd_capabilities on 2008/02/06 18:01:42 For each struct file, maintain a list of the capabilities pointing at it, and for each capability, maintain a pointer back to its own struct file. This is required in order to extend the UNIX domain socket garbage collector to properly handle capabilities being passed over UNIX domain sockets (which may otherwise be leaked in situations where the GC should otherwise find and free them). For now use a global lock to protect these lists, but really what we want is a per-file mutex (not currently present). Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_descrip.c#6 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#14 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/file.h#5 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_descrip.c#6 (text+ko) ==== @@ -1392,6 +1392,7 @@ fp->f_ops = &badfileops; fp->f_data = NULL; fp->f_vnode = NULL; + LIST_INIT(&fp->f_caps); FILEDESC_XLOCK(p->p_fd); if ((error = fdalloc(td, 0, &i))) { FILEDESC_XUNLOCK(p->p_fd); @@ -2216,6 +2217,8 @@ error = fo_close(fp, td); atomic_subtract_int(&openfiles, 1); crfree(fp->f_cred); + if (!LIST_EMPTY(&fp->f_caps)) + panic("_fdrop: f_caps not empty"); uma_zfree(file_zone, fp); return (error); ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#14 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#13 $"); +__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#14 $"); #include #include @@ -59,13 +59,17 @@ /* * struct capability describes a capability, and is hung off of its struct - * file f_data field. All fields are static once hooked up, as neither the - * object it references nor the rights it encapsulates are permitted to - * change. + * file f_data field. cap_file and cap_rightss are static once hooked up, as + * neither the object it references nor the rights it encapsulates are + * permitted to change. cap_filelist may change when other capabilites are + * added or removed from the same file, and is currently protected by + * cap_file_mtx. */ struct capability { - struct file *cap_file; - cap_rights_t cap_rights; + struct file *cap_object; /* Underlying object's file. */ + struct file *cap_file; /* Back-pointer to cap's file. */ + cap_rights_t cap_rights; /* Mask of rights on object. */ + LIST_ENTRY(capability) cap_filelist; /* Object's cap list. */ }; /* @@ -96,6 +100,14 @@ static uma_zone_t capability_zone; +/* + * XXXRW: Each file descriptor contains a list of capabilities pointing at it + * so that we the UNIX domain socket GC routine can calculate whether there + * are external references. Ideally we'd use a per-file lock, but right now + * we don't have one, so use a global mutex for now. + */ +static struct mtx cap_file_mtx; + static void capability_init(void *dummy __unused) { @@ -105,6 +117,7 @@ 0); if (capability_zone == NULL) panic("capability_init: capability_zone not initialized"); + mtx_init(&cap_file_mtx, "cap_file_mtx", NULL, MTX_DEF); } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_ANY, capability_init, NULL); @@ -142,7 +155,7 @@ error = cap_check(c, rights); if (error) return (error); - *fpp = c->cap_file; + *fpp = c->cap_object; return (0); } @@ -235,13 +248,22 @@ * deal with capability chains. */ if (fp->f_type == DTYPE_CAPABILITY) - fp_object = ((struct capability *)fp->f_data)->cap_file; + fp_object = ((struct capability *)fp->f_data)->cap_object; else fp_object = fp; fhold(fp_object); c->cap_rights = uap->rights; - c->cap_file = fp_object; + c->cap_object = fp_object; + c->cap_file = fp_cap; finit(fp_cap, fp->f_flag, DTYPE_CAPABILITY, c, &capability_ops); + + /* + * Add this capability to the per-file list of referencing + * capabilities. + */ + mtx_lock(&cap_file_mtx); + LIST_INSERT_HEAD(&fp_object->f_caps, c, cap_filelist); + mtx_unlock(&cap_file_mtx); td->td_retval[0] = fd_cap; fdrop(fp, td); fdrop(fp_cap, td); @@ -290,7 +312,10 @@ c = fp->f_data; fp->f_ops = &badfileops; fp->f_data = NULL; - fp_object = c->cap_file; + fp_object = c->cap_object; + mtx_lock(&cap_file_mtx); + LIST_REMOVE(c, cap_filelist); + mtx_unlock(&cap_file_mtx); uma_zfree(capability_zone, c); return (fdrop(fp_object, td)); } ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/file.h#5 (text+ko) ==== @@ -130,6 +130,7 @@ * Mandatory Access control information. */ void *f_label; /* Place-holder for MAC label. */ + LIST_HEAD(, capability) f_caps; /* List of capabilities for file. */ }; #define FOFFSET_LOCKED 0x1 From owner-p4-projects@FreeBSD.ORG Wed Feb 6 21:14:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1840716A41B; Wed, 6 Feb 2008 21:14:03 +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 B830416A417 for ; Wed, 6 Feb 2008 21:14:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0C313C474 for ; Wed, 6 Feb 2008 21:14:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16LE2D0007968 for ; Wed, 6 Feb 2008 21:14:02 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16LE27v007965 for perforce@freebsd.org; Wed, 6 Feb 2008 21:14:02 GMT (envelope-from jb@freebsd.org) Date: Wed, 6 Feb 2008 21:14:02 GMT Message-Id: <200802062114.m16LE27v007965@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134924 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 21:14:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=134924 Change 134924 by jb@jb_freebsd1 on 2008/02/06 21:13:06 Add a KDB_WHY for DTrace to enter the kerel debugger. Affected files ... .. //depot/projects/dtrace/src/sys/sys/kdb.h#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/sys/kdb.h#5 (text+ko) ==== @@ -104,5 +104,6 @@ #define KDB_WHY_MAC "mac" /* MAC Framework. */ #define KDB_WHY_POWERPC "powerpc" /* Unhandled powerpc intr. */ #define KDB_WHY_UNIONFS "unionfs" /* Unionfs bug. */ +#define KDB_WHY_DTRACE "dtrace" /* DTrace action entered debugger. */ #endif /* !_SYS_KDB_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Feb 6 21:15:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2B45C16A41B; Wed, 6 Feb 2008 21:15:04 +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 E4DCA16A417 for ; Wed, 6 Feb 2008 21:15:03 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9675C13C43E for ; Wed, 6 Feb 2008 21:15:03 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16LF3EW008180 for ; Wed, 6 Feb 2008 21:15:03 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16LF38r008177 for perforce@freebsd.org; Wed, 6 Feb 2008 21:15:03 GMT (envelope-from jb@freebsd.org) Date: Wed, 6 Feb 2008 21:15:03 GMT Message-Id: <200802062115.m16LF38r008177@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134925 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 21:15:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=134925 Change 134925 by jb@jb_freebsd1 on 2008/02/06 21:14:08 Back to awk now that it handles more files. Affected files ... .. //depot/projects/dtrace/src/sys/kern/makesyscalls.sh#11 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/makesyscalls.sh#11 (text+ko) ==== @@ -62,7 +62,7 @@ 2,${ /^#/!s/\([{}()*,]\)/ \1 /g } -' < $1 | gawk " +' < $1 | awk " BEGIN { sysaue = \"$sysaue\" sysdcl = \"$sysdcl\" From owner-p4-projects@FreeBSD.ORG Wed Feb 6 21:58:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E3FF216A41B; Wed, 6 Feb 2008 21:58:50 +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 A9A6816A417 for ; Wed, 6 Feb 2008 21:58:50 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7798013C458 for ; Wed, 6 Feb 2008 21:58:50 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16Lwohq010195 for ; Wed, 6 Feb 2008 21:58:50 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16LwoVk010192 for perforce@freebsd.org; Wed, 6 Feb 2008 21:58:50 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 6 Feb 2008 21:58:50 GMT Message-Id: <200802062158.m16LwoVk010192@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134929 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 21:58:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=134929 Change 134929 by kmacy@kmacy:entropy:iwarp on 2008/02/06 21:57:58 initialize callout locking for arptimer correctly Affected files ... .. //depot/projects/iwarp/sys/netinet/if_ether.c#8 edit Differences ... ==== //depot/projects/iwarp/sys/netinet/if_ether.c#8 (text+ko) ==== @@ -224,7 +224,7 @@ RT_ADDREF(rt); la->la_rt = rt; rt->rt_flags |= RTF_LLINFO; - callout_init(&la->la_timer, 1); + callout_init_mtx(&la->la_timer, &rt->rt_mtx, CALLOUT_RETURNUNLOCKED); #ifdef INET /* From owner-p4-projects@FreeBSD.ORG Wed Feb 6 22:03:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D99AD16A49C; Wed, 6 Feb 2008 22:03:56 +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 5ECA816A41A for ; Wed, 6 Feb 2008 22:03:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4540B13C44B for ; Wed, 6 Feb 2008 22:03:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16M3uvK011609 for ; Wed, 6 Feb 2008 22:03:56 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16M3uWe011606 for perforce@freebsd.org; Wed, 6 Feb 2008 22:03:56 GMT (envelope-from jb@freebsd.org) Date: Wed, 6 Feb 2008 22:03:56 GMT Message-Id: <200802062203.m16M3uWe011606@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134931 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 22:03:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=134931 Change 134931 by jb@jb_freebsd1 on 2008/02/06 22:03:40 Add a kdb_enter() stub to the DTrace kernel hooks stuff for the case when the kernel is built without KDB. I don't want DTrace to panic when a DTrace breakpoint is used without KDB. Add the call to kdb_enter() in the DTrace breakpoint action code. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#33 edit .. //depot/projects/dtrace/src/sys/kern/kern_dtrace.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#33 (text) ==== @@ -113,6 +113,7 @@ #if !defined(sun) #include #include +#include #include #include #include @@ -5374,9 +5375,10 @@ c[i++] = ')'; c[i] = '\0'; -printf("%s(%d): DOODAD\n",__func__,__LINE__); -#ifdef DOODAD +#if defined(sun) debug_enter(c); +#else + kdb_enter(KDB_WHY_DTRACE, "breakpoint action"); #endif } ==== //depot/projects/dtrace/src/sys/kern/kern_dtrace.c#5 (text+ko) ==== @@ -27,9 +27,12 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kdb.h" + #include #include #include +#include #include #include #include @@ -103,3 +106,15 @@ } SYSINIT(kdtrace, SI_SUB_KDTRACE, SI_ORDER_FIRST, init_dtrace, NULL) + +#ifndef KDB +/* + * This is a stub for the kernel debugger for the DTrace actions to call + * when the kernel has been built without KDB. + */ +void +kdb_enter(const char *why, const char *msg) +{ + printf("Cannot enter kernel debugger - No KDB in kernel.\n%s - %s\n", why, msg); +} +#endif From owner-p4-projects@FreeBSD.ORG Wed Feb 6 23:36:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5057016A420; Wed, 6 Feb 2008 23:36:39 +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 14AAF16A417 for ; Wed, 6 Feb 2008 23:36:39 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F367413C461 for ; Wed, 6 Feb 2008 23:36:38 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m16Nacne035448 for ; Wed, 6 Feb 2008 23:36:38 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m16NacEd035445 for perforce@freebsd.org; Wed, 6 Feb 2008 23:36:38 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 6 Feb 2008 23:36:38 GMT Message-Id: <200802062336.m16NacEd035445@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134938 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 23:36:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=134938 Change 134938 by kmacy@kmacy:entropy:iwarp on 2008/02/06 23:36:20 fix issues caused by integration Affected files ... .. //depot/projects/iwarp/sys/amd64/conf/GENERIC#7 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_l2t.c#7 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#12 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_multiq.c#6 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#13 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_sge.c#10 edit .. //depot/projects/iwarp/sys/modules/cxgb/cxgb/Makefile#5 edit Differences ... ==== //depot/projects/iwarp/sys/amd64/conf/GENERIC#7 (text+ko) ==== @@ -213,5 +213,4 @@ device dcons_crom # Configuration ROM for dcons options ALT_BREAK_TO_DEBUGGER -options IFNET_MULTIQUEUE #options BIND_ALL ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_l2t.c#7 (text+ko) ==== @@ -223,7 +223,7 @@ else m_freem(m); mtx_unlock(&e->lock); - } + } } return 0; } @@ -541,6 +541,12 @@ void t3_free_l2t(struct l2t_data *d) { + int i; + + rw_destroy(&d->lock); + for (i = 0; i < d->nentries; ++i) + mtx_destroy(&d->l2tab[i].lock); + cxgb_free_mem(d); } ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#12 (text+ko) ==== @@ -119,6 +119,7 @@ static int offload_open(struct port_info *pi); static void touch_bars(device_t dev); static int offload_close(struct t3cdev *tdev); + static device_method_t cxgb_controller_methods[] = { DEVMETHOD(device_probe, cxgb_controller_probe), DEVMETHOD(device_attach, cxgb_controller_attach), @@ -438,11 +439,11 @@ } sc->udbs_rid = PCIR_BAR(2); if ((sc->udbs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &sc->udbs_rid, RF_ACTIVE)) == NULL) { + &sc->udbs_rid, RF_ACTIVE)) == NULL) { device_printf(dev, "Cannot allocate BAR region 1\n"); error = ENXIO; goto out; - } + } snprintf(sc->lockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb controller lock %d", device_get_unit(dev)); @@ -614,6 +615,7 @@ snprintf(&sc->fw_version[0], sizeof(sc->fw_version), "%d.%d.%d", G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers), G_FW_VERSION_MICRO(vers)); + device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); t3_add_attach_sysctls(sc); @@ -661,11 +663,7 @@ bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->msix_regs_rid, sc->msix_regs_res); } - - if (sc->tq != NULL) { - taskqueue_drain(sc->tq, &sc->ext_intr_task); - taskqueue_drain(sc->tq, &sc->tick_task); - } + t3_sge_deinit_sw(sc); /* * Wait for last callout @@ -679,22 +677,26 @@ } bus_generic_detach(sc->dev); - if (sc->tq != NULL) + if (sc->tq != NULL) { taskqueue_free(sc->tq); + sc->tq = NULL; + } + if (is_offload(sc)) { cxgb_adapter_unofld(sc); if (isset(&sc->open_device_map, OFFLOAD_DEVMAP_BIT)) offload_close(&sc->tdev); - } + else + printf("cxgb_free: DEVMAP_BIT not set\n"); + } else + printf("not offloading set\n"); -#ifndef IFNET_MULTIQUEUE - t3_free_sge_resources(sc); -#endif + cxgb_offload_deactivate(sc); free(sc->filters, M_DEVBUF); t3_sge_free(sc); cxgb_offload_exit(); - + if (sc->udbs_res != NULL) bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->udbs_rid, sc->udbs_res); @@ -909,11 +911,12 @@ ifp->if_ioctl = cxgb_ioctl; ifp->if_start = cxgb_start; +#if 0 #ifdef IFNET_MULTIQUEUE ifp->if_flags |= IFF_MULTIQ; ifp->if_mq_start = cxgb_pcpu_start; #endif - +#endif ifp->if_timer = 0; /* Disable ifnet watchdog */ ifp->if_watchdog = NULL; @@ -1131,9 +1134,6 @@ struct port_info *pi = &adapter->port[port_id]; struct cmac *mac = &adapter->port[port_id].mac; - if ((pi->ifp->if_flags & IFF_UP) == 0) - return; - if (link_status) { t3_mac_enable(mac, MAC_DIRECTION_RX); if_link_state_change(pi->ifp, LINK_STATE_UP); @@ -1541,7 +1541,6 @@ static void cxgb_down_locked(struct adapter *sc) { - int i; t3_sge_stop(sc); t3_intr_disable(sc); @@ -1558,20 +1557,24 @@ sc->irq_res = NULL; } - if (sc->flags & USING_MSIX) + if (sc->flags & USING_MSIX) cxgb_teardown_msix(sc); - ADAPTER_UNLOCK(sc); - + callout_stop(&sc->cxgb_tick_ch); callout_stop(&sc->sge_timer_ch); callout_drain(&sc->cxgb_tick_ch); callout_drain(&sc->sge_timer_ch); if (sc->tq != NULL) { + printf("draining slow intr\n"); + taskqueue_drain(sc->tq, &sc->slow_intr_task); - for (i = 0; i < sc->params.nports; i++) - taskqueue_drain(sc->tq, &sc->port[i].timer_reclaim_task); + printf("draining ext intr\n"); + taskqueue_drain(sc->tq, &sc->ext_intr_task); + printf("draining tick task\n"); + taskqueue_drain(sc->tq, &sc->tick_task); } + ADAPTER_UNLOCK(sc); } static int @@ -1650,7 +1653,6 @@ cxgb_down_locked(adapter); else ADAPTER_UNLOCK(adapter); - cxgb_offload_deactivate(adapter); return (0); } @@ -1818,6 +1820,12 @@ break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: + /* + * This is a convenient place to check the link status when + * no interfaces are up and thus the callout is not running + */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + cxgb_tick_handler(p->adapter, 0); error = ifmedia_ioctl(ifp, ifr, &p->media, command); break; case SIOCSIFCAP: @@ -1992,20 +2000,21 @@ struct port_info *p = &sc->port[i]; struct ifnet *ifp = p->ifp; - PORT_LOCK(p); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && + (ifp->if_flags & IFF_UP)) running = 1; - PORT_UNLOCK(p); } if (running == 0) return; - taskqueue_enqueue(sc->tq, &sc->tick_task); + - if (sc->open_device_map != 0) + if (sc->open_device_map != 0) { + taskqueue_enqueue(sc->tq, &sc->tick_task); callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); + } } static void @@ -2514,7 +2523,7 @@ reg_block_dump(struct adapter *ap, uint8_t *buf, unsigned int start, unsigned int end) { - uint32_t *p = (uint32_t *)(buf + start); + uint32_t *p = (uint32_t *)buf + start; for ( ; start <= end; start += sizeof(uint32_t)) *p++ = t3_read_reg(ap, start); ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_multiq.c#6 (text+ko) ==== @@ -27,8 +27,10 @@ ***************************************************************************/ +#define DEBUG_BUFRING + #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.28 2007/07/17 06:50:33 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_multiq.c,v 1.6 2008/01/15 08:08:08 kmacy Exp $"); #include #include @@ -55,7 +57,7 @@ #include #include #include -#include +#include #include #include @@ -92,7 +94,7 @@ #endif extern struct sysctl_oid_list sysctl__hw_cxgb_children; -static int cxgb_pcpu_tx_coalesce = 1; +static int cxgb_pcpu_tx_coalesce = 0; TUNABLE_INT("hw.cxgb.tx_coalesce", &cxgb_pcpu_tx_coalesce); SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_coalesce, CTLFLAG_RDTUN, &cxgb_pcpu_tx_coalesce, 0, "coalesce small packets into a single work request"); @@ -110,41 +112,35 @@ static inline int32_t cxgb_pcpu_calc_cookie(struct ifnet *ifp, struct mbuf *immpkt); static void cxgb_pcpu_start_proc(void *arg); +#ifdef IFNET_MULTIQUEUE static int cxgb_pcpu_cookie_to_qidx(struct port_info *, uint32_t cookie); +#endif static int cxgb_tx(struct sge_qset *qs, uint32_t txmax); + static inline int cxgb_pcpu_enqueue_packet_(struct sge_qset *qs, struct mbuf *m) { struct sge_txq *txq; - struct buf_ring *mr; - int prod, cons, mask; int err = 0; - + +#ifndef IFNET_MULTIQUEUE + panic("not expecting enqueue without multiqueue"); +#endif + KASSERT(m != NULL, ("null mbuf")); + KASSERT(m->m_type == MT_DATA, ("bad mbuf type %d", m->m_type)); if (qs->qs_flags & QS_EXITING) { m_freem(m); return (ENXIO); } txq = &qs->txq[TXQ_ETH]; - - mr = &txq->txq_mr; - mtx_lock(&mr->br_lock); - cons = mr->br_cons; - prod = mr->br_prod; - mask = mr->br_size - 1; - if (((prod + 1) & mask) != cons) { - mr->br_ring[prod] = (caddr_t)m; - mb(); - mr->br_prod = (prod + 1) & mask; - } else { + err = buf_ring_enqueue(&txq->txq_mr, m); + if (err) { txq->txq_drops++; - err = ENOBUFS; + m_freem(m); } - mtx_unlock(&mr->br_lock); if ((qs->txq[TXQ_ETH].flags & TXQ_TRANSMITTING) == 0) wakeup(qs); - if (err) - m_freem(m); return (err); } @@ -152,16 +148,17 @@ int cxgb_pcpu_enqueue_packet(struct ifnet *ifp, struct mbuf *m) { - struct port_info *pi; + struct port_info *pi = ifp->if_softc; struct sge_qset *qs; - int err, qidx; + int err = 0, qidx; +#ifdef IFNET_MULTIQUEUE int32_t calc_cookie; - pi = ifp->if_softc; - err = 0; - calc_cookie = m->m_pkthdr.rss_hash; qidx = cxgb_pcpu_cookie_to_qidx(pi, calc_cookie); +#else + qidx = 0; +#endif qs = &pi->adapter->sge.qs[qidx]; err = cxgb_pcpu_enqueue_packet_(qs, m); @@ -176,11 +173,22 @@ struct sge_qset *qs; int count, size, coalesced; struct adapter *sc; - struct buf_ring *mr; +#ifndef IFNET_MULTIQUEUE + struct port_info *pi = txq->port; + + if (txq->immpkt != NULL) + panic("immediate packet set"); + mtx_assert(&txq->lock, MA_OWNED); + + IFQ_DRV_DEQUEUE(&pi->ifp->if_snd, m); + if (m == NULL) + return (0); - mr = &txq->txq_mr; + m_vec[0] = m; + return (1); +#endif + coalesced = count = size = 0; - qs = txq_to_qset(txq, TXQ_ETH); if (qs->qs_flags & QS_EXITING) return (0); @@ -193,28 +201,33 @@ } sc = qs->port->adapter; - m = buf_ring_dequeue(mr); - if (m == NULL) + m = buf_ring_dequeue(&txq->txq_mr); + if (m == NULL) return (0); + count = 1; + KASSERT(m->m_type == MT_DATA, + ("m=%p is bad mbuf type %d from ring cons=%d prod=%d", m, + m->m_type, txq->txq_mr.br_cons, txq->txq_mr.br_prod)); m_vec[0] = m; - if (m->m_pkthdr.tso_segsz > 0 || m->m_pkthdr.len > TX_WR_SIZE_MAX || m->m_next != NULL) { - DPRINTF("returning 1 packet\n"); - return (1); + if (m->m_pkthdr.tso_segsz > 0 || m->m_pkthdr.len > TX_WR_SIZE_MAX || + m->m_next != NULL || (cxgb_pcpu_tx_coalesce == 0)) { + return (count); } - count = 1; + size = m->m_pkthdr.len; - for (m = buf_ring_peek(mr); m != NULL; m = buf_ring_peek(mr)) { + for (m = buf_ring_peek(&txq->txq_mr); m != NULL; + m = buf_ring_peek(&txq->txq_mr)) { - if (m->m_pkthdr.tso_segsz > 0 || size + m->m_pkthdr.len > TX_WR_SIZE_MAX || m->m_next != NULL) + if (m->m_pkthdr.tso_segsz > 0 || + size + m->m_pkthdr.len > TX_WR_SIZE_MAX || m->m_next != NULL) break; - buf_ring_dequeue(mr); + buf_ring_dequeue(&txq->txq_mr); size += m->m_pkthdr.len; m_vec[count++] = m; - - if (count == TX_WR_COUNT_MAX || (cxgb_pcpu_tx_coalesce == 0)) + if (count == TX_WR_COUNT_MAX) break; coalesced++; @@ -357,13 +370,15 @@ { struct mbuf *m; struct sge_txq *txq = &qs->txq[TXQ_ETH]; - + + mtx_lock(&txq->lock); while ((m = mbufq_dequeue(&txq->sendq)) != NULL) m_freem(m); while ((m = buf_ring_dequeue(&txq->txq_mr)) != NULL) m_freem(m); t3_free_tx_desc_all(txq); + mtx_unlock(&txq->lock); } static int @@ -376,6 +391,7 @@ KASSERT(qs->qs_cpuid == curcpu, ("cpu qset mismatch cpuid=%d curcpu=%d", qs->qs_cpuid, curcpu)); #endif + mtx_assert(&txq->lock, MA_OWNED); reclaimable = desc_reclaimable(txq); if (reclaimable == 0) @@ -403,14 +419,20 @@ pi = qs->port; initerr = err = i = reclaimed = 0; sc = pi->adapter; + txq = &qs->txq[TXQ_ETH]; + + mtx_assert(&txq->lock, MA_OWNED); retry: if (!pi->link_config.link_ok) initerr = ENXIO; else if (qs->qs_flags & QS_EXITING) initerr = ENXIO; - else { - txq = &qs->txq[TXQ_ETH]; + else if ((pi->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + initerr = ENXIO; + else if ((pi->ifp->if_flags & IFF_UP) == 0) + initerr = ENXIO; + else if (immpkt) { if (!buf_ring_empty(&txq->txq_mr)) initerr = cxgb_pcpu_enqueue_packet_(qs, immpkt); @@ -421,13 +443,14 @@ } if (initerr && initerr != ENOBUFS) { if (cxgb_debug) - printf("cxgb link down\n"); + log(LOG_WARNING, "cxgb link down\n"); if (immpkt) m_freem(immpkt); return (initerr); } - if ((tx_flush && (desc_reclaimable(txq) > 0)) || (desc_reclaimable(txq) > (TX_ETH_Q_SIZE>>1))) { + if ((tx_flush && (desc_reclaimable(txq) > 0)) || + (desc_reclaimable(txq) > (TX_ETH_Q_SIZE>>1))) { int reclaimed = 0; if (cxgb_debug) { @@ -442,11 +465,19 @@ } stopped = isset(&qs->txq_stopped, TXQ_ETH); - flush = ((!buf_ring_empty(&txq->txq_mr) && !stopped) || txq->immpkt); + flush = (((!buf_ring_empty(&txq->txq_mr) || (!IFQ_DRV_IS_EMPTY(&pi->ifp->if_snd))) && !stopped) || txq->immpkt); max_desc = tx_flush ? TX_ETH_Q_SIZE : TX_START_MAX_DESC; + + if (cxgb_debug) + DPRINTF("stopped=%d flush=%d max_desc=%d\n", + stopped, flush, max_desc); + err = flush ? cxgb_tx(qs, max_desc) : ENOSPC; - - if ((tx_flush && flush && err == 0) && !buf_ring_empty(&txq->txq_mr)) { + + + if ((tx_flush && flush && err == 0) && + (!buf_ring_empty(&txq->txq_mr) || + !IFQ_DRV_IS_EMPTY(&pi->ifp->if_snd))) { struct thread *td = curthread; if (++i > 1) { @@ -481,26 +512,37 @@ sc = pi->adapter; qs = NULL; qidx = resid = err = cookie = locked = 0; - + +#ifdef IFNET_MULTIQUEUE if (immpkt && (immpkt->m_pkthdr.rss_hash != 0)) { cookie = immpkt->m_pkthdr.rss_hash; qidx = cxgb_pcpu_cookie_to_qidx(pi, cookie); DPRINTF("hash=0x%x qidx=%d cpu=%d\n", immpkt->m_pkthdr.rss_hash, qidx, curcpu); qs = &pi->adapter->sge.qs[qidx]; - } else + } else +#endif qs = &pi->adapter->sge.qs[pi->first_qset]; - + txq = &qs->txq[TXQ_ETH]; - if (((sc->tunq_coalesce == 0) || (buf_ring_count(&txq->txq_mr) > TX_WR_COUNT_MAX)) && mtx_trylock(&txq->lock)) { + if (((sc->tunq_coalesce == 0) || + (buf_ring_count(&txq->txq_mr) >= TX_WR_COUNT_MAX) || + (cxgb_pcpu_tx_coalesce == 0)) && mtx_trylock(&txq->lock)) { + if (cxgb_debug) + printf("doing immediate transmit\n"); + txq->flags |= TXQ_TRANSMITTING; err = cxgb_pcpu_start_(qs, immpkt, FALSE); txq->flags &= ~TXQ_TRANSMITTING; resid = (buf_ring_count(&txq->txq_mr) > 64) || (desc_reclaimable(txq) > 64); mtx_unlock(&txq->lock); - } else if (immpkt) + } else if (immpkt) { + if (cxgb_debug) + printf("deferred coalesce=%jx ring_count=%d mtx_owned=%d\n", + sc->tunq_coalesce, buf_ring_count(&txq->txq_mr), mtx_owned(&txq->lock)); err = cxgb_pcpu_enqueue_packet_(qs, immpkt); - + } + if (resid && (txq->flags & TXQ_TRANSMITTING) == 0) wakeup(qs); @@ -510,53 +552,15 @@ void cxgb_start(struct ifnet *ifp) { - struct port_info *pi = ifp->if_softc; - struct sge_qset *qs; - struct mbuf *m, *head, *tail, *lhead, *ltail; - int calc_cookie, qidx, i; + struct port_info *p = ifp->if_softc; + + if (!p->link_config.link_ok) + return; - IFQ_LOCK(&ifp->if_snd); - IFQ_DEQUEUE_NOLOCK(&ifp->if_snd, m); - head = tail = m; - i = 0; - while (m != NULL) { - IFQ_DEQUEUE_NOLOCK(&ifp->if_snd, m); - tail->m_nextpkt = m; - tail = m; - i++; - } - IFQ_UNLOCK(&ifp->if_snd); - printf("dequeued %d packets\n", i); - lhead = ltail = NULL; - for (m = head; m != NULL; m = head->m_nextpkt) { - calc_cookie = cxgb_pcpu_calc_cookie(ifp, m); - qidx = cxgb_pcpu_cookie_to_qidx(pi, calc_cookie); - qs = &pi->adapter->sge.qs[qidx]; - critical_enter(); - if (qs->qs_cpuid == curcpu) { - if (lhead == NULL) - lhead = m; - else - ltail->m_nextpkt = m; - ltail = m; - critical_exit(); - } else { - critical_exit(); - cxgb_pcpu_enqueue_packet_(qs, m); - } - } - if (curcpu < SGE_QSETS) { - qs = &pi->adapter->sge.qs[curcpu]; - /* - * Assume one-to-one mapping of qset to CPU for now XXX - */ + if (IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + return; - (void)cxgb_pcpu_start_(qs, NULL, TRUE); - /* - * XXX multiple packets - */ - cxgb_pcpu_enqueue_packet_(qs, lhead); - } + cxgb_pcpu_start(ifp, NULL); } static void @@ -566,11 +570,12 @@ struct thread *td; struct sge_txq *txq = &qs->txq[TXQ_ETH]; int idleticks, err = 0; +#ifdef notyet struct adapter *sc = qs->port->adapter; - +#endif td = curthread; - sleep_ticks = hz/100; + sleep_ticks = max(hz/1000, 1); qs->qs_flags |= QS_RUNNING; thread_lock(td); sched_bind(td, qs->qs_cpuid); @@ -599,7 +604,7 @@ mtx_unlock(&txq->lock); } else err = EINPROGRESS; - +#ifdef notyet if (mtx_trylock(&qs->rspq.lock)) { process_responses(sc, qs, -1); @@ -610,6 +615,7 @@ mtx_unlock(&qs->rspq.lock); } +#endif if ((!buf_ring_empty(&txq->txq_mr)) && err == 0) { if (cxgb_debug) printf("head=%p cons=%d prod=%d\n", @@ -632,36 +638,47 @@ kproc_exit(0); } +#ifdef IFNET_MULTIQUEUE static int cxgb_pcpu_cookie_to_qidx(struct port_info *pi, uint32_t cookie) { int qidx; uint32_t tmp; + /* + * Will probably need to be changed for 4-port XXX + */ tmp = pi->tx_chan ? cookie : cookie & ((RSS_TABLE_SIZE>>1)-1); DPRINTF(" tmp=%d ", tmp); qidx = (tmp & (pi->nqsets -1)) + pi->first_qset; return (qidx); } - +#endif void cxgb_pcpu_startup_threads(struct adapter *sc) { - int i, j; + int i, j, nqsets; struct proc *p; - + + for (i = 0; i < (sc)->params.nports; ++i) { struct port_info *pi = adap2pinfo(sc, i); - - for (j = 0; j < pi->nqsets; ++j) { + +#ifdef IFNET_MULTIQUEUE + nqsets = pi->nqsets; +#else + nqsets = 1; +#endif + for (j = 0; j < nqsets; ++j) { struct sge_qset *qs; qs = &sc->sge.qs[pi->first_qset + j]; qs->port = pi; qs->qs_cpuid = ((pi->first_qset + j) % mp_ncpus); - device_printf(sc->dev, "starting thread for %d\n", qs->qs_cpuid); + device_printf(sc->dev, "starting thread for %d\n", + qs->qs_cpuid); kproc_create(cxgb_pcpu_start_proc, qs, &p, RFNOWAIT, 0, "cxgbsp"); @@ -674,12 +691,20 @@ cxgb_pcpu_shutdown_threads(struct adapter *sc) { int i, j; + int nqsets; + + for (i = 0; i < sc->params.nports; i++) { struct port_info *pi = &sc->port[i]; int first = pi->first_qset; - - for (j = 0; j < pi->nqsets; j++) { + +#ifdef IFNET_MULTIQUEUE + nqsets = pi->nqsets; +#else + nqsets = 1; +#endif + for (j = 0; j < nqsets; j++) { struct sge_qset *qs = &sc->sge.qs[first + j]; qs->qs_flags |= QS_EXITING; @@ -694,7 +719,6 @@ } } - static __inline void check_pkt_coalesce(struct sge_qset *qs) { @@ -774,3 +798,4 @@ #endif return (err); } + ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#13 (text+ko) ==== @@ -305,9 +305,7 @@ req->pbl_top = t3_read_reg(adapter, A_ULPTX_PBL_ULIMIT); req->rqt_base = t3_read_reg(adapter, A_ULPRX_RQ_LLIMIT); req->rqt_top = t3_read_reg(adapter, A_ULPRX_RQ_ULIMIT); - req->kdb_addr = (void *)((unsigned long)rman_get_virtual(adapter->regs_res) + A_SG_KDOORBELL); - req->pdev = adapter->dev; - break; + req->kdb_addr = (void *)((unsigned long)rman_get_virtual(adapter->regs_res) + A_SG_KDOORBELL); break; } case RDMA_CQ_OP: { struct rdma_cq_op *req = data; @@ -926,7 +924,6 @@ cxgb_redirect_event(void *unused, int event, struct rtentry *rt0, struct rtentry *rt1, struct sockaddr *sa) { - /* * ignore events on non-offloaded interfaces */ @@ -967,14 +964,15 @@ do_bad_cpl(struct t3cdev *dev, struct mbuf *m) { log(LOG_ERR, "%s: received bad CPL command 0x%x\n", dev->name, - *mtod(m, uint32_t *)); + 0xFF & *mtod(m, uint32_t *)); + kdb_backtrace(); return (CPL_RET_BUF_DONE | CPL_RET_BAD_MSG); } /* * Handlers for each CPL opcode */ -static cpl_handler_func cpl_handlers[NUM_CPL_CMDS]; +static cpl_handler_func cpl_handlers[256]; /* * Add a new handler to the CPL dispatch table. A NULL handler may be supplied @@ -1066,9 +1064,13 @@ void cxgb_neigh_update(struct rtentry *rt, uint8_t *enaddr, struct sockaddr *sa) { - struct t3cdev *tdev = T3CDEV(rt->rt_ifp); - PANIC_IF(!tdev); - t3_l2t_update(tdev, rt, enaddr, sa); + + if (is_offloading(rt->rt_ifp)) { + struct t3cdev *tdev = T3CDEV(rt->rt_ifp); + + PANIC_IF(!tdev); + t3_l2t_update(tdev, rt, enaddr, sa); + } } static void @@ -1110,6 +1112,13 @@ olddev = old->rt_ifp; newdev = new->rt_ifp; + if (!is_offloading(olddev)) + return; + if (!is_offloading(newdev)) { + log(LOG_WARNING, "%s: Redirect to non-offload" + "device ignored.\n", __FUNCTION__); + return; + } tdev = T3CDEV(olddev); PANIC_IF(!tdev); if (tdev != T3CDEV(newdev)) { @@ -1163,7 +1172,6 @@ free(addr, M_CXGB); } - /* * Allocate and initialize the TID tables. Returns 0 on success. */ @@ -1212,6 +1220,8 @@ static void free_tid_maps(struct tid_info *t) { + mtx_destroy(&t->stid_lock); + mtx_destroy(&t->atid_lock); cxgb_free_mem(t->tid_tab); } @@ -1231,11 +1241,6 @@ rw_wunlock(&adapter_list_lock); } -/* - * XXX - */ -#define t3_free_l2t(...) - int cxgb_offload_activate(struct adapter *adapter) { @@ -1269,8 +1274,6 @@ device_printf(adapter->dev, "%s: t3_init_l2t failed\n", __FUNCTION__); goto out_free; } - - natids = min(tid_range.num / 2, MAX_ATIDS); err = init_tid_tabs(&t->tid_maps, tid_range.num, natids, stid_range.num, ATID_BASE, stid_range.base); @@ -1334,6 +1337,7 @@ T3C_DATA(tdev) = NULL; t3_free_l2t(L2DATA(tdev)); L2DATA(tdev) = NULL; + mtx_destroy(&t->tid_release_lock); free(t, M_CXGB); } @@ -1402,7 +1406,7 @@ TAILQ_INIT(&ofld_dev_list); TAILQ_INIT(&adapter_list); - for (i = 0; i < NUM_CPL_CMDS; ++i) + for (i = 0; i < 0x100; ++i) cpl_handlers[i] = do_bad_cpl; t3_register_cpl_handler(CPL_SMT_WRITE_RPL, do_smt_write_rpl); @@ -1429,7 +1433,9 @@ t3_register_cpl_handler(CPL_RX_DATA_DDP, do_hwtid_rpl); t3_register_cpl_handler(CPL_RX_DDP_COMPLETE, do_hwtid_rpl); t3_register_cpl_handler(CPL_ISCSI_HDR, do_hwtid_rpl); - + t3_register_cpl_handler(CPL_GET_TCB_RPL, do_hwtid_rpl); + t3_register_cpl_handler(CPL_SET_TCB_RPL, do_hwtid_rpl); + EVENTHANDLER_REGISTER(route_arp_update_event, cxgb_arp_update_event, NULL, EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(route_redirect_event, cxgb_redirect_event, @@ -1456,4 +1462,3 @@ } MODULE_VERSION(if_cxgb, 1); - ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_sge.c#10 (text+ko) ==== @@ -2743,18 +2743,24 @@ rspq->async_notif++; goto skip; } else if (flags & F_RSPD_IMM_DATA_VALID) { - if (cxgb_debug) - printf("IMM DATA VALID opcode=0x%x rspq->cidx=%d\n", r->rss_hdr.opcode, rspq->cidx); - if(get_imm_packet(adap, r, rspq->rspq_mh.mh_head) == 0) { + struct mbuf *m = NULL; + + DPRINTF("IMM DATA VALID opcode=0x%x rspq->cidx=%d\n", + r->rss_hdr.opcode, rspq->cidx); + if (rspq->rspq_mh.mh_head == NULL) + rspq->rspq_mh.mh_head = m_gethdr(M_DONTWAIT, MT_DATA); + else + m = m_gethdr(M_DONTWAIT, MT_DATA); + + if (rspq->rspq_mh.mh_head == NULL && m == NULL) { no_mem: rspq->next_holdoff = NOMEM_INTR_DELAY; budget_left--; break; - } else { - eop = 1; } - goto skip; - + get_imm_packet(adap, r, rspq->rspq_mh.mh_head); + eop = 1; + rspq->imm_data++; } else if (r->len_cq) { int drop_thresh = eth ? SGE_RX_DROP_THRES : 0; ==== //depot/projects/iwarp/sys/modules/cxgb/cxgb/Makefile#5 (text+ko) ==== @@ -13,8 +13,7 @@ CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DCONFIG_DEFINED -DDEFAULT_JUMBO -I${CXGB} -DSMP CFLAGS+= -DDISABLE_MBUF_IOVEC -CFLAGS+= -DIFNET_MULTIQUEUE - +#CFLAGS+= -DIFNET_MULTIQUEUE #CFLAGS+= -DDISABLE_MBUF_IOVEC #CFLAGS+= -DDEBUG -DDEBUG_PRINT #CFLAGS+= -DINVARIANT_SUPPORT -DINVARIANTS From owner-p4-projects@FreeBSD.ORG Thu Feb 7 00:10:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E985716A421; Thu, 7 Feb 2008 00:10:48 +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 19B9C16A41A for ; Thu, 7 Feb 2008 00:10:48 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 043DF13C47E for ; Thu, 7 Feb 2008 00:10:48 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m170AlBG040673 for ; Thu, 7 Feb 2008 00:10:47 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m170Al6m040670 for perforce@freebsd.org; Thu, 7 Feb 2008 00:10:47 GMT (envelope-from swise@FreeBSD.org) Date: Thu, 7 Feb 2008 00:10:47 GMT Message-Id: <200802070010.m170Al6m040670@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 134940 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 00:10:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=134940 Change 134940 by swise@swise:vic10:iwarp on 2008/02/07 00:09:47 sorecieve() needs uio. Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_cm.c#14 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_cm.c#14 (text+ko) ==== @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -194,10 +195,13 @@ sopt.sopt_name = TCP_INFO; sopt.sopt_val = (caddr_t)&ti; sopt.sopt_valsize = sizeof ti; + sopt.sopt_td = NULL; err = sogetopt(ep->com.so, &sopt); - if (err) + if (err) { + printf("%s can't get tcpinfo\n", __FUNCTION__); return -err; + } if (!(ti.tcpi_options & TCPI_OPT_TOE)) { printf("%s connection NOT OFFLOADED!\n", __FUNCTION__); return -EINVAL; @@ -351,6 +355,7 @@ sopt.sopt_name = SO_LINGER; sopt.sopt_val = (caddr_t)&linger_time; sopt.sopt_valsize = sizeof linger_time; + sopt.sopt_td = NULL; err = sosetopt(ep->com.so, &sopt); if (err) printf("%s can't set linger to 0, no RST!\n", __FUNCTION__); @@ -436,7 +441,7 @@ struct mpa_message *mpa; struct mbuf *m; - PDBG("%s ep %p plen %d\n", __FUNCTION__, ep, plen); + PDBG("%s ep %p so %p plen %d\n", __FUNCTION__, ep, ep->com.so, plen); mpalen = sizeof(*mpa) + plen; @@ -595,6 +600,8 @@ int err; struct mbuf *top, *m; int flags = MSG_DONTWAIT; + struct uio uio; + int len; PDBG("%s ep %p\n", __FUNCTION__, ep); @@ -607,9 +614,14 @@ if (state_read(&ep->com) != MPA_REQ_SENT) return; - err = soreceive(ep->com.so, NULL, NULL, &top, NULL, &flags); - + uio.uio_resid = len = 1000000; + uio.uio_td = ep->com.thread; + err = soreceive(ep->com.so, NULL, &uio, &top, NULL, &flags); if (err) { + if (err == EWOULDBLOCK) { + start_ep_timer(ep); + return; + } err = -err; goto err; } @@ -741,8 +753,10 @@ int flags = MSG_DONTWAIT; struct mbuf *top, *m; int err; + struct uio uio; + int len; - PDBG("%s ep %p\n", __FUNCTION__, ep); + PDBG("%s ep %p so %p\n", __FUNCTION__, ep, ep->com.so); /* * Stop mpa timer. If it expired, then the state has @@ -753,13 +767,15 @@ if (state_read(&ep->com) != MPA_REQ_WAIT) return; - err = soreceive(ep->com.so, NULL, NULL, &top, NULL, &flags); - + uio.uio_resid = len = 1000000; + uio.uio_td = ep->com.thread; + err = soreceive(ep->com.so, NULL, &uio, &top, NULL, &flags); if (err) { if (err == EWOULDBLOCK) { start_ep_timer(ep); return; } + err = -err; goto err; } @@ -1164,7 +1180,7 @@ struct iwch_dev *h = to_iwch_dev(cm_id->device); struct iwch_qp *qp = get_qhp(h, conn_param->qpn); - PDBG("%s ep %p tid %u\n", __FUNCTION__, ep, ep->hwtid); + PDBG("%s ep %p so %p\n", __FUNCTION__, ep, ep->com.so); if (state_read(&ep->com) == DEAD) return (-ECONNRESET); @@ -1387,8 +1403,8 @@ mtx_lock(&ep->com.lock); - PDBG("%s ep %p state %s, abrupt %d\n", __FUNCTION__, ep, - states[ep->com.state], abrupt); + PDBG("%s ep %p so %p state %s, abrupt %d\n", __FUNCTION__, ep, + ep->com.so, states[ep->com.state], abrupt); if (ep->com.state == DEAD) { PDBG("%s already dead ep %p\n", __FUNCTION__, ep); @@ -1437,13 +1453,31 @@ static void process_data(struct iwch_ep *ep) { - PDBG("%s ep %p\n", __FUNCTION__, ep); + struct sockaddr_in *local, *remote; + + PDBG("%s ep %p so %p\n", __FUNCTION__, ep, ep->com.so); switch (state_read(&ep->com)) { case MPA_REQ_SENT: process_mpa_reply(ep); break; case MPA_REQ_WAIT: + + /* + * XXX + * Set local and remote addrs here because when we + * dequeue the newly accepted socket, they aren't set + * yet in the pcb! + */ + in_getsockaddr(ep->com.so, (struct sockaddr **)&local); + in_getpeeraddr(ep->com.so, (struct sockaddr **)&remote); + PDBG("%s local %s remote %s\n", __FUNCTION__, + inet_ntoa(local->sin_addr), + inet_ntoa(remote->sin_addr)); + ep->com.local_addr = *local; + ep->com.remote_addr = *remote; + free(local, M_SONAME); + free(remote, M_SONAME); process_mpa_request(ep); break; case MPA_REP_SENT: @@ -1459,6 +1493,7 @@ static void process_connected(struct iwch_ep *ep) { + PDBG("%s ep %p so %p\n", __FUNCTION__, ep, ep->com.so); if ((ep->com.so->so_state & SS_ISCONNECTED) && !ep->com.so->so_error) { send_mpa_req(ep); } else { @@ -1502,21 +1537,18 @@ { struct socket *child_so; struct iwch_ep *child_ep; - struct sockaddr_in *remote, *local; + struct sockaddr_in *remote; int err; + PDBG("%s parent ep %p so %p\n", __FUNCTION__, parent_ep, parent_ep->com.so); child_so = dequeue_socket(parent_ep->com.so, &remote); if (!child_so) { log(LOG_ERR, "%s - failed to dequeue child socket!\n", __FUNCTION__); return; } - err = in_getsockaddr(child_so, (struct sockaddr **)&local); - if (err) { - log(LOG_ERR, "%s - in_getsockaddr failed %d\n", - __FUNCTION__, err); - return; - } + PDBG("%s remote addr %s port %d\n", __FUNCTION__, + inet_ntoa(remote->sin_addr), ntohs(remote->sin_port)); child_ep = alloc_ep(sizeof(*child_ep), M_NOWAIT); if (!child_ep) { log(LOG_ERR, "%s - failed to allocate ep entry!\n", @@ -1528,12 +1560,10 @@ child_ep->com.so->so_upcall = iwch_so_upcall; child_ep->com.so->so_upcallarg = child_ep; child_ep->com.cm_id = NULL; - child_ep->com.local_addr = *local; - child_ep->com.remote_addr = *remote; child_ep->com.thread = parent_ep->com.thread; child_ep->parent_ep = parent_ep; - free(local, M_SONAME); free(remote, M_SONAME); + get_ep(&parent_ep->com); child_ep->parent_ep = parent_ep; callout_init(&child_ep->timer, TRUE); state_set(&child_ep->com, MPA_REQ_WAIT); @@ -1549,6 +1579,7 @@ struct iwch_ep *ep = arg; int state = state_read(&ep->com); + PDBG("%s so %p so state %x ep %p ep state(%d)=%s\n", __FUNCTION__, so, so->so_state, ep, ep->com.state, states[ep->com.state]); if (state == CONNECTING) { process_connected(ep); return; From owner-p4-projects@FreeBSD.ORG Thu Feb 7 00:48:28 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B294516A469; Thu, 7 Feb 2008 00:48:28 +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 7829316A419 for ; Thu, 7 Feb 2008 00:48:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 61D3213C474 for ; Thu, 7 Feb 2008 00:48:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m170mSPF059101 for ; Thu, 7 Feb 2008 00:48:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m170mSFY059098 for perforce@freebsd.org; Thu, 7 Feb 2008 00:48:28 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 7 Feb 2008 00:48:28 GMT Message-Id: <200802070048.m170mSFY059098@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 134943 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 00:48:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=134943 Change 134943 by hselasky@hselasky_laptop001 on 2008/02/07 00:48:21 Add more documentation - not complete yet. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#111 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#111 (text+ko) ==== @@ -154,6 +154,12 @@ #endif +/*------------------------------------------------------------------------* + * usb_get_devid + * + * This function returns the USB Vendor and Product ID like a 32-bit + * unsigned integer. + *------------------------------------------------------------------------*/ uint32_t usb_get_devid(device_t dev) { @@ -201,6 +207,16 @@ return (pipe); } +/*------------------------------------------------------------------------* + * usbd_get_pipe + * + * This function searches for an USB pipe based on the information + * given by the passed "struct usbd_config" pointer. + * + * Return values: + * NULL: No match. + * Else: Pointer to "struct usbd_pipe". + *------------------------------------------------------------------------*/ struct usbd_pipe * usbd_get_pipe(struct usbd_device *udev, uint8_t iface_index, const struct usbd_config *setup) @@ -292,6 +308,13 @@ return (pipe); } +/*------------------------------------------------------------------------* + * usbd_interface_count + * + * This function stores the number of USB interfaces excluding + * alternate settings, which the USB config descriptor reports into + * the unsigned 8-bit integer pointed to by "count". + *------------------------------------------------------------------------*/ usbd_status_t usbd_interface_count(struct usbd_device *udev, uint8_t *count) { @@ -312,6 +335,10 @@ }; +/* + * This table stores the all the allowed packet sizes based on + * endpoint type and USB speed: + */ static const struct usbd_std_packet_size usbd_std_packet_size[4][USB_SPEED_MAX] = { @@ -344,6 +371,12 @@ }, }; +/*------------------------------------------------------------------------* + * usbd_compute_max_frame_size + * + * This function computes the maximum frame size, hence high speed USB + * can transfer multiple consecutive packets. + *------------------------------------------------------------------------*/ static void usbd_compute_max_frame_size(struct usbd_xfer *xfer) { @@ -2076,6 +2109,12 @@ return; } +/*------------------------------------------------------------------------* + * usbd_callback_intr_sched + * + * This function gets the USB callback thread running if it is + * sleeping. + *------------------------------------------------------------------------*/ static void usbd_callback_intr_sched(struct usbd_memory_info *info) { @@ -2088,6 +2127,11 @@ return; } +/*------------------------------------------------------------------------* + * usbd_callback_intr_td_sub - factored out code + * + * This function performs USB callbacks. + *------------------------------------------------------------------------*/ static void usbd_callback_intr_td_sub(struct usbd_xfer **xfer, uint8_t dropcount) { @@ -2190,6 +2234,14 @@ return; } +/*------------------------------------------------------------------------* + * usbd_dma_delay_done_cb + * + * This function is called when the DMA delay has been exectuded, and + * will make sure that the callback is called to complete the USB + * transfer. This code path is ususally only used when there is an USB + * error like USBD_ERR_CANCELLED. + *------------------------------------------------------------------------*/ static void usbd_dma_delay_done_cb(struct usbd_xfer *xfer) { @@ -2489,6 +2541,13 @@ return; } +/*------------------------------------------------------------------------* + * usbd_delayed_transfer_start + * + * This function is called to start the USB transfer when + * "xfer->interval" is greater than zero, and and the endpoint type is + * BULK or CONTROL. + *------------------------------------------------------------------------*/ static void usbd_delayed_transfer_start(void *arg) { @@ -3803,6 +3862,9 @@ return (err); } +/*------------------------------------------------------------------------* + * usbd_fill_get_report - factored out code + *------------------------------------------------------------------------*/ void usbd_fill_get_report(usb_device_request_t *req, uint8_t iface_no, uint8_t type, uint8_t id, uint16_t size) @@ -3816,6 +3878,9 @@ return; } +/*------------------------------------------------------------------------* + * usbd_fill_set_report - factored out code + *------------------------------------------------------------------------*/ void usbd_fill_set_report(usb_device_request_t *req, uint8_t iface_no, uint8_t type, uint8_t id, uint16_t size) @@ -3829,6 +3894,11 @@ return; } +/*------------------------------------------------------------------------* + * usbd_clear_data_toggle - factored out code + * + * NOTE: the job of this function is not to reset the hardware data toggle. + *------------------------------------------------------------------------*/ void usbd_clear_data_toggle(struct usbd_device *udev, struct usbd_pipe *pipe) { @@ -3932,9 +4002,11 @@ * }; */ -/* +/*------------------------------------------------------------------------* + * usbd_do_poll + * * called from keyboard driver when in polling mode - */ + *------------------------------------------------------------------------*/ void usbd_do_poll(struct usbd_device *udev) { @@ -3942,10 +4014,12 @@ return; } -/* +/*------------------------------------------------------------------------* + * usb_match_device + * * Search for a vendor/product pair in an array. The item size is * given as an argument. - */ + *------------------------------------------------------------------------*/ const struct usb_devno * usb_match_device(const struct usb_devno *tbl, u_int nentries, u_int size, uint16_t vendor, uint16_t product) @@ -3962,6 +4036,9 @@ return (NULL); } +/*------------------------------------------------------------------------* + * usbd_driver_load + *------------------------------------------------------------------------*/ int usbd_driver_load(struct module *mod, int what, void *arg) { From owner-p4-projects@FreeBSD.ORG Thu Feb 7 00:52:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C7B3B16A419; Thu, 7 Feb 2008 00:52:33 +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 8C45116A417 for ; Thu, 7 Feb 2008 00:52:33 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 74EC413C45E for ; Thu, 7 Feb 2008 00:52:33 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m170qXXa059334 for ; Thu, 7 Feb 2008 00:52:33 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m170qX7B059331 for perforce@freebsd.org; Thu, 7 Feb 2008 00:52:33 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 00:52:33 GMT Message-Id: <200802070052.m170qX7B059331@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134944 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 00:52:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=134944 Change 134944 by kmacy@kmacy:entropy:iwarp on 2008/02/07 00:52:21 IFtoehead 134879 fix various issues tied to ddp setup fix dependencies for cxgb module unload Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#14 integrate .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_sge.c#11 integrate .. //depot/projects/iwarp/sys/dev/cxgb/sys/mvec.h#6 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#8 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#7 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#2 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_defs.h#7 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_t3_ddp.h#5 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c#5 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_vm.c#2 integrate .. //depot/projects/iwarp/usr.sbin/cxgbtool/cxgbtool.c#5 integrate Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#14 (text+ko) ==== @@ -448,7 +448,7 @@ case GET_RX_PAGE_INFO: rx_page_info = data; rx_page_info->page_size = tp->rx_pg_size; - rx_page_info->num = tp->rx_num_pgs; + rx_page_info->num = tp->rx_num_pgs; break; case ULP_ISCSI_GET_PARAMS: case ULP_ISCSI_SET_PARAMS: ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_sge.c#11 (text+ko) ==== @@ -73,11 +73,16 @@ #endif int txq_fills = 0; -static int recycle_enable = 1; +/* + * XXX don't re-enable this until TOE stops assuming + * we have an m_ext + */ +static int recycle_enable = 0; extern int cxgb_txq_buf_ring_size; int cxgb_cached_allocations; int cxgb_cached; -int cxgb_ext_freed; +int cxgb_ext_freed = 0; +int cxgb_ext_inited = 0; extern int cxgb_use_16k_clusters; extern int cxgb_pcpu_cache_enable; @@ -775,14 +780,6 @@ void t3_sge_deinit_sw(adapter_t *sc) { - int i; - - callout_drain(&sc->sge_timer_ch); - if (sc->tq) - taskqueue_drain(sc->tq, &sc->slow_intr_task); - for (i = 0; i < sc->params.nports; i++) - if (sc->port[i].tq != NULL) - taskqueue_drain(sc->port[i].tq, &sc->port[i].timer_reclaim_task); mi_deinit(); } @@ -2441,7 +2438,8 @@ bzero(cl, header_size); m = (struct mbuf *)cl; - + + cxgb_ext_inited++; SLIST_INIT(&m->m_pkthdr.tags); m->m_type = MT_DATA; m->m_flags = flags | M_NOFREE | M_EXT; @@ -3003,12 +3001,8 @@ return (err); } - -/* - * broken by recent mbuf changes - */ static int -t3_dump_txq(SYSCTL_HANDLER_ARGS) +t3_dump_txq_eth(SYSCTL_HANDLER_ARGS) { struct sge_txq *txq; struct sge_qset *qs; @@ -3037,7 +3031,7 @@ txq->txq_dump_start = 0; return (EINVAL); } - err = t3_sge_read_ecntxt(qs->port->adapter, txq->cntxt_id, data); + err = t3_sge_read_ecntxt(qs->port->adapter, qs->rspq.cntxt_id, data); if (err) return (err); @@ -3081,7 +3075,68 @@ return (err); } +static int +t3_dump_txq_ctrl(SYSCTL_HANDLER_ARGS) +{ + struct sge_txq *txq; + struct sge_qset *qs; + int i, j, err, dump_end; + static int multiplier = 1; + struct sbuf *sb; + struct tx_desc *txd; + uint32_t *WR, wr_hi, wr_lo, gen; + + txq = arg1; + qs = txq_to_qset(txq, TXQ_CTRL); + if (txq->txq_dump_count == 0) { + return (0); + } + if (txq->txq_dump_count > 256) { + log(LOG_WARNING, + "dump count is too large %d\n", txq->txq_dump_count); + txq->txq_dump_count = 1; + return (EINVAL); + } + if (txq->txq_dump_start > 255) { + log(LOG_WARNING, + "dump start of %d is greater than queue size\n", + txq->txq_dump_start); + txq->txq_dump_start = 0; + return (EINVAL); + } +retry_sbufops: + sb = sbuf_new(NULL, NULL, QDUMP_SBUF_SIZE*multiplier, SBUF_FIXEDLEN); + sbuf_printf(sb, " qid=%d start=%d -> end=%d\n", qs->idx, + txq->txq_dump_start, + (txq->txq_dump_start + txq->txq_dump_count) & 255); + + dump_end = txq->txq_dump_start + txq->txq_dump_count; + for (i = txq->txq_dump_start; i < dump_end; i++) { + txd = &txq->desc[i & (255)]; + WR = (uint32_t *)txd->flit; + wr_hi = ntohl(WR[0]); + wr_lo = ntohl(WR[1]); + gen = G_WR_GEN(wr_lo); + + sbuf_printf(sb," wr_hi %08x wr_lo %08x gen %d\n", + wr_hi, wr_lo, gen); + for (j = 2; j < 30; j += 4) + sbuf_printf(sb, "\t%08x %08x %08x %08x \n", + WR[j], WR[j + 1], WR[j + 2], WR[j + 3]); + + } + if (sbuf_overflowed(sb)) { + sbuf_delete(sb); + multiplier++; + goto retry_sbufops; + } + sbuf_finish(sb); + err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + sbuf_delete(sb); + return (err); +} + static int t3_lro_enable(SYSCTL_HANDLER_ARGS) { @@ -3206,6 +3261,10 @@ CTLFLAG_RD, &cxgb_ext_freed, 0, "#times a cluster was freed through ext_free"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, + "ext_inited", + CTLFLAG_RD, &cxgb_ext_inited, + 0, "#times a cluster was initialized for ext_free"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "mbufs_outstanding", CTLFLAG_RD, &cxgb_mbufs_outstanding, 0, "#mbufs in flight in the driver"); @@ -3255,8 +3314,8 @@ for (j = 0; j < pi->nqsets; j++) { struct sge_qset *qs = &sc->sge.qs[pi->first_qset + j]; - struct sysctl_oid *qspoid, *rspqpoid, *txqpoid; - struct sysctl_oid_list *qspoidlist, *rspqpoidlist, *txqpoidlist; + struct sysctl_oid *qspoid, *rspqpoid, *txqpoid, *ctrlqpoid; + struct sysctl_oid_list *qspoidlist, *rspqpoidlist, *txqpoidlist, *ctrlqpoidlist; struct sge_txq *txq = &qs->txq[TXQ_ETH]; snprintf(qs->namebuf, QS_NAME_LEN, "qs%d", j); @@ -3273,8 +3332,10 @@ txq_names[0], CTLFLAG_RD, NULL, "txq statistics"); txqpoidlist = SYSCTL_CHILDREN(txqpoid); - - + ctrlqpoid = SYSCTL_ADD_NODE(ctx, qspoidlist, OID_AUTO, + txq_names[2], CTLFLAG_RD, NULL, "ctrlq statistics"); + ctrlqpoidlist = SYSCTL_CHILDREN(ctrlqpoid); + SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "size", CTLFLAG_RD, &qs->rspq.size, 0, "#entries in response queue"); @@ -3297,8 +3358,7 @@ CTLTYPE_STRING | CTLFLAG_RD, &qs->rspq, 0, t3_dump_rspq, "A", "dump of the response queue"); - - + SYSCTL_ADD_INT(ctx, txqpoidlist, OID_AUTO, "dropped", CTLFLAG_RD, &qs->txq[TXQ_ETH].txq_drops, 0, "#tunneled packets dropped"); @@ -3355,7 +3415,22 @@ 0, "txq #entries to dump"); SYSCTL_ADD_PROC(ctx, txqpoidlist, OID_AUTO, "qdump", CTLTYPE_STRING | CTLFLAG_RD, &qs->txq[TXQ_ETH], - 0, t3_dump_txq, "A", "dump of the transmit queue"); + 0, t3_dump_txq_eth, "A", "dump of the transmit queue"); + + SYSCTL_ADD_UINT(ctx, ctrlqpoidlist, OID_AUTO, "dump_start", + CTLFLAG_RW, &qs->txq[TXQ_CTRL].txq_dump_start, + 0, "ctrlq start idx for dump"); + SYSCTL_ADD_UINT(ctx, ctrlqpoidlist, OID_AUTO, "dump_count", + CTLFLAG_RW, &qs->txq[TXQ_CTRL].txq_dump_count, + 0, "ctrl #entries to dump"); + SYSCTL_ADD_PROC(ctx, ctrlqpoidlist, OID_AUTO, "qdump", + CTLTYPE_STRING | CTLFLAG_RD, &qs->txq[TXQ_CTRL], + 0, t3_dump_txq_ctrl, "A", "dump of the transmit queue"); + + + + + } } } ==== //depot/projects/iwarp/sys/dev/cxgb/sys/mvec.h#6 (text+ko) ==== @@ -66,7 +66,7 @@ #define m_seq m_pkthdr.csum_data /* stored sequence */ #define m_ddp_gl m_ext.ext_buf /* ddp list */ #define m_ddp_flags m_pkthdr.csum_flags /* ddp flags */ -#define m_ulp_mode m_ext.ext_type /* upper level protocol */ +#define m_ulp_mode m_pkthdr.tso_segsz /* upper level protocol */ extern uma_zone_t zone_miovec; ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#8 (text+ko) ==== @@ -579,7 +579,7 @@ * to the HW for the amount of data processed. */ void -t3_cleanup_rbuf(struct tcpcb *tp) +t3_cleanup_rbuf(struct tcpcb *tp, int copied) { struct toepcb *toep = tp->t_toe; struct socket *so; @@ -587,17 +587,28 @@ int dack_mode, must_send, read; u32 thres, credits, dack = 0; + so = tp->t_inpcb->inp_socket; if (!((tp->t_state == TCPS_ESTABLISHED) || (tp->t_state == TCPS_FIN_WAIT_1) || - (tp->t_state == TCPS_FIN_WAIT_2))) + (tp->t_state == TCPS_FIN_WAIT_2))) { + if (copied) { + SOCKBUF_LOCK(&so->so_rcv); + toep->tp_copied_seq += copied; + SOCKBUF_UNLOCK(&so->so_rcv); + } + return; - INP_LOCK_ASSERT(tp->t_inpcb); + } - so = tp->t_inpcb->inp_socket; + INP_LOCK_ASSERT(tp->t_inpcb); SOCKBUF_LOCK(&so->so_rcv); - read = toep->tp_enqueued_bytes - so->so_rcv.sb_cc; - toep->tp_copied_seq += read; - toep->tp_enqueued_bytes -= read; + if (copied) + toep->tp_copied_seq += copied; + else { + read = toep->tp_enqueued_bytes - so->so_rcv.sb_cc; + toep->tp_copied_seq += read; + } credits = toep->tp_copied_seq - toep->tp_rcv_wup; + toep->tp_enqueued_bytes = so->so_rcv.sb_cc; SOCKBUF_UNLOCK(&so->so_rcv); if (credits > so->so_rcv.sb_mbmax) @@ -687,7 +698,7 @@ cxgb_toe_rcvd(struct tcpcb *tp) { INP_LOCK_ASSERT(tp->t_inpcb); - t3_cleanup_rbuf(tp); + t3_cleanup_rbuf(tp, 0); return (0); } @@ -1054,10 +1065,9 @@ /* * Determine the receive window size for a socket. */ -static unsigned int -select_rcv_wnd(struct socket *so) +static unsigned long +select_rcv_wnd(struct toedev *dev, struct socket *so) { - struct toedev *dev = TOE_DEV(so); struct tom_data *d = TOM_DATA(dev); unsigned int wnd; unsigned int max_rcv_wnd; @@ -1065,7 +1075,9 @@ if (tcp_do_autorcvbuf) wnd = tcp_autorcvbuf_max; else - wnd = sbspace(&so->so_rcv); + wnd = so->so_rcv.sb_hiwat; + + /* XXX * For receive coalescing to work effectively we need a receive window @@ -1079,7 +1091,7 @@ (uint32_t)d->rx_page_size * 23 : MAX_RCV_WND); - return (min(wnd, max_rcv_wnd)); + return min(wnd, max_rcv_wnd); } /* @@ -1118,8 +1130,8 @@ * XXX broken * */ - tp->rcv_wnd = select_rcv_wnd(so); - + tp->rcv_wnd = select_rcv_wnd(dev, so); + toep->tp_ulp_mode = TOM_TUNABLE(dev, ddp) && !(so->so_options & SO_NO_DDP) && tp->rcv_wnd >= MIN_DDP_RCV_WIN ? ULP_MODE_TCPDDP : 0; toep->tp_qset_idx = 0; @@ -1608,7 +1620,6 @@ uint64_t t; __be64 *tcb; - TRACE_ENTER; /* Note that we only accout for CPL_GET_TCB issued by the DDP code. We * really need a cookie in order to dispatch the RPLs. */ @@ -1625,7 +1636,6 @@ m_freem(m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) sorwakeup(so); - TRACE_EXIT; return; } @@ -1684,7 +1694,6 @@ if (__predict_false(so_no_receive(so) && m->m_pkthdr.len)) { handle_excess_rx(toep, m); - TRACE_EXIT; return; } @@ -1704,7 +1713,7 @@ } #endif m->m_ddp_flags = DDP_BF_PSH | DDP_BF_NOCOPY | 1; - bsp->flags &= ~DDP_BF_NOCOPY; + bsp->flags &= ~(DDP_BF_NOCOPY|DDP_BF_NODATA); q->cur_buf ^= 1; } else if (bsp->flags & DDP_BF_NOFLIP) { @@ -1720,11 +1729,11 @@ * and we need to decrement the posted count. */ if (m->m_pkthdr.len == 0) { - if (ddp_offset == 0) + if (ddp_offset == 0) { q->kbuf_posted--; - panic("length not set"); + bsp->flags |= DDP_BF_NODATA; + } m_free(m); - TRACE_EXIT; return; } } else { @@ -1732,12 +1741,12 @@ * but it got here way late and nobody cares anymore. */ m_free(m); - TRACE_EXIT; return; } tp = toep->tp_tp; m->m_ddp_gl = (unsigned char *)bsp->gl; + m->m_flags |= M_DDP; m->m_seq = tp->rcv_nxt; tp->rcv_nxt += m->m_pkthdr.len; tp->t_rcvtime = ticks; @@ -1750,10 +1759,12 @@ "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u lskb->len %u", m->m_seq, q->cur_buf, m->m_pkthdr.len); #endif - sbappend(&so->so_rcv, m); + SOCKBUF_LOCK(&so->so_rcv); + sbappendstream_locked(&so->so_rcv, m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) - sorwakeup(so); - TRACE_EXIT; + sorwakeup_locked(so); + else + SOCKBUF_UNLOCK(&so->so_rcv); } /* @@ -1766,9 +1777,10 @@ struct toepcb *toep = (struct toepcb *)ctx; /* OK if socket doesn't exist */ - if (toep == NULL) + if (toep == NULL) { + printf("null toep in do_get_tcb_rpl\n"); return (CPL_RET_BUF_DONE); - + } tcb_rpl_as_ddp_complete(toep, m); return (0); @@ -1778,7 +1790,6 @@ handle_ddp_data(struct toepcb *toep, struct mbuf *m) { struct tcpcb *tp = toep->tp_tp; - struct socket *so; struct ddp_state *q; struct ddp_buf_state *bsp; struct cpl_rx_data *hdr = cplhdr(m); @@ -1790,7 +1801,10 @@ TRACE_ENTER; q = &toep->tp_ddp_state; bsp = &q->buf_state[q->cur_buf]; - m->m_pkthdr.len = rcv_nxt - tp->rcv_nxt; + m->m_len = m->m_pkthdr.len = rcv_nxt - tp->rcv_nxt; + + printf("rcv_nxt=0x%x tp->rcv_next=0x%x len=%d\n", + rcv_nxt, tp->rcv_nxt, m->m_pkthdr.len); #ifdef T3_TRACE if ((int)m->m_pkthdr.len < 0) { @@ -1799,20 +1813,19 @@ #endif m->m_ddp_gl = (unsigned char *)bsp->gl; + m->m_flags |= M_DDP; m->m_cur_offset = bsp->cur_offset; m->m_ddp_flags = DDP_BF_PSH | (bsp->flags & DDP_BF_NOCOPY) | 1; if (bsp->flags & DDP_BF_NOCOPY) bsp->flags &= ~DDP_BF_NOCOPY; + printf("ddp flags=0x%x\n", m->m_ddp_flags); + m->m_seq = tp->rcv_nxt; tp->rcv_nxt = rcv_nxt; bsp->cur_offset += m->m_pkthdr.len; if (!(bsp->flags & DDP_BF_NOFLIP)) q->cur_buf ^= 1; - tp->t_rcvtime = ticks; - - so = toeptoso(toep); - sbappend(&so->so_rcv, m); /* * For now, don't re-enable DDP after a connection fell out of DDP * mode. @@ -1837,14 +1850,14 @@ if (__predict_false(so_no_receive(so))) { handle_excess_rx(toep, m); INP_UNLOCK(tp->t_inpcb); + TRACE_EXIT; return; } if (toep->tp_ulp_mode == ULP_MODE_TCPDDP) handle_ddp_data(toep, m); - + m->m_seq = ntohl(hdr->seq); - m->m_ddp_flags = 0; m->m_ulp_mode = 0; /* for iSCSI */ #if VALIDATE_SEQ @@ -1889,11 +1902,12 @@ "new_rx_data: seq 0x%x len %u", m->m_seq, m->m_pkthdr.len); #endif + INP_UNLOCK(tp->t_inpcb); SOCKBUF_LOCK(&so->so_rcv); if (sb_notify(&so->so_rcv)) DPRINTF("rx_data so=%p flags=0x%x len=%d\n", so, so->so_rcv.sb_flags, m->m_pkthdr.len); - sbappend_locked(&so->so_rcv, m); + sbappendstream_locked(&so->so_rcv, m); #ifdef notyet /* @@ -1906,7 +1920,7 @@ so, so->so_rcv.sb_cc, so->so_rcv.sb_mbmax)); #endif - INP_UNLOCK(tp->t_inpcb); + DPRINTF("sb_cc=%d sb_mbcnt=%d\n", so->so_rcv.sb_cc, so->so_rcv.sb_mbcnt); @@ -1940,13 +1954,17 @@ struct cpl_rx_data_ddp *hdr; unsigned int ddp_len, rcv_nxt, ddp_report, end_offset, buf_idx; struct socket *so = toeptoso(toep); + int nomoredata = 0; + + if (__predict_false(so_no_receive(so))) { + struct inpcb *inp = sotoinpcb(so); - if (__predict_false(so_no_receive(so))) { + INP_LOCK(inp); handle_excess_rx(toep, m); + INP_UNLOCK(inp); return; } - TRACE_ENTER; tp = sototcpcb(so); q = &toep->tp_ddp_state; hdr = cplhdr(m); @@ -1971,7 +1989,7 @@ /* * Overload to store old RCV_NXT */ - m->m_pkthdr.csum_data = tp->rcv_nxt; + m->m_seq = tp->rcv_nxt; tp->rcv_nxt = rcv_nxt; /* @@ -1979,7 +1997,14 @@ * m->m_len here, we need to be very careful that nothing from now on * interprets ->len of this packet the usual way. */ - m->m_len = tp->rcv_nxt - m->m_pkthdr.csum_data; + m->m_len = m->m_pkthdr.len = tp->rcv_nxt - m->m_seq; + /* + * Length is only meaningful for kbuf + */ + if (!(bsp->flags & DDP_BF_NOCOPY)) + KASSERT(m->m_len <= bsp->gl->dgl_length, + ("length received exceeds ddp pages: len=%d dgl_length=%d", + m->m_len, bsp->gl->dgl_length)); /* * Figure out where the new data was placed in the buffer and store it @@ -1989,8 +2014,9 @@ end_offset = G_DDP_OFFSET(ddp_report) + ddp_len; m->m_cur_offset = end_offset - m->m_pkthdr.len; m->m_ddp_gl = (unsigned char *)bsp->gl; + m->m_flags |= M_DDP; bsp->cur_offset = end_offset; - + toep->tp_enqueued_bytes += m->m_pkthdr.len; /* * Bit 0 of flags stores whether the DDP buffer is completed. * Note that other parts of the code depend on this being in bit 0. @@ -1998,26 +2024,30 @@ if ((bsp->flags & DDP_BF_NOINVAL) && end_offset != bsp->gl->dgl_length) { panic("spurious ddp completion"); } else { - m->m_pkthdr.csum_flags = !!(ddp_report & F_DDP_BUF_COMPLETE); - if (m->m_pkthdr.csum_flags && !(bsp->flags & DDP_BF_NOFLIP)) + m->m_ddp_flags = !!(ddp_report & F_DDP_BUF_COMPLETE); + if (m->m_ddp_flags && !(bsp->flags & DDP_BF_NOFLIP)) q->cur_buf ^= 1; /* flip buffers */ } if (bsp->flags & DDP_BF_NOCOPY) { - m->m_pkthdr.csum_flags |= (bsp->flags & DDP_BF_NOCOPY); + m->m_ddp_flags |= (bsp->flags & DDP_BF_NOCOPY); bsp->flags &= ~DDP_BF_NOCOPY; } if (ddp_report & F_DDP_PSH) - m->m_pkthdr.csum_flags |= DDP_BF_PSH; - + m->m_ddp_flags |= DDP_BF_PSH; + if (nomoredata) + m->m_ddp_flags |= DDP_BF_NODATA; + tp->t_rcvtime = ticks; + + SOCKBUF_LOCK(&so->so_rcv); sbappendstream_locked(&so->so_rcv, m); if ((so->so_state & SS_NOFDREF) == 0) sorwakeup_locked(so); - - TRACE_EXIT; + else + SOCKBUF_UNLOCK(&so->so_rcv); } #define DDP_ERR (F_DDP_PPOD_MISMATCH | F_DDP_LLIMIT_ERR | F_DDP_ULIMIT_ERR |\ @@ -2057,9 +2087,14 @@ struct ddp_buf_state *bsp; struct cpl_rx_ddp_complete *hdr; unsigned int ddp_report, buf_idx, when; + int nomoredata = 0; if (__predict_false(so_no_receive(so))) { + struct inpcb *inp = sotoinpcb(so); + + INP_LOCK(inp); handle_excess_rx(toep, m); + INP_UNLOCK(inp); return; } TRACE_ENTER; @@ -2070,7 +2105,7 @@ bsp = &q->buf_state[buf_idx]; when = bsp->cur_offset; - m->m_len = G_DDP_OFFSET(ddp_report) - when; + m->m_len = m->m_pkthdr.len = G_DDP_OFFSET(ddp_report) - when; #ifdef T3_TRACE T3_TRACE5(TIDTB(sk), @@ -2082,9 +2117,12 @@ bsp->cur_offset += m->m_len; - if (!(bsp->flags & DDP_BF_NOFLIP)) + if (!(bsp->flags & DDP_BF_NOFLIP)) { q->cur_buf ^= 1; /* flip buffers */ - + if (G_DDP_OFFSET(ddp_report) < q->kbuf[0]->dgl_length) + nomoredata=1; + } + #ifdef T3_TRACE T3_TRACE4(TIDTB(sk), "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u " @@ -2093,18 +2131,23 @@ G_DDP_OFFSET(ddp_report)); #endif m->m_ddp_gl = (unsigned char *)bsp->gl; - m->m_pkthdr.csum_flags = (bsp->flags & DDP_BF_NOCOPY) | 1; + m->m_flags |= M_DDP; + m->m_ddp_flags = (bsp->flags & DDP_BF_NOCOPY) | 1; if (bsp->flags & DDP_BF_NOCOPY) bsp->flags &= ~DDP_BF_NOCOPY; + if (nomoredata) + m->m_ddp_flags |= DDP_BF_NODATA; + m->m_pkthdr.csum_data = tp->rcv_nxt; tp->rcv_nxt += m->m_len; tp->t_rcvtime = ticks; + SOCKBUF_LOCK(&so->so_rcv); sbappendstream_locked(&so->so_rcv, m); if ((so->so_state & SS_NOFDREF) == 0) sorwakeup_locked(so); - + SOCKBUF_UNLOCK(&so->so_rcv); TRACE_EXIT; } @@ -2184,8 +2227,9 @@ q = &toep->tp_ddp_state; bsp = &q->buf_state[q->cur_buf]; - m->m_pkthdr.len = rcv_nxt - tp->rcv_nxt; + m->m_len = m->m_pkthdr.len = rcv_nxt - tp->rcv_nxt; m->m_ddp_gl = (unsigned char *)bsp->gl; + m->m_flags |= M_DDP; m->m_cur_offset = bsp->cur_offset; m->m_ddp_flags = DDP_BF_PSH | (bsp->flags & DDP_BF_NOCOPY) | 1; @@ -2195,7 +2239,7 @@ if (!(bsp->flags & DDP_BF_NOFLIP)) q->cur_buf ^= 1; tp->t_rcvtime = ticks; - sbappend(&so->so_rcv, m); + sbappendstream(&so->so_rcv, m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) sorwakeup(so); return (1); @@ -2918,7 +2962,8 @@ th.th_seq = req->rcv_isn; th.th_flags = TH_SYN; - toep->tp_iss = toep->tp_delack_seq = toep->tp_rcv_wup = toep->tp_copied_seq = rcv_isn; + toep->tp_iss = toep->tp_delack_seq = toep->tp_rcv_wup = toep->tp_copied_seq = rcv_isn + 1; + inc.inc_isipv6 = 0; inc.inc_len = 0; @@ -3047,14 +3092,15 @@ newtoep->tp_flags = TP_SYN_RCVD; newtoep->tp_tid = tid; newtoep->tp_toedev = tdev; + tp->rcv_wnd = select_rcv_wnd(tdev, so); - printf("inserting tid=%d\n", tid); + printf("inserting tid=%d rcv_wnd=%ld\n", tid, tp->rcv_wnd); cxgb_insert_tid(cdev, d->client, newtoep, tid); SOCK_LOCK(so); LIST_INSERT_HEAD(&lctx->synq_head, newtoep, synq_entry); SOCK_UNLOCK(so); - +#ifdef notyet if (lctx->ulp_mode) { ddp_mbuf = m_gethdr(M_NOWAIT, MT_DATA); @@ -3063,7 +3109,22 @@ else newtoep->tp_ulp_mode = lctx->ulp_mode; } +#else + newtoep->tp_ulp_mode = TOM_TUNABLE(tdev, ddp) && /* !sock_flag(sk, NO_DDP) && */ + tp->rcv_wnd >= MIN_DDP_RCV_WIN ? ULP_MODE_TCPDDP : 0; + + if (newtoep->tp_ulp_mode) { + ddp_mbuf = m_gethdr(M_NOWAIT, MT_DATA); + + if (ddp_mbuf == NULL) + newtoep->tp_ulp_mode = 0; + } + + printf("ddp=%d rcv_wnd=%ld min_win=%d ulp_mode=%d\n", + TOM_TUNABLE(tdev, ddp), tp->rcv_wnd, MIN_DDP_RCV_WIN, newtoep->tp_ulp_mode); +#endif + set_arp_failure_handler(reply_mbuf, pass_accept_rpl_arp_failure); DPRINTF("adding request to syn cache\n"); @@ -3346,7 +3407,8 @@ toep->tp_flags = 0; tp->t_toe = toep; reset_wr_list(toep); - tp->rcv_wnd = select_rcv_wnd(so); + tp->rcv_wnd = select_rcv_wnd(tdev, so); + tp->rcv_nxt = toep->tp_copied_seq; install_offload_ops(so); toep->tp_wr_max = toep->tp_wr_avail = TOM_TUNABLE(tdev, max_wrs); @@ -3728,7 +3790,6 @@ const struct tom_data *td = TOM_DATA(TOE_DEV(so)); unsigned int ppod_addr = tag * PPOD_SIZE + td->ddp_llimit; - TRACE_ENTER; for (i = 0; i < nppods; ++i) { m = m_gethdr_nofail(sizeof(*req) + PPOD_SIZE); m_set_priority(m, mkprio(CPL_PRIORITY_CONTROL, toep)); @@ -3756,8 +3817,6 @@ send_or_defer(toep, m, 0); ppod_addr += PPOD_SIZE; } - - TRACE_EXIT; return (0); } @@ -3905,7 +3964,6 @@ struct cpl_set_tcb_field *req; struct ddp_state *p = &toep->tp_ddp_state; - TRACE_ENTER; wrlen = sizeof(*wr) + 3 * sizeof(*req) + sizeof(*getreq); m = m_gethdr_nofail(wrlen); m_set_priority(m, mkprio(CPL_PRIORITY_CONTROL, toep)); @@ -3960,7 +4018,6 @@ bufidx, tag0, tag1, len); #endif cxgb_ofld_send(TOEP_T3C_DEV(toep), m); - TRACE_EXIT; } /* @@ -3978,7 +4035,6 @@ struct work_request_hdr *wr; struct cpl_set_tcb_field *req; - TRACE_ENTER; wrlen = sizeof(*wr) + sizeof(*req) + (len0 ? sizeof(*req) : 0) + (len1 ? sizeof(*req) : 0) + (modulate ? sizeof(struct cpl_rx_data_ack) : 0); @@ -4024,7 +4080,6 @@ #endif cxgb_ofld_send(TOEP_T3C_DEV(toep), m); - TRACE_EXIT; } void ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#7 (text+ko) ==== @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -48,6 +49,7 @@ #include #include +#include #include #include @@ -257,6 +259,11 @@ static int so_should_ddp(const struct toepcb *toep, int last_recv_len) { + + DPRINTF("ulp_mode=%d last_recv_len=%d ddp_thresh=%d rcv_wnd=%ld ddp_copy_limit=%d\n", + toep->tp_ulp_mode, last_recv_len, TOM_TUNABLE(toep->tp_toedev, ddp_thres), + toep->tp_tp->rcv_wnd, (TOM_TUNABLE(toep->tp_toedev, ddp_copy_limit) + DDP_RSVD_WIN)); + return toep->tp_ulp_mode == ULP_MODE_TCPDDP && (toep->tp_ddp_state.kbuf[0] == NULL) && last_recv_len > TOM_TUNABLE(toep->tp_toedev, ddp_thres) && toep->tp_tp->rcv_wnd > @@ -278,28 +285,37 @@ static int m_uiomove(const struct mbuf *m, int offset, int len, struct uio *uio) { - int curlen, err = 0; + int curlen, startlen, resid_init, err = 0; caddr_t buf; - + + DPRINTF("m_uiomove(m=%p, offset=%d, len=%d, ...)\n", + m, offset, len); + + startlen = len; + resid_init = uio->uio_resid; while (m && len) { buf = mtod(m, caddr_t); curlen = m->m_len; - if (offset < curlen) { + if (offset && (offset < curlen)) { curlen -= offset; buf += offset; offset = 0; - } else { + } else if (offset) { offset -= curlen; m = m->m_next; continue; } + err = uiomove(buf, min(len, curlen), uio); + if (err) { + printf("uiomove returned %d\n", err); + return (err); + } - err = uiomove_frombuf(buf, min(len, curlen), uio); - if (err) - return (err); - len -= min(len, m->m_len); + len -= min(len, curlen); m = m->m_next; } + DPRINTF("copied %d bytes - resid_init=%d uio_resid=%d\n", + startlen - len, resid_init, uio->uio_resid); return (err); } @@ -312,16 +328,20 @@ copy_data(const struct mbuf *m, int offset, int len, struct uio *uio) { struct iovec *to = uio->uio_iov; + int err; + - if (__predict_true(!is_ddp(m))) /* RX_DATA */ + if (__predict_true(!is_ddp(m))) { /* RX_DATA */ return m_uiomove(m, offset, len, uio); - if (__predict_true(m->m_ddp_flags & DDP_BF_NOCOPY)) { /* user DDP */ + } if (__predict_true(m->m_ddp_flags & DDP_BF_NOCOPY)) { /* user DDP */ to->iov_len -= len; to->iov_base = ((caddr_t)to->iov_base) + len; uio->uio_iov = to; + uio->uio_resid -= len; return (0); } - return t3_ddp_copy(m, offset, uio, len); /* kernel DDP */ + err = t3_ddp_copy(m, offset, uio, len); /* kernel DDP */ + return (err); } static void @@ -509,7 +529,45 @@ return pru_sosend(so, addr, uio, top, control, flags, td); } +/* + * Following replacement or removal of the first mbuf on the first mbuf chain + * of a socket buffer, push necessary state changes back into the socket + * buffer so that other consumers see the values consistently. 'nextrecord' + * is the callers locally stored value of the original value of + * sb->sb_mb->m_nextpkt which must be restored when the lead mbuf changes. + * NOTE: 'nextrecord' may be NULL. + */ +#if 1 +static __inline void +sockbuf_pushsync(struct sockbuf *sb, struct mbuf *nextrecord) +{ + + SOCKBUF_LOCK_ASSERT(sb); + /* + * First, update for the new value of nextrecord. If necessary, make + * it the first record. + */ + if (sb->sb_mb != NULL) + sb->sb_mb->m_nextpkt = nextrecord; + else + sb->sb_mb = nextrecord; + /* + * Now update any dependent socket buffer fields to reflect the new + * state. This is an expanded inline of SB_EMPTY_FIXUP(), with the + * addition of a second clause that takes care of the case where + * sb_mb has been updated, but remains the last record. + */ + if (sb->sb_mb == NULL) { + sb->sb_mbtail = NULL; + sb->sb_lastrecord = NULL; + } else if (sb->sb_mb->m_nextpkt == NULL) + sb->sb_lastrecord = sb->sb_mb; +} +#endif + +#define IS_NONBLOCKING(so) ((so)->so_state & SS_NBIO) + static int t3_soreceive(struct socket *so, int *flagsp, struct uio *uio) { @@ -517,23 +575,25 @@ struct toepcb *toep = tp->t_toe; struct mbuf *m; uint32_t offset; - int err, flags, avail, len, buffers_freed = 0, copied = 0; + int err, flags, avail, len, copied, copied_unacked; int target; /* Read at least this many bytes */ int user_ddp_ok, user_ddp_pending = 0; struct ddp_state *p; struct inpcb *inp = sotoinpcb(so); - + + avail = offset = copied = copied_unacked = 0; flags = flagsp ? (*flagsp &~ MSG_EOR) : 0; err = sblock(&so->so_rcv, SBLOCKWAIT(flags)); + if (err) return (err); - TRACE_ENTER; + SOCKBUF_LOCK(&so->so_rcv); restart: len = uio->uio_resid; m = so->so_rcv.sb_mb; - target = (flags & MSG_WAITALL) ? min(len, so->so_rcv.sb_hiwat) : so->so_rcv.sb_lowat; + target = (flags & MSG_WAITALL) ? len : so->so_rcv.sb_lowat; p = &toep->tp_ddp_state; user_ddp_ok = p->ubuf_ddp_ready; p->cancel_ubuf = 0; @@ -561,6 +621,8 @@ so->so_error = 0; goto done; } + if (so->so_rcv.sb_state & SBS_CANTRCVMORE) + goto done; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Feb 7 01:59:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 497C016A421; Thu, 7 Feb 2008 01:59:51 +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 EADAC16A417 for ; Thu, 7 Feb 2008 01:59:50 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D149413C469 for ; Thu, 7 Feb 2008 01:59:50 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m171xosn068179 for ; Thu, 7 Feb 2008 01:59:50 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m171xo3o068167 for perforce@freebsd.org; Thu, 7 Feb 2008 01:59:50 GMT (envelope-from jb@freebsd.org) Date: Thu, 7 Feb 2008 01:59:50 GMT Message-Id: <200802070159.m171xo3o068167@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134947 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 01:59:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=134947 Change 134947 by jb@jb_freebsd1 on 2008/02/07 01:58:49 Add -DNO_CTF to a couple of kernel build tools makes. Affected files ... .. //depot/projects/dtrace/src/Makefile.inc1#39 edit Differences ... ==== //depot/projects/dtrace/src/Makefile.inc1#39 (text+ko) ==== @@ -756,13 +756,14 @@ @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} -DNO_CPU_CFLAGS -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile + ${MAKE} -DNO_CPU_CFLAGS -DNO_CTF \ + -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} -DNO_CPU_CFLAGS ${target} + ${MAKE} -DNO_CPU_CFLAGS -DNO_CTF ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) From owner-p4-projects@FreeBSD.ORG Thu Feb 7 02:01:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A740C16A419; Thu, 7 Feb 2008 02:01:53 +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 52AE816A41B for ; Thu, 7 Feb 2008 02:01:53 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2D92E13C43E for ; Thu, 7 Feb 2008 02:01:53 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1721rtI068335 for ; Thu, 7 Feb 2008 02:01:53 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1721rpP068332 for perforce@freebsd.org; Thu, 7 Feb 2008 02:01:53 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 02:01:53 GMT Message-Id: <200802070201.m1721rpP068332@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134948 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 02:01:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=134948 Change 134948 by kmacy@kmacy:entropy:iwarp on 2008/02/07 02:01:40 - start link at attach time - remove all other instances of callout_reset - fix unload for case where interface is never brought up so offload is uninitialized Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_adapter.h#11 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#13 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#15 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_adapter.h#11 (text+ko) ==== @@ -144,6 +144,8 @@ QUEUES_BOUND = (1 << 3), FW_UPTODATE = (1 << 4), TPS_UPTODATE = (1 << 5), + CXGB_SHUTDOWN = (1 << 6), + CXGB_OFLD_INIT = (1 << 7), }; #define FL_Q_SIZE 4096 ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#13 (text+ko) ==== @@ -119,6 +119,7 @@ static int offload_open(struct port_info *pi); static void touch_bars(device_t dev); static int offload_close(struct t3cdev *tdev); +static void cxgb_link_start(struct port_info *p); static device_method_t cxgb_controller_methods[] = { DEVMETHOD(device_probe, cxgb_controller_probe), @@ -617,7 +618,7 @@ G_FW_VERSION_MICRO(vers)); device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); - + callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); t3_add_attach_sysctls(sc); out: if (error) @@ -643,9 +644,9 @@ { int i; - cxgb_pcpu_shutdown_threads(sc); ADAPTER_LOCK(sc); + sc->flags |= CXGB_SHUTDOWN; /* * drops the lock */ @@ -691,7 +692,8 @@ } else printf("not offloading set\n"); - cxgb_offload_deactivate(sc); + if (sc->flags & CXGB_OFLD_INIT) + cxgb_offload_deactivate(sc); free(sc->filters, M_DEVBUF); t3_sge_free(sc); @@ -887,9 +889,11 @@ struct port_info *p; struct ifnet *ifp; int err, media_flags; + struct adapter *sc; + p = device_get_softc(dev); - + sc = p->adapter; snprintf(p->lockbuf, PORT_NAME_LEN, "cxgb port lock %d:%d", device_get_unit(device_get_parent(dev)), p->port_id); PORT_LOCK_INIT(p, p->lockbuf); @@ -991,7 +995,8 @@ taskqueue_thread_enqueue, &p->tq); #endif t3_sge_init_port(p); - + cxgb_link_start(p); + t3_link_changed(sc, p->port_id); return (0); } @@ -1635,11 +1640,8 @@ { struct adapter *adapter = tdev2adap(tdev); - if (!isset(&adapter->open_device_map, OFFLOAD_DEVMAP_BIT)) { - printf("offload_close: DEVMAP_BIT not set\n"); - + if (!isset(&adapter->open_device_map, OFFLOAD_DEVMAP_BIT)) return (0); - } /* Call back all registered clients */ cxgb_remove_clients(tdev); @@ -1697,14 +1699,11 @@ else printf("offload opened\n"); } - cxgb_link_start(p); - t3_link_changed(sc, p->port_id); ifp->if_baudrate = p->link_config.speed * 1000000; device_printf(sc->dev, "enabling interrupts on port=%d\n", p->port_id); t3_port_intr_enable(sc, p->port_id); - callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); t3_sge_reset_adapter(sc); ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -1759,7 +1758,6 @@ PORT_LOCK(p); ifp->if_mtu = mtu; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - callout_stop(&p->adapter->cxgb_tick_ch); cxgb_stop_locked(p); cxgb_init_locked(p); } @@ -1797,7 +1795,6 @@ error = ether_ioctl(ifp, command, data); break; case SIOCSIFFLAGS: - callout_drain(&p->adapter->cxgb_tick_ch); PORT_LOCK(p); if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { @@ -1811,21 +1808,10 @@ } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) cxgb_stop_locked(p); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - adapter_t *sc = p->adapter; - callout_reset(&sc->cxgb_tick_ch, hz, - cxgb_tick, sc); - } PORT_UNLOCK(p); break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: - /* - * This is a convenient place to check the link status when - * no interfaces are up and thus the callout is not running - */ - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - cxgb_tick_handler(p->adapter, 0); error = ifmedia_ioctl(ifp, ifr, &p->media, command); break; case SIOCSIFCAP: @@ -1994,27 +1980,12 @@ cxgb_tick(void *arg) { adapter_t *sc = (adapter_t *)arg; - int i, running = 0; - - for_each_port(sc, i) { - - struct port_info *p = &sc->port[i]; - struct ifnet *ifp = p->ifp; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && - (ifp->if_flags & IFF_UP)) - running = 1; - } - - if (running == 0) + if(sc->flags & CXGB_SHUTDOWN); return; - - - if (sc->open_device_map != 0) { - taskqueue_enqueue(sc->tq, &sc->tick_task); - callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); - } + taskqueue_enqueue(sc->tq, &sc->tick_task); + callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); } static void @@ -2028,12 +1999,12 @@ check_link_status(sc); /* - * adapter lock can currently only be acquire after the + * adapter lock can currently only be acquired after the * port lock */ ADAPTER_UNLOCK(sc); - if (p->rev == T3_REV_B2 && p->nports < 4) + if (p->rev == T3_REV_B2 && p->nports < 4 && sc->open_device_map) check_t3b2_mac(sc); } ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#15 (text+ko) ==== @@ -1305,6 +1305,7 @@ printf("adding adapter %p\n", adapter); add_adapter(adapter); device_printf(adapter->dev, "offload started\n"); + adapter->flags |= CXGB_OFLD_INIT; #if 0 printf("failing as test\n"); return (ENOMEM); From owner-p4-projects@FreeBSD.ORG Thu Feb 7 02:20:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4153716A421; Thu, 7 Feb 2008 02:20:21 +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 04C6E16A419 for ; Thu, 7 Feb 2008 02:20:21 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D647313C459 for ; Thu, 7 Feb 2008 02:20:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m172KKfB071350 for ; Thu, 7 Feb 2008 02:20:20 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m172KCCA071202 for perforce@freebsd.org; Thu, 7 Feb 2008 02:20:12 GMT (envelope-from jb@freebsd.org) Date: Thu, 7 Feb 2008 02:20:12 GMT Message-Id: <200802070220.m172KCCA071202@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 134949 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 02:20:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=134949 Change 134949 by jb@jb_freebsd1 on 2008/02/07 02:19:44 IFC Affected files ... .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#62 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml#38 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/share/sgml/authors.ent#30 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/antoine.key#1 branch .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#31 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#30 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/thierry.key#3 integrate .. //depot/projects/dtrace/src/Makefile.inc1#40 integrate .. //depot/projects/dtrace/src/ObsoleteFiles.inc#37 integrate .. //depot/projects/dtrace/src/contrib/openpam/FREEBSD-vendor#1 branch .. //depot/projects/dtrace/src/crypto/openssh/FREEBSD-Xlist#4 integrate .. //depot/projects/dtrace/src/crypto/openssh/FREEBSD-upgrade#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/FREEBSD-vendor#1 branch .. //depot/projects/dtrace/src/include/pthread_np.h#9 integrate .. //depot/projects/dtrace/src/lib/libc/include/namespace.h#4 integrate .. //depot/projects/dtrace/src/lib/libc/include/un-namespace.h#4 integrate .. //depot/projects/dtrace/src/lib/libc/stdlib/malloc.3#10 integrate .. //depot/projects/dtrace/src/lib/libc/stdlib/malloc.c#17 integrate .. //depot/projects/dtrace/src/lib/libfetch/http.c#7 integrate .. //depot/projects/dtrace/src/lib/libkse/Makefile#6 integrate .. //depot/projects/dtrace/src/lib/libkse/kse.map#3 integrate .. //depot/projects/dtrace/src/lib/libkse/thread/thr_mutex.c#8 integrate .. //depot/projects/dtrace/src/lib/librpcsvc/Makefile#5 integrate .. //depot/projects/dtrace/src/lib/libthr/Makefile#15 integrate .. //depot/projects/dtrace/src/lib/libthr/pthread.map#11 integrate .. //depot/projects/dtrace/src/lib/libthr/thread/thr_mutex.c#18 integrate .. //depot/projects/dtrace/src/lib/msun/src/e_expf.c#5 integrate .. //depot/projects/dtrace/src/release/fixit.profile#6 integrate .. //depot/projects/dtrace/src/sbin/geom/core/geom.8#5 integrate .. //depot/projects/dtrace/src/sbin/gpt/gpt.8#5 integrate .. //depot/projects/dtrace/src/sbin/gpt/migrate.c#4 integrate .. //depot/projects/dtrace/src/sbin/gpt/show.c#5 integrate .. //depot/projects/dtrace/src/sbin/iscontrol/misc.c#2 integrate .. //depot/projects/dtrace/src/share/man/man4/hptrr.4#2 integrate .. //depot/projects/dtrace/src/share/man/man9/lock.9#9 integrate .. //depot/projects/dtrace/src/share/misc/committers-src.dot#7 integrate .. //depot/projects/dtrace/src/share/mk/bsd.dep.mk#5 integrate .. //depot/projects/dtrace/src/sys/arm/arm/genassym.c#7 integrate .. //depot/projects/dtrace/src/sys/arm/arm/locore.S#6 integrate .. //depot/projects/dtrace/src/sys/arm/arm/swtch.S#7 integrate .. //depot/projects/dtrace/src/sys/arm/include/asmacros.h#7 integrate .. //depot/projects/dtrace/src/sys/arm/include/atomic.h#10 integrate .. //depot/projects/dtrace/src/sys/arm/include/sysarch.h#4 integrate .. //depot/projects/dtrace/src/sys/boot/ofw/libofw/ofw_console.c#5 integrate .. //depot/projects/dtrace/src/sys/conf/Makefile.arm#8 integrate .. //depot/projects/dtrace/src/sys/conf/kern.post.mk#12 integrate .. //depot/projects/dtrace/src/sys/dev/amr/amrreg.h#5 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/array.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/him.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/himfuncs.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/hptintf.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/hptrr_config.c#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/hptrr_config.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/hptrr_os_bsd.c#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/hptrr_osm_bsd.c#3 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/i386-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/ldm.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/list.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/os_bsd.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/hptrr/osm.h#2 integrate .. //depot/projects/dtrace/src/sys/kern/kern_lock.c#17 integrate .. //depot/projects/dtrace/src/sys/kern/kern_rwlock.c#13 integrate .. //depot/projects/dtrace/src/sys/kern/kern_timeout.c#8 integrate .. //depot/projects/dtrace/src/sys/kern/subr_lock.c#11 integrate .. //depot/projects/dtrace/src/sys/kern/subr_turnstile.c#11 integrate .. //depot/projects/dtrace/src/sys/netgraph/ng_base.c#13 integrate .. //depot/projects/dtrace/src/sys/netgraph/ng_ppp.c#8 integrate .. //depot/projects/dtrace/src/sys/netgraph/ng_pppoe.c#12 integrate .. //depot/projects/dtrace/src/sys/netinet/ip_id.c#6 integrate .. //depot/projects/dtrace/src/sys/sys/lockmgr.h#13 integrate .. //depot/projects/dtrace/src/sys/sys/param.h#37 integrate .. //depot/projects/dtrace/src/sys/sys/proc.h#33 integrate .. //depot/projects/dtrace/src/sys/sys/rwlock.h#7 integrate .. //depot/projects/dtrace/src/sys/tools/embed_mfs.sh#1 branch .. //depot/projects/dtrace/src/tools/regression/netinet/ip_id_period/ip_id_period.py#1 branch .. //depot/projects/dtrace/src/tools/regression/pthread/mutex_islocked_np/Makefile#2 delete .. //depot/projects/dtrace/src/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c#2 delete .. //depot/projects/dtrace/src/tools/regression/pthread/mutex_isowned_np/Makefile#1 branch .. //depot/projects/dtrace/src/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c#1 branch .. //depot/projects/dtrace/src/tools/tools/crypto/cryptostats.c#4 integrate .. //depot/projects/dtrace/src/tools/tools/crypto/cryptotest.c#5 integrate .. //depot/projects/dtrace/src/usr.bin/calendar/calendars/calendar.freebsd#17 integrate .. //depot/projects/dtrace/src/usr.bin/kdump/Makefile#6 integrate .. //depot/projects/dtrace/src/usr.bin/logger/logger.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/truss/Makefile#6 integrate .. //depot/projects/dtrace/www/en/developers.sgml#28 integrate .. //depot/projects/dtrace/www/share/sgml/news.xml#38 integrate Differences ... ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#62 (text+ko) ==== @@ -1,4 +1,4 @@ - + + aaron@FreeBSD.org"> @@ -68,6 +68,8 @@ anray@FreeBSD.org"> +antoine@FreeBSD.org"> + araujo@FreeBSD.org"> archie@FreeBSD.org"> ==== //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#31 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -114,6 +114,11 @@ &pgpkey.obraun; + + &a.antoine; + &pgpkey.antoine; + + &a.db; &pgpkey.db; ==== //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#30 (text+ko) ==== @@ -1,5 +1,5 @@ - + @@ -14,6 +14,7 @@ + ==== //depot/projects/dtrace/doc/share/pgpkeys/thierry.key#3 (text+ko) ==== @@ -1,18 +1,15 @@ - + - Key fingerprint = 3BB8 F358 C2F1 776C 65C9 AE51 73DE 698C C714 05A2 -uid Thierry Thomas -uid Thierry Thomas -uid Thierry Thomas (See .) -uid Thierry Thomas (FreeBSD committer) -sub 2048g/277D65DB 1997-10-11 -sub 1024G/8866DD0F 2002-01-26 -sub 1024g/36DA7AF9 2003-11-26 [expires: 2003-11-27] -sub 1024R/C5529925 2003-11-26 +pub 1024D/C71405A2 1997-10-11 + Key fingerprint = 3BB8 F358 C2F1 776C 65C9 AE51 73DE 698C C714 05A2 +uid Thierry Thomas +uid Thierry Thomas +uid Thierry Thomas (FreeBSD committer) +sub 1024R/C5529925 2003-11-26 +sub 2048g/05CF3992 2008-02-05 ]]> >> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Feb 7 04:31:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 08E8116A468; Thu, 7 Feb 2008 04:31:50 +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 BECF216A419 for ; Thu, 7 Feb 2008 04:31:49 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9D56013C43E for ; Thu, 7 Feb 2008 04:31:49 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m174Vn3d002448 for ; Thu, 7 Feb 2008 04:31:49 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m174Vdsp002441 for perforce@freebsd.org; Thu, 7 Feb 2008 04:31:39 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 04:31:39 GMT Message-Id: <200802070431.m174Vdsp002441@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134951 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 04:31:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=134951 Change 134951 by kmacy@kmacy:storage:toehead on 2008/02/07 04:31:32 IFC 134950 Affected files ... .. //depot/projects/toehead/Makefile#4 integrate .. //depot/projects/toehead/Makefile.inc1#5 integrate .. //depot/projects/toehead/ObsoleteFiles.inc#4 integrate .. //depot/projects/toehead/contrib/binutils/libiberty/cp-demangle.c#2 integrate .. //depot/projects/toehead/contrib/file/FREEBSD-upgrade#2 integrate .. //depot/projects/toehead/contrib/file/Magdir/bFLT#2 delete .. //depot/projects/toehead/contrib/file/Magdir/chi#2 delete .. //depot/projects/toehead/contrib/file/Magdir/cvs#2 delete .. //depot/projects/toehead/contrib/file/Magdir/hdf#2 delete .. //depot/projects/toehead/contrib/file/Magdir/impulse#2 delete .. //depot/projects/toehead/contrib/file/Magdir/wordperfect#2 delete .. //depot/projects/toehead/contrib/file/acconfig.h#2 delete .. //depot/projects/toehead/contrib/file/magic.c#3 integrate .. //depot/projects/toehead/contrib/file/missing#2 delete .. //depot/projects/toehead/contrib/file/stamp-h.in#2 delete .. //depot/projects/toehead/contrib/libiberty/cp-demangle.c#2 delete .. //depot/projects/toehead/contrib/openpam/FREEBSD-vendor#1 branch .. //depot/projects/toehead/contrib/openpam/include/security/openpam_version.h#3 integrate .. //depot/projects/toehead/crypto/openssh/FREEBSD-Xlist#2 integrate .. //depot/projects/toehead/crypto/openssh/FREEBSD-upgrade#2 integrate .. //depot/projects/toehead/crypto/openssh/FREEBSD-vendor#1 branch .. //depot/projects/toehead/etc/periodic/security/100.chksetuid#2 integrate .. //depot/projects/toehead/etc/rc.d/dhclient#2 integrate .. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/kgdb.h#5 integrate .. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/kld.c#3 integrate .. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/main.c#4 integrate .. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/trgt.c#5 integrate .. //depot/projects/toehead/include/pthread_np.h#3 integrate .. //depot/projects/toehead/lib/libarchive/archive_read_support_format_tar.c#3 integrate .. //depot/projects/toehead/lib/libarchive/archive_write_set_format_ar.c#3 integrate .. //depot/projects/toehead/lib/libarchive/test/Makefile#4 integrate .. //depot/projects/toehead/lib/libarchive/test/test_compat_tar_hardlink.c#1 branch .. //depot/projects/toehead/lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu#1 branch .. //depot/projects/toehead/lib/libc/include/namespace.h#2 integrate .. //depot/projects/toehead/lib/libc/include/un-namespace.h#2 integrate .. //depot/projects/toehead/lib/libc/net/getaddrinfo.c#2 integrate .. //depot/projects/toehead/lib/libc/stdlib/malloc.3#3 integrate .. //depot/projects/toehead/lib/libc/stdlib/malloc.c#4 integrate .. //depot/projects/toehead/lib/libc/sys/extattr_get_file.2#2 integrate .. //depot/projects/toehead/lib/libc/sys/sendfile.2#2 integrate .. //depot/projects/toehead/lib/libdevstat/devstat.h#2 integrate .. //depot/projects/toehead/lib/libelf/gelf_fsize.3#2 integrate .. //depot/projects/toehead/lib/libfetch/http.c#4 integrate .. //depot/projects/toehead/lib/libkse/Makefile#2 integrate .. //depot/projects/toehead/lib/libkse/kse.map#2 integrate .. //depot/projects/toehead/lib/libkse/sys/lock.c#2 integrate .. //depot/projects/toehead/lib/libkse/thread/thr_mutex.c#3 integrate .. //depot/projects/toehead/lib/libpmc/pmc.3#2 integrate .. //depot/projects/toehead/lib/librpcsvc/Makefile#2 integrate .. //depot/projects/toehead/lib/librpcsvc/xcrypt.c#2 integrate .. //depot/projects/toehead/lib/libthr/Makefile#3 integrate .. //depot/projects/toehead/lib/libthr/pthread.map#4 integrate .. //depot/projects/toehead/lib/libthr/thread/thr_mutex.c#4 integrate .. //depot/projects/toehead/lib/msun/ld128/s_exp2l.c#2 integrate .. //depot/projects/toehead/lib/msun/ld80/s_exp2l.c#2 integrate .. //depot/projects/toehead/lib/msun/src/e_exp.c#2 integrate .. //depot/projects/toehead/lib/msun/src/e_expf.c#3 integrate .. //depot/projects/toehead/lib/msun/src/s_exp2.c#3 integrate .. //depot/projects/toehead/lib/msun/src/s_exp2f.c#4 integrate .. //depot/projects/toehead/release/doc/en_US.ISO8859-1/hardware/article.sgml#3 integrate .. //depot/projects/toehead/release/doc/share/misc/dev.archlist.txt#4 integrate .. //depot/projects/toehead/release/fixit.profile#3 integrate .. //depot/projects/toehead/sbin/fsck_msdosfs/boot.c#3 integrate .. //depot/projects/toehead/sbin/fsck_msdosfs/fat.c#2 integrate .. //depot/projects/toehead/sbin/geom/core/geom.8#2 integrate .. //depot/projects/toehead/sbin/geom/core/geom.c#2 integrate .. //depot/projects/toehead/sbin/gpt/gpt.8#2 integrate .. //depot/projects/toehead/sbin/gpt/gpt.c#2 integrate .. //depot/projects/toehead/sbin/gpt/migrate.c#2 integrate .. //depot/projects/toehead/sbin/gpt/show.c#2 integrate .. //depot/projects/toehead/sbin/ifconfig/ifieee80211.c#2 integrate .. //depot/projects/toehead/sbin/iscontrol/misc.c#2 integrate .. //depot/projects/toehead/sbin/mount/mount.c#2 integrate .. //depot/projects/toehead/sbin/natd/natd.8#5 integrate .. //depot/projects/toehead/share/colldef/el_GR.ISO8859-7.src#2 integrate .. //depot/projects/toehead/share/man/man4/Makefile#5 integrate .. //depot/projects/toehead/share/man/man4/atkbd.4#2 integrate .. //depot/projects/toehead/share/man/man4/hptiop.4#2 integrate .. //depot/projects/toehead/share/man/man4/hptrr.4#2 integrate .. //depot/projects/toehead/share/man/man4/rr232x.4#2 delete .. //depot/projects/toehead/share/man/man9/lock.9#4 integrate .. //depot/projects/toehead/share/man/man9/mbuf.9#2 integrate .. //depot/projects/toehead/share/misc/committers-src.dot#3 integrate .. //depot/projects/toehead/share/mk/bsd.dep.mk#2 integrate .. //depot/projects/toehead/share/msgdef/Makefile#2 integrate .. //depot/projects/toehead/share/msgdef/ko_KR.UTF-8.src#1 branch .. //depot/projects/toehead/share/msgdef/ko_KR.eucKR.src#2 integrate .. //depot/projects/toehead/sys/amd64/acpica/madt.c#2 integrate .. //depot/projects/toehead/sys/amd64/amd64/identcpu.c#2 integrate .. //depot/projects/toehead/sys/amd64/conf/GENERIC#5 edit .. //depot/projects/toehead/sys/amd64/conf/NOTES#4 integrate .. //depot/projects/toehead/sys/amd64/include/proc.h#2 integrate .. //depot/projects/toehead/sys/amd64/include/specialreg.h#2 integrate .. //depot/projects/toehead/sys/arm/arm/genassym.c#2 integrate .. //depot/projects/toehead/sys/arm/arm/locore.S#2 integrate .. //depot/projects/toehead/sys/arm/arm/pmap.c#5 integrate .. //depot/projects/toehead/sys/arm/arm/swtch.S#2 integrate .. //depot/projects/toehead/sys/arm/include/asmacros.h#2 integrate .. //depot/projects/toehead/sys/arm/include/atomic.h#2 integrate .. //depot/projects/toehead/sys/arm/include/pmap.h#2 integrate .. //depot/projects/toehead/sys/arm/include/sysarch.h#2 integrate .. //depot/projects/toehead/sys/boot/ofw/libofw/ofw_console.c#2 integrate .. //depot/projects/toehead/sys/compat/ndis/kern_ndis.c#2 integrate .. //depot/projects/toehead/sys/conf/Makefile.arm#2 integrate .. //depot/projects/toehead/sys/conf/files.amd64#3 integrate .. //depot/projects/toehead/sys/conf/files.i386#4 integrate .. //depot/projects/toehead/sys/conf/files.powerpc#4 integrate .. //depot/projects/toehead/sys/conf/kern.post.mk#2 integrate .. //depot/projects/toehead/sys/conf/kern.pre.mk#2 integrate .. //depot/projects/toehead/sys/ddb/db_textdump.c#2 integrate .. //depot/projects/toehead/sys/dev/amr/amrreg.h#3 integrate .. //depot/projects/toehead/sys/dev/cxgb/cxgb_adapter.h#4 edit .. //depot/projects/toehead/sys/dev/cxgb/cxgb_offload.c#6 edit .. //depot/projects/toehead/sys/dev/cxgb/cxgb_sge.c#8 edit .. //depot/projects/toehead/sys/dev/cxgb/sys/mvec.h#8 edit .. //depot/projects/toehead/sys/dev/cxgb/sys/uipc_mvec.c#4 edit .. //depot/projects/toehead/sys/dev/hatm/if_hatm_intr.c#2 integrate .. //depot/projects/toehead/sys/dev/hptiop/hptiop.c#2 integrate .. //depot/projects/toehead/sys/dev/hptiop/hptiop.h#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/array.h#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/him.h#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/himfuncs.h#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/hptintf.h#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/hptrr_config.c#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/hptrr_config.h#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/hptrr_os_bsd.c#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/hptrr_osm_bsd.c#3 integrate .. //depot/projects/toehead/sys/dev/hptrr/i386-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/ldm.h#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/list.h#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/os_bsd.h#2 integrate .. //depot/projects/toehead/sys/dev/hptrr/osm.h#2 integrate .. //depot/projects/toehead/sys/dev/iscsi/initiator/isc_soc.c#2 integrate .. //depot/projects/toehead/sys/dev/lge/if_lge.c#2 integrate .. //depot/projects/toehead/sys/dev/mfi/mfi.c#3 integrate .. //depot/projects/toehead/sys/dev/mfi/mfireg.h#2 integrate .. //depot/projects/toehead/sys/dev/msk/if_msk.c#3 integrate .. //depot/projects/toehead/sys/dev/nfe/if_nfe.c#3 integrate .. //depot/projects/toehead/sys/dev/patm/if_patm_rx.c#2 integrate .. //depot/projects/toehead/sys/dev/pci/pci.c#2 integrate .. //depot/projects/toehead/sys/dev/ral/rt2560.c#2 integrate .. //depot/projects/toehead/sys/dev/ral/rt2560reg.h#2 integrate .. //depot/projects/toehead/sys/dev/ral/rt2560var.h#2 integrate .. //depot/projects/toehead/sys/dev/rr232x/LICENSE#2 delete .. //depot/projects/toehead/sys/dev/rr232x/README#2 delete .. //depot/projects/toehead/sys/dev/rr232x/amd64-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/toehead/sys/dev/rr232x/array.h#2 delete .. //depot/projects/toehead/sys/dev/rr232x/him.h#2 delete .. //depot/projects/toehead/sys/dev/rr232x/himfuncs.h#2 delete .. //depot/projects/toehead/sys/dev/rr232x/hptintf.h#2 delete .. //depot/projects/toehead/sys/dev/rr232x/i386-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/toehead/sys/dev/rr232x/ldm.h#2 delete .. //depot/projects/toehead/sys/dev/rr232x/list.h#2 delete .. //depot/projects/toehead/sys/dev/rr232x/os_bsd.c#2 delete .. //depot/projects/toehead/sys/dev/rr232x/os_bsd.h#2 delete .. //depot/projects/toehead/sys/dev/rr232x/osm.h#2 delete .. //depot/projects/toehead/sys/dev/rr232x/osm_bsd.c#2 delete .. //depot/projects/toehead/sys/dev/rr232x/rr232x_config.c#2 delete .. //depot/projects/toehead/sys/dev/rr232x/rr232x_config.h#2 delete .. //depot/projects/toehead/sys/dev/sk/if_sk.c#2 integrate .. //depot/projects/toehead/sys/dev/ti/if_ti.c#2 integrate .. //depot/projects/toehead/sys/dev/wpi/if_wpi.c#4 integrate .. //depot/projects/toehead/sys/i386/acpica/madt.c#2 integrate .. //depot/projects/toehead/sys/i386/conf/GENERIC#4 integrate .. //depot/projects/toehead/sys/i386/conf/NOTES#4 integrate .. //depot/projects/toehead/sys/i386/include/proc.h#2 integrate .. //depot/projects/toehead/sys/ia64/ia64/locore.S#2 integrate .. //depot/projects/toehead/sys/ia64/ia64/machdep.c#3 integrate .. //depot/projects/toehead/sys/ia64/include/md_var.h#2 integrate .. //depot/projects/toehead/sys/kern/kern_lock.c#4 integrate .. //depot/projects/toehead/sys/kern/kern_mbuf.c#3 integrate .. //depot/projects/toehead/sys/kern/kern_rwlock.c#4 integrate .. //depot/projects/toehead/sys/kern/kern_timeout.c#2 integrate .. //depot/projects/toehead/sys/kern/subr_lock.c#4 integrate .. //depot/projects/toehead/sys/kern/subr_turnstile.c#2 integrate .. //depot/projects/toehead/sys/kern/uipc_cow.c#2 integrate .. //depot/projects/toehead/sys/kern/uipc_mbuf.c#3 integrate .. //depot/projects/toehead/sys/kern/uipc_sockbuf.c#3 edit .. //depot/projects/toehead/sys/kern/uipc_socket.c#2 edit .. //depot/projects/toehead/sys/kern/uipc_syscalls.c#3 integrate .. //depot/projects/toehead/sys/kern/vfs_aio.c#4 integrate .. //depot/projects/toehead/sys/modules/Makefile#3 integrate .. //depot/projects/toehead/sys/modules/cxgb/cxgb/Makefile#5 edit .. //depot/projects/toehead/sys/modules/rr232x/Makefile#2 delete .. //depot/projects/toehead/sys/net/bpf.c#3 integrate .. //depot/projects/toehead/sys/net80211/ieee80211_ht.c#2 integrate .. //depot/projects/toehead/sys/net80211/ieee80211_ht.h#2 integrate .. //depot/projects/toehead/sys/net80211/ieee80211_input.c#2 integrate .. //depot/projects/toehead/sys/netgraph/netflow/ng_netflow.c#3 integrate .. //depot/projects/toehead/sys/netgraph/netgraph.h#2 integrate .. //depot/projects/toehead/sys/netgraph/ng_base.c#3 integrate .. //depot/projects/toehead/sys/netgraph/ng_bpf.c#3 integrate .. //depot/projects/toehead/sys/netgraph/ng_iface.c#2 integrate .. //depot/projects/toehead/sys/netgraph/ng_ppp.c#3 integrate .. //depot/projects/toehead/sys/netgraph/ng_pppoe.c#3 integrate .. //depot/projects/toehead/sys/netgraph/ng_tee.c#2 integrate .. //depot/projects/toehead/sys/netinet/if_ether.c#6 edit .. //depot/projects/toehead/sys/netinet/ip_id.c#2 integrate .. //depot/projects/toehead/sys/netinet/ip_output.c#2 integrate .. //depot/projects/toehead/sys/netinet/sctp_input.c#2 integrate .. //depot/projects/toehead/sys/netinet/sctp_peeloff.c#2 integrate .. //depot/projects/toehead/sys/netinet/sctputil.c#2 integrate .. //depot/projects/toehead/sys/netinet6/ip6_output.c#5 integrate .. //depot/projects/toehead/sys/netipsec/ipsec.c#2 integrate .. //depot/projects/toehead/sys/netipsec/ipsec.h#2 integrate .. //depot/projects/toehead/sys/netipsec/ipsec6.h#2 integrate .. //depot/projects/toehead/sys/pci/if_wb.c#2 integrate .. //depot/projects/toehead/sys/sys/lockmgr.h#5 integrate .. //depot/projects/toehead/sys/sys/mbuf.h#4 integrate .. //depot/projects/toehead/sys/sys/param.h#5 integrate .. //depot/projects/toehead/sys/sys/proc.h#4 integrate .. //depot/projects/toehead/sys/sys/rwlock.h#2 integrate .. //depot/projects/toehead/sys/sys/socket.h#4 integrate .. //depot/projects/toehead/sys/sys/socketvar.h#3 integrate .. //depot/projects/toehead/sys/tools/embed_mfs.sh#1 branch .. //depot/projects/toehead/tools/regression/netinet/ip_id_period/ip_id_period.py#1 branch .. //depot/projects/toehead/tools/regression/pthread/mutex_isowned_np/Makefile#1 branch .. //depot/projects/toehead/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c#1 branch .. //depot/projects/toehead/tools/regression/sockets/unix_sorflush/Makefile#1 branch .. //depot/projects/toehead/tools/regression/sockets/unix_sorflush/unix_sorflush.c#1 branch .. //depot/projects/toehead/tools/tools/crypto/cryptostats.c#2 integrate .. //depot/projects/toehead/tools/tools/crypto/cryptotest.c#2 integrate .. //depot/projects/toehead/usr.bin/calendar/calendars/calendar.freebsd#3 integrate .. //depot/projects/toehead/usr.bin/file/Makefile#2 integrate .. //depot/projects/toehead/usr.bin/file/file.1#2 delete .. //depot/projects/toehead/usr.bin/file/magic.5#2 delete .. //depot/projects/toehead/usr.bin/kdump/Makefile#2 integrate .. //depot/projects/toehead/usr.bin/kdump/mkioctls#2 integrate .. //depot/projects/toehead/usr.bin/kdump/mksubr#2 integrate .. //depot/projects/toehead/usr.bin/logger/logger.c#2 integrate .. //depot/projects/toehead/usr.bin/truss/Makefile#2 integrate .. //depot/projects/toehead/usr.sbin/Makefile#2 integrate .. //depot/projects/toehead/usr.sbin/bootparamd/bootparamd/bootparamd.c#2 integrate .. //depot/projects/toehead/usr.sbin/bootparamd/bootparamd/main.c#2 integrate .. //depot/projects/toehead/usr.sbin/kbdcontrol/kbdcontrol.1#2 integrate .. //depot/projects/toehead/usr.sbin/kbdcontrol/kbdmap.5#2 integrate .. //depot/projects/toehead/usr.sbin/newsyslog/newsyslog.c#2 integrate .. //depot/projects/toehead/usr.sbin/ofwdump/Makefile#2 integrate .. //depot/projects/toehead/usr.sbin/ofwdump/ofwdump.8#2 integrate .. //depot/projects/toehead/usr.sbin/setfmac/setfmac.c#3 integrate .. //depot/projects/toehead/usr.sbin/sysinstall/disks.c#2 integrate .. //depot/projects/toehead/usr.sbin/watch/watch.c#2 integrate .. //depot/projects/toehead/usr.sbin/ypserv/yp_main.c#2 integrate .. //depot/projects/toehead/usr.sbin/ypserv/ypserv.8#2 integrate Differences ... ==== //depot/projects/toehead/Makefile#4 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile,v 1.344 2007/12/13 00:08:02 imp Exp $ +# $FreeBSD: src/Makefile,v 1.345 2008/01/30 19:33:18 jhb Exp $ # # The user-driven targets are: # @@ -75,6 +75,8 @@ # developer convenience only. They are intentionally not documented and # completely subject to change without notice. # +# For more information, see the build(7) manual page. +# TGTS= all all-man buildenv buildenvvars buildkernel buildworld \ check-old check-old-dirs check-old-files check-old-libs \ checkdpadd clean cleandepend cleandir \ ==== //depot/projects/toehead/Makefile.inc1#5 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.596 2008/01/23 22:21:36 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.598 2008/02/05 15:41:58 des Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -313,8 +313,9 @@ .endif .else rm -rf ${WORLDTMP}/legacy/usr/include -# XXX - These two can depend on any header file. +# XXX - These three can depend on any header file. rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c + rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ ==== //depot/projects/toehead/ObsoleteFiles.inc#4 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.127 2008/01/26 20:23:25 brueffer Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.130 2008/02/06 19:45:25 delphij Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -3945,7 +3945,9 @@ .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz .endif +.if ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "sparc64" OLD_FILES+=usr/share/man/man8/ofwdump.8.gz +.endif OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz OLD_FILES+=usr/share/man/man9/VFS_START.9.gz OLD_FILES+=usr/share/man/man9/cpu_critical_exit.9.gz ==== //depot/projects/toehead/contrib/binutils/libiberty/cp-demangle.c#2 (text+ko) ==== @@ -2396,6 +2396,8 @@ const char *s; type = cplus_demangle_type (di); + if (type == NULL) + return NULL; /* If we have a type we know how to print, we aren't going to print the type name itself. */ ==== //depot/projects/toehead/contrib/file/FREEBSD-upgrade#2 (text+ko) ==== @@ -1,5 +1,5 @@ # ex:ts=8 -$FreeBSD: src/contrib/file/FREEBSD-upgrade,v 1.7 2007/05/24 22:02:49 obrien Exp $ +$FreeBSD: src/contrib/file/FREEBSD-upgrade,v 1.8 2008/01/30 02:48:24 obrien Exp $ Christos Zoulas `file' originals can be found at: ftp://ftp.astron.com/pub/file/ @@ -17,14 +17,14 @@ rm -f missing depcomp rm -f config.{guess,sub} - cvs import -m "Virgin import of Christos Zoulas's FILE 4.21." \ - src/contrib/file ZOULAS file_4_21 + cvs import -m "Virgin import of Christos Zoulas's FILE 4.23." \ + src/contrib/file ZOULAS file_4_23 Never make local changes to ZOULAS `file'. Christos is very willing to work with us to meet our FreeBSD needs. Thus submit any desired changes to him and wait for the next release and vendor import to get them. - + obrien@NUXI.com 15-Sept-2002 ==== //depot/projects/toehead/contrib/file/magic.c#3 (text+ko) ==== @@ -218,6 +218,7 @@ */ #ifdef HAVE_UTIMES struct timeval utsbuf[2]; + memset(utsbuf, 0, sizeof(struct timeval) * 2); utsbuf[0].tv_sec = sb->st_atime; utsbuf[1].tv_sec = sb->st_mtime; @@ -225,6 +226,7 @@ #elif defined(HAVE_UTIME_H) || defined(HAVE_SYS_UTIME_H) struct utimbuf utbuf; + memset(&utbuf, 0, sizeof(struct utimbuf)); utbuf.actime = sb->st_atime; utbuf.modtime = sb->st_mtime; (void) utime(name, &utbuf); /* don't care if loses */ ==== //depot/projects/toehead/contrib/openpam/include/security/openpam_version.h#3 (text) ==== @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: openpam_version.h 409 2007-12-21 11:38:50Z des $ + * $Id: openpam_version.h 412 2008-01-29 19:31:46Z des $ */ #ifndef SECURITY_OPENPAM_VERSION_H_INCLUDED @@ -42,4 +42,7 @@ #define OPENPAM_VERSION 20071221 #define OPENPAM_RELEASE "Hydrangea" +/* violates reserved namespace, but can't be removed for legacy reasons */ +#define _OPENPAM + #endif /* !SECURITY_OPENPAM_VERSION_H_INCLUDED */ ==== //depot/projects/toehead/crypto/openssh/FREEBSD-Xlist#2 (text+ko) ==== @@ -1,10 +1,9 @@ -$FreeBSD: src/crypto/openssh/FREEBSD-Xlist,v 1.3 2004/02/26 10:37:34 des Exp $ +$FreeBSD: src/crypto/openssh/FREEBSD-Xlist,v 1.4 2008/02/06 23:14:24 des Exp $ *.0 */.cvsignore -.cvsignore -autom4te* -config.h.in -configure -contrib -regress/*.[0-9] -stamp-h.in +*autom4te* +*config.h.in +*configure +*contrib +*regress/*.[0-9] +*stamp-h.in ==== //depot/projects/toehead/crypto/openssh/FREEBSD-upgrade#2 (text+ko) ==== @@ -12,12 +12,12 @@ 2) Unpack the tarball in a suitable directory. + $ tar xf openssh-X.YpZ.tar.gz \ + -X /usr/src/crypto/openssh/FREEBSD-Xlist + 3) Remove trash: - $ sh -c 'while read glob ; do rm -rvf $glob ; done' \ - -__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kld.c,v 1.3 2008/01/28 21:45:09 jhb Exp $"); +__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kld.c,v 1.6 2008/01/29 23:44:34 jhb Exp $"); #include #include +#include +#include #include -#include #include +#include +#include +#include #include #include #include #include #include +#include #include "kgdb.h" -/* - * TODO - * - * - Use 'target_read_memory()' instead of kvm_read(). - * - Hook into the solib stuff perhaps? - */ +struct lm_info { + CORE_ADDR base_address; +}; /* Offsets of fields in linker_file structure. */ static CORE_ADDR off_address, off_filename, off_pathname, off_next; +/* KVA of 'linker_path' which corresponds to the kern.module_path sysctl .*/ +static CORE_ADDR module_path_addr; + +static struct target_so_ops kld_so_ops; + static int kld_ok (char *path) { @@ -68,7 +75,6 @@ * - filename (e.g. foo.ko) */ static const char *kld_suffixes[] = { - ".symbols", ".debug", "", NULL @@ -102,7 +108,6 @@ static int find_kld_path (char *filename, char *path, size_t path_size) { - CORE_ADDR module_path_addr; char *module_path; char *kernel_dir, *module_dir, *cp; int error; @@ -113,7 +118,6 @@ if (check_kld_path(path, path_size)) return (1); } - module_path_addr = kgdb_parse("linker_path"); if (module_path_addr != 0) { target_read_string(module_path_addr, &module_path, PATH_MAX, &error); @@ -137,25 +141,12 @@ static CORE_ADDR read_pointer (CORE_ADDR address) { - union { - uint32_t d32; - uint64_t d64; - } val; + CORE_ADDR value; - switch (TARGET_PTR_BIT) { - case 32: - if (kvm_read(kvm, address, &val.d32, sizeof(val.d32)) != - sizeof(val.d32)) - return (0); - return (val.d32); - case 64: - if (kvm_read(kvm, address, &val.d64, sizeof(val.d64)) != - sizeof(val.d64)) - return (0); - return (val.d64); - default: - return (0); - } + if (target_read_memory(address, (char *)&value, TARGET_PTR_BIT / 8) != + 0) + return (0); + return (extract_unsigned_integer(&value, TARGET_PTR_BIT / 8)); } /* @@ -303,78 +294,159 @@ } static void -dummy_cleanup (void *arg) +kld_relocate_section_addresses (struct so_list *so, struct section_table *sec) +{ + + sec->addr += so->lm_info->base_address; + sec->endaddr += so->lm_info->base_address; +} + +static void +kld_free_so (struct so_list *so) +{ + + xfree(so->lm_info); +} + +static void +kld_clear_solib (void) +{ +} + +static void +kld_solib_create_inferior_hook (void) { } static void -load_single_kld (CORE_ADDR kld) +kld_special_symbol_handling (void) +{ +} + +static struct so_list * +kld_current_sos (void) { - CORE_ADDR address; - char kldpath[PATH_MAX]; - char *path, *filename; - int errcode, path_ok; + struct so_list *head, **prev, *new; + CORE_ADDR kld, kernel; + char *path; + int error; + + prev = &head; + + /* + * Walk the list of linker files creating so_list entries for + * each non-kernel file. + */ + kernel = kgdb_parse("linker_kernel_file"); + for (kld = kgdb_parse("linker_files.tqh_first"); kld != 0; + kld = read_pointer(kld + off_next)) { + /* Skip the main kernel file. */ + if (kld == kernel) + continue; + + new = xmalloc(sizeof(*new)); + memset(new, 0, sizeof(*new)); - /* Try to read this linker file's filename. */ - target_read_string(read_pointer(kld + off_filename), &filename, - PATH_MAX, &errcode); - if (errcode) - error("Unable to read kld filename"); + new->lm_info = xmalloc(sizeof(*new->lm_info)); + new->lm_info->base_address = 0; - make_cleanup(xfree, filename); - path_ok = 0; + /* Read the base filename and store it in so_original_name. */ + target_read_string(read_pointer(kld + off_filename), + &path, sizeof(new->so_original_name), &error); + if (error != 0) { + warning("kld_current_sos: Can't read filename: %s\n", + safe_strerror(error)); + free_so(new); + continue; + } + strlcpy(new->so_original_name, path, + sizeof(new->so_original_name)); + xfree(path); - /* Try to read this linker file's pathname. */ - if (off_pathname != 0) { - target_read_string(read_pointer(kld + off_pathname), &path, - PATH_MAX, &errcode); - if (errcode == 0) { - make_cleanup(xfree, path); + /* + * Try to read the pathname (if it exists) and store + * it in so_name. + */ + if (off_pathname != 0) { + target_read_string(read_pointer(kld + off_pathname), + &path, sizeof(new->so_name), &error); + if (error != 0) { + warning( + "kld_current_sos: Can't read pathname for \"%s\": %s\n", + new->so_original_name, + safe_strerror(error)); + strlcpy(new->so_name, new->so_original_name, + sizeof(new->so_name)); + } else { + strlcpy(new->so_name, path, + sizeof(new->so_name)); + xfree(path); + } + } else + strlcpy(new->so_name, new->so_original_name, + sizeof(new->so_name)); - /* - * If we have a pathname, try to load the kld - * from there. - */ - strlcpy(kldpath, path, sizeof(kldpath)); - if (check_kld_path(kldpath, sizeof(kldpath))) - path_ok = 1; + /* Read this kld's base address. */ + new->lm_info->base_address = read_pointer(kld + off_address); + if (new->lm_info->base_address == 0) { + warning( + "kld_current_sos: Invalid address for kld \"%s\"", + new->so_original_name); + free_so(new); + continue; } + + /* Append to the list. */ + *prev = new; + prev = &new->next; } - /* - * If we didn't get a pathname from the linker file path, try - * to find this kld in the various search paths. - */ - if (!path_ok && !find_kld_path(filename, kldpath, sizeof(kldpath))) - error("Unable to find kld file for \"%s\".", filename); + return (head); +} + +static int +kld_open_symbol_file_object (void *from_ttyp) +{ - /* Read this kld's base address and add its symbols. */ - address = read_pointer(kld + off_address); - if (address == 0) - error("Invalid address for kld \"%s\"", filename); + return (0); +} - load_kld(kldpath, address, 0, 0); +static int +kld_in_dynsym_resolve_code (CORE_ADDR pc) +{ - printf_unfiltered("Loaded symbols for kld \"%s\" from \"%s\"\n", - filename, path); + return (0); } static int -load_kld_stub (void *arg) +kld_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname) { - CORE_ADDR kld = *(CORE_ADDR *)arg; + char path[PATH_MAX]; + int fd; + + *temp_pathname = NULL; + if (!find_kld_path(solib, path, sizeof(path))) { + errno = ENOENT; + return (-1); + } + fd = open(path, o_flags, 0); + if (fd >= 0) + *temp_pathname = xstrdup(path); + return (fd); +} - load_single_kld(kld); +static int +load_klds_stub (void *arg) +{ - return (1); + SOLIB_ADD(NULL, 1, ¤t_target, auto_solib_add); + return (0); } void -kgdb_auto_load_klds (void) +kgdb_kld_init (void) { - struct cleanup *cleanup; - CORE_ADDR kld, kernel; - int loaded_kld; + struct cmd_list_element *c; /* Compute offsets of relevant members in struct linker_file. */ off_address = kgdb_parse("&((struct linker_file *)0)->address"); @@ -384,24 +456,24 @@ if (off_address == 0 || off_filename == 0 || off_next == 0) return; - /* Walk the list of linker files auto-loading klds. */ - cleanup = make_cleanup(dummy_cleanup, NULL); - loaded_kld = 0; - kld = kgdb_parse("linker_files.tqh_first"); - kernel = kgdb_parse("linker_kernel_file"); - for (kld = kgdb_parse("linker_files.tqh_first"); kld != 0; - kld = read_pointer(kld + off_next)) { - /* Skip the main kernel file. */ - if (kld == kernel) - continue; + module_path_addr = kgdb_parse("linker_path"); + + kld_so_ops.relocate_section_addresses = kld_relocate_section_addresses; + kld_so_ops.free_so = kld_free_so; + kld_so_ops.clear_solib = kld_clear_solib; + kld_so_ops.solib_create_inferior_hook = kld_solib_create_inferior_hook; + kld_so_ops.special_symbol_handling = kld_special_symbol_handling; + kld_so_ops.current_sos = kld_current_sos; + kld_so_ops.open_symbol_file_object = kld_open_symbol_file_object; + kld_so_ops.in_dynsym_resolve_code = kld_in_dynsym_resolve_code; + kld_so_ops.find_and_open_solib = kld_find_and_open_solib; - if (catch_errors(load_kld_stub, &kld, - "Error while reading kld symbols:\n", RETURN_MASK_ALL)) - loaded_kld = 1; - } + current_target_so_ops = &kld_so_ops; - do_cleanups(cleanup); + catch_errors(load_klds_stub, NULL, NULL, RETURN_MASK_ALL); - if (loaded_kld) - reinit_frame_cache(); + c = add_com("add-kld", class_files, kgdb_add_kld_cmd, + "Usage: add-kld FILE\n\ +Load the symbols from the kernel loadable module FILE."); + set_cmd_completer(c, filename_completer); } ==== //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/main.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.13 2008/01/28 20:31:30 jhb Exp $"); +__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.14 2008/01/29 23:37:59 jhb Exp $"); #include #include @@ -204,7 +204,6 @@ kgdb_init_target(void) { CORE_ADDR bufp; - bfd *kern_bfd; int size, rseq, wseq; int kern_desc; char c; @@ -228,7 +227,6 @@ } set_gdbarch_from_file (kern_bfd); - bfd_close(kern_bfd); symbol_file_add_main (kernel, 0); if (remote) ==== //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/trgt.c#5 (text+ko) ==== @@ -25,16 +25,18 @@ */ #include -__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt.c,v 1.8 2008/01/28 21:40:10 jhb Exp $"); +__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt.c,v 1.10 2008/01/29 23:44:34 jhb Exp $"); #include #include #include #include +#include #include #include #include +#include #include #include #include @@ -45,6 +47,8 @@ static struct target_ops kgdb_trgt_ops; +bfd *kern_bfd; + #define KERNOFF (kgdb_kernbase ()) #define INKERNEL(x) ((x) >= KERNOFF) @@ -81,11 +85,8 @@ static void kgdb_trgt_files_info(struct target_ops *target) { - struct target_ops *tb; - tb = find_target_beneath(target); - if (tb->to_files_info != NULL) - tb->to_files_info(tb); + print_section_info(target, kern_bfd); } static void @@ -207,7 +208,7 @@ kgdb_trgt_ops.to_magic = OPS_MAGIC; kgdb_trgt_ops.to_shortname = "kernel"; - kgdb_trgt_ops.to_longname = "kernel core files."; + kgdb_trgt_ops.to_longname = "kernel core files"; kgdb_trgt_ops.to_doc = "Kernel core files."; kgdb_trgt_ops.to_stratum = thread_stratum; kgdb_trgt_ops.to_has_memory = 1; @@ -222,6 +223,12 @@ kgdb_trgt_ops.to_store_registers = kgdb_trgt_store_registers; kgdb_trgt_ops.to_thread_alive = kgdb_trgt_thread_alive; kgdb_trgt_ops.to_xfer_memory = kgdb_trgt_xfer_memory; + + if (build_section_table(kern_bfd, &kgdb_trgt_ops.to_sections, + &kgdb_trgt_ops.to_sections_end) != 0) + errx(1, "\"%s\": can't find the file sections: %s", + kernel, bfd_errmsg(bfd_get_error())); + add_target(&kgdb_trgt_ops); push_target(&kgdb_trgt_ops); @@ -236,8 +243,5 @@ "Set current process context"); add_com ("tid", class_obscure, kgdb_set_tid_cmd, "Set current thread context"); - add_com ("add-kld", class_files, kgdb_add_kld_cmd, - "Usage: add-kld FILE\n\ -Load the symbols from the kernel loadable module FILE."); - kgdb_auto_load_klds(); + kgdb_kld_init(); } ==== //depot/projects/toehead/include/pthread_np.h#3 (text+ko) ==== @@ -26,7 +26,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Feb 7 04:32:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4D09116A41B; Thu, 7 Feb 2008 04:32:51 +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 EE5BC16A419 for ; Thu, 7 Feb 2008 04:32:50 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CF0B113C43E for ; Thu, 7 Feb 2008 04:32:50 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m174Wo4n002497 for ; Thu, 7 Feb 2008 04:32:50 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m174WoUK002494 for perforce@freebsd.org; Thu, 7 Feb 2008 04:32:50 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 04:32:50 GMT Message-Id: <200802070432.m174WoUK002494@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134952 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 04:32:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=134952 Change 134952 by kmacy@kmacy:storage:toehead on 2008/02/07 04:32:40 add interface for adding new sysctls Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.h#2 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c#2 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.h#2 (text+ko) ==== @@ -138,6 +138,8 @@ void t3_init_tunables(struct tom_data *t); +void t3_sysctl_register(struct adapter *sc, const struct tom_tunables *p); + static __inline struct mbuf * m_gethdr_nofail(int len) { ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c#2 (text+ko) ==== @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -82,7 +83,7 @@ .delack = 1, .max_conn = -1, .soft_backlog_limit = 0, - .ddp = 0, + .ddp = 1, .ddp_thres = 14 * 4096, .ddp_copy_limit = 13 * 4096, .ddp_push_wait = 1, @@ -96,7 +97,8 @@ .activated = 1, }; -void t3_init_tunables(struct tom_data *t) +void +t3_init_tunables(struct tom_data *t) { t->conf = default_tunable_vals; @@ -104,3 +106,15 @@ t->conf.mss = T3C_DATA(t->cdev)->tx_max_chunk; t->conf.max_wrs = T3C_DATA(t->cdev)->max_wrs; } + +void +t3_sysctl_register(struct adapter *sc, const struct tom_tunables *p) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *children; + + ctx = device_get_sysctl_ctx(sc->dev); + children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)); + +} + From owner-p4-projects@FreeBSD.ORG Thu Feb 7 04:33:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60DFC16A420; Thu, 7 Feb 2008 04:33:52 +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 2650D16A419 for ; Thu, 7 Feb 2008 04:33:52 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0710D13C46E for ; Thu, 7 Feb 2008 04:33:52 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m174XplI002574 for ; Thu, 7 Feb 2008 04:33:51 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m174XpvX002571 for perforce@freebsd.org; Thu, 7 Feb 2008 04:33:51 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 04:33:51 GMT Message-Id: <200802070433.m174XpvX002571@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134953 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 04:33:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=134953 Change 134953 by kmacy@kmacy:storage:toehead on 2008/02/07 04:33:20 handle had bad CLPs through the full numeric range Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#6 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#6 (text+ko) ==== @@ -94,7 +94,8 @@ /* * Handlers for each CPL opcode */ -static cxgb_cpl_handler_func tom_cpl_handlers[NUM_CPL_CMDS]; +static cxgb_cpl_handler_func tom_cpl_handlers[256]; + static eventhandler_tag listen_tag; @@ -272,7 +273,7 @@ { log(LOG_ERR, "%s: received bad CPL command %u\n", cdev->name, 0xFF & *mtod(m, unsigned int *)); - + kdb_backtrace(); return (CPL_RET_BUF_DONE | CPL_RET_BAD_MSG); } @@ -284,7 +285,7 @@ void t3tom_register_cpl_handler(unsigned int opcode, cxgb_cpl_handler_func h) { - if (opcode < NUM_CPL_CMDS) + if (opcode < 256) tom_cpl_handlers[opcode] = h ? h : do_bad_cpl; else log(LOG_ERR, "Chelsio T3 TOM: handler registration for " @@ -329,7 +330,7 @@ { int i; - for (i = 0; i < NUM_CPL_CMDS; ++i) + for (i = 0; i < 256; ++i) tom_cpl_handlers[i] = do_bad_cpl; t3_init_listen_cpl_handlers(); @@ -381,12 +382,9 @@ t->ppod_map = malloc(t->nppods, M_DEVBUF, M_WAITOK); mtx_init(&t->ppod_map_lock, "ppod map", NULL, MTX_DEF); -#if 0 - tom_proc_init(dev); -#ifdef CONFIG_SYSCTL - t->sysctl = t3_sysctl_register(dev, &t->conf); -#endif -#endif + + + t3_sysctl_register(cdev->adapter, &t->conf); return (0); } @@ -436,6 +434,8 @@ INP_INFO_RUNLOCK(&tcbinfo); } + + static int t3_tom_init(void) { @@ -466,7 +466,6 @@ return -1; } INP_INFO_WLOCK(&tcbinfo); - INP_INFO_WUNLOCK(&tcbinfo); mtx_init(&cxgb_list_lock, "cxgb tom list", NULL, MTX_DEF); From owner-p4-projects@FreeBSD.ORG Thu Feb 7 04:36:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 209CF16A468; Thu, 7 Feb 2008 04:36:56 +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 C1B9D16A420 for ; Thu, 7 Feb 2008 04:36:55 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 962E713C455 for ; Thu, 7 Feb 2008 04:36:55 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m174atjI002746 for ; Thu, 7 Feb 2008 04:36:55 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m174atu0002740 for perforce@freebsd.org; Thu, 7 Feb 2008 04:36:55 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 04:36:55 GMT Message-Id: <200802070436.m174atu0002740@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134954 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 04:36:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=134954 Change 134954 by kmacy@kmacy:storage:toehead on 2008/02/07 04:36:06 add inline SBAPPEND for validating mbufs and socket buffers move back to sbappend acquire socket buffer lock earlier to serialize access to DDP state Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#15 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#15 (text+ko) ==== @@ -152,6 +152,38 @@ #endif +static inline void +SBAPPEND(struct sockbuf *sb, struct mbuf *n) +{ + struct mbuf * m; + + m = sb->sb_mb; + while (m) { + KASSERT(((m->m_flags & M_EXT) && (m->m_ext.ext_type == EXT_EXTREF)) || + !(m->m_flags & M_EXT), ("unexpected type M_EXT=%d ext_type=%d m_len=%d\n", + !!(m->m_flags & M_EXT), m->m_ext.ext_type, m->m_len)); + KASSERT(m->m_next != (struct mbuf *)0xffffffff, ("bad next value m_next=%p m_nextpkt=%p m_flags=0x%x", + m->m_next, m->m_nextpkt, m->m_flags)); + m = m->m_next; + } + m = n; + while (m) { + KASSERT(((m->m_flags & M_EXT) && (m->m_ext.ext_type == EXT_EXTREF)) || + !(m->m_flags & M_EXT), ("unexpected type M_EXT=%d ext_type=%d m_len=%d\n", + !!(m->m_flags & M_EXT), m->m_ext.ext_type, m->m_len)); + KASSERT(m->m_next != (struct mbuf *)0xffffffff, ("bad next value m_next=%p m_nextpkt=%p m_flags=0x%x", + m->m_next, m->m_nextpkt, m->m_flags)); + m = m->m_next; + } + sbappend_locked(sb, n); + m = sb->sb_mb; + while (m) { + KASSERT(m->m_next != (struct mbuf *)0xffffffff, ("bad next value m_next=%p m_nextpkt=%p m_flags=0x%x", + m->m_next, m->m_nextpkt, m->m_flags)); + m = m->m_next; + } +} + static inline int is_t3a(const struct toedev *dev) { @@ -221,6 +253,7 @@ m->m_pkthdr.len = m->m_len = sizeof(*req); req = mtod(m, struct cpl_tid_release *); req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); + req->wr.wr_lo = 0; OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_TID_RELEASE, tid)); } @@ -470,6 +503,7 @@ req = mtod(m, struct cpl_rx_data_ack *); req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); + req->wr.wr_lo = 0; OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_RX_DATA_ACK, toep->tp_tid)); req->credit_dack = htonl(dack | V_RX_CREDITS(credits)); m_set_priority(m, mkprio(CPL_PRIORITY_ACK, toep)); @@ -492,6 +526,7 @@ req = mtod(m, struct cpl_rx_data_ack *); req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); + req->wr.wr_lo = 0; m->m_pkthdr.len = m->m_len = sizeof(*req); OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_RX_DATA_ACK, toep->tp_tid)); @@ -743,6 +778,7 @@ req = mtod(m, struct cpl_set_tcb_field *); m->m_pkthdr.len = m->m_len = sizeof(*req); req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); + req->wr.wr_lo = 0; OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, toep->tp_tid)); req->reply = V_NO_REPLY(no_reply); req->cpu_idx = 0; @@ -907,8 +943,10 @@ req = mtod(m, struct cpl_get_tcb *); m->m_pkthdr.len = m->m_len = sizeof(*req); req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); + req->wr.wr_lo = 0; OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_GET_TCB, toep->tp_tid)); req->cpuno = htons(toep->tp_qset); + req->rsvd = 0; if (sototcpcb(so)->t_state == TCPS_SYN_SENT) mbufq_tail(&toep->out_of_order_queue, m); // defer else @@ -1214,6 +1252,7 @@ m->m_pkthdr.len = m->m_len = sizeof(*req); req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); + req->wr.wr_lo = 0; OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_ACT_OPEN_REQ, atid)); req->local_port = inp->inp_lport; req->peer_port = inp->inp_fport; @@ -1623,6 +1662,9 @@ uint64_t t; __be64 *tcb; + so = toeptoso(toep); + SOCKBUF_LOCK(&so->so_rcv); + /* Note that we only accout for CPL_GET_TCB issued by the DDP code. We * really need a cookie in order to dispatch the RPLs. */ @@ -1638,7 +1680,9 @@ m_freem(m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) - sorwakeup(so); + sorwakeup_locked(so); + else + SOCKBUF_UNLOCK(&so->so_rcv); return; } @@ -1692,9 +1736,8 @@ #endif m->m_cur_offset = bsp->cur_offset; bsp->cur_offset = ddp_offset; - m->m_pkthdr.len = ddp_offset - m->m_cur_offset; - so = toeptoso(toep); - + m->m_len = m->m_pkthdr.len = ddp_offset - m->m_cur_offset; + if (__predict_false(so_no_receive(so) && m->m_pkthdr.len)) { handle_excess_rx(toep, m); return; @@ -1736,10 +1779,13 @@ q->kbuf_posted--; bsp->flags |= DDP_BF_NODATA; } + SOCKBUF_UNLOCK(&so->so_rcv); + m_free(m); return; } } else { + SOCKBUF_UNLOCK(&so->so_rcv); /* This reply is for a CPL_GET_TCB_RPL to cancel the UBUF DDP, * but it got here way late and nobody cares anymore. */ @@ -1747,6 +1793,7 @@ return; } + KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); tp = toep->tp_tp; m->m_ddp_gl = (unsigned char *)bsp->gl; m->m_flags |= M_DDP; @@ -1762,8 +1809,7 @@ "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u lskb->len %u", m->m_seq, q->cur_buf, m->m_pkthdr.len); #endif - SOCKBUF_LOCK(&so->so_rcv); - sbappendstream_locked(&so->so_rcv, m); + SBAPPEND(&so->so_rcv, m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) sorwakeup_locked(so); else @@ -1793,6 +1839,7 @@ handle_ddp_data(struct toepcb *toep, struct mbuf *m) { struct tcpcb *tp = toep->tp_tp; + struct socket *so = toeptoso(toep); struct ddp_state *q; struct ddp_buf_state *bsp; struct cpl_rx_data *hdr = cplhdr(m); @@ -1802,10 +1849,11 @@ return; TRACE_ENTER; + SOCKBUF_LOCK(&so->so_rcv); q = &toep->tp_ddp_state; bsp = &q->buf_state[q->cur_buf]; m->m_len = m->m_pkthdr.len = rcv_nxt - tp->rcv_nxt; - + KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); printf("rcv_nxt=0x%x tp->rcv_next=0x%x len=%d\n", rcv_nxt, tp->rcv_nxt, m->m_pkthdr.len); @@ -1834,6 +1882,7 @@ * mode. */ q->ubuf_ddp_ready = 0; + SOCKBUF_UNLOCK(&so->so_rcv); TRACE_EXIT; } @@ -1910,7 +1959,7 @@ if (sb_notify(&so->so_rcv)) DPRINTF("rx_data so=%p flags=0x%x len=%d\n", so, so->so_rcv.sb_flags, m->m_pkthdr.len); - sbappendstream_locked(&so->so_rcv, m); + SBAPPEND(&so->so_rcv, m); #ifdef notyet /* @@ -2009,6 +2058,9 @@ ("length received exceeds ddp pages: len=%d dgl_length=%d", m->m_len, bsp->gl->dgl_length)); + KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); + KASSERT(m->m_next == NULL, ("m_len=%p", m->m_next)); + /* * Figure out where the new data was placed in the buffer and store it * in when. Assumes the buffer offset starts at 0, consumer needs to @@ -2045,7 +2097,7 @@ tp->t_rcvtime = ticks; SOCKBUF_LOCK(&so->so_rcv); - sbappendstream_locked(&so->so_rcv, m); + SBAPPEND(&so->so_rcv, m); if ((so->so_state & SS_NOFDREF) == 0) sorwakeup_locked(so); @@ -2072,7 +2124,7 @@ if (__predict_false(ntohl(hdr->ddpvld_status) & DDP_ERR)) { log(LOG_ERR, "RX_DATA_DDP for TID %u reported error 0x%x\n", GET_TID(hdr), G_DDP_VALID(ntohl(hdr->ddpvld_status))); - return CPL_RET_BUF_DONE; + return (CPL_RET_BUF_DONE); } #if 0 skb->h.th = tcphdr_skb->h.th; @@ -2107,9 +2159,10 @@ buf_idx = (ddp_report >> S_DDP_BUF_IDX) & 1; bsp = &q->buf_state[buf_idx]; + SOCKBUF_LOCK(&so->so_rcv); when = bsp->cur_offset; m->m_len = m->m_pkthdr.len = G_DDP_OFFSET(ddp_report) - when; - + KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); #ifdef T3_TRACE T3_TRACE5(TIDTB(sk), "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u " @@ -2145,12 +2198,12 @@ tp->rcv_nxt += m->m_len; tp->t_rcvtime = ticks; - SOCKBUF_LOCK(&so->so_rcv); - sbappendstream_locked(&so->so_rcv, m); + SBAPPEND(&so->so_rcv, m); if ((so->so_state & SS_NOFDREF) == 0) sorwakeup_locked(so); - SOCKBUF_UNLOCK(&so->so_rcv); + else + SOCKBUF_UNLOCK(&so->so_rcv); TRACE_EXIT; } @@ -2229,8 +2282,10 @@ } q = &toep->tp_ddp_state; + SOCKBUF_LOCK(&so->so_rcv); bsp = &q->buf_state[q->cur_buf]; m->m_len = m->m_pkthdr.len = rcv_nxt - tp->rcv_nxt; + KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); m->m_ddp_gl = (unsigned char *)bsp->gl; m->m_flags |= M_DDP; m->m_cur_offset = bsp->cur_offset; @@ -2242,9 +2297,11 @@ if (!(bsp->flags & DDP_BF_NOFLIP)) q->cur_buf ^= 1; tp->t_rcvtime = ticks; - sbappendstream(&so->so_rcv, m); + SBAPPEND(&so->so_rcv, m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) - sorwakeup(so); + sorwakeup_locked(so); + else + SOCKBUF_UNLOCK(&so->so_rcv); return (1); } @@ -3799,6 +3856,7 @@ req = mtod(m, struct ulp_mem_io *); m->m_pkthdr.len = m->m_len = sizeof(*req) + PPOD_SIZE; req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_BYPASS)); + req->wr.wr_lo = 0; req->cmd_lock_addr = htonl(V_ULP_MEMIO_ADDR(ppod_addr >> 5) | V_ULPTX_CMD(ULP_MEM_WRITE)); req->len = htonl(V_ULP_MEMIO_DATA_LEN(PPOD_SIZE / 32) | @@ -3896,13 +3954,16 @@ struct cpl_get_tcb *getreq; struct ddp_state *p = &toep->tp_ddp_state; + SOCKBUF_LOCK_ASSERT(&toeptoso(toep)->so_rcv); wrlen = sizeof(*wr) + sizeof(*req) + 2 * sizeof(*lock) + sizeof(*getreq); m = m_gethdr_nofail(wrlen); m_set_priority(m, mkprio(CPL_PRIORITY_CONTROL, toep)); wr = mtod(m, struct work_request_hdr *); + bzero(wr, wrlen); + wr->wr_hi = htonl(V_WR_OP(FW_WROPCODE_BYPASS)); - m->m_pkthdr.len = m->m_len = sizeof(wrlen); + m->m_pkthdr.len = m->m_len = wrlen; lock = (struct cpl_barrier *)(wr + 1); mk_cpl_barrier_ulp(lock); @@ -3932,7 +3993,7 @@ /* Keep track of the number of oustanding CPL_GET_TCB requests */ p->get_tcb_count++; - + #ifdef T3_TRACE T3_TRACE1(TIDTB(so), "t3_cancel_ddpbuf: bufidx %u", bufidx); @@ -3967,17 +4028,19 @@ struct cpl_set_tcb_field *req; struct ddp_state *p = &toep->tp_ddp_state; + SOCKBUF_LOCK_ASSERT(&toeptoso(toep)->so_rcv); wrlen = sizeof(*wr) + 3 * sizeof(*req) + sizeof(*getreq); m = m_gethdr_nofail(wrlen); m_set_priority(m, mkprio(CPL_PRIORITY_CONTROL, toep)); wr = mtod(m, struct work_request_hdr *); m->m_pkthdr.len = m->m_len = wrlen; + bzero(wr, wrlen); + /* Set the ATOMIC flag to make sure that TP processes the following * CPLs in an atomic manner and no wire segments can be interleaved. */ wr->wr_hi = htonl(V_WR_OP(FW_WROPCODE_BYPASS) | F_WR_ATOMIC); - req = (struct cpl_set_tcb_field *)(wr + 1); mk_set_tcb_field_ulp(req, toep->tp_tid, W_TCB_RX_DDP_BUF0_TAG, V_TCB_RX_DDP_BUF0_TAG(M_TCB_RX_DDP_BUF0_TAG) | @@ -4038,12 +4101,15 @@ struct work_request_hdr *wr; struct cpl_set_tcb_field *req; + SOCKBUF_LOCK_ASSERT(&toeptoso(toep)->so_rcv); wrlen = sizeof(*wr) + sizeof(*req) + (len0 ? sizeof(*req) : 0) + (len1 ? sizeof(*req) : 0) + (modulate ? sizeof(struct cpl_rx_data_ack) : 0); m = m_gethdr_nofail(wrlen); m_set_priority(m, mkprio(CPL_PRIORITY_CONTROL, toep)); wr = mtod(m, struct work_request_hdr *); + bzero(wr, wrlen); + wr->wr_hi = htonl(V_WR_OP(FW_WROPCODE_BYPASS)); m->m_pkthdr.len = m->m_len = wrlen; @@ -4118,7 +4184,6 @@ tcphdr_skb->h.raw = tcphdr_skb->data; memset(tcphdr_skb->data, 0, tcphdr_skb->len); #endif - t3tom_register_cpl_handler(CPL_ACT_ESTABLISH, do_act_establish); t3tom_register_cpl_handler(CPL_ACT_OPEN_RPL, do_act_open_rpl); From owner-p4-projects@FreeBSD.ORG Thu Feb 7 04:37:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6D1E616A420; Thu, 7 Feb 2008 04:37:57 +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 1143816A418 for ; Thu, 7 Feb 2008 04:37:57 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DA0EE13C448 for ; Thu, 7 Feb 2008 04:37:56 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m174bupq002836 for ; Thu, 7 Feb 2008 04:37:56 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m174butB002833 for perforce@freebsd.org; Thu, 7 Feb 2008 04:37:56 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 04:37:56 GMT Message-Id: <200802070437.m174butB002833@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134955 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 04:37:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=134955 Change 134955 by kmacy@kmacy:storage:toehead on 2008/02/07 04:37:44 improve some of the cxgb_soreceive checks reduce debug noise Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#16 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#16 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c,v 1.3 2007/12/18 23:00:25 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c,v 1.4 2008/02/01 19:36:23 phk Exp $"); #include #include @@ -377,7 +377,8 @@ m0->m_flags = (M_EXT|M_NOFREE); m0->m_ext.ext_type = EXT_EXTREF; m0->m_ext.ext_free = cxgb_zero_copy_free; - m0->m_ext.ext_args = NULL; + m0->m_ext.ext_arg1 = NULL; /* XXX: probably wrong /phk */ + m0->m_ext.ext_arg2 = NULL; mv = mtomv(m0); mv->mv_count = seg_count; @@ -535,7 +536,6 @@ * sb->sb_mb->m_nextpkt which must be restored when the lead mbuf changes. * NOTE: 'nextrecord' may be NULL. */ -#if 1 static __inline void sockbuf_pushsync(struct sockbuf *sb, struct mbuf *nextrecord) { @@ -562,10 +562,10 @@ } else if (sb->sb_mb->m_nextpkt == NULL) sb->sb_lastrecord = sb->sb_mb; } -#endif #define IS_NONBLOCKING(so) ((so)->so_state & SS_NBIO) + static int t3_soreceive(struct socket *so, int *flagsp, struct uio *uio) { @@ -596,9 +596,10 @@ user_ddp_ok = p->ubuf_ddp_ready; p->cancel_ubuf = 0; - /* - * XXX check urgent - */ + while (m && m->m_len == 0) { + so->so_rcv.sb_mb = m_free(m); + m = so->so_rcv.sb_mb; + } if (m) goto got_mbuf; @@ -656,15 +657,17 @@ /* One shot at DDP if we already have enough data */ if (copied >= target) user_ddp_ok = 0; - printf("sbwaiting 1\n"); + + DPRINTF("sbwaiting 1\n"); if ((err = sbwait(&so->so_rcv)) != 0) goto done; //for timers to work await_ddp_completion(sk, flags, &timeo); } else if (copied >= target) goto done; else { - int i = 0; if (copied_unacked) { + int i = 0; + SOCKBUF_UNLOCK(&so->so_rcv); INP_LOCK(inp); t3_cleanup_rbuf(tp, copied_unacked); @@ -678,13 +681,16 @@ if (so->so_rcv.sb_mb) goto restart; - printf("sbwaiting 2 copied=%d target=%d avail=%d so=%p mb=%p cc=%d\n", copied, target, avail, so, + DPRINTF("sbwaiting 2 copied=%d target=%d avail=%d so=%p mb=%p cc=%d\n", copied, target, avail, so, so->so_rcv.sb_mb, so->so_rcv.sb_cc); if ((err = sbwait(&so->so_rcv)) != 0) goto done; } goto restart; got_mbuf: + KASSERT(((m->m_flags & M_EXT) && (m->m_ext.ext_type == EXT_EXTREF)) || !(m->m_flags & M_EXT), ("unexpected type M_EXT=%d ext_type=%d m_len=%d m_pktlen=%d\n", !!(m->m_flags & M_EXT), m->m_ext.ext_type, m->m_len, m->m_pkthdr.len)); + KASSERT(m->m_next != (struct mbuf *)0xffffffff, ("bad next value m_next=%p m_nextpkt=%p m_flags=0x%x m->m_len=%d", + m->m_next, m->m_nextpkt, m->m_flags, m->m_len)); if (m->m_pkthdr.len == 0) { if ((m->m_ddp_flags & DDP_BF_NOCOPY) == 0) panic("empty mbuf and NOCOPY not set\n"); @@ -789,9 +795,10 @@ */ if (avail + offset >= m->m_pkthdr.len) { unsigned int fl = m->m_ddp_flags; - int exitnow, count, got_psh = 0, nomoredata = 0; + int exitnow, got_psh = 0, nomoredata = 0; + int count; struct mbuf *nextrecord; - + if (p->kbuf[0] != NULL && is_ddp(m) && (fl & 1)) { if (is_ddp_psh(m) && user_ddp_pending) got_psh = 1; @@ -809,15 +816,17 @@ nextrecord = m->m_nextpkt; count = m->m_pkthdr.len; - while (count) { + while (count > 0) { count -= m->m_len; + KASSERT(((m->m_flags & M_EXT) && (m->m_ext.ext_type == EXT_EXTREF)) || !(m->m_flags & M_EXT), ("unexpected type M_EXT=%d ext_type=%d m_len=%d\n", !!(m->m_flags & M_EXT), m->m_ext.ext_type, m->m_len)); sbfree(&so->so_rcv, m); so->so_rcv.sb_mb = m_free(m); - m = so->so_rcv.sb_mb; + m = so->so_rcv.sb_mb; } sockbuf_pushsync(&so->so_rcv, nextrecord); - - +#if 0 + sbdrop_locked(&so->so_rcv, m->m_pkthdr.len); +#endif exitnow = got_psh || nomoredata; if ((so->so_rcv.sb_mb == NULL) && exitnow) { printf("exiting\n"); @@ -916,8 +925,7 @@ */ if ((tp->t_flags & TF_TOE) && ((flags & (MSG_WAITALL|MSG_OOB|MSG_PEEK|MSG_DONTWAIT)) == 0) - && (uio->uio_iovcnt == 1) && - ((so->so_rcv.sb_state & SBS_CANTRCVMORE) == 0) && (mp0 == NULL)) { + && (uio->uio_iovcnt == 1) && (mp0 == NULL)) { tdev = TOE_DEV(so); zcopy_thres = TOM_TUNABLE(tdev, ddp_thres); zcopy_enabled = TOM_TUNABLE(tdev, ddp); @@ -927,9 +935,12 @@ rv = t3_soreceive(so, flagsp, uio); if (rv != EAGAIN) return (rv); + else + printf("returned EAGAIN\n"); } } else if (tp->t_flags & TF_TOE) - printf("skipping t3_soreceive\n"); + printf("skipping t3_soreceive flags=0x%x iovcnt=%d mp0=%p sb_state=0x%x\n", + flags, uio->uio_iovcnt, mp0, so->so_rcv.sb_state); return pru_soreceive(so, psa, uio, mp0, controlp, flagsp); } From owner-p4-projects@FreeBSD.ORG Thu Feb 7 04:38:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BC1A016A41B; Thu, 7 Feb 2008 04:38:58 +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 68F1216A417 for ; Thu, 7 Feb 2008 04:38:58 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 48CB213C45B for ; Thu, 7 Feb 2008 04:38:58 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m174cwKS002930 for ; Thu, 7 Feb 2008 04:38:58 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m174cw9X002927 for perforce@freebsd.org; Thu, 7 Feb 2008 04:38:58 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 04:38:58 GMT Message-Id: <200802070438.m174cw9X002927@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134957 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 04:38:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=134957 Change 134957 by kmacy@kmacy:storage:toehead on 2008/02/07 04:38:26 improve formatting Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/common/cxgb_t3_hw.c#3 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/common/cxgb_t3_hw.c#3 (text+ko) ==== @@ -1084,9 +1084,11 @@ { int ret = 0; - if (t3_read_reg(adap, A_CIM_HOST_ACC_CTRL) & F_HOSTBUSY) + if (t3_read_reg(adap, A_CIM_HOST_ACC_CTRL) & F_HOSTBUSY) { + printf("host busy\n"); return -EBUSY; - + } + for ( ; !ret && n--; addr += 4) { t3_write_reg(adap, A_CIM_HOST_ACC_CTRL, CIM_CTL_BASE + addr); ret = t3_wait_op_done(adap, A_CIM_HOST_ACC_CTRL, F_HOSTBUSY, @@ -1538,8 +1540,8 @@ if (cause & F_CE) { mc7->stats.corr_err++; - CH_WARN(adapter, "%s MC7 correctable error at addr 0x%x, " - "data 0x%x 0x%x 0x%x\n", mc7->name, + CH_WARN(adapter, "%s MC7 correctable error at addr 0x%08x, " + "data 0x%08x 0x%08x 0x%08x\n", mc7->name, t3_read_reg(adapter, mc7->offset + A_MC7_CE_ADDR), t3_read_reg(adapter, mc7->offset + A_MC7_CE_DATA0), t3_read_reg(adapter, mc7->offset + A_MC7_CE_DATA1), @@ -1548,8 +1550,8 @@ if (cause & F_UE) { mc7->stats.uncorr_err++; - CH_ALERT(adapter, "%s MC7 uncorrectable error at addr 0x%x, " - "data 0x%x 0x%x 0x%x\n", mc7->name, + CH_ALERT(adapter, "%s MC7 uncorrectable error at addr 0x%08x, " + "data 0x%08x 0x%08x 0x%08x\n", mc7->name, t3_read_reg(adapter, mc7->offset + A_MC7_UE_ADDR), t3_read_reg(adapter, mc7->offset + A_MC7_UE_DATA0), t3_read_reg(adapter, mc7->offset + A_MC7_UE_DATA1), @@ -1569,7 +1571,7 @@ addr = t3_read_reg(adapter, mc7->offset + A_MC7_ERR_ADDR); mc7->stats.addr_err++; - CH_ALERT(adapter, "%s MC7 address error: 0x%x\n", + CH_ALERT(adapter, "%s MC7 address error: 0x%08x\n", mc7->name, addr); } From owner-p4-projects@FreeBSD.ORG Thu Feb 7 04:40:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 344A516A46B; Thu, 7 Feb 2008 04:40:00 +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 D5B2616A420 for ; Thu, 7 Feb 2008 04:39:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9DF1313C469 for ; Thu, 7 Feb 2008 04:39:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m174dxfW002995 for ; Thu, 7 Feb 2008 04:39:59 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m174dx7L002992 for perforce@freebsd.org; Thu, 7 Feb 2008 04:39:59 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 04:39:59 GMT Message-Id: <200802070439.m174dx7L002992@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134958 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 04:40:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=134958 Change 134958 by kmacy@kmacy:storage:toehead on 2008/02/07 04:39:25 add ioctl code for fetching TCB Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/cxgb_ioctl.h#2 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_ioctl.h#2 (text+ko) ==== @@ -260,4 +260,6 @@ #define CHELSIO_SET_FILTER _IOW('f', CH_SET_FILTER, struct ch_filter) #define CHELSIO_DEL_FILTER _IOW('f', CH_DEL_FILTER, struct ch_filter) #define CHELSIO_DEVUP _IO('f', CH_DEVUP) + +#define CHELSIO_GET_TCB _IOWR('f', CH_GET_TCB, struct ch_tcb) #endif From owner-p4-projects@FreeBSD.ORG Thu Feb 7 05:05:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D0A4016A4AC; Thu, 7 Feb 2008 05:05:33 +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 7A92E16A480 for ; Thu, 7 Feb 2008 05:05:33 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 44D5A13C4DB for ; Thu, 7 Feb 2008 05:05:33 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1755XCL014130 for ; Thu, 7 Feb 2008 05:05:33 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1755NA8014123 for perforce@freebsd.org; Thu, 7 Feb 2008 05:05:23 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 05:05:23 GMT Message-Id: <200802070505.m1755NA8014123@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134959 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 05:05:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=134959 Change 134959 by kmacy@kmacy:entropy:iwarp on 2008/02/07 05:04:22 IFC 134958 Affected files ... .. //depot/projects/iwarp/Makefile#4 integrate .. //depot/projects/iwarp/Makefile.inc1#6 integrate .. //depot/projects/iwarp/ObsoleteFiles.inc#8 integrate .. //depot/projects/iwarp/contrib/binutils/libiberty/cp-demangle.c#2 integrate .. //depot/projects/iwarp/contrib/file/FREEBSD-upgrade#2 integrate .. //depot/projects/iwarp/contrib/file/Magdir/bFLT#2 delete .. //depot/projects/iwarp/contrib/file/Magdir/chi#2 delete .. //depot/projects/iwarp/contrib/file/Magdir/cvs#2 delete .. //depot/projects/iwarp/contrib/file/Magdir/hdf#2 delete .. //depot/projects/iwarp/contrib/file/Magdir/impulse#2 delete .. //depot/projects/iwarp/contrib/file/Magdir/wordperfect#2 delete .. //depot/projects/iwarp/contrib/file/acconfig.h#2 delete .. //depot/projects/iwarp/contrib/file/magic.c#3 integrate .. //depot/projects/iwarp/contrib/file/missing#2 delete .. //depot/projects/iwarp/contrib/file/stamp-h.in#2 delete .. //depot/projects/iwarp/contrib/libiberty/cp-demangle.c#2 delete .. //depot/projects/iwarp/contrib/openpam/FREEBSD-vendor#1 branch .. //depot/projects/iwarp/contrib/openpam/include/security/openpam_version.h#3 integrate .. //depot/projects/iwarp/crypto/openssh/FREEBSD-Xlist#2 integrate .. //depot/projects/iwarp/crypto/openssh/FREEBSD-upgrade#2 integrate .. //depot/projects/iwarp/crypto/openssh/FREEBSD-vendor#1 branch .. //depot/projects/iwarp/etc/periodic/security/100.chksetuid#3 integrate .. //depot/projects/iwarp/etc/rc.d/dhclient#3 integrate .. //depot/projects/iwarp/gnu/usr.bin/gdb/kgdb/kgdb.h#4 integrate .. //depot/projects/iwarp/gnu/usr.bin/gdb/kgdb/kld.c#2 integrate .. //depot/projects/iwarp/gnu/usr.bin/gdb/kgdb/main.c#3 integrate .. //depot/projects/iwarp/gnu/usr.bin/gdb/kgdb/trgt.c#3 integrate .. //depot/projects/iwarp/include/pthread_np.h#4 integrate .. //depot/projects/iwarp/lib/libarchive/archive_read_support_format_tar.c#4 integrate .. //depot/projects/iwarp/lib/libarchive/archive_write_set_format_ar.c#3 integrate .. //depot/projects/iwarp/lib/libarchive/test/Makefile#3 integrate .. //depot/projects/iwarp/lib/libarchive/test/test_compat_tar_hardlink.c#1 branch .. //depot/projects/iwarp/lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu#1 branch .. //depot/projects/iwarp/lib/libc/include/namespace.h#2 integrate .. //depot/projects/iwarp/lib/libc/include/un-namespace.h#2 integrate .. //depot/projects/iwarp/lib/libc/net/getaddrinfo.c#2 integrate .. //depot/projects/iwarp/lib/libc/stdlib/malloc.3#4 integrate .. //depot/projects/iwarp/lib/libc/stdlib/malloc.c#5 integrate .. //depot/projects/iwarp/lib/libc/sys/extattr_get_file.2#2 integrate .. //depot/projects/iwarp/lib/libc/sys/sendfile.2#2 integrate .. //depot/projects/iwarp/lib/libdevstat/devstat.h#2 integrate .. //depot/projects/iwarp/lib/libelf/gelf_fsize.3#2 integrate .. //depot/projects/iwarp/lib/libfetch/http.c#3 integrate .. //depot/projects/iwarp/lib/libkse/Makefile#3 integrate .. //depot/projects/iwarp/lib/libkse/kse.map#3 integrate .. //depot/projects/iwarp/lib/libkse/sys/lock.c#3 integrate .. //depot/projects/iwarp/lib/libkse/thread/thr_mutex.c#5 integrate .. //depot/projects/iwarp/lib/libpmc/pmc.3#3 integrate .. //depot/projects/iwarp/lib/librpcsvc/Makefile#2 integrate .. //depot/projects/iwarp/lib/librpcsvc/xcrypt.c#2 integrate .. //depot/projects/iwarp/lib/libthr/Makefile#4 integrate .. //depot/projects/iwarp/lib/libthr/pthread.map#5 integrate .. //depot/projects/iwarp/lib/libthr/thread/thr_mutex.c#5 integrate .. //depot/projects/iwarp/lib/msun/ld128/s_exp2l.c#2 integrate .. //depot/projects/iwarp/lib/msun/ld80/s_exp2l.c#2 integrate .. //depot/projects/iwarp/lib/msun/src/e_exp.c#2 integrate .. //depot/projects/iwarp/lib/msun/src/e_expf.c#3 integrate .. //depot/projects/iwarp/lib/msun/src/s_exp2.c#3 integrate .. //depot/projects/iwarp/lib/msun/src/s_exp2f.c#3 integrate .. //depot/projects/iwarp/release/doc/en_US.ISO8859-1/hardware/article.sgml#4 integrate .. //depot/projects/iwarp/release/doc/share/misc/dev.archlist.txt#4 integrate .. //depot/projects/iwarp/release/fixit.profile#4 integrate .. //depot/projects/iwarp/sbin/fsck_msdosfs/boot.c#3 integrate .. //depot/projects/iwarp/sbin/fsck_msdosfs/fat.c#2 integrate .. //depot/projects/iwarp/sbin/geom/core/geom.8#2 integrate .. //depot/projects/iwarp/sbin/geom/core/geom.c#3 integrate .. //depot/projects/iwarp/sbin/gpt/gpt.8#3 integrate .. //depot/projects/iwarp/sbin/gpt/gpt.c#4 integrate .. //depot/projects/iwarp/sbin/gpt/migrate.c#2 integrate .. //depot/projects/iwarp/sbin/gpt/show.c#3 integrate .. //depot/projects/iwarp/sbin/ifconfig/ifieee80211.c#3 integrate .. //depot/projects/iwarp/sbin/iscontrol/misc.c#2 integrate .. //depot/projects/iwarp/sbin/mount/mount.c#2 integrate .. //depot/projects/iwarp/sbin/natd/natd.8#4 integrate .. //depot/projects/iwarp/share/colldef/el_GR.ISO8859-7.src#2 integrate .. //depot/projects/iwarp/share/man/man4/Makefile#7 integrate .. //depot/projects/iwarp/share/man/man4/atkbd.4#2 integrate .. //depot/projects/iwarp/share/man/man4/hptiop.4#2 integrate .. //depot/projects/iwarp/share/man/man4/hptrr.4#2 integrate .. //depot/projects/iwarp/share/man/man4/rr232x.4#2 delete .. //depot/projects/iwarp/share/man/man9/lock.9#3 integrate .. //depot/projects/iwarp/share/man/man9/mbuf.9#2 integrate .. //depot/projects/iwarp/share/misc/committers-src.dot#4 integrate .. //depot/projects/iwarp/share/mk/bsd.dep.mk#2 integrate .. //depot/projects/iwarp/share/msgdef/Makefile#2 integrate .. //depot/projects/iwarp/share/msgdef/ko_KR.UTF-8.src#1 branch .. //depot/projects/iwarp/share/msgdef/ko_KR.eucKR.src#2 integrate .. //depot/projects/iwarp/sys/amd64/acpica/madt.c#2 integrate .. //depot/projects/iwarp/sys/amd64/amd64/identcpu.c#3 integrate .. //depot/projects/iwarp/sys/amd64/conf/GENERIC#8 integrate .. //depot/projects/iwarp/sys/amd64/conf/NOTES#6 integrate .. //depot/projects/iwarp/sys/amd64/include/proc.h#2 integrate .. //depot/projects/iwarp/sys/amd64/include/specialreg.h#3 integrate .. //depot/projects/iwarp/sys/arm/arm/genassym.c#2 integrate .. //depot/projects/iwarp/sys/arm/arm/locore.S#2 integrate .. //depot/projects/iwarp/sys/arm/arm/pmap.c#8 integrate .. //depot/projects/iwarp/sys/arm/arm/swtch.S#2 integrate .. //depot/projects/iwarp/sys/arm/include/asmacros.h#3 integrate .. //depot/projects/iwarp/sys/arm/include/atomic.h#3 integrate .. //depot/projects/iwarp/sys/arm/include/pmap.h#2 integrate .. //depot/projects/iwarp/sys/arm/include/sysarch.h#2 integrate .. //depot/projects/iwarp/sys/boot/ofw/libofw/ofw_console.c#2 integrate .. //depot/projects/iwarp/sys/compat/ndis/kern_ndis.c#2 integrate .. //depot/projects/iwarp/sys/conf/Makefile.arm#2 integrate .. //depot/projects/iwarp/sys/conf/files.amd64#7 integrate .. //depot/projects/iwarp/sys/conf/files.i386#8 integrate .. //depot/projects/iwarp/sys/conf/files.powerpc#5 integrate .. //depot/projects/iwarp/sys/conf/kern.post.mk#2 integrate .. //depot/projects/iwarp/sys/conf/kern.pre.mk#2 integrate .. //depot/projects/iwarp/sys/ddb/db_textdump.c#2 integrate .. //depot/projects/iwarp/sys/dev/amr/amrreg.h#3 integrate .. //depot/projects/iwarp/sys/dev/cxgb/common/cxgb_t3_hw.c#4 integrate .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_adapter.h#12 integrate .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_ioctl.h#2 integrate .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_l2t.c#8 integrate .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#14 integrate .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_multiq.c#7 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#16 integrate .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_sge.c#12 integrate .. //depot/projects/iwarp/sys/dev/cxgb/sys/mvec.h#7 integrate .. //depot/projects/iwarp/sys/dev/cxgb/sys/uipc_mvec.c#5 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#9 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#8 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c#6 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.h#4 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c#4 integrate .. //depot/projects/iwarp/sys/dev/hatm/if_hatm_intr.c#2 integrate .. //depot/projects/iwarp/sys/dev/hptiop/hptiop.c#2 integrate .. //depot/projects/iwarp/sys/dev/hptiop/hptiop.h#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/array.h#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/him.h#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/himfuncs.h#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/hptintf.h#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/hptrr_config.c#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/hptrr_config.h#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/hptrr_os_bsd.c#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/hptrr_osm_bsd.c#3 integrate .. //depot/projects/iwarp/sys/dev/hptrr/i386-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/ldm.h#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/list.h#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/os_bsd.h#2 integrate .. //depot/projects/iwarp/sys/dev/hptrr/osm.h#2 integrate .. //depot/projects/iwarp/sys/dev/iscsi/initiator/isc_soc.c#3 integrate .. //depot/projects/iwarp/sys/dev/lge/if_lge.c#3 integrate .. //depot/projects/iwarp/sys/dev/mfi/mfi.c#3 integrate .. //depot/projects/iwarp/sys/dev/mfi/mfireg.h#2 integrate .. //depot/projects/iwarp/sys/dev/msk/if_msk.c#5 integrate .. //depot/projects/iwarp/sys/dev/nfe/if_nfe.c#6 integrate .. //depot/projects/iwarp/sys/dev/patm/if_patm_rx.c#2 integrate .. //depot/projects/iwarp/sys/dev/pci/pci.c#3 integrate .. //depot/projects/iwarp/sys/dev/ral/rt2560.c#3 integrate .. //depot/projects/iwarp/sys/dev/ral/rt2560reg.h#2 integrate .. //depot/projects/iwarp/sys/dev/ral/rt2560var.h#2 integrate .. //depot/projects/iwarp/sys/dev/rr232x/LICENSE#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/README#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/amd64-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/array.h#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/him.h#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/himfuncs.h#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/hptintf.h#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/i386-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/ldm.h#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/list.h#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/os_bsd.c#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/os_bsd.h#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/osm.h#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/osm_bsd.c#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/rr232x_config.c#2 delete .. //depot/projects/iwarp/sys/dev/rr232x/rr232x_config.h#2 delete .. //depot/projects/iwarp/sys/dev/sk/if_sk.c#3 integrate .. //depot/projects/iwarp/sys/dev/ti/if_ti.c#3 integrate .. //depot/projects/iwarp/sys/dev/wpi/if_wpi.c#5 integrate .. //depot/projects/iwarp/sys/i386/acpica/madt.c#2 integrate .. //depot/projects/iwarp/sys/i386/conf/GENERIC#6 integrate .. //depot/projects/iwarp/sys/i386/conf/NOTES#6 integrate .. //depot/projects/iwarp/sys/i386/include/proc.h#2 integrate .. //depot/projects/iwarp/sys/ia64/ia64/locore.S#2 integrate .. //depot/projects/iwarp/sys/ia64/ia64/machdep.c#5 integrate .. //depot/projects/iwarp/sys/ia64/include/md_var.h#2 integrate .. //depot/projects/iwarp/sys/kern/kern_lock.c#5 integrate .. //depot/projects/iwarp/sys/kern/kern_mbuf.c#4 integrate .. //depot/projects/iwarp/sys/kern/kern_rwlock.c#6 integrate .. //depot/projects/iwarp/sys/kern/kern_timeout.c#3 integrate .. //depot/projects/iwarp/sys/kern/subr_lock.c#5 integrate .. //depot/projects/iwarp/sys/kern/subr_turnstile.c#3 integrate .. //depot/projects/iwarp/sys/kern/uipc_cow.c#2 integrate .. //depot/projects/iwarp/sys/kern/uipc_mbuf.c#3 integrate .. //depot/projects/iwarp/sys/kern/uipc_sockbuf.c#4 integrate .. //depot/projects/iwarp/sys/kern/uipc_socket.c#3 integrate .. //depot/projects/iwarp/sys/kern/uipc_syscalls.c#4 integrate .. //depot/projects/iwarp/sys/kern/vfs_aio.c#5 integrate .. //depot/projects/iwarp/sys/modules/Makefile#6 integrate .. //depot/projects/iwarp/sys/modules/cxgb/cxgb/Makefile#6 integrate .. //depot/projects/iwarp/sys/modules/rr232x/Makefile#2 delete .. //depot/projects/iwarp/sys/net/bpf.c#4 integrate .. //depot/projects/iwarp/sys/net80211/ieee80211_ht.c#4 integrate .. //depot/projects/iwarp/sys/net80211/ieee80211_ht.h#3 integrate .. //depot/projects/iwarp/sys/net80211/ieee80211_input.c#3 integrate .. //depot/projects/iwarp/sys/netgraph/netflow/ng_netflow.c#3 integrate .. //depot/projects/iwarp/sys/netgraph/netgraph.h#4 integrate .. //depot/projects/iwarp/sys/netgraph/ng_base.c#6 integrate .. //depot/projects/iwarp/sys/netgraph/ng_bpf.c#3 integrate .. //depot/projects/iwarp/sys/netgraph/ng_iface.c#2 integrate .. //depot/projects/iwarp/sys/netgraph/ng_ppp.c#3 integrate .. //depot/projects/iwarp/sys/netgraph/ng_pppoe.c#3 integrate .. //depot/projects/iwarp/sys/netgraph/ng_tee.c#2 integrate .. //depot/projects/iwarp/sys/netinet/if_ether.c#9 integrate .. //depot/projects/iwarp/sys/netinet/ip_id.c#2 integrate .. //depot/projects/iwarp/sys/netinet/ip_output.c#3 integrate .. //depot/projects/iwarp/sys/netinet/sctp_input.c#3 integrate .. //depot/projects/iwarp/sys/netinet/sctp_peeloff.c#2 integrate .. //depot/projects/iwarp/sys/netinet/sctputil.c#5 integrate .. //depot/projects/iwarp/sys/netinet6/ip6_output.c#5 integrate .. //depot/projects/iwarp/sys/netipsec/ipsec.c#3 integrate .. //depot/projects/iwarp/sys/netipsec/ipsec.h#3 integrate .. //depot/projects/iwarp/sys/netipsec/ipsec6.h#2 integrate .. //depot/projects/iwarp/sys/pci/if_wb.c#2 integrate .. //depot/projects/iwarp/sys/sys/lockmgr.h#4 integrate .. //depot/projects/iwarp/sys/sys/mbuf.h#3 integrate .. //depot/projects/iwarp/sys/sys/param.h#8 integrate .. //depot/projects/iwarp/sys/sys/proc.h#8 integrate .. //depot/projects/iwarp/sys/sys/rwlock.h#2 integrate .. //depot/projects/iwarp/sys/sys/socket.h#4 integrate .. //depot/projects/iwarp/sys/sys/socketvar.h#4 integrate .. //depot/projects/iwarp/sys/tools/embed_mfs.sh#1 branch .. //depot/projects/iwarp/tools/regression/netinet/ip_id_period/ip_id_period.py#1 branch .. //depot/projects/iwarp/tools/regression/pthread/mutex_isowned_np/Makefile#1 branch .. //depot/projects/iwarp/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c#1 branch .. //depot/projects/iwarp/tools/regression/sockets/unix_sorflush/Makefile#1 branch .. //depot/projects/iwarp/tools/regression/sockets/unix_sorflush/unix_sorflush.c#1 branch .. //depot/projects/iwarp/tools/tools/crypto/cryptostats.c#2 integrate .. //depot/projects/iwarp/tools/tools/crypto/cryptotest.c#2 integrate .. //depot/projects/iwarp/usr.bin/calendar/calendars/calendar.freebsd#5 integrate .. //depot/projects/iwarp/usr.bin/file/Makefile#2 integrate .. //depot/projects/iwarp/usr.bin/file/file.1#2 delete .. //depot/projects/iwarp/usr.bin/file/magic.5#2 delete .. //depot/projects/iwarp/usr.bin/kdump/Makefile#2 integrate .. //depot/projects/iwarp/usr.bin/kdump/mkioctls#2 integrate .. //depot/projects/iwarp/usr.bin/kdump/mksubr#2 integrate .. //depot/projects/iwarp/usr.bin/logger/logger.c#2 integrate .. //depot/projects/iwarp/usr.bin/truss/Makefile#2 integrate .. //depot/projects/iwarp/usr.sbin/Makefile#4 integrate .. //depot/projects/iwarp/usr.sbin/bootparamd/bootparamd/bootparamd.c#3 integrate .. //depot/projects/iwarp/usr.sbin/bootparamd/bootparamd/main.c#3 integrate .. //depot/projects/iwarp/usr.sbin/kbdcontrol/kbdcontrol.1#2 integrate .. //depot/projects/iwarp/usr.sbin/kbdcontrol/kbdmap.5#2 integrate .. //depot/projects/iwarp/usr.sbin/newsyslog/newsyslog.c#2 integrate .. //depot/projects/iwarp/usr.sbin/ofwdump/Makefile#2 integrate .. //depot/projects/iwarp/usr.sbin/ofwdump/ofwdump.8#2 integrate .. //depot/projects/iwarp/usr.sbin/setfmac/setfmac.c#3 integrate .. //depot/projects/iwarp/usr.sbin/sysinstall/disks.c#2 integrate .. //depot/projects/iwarp/usr.sbin/watch/watch.c#2 integrate .. //depot/projects/iwarp/usr.sbin/ypserv/yp_main.c#2 integrate .. //depot/projects/iwarp/usr.sbin/ypserv/ypserv.8#2 integrate Differences ... ==== //depot/projects/iwarp/Makefile#4 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile,v 1.344 2007/12/13 00:08:02 imp Exp $ +# $FreeBSD: src/Makefile,v 1.345 2008/01/30 19:33:18 jhb Exp $ # # The user-driven targets are: # @@ -75,6 +75,8 @@ # developer convenience only. They are intentionally not documented and # completely subject to change without notice. # +# For more information, see the build(7) manual page. +# TGTS= all all-man buildenv buildenvvars buildkernel buildworld \ check-old check-old-dirs check-old-files check-old-libs \ checkdpadd clean cleandepend cleandir \ ==== //depot/projects/iwarp/Makefile.inc1#6 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.596 2008/01/23 22:21:36 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.598 2008/02/05 15:41:58 des Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -313,8 +313,9 @@ .endif .else rm -rf ${WORLDTMP}/legacy/usr/include -# XXX - These two can depend on any header file. +# XXX - These three can depend on any header file. rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c + rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ ==== //depot/projects/iwarp/ObsoleteFiles.inc#8 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.127 2008/01/26 20:23:25 brueffer Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.130 2008/02/06 19:45:25 delphij Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -3945,7 +3945,9 @@ .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz .endif +.if ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "sparc64" OLD_FILES+=usr/share/man/man8/ofwdump.8.gz +.endif OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz OLD_FILES+=usr/share/man/man9/VFS_START.9.gz OLD_FILES+=usr/share/man/man9/cpu_critical_exit.9.gz ==== //depot/projects/iwarp/contrib/binutils/libiberty/cp-demangle.c#2 (text+ko) ==== @@ -2396,6 +2396,8 @@ const char *s; type = cplus_demangle_type (di); + if (type == NULL) + return NULL; /* If we have a type we know how to print, we aren't going to print the type name itself. */ ==== //depot/projects/iwarp/contrib/file/FREEBSD-upgrade#2 (text+ko) ==== @@ -1,5 +1,5 @@ # ex:ts=8 -$FreeBSD: src/contrib/file/FREEBSD-upgrade,v 1.7 2007/05/24 22:02:49 obrien Exp $ +$FreeBSD: src/contrib/file/FREEBSD-upgrade,v 1.8 2008/01/30 02:48:24 obrien Exp $ Christos Zoulas `file' originals can be found at: ftp://ftp.astron.com/pub/file/ @@ -17,14 +17,14 @@ rm -f missing depcomp rm -f config.{guess,sub} - cvs import -m "Virgin import of Christos Zoulas's FILE 4.21." \ - src/contrib/file ZOULAS file_4_21 + cvs import -m "Virgin import of Christos Zoulas's FILE 4.23." \ + src/contrib/file ZOULAS file_4_23 Never make local changes to ZOULAS `file'. Christos is very willing to work with us to meet our FreeBSD needs. Thus submit any desired changes to him and wait for the next release and vendor import to get them. - + obrien@NUXI.com 15-Sept-2002 ==== //depot/projects/iwarp/contrib/file/magic.c#3 (text+ko) ==== @@ -218,6 +218,7 @@ */ #ifdef HAVE_UTIMES struct timeval utsbuf[2]; + memset(utsbuf, 0, sizeof(struct timeval) * 2); utsbuf[0].tv_sec = sb->st_atime; utsbuf[1].tv_sec = sb->st_mtime; @@ -225,6 +226,7 @@ #elif defined(HAVE_UTIME_H) || defined(HAVE_SYS_UTIME_H) struct utimbuf utbuf; + memset(&utbuf, 0, sizeof(struct utimbuf)); utbuf.actime = sb->st_atime; utbuf.modtime = sb->st_mtime; (void) utime(name, &utbuf); /* don't care if loses */ ==== //depot/projects/iwarp/contrib/openpam/include/security/openpam_version.h#3 (text) ==== @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: openpam_version.h 409 2007-12-21 11:38:50Z des $ + * $Id: openpam_version.h 412 2008-01-29 19:31:46Z des $ */ #ifndef SECURITY_OPENPAM_VERSION_H_INCLUDED @@ -42,4 +42,7 @@ #define OPENPAM_VERSION 20071221 #define OPENPAM_RELEASE "Hydrangea" +/* violates reserved namespace, but can't be removed for legacy reasons */ +#define _OPENPAM + #endif /* !SECURITY_OPENPAM_VERSION_H_INCLUDED */ ==== //depot/projects/iwarp/crypto/openssh/FREEBSD-Xlist#2 (text+ko) ==== @@ -1,10 +1,9 @@ -$FreeBSD: src/crypto/openssh/FREEBSD-Xlist,v 1.3 2004/02/26 10:37:34 des Exp $ +$FreeBSD: src/crypto/openssh/FREEBSD-Xlist,v 1.4 2008/02/06 23:14:24 des Exp $ *.0 */.cvsignore -.cvsignore -autom4te* -config.h.in -configure -contrib -regress/*.[0-9] -stamp-h.in +*autom4te* +*config.h.in +*configure +*contrib +*regress/*.[0-9] +*stamp-h.in ==== //depot/projects/iwarp/crypto/openssh/FREEBSD-upgrade#2 (text+ko) ==== @@ -12,12 +12,12 @@ 2) Unpack the tarball in a suitable directory. + $ tar xf openssh-X.YpZ.tar.gz \ + -X /usr/src/crypto/openssh/FREEBSD-Xlist + 3) Remove trash: - $ sh -c 'while read glob ; do rm -rvf $glob ; done' \ - -__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kld.c,v 1.3 2008/01/28 21:45:09 jhb Exp $"); +__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kld.c,v 1.6 2008/01/29 23:44:34 jhb Exp $"); #include #include +#include +#include #include -#include #include +#include +#include +#include #include #include #include #include #include +#include #include "kgdb.h" -/* - * TODO - * - * - Use 'target_read_memory()' instead of kvm_read(). - * - Hook into the solib stuff perhaps? - */ +struct lm_info { + CORE_ADDR base_address; +}; /* Offsets of fields in linker_file structure. */ static CORE_ADDR off_address, off_filename, off_pathname, off_next; +/* KVA of 'linker_path' which corresponds to the kern.module_path sysctl .*/ +static CORE_ADDR module_path_addr; + +static struct target_so_ops kld_so_ops; + static int kld_ok (char *path) { @@ -68,7 +75,6 @@ * - filename (e.g. foo.ko) */ static const char *kld_suffixes[] = { - ".symbols", ".debug", "", NULL @@ -102,7 +108,6 @@ static int find_kld_path (char *filename, char *path, size_t path_size) { - CORE_ADDR module_path_addr; char *module_path; char *kernel_dir, *module_dir, *cp; int error; @@ -113,7 +118,6 @@ if (check_kld_path(path, path_size)) return (1); } - module_path_addr = kgdb_parse("linker_path"); if (module_path_addr != 0) { target_read_string(module_path_addr, &module_path, PATH_MAX, &error); @@ -137,25 +141,12 @@ static CORE_ADDR read_pointer (CORE_ADDR address) { - union { - uint32_t d32; - uint64_t d64; - } val; + CORE_ADDR value; - switch (TARGET_PTR_BIT) { - case 32: - if (kvm_read(kvm, address, &val.d32, sizeof(val.d32)) != - sizeof(val.d32)) - return (0); - return (val.d32); - case 64: - if (kvm_read(kvm, address, &val.d64, sizeof(val.d64)) != - sizeof(val.d64)) - return (0); - return (val.d64); - default: - return (0); - } + if (target_read_memory(address, (char *)&value, TARGET_PTR_BIT / 8) != + 0) + return (0); + return (extract_unsigned_integer(&value, TARGET_PTR_BIT / 8)); } /* @@ -303,78 +294,159 @@ } static void -dummy_cleanup (void *arg) +kld_relocate_section_addresses (struct so_list *so, struct section_table *sec) +{ + + sec->addr += so->lm_info->base_address; + sec->endaddr += so->lm_info->base_address; +} + +static void +kld_free_so (struct so_list *so) +{ + + xfree(so->lm_info); +} + +static void +kld_clear_solib (void) +{ +} + +static void +kld_solib_create_inferior_hook (void) { } static void -load_single_kld (CORE_ADDR kld) +kld_special_symbol_handling (void) +{ +} + +static struct so_list * +kld_current_sos (void) { - CORE_ADDR address; - char kldpath[PATH_MAX]; - char *path, *filename; - int errcode, path_ok; + struct so_list *head, **prev, *new; + CORE_ADDR kld, kernel; + char *path; + int error; + + prev = &head; + + /* + * Walk the list of linker files creating so_list entries for + * each non-kernel file. + */ + kernel = kgdb_parse("linker_kernel_file"); + for (kld = kgdb_parse("linker_files.tqh_first"); kld != 0; + kld = read_pointer(kld + off_next)) { + /* Skip the main kernel file. */ + if (kld == kernel) + continue; + + new = xmalloc(sizeof(*new)); + memset(new, 0, sizeof(*new)); - /* Try to read this linker file's filename. */ - target_read_string(read_pointer(kld + off_filename), &filename, - PATH_MAX, &errcode); - if (errcode) - error("Unable to read kld filename"); + new->lm_info = xmalloc(sizeof(*new->lm_info)); + new->lm_info->base_address = 0; - make_cleanup(xfree, filename); - path_ok = 0; + /* Read the base filename and store it in so_original_name. */ + target_read_string(read_pointer(kld + off_filename), + &path, sizeof(new->so_original_name), &error); + if (error != 0) { + warning("kld_current_sos: Can't read filename: %s\n", + safe_strerror(error)); + free_so(new); + continue; + } + strlcpy(new->so_original_name, path, + sizeof(new->so_original_name)); + xfree(path); - /* Try to read this linker file's pathname. */ - if (off_pathname != 0) { - target_read_string(read_pointer(kld + off_pathname), &path, - PATH_MAX, &errcode); - if (errcode == 0) { - make_cleanup(xfree, path); + /* + * Try to read the pathname (if it exists) and store + * it in so_name. + */ + if (off_pathname != 0) { + target_read_string(read_pointer(kld + off_pathname), + &path, sizeof(new->so_name), &error); + if (error != 0) { + warning( + "kld_current_sos: Can't read pathname for \"%s\": %s\n", + new->so_original_name, + safe_strerror(error)); + strlcpy(new->so_name, new->so_original_name, + sizeof(new->so_name)); + } else { + strlcpy(new->so_name, path, + sizeof(new->so_name)); + xfree(path); + } + } else + strlcpy(new->so_name, new->so_original_name, + sizeof(new->so_name)); - /* - * If we have a pathname, try to load the kld - * from there. - */ - strlcpy(kldpath, path, sizeof(kldpath)); - if (check_kld_path(kldpath, sizeof(kldpath))) - path_ok = 1; + /* Read this kld's base address. */ + new->lm_info->base_address = read_pointer(kld + off_address); + if (new->lm_info->base_address == 0) { + warning( + "kld_current_sos: Invalid address for kld \"%s\"", + new->so_original_name); + free_so(new); + continue; } + + /* Append to the list. */ + *prev = new; + prev = &new->next; } - /* - * If we didn't get a pathname from the linker file path, try - * to find this kld in the various search paths. - */ - if (!path_ok && !find_kld_path(filename, kldpath, sizeof(kldpath))) - error("Unable to find kld file for \"%s\".", filename); + return (head); +} + +static int +kld_open_symbol_file_object (void *from_ttyp) +{ - /* Read this kld's base address and add its symbols. */ - address = read_pointer(kld + off_address); - if (address == 0) - error("Invalid address for kld \"%s\"", filename); + return (0); +} - load_kld(kldpath, address, 0, 0); +static int +kld_in_dynsym_resolve_code (CORE_ADDR pc) +{ - printf_unfiltered("Loaded symbols for kld \"%s\" from \"%s\"\n", - filename, path); + return (0); } static int -load_kld_stub (void *arg) +kld_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname) { - CORE_ADDR kld = *(CORE_ADDR *)arg; + char path[PATH_MAX]; + int fd; + + *temp_pathname = NULL; + if (!find_kld_path(solib, path, sizeof(path))) { + errno = ENOENT; + return (-1); + } + fd = open(path, o_flags, 0); + if (fd >= 0) + *temp_pathname = xstrdup(path); + return (fd); +} - load_single_kld(kld); +static int +load_klds_stub (void *arg) +{ - return (1); + SOLIB_ADD(NULL, 1, ¤t_target, auto_solib_add); + return (0); } void -kgdb_auto_load_klds (void) +kgdb_kld_init (void) { - struct cleanup *cleanup; - CORE_ADDR kld, kernel; - int loaded_kld; + struct cmd_list_element *c; /* Compute offsets of relevant members in struct linker_file. */ off_address = kgdb_parse("&((struct linker_file *)0)->address"); @@ -384,24 +456,24 @@ if (off_address == 0 || off_filename == 0 || off_next == 0) return; - /* Walk the list of linker files auto-loading klds. */ - cleanup = make_cleanup(dummy_cleanup, NULL); - loaded_kld = 0; - kld = kgdb_parse("linker_files.tqh_first"); - kernel = kgdb_parse("linker_kernel_file"); - for (kld = kgdb_parse("linker_files.tqh_first"); kld != 0; - kld = read_pointer(kld + off_next)) { - /* Skip the main kernel file. */ - if (kld == kernel) - continue; + module_path_addr = kgdb_parse("linker_path"); + + kld_so_ops.relocate_section_addresses = kld_relocate_section_addresses; + kld_so_ops.free_so = kld_free_so; + kld_so_ops.clear_solib = kld_clear_solib; + kld_so_ops.solib_create_inferior_hook = kld_solib_create_inferior_hook; + kld_so_ops.special_symbol_handling = kld_special_symbol_handling; + kld_so_ops.current_sos = kld_current_sos; + kld_so_ops.open_symbol_file_object = kld_open_symbol_file_object; + kld_so_ops.in_dynsym_resolve_code = kld_in_dynsym_resolve_code; + kld_so_ops.find_and_open_solib = kld_find_and_open_solib; - if (catch_errors(load_kld_stub, &kld, - "Error while reading kld symbols:\n", RETURN_MASK_ALL)) - loaded_kld = 1; - } + current_target_so_ops = &kld_so_ops; - do_cleanups(cleanup); + catch_errors(load_klds_stub, NULL, NULL, RETURN_MASK_ALL); - if (loaded_kld) - reinit_frame_cache(); + c = add_com("add-kld", class_files, kgdb_add_kld_cmd, + "Usage: add-kld FILE\n\ +Load the symbols from the kernel loadable module FILE."); + set_cmd_completer(c, filename_completer); } ==== //depot/projects/iwarp/gnu/usr.bin/gdb/kgdb/main.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.13 2008/01/28 20:31:30 jhb Exp $"); +__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.14 2008/01/29 23:37:59 jhb Exp $"); #include #include @@ -204,7 +204,6 @@ kgdb_init_target(void) { CORE_ADDR bufp; - bfd *kern_bfd; int size, rseq, wseq; int kern_desc; char c; @@ -228,7 +227,6 @@ } set_gdbarch_from_file (kern_bfd); - bfd_close(kern_bfd); symbol_file_add_main (kernel, 0); if (remote) ==== //depot/projects/iwarp/gnu/usr.bin/gdb/kgdb/trgt.c#3 (text+ko) ==== @@ -25,16 +25,18 @@ */ #include -__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt.c,v 1.8 2008/01/28 21:40:10 jhb Exp $"); +__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt.c,v 1.10 2008/01/29 23:44:34 jhb Exp $"); #include #include #include #include +#include #include #include #include +#include #include #include #include @@ -45,6 +47,8 @@ static struct target_ops kgdb_trgt_ops; +bfd *kern_bfd; + #define KERNOFF (kgdb_kernbase ()) #define INKERNEL(x) ((x) >= KERNOFF) @@ -81,11 +85,8 @@ static void kgdb_trgt_files_info(struct target_ops *target) { - struct target_ops *tb; - tb = find_target_beneath(target); - if (tb->to_files_info != NULL) - tb->to_files_info(tb); + print_section_info(target, kern_bfd); } static void @@ -207,7 +208,7 @@ kgdb_trgt_ops.to_magic = OPS_MAGIC; kgdb_trgt_ops.to_shortname = "kernel"; - kgdb_trgt_ops.to_longname = "kernel core files."; + kgdb_trgt_ops.to_longname = "kernel core files"; kgdb_trgt_ops.to_doc = "Kernel core files."; kgdb_trgt_ops.to_stratum = thread_stratum; kgdb_trgt_ops.to_has_memory = 1; @@ -222,6 +223,12 @@ kgdb_trgt_ops.to_store_registers = kgdb_trgt_store_registers; kgdb_trgt_ops.to_thread_alive = kgdb_trgt_thread_alive; kgdb_trgt_ops.to_xfer_memory = kgdb_trgt_xfer_memory; + + if (build_section_table(kern_bfd, &kgdb_trgt_ops.to_sections, + &kgdb_trgt_ops.to_sections_end) != 0) + errx(1, "\"%s\": can't find the file sections: %s", + kernel, bfd_errmsg(bfd_get_error())); + add_target(&kgdb_trgt_ops); push_target(&kgdb_trgt_ops); @@ -236,8 +243,5 @@ "Set current process context"); add_com ("tid", class_obscure, kgdb_set_tid_cmd, "Set current thread context"); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Feb 7 05:31:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3795516A46B; Thu, 7 Feb 2008 05:31:01 +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 F109516A41B for ; Thu, 7 Feb 2008 05:31:00 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D032413C448 for ; Thu, 7 Feb 2008 05:31:00 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m175V0oO015875 for ; Thu, 7 Feb 2008 05:31:00 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m175V0UL015872 for perforce@freebsd.org; Thu, 7 Feb 2008 05:31:00 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 05:31:00 GMT Message-Id: <200802070531.m175V0UL015872@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134960 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 05:31:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=134960 Change 134960 by kmacy@kmacy:storage:toehead on 2008/02/07 05:30:54 don't unconditionally reference uio as it may not be set for kernel sockets Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#17 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#17 (text+ko) ==== @@ -517,7 +517,7 @@ zcopy_thres = TOM_TUNABLE(tdev, zcopy_sosend_partial_thres); zcopy_enabled = TOM_TUNABLE(tdev, zcopy_sosend_enabled); - if ((uio->uio_resid > zcopy_thres) && + if (uio && (uio->uio_resid > zcopy_thres) && (uio->uio_iovcnt < TMP_IOV_MAX) && ((so->so_state & SS_NBIO) == 0) && zcopy_enabled) { rv = t3_sosend(so, uio); @@ -924,7 +924,7 @@ * */ - if ((tp->t_flags & TF_TOE) && ((flags & (MSG_WAITALL|MSG_OOB|MSG_PEEK|MSG_DONTWAIT)) == 0) + if ((tp->t_flags & TF_TOE) && uio && ((flags & (MSG_WAITALL|MSG_OOB|MSG_PEEK|MSG_DONTWAIT)) == 0) && (uio->uio_iovcnt == 1) && (mp0 == NULL)) { tdev = TOE_DEV(so); zcopy_thres = TOM_TUNABLE(tdev, ddp_thres); @@ -938,7 +938,7 @@ else printf("returned EAGAIN\n"); } - } else if (tp->t_flags & TF_TOE) + } else if ((tp->t_flags & TF_TOE) && uio) printf("skipping t3_soreceive flags=0x%x iovcnt=%d mp0=%p sb_state=0x%x\n", flags, uio->uio_iovcnt, mp0, so->so_rcv.sb_state); return pru_soreceive(so, psa, uio, mp0, controlp, flagsp); From owner-p4-projects@FreeBSD.ORG Thu Feb 7 05:34:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A78016A41A; Thu, 7 Feb 2008 05:34:04 +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 3FF0716A418 for ; Thu, 7 Feb 2008 05:34:04 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1ED9413C459 for ; Thu, 7 Feb 2008 05:34:04 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m175Y4LV016083 for ; Thu, 7 Feb 2008 05:34:04 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m175Y4Jc016080 for perforce@freebsd.org; Thu, 7 Feb 2008 05:34:04 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 05:34:04 GMT Message-Id: <200802070534.m175Y4Jc016080@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134961 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 05:34:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=134961 Change 134961 by kmacy@kmacy:entropy:iwarp on 2008/02/07 05:33:45 fix kernel socket panic Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#9 integrate Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#9 (text+ko) ==== @@ -519,7 +519,7 @@ zcopy_thres = TOM_TUNABLE(tdev, zcopy_sosend_partial_thres); zcopy_enabled = TOM_TUNABLE(tdev, zcopy_sosend_enabled); - if ((uio->uio_resid > zcopy_thres) && + if (uio && (uio->uio_resid > zcopy_thres) && (uio->uio_iovcnt < TMP_IOV_MAX) && ((so->so_state & SS_NBIO) == 0) && zcopy_enabled) { rv = t3_sosend(so, uio); @@ -926,7 +926,7 @@ * */ - if ((tp->t_flags & TF_TOE) && ((flags & (MSG_WAITALL|MSG_OOB|MSG_PEEK|MSG_DONTWAIT)) == 0) + if ((tp->t_flags & TF_TOE) && uio && ((flags & (MSG_WAITALL|MSG_OOB|MSG_PEEK|MSG_DONTWAIT)) == 0) && (uio->uio_iovcnt == 1) && (mp0 == NULL)) { tdev = TOE_DEV(so); zcopy_thres = TOM_TUNABLE(tdev, ddp_thres); @@ -940,7 +940,7 @@ else printf("returned EAGAIN\n"); } - } else if (tp->t_flags & TF_TOE) + } else if ((tp->t_flags & TF_TOE) && uio) printf("skipping t3_soreceive flags=0x%x iovcnt=%d mp0=%p sb_state=0x%x\n", flags, uio->uio_iovcnt, mp0, so->so_rcv.sb_state); return pru_soreceive(so, psa, uio, mp0, controlp, flagsp); From owner-p4-projects@FreeBSD.ORG Thu Feb 7 09:29:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 253C916A420; Thu, 7 Feb 2008 09:29: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 C678816A41A for ; Thu, 7 Feb 2008 09:29:24 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9952513C4E9 for ; Thu, 7 Feb 2008 09:29:24 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m179TOXx043378 for ; Thu, 7 Feb 2008 09:29:24 GMT (envelope-from andre@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m179TOXi043375 for perforce@freebsd.org; Thu, 7 Feb 2008 09:29:24 GMT (envelope-from andre@freebsd.org) Date: Thu, 7 Feb 2008 09:29:24 GMT Message-Id: <200802070929.m179TOXi043375@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andre@freebsd.org using -f From: Andre Oppermann To: Perforce Change Reviews Cc: Subject: PERFORCE change 134972 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 09:29:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=134972 Change 134972 by andre@andre_flirtbox on 2008/02/07 09:28:38 Copy TCP header information into local variables as the mbuf portion where it resides is technically gone. When using m_collapse() will be truely gone and accessing it will give a page fault. Affected files ... .. //depot/projects/tcp_reass/netinet/tcp_reass.c#17 edit Differences ... ==== //depot/projects/tcp_reass/netinet/tcp_reass.c#17 (text+ko) ==== @@ -175,6 +175,7 @@ struct socket *so = tp->t_inpcb->inp_socket; struct mbuf *n; int i, thflags = 0, mcnt; + tcp_seq th_seq; struct trq tqes; INP_LOCK_ASSERT(tp->t_inpcb); @@ -192,7 +193,14 @@ return (0); goto present; } + + /* + * Store TCP header information in local variables as + * we may lose access to it after mbuf compacting. + */ thflags = (th->th_flags & TH_FIN); + th_seq = th->th_seq; + th = NULL; /* Prevent further use. */ /* Check if it is really neccessary to do all the work. */ if (!tcp_reass_enabled && TAILQ_EMPTY(&tp->t_trq)) { @@ -209,9 +217,9 @@ KASSERT(*tlenp > 0, ("%s: segment doesn't contain any data", __func__)); - KASSERT(SEQ_LEQ(tp->rcv_nxt, th->th_seq), + KASSERT(SEQ_LEQ(tp->rcv_nxt, th_seq), ("%s: sequence number below rcv_nxt", __func__)); - KASSERT(!(tp->rcv_nxt == th->th_seq) || !(TAILQ_EMPTY(&tp->t_trq)), + KASSERT(!(tp->rcv_nxt == th_seq) || !(TAILQ_EMPTY(&tp->t_trq)), ("%s: got missing segment but queue is empty", __func__)); #ifdef INVARIANTS @@ -253,8 +261,8 @@ * vs. actual real data with 2k clusters and 1500 byte packets. * This shouldn't be too much of a problem though. */ - if (th->th_seq != tp->rcv_nxt && - tp->t_trqmcnt > sbspace(&so->so_rcv)) { + if (th_seq != tp->rcv_nxt && + tp->t_trqmcnt > (sbspace(&so->so_rcv) / 4 * 5)) { tcpstat.tcps_reass_overflow++; tcpstat.tcps_rcvmemdrop++; m_freem(m); @@ -281,9 +289,9 @@ /* Check if we've already received FIN; we can't accept data beyond it. */ tqe = TAILQ_LAST(&tp->t_trq, trq_head); - if (tqe && (tqe->trq_thflags & TH_FIN) && SEQ_LEQ(tqe->trq_seq, th->th_seq)) { + if (tqe && (tqe->trq_thflags & TH_FIN) && SEQ_LEQ(tqe->trq_seq, th_seq)) { /* Properly count retransmitted perfect matching FIN. */ - if (tqe->trq_seq == th->th_seq && *tlenp > 0) + if (tqe->trq_seq == th_seq && *tlenp > 0) tcpstat.tcps_rcvoopack++; else { tcpstat.tcps_rcvpackafterfin++; @@ -296,7 +304,7 @@ /* Check if this segments FIN is before the end of the last block. */ if (tqe && (thflags & TH_FIN) && - SEQ_GT(tqe->trq_seq + tqe->trq_len, th->th_seq + *tlenp)) { + SEQ_GT(tqe->trq_seq + tqe->trq_len, th_seq + *tlenp)) { /* TCP statistics. */ tcpstat.tcps_rcvpackafterfin++; tcpstat.tcps_rcvbyteafterfin += *tlenp; @@ -306,7 +314,7 @@ } /* Check if this segment directly attaches to the end. */ - if (tqe && tqe->trq_seq + tqe->trq_len == th->th_seq) { + if (tqe && tqe->trq_seq + tqe->trq_len == th_seq) { tqe->trq_len += *tlenp; tqe->trq_mcnt += mcnt; tp->t_trqmcnt += mcnt; @@ -326,7 +334,7 @@ } /* Check if beyond last block. */ - if (tqe && SEQ_LT(tqe->trq_seq + tqe->trq_len, th->th_seq)) + if (tqe && SEQ_LT(tqe->trq_seq + tqe->trq_len, th_seq)) goto insert; /* Check if this is the first segment. */ @@ -334,14 +342,14 @@ goto insert; /* Check if this is the missing segment. */ - if (tp->rcv_nxt == th->th_seq) { + if (tp->rcv_nxt == th_seq) { tqe = TAILQ_FIRST(&tp->t_trq); - KASSERT(SEQ_GT(tqe->trq_seq, th->th_seq), + KASSERT(SEQ_GT(tqe->trq_seq, th_seq), ("%s: first block starts below missing segment", __func__)); /* Check if segment prepends first block. */ - if (SEQ_LEQ(tqe->trq_seq, th->th_seq + *tlenp)) { + if (SEQ_LEQ(tqe->trq_seq, th_seq + *tlenp)) { /* Trim tail of segment. */ - if ((i = SEQ_DELTA(tqe->trq_seq, th->th_seq + *tlenp))) { + if ((i = SEQ_DELTA(tqe->trq_seq, th_seq + *tlenp))) { m_adj(m, -i); *tlenp -= i; /* TCP statistics. */ @@ -356,7 +364,7 @@ tqe->trq_mcnt += mcnt; tp->t_trqmcnt += mcnt; tcp_reass_mcnt += mcnt; - tqe->trq_seq = th->th_seq; + tqe->trq_seq = th_seq; n = m_last(m); n->m_next = tqe->trq_m; tqe->trq_m = m; @@ -372,15 +380,15 @@ /* See where it fits. */ TAILQ_FOREACH_SAFE(tqe, &tp->t_trq, trq_q, tqen) { /* Segment is after this blocks coverage. */ - if (SEQ_LT(tqe->trq_seq + tqe->trq_len, th->th_seq)) + if (SEQ_LT(tqe->trq_seq + tqe->trq_len, th_seq)) continue; /* Segment is after the previous one but before this one. */ - if (SEQ_GT(tqe->trq_seq, th->th_seq + *tlenp)) + if (SEQ_GT(tqe->trq_seq, th_seq + *tlenp)) break; /* Insert as new block. */ /* Segment is already fully covered. */ - if (SEQ_LEQ(tqe->trq_seq, th->th_seq) && - SEQ_GEQ(tqe->trq_seq + tqe->trq_len, th->th_seq + *tlenp)) { + if (SEQ_LEQ(tqe->trq_seq, th_seq) && + SEQ_GEQ(tqe->trq_seq + tqe->trq_len, th_seq + *tlenp)) { tcpstat.tcps_rcvduppack++; tcpstat.tcps_rcvdupbyte += *tlenp; tcpstat.tcps_reass_covered++; @@ -396,8 +404,8 @@ } /* Segment covers and extends on both ends. */ - if (SEQ_GT(tqe->trq_seq, th->th_seq) && - SEQ_LT(tqe->trq_seq + tqe->trq_len, th->th_seq + *tlenp)) { + if (SEQ_GT(tqe->trq_seq, th_seq) && + SEQ_LT(tqe->trq_seq + tqe->trq_len, th_seq + *tlenp)) { /* Replace block content. */ tp->t_trqmcnt -= tqe->trq_mcnt; m_freem(tqe->trq_m); @@ -405,7 +413,7 @@ tqe->trq_mcnt = mcnt; tp->t_trqmcnt += mcnt; tcp_reass_mcnt += mcnt; - tqe->trq_seq = th->th_seq; + tqe->trq_seq = th_seq; tqe->trq_m = m; tqe->trq_ml = m_last(m); tqe->trq_thflags |= thflags; @@ -422,13 +430,13 @@ } /* Segment prepends to this block. */ - if (SEQ_GT(tqe->trq_seq, th->th_seq) && - SEQ_LEQ(tqe->trq_seq, th->th_seq + *tlenp) && - SEQ_GEQ(tqe->trq_seq + tqe->trq_len, th->th_seq + *tlenp)) { + if (SEQ_GT(tqe->trq_seq, th_seq) && + SEQ_LEQ(tqe->trq_seq, th_seq + *tlenp) && + SEQ_GEQ(tqe->trq_seq + tqe->trq_len, th_seq + *tlenp)) { KASSERT(!(thflags & TH_FIN), ("%s: new segment with FIN can't prepend", __func__)); /* Trim tail of segment. */ - if ((i = SEQ_DELTA(tqe->trq_seq, th->th_seq + *tlenp))) { + if ((i = SEQ_DELTA(tqe->trq_seq, th_seq + *tlenp))) { m_adj(m, -i); *tlenp -= i; /* TCP statistics. */ @@ -443,7 +451,7 @@ tqe->trq_mcnt += mcnt; tp->t_trqmcnt += mcnt; tcp_reass_mcnt += mcnt; - tqe->trq_seq = th->th_seq; + tqe->trq_seq = th_seq; n = m_last(m); n->m_next = tqe->trq_m; tqe->trq_m = m; @@ -456,11 +464,11 @@ } /* Segment appends to this block. */ - if (SEQ_LT(tqe->trq_seq + tqe->trq_len, th->th_seq + *tlenp) && - SEQ_LEQ(tqe->trq_seq, th->th_seq) && - SEQ_GEQ(tqe->trq_seq + tqe->trq_len, th->th_seq)) { + if (SEQ_LT(tqe->trq_seq + tqe->trq_len, th_seq + *tlenp) && + SEQ_LEQ(tqe->trq_seq, th_seq) && + SEQ_GEQ(tqe->trq_seq + tqe->trq_len, th_seq)) { /* Trim head of segment. */ - if ((i = SEQ_DELTA(tqe->trq_seq + tqe->trq_len, th->th_seq))) { + if ((i = SEQ_DELTA(tqe->trq_seq + tqe->trq_len, th_seq))) { m_adj(m, i); *tlenp -= i; /* TCP Statistics. */ @@ -489,7 +497,7 @@ insert: /* Prepare to insert into block queue. */ - if (tp->rcv_nxt == th->th_seq) { + if (tp->rcv_nxt == th_seq) { /* * Use temporary struct trq on the stack for missing * segment to prevent blocking of all reassembly queues @@ -507,7 +515,7 @@ tcpstat.tcps_reass_blocks++; } tcp_reass_qsize++; - tqen->trq_seq = th->th_seq; + tqen->trq_seq = th_seq; tqen->trq_len = *tlenp; tqen->trq_mcnt = mcnt; tp->t_trqmcnt += mcnt; @@ -517,7 +525,7 @@ tqen->trq_thflags |= thflags; /* Where to insert. */ - if (tqe != NULL && SEQ_LT(tqe->trq_seq + tqe->trq_len, th->th_seq)) + if (tqe != NULL && SEQ_LT(tqe->trq_seq + tqe->trq_len, th_seq)) TAILQ_INSERT_AFTER(&tp->t_trq, tqe, tqen, trq_q); else if (tqe != NULL) TAILQ_INSERT_BEFORE(tqe, tqen, trq_q); @@ -535,7 +543,7 @@ LIST_INSERT_HEAD(&tp->t_trq_sack, tqen, trq_s); /* Missing segment? */ - if (tp->rcv_nxt != th->th_seq) + if (tp->rcv_nxt != th_seq) return (0); present: /* From owner-p4-projects@FreeBSD.ORG Thu Feb 7 14:14:06 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 77C5016A419; Thu, 7 Feb 2008 14:14:06 +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 3D04116A475 for ; Thu, 7 Feb 2008 14:14:06 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2144E13C4EE for ; Thu, 7 Feb 2008 14:14:06 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m17EE6u8075341 for ; Thu, 7 Feb 2008 14:14:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m17EE5St075336 for perforce@freebsd.org; Thu, 7 Feb 2008 14:14:05 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Thu, 7 Feb 2008 14:14:05 GMT Message-Id: <200802071414.m17EE5St075336@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134985 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 14:14:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=134985 Change 134985 by rwatson@rwatson_freebsd_capabilities on 2008/02/07 14:13:06 Use a pool mutex for each non-capability file rather than a global mutex. Maintain a count of capabilities associated with each non-capability file that can be used to avoid walking the list of capabilities on the file. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_descrip.c#7 edit .. //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#15 edit .. //depot/projects/trustedbsd/capabilities/src/sys/sys/file.h#6 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_descrip.c#7 (text+ko) ==== @@ -1393,6 +1393,7 @@ fp->f_data = NULL; fp->f_vnode = NULL; LIST_INIT(&fp->f_caps); + fp->f_capcount = 0; FILEDESC_XLOCK(p->p_fd); if ((error = fdalloc(td, 0, &i))) { FILEDESC_XUNLOCK(p->p_fd); @@ -2219,6 +2220,8 @@ crfree(fp->f_cred); if (!LIST_EMPTY(&fp->f_caps)) panic("_fdrop: f_caps not empty"); + if (fp->f_capcount != 0) + panic("_fdrop: f_capcount != 0"); uma_zfree(file_zone, fp); return (error); ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#15 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#14 $"); +__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#15 $"); #include #include @@ -62,8 +62,8 @@ * file f_data field. cap_file and cap_rightss are static once hooked up, as * neither the object it references nor the rights it encapsulates are * permitted to change. cap_filelist may change when other capabilites are - * added or removed from the same file, and is currently protected by - * cap_file_mtx. + * added or removed from the same file, and is currently protected by the + * pool mutex for the object file descriptor. */ struct capability { struct file *cap_object; /* Underlying object's file. */ @@ -100,14 +100,6 @@ static uma_zone_t capability_zone; -/* - * XXXRW: Each file descriptor contains a list of capabilities pointing at it - * so that we the UNIX domain socket GC routine can calculate whether there - * are external references. Ideally we'd use a per-file lock, but right now - * we don't have one, so use a global mutex for now. - */ -static struct mtx cap_file_mtx; - static void capability_init(void *dummy __unused) { @@ -117,7 +109,6 @@ 0); if (capability_zone == NULL) panic("capability_init: capability_zone not initialized"); - mtx_init(&cap_file_mtx, "cap_file_mtx", NULL, MTX_DEF); } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_ANY, capability_init, NULL); @@ -261,9 +252,10 @@ * Add this capability to the per-file list of referencing * capabilities. */ - mtx_lock(&cap_file_mtx); + mtx_pool_lock(mtxpool_sleep, fp_object); LIST_INSERT_HEAD(&fp_object->f_caps, c, cap_filelist); - mtx_unlock(&cap_file_mtx); + fp_object->f_capcount++; + mtx_pool_unlock(mtxpool_sleep, fp_object); td->td_retval[0] = fd_cap; fdrop(fp, td); fdrop(fp_cap, td); @@ -313,9 +305,10 @@ fp->f_ops = &badfileops; fp->f_data = NULL; fp_object = c->cap_object; - mtx_lock(&cap_file_mtx); + mtx_pool_lock(mtxpool_sleep, fp_object); LIST_REMOVE(c, cap_filelist); - mtx_unlock(&cap_file_mtx); + fp_object->f_capcount--; + mtx_pool_unlock(mtxpool_sleep, fp_object); uma_zfree(capability_zone, c); return (fdrop(fp_object, td)); } ==== //depot/projects/trustedbsd/capabilities/src/sys/sys/file.h#6 (text+ko) ==== @@ -130,7 +130,8 @@ * Mandatory Access control information. */ void *f_label; /* Place-holder for MAC label. */ - LIST_HEAD(, capability) f_caps; /* List of capabilities for file. */ + LIST_HEAD(, capability) f_caps; /* (f) List of capabilities for file. */ + u_int f_capcount; /* (f) Number of capabilities. */ }; #define FOFFSET_LOCKED 0x1 From owner-p4-projects@FreeBSD.ORG Thu Feb 7 14:30:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7337416A46B; Thu, 7 Feb 2008 14:30: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 37F4F16A419 for ; Thu, 7 Feb 2008 14:30:23 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 04B9513C45E for ; Thu, 7 Feb 2008 14:30:23 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m17EUMnn076442 for ; Thu, 7 Feb 2008 14:30:22 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m17EUM3U076439 for perforce@freebsd.org; Thu, 7 Feb 2008 14:30:22 GMT (envelope-from swise@FreeBSD.org) Date: Thu, 7 Feb 2008 14:30:22 GMT Message-Id: <200802071430.m17EUM3U076439@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 134986 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 14:30:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=134986 Change 134986 by swise@swise:vic10:iwarp on 2008/02/07 14:29:21 duh! Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_cm.c#15 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_cm.c#15 (text+ko) ==== @@ -1538,7 +1538,6 @@ struct socket *child_so; struct iwch_ep *child_ep; struct sockaddr_in *remote; - int err; PDBG("%s parent ep %p so %p\n", __FUNCTION__, parent_ep, parent_ep->com.so); child_so = dequeue_socket(parent_ep->com.so, &remote); From owner-p4-projects@FreeBSD.ORG Thu Feb 7 14:30:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E222C16A52F; Thu, 7 Feb 2008 14:30: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 47B9216A421 for ; Thu, 7 Feb 2008 14:30:23 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2D4A613C465 for ; Thu, 7 Feb 2008 14:30:23 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m17EUN9H076448 for ; Thu, 7 Feb 2008 14:30:23 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m17EUNGL076445 for perforce@freebsd.org; Thu, 7 Feb 2008 14:30:23 GMT (envelope-from swise@FreeBSD.org) Date: Thu, 7 Feb 2008 14:30:23 GMT Message-Id: <200802071430.m17EUNGL076445@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 134987 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 14:30:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=134987 Change 134987 by swise@swise:vic10:iwarp on 2008/02/07 14:29:44 Fixed cxgbtool breakage after integration/syncing. Affected files ... .. //depot/projects/iwarp/usr.sbin/cxgbtool/cxgbtool.c#6 edit Differences ... ==== //depot/projects/iwarp/usr.sbin/cxgbtool/cxgbtool.c#6 (text+ko) ==== @@ -868,17 +868,17 @@ op = malloc(sizeof(*op)); if (!op) err(1, "get TCB"); - memset(op.buf, 0xaa, TCB_SIZE); op->mem_id = MEM_CM; op->addr = tcb_idx * TCB_SIZE; op->len = TCB_SIZE; op->buf = buf; + memset(op->buf, 0xaa, TCB_SIZE); if (doit(iff_name, CHELSIO_GET_MEM, op) < 0) err(1, "get TCB"); - for (d = (uint64_t *)op.buf, i = 0; i < TCB_SIZE / 32; i++) { + for (d = (uint64_t *)op->buf, i = 0; i < TCB_SIZE / 32; i++) { printf("%2u:", i); printf(" %08x %08x %08x %08x", (uint32_t)d[1], (uint32_t)(d[1] >> 32), (uint32_t)d[0], @@ -889,7 +889,7 @@ (uint32_t)(d[0] >> 32)); d += 2; } - free(op.buf); + free(op); return 0; } @@ -1875,7 +1875,6 @@ #endif else if (!strcmp(argv[2], "tcb")) r = get_tcb(argc, argv, 3, iff_name); -#ifdef notyet #ifdef WRC else if (!strcmp(argv[2], "wrc")) r = get_wrc(argc, argv, 3, iff_name); From owner-p4-projects@FreeBSD.ORG Thu Feb 7 14:37:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 099D416A419; Thu, 7 Feb 2008 14:37:31 +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 C324516A417 for ; Thu, 7 Feb 2008 14:37:30 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A792B13C447 for ; Thu, 7 Feb 2008 14:37:30 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m17EbUhc076821 for ; Thu, 7 Feb 2008 14:37:30 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m17EbUhs076818 for perforce@freebsd.org; Thu, 7 Feb 2008 14:37:30 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Thu, 7 Feb 2008 14:37:30 GMT Message-Id: <200802071437.m17EbUhs076818@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 134988 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 14:37:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=134988 Change 134988 by rwatson@rwatson_freebsd_capabilities on 2008/02/07 14:36:44 Comment on .fo_flags, and why it's OK to hard-code DFLAG_PASSABLE, and not to specific DFLAG_SEEKABLE. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#16 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#16 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#15 $"); +__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#16 $"); #include #include @@ -95,7 +95,18 @@ .fo_kqfilter = capability_kqfilter, .fo_stat = capability_stat, .fo_close = capability_close, - .fo_flags = DFLAG_PASSABLE, /* XXXRW: DFLAG_SEEKABLE? */ + + /* + * Possibly we should have two fileops vectors, one with and one + * without DFLAG_PASSABLE, in order to support wrapping objects who + * don't have DFLAG_PASSABLE. On the other hand, there are no such + * objects, which raises the question as to why the flag exists at + * all. + * + * No need to set DFLAG_SEEKABLE as any seek operations will fall + * through to the underlying object once the capability is verified. + */ + .fo_flags = DFLAG_PASSABLE, }; static uma_zone_t capability_zone; From owner-p4-projects@FreeBSD.ORG Thu Feb 7 21:46:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0CE4716A474; Thu, 7 Feb 2008 21:46:03 +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 844D716A468 for ; Thu, 7 Feb 2008 21:46:02 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 737D413C4EB for ; Thu, 7 Feb 2008 21:46:01 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m17Lk1Kd032683 for ; Thu, 7 Feb 2008 21:46:01 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m17Lk0Zl032680 for perforce@freebsd.org; Thu, 7 Feb 2008 21:46:00 GMT (envelope-from swise@FreeBSD.org) Date: Thu, 7 Feb 2008 21:46:00 GMT Message-Id: <200802072146.m17Lk0Zl032680@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 134998 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 21:46:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=134998 Change 134998 by swise@swise:vic10:iwarp on 2008/02/07 21:45:37 renamed iw_cxgb_cxio_blah to iw_cxgb_blah. renamed iw_cxgb_iwch_blah to iw_cxgb_blah. and it even builds and loads! Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.h#1 branch .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.h#1 branch .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_dbg.c#3 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_hal.c#6 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_hal.h#9 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_resource.c#4 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_resource.h#2 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_wr.h#5 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.h#1 branch .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch.c#6 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch.h#4 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_cm.c#16 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_cm.h#5 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_cq.c#3 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_ev.c#3 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_mem.c#3 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_provider.c#6 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_provider.h#4 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_qp.c#6 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_user.h#3 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.h#1 branch .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c#1 add .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.h#1 branch .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_user.h#1 branch .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_wr.h#1 branch .. //depot/projects/iwarp/sys/modules/cxgb/iw_cxgb/Makefile#3 edit Differences ... ==== //depot/projects/iwarp/sys/modules/cxgb/iw_cxgb/Makefile#3 (text+ko) ==== @@ -4,10 +4,11 @@ .PATH: ${IW_CXGB} ${CXGB}/common ${CXGB}/ulp/iw_cxgb KMOD= iw_cxgb -SRCS= iw_cxgb_iwch.c iw_cxgb_iwch_cm.c iw_cxgb_cxio_hal.c -SRCS+= iw_cxgb_iwch_provider.c iw_cxgb_iwch_qp.c iw_cxgb_cxio_resource.c -SRCS+= iw_cxgb_iwch_ev.c iw_cxgb_iwch_mem.c iw_cxgb_cxio_dbg.c iw_cxgb_iwch_cq.c +SRCS= iw_cxgb.c iw_cxgb_cm.c iw_cxgb_hal.c +SRCS+= iw_cxgb_provider.c iw_cxgb_qp.c iw_cxgb_resource.c +SRCS+= iw_cxgb_ev.c iw_cxgb_mem.c iw_cxgb_dbg.c iw_cxgb_cq.c SRCS+= bus_if.h device_if.h opt_sched.h pci_if.h pcib_if.h CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DCONFIG_DEFINED -I${CXGB} -DSMP +#CFLAGS+= -DDEBUG .include From owner-p4-projects@FreeBSD.ORG Fri Feb 8 04:13:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B4F116A468; Fri, 8 Feb 2008 04:13:48 +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 30A8616A417 for ; Fri, 8 Feb 2008 04:13:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2551913C447 for ; Fri, 8 Feb 2008 04:13:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m184DkEm076974 for ; Fri, 8 Feb 2008 04:13:46 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m184Dkuj076971 for perforce@freebsd.org; Fri, 8 Feb 2008 04:13:46 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 8 Feb 2008 04:13:46 GMT Message-Id: <200802080413.m184Dkuj076971@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135007 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 04:13:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=135007 Change 135007 by kmacy@kmacy:entropy:iwarp on 2008/02/08 04:12:59 revert local aio changes Affected files ... .. //depot/projects/iwarp/sys/kern/vfs_aio.c#6 edit Differences ... ==== //depot/projects/iwarp/sys/kern/vfs_aio.c#6 (text+ko) ==== @@ -496,31 +496,6 @@ return (0); } -static aio_op_t -aio_op_get(struct file *fp) -{ - struct socket *so; - aio_op_t op; - struct sockopt sopt; - socklen_t valsize; - int error; - - if (fp->f_type != DTYPE_SOCKET) - return (NULL); - - sopt.sopt_dir = SOPT_GET; - sopt.sopt_level = 0; - sopt.sopt_name = TCP_AIO; - sopt.sopt_val = &op; - sopt.sopt_valsize = sizeof(aio_op_t); - sopt.sopt_tp = NULL; - so = fp->f_data;g - if ((error = sogetopt(so, &sopt)) != 0) - return (NULL); - - return (op); -} - /* * Init the per-process aioinfo structure. The aioinfo limits are set * per-process for user limit (resource) management. @@ -1362,7 +1337,6 @@ struct kaioinfo *ki; struct kevent kev; struct sockbuf *sb; - aio_op_t op; int opcode; int error; int fd, kqfd; @@ -1500,26 +1474,11 @@ suword(&job->_aiocb_private.error, EINPROGRESS); aiocbe->uaiocb._aiocb_private.error = EINPROGRESS; - - op = aio_op_get(fp); - if (op != NULL) { - error = op(fp, &aiocbe->uaiocb, job, td); - if (error && error != ECANCELED) - fdrop(fp, td); - - if (error == ECANCELED) - error = 0; - else { - uma_zfree(aiocb_zone, aiocbe); - goto done; - } - } aiocbe->userproc = p; aiocbe->cred = crhold(td->td_ucred); aiocbe->jobflags = 0; aiocbe->lio = lj; - if (opcode == LIO_SYNC) goto queueit; @@ -1537,7 +1496,6 @@ * Note if opcode is neither LIO_WRITE nor LIO_READ we lock * and unlock the snd sockbuf for no reason. */ - so = fp->f_data; sb = (opcode == LIO_READ) ? &so->so_rcv : &so->so_snd; SOCKBUF_LOCK(sb); From owner-p4-projects@FreeBSD.ORG Fri Feb 8 04:13:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 285CE16A4DC; Fri, 8 Feb 2008 04:13:48 +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 3FCCD16A419 for ; Fri, 8 Feb 2008 04:13:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 34D5913C448 for ; Fri, 8 Feb 2008 04:13:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m184DkPR076980 for ; Fri, 8 Feb 2008 04:13:46 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m184Dks8076977 for perforce@freebsd.org; Fri, 8 Feb 2008 04:13:46 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 8 Feb 2008 04:13:46 GMT Message-Id: <200802080413.m184Dks8076977@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135008 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 04:13:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=135008 Change 135008 by kmacy@kmacy:entropy:iwarp on 2008/02/08 04:13:35 fix 32-bit build errors Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#10 edit .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#3 edit .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_vm.c#3 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#10 (text+ko) ==== @@ -218,8 +218,8 @@ for (totcount = i = 0; (i < iovcnt) && (totcount < maxcount); i++, iov++) { count = maxcount - totcount; - start = (uint64_t)iov->iov_base; - end = (uint64_t)((caddr_t)iov->iov_base + iov->iov_len); + start = (uintptr_t)iov->iov_base; + end = (uintptr_t)((caddr_t)iov->iov_base + iov->iov_len); start &= PG_FRAME; end += PAGE_MASK; end &= PG_FRAME; @@ -236,7 +236,7 @@ totcount += count; curbytes = iov->iov_len; if (count != npages) - curbytes = count*PAGE_SIZE - (((uint64_t)iov->iov_base)&PAGE_MASK); + curbytes = count*PAGE_SIZE - (((uintptr_t)iov->iov_base)&PAGE_MASK); totbytes += curbytes; } uio->uio_resid -= totbytes; ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#3 (text+ko) ==== @@ -155,7 +155,7 @@ p->dgl_length = len; p->dgl_offset = pg_off; p->dgl_nelem = npages; - printf("hold %jx -> %jx --- count=%d i=%d\n", addr, addr + npages*PAGE_SIZE, npages, i); + printf("hold %zx -> %zx --- count=%d i=%d\n", addr, addr + npages*PAGE_SIZE, npages, i); #ifdef NEED_BUSDMA p->phys_addr[0] = pci_map_page(pdev, p->pages[0], pg_off, ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_vm.c#3 (text+ko) ==== @@ -120,7 +120,7 @@ } else if (m == NULL) rv = vm_fault(map, va, VM_PROT_READ, VM_FAULT_NORMAL); if (rv) { - printf("vm_fault bad return rv=%d va=0x%jx\n", rv, va); + printf("vm_fault bad return rv=%d va=0x%zx\n", rv, va); goto error; } From owner-p4-projects@FreeBSD.ORG Fri Feb 8 04:20:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B86A016A418; Fri, 8 Feb 2008 04:20:57 +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 7CC5116A41A for ; Fri, 8 Feb 2008 04:20:57 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7168A13C455 for ; Fri, 8 Feb 2008 04:20:57 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m184Kvb3077419 for ; Fri, 8 Feb 2008 04:20:57 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m184Kvmf077416 for perforce@freebsd.org; Fri, 8 Feb 2008 04:20:57 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 8 Feb 2008 04:20:57 GMT Message-Id: <200802080420.m184Kvmf077416@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135010 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 04:20:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=135010 Change 135010 by kmacy@kmacy:storage:toehead on 2008/02/08 04:20:17 add opt_global.h to dependencies Affected files ... .. //depot/projects/toehead/sys/modules/cxgb/tom/Makefile#3 edit Differences ... ==== //depot/projects/toehead/sys/modules/cxgb/tom/Makefile#3 (text+ko) ==== @@ -5,7 +5,8 @@ KMOD= tom SRCS= cxgb_tom.c cxgb_cpl_io.c cxgb_listen.c cxgb_tom_sysctl.c cxgb_cpl_socket.c SRCS+= cxgb_ddp.c cxgb_vm.c -SRCS+= opt_compat.h opt_inet.h opt_inet6.h opt_ipsec.h opt_mac.h opt_tcpdebug.h opt_ddb.h +SRCS+= opt_compat.h opt_inet.h opt_inet6.h opt_ipsec.h opt_mac.h +SRCS+= opt_tcpdebug.h opt_ddb.h opt_global.h SRCS+= device_if.h bus_if.h pci_if.h #CFLAGS+= -DDEBUG_PRINT -DDEBUG From owner-p4-projects@FreeBSD.ORG Fri Feb 8 05:17:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 835A616A41A; Fri, 8 Feb 2008 05:17:01 +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 48D5E16A417 for ; Fri, 8 Feb 2008 05:17:01 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA9513C467 for ; Fri, 8 Feb 2008 05:17:01 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m185GtB4090298 for ; Fri, 8 Feb 2008 05:16:55 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m185GtDw090295 for perforce@freebsd.org; Fri, 8 Feb 2008 05:16:55 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 05:16:55 GMT Message-Id: <200802080516.m185GtDw090295@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135011 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 05:17:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=135011 Change 135011 by jb@jb_freebsd1 on 2008/02/08 05:16:08 Cast an argument to match a format. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#18 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#18 (text+ko) ==== @@ -291,7 +291,7 @@ mutex_exit(&dtrace_lock); - DTRACE_IOCTL_PRINTF("%s(%d): copyout buffer desc: size %zd drops %lu errors %lu\n",__func__,__LINE__,desc.dtbd_size,(u_long) desc.dtbd_drops,(u_long) desc.dtbd_errors); + DTRACE_IOCTL_PRINTF("%s(%d): copyout buffer desc: size %zd drops %lu errors %lu\n",__func__,__LINE__,(size_t) desc.dtbd_size,(u_long) desc.dtbd_drops,(u_long) desc.dtbd_errors); /* * Finally, copy out the buffer description. From owner-p4-projects@FreeBSD.ORG Fri Feb 8 05:20:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 872C916A41B; Fri, 8 Feb 2008 05:20:00 +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 3418416A417 for ; Fri, 8 Feb 2008 05:20:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 27C1E13C44B for ; Fri, 8 Feb 2008 05:20:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m185K0rh090390 for ; Fri, 8 Feb 2008 05:20:00 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m185Jxd0090387 for perforce@freebsd.org; Fri, 8 Feb 2008 05:19:59 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 05:19:59 GMT Message-Id: <200802080519.m185Jxd0090387@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135012 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 05:20:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=135012 Change 135012 by jb@jb_freebsd1 on 2008/02/08 05:19:17 Use uintptr_t types instead of uint64_t to better match the machine type. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#24 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#34 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#24 (text) ==== @@ -273,7 +273,7 @@ { "max", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MAX, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@)" }, { "memref", DT_IDENT_FUNC, 0, DIF_SUBR_MEMREF, DT_ATTR_STABCMN, DT_VERS_1_1, - &dt_idops_func, "uint64_t *(void *, size_t)" }, + &dt_idops_func, "uintptr_t *(void *, size_t)" }, { "min", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MIN, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@)" }, { "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN, @@ -315,7 +315,7 @@ { "printf", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTF, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@, ...)" }, { "printm", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTM, DT_ATTR_STABCMN, DT_VERS_1_0, - &dt_idops_func, "void(size_t, uint64_t *)" }, + &dt_idops_func, "void(size_t, uintptr_t *)" }, { "probefunc", DT_IDENT_SCALAR, 0, DIF_VAR_PROBEFUNC, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" }, { "probemod", DT_IDENT_SCALAR, 0, DIF_VAR_PROBEMOD, ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#34 (text) ==== @@ -6029,7 +6029,7 @@ case DTRACEACT_PRINTM: { /* The DIF returns a 'memref'. */ - uint64_t *memref = (uint64_t *) val; + uintptr_t *memref = (uintptr_t *) val; /* Get the size from the memref. */ size = memref[1]; @@ -6038,21 +6038,21 @@ * Check if the size exceeds the allocated * buffer size. */ - if (size + sizeof(uint64_t) > dp->dtdo_rtype.dtdt_size) { + if (size + sizeof(uintptr_t) > dp->dtdo_rtype.dtdt_size) { /* Flag a drop! */ *flags |= CPU_DTRACE_DROP; continue; } /* Store the size in the buffer first. */ - DTRACE_STORE(uint64_t, tomax, + DTRACE_STORE(uintptr_t, tomax, valoffs, size); /* * Offset the buffer address to the start * of the data. */ - valoffs += sizeof(uint64_t); + valoffs += sizeof(uintptr_t); /* * Reset to the memory address rather than From owner-p4-projects@FreeBSD.ORG Fri Feb 8 05:26:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 73E2316A46B; Fri, 8 Feb 2008 05:26:10 +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 39D7516A420 for ; Fri, 8 Feb 2008 05:26:10 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2E94913C4D5 for ; Fri, 8 Feb 2008 05:26:10 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m185QAYL090687 for ; Fri, 8 Feb 2008 05:26:10 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m185Q9pK090684 for perforce@freebsd.org; Fri, 8 Feb 2008 05:26:09 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 05:26:09 GMT Message-Id: <200802080526.m185Q9pK090684@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135013 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 05:26:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=135013 Change 135013 by jb@jb_freebsd1 on 2008/02/08 05:25:18 Add a DTrace-specific lock function copied from atomic.h but named so that an fbt probe enabled function isn't called from the DTrace probe context (which would cause a double fault). Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_debug.c#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_debug.c#3 (text+ko) ==== @@ -52,6 +52,27 @@ return (res); } +#elif defined(__i386__) +static __inline int +dtrace_cmpset_long(volatile u_long *dst, u_long exp, u_long src) +{ + u_char res; + + __asm __volatile( + " " lock " " + " cmpxchgl %2,%1 ; " + " sete %0 ; " + "1: " + "# dtrace_cmpset_long" + : "=a" (res), /* 0 */ + "=m" (*dst) /* 1 */ + : "r" (src), /* 2 */ + "a" (exp), /* 3 */ + "m" (*dst) /* 4 */ + : "memory"); + + return (res); +} #endif #define DTRACE_DEBUG_BUFR_SIZE (32 * 1024) From owner-p4-projects@FreeBSD.ORG Fri Feb 8 05:44:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D726016A421; Fri, 8 Feb 2008 05:44:29 +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 9C3BD16A41B for ; Fri, 8 Feb 2008 05:44:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7899413C519 for ; Fri, 8 Feb 2008 05:44:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m185iTog091313 for ; Fri, 8 Feb 2008 05:44:29 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m185iThU091310 for perforce@freebsd.org; Fri, 8 Feb 2008 05:44:29 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 05:44:29 GMT Message-Id: <200802080544.m185iThU091310@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135014 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 05:44:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=135014 Change 135014 by jb@jb_freebsd1 on 2008/02/08 05:43:53 How many times do I have to cast this? Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#35 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#35 (text) ==== @@ -6029,7 +6029,7 @@ case DTRACEACT_PRINTM: { /* The DIF returns a 'memref'. */ - uintptr_t *memref = (uintptr_t *) val; + uintptr_t *memref = (uintptr_t *)(uintptr_t) val; /* Get the size from the memref. */ size = memref[1]; From owner-p4-projects@FreeBSD.ORG Fri Feb 8 05:45:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3356D16A41B; Fri, 8 Feb 2008 05:45:31 +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 D428716A469 for ; Fri, 8 Feb 2008 05:45:30 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B0E0813C447 for ; Fri, 8 Feb 2008 05:45:30 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m185jUmQ091397 for ; Fri, 8 Feb 2008 05:45:30 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m185jUkF091394 for perforce@freebsd.org; Fri, 8 Feb 2008 05:45:30 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 05:45:30 GMT Message-Id: <200802080545.m185jUkF091394@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135015 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 05:45:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=135015 Change 135015 by jb@jb_freebsd1 on 2008/02/08 05:44:57 Add the extra argument to match amd64. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#8 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#8 (text+ko) ==== @@ -421,7 +421,7 @@ /* Function to handle DTrace traps during probes. See i386/i386/trap.c */ int -dtrace_trap(struct trapframe *frame) +dtrace_trap(struct trapframe *frame, u_int type) { /* * A trap can occur while DTrace executes a probe. Before From owner-p4-projects@FreeBSD.ORG Fri Feb 8 05:47:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 95A5616A419; Fri, 8 Feb 2008 05:47:33 +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 5AD3316A417 for ; Fri, 8 Feb 2008 05:47:33 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 36EB413C4F0 for ; Fri, 8 Feb 2008 05:47:33 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m185lWD8091489 for ; Fri, 8 Feb 2008 05:47:32 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m185lWjJ091486 for perforce@freebsd.org; Fri, 8 Feb 2008 05:47:32 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 05:47:32 GMT Message-Id: <200802080547.m185lWjJ091486@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135016 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 05:47:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=135016 Change 135016 by jb@jb_freebsd1 on 2008/02/08 05:47:05 Make a function static to match amd64 (and make the %^&# thing compile :-/ ) Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#9 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#9 (text+ko) ==== @@ -193,7 +193,7 @@ critical_exit(); } -void +static void dtrace_sync_func(void) { } From owner-p4-projects@FreeBSD.ORG Fri Feb 8 06:39:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 848C516A41B; Fri, 8 Feb 2008 06:39:30 +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 4935116A417 for ; Fri, 8 Feb 2008 06:39:30 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3D93A13C478 for ; Fri, 8 Feb 2008 06:39:30 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m186dUYF095358 for ; Fri, 8 Feb 2008 06:39:30 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m186dURA095351 for perforce@freebsd.org; Fri, 8 Feb 2008 06:39:30 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 06:39:30 GMT Message-Id: <200802080639.m186dURA095351@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135017 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 06:39:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=135017 Change 135017 by jb@jb_freebsd1 on 2008/02/08 06:38:38 Move smp_no_rendevous_barrier outside #ifdef SMP. It was coded as though that was the expected compile behaviour. I now need it to behave that way so that a kernel module built without knowledge of whether or not SMP is defined in the kernel will still work in both cases. Affected files ... .. //depot/projects/dtrace/src/sys/kern/subr_smp.c#10 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/subr_smp.c#10 (text+ko) ==== @@ -290,14 +290,6 @@ return 1; } -void -smp_no_rendevous_barrier(void *dummy) -{ -#ifdef SMP - KASSERT((!smp_started),("smp_no_rendevous called and smp is started")); -#endif -} - /* * All-CPU rendezvous. CPUs are signalled, all execute the setup function * (if specified), rendezvous, execute the action function (if specified), @@ -460,3 +452,11 @@ teardown_func(arg); } #endif /* SMP */ + +void +smp_no_rendevous_barrier(void *dummy) +{ +#ifdef SMP + KASSERT((!smp_started),("smp_no_rendevous called and smp is started")); +#endif +} From owner-p4-projects@FreeBSD.ORG Fri Feb 8 08:03:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 42EE416A41A; Fri, 8 Feb 2008 08:03:58 +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 E42FC16A417 for ; Fri, 8 Feb 2008 08:03:57 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D7F7E13C47E for ; Fri, 8 Feb 2008 08:03:57 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1883v58001908 for ; Fri, 8 Feb 2008 08:03:57 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1883v0G001905 for perforce@freebsd.org; Fri, 8 Feb 2008 08:03:57 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 8 Feb 2008 08:03:57 GMT Message-Id: <200802080803.m1883v0G001905@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135018 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 08:03:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=135018 Change 135018 by kmacy@kmacy:storage:toehead on 2008/02/08 08:03:39 shrink config file Affected files ... .. //depot/projects/toehead/sys/amd64/conf/GENERIC#6 edit Differences ... ==== //depot/projects/toehead/sys/amd64/conf/GENERIC#6 (text+ko) ==== @@ -25,6 +25,7 @@ #hints "GENERIC.hints" # Default places to look for devices. makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions MODULES_OVERRIDE="cxgb em" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption @@ -188,66 +189,13 @@ #device puc # PCI Ethernet NICs. -device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 adapter Gigabit Ethernet Card -device ixgb # Intel PRO/10GbE Ethernet Card -device le # AMD Am7900 LANCE and Am79C9xx PCnet -device txp # 3Com 3cR990 (``Typhoon'') -device vx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support -device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet -device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet -device dc # DEC/Intel 21143 and various workalikes -device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device lge # Level 1 LXT1001 gigabit Ethernet -device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet -device nfe # nVidia nForce MCP on-board Ethernet -device nge # NatSemi DP83820 gigabit Ethernet -#device nve # nVidia nForce MCP on-board Ethernet Networking -device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') -device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 -device sf # Adaptec AIC-6915 (``Starfire'') -device sis # Silicon Integrated Systems SiS 900/SiS 7016 -device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet -device ste # Sundance ST201 (D-Link DFE-550TX) -device ti # Alteon Networks Tigon I/II gigabit Ethernet -device tl # Texas Instruments ThunderLAN -device tx # SMC EtherPower II (83c170 ``EPIC'') -device vge # VIA VT612x gigabit Ethernet -device vr # VIA Rhine, Rhine II -device wb # Winbond W89C840F -device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') -# ISA Ethernet NICs. pccard NICs included. -device cs # Crystal Semiconductor CS89x0 NIC -# 'device ed' requires 'device miibus' -device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards -device ex # Intel EtherExpress Pro/10 and Pro/10+ -device ep # Etherlink III based cards -device fe # Fujitsu MB8696x based cards -device sn # SMC's 9000 series of Ethernet chips -device xe # Xircom pccard Ethernet - -# Wireless NIC cards -device wlan # 802.11 support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm -device wlan_scan_ap # 802.11 AP mode scanning -device wlan_scan_sta # 802.11 STA mode scanning -device an # Aironet 4500/4800 802.11 wireless NICs. -device ath # Atheros pci/cardbus NIC's -device ath_hal # Atheros HAL (Hardware Access Layer) -device ath_rate_sample # SampleRate tx rate control for ath -device awi # BayStack 660 and others -device ral # Ralink Technology RT2500 wireless NICs. -device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. # Pseudo devices. device loop # Network loopback @@ -279,8 +227,6 @@ device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse -device ural # Ralink Technology RT2500USB wireless NICs -device rum # Ralink Technology RT2501USB wireless NICs device urio # Diamond Rio 500 MP3 player device uscanner # Scanners # USB Serial devices @@ -314,11 +260,12 @@ options ALT_BREAK_TO_DEBUGGER -options ALQ -options KTR_ALQ -options KTR_COMPILE=(KTR_SCHED) -options KTR_CPUMASK=0x3 -options KTR_ENTRIES=8192 -options KTR_MASK=(KTR_SCHED) -options KTR_VERBOSE +options KTR +#options ALQ +#options KTR_ALQ +options KTR_COMPILE=(KTR_SPARE2) +options KTR_CPUMASK=0x7 +options KTR_ENTRIES=65536 +options KTR_MASK=(KTR_SPARE2) +#options KTR_VERBOSE From owner-p4-projects@FreeBSD.ORG Fri Feb 8 08:04:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6E80B16A469; Fri, 8 Feb 2008 08:04:59 +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 1B8E416A419 for ; Fri, 8 Feb 2008 08:04:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0FAEE13C457 for ; Fri, 8 Feb 2008 08:04:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1884wum001940 for ; Fri, 8 Feb 2008 08:04:58 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1884wvY001937 for perforce@freebsd.org; Fri, 8 Feb 2008 08:04:58 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 8 Feb 2008 08:04:58 GMT Message-Id: <200802080804.m1884wvY001937@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135019 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 08:04:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=135019 Change 135019 by kmacy@kmacy:storage:toehead on 2008/02/08 08:04:30 rebuild if ktr changes Affected files ... .. //depot/projects/toehead/sys/modules/cxgb/tom/Makefile#4 edit Differences ... ==== //depot/projects/toehead/sys/modules/cxgb/tom/Makefile#4 (text+ko) ==== @@ -6,7 +6,7 @@ SRCS= cxgb_tom.c cxgb_cpl_io.c cxgb_listen.c cxgb_tom_sysctl.c cxgb_cpl_socket.c SRCS+= cxgb_ddp.c cxgb_vm.c SRCS+= opt_compat.h opt_inet.h opt_inet6.h opt_ipsec.h opt_mac.h -SRCS+= opt_tcpdebug.h opt_ddb.h opt_global.h +SRCS+= opt_tcpdebug.h opt_ddb.h opt_global.h opt_ktr.h SRCS+= device_if.h bus_if.h pci_if.h #CFLAGS+= -DDEBUG_PRINT -DDEBUG From owner-p4-projects@FreeBSD.ORG Fri Feb 8 08:07:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A51A116A421; Fri, 8 Feb 2008 08:07:01 +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 526C616A418 for ; Fri, 8 Feb 2008 08:07:01 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4660813C469 for ; Fri, 8 Feb 2008 08:07:01 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18871NA002102 for ; Fri, 8 Feb 2008 08:07:01 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m188710G002099 for perforce@freebsd.org; Fri, 8 Feb 2008 08:07:01 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 8 Feb 2008 08:07:01 GMT Message-Id: <200802080807.m188710G002099@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135020 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 08:07:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=135020 Change 135020 by kmacy@kmacy:storage:toehead on 2008/02/08 08:06:33 make sure ppod_map is zeroed confirm that KTR is logging Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#7 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#7 (text+ko) ==== @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -140,7 +141,7 @@ { struct toepcb *toep; - toep = malloc(sizeof(struct toepcb), M_DEVBUF, M_NOWAIT); + toep = malloc(sizeof(struct toepcb), M_DEVBUF, M_NOWAIT|M_ZERO); if (toep == NULL) return (NULL); @@ -152,7 +153,6 @@ void toepcb_init(struct toepcb *toep) { - bzero(toep, sizeof(*toep)); toep->tp_refcount = 1; cv_init(&toep->tp_cv, "toep cv"); } @@ -203,9 +203,6 @@ struct toedev *tdev; struct adap_ports *port_info; - printf("%s called\n", __FUNCTION__); - - t = malloc(sizeof(*t), M_CXGB, M_NOWAIT|M_ZERO); if (t == NULL) @@ -353,6 +350,10 @@ t3_init_tunables(t); mtx_init(&t->listen_lock, "tom data listeners", NULL, MTX_DEF); + + printf("KTR_TOM=0x%x ktr_mask=0x%x KTR_COMPILE=0x%x doing test KTR entry now\n", KTR_TOM, ktr_mask, KTR_COMPILE); + CTR2(KTR_TOM, "t3_toe_attach dev=%p entry=%p", dev, entry); + /* Adjust TOE activation for this module */ t->conf.activated = activated; @@ -379,7 +380,7 @@ t->rx_page_size = rx_page_info.page_size; /* OK if this fails, we just can't do DDP */ t->nppods = (ddp.ulimit + 1 - ddp.llimit) / PPOD_SIZE; - t->ppod_map = malloc(t->nppods, M_DEVBUF, M_WAITOK); + t->ppod_map = malloc(t->nppods, M_DEVBUF, M_WAITOK|M_ZERO); mtx_init(&t->ppod_map_lock, "ppod map", NULL, MTX_DEF); @@ -440,19 +441,7 @@ t3_tom_init(void) { -#if 0 - struct socket *sock; - err = sock_create_kern(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock); - if (err < 0) { - printk(KERN_ERR "Could not create TCP socket, error %d\n", err); - return err; - } - t3_def_state_change = sock->sk->sk_state_change; - t3_def_data_ready = sock->sk->sk_data_ready; - t3_def_error_report = sock->sk->sk_error_report; - sock_release(sock); -#endif init_cpl_handlers(); if (t3_init_cpl_io() < 0) return -1; From owner-p4-projects@FreeBSD.ORG Fri Feb 8 08:09:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 373CE16A421; Fri, 8 Feb 2008 08:09:04 +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 D84E716A420 for ; Fri, 8 Feb 2008 08:09:03 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CB3BD13C474 for ; Fri, 8 Feb 2008 08:09:03 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m188932H002170 for ; Fri, 8 Feb 2008 08:09:03 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18893S4002167 for perforce@freebsd.org; Fri, 8 Feb 2008 08:09:03 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 8 Feb 2008 08:09:03 GMT Message-Id: <200802080809.m18893S4002167@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135021 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 08:09:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=135021 Change 135021 by kmacy@kmacy:storage:toehead on 2008/02/08 08:08:30 log tom related events to KTR to isolate issue in DDP strengthen sockbuf locking assertions around ddp state Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#16 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#7 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_defs.h#6 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#16 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -84,8 +85,6 @@ #include #include - - /* * For ULP connections HW may add headers, e.g., for digests, that aren't part * of the messages sent by the host but that are part of the TCP payload and @@ -151,7 +150,6 @@ #define cxgb_tcp_drop tcp_drop #endif - static inline void SBAPPEND(struct sockbuf *sb, struct mbuf *n) { @@ -318,9 +316,7 @@ } INP_LOCK_ASSERT(tp->t_inpcb); - SOCKBUF_LOCK(&so->so_snd); - d = TOM_DATA(TOE_DEV(so)); cdev = d->cdev; last = tail = so->so_snd.sb_sndptr ? so->so_snd.sb_sndptr : so->so_snd.sb_mb; @@ -645,10 +641,14 @@ toep->tp_enqueued_bytes = so->so_rcv.sb_cc; SOCKBUF_UNLOCK(&so->so_rcv); - if (credits > so->so_rcv.sb_mbmax) + if (credits > so->so_rcv.sb_mbmax) { printf("copied_seq=%u rcv_wup=%u credits=%u\n", toep->tp_copied_seq, toep->tp_rcv_wup, credits); - /* + credits = so->so_rcv.sb_mbmax; + } + + + /* * XXX this won't accurately reflect credit return - we need * to look at the difference between the amount that has been * put in the recv sockbuf and what is there now @@ -775,6 +775,9 @@ { struct cpl_set_tcb_field *req; + CTR4(KTR_TOM, "__set_tcb_field_ulp(tid=%u word=0x%x mask=%jx val=%jx", + toep->tp_tid, word, mask, val); + req = mtod(m, struct cpl_set_tcb_field *); m->m_pkthdr.len = m->m_len = sizeof(*req); req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); @@ -799,10 +802,12 @@ if (toep == NULL) return; - - if (tp->t_state == TCPS_CLOSED || (toep->tp_flags & TP_ABORT_SHUTDOWN)) + + if (tp->t_state == TCPS_CLOSED || (toep->tp_flags & TP_ABORT_SHUTDOWN)) { + printf("not seting field\n"); return; - + } + m = m_gethdr_nofail(sizeof(struct cpl_set_tcb_field)); __set_tcb_field(toep, m, word, mask, val, 1); @@ -873,10 +878,11 @@ static void t3_enable_ddp(struct socket *so, int on) { - if (on) + if (on) { + t3_set_tcb_field(so, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1), V_TF_DDP_OFF(0)); - else + } else t3_set_tcb_field(so, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | TP_DDP_TIMER_WORKAROUND_MASK, @@ -1663,6 +1669,7 @@ __be64 *tcb; so = toeptoso(toep); + tp = toep->tp_tp; SOCKBUF_LOCK(&so->so_rcv); /* Note that we only accout for CPL_GET_TCB issued by the DDP code. We @@ -1703,7 +1710,9 @@ "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u ddp_offset %u", tp->rcv_nxt, q->cur_buf, ddp_offset); #endif - + CTR3(KTR_TOM, "tcb_rpl_as_ddp_complete(seq=0x%x hwbuf=%u ddp_offset=%u", + tp->rcv_nxt, q->cur_buf, ddp_offset); + #if 0 { unsigned int ddp_flags, rcv_nxt, rx_hdr_offset, buf_idx; @@ -1794,7 +1803,6 @@ } KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); - tp = toep->tp_tp; m->m_ddp_gl = (unsigned char *)bsp->gl; m->m_flags |= M_DDP; m->m_seq = tp->rcv_nxt; @@ -1809,6 +1817,8 @@ "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u lskb->len %u", m->m_seq, q->cur_buf, m->m_pkthdr.len); #endif + CTR3(KTR_TOM, "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u m->m_pktlen %u", + m->m_seq, q->cur_buf, m->m_pkthdr.len); SBAPPEND(&so->so_rcv, m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) sorwakeup_locked(so); @@ -2170,7 +2180,12 @@ tp->rcv_nxt, bsp->cur_offset, ddp_report, G_DDP_OFFSET(ddp_report), skb->len); #endif - + CTR5(KTR_TOM, + "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u " + "ddp_report 0x%x offset %u, len %u", + tp->rcv_nxt, bsp->cur_offset, ddp_report, + G_DDP_OFFSET(ddp_report), m->m_len); + bsp->cur_offset += m->m_len; if (!(bsp->flags & DDP_BF_NOFLIP)) { @@ -2186,6 +2201,12 @@ tp->rcv_nxt, bsp->cur_offset, ddp_report, G_DDP_OFFSET(ddp_report)); #endif + CTR4(KTR_TOM, + "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u " + "ddp_report %u offset %u", + tp->rcv_nxt, bsp->cur_offset, ddp_report, + G_DDP_OFFSET(ddp_report)); + m->m_ddp_gl = (unsigned char *)bsp->gl; m->m_flags |= M_DDP; m->m_ddp_flags = (bsp->flags & DDP_BF_NOCOPY) | 1; @@ -3216,30 +3237,20 @@ DPRINTF("opt0l_status=%08x\n", rpl->opt0l_status); m_set_priority(reply_mbuf, mkprio(CPL_PRIORITY_SETUP, newtoep)); -#ifdef DEBUG_PRINT - { - int i; - - DPRINTF("rpl:\n"); - uint32_t *rplbuf = mtod(reply_mbuf, uint32_t *); - for (i = 0; i < sizeof(*rpl)/sizeof(uint32_t); i++) - DPRINTF("[%d] %08x\n", i, rplbuf[i]); - } -#endif - - l2t_send(cdev, reply_mbuf, e); m_free(m); - /* - * XXX this call path has to be converted to not depend on sockets - */ - if (newtoep->tp_ulp_mode) + if (newtoep->tp_ulp_mode) { + printf("setting ulp mode to DDP\n"); __set_tcb_field(newtoep, ddp_mbuf, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | TP_DDP_TIMER_WORKAROUND_MASK, V_TF_DDP_OFF(1) | - TP_DDP_TIMER_WORKAROUND_VAL, 1); + TP_DDP_TIMER_WORKAROUND_VAL, 1); + } else + printf("not offloading\n"); + + return; reject: @@ -3849,6 +3860,9 @@ unsigned int tid = toep->tp_tid; const struct tom_data *td = TOM_DATA(TOE_DEV(so)); unsigned int ppod_addr = tag * PPOD_SIZE + td->ddp_llimit; + + CTR6(KTR_TOM, "t3_setup_ppods(gl=%p nppods=%u tag=%u maxoff=%u pg_off=%u color=%u)", + gl, nppods, tag, maxoff, pg_off, color); for (i = 0; i < nppods; ++i) { m = m_gethdr_nofail(sizeof(*req) + PPOD_SIZE); @@ -3917,7 +3931,10 @@ unsigned int word, uint64_t mask, uint64_t val) { struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; - + + CTR4(KTR_TOM, "mk_set_tcb_field_ulp(tid=%u word=0x%x mask=%jx val=%jx", + tid, word, mask, val); + txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); @@ -3970,6 +3987,9 @@ req = (struct cpl_set_tcb_field *)(lock + 1); + CTR1(KTR_TOM, "t3_cancel_ddpbuf(bufidx=%u)", + bufidx); + /* Hmmm, not sure if this actually a good thing: reactivating * the other buffer might be an issue if it has been completed * already. However, that is unlikely, since the fact that the UBUF @@ -4028,6 +4048,8 @@ struct cpl_set_tcb_field *req; struct ddp_state *p = &toep->tp_ddp_state; + CTR4(KTR_TOM, "t3_setup_ppods(bufidx=%u tag0=%u tag1=%u len=%u)", + bufidx, tag0, tag1, len); SOCKBUF_LOCK_ASSERT(&toeptoso(toep)->so_rcv); wrlen = sizeof(*wr) + 3 * sizeof(*req) + sizeof(*getreq); m = m_gethdr_nofail(wrlen); @@ -4101,6 +4123,9 @@ struct work_request_hdr *wr; struct cpl_set_tcb_field *req; + CTR6(KTR_TOM, "t3_setup_ddpbufs(len0=%u offset0=%u len1=%u offset1=%u ddp_flags=0x%08x%08x ", + len0, offset0, len1, offset1, ddp_flags >> 32, ddp_flags & 0xffffffff); + SOCKBUF_LOCK_ASSERT(&toeptoso(toep)->so_rcv); wrlen = sizeof(*wr) + sizeof(*req) + (len0 ? sizeof(*req) : 0) + (len1 ? sizeof(*req) : 0) + ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#7 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -134,7 +135,7 @@ pg_off = addr & PAGE_MASK; npages = (pg_off + len + PAGE_SIZE - 1) >> PAGE_SHIFT; p = malloc(sizeof(struct ddp_gather_list) + npages * sizeof(vm_page_t *), - M_DEVBUF, M_NOWAIT); + M_DEVBUF, M_NOWAIT|M_ZERO); if (p == NULL) return (ENOMEM); @@ -229,6 +230,7 @@ int err, tag, npages, nppods; struct tom_data *d = TOM_DATA(TOE_DEV(so)); + SOCKBUF_LOCK_ASSERT(&so->so_rcv); npages = ((addr & PAGE_MASK) + len + PAGE_SIZE - 1) >> PAGE_SHIFT; nppods = min(pages2ppods(npages), MAX_PPODS); nppods = roundup2(nppods, PPOD_CLUSTER_SIZE); @@ -262,7 +264,8 @@ { struct toepcb *toep = sototcpcb(so)->t_toe; struct ddp_state *p = &toep->tp_ddp_state; - + + SOCKBUF_LOCK_ASSERT(&so->so_rcv); p->buf_state[bufidx].cur_offset = p->kbuf[bufidx]->dgl_offset; p->buf_state[bufidx].flags = p->kbuf_noinval ? DDP_BF_NOINVAL : 0; p->buf_state[bufidx].gl = p->kbuf[bufidx]; @@ -340,6 +343,7 @@ struct iovec *iov = uio->uio_iov; vm_offset_t addr = (vm_offset_t)iov->iov_base - oft; + SOCKBUF_LOCK_ASSERT(&so->so_rcv); if (__predict_false(p->ubuf_nppods == 0)) { err = alloc_buf1_ppods(so, p, addr, iov->iov_len + oft); if (err) @@ -385,6 +389,7 @@ if (p->ubuf == NULL) return; + SOCKBUF_LOCK_ASSERT(&so->so_rcv); p->cancel_ubuf = 1; while (ubuf_pending && !(so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED))) { #ifdef T3_TRACE @@ -394,6 +399,11 @@ p->buf_state[1].flags & (DDP_BF_NOFLIP | DDP_BF_NOCOPY), p->get_tcb_count); #endif + CTR3(KTR_TOM, + "t3_cancel_ubuf: flags0 0x%x flags1 0x%x get_tcb_count %d", + p->buf_state[0].flags & (DDP_BF_NOFLIP | DDP_BF_NOCOPY), + p->buf_state[1].flags & (DDP_BF_NOFLIP | DDP_BF_NOCOPY), + p->get_tcb_count); if (p->get_tcb_count == 0) t3_cancel_ddpbuf(toep, p->cur_buf); else { @@ -401,9 +411,9 @@ timeo = so->so_rcv.sb_timeo; flags = so->so_rcv.sb_flags; - so->so_rcv.sb_timeo = 3*hz; + so->so_rcv.sb_timeo = 30*hz; while (p->get_tcb_count && !(so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED))) { - if (count & 0xff) + if (count & 0xffffff) printf("waiting err=%d get_tcb_count=%d timeo=%d so=%p\n", err, p->get_tcb_count, so->so_rcv.sb_timeo, so); count++; @@ -441,6 +451,7 @@ return (EINVAL); } + SOCKBUF_LOCK_ASSERT(&so->so_rcv); err = setup_uio_ppods(so, uio, 0, &len); if (err) { return (err); @@ -485,6 +496,10 @@ " kbuf_idx %d", p->ubuf_tag, flags, OVERLAY_MASK, ubuf_idx, p->kbuf_idx); #endif + CTR5(KTR_TOM, + "t3_overlay_ubuf: tag %u flags 0x%x mask 0x%x ubuf_idx %d " + " kbuf_idx %d", + p->ubuf_tag, flags, OVERLAY_MASK, ubuf_idx, p->kbuf_idx); return (0); } @@ -555,6 +570,8 @@ T3_TRACE1(TIDTB(so), "t3_post_kbuf: cur_buf = kbuf_idx = %u ", p->cur_buf); #endif + CTR1(KTR_TOM, + "t3_post_kbuf: cur_buf = kbuf_idx = %u ", p->cur_buf); } /* @@ -571,9 +588,11 @@ struct ddp_state *p = &toep->tp_ddp_state; struct tom_data *d = TOM_DATA(toep->tp_toedev); + if (kbuf_size > M_TCB_RX_DDP_BUF0_LEN) return (EINVAL); + SOCKBUF_LOCK_ASSERT(&so->so_rcv); nonblock = (so->so_state & SS_NBIO); kbuf_pages = (kbuf_size + PAGE_SIZE - 1) >> PAGE_SHIFT; @@ -617,22 +636,25 @@ p->kbuf[idx]->phys_addr[i] = pci_map_page(p->pdev, p->kbuf[idx]->pages[i], 0, PAGE_SIZE, PCI_DMA_FROMDEVICE); -#endif +#endif t3_setup_ppods(so, p->kbuf[idx], nppods, p->kbuf_tag[idx], p->kbuf[idx]->dgl_length, 0, 0); } t3_set_ddp_tag(so, 0, p->kbuf_tag[0] << 6); t3_set_ddp_buf(so, 0, 0, p->kbuf[0]->dgl_length); t3_repost_kbuf(so, 0, 0, 1, nonblock); + t3_set_rcv_coalesce_enable(so, TOM_TUNABLE(TOE_DEV(so), ddp_rcvcoalesce)); - printf("ddp entered\n"); #ifdef T3_TRACE T3_TRACE4(TIDTB(so), "t3_enter_ddp: kbuf_size %u waitall %u tag0 %d tag1 %d", kbuf_size, waitall, p->kbuf_tag[0], p->kbuf_tag[1]); #endif + CTR4(KTR_TOM, + "t3_enter_ddp: kbuf_size %u waitall %u tag0 %d tag1 %d", + kbuf_size, waitall, p->kbuf_tag[0], p->kbuf_tag[1]); return (0); @@ -686,6 +708,8 @@ } memset(&td->ppod_map[i], 1, n); /* allocate range */ mtx_unlock(&td->ppod_map_lock); + CTR2(KTR_TOM, + "t3_alloc_ppods: n=%u tag=%u", n, i); *ptag = i; return (0); next: ; ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_defs.h#6 (text+ko) ==== @@ -43,7 +43,7 @@ #define TRACE_ENTER printf("%s:%s entered\n", __FUNCTION__, __FILE__) #define TRACE_EXIT printf("%s:%s:%d exited\n", __FUNCTION__, __FILE__, __LINE__) - +#define KTR_TOM KTR_SPARE2 struct toepcb; struct listen_ctx; From owner-p4-projects@FreeBSD.ORG Fri Feb 8 08:10:05 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C2A816A41A; Fri, 8 Feb 2008 08:10: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 CDA5216A419 for ; Fri, 8 Feb 2008 08:10:04 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C196B13C465 for ; Fri, 8 Feb 2008 08:10:04 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m188A4fI002262 for ; Fri, 8 Feb 2008 08:10:04 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m188A4IE002259 for perforce@freebsd.org; Fri, 8 Feb 2008 08:10:04 GMT (envelope-from imp@freebsd.org) Date: Fri, 8 Feb 2008 08:10:04 GMT Message-Id: <200802080810.m188A4IE002259@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135022 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 08:10:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=135022 Change 135022 by imp@imp_mbp on 2008/02/08 08:09:20 Update. These things are on my mind and I'm sick today. This means when I try to sleep, they replay over and over in my mind. Write them down. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/TODO#15 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/TODO#15 (text+ko) ==== @@ -20,7 +20,9 @@ the juniper-mips dump. o cpu init o Double check last merge from mips2 -> cavium code. Something seems wrong - in one of the edits. + in one of the edits. Gonzo suggests looking at DO_AST macro. +o Look at what the macro to set the per cpu data pointer will be like, and also + verify we use this macro in all cases where we currently access pcpu today. o In the juniper vendor tree, gdb support just showed up. Merge it into mips2-jnpr. o splhigh still around, is it needed? @@ -38,7 +40,7 @@ o RAMDISK support o Network driver works only on the 36XX sim. It dies in various ways on the different models. Do we wait for a better code drop from Cavium or fix - this ourselves? + this ourselves? It also seems to kinda work on the 38XX sim too. o Can't boot on 5600 sim. o We die on first vm reference on the real CN3800-EVB-xxxx that I have. From owner-p4-projects@FreeBSD.ORG Fri Feb 8 08:29:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B3F7616A41B; Fri, 8 Feb 2008 08:29: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 611C416A419 for ; Fri, 8 Feb 2008 08:29:25 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 54D5713C442 for ; Fri, 8 Feb 2008 08:29:25 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m188TPc7003766 for ; Fri, 8 Feb 2008 08:29:25 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m188TPmP003763 for perforce@freebsd.org; Fri, 8 Feb 2008 08:29:25 GMT (envelope-from imp@freebsd.org) Date: Fri, 8 Feb 2008 08:29:25 GMT Message-Id: <200802080829.m188TPmP003763@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135023 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 08:29:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=135023 Change 135023 by imp@imp_mbp on 2008/02/08 08:28:24 More mind weasils ripping apart the flesh of my brain. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/TODO#16 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/TODO#16 (text+ko) ==== @@ -6,19 +6,24 @@ o Can we remove pre-ansi stuff o unify cpu.h vs cpureg.h o Look for old vestiges of the array of args for p->p_regs[] and also comments - about same. Struct reg, fpgreg seem OBE too. + about same. Struct reg, fpgreg seem OBE too. On the other hand, keeping + constants unified between the two different conventions is a pain and we are + having some data corruption issues for reasons unknown on the MALTA + simulation at the moment. o Look at the differences between the trampoline code between the two versions as this may lead to problems. Specifically, we have sigcode encoded into locore.S, and some code in sigreturn in pm_machdep.c. Not sure where things are in libc. o Don't forget John Baldwin's comments on the user switch stuff. XXX add more - here XXX + here XXX This is mostly down to AST things. o What's defined in assym.s and param.h varies somewhat between the two code strains. Figure out why and how to resolve. o machdep getmemsize() really is OBE. Except for the mips_wired_tlb variable setting, which is related to something that was omitted from the juniper-mips dump. -o cpu init +o cpu init ??? DONE ???? +o we have a lot of memory from 0x80001000-0x81000000 that's currently + wasted. We should feed it to the vm system so as not to waste it. o Double check last merge from mips2 -> cavium code. Something seems wrong in one of the edits. Gonzo suggests looking at DO_AST macro. o Look at what the macro to set the per cpu data pointer will be like, and also From owner-p4-projects@FreeBSD.ORG Fri Feb 8 09:17:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DB41D16A41B; Fri, 8 Feb 2008 09:17: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 96C9216A417 for ; Fri, 8 Feb 2008 09:17:15 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 86BF913C4E9 for ; Fri, 8 Feb 2008 09:17:15 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m189HFsr016525 for ; Fri, 8 Feb 2008 09:17:15 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m189HFj6016522 for perforce@freebsd.org; Fri, 8 Feb 2008 09:17:15 GMT (envelope-from imp@freebsd.org) Date: Fri, 8 Feb 2008 09:17:15 GMT Message-Id: <200802080917.m189HFj6016522@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135026 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 09:17:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=135026 Change 135026 by imp@imp_paco-paco on 2008/02/08 09:16:18 Blindly move the #defines needed for the setjmp/longjmp userland pieces to compile over from mips2. Hope for the best... Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#9 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#9 (text+ko) ==== @@ -475,4 +475,52 @@ lw reg, _C_LABEL(pcpup); #endif +/* + * Description of the setjmp buffer + * + * word 0 magic number (dependant on creator) + * 1 RA + * 2 S0 + * 3 S1 + * 4 S2 + * 5 S3 + * 6 S4 + * 7 S5 + * 8 S6 + * 9 S7 + * 10 SP + * 11 S8 + * 12 signal mask (dependant on magic) + * 13 (con't) + * 14 (con't) + * 15 (con't) + * + * The magic number number identifies the jmp_buf and + * how the buffer was created as well as providing + * a sanity check + * + */ + +#define _JB_MAGIC__SETJMP 0xBADFACED +#define _JB_MAGIC_SETJMP 0xFACEDBAD + +/* Valid for all jmp_buf's */ + +#define _JB_MAGIC 0 +#define _JB_REG_RA 1 +#define _JB_REG_S0 2 +#define _JB_REG_S1 3 +#define _JB_REG_S2 4 +#define _JB_REG_S3 5 +#define _JB_REG_S4 6 +#define _JB_REG_S5 7 +#define _JB_REG_S6 8 +#define _JB_REG_S7 9 +#define _JB_REG_SP 10 +#define _JB_REG_S8 11 + +/* Only valid with the _JB_MAGIC_SETJMP magic */ + +#define _JB_SIGMASK 12 + #endif /* !_MACHINE_ASM_H_ */ From owner-p4-projects@FreeBSD.ORG Fri Feb 8 09:17:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5169516A530; Fri, 8 Feb 2008 09:17:16 +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 05F7F16A4A1 for ; Fri, 8 Feb 2008 09:17:15 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CCDE113C4EF for ; Fri, 8 Feb 2008 09:17:15 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m189HFG8016532 for ; Fri, 8 Feb 2008 09:17:15 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m189HF0o016528 for perforce@freebsd.org; Fri, 8 Feb 2008 09:17:15 GMT (envelope-from imp@freebsd.org) Date: Fri, 8 Feb 2008 09:17:15 GMT Message-Id: <200802080917.m189HF0o016528@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135027 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 09:17:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=135027 Change 135027 by imp@imp_lighthouse on 2008/02/08 09:16:43 First cut at implementing gonzo's suggestions for AST handling. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#10 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#12 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/genassym.c#6 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#13 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#10 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#10 (text+ko) ==== @@ -304,6 +304,26 @@ .align 3 /* + * Call ast if required + */ +#define DO_AST \ + GET_CPU_PCPU(k1) \ + lw k1, PC_CURTHREAD(k1); \ + lw t0, TD_FLAGS(k1); \ + and t0, t0, (TDF_ASTPENDING|TDF_NEEDRESCHED); \ + beq t0, zero, 27f; \ + nop; \ + lw k1, TD_FRAME(k1); \ + lw t0, TF_REG_SR(k1); \ + and t0, t0, SR_KSU_USER; \ + beq t0, zero, 27f; \ + nop; \ + move a0, k1; \ + jal ast; \ + nop; \ +27: + +/* * XXX retain dialects XXX */ #define ALEAF(x) XLEAF(x) ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#12 (text+ko) ==== @@ -382,10 +382,14 @@ jalr k0 sw a3, STAND_RA_OFFSET + KERN_REG_SIZE(sp) # for debugging + .set at + /* A call to AST would step on v0, I think, do we need to save it? */ + DO_AST + .set noat + RESTORE_CPU # v0 contains the return address. sync eret - .set at END(MipsKernGenException) @@ -581,6 +585,7 @@ la k0, _C_LABEL(cpu_intr) jalr k0 sw a3, STAND_RA_OFFSET + KERN_REG_SIZE(sp) + /* Why no AST processing here? */ /* * Restore registers and return from the interrupt. */ @@ -666,6 +671,7 @@ jalr k0 sw a3, STAND_RA_OFFSET(sp) # for debugging + DO_AST /* * Since interrupts are enabled at this point, we use a1 instead of * k0 or k1 to store the PCB pointer. This is because k0 and k1 ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/genassym.c#6 (text+ko) ==== @@ -68,6 +68,9 @@ ASSYM(TD_REALKSTACK, offsetof(struct thread, td_md.md_realstack)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); +ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); + +ASSYM(TF_REG_SR, offsetof(struct trapframe, sr)); ASSYM(U_PCB_REGS, offsetof(struct pcb, pcb_regs.zero)); ASSYM(U_PCB_CONTEXT, offsetof(struct pcb, pcb_context)); ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#13 (text+ko) ==== @@ -161,6 +161,8 @@ jal _C_LABEL(fork_exit) move a2,s2 #BDSlot + DO_AST + /* * Since interrupts are enabled at this point, we use a1 instead of * k0 or k1 to store the PCB pointer. This is because k0 and k1 ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#10 (text+ko) ==== @@ -828,49 +828,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); - /* - * XXX ast still need to happen - * - * Mail from jhb@: - * - * ast() is also still relevant in 7 as well. What - * normally happens is that you have the following in - * assembly: - * - * trap_entry: - * setup regs - * call trap - * jmp exittrap - * - * syscall_entry: - * setup regs - * call syscall - * jmp exittrap - * - * exittrap: - * get ready to return from trap - * disable interrupts - * if returning to kernel jmp kernel - * asts: - * if no ASTs are pending jmp kernel - * enable interrupts - * call ast - * disable interrupts - * jmp asts - * kernel: - * restore registers - * reti - * - * or some such. You could do it in C if you wanted, - * but the idea is you want to only return to userland - * once you've verified you have no ASTs with - * interrupts disabled. If you get any AST's while - * returning to userland it's due to SMP and you will - * get an IPI that will post with 'reti' finishes. - */ - if (curthread->td_flags & (TDF_ASTPENDING|TDF_NEEDRESCHED)) { - ast(trapframe); - } return (trapframe->pc); } From owner-p4-projects@FreeBSD.ORG Fri Feb 8 11:31:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 05CB316A543; Fri, 8 Feb 2008 11:31: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 BDB3F16A51E for ; Fri, 8 Feb 2008 11:31:19 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AE73913C45B for ; Fri, 8 Feb 2008 11:31:19 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18BVJcQ035013 for ; Fri, 8 Feb 2008 11:31:19 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18BVJDq035010 for perforce@freebsd.org; Fri, 8 Feb 2008 11:31:19 GMT (envelope-from pgj@FreeBSD.org) Date: Fri, 8 Feb 2008 11:31:19 GMT Message-Id: <200802081131.m18BVJDq035010@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Cc: Subject: PERFORCE change 135032 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 11:31:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=135032 Change 135032 by pgj@disznohal on 2008/02/08 11:30:28 Add initial Hungarian translation of Chapter 18: Storage. Affected files ... .. //depot/projects/docproj_hu/books/handbook/disks/chapter.sgml#3 edit Differences ... ==== //depot/projects/docproj_hu/books/handbook/disks/chapter.sgml#3 (text+ko) ==== @@ -4,128 +4,165 @@ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml,v 1.281 2008/01/22 16:45:19 trhodes Exp $ --> - - Storage + + + + Háttértárak - Synopsis + Áttekintés + Ez a fejezet arról szól, hogy miként + használjuk a lemezeinket a &os;-vel. Itt többek + közt szó esik a memória (alapú) + lemezekrõl, a hálózaton keresztül + csatlakoztatott meghajtókról, a szabványos + SCSI/IDE tárolóeszközökrõl és + az USB felületet használó + eszközökrõl. - This chapter covers the use of disks in FreeBSD. This - includes memory-backed disks, network-attached disks, - standard SCSI/IDE storage devices, and devices using the USB - interface. + A fejezet elolvasása során + megismerjük: - After reading this chapter, you will know: - The terminology FreeBSD uses to describe the - organization of data on a physical disk (partitions and slices). + + a &os; által alkalmazott + terminológiát, amivel a fizikai lemezeken + elhelyezkedõ adatokat írja le + (partíciók és slice-ok) + + + hogyan bõvítsük rendszerünket + további merevlemezekkel - How to add additional hard disks to your system. + + hogyan állítsuk be a &os;-t USB + tárolóeszközök + használatára - How to configure &os; to use USB storage devices. + hogyan állítsunk be virtuális + állományrendszereket, például + memórialemezeket - How to set up virtual file systems, such as memory - disks. - How to use quotas to limit disk space usage. + hogyan használjuk a kvótákat a + lemezterület használatának + korlátozására - How to encrypt disks to secure them against attackers. + hogyan védjüket meg lemezeinket + titkosítással az + illetéktelenektõl - How to create and burn CDs and DVDs on FreeBSD. + &os; alatt hogyan készítsünk és + írjuk ki CD-ket, DVD-ket - The various storage media options for backups. + a biztonsági mentés + készítésének + különbözõ lehetõségeit - How to use backup programs available under FreeBSD. + hogyan használjuk a &os; alatt + rendelkezésünkre álló, + biztonsági mentést készítõ + programokat - How to backup to floppy disks. + hogyan mentsünk floppy lemezekre - What file system snapshots are and how to use them efficiently. + mik az állományrendszerek + pillanatképei és hogyan kell ezeket + hatékonyan használni - Before reading this chapter, you should: + A fejezet elolvasásához ajánlott: - Know how to configure and install a new FreeBSD kernel - (). + a &os; rendszermag + beállításának és + telepítésének ismerete () - Device Names + Az eszközök elnevezései - The following is a list of physical storage devices - supported in FreeBSD, and the device names associated with - them. + A most következõ listában felsoroljuk a &os; + által ismert fizikai tárolóeszközöket + és a hozzájuk tartozó + elnevezéseket. - Physical Disk Naming Conventions + A fizikai lemezek elnevezésének + szabályai - Drive type - Drive device name + A meghajtó típusa + A meghajtóeszköz neve - IDE hard drives + IDE merevlemezek ad - IDE CDROM drives + IDE CD-meghajtók acd - SCSI hard drives and USB Mass storage devices + SCSI merevlemezek és USB + tárolóeszközök da - SCSI CDROM drives + SCSI CD-meghajtók cd - Assorted non-standard CDROM drives - mcd for Mitsumi CD-ROM and - scd for Sony CD-ROM devices + Különbözõ nem szabványos + CD-meghajtók + mcd (Mitsumi CD-ROM) és + scd (Sony CD-ROM) - Floppy drives + Floppy meghajtók fd - SCSI tape drives + SCSI szalagos meghajtók sa - + - IDE tape drives + IDE szalagos meghajtók ast - Flash drives - fla for &diskonchip; Flash device + Flash meghajtó + fla (&diskonchip; Flash + eszköz) - RAID drives - aacd for &adaptec; AdvancedRAID, - mlxd and mlyd - for &mylex;, - amrd for AMI &megaraid;, - idad for Compaq Smart RAID, - twed for &tm.3ware; RAID. + RAID meghajtók + aacd (&adaptec; AdvancedRAID), + mlxd és mlyd + (&mylex;), amrd (AMI &megaraid;), + idad (Compaq Smart RAID), + twed (&tm.3ware; RAID). @@ -138,209 +175,304 @@ David O'Brien - Originally contributed by + Eredetileg írta: - - Adding Disks + Lemezek hozzáadása - disks - adding + lemezek + hozzáadás - Lets say we want to add a new SCSI disk to a machine that - currently only has a single drive. First turn off the computer - and install the drive in the computer following the instructions - of the computer, controller, and drive manufacturer. Due to the - wide variations of procedures to do this, the details are beyond - the scope of this document. + Tegyük fel, hogy a jelenleg egyetlen meghajtót + tartalmazó rendszerünket szeretnénk + bõvíteni egy új SCSI lemez + hozzáadásával. Ehhez elsõként + kapcsoljuk ki a számítógépünket + és szereljük be a helyére az új + meghajtót a számítógép, a + lemezvezérlõ és a meghajtó + gyártójának utasításai + alapján. Mivel ezt a mûveletet rengeteg módon + lehet elvégezni, ezért ennek pontos + részleteivel ez a leírás most nem + foglalkozik. - Login as user root. After you have installed the - drive, inspect /var/run/dmesg.boot to ensure the new - disk was found. Continuing with our example, the newly added drive will - be da1 and we want to mount it on - /1 (if you are adding an IDE drive, the device name - will be ad1). + Jelentkezzünk be root + felhasználóként. Miután + beszereltük a meghajtót, a + /var/run/dmesg.boot állomány + végignézésével bizonyosodjuk meg + róla, hogy a rendszer valóban megtalálta a + lemezt. A példánk szerint ez a meghajtó + tehát a da1 nevet fogja viselni, + amit a /1 könyvtárba akarunk + csatlakoztatni (ha IDE meghajtót telepítünk, + akkor a hozzátartozó eszköz neve + ad1 lesz). - partitions - slices + partíciók + slice-ok fdisk - FreeBSD runs on IBM-PC compatible computers, therefore it must - take into account the PC BIOS partitions. These are different - from the traditional BSD partitions. A PC disk has up to four - BIOS partition entries. If the disk is going to be truly - dedicated to FreeBSD, you can use the - dedicated mode. Otherwise, FreeBSD will - have to live within one of the PC BIOS partitions. FreeBSD - calls the PC BIOS partitions slices so as - not to confuse them with traditional BSD partitions. You may - also use slices on a disk that is dedicated to FreeBSD, but used - in a computer that also has another operating system installed. - This is a good way to avoid confusing the fdisk utility of - other, non-FreeBSD operating systems. + Mivel a &os; IBM PC kompatibilis + számítógépeken fut, ezért nem + szabad figyelmen kívül hagynunk a PC BIOS + partícióit is. Ezek eltérnek a + hagyományos BSD partícióktól. Egy + PC-s lemeznek négy BIOS-os + partícióbejegyzése lehet. Ha egy lemezt + tényleg csak a &os;-nek szánunk, akkor + használhatjuk az ún. + dedikált módot. Minden + más esetben a &os;-nek egy PC BIOS + partícióban kell elhelyezkednie. A &os; a PC BIOS + partícióit slice-nak nevezi, + ezzel különbözteti ezeket a hagyományos BSD + partícióktól. Dedikált esetekben is + használhatjuk, de elsõsorban akkor kap fontosabb + szerepet, amikor a &os;-nek más operációs + rendszerekkel kell megosztani a helyet. Ezzel el tudjuk + kerülni, hogy a más operációs + rendszerekben megtalálható, nem &os; alapú + fdisk parancs megzavarodjon. - In the slice case the drive will be added as - /dev/da1s1e. This is read as: SCSI disk, - unit number 1 (second SCSI disk), slice 1 (PC BIOS partition 1), - and e BSD partition. In the dedicated - case, the drive will be added simply as - /dev/da1e. + A slice-ok használatakor a meghajtó + /dev/da1s1e néven kerül + hozzáadásra. Így kell olvasni: egyes SCSI + lemezes egység (második SCSI lemez), elsõ slice + (elsõ PC BIOS partíció) és + e BSD partíció. A + dedikált esetben a meghajtó neve viszont + egyszerûen csak /dev/da1e. - Due to the use of 32-bit integers to store the number of sectors, - &man.bsdlabel.8; is - limited to 2^32-1 sectors per disk or 2TB in most cases. The - &man.fdisk.8; format allows a starting sector of no more than - 2^32-1 and a length of no more than 2^32-1, limiting partitions to - 2TB and disks to 4TB in most cases. The &man.sunlabel.8; format - is limited to 2^32-1 sectors per partition and 8 partitions for - a total of 16TB. For larger disks, &man.gpt.8; partitions may be - used. + Mivel a &man.bsdlabel.8; 32 bites egész számokat + használ a szektorok számának + tárolására, ezért lemezenként + csak 2^32-1 szektort tud ábrázolni, ami az esetek + többségében 2 TB méretû + címezhetõ területet jelent. Az &man.fdisk.8; + formátuma szerint sem a kezdõszektor, sem a hossz nem + lehet 2^32-1-nél több, amivel a + partíciókat 2 TB, a lemezeket pedig 4 TB + méretûre korlátozza. A &man.sunlabel.8; + formátuma partíciónként 2^32-1 + szektort enged meg és összes 8 + partíciót, ami 16 TB terület + lefedését teszi lehetõvé. Nagyobb + lemezekhez &man.gpt.8; partíciók + használatosak. - Using &man.sysinstall.8; + A &man.sysinstall.8; használatával + - sysinstall - adding disks + sysinstall + lemezek hozzáadása su - Navigating <application>Sysinstall</application> + Közlekedés a + <application>sysinstall</application>ban - You may use sysinstall to - partition and label a new disk using its easy to use menus. - Either login as user root or use the - su command. Run - sysinstall and enter the - Configure menu. Within the - FreeBSD Configuration Menu, scroll down and - select the Fdisk option. + A sysinstall könnyen + használható menüinek + segítségével az új lemezen + pillanatok alatt létre tudunk hozni + partíciókat és + megcímkézni ezeket. Ehhez vagy + root + felhasználóként jelentkezzünk be a + rendszerbe vagy adjuk ki a su parancsot. + A sysinstall parancs kiadása + után lépjünk be a + Configure + (Beállítások) menübe. A + &os; Configuration Menu menüben + ezután keressük meg és válasszuk + ki az Fdisk menüpontot. - <application>fdisk</application> Partition Editor - Once inside fdisk, typing A will - use the entire disk for FreeBSD. When asked if you want to - remain cooperative with any future possible operating - systems, answer YES. Write the - changes to the disk using W. Now exit the - FDISK editor by typing q. Next you will be - asked about the Master Boot Record. Since you are adding a - disk to an already running system, choose - None. + Az <application>fdisk</application> + partíciószerkesztõ + + Miután eljutottunk az + fdisk alkalmazáshoz, az + A lenyomásával + felajánlhatjuk az egész lemezt a &os; + számára. Amikor elõkerül a + kérdés, hogy remain cooperative with + any future possible operating systems + (együttmûködõképes maradjon-e a + késõbbiekben telepítendõ + operációs rendszerekkel), akkor + válaszoljuk rá YES-szel + (tehát igen). A W gomb + lenyomásával írjuk a lemezre a most + elvégzett változtatásokat. + Ezután már a q + használatával ki is léphetünk az + FDISK szerkesztõbõl. A következõ + lépésben a Master Boot + Record-ról fognak minket megkérdezni. + Mivel most egy már mûködõ rendszert + bõvítünk, ezért a válaszunk + erre None lesz. - Disk Label Editor - BSD partitions + A lemezcímkék szerkesztése + BSD partíciók - Next, you need to exit sysinstall - and start it again. Follow the directions above, although this - time choose the Label option. This will - enter the Disk Label Editor. This - is where you will create the traditional BSD partitions. A - disk can have up to eight partitions, labeled - a-h. - A few of the partition labels have special uses. The - a partition is used for the root partition - (/). Thus only your system disk (e.g, - the disk you boot from) should have an a - partition. The b partition is used for - swap partitions, and you may have many disks with swap - partitions. The c partition addresses the - entire disk in dedicated mode, or the entire FreeBSD slice in - slice mode. The other partitions are for general use. + Most lépjünk ki a + sysinstall + alkalmazásból és indítsuk el + újra. Kövessük az iménti + útmutatásokat, de ezúttal a + Label menüpontot válasszuk + ki. Ezzel a Disk Label Editor-ba vagyis + a lemezcímkék szerkesztõjéhez + jutunk. Itt fogjuk létrehozni a hagyományos + BSD partíciókat. Egy lemezen nyolc ilyen + partíció lehet, + a-tól h-ig. + Közülük néhány + partíció címkéjét + megkülönböztetjük. Az + a partíció jelöli a + rendszer indításához használt + partíciót, a + gyökérpartíciót + (/). Tehát a + partíció csak a rendszerlemezünkön + szerepelhet (tehát ahonnan indul a rendszer). A + b partíció a + lapozáshoz használt partíciókat + jelöli és több lemezen is szerepelhet. A + c partíción keresztül + lehet elérni az egészt lemezt dedikált + módban vagy az egész &os; slice-ot slice + módban. A többi partíció + tetszõlegesen felhasználható. - sysinstall's Label editor - favors the e - partition for non-root, non-swap partitions. Within the - Label editor, create a single file system by typing - C. When prompted if this will be a FS - (file system) or swap, choose FS and type in a - mount point (e.g, /mnt). When adding a - disk in post-install mode, sysinstall - will not create entries - in /etc/fstab for you, so the mount point - you specify is not important. + A sysinstall + címkeszerkesztõje az e + betûvel szereti megjelölni a sem nem + rendszerindító, sem lapozó + partíciókat. A címkeszerkesztõben + egyetlen állományrendszert a + C lenyomásával lehet + készíteni. Amikor erre válaszul + megkérdezi a típusát (FS + (állományrendszer) vagy swap + (lapozóterület) legyen), akkor válasszuk + az FS-t és adjuk meg a + csatlakozási pontját (pl. + /mnt). Amikor a lemezt + telepítés után (post-install) adjuk + hozzá, akkor a sysinstall + valójában nem hoz létre hozzá + bejegyzéseket az /etc/fstab + állományban, ezért a + csatlakozási pont megadása nem is + feltétlenül fontos. - You are now ready to write the new label to the disk and - create a file system on it. Do this by typing - W. Ignore any errors from - sysinstall that - it could not mount the new partition. Exit the Label Editor - and sysinstall completely. + Most már készen állunk arra, hogy + rögzítsük az új címkét a + lemezre és létrehozzunk vele egy + állományrendszert. Ehhez nyomjuk le a + W gombot. Ne foglalkozzunk vele, ha + a sysinstall nem képes + csatlakoztatni az új partíciót. Ha + ezzel megvagyunk, akkor lépjünk ki a + címkeszerkesztõbõl és a + sysinstallból is. - Finish + Befejezés - The last step is to edit /etc/fstab - to add an entry for your new disk. + Most már csak annyi teendõnk maradt, hogy + felvegyük az /etc/fstab + állományba az új lemezhez + tartozó bejegyzést. - Using Command Line Utilities + Parancssoros eszközök + használatával - Using Slices + Slice módban - This setup will allow your disk to work correctly with - other operating systems that might be installed on your - computer and will not confuse other operating systems' - fdisk utilities. It is recommended - to use this method for new disk installs. Only use - dedicated mode if you have a good reason - to do so! + Ezzel a beállítással a + lemezünkre késõbb más + operációs rendszereket is + telepíthetünk és nem okoz gondot a + saját fdisk segédprogramjaik + mûködésében. Az új lemezek + telepítésénél ezt a módszer + ajánlatos követni. A dedikált módot + viszont csak abban az esetben használjuk, ha erre + nyomós okunk van! &prompt.root; dd if=/dev/zero of=/dev/da1 bs=1k count=1 -&prompt.root; fdisk -BI da1 #Initialize your new disk -&prompt.root; bsdlabel -B -w da1s1 auto #Label it. -&prompt.root; bsdlabel -e da1s1 # Edit the bsdlabel just created and add any partitions. +&prompt.root; fdisk -BI da1 # inicializáljuk az új lemezt +&prompt.root; bsdlabel -B -w da1s1 auto # címkézzük meg +&prompt.root; bsdlabel -e da1s1 # szerkeszzük át a frissen létrehozott címkét és vegyünk fel egy új partíciót &prompt.root; mkdir -p /1 -&prompt.root; newfs /dev/da1s1e # Repeat this for every partition you created. -&prompt.root; mount /dev/da1s1e /1 # Mount the partition(s) -&prompt.root; vi /etc/fstab # Add the appropriate entry/entries to your /etc/fstab. +&prompt.root; newfs /dev/da1s1e # ismételjük meg minden létrehozott partícióhoz +&prompt.root; mount /dev/da1s1e /1 # csatlakoztassuk a partíció(ka)t +&prompt.root; vi /etc/fstab # vegyük fel a megfelelõ bejegyzés(eke)t az /etc/fstab állományba + + IDE lemezek esetén azad + eszközt a da eszközzel + helyettesítsük. - If you have an IDE disk, substitute ad - for da. - Dedicated + Dedikált módban OS/2 - If you will not be sharing the new drive with another operating - system, you may use the dedicated mode. Remember - this mode can confuse Microsoft operating systems; however, no damage - will be done by them. IBM's &os2; however, will - appropriate any partition it finds which it does not - understand. + Amennyiben az új meghajtót nem akarjuk + megosztani egyetlen más operációs + rendszerrel sem, használhatjuk a + dedicated (dedikált) módot. + Ne felejtsük el azonban, hogy ez képes + összezavarni a Microsoft operációs + rendszereit, habár ebbõl semmilyen kárunk + nem fog származni. Az IBM &os2; + operációs rendszere azonban + kisajátít minden olyan + partíciót, amit nem tud olvasni. &prompt.root; dd if=/dev/zero of=/dev/da1 bs=1k count=1 &prompt.root; bsdlabel -Bw da1 auto -&prompt.root; bsdlabel -e da1 # create the `e' partition +&prompt.root; bsdlabel -e da1 # létrehozzuk az `e' partíciót &prompt.root; newfs -d0 /dev/da1e &prompt.root; mkdir -p /1 -&prompt.root; vi /etc/fstab # add an entry for /dev/da1e +&prompt.root; vi /etc/fstab # felvesszük a /dev/da1e partíciót &prompt.root; mount /1 - An alternate method is: + Egy másik megoldás: &prompt.root; dd if=/dev/zero of=/dev/da1 count=2 &prompt.root; bsdlabel /dev/da1 | bsdlabel -BR da1 /dev/stdin &prompt.root; newfs /dev/da1e &prompt.root; mkdir -p /1 -&prompt.root; vi /etc/fstab # add an entry for /dev/da1e +&prompt.root; vi /etc/fstab # felvesszük a /dev/da1e partíciót &prompt.root; mount /1 @@ -351,7 +483,7 @@ RAID - Software RAID + Szoftveres RAID @@ -359,128 +491,186 @@ Christopher Shumway - Original work by + Eredetileg készítette: Jim Brown - Revised by + Ellenõrizte: -RAIDsoftware +RAIDszoftveres RAIDCCD - Concatenated Disk Driver (CCD) Configuration - When choosing a mass storage solution the most important - factors to consider are speed, reliability, and cost. It is - rare to have all three in balance; normally a fast, reliable mass - storage device is expensive, and to cut back on cost either speed - or reliability must be sacrificed. + Összefûzött lemezek + beállítása - In designing the system described below, cost was chosen - as the most important factor, followed by speed, then reliability. - Data transfer speed for this system is ultimately - constrained by the network. And while reliability is very important, - the CCD drive described below serves online data that is already - fully backed up on CD-R's and can easily be replaced. + A nagyobb méretû + háttértárolók + kiválasztásánál a legfontosabb + tényezõk a sebesség, + megbízhatóság és a + költség. Nagyon ritkán lehet csak ezt a + hármat egyensúlyba hozni: + általában a gyors és + megbízható + tárolóeszközök sok pénzbe + kerülnek, valamint a költségek + megtakarításához vagy a sebességet + vagy pedig a megbízhatóságot kell + feláldoznunk. - Defining your own requirements is the first step - in choosing a mass storage solution. If your requirements prefer - speed or reliability over cost, your solution will differ from - the system described in this section. + A továbbiakban egy olyan rendszert mutatunk be, + ahol a elsõsorban a költségek, majd csak + ezután a sebesség és + megbízhatóság kerültek + elõtérben. A rendszer adatátviteli + sebességét a hálózat + korlátozza. Habár emellett a + megbízhatóság is nagyon fontos, a + tárgyalt összefûzött meghajtó + (Concenated Disk, CCD) csak adatokat szolgáltat + és a teljes tartalma bármikor + visszaállítható, mivel + rendelkezésre áll CD-n. + A feladat elvégzésére alkalmas + háttértároló + kiválasztásában elsõként a + saját elvárásainkat kell tudnunk + megfogalmazni. Ha nekünk jobban számít az + árnál a sebesség vagy a + megbízhatóság, akkor a + mostaniaktól némileg eltérõ + konfigurációt kell majd + építenünk. - Installing the Hardware + A hardver telepítése - In addition to the IDE system disk, three Western - Digital 30GB, 5400 RPM IDE disks form the core - of the CCD disk described below providing approximately - 90GB of online storage. Ideally, - each IDE disk would have its own IDE controller - and cable, but to minimize cost, additional - IDE controllers were not used. Instead the disks were - configured with jumpers so that each IDE controller has - one master, and one slave. + A rendszert tartalmazó IDE lemez mellett + három darab, egyenként 30 GB-os 5400-as + percenkénti fordulatszámú Western + Digital gyártmányú merevlemez alkotja + majd a létrehozni kívánt, kb. 90 GB + összméretû összefûzött + lemezt. Ideális esetben minden IDE lemez + saját külön vezérlõn és + kábelen van, de a költségek + csökkentése miatt nem használtunk + további IDE-vezérlõket. Ehelyett + inkább jumperekkel úgy + állítottuk be a lemezeket, hogy minden + vezérlõre egy mester (master) és egy + szolga (slave) módú merevlemez + kapcsolódjon. - Upon reboot, the system BIOS was configured to - automatically detect the disks attached. More importantly, - FreeBSD detected them on reboot: + A beszerelés után + beállítottuk a rendszer BIOS-át, hogy + automatikusan felismerje a csatlakoztatott lemezeket. De + ami még fontosabb, hogy a &os; is észlelte + ezeket az indítás során: ad0: 19574MB <WDC WD205BA> [39770/16/63] at ata0-master UDMA33 ad1: 29333MB <WDC WD307AA> [59598/16/63] at ata0-slave UDMA33 ad2: 29333MB <WDC WD307AA> [59598/16/63] at ata1-master UDMA33 ad3: 29333MB <WDC WD307AA> [59598/16/63] at ata1-slave UDMA33 - If FreeBSD does not detect all the disks, ensure - that you have jumpered them correctly. Most IDE drives - also have a Cable Select jumper. This is - not the jumper for the master/slave - relationship. Consult the drive documentation for help in - identifying the correct jumper. + + Ha a &os; nem látná az összes + lemezt, akkor ellenõrizzük a jumperek helyes + beállítását. Napjainkban a + legtöbb IDE meghajtón találunk egy + Cable Select jumpert is. Ezzel + nem nem a mester/szolga módot + állítjuk be! A megfelelõ jumper + beazonosításához olvassuk el a + meghajtóhoz tartozó + dokumentációt. + - Next, consider how to attach them as part of the file - system. You should research both &man.vinum.8; () and &man.ccd.4;. In this - particular configuration, &man.ccd.4; was chosen. + A következõ lépésben azt + vesszük nagyító alá, hogyan lehet + ezeket az állományrendszer + részévé tenni. Ezzel kapcsolatban a + &man.vinum.8; () és a + &man.ccd.4; elolvasása ajánlatos. Erre a + célra itt most a &man.ccd.4; + használatát választottuk. - Setting Up the CCD + A CCD beállítása - The &man.ccd.4; driver allows you to take - several identical disks and concatenate them into one - logical file system. In order to use - &man.ccd.4;, you need a kernel with - &man.ccd.4; support built in. - Add this line to your kernel configuration file, rebuild, and - reinstall the kernel: + A &man.ccd.4; meghajtó + segítségével több ugyanolyan lemezt + tudunk összefûzni egyetlen logikai + állományrendszerré. A &man.ccd.4; + használatához arra is + szükségünk van, hogy a &man.ccd.4; + támogatása jelen legyen a rendszermagban. A + következõ sor tegyük bele a rendszermag + konfigurációs + állományába, fordítsuk + újra és telepítsük újra a + rendszermagot: device ccd - The &man.ccd.4; support can also be - loaded as a kernel loadable module. + A &man.ccd.4; támogatása modulként + is betölthetõ. - To set up &man.ccd.4;, you must first use - &man.bsdlabel.8; to label the disks: + A &man.ccd.4; beállításához + elõször a &man.bsdlabel.8; programmal meg fel kell + címkéznünk a lemezeket: bsdlabel -w ad1 auto bsdlabel -w ad2 auto bsdlabel -w ad3 auto - This creates a bsdlabel for ad1c, ad2c and ad3c that - spans the entire disk. + Így létrejön egy-egy BSD + típusú címke a + ad1c, ad2c + és ad3c + eszközökre, ami lefedi a lemez egész + területét. - The next step is to change the disk label type. You - can use &man.bsdlabel.8; to edit the - disks: + Most pedig változtassuk meg a lemezcímke + típusát. Ehhez használjuk ismét a + &man.bsdlabel.8; programot: bsdlabel -e ad1 bsdlabel -e ad2 bsdlabel -e ad3 - This opens up the current disk label on each disk with - the editor specified by the EDITOR - environment variable, typically &man.vi.1;. + Ezzel az EDITOR környezeti + változóban megadott + szövegszerkesztõvel (ami általában a + &man.vi.1;) megnyílik minden egyes lemezhez a + jelenlegi lemezcímke. - An unmodified disk label will look something like - this: + Egy módosítatlan lemezcímke + valahogy így néz ki: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 60074784 0 unused 0 0 0 # (Cyl. 0 - 59597) - Add a new e partition for &man.ccd.4; to use. This - can usually be copied from the c partition, - but the must - be 4.2BSD. The disk label should - now look something like this: + A &man.ccd.4; számára hozzunk létre + egy új e partíciót. + Ezt lényegében a c + partíció lemásolásával + keletkezik, de nála az (az + állományrendszer típusa) oszlopban + mindenképpen 4.2BSD + szerepeljen! A lemezcímke most már valahogy + így fog kinézni: 8 partitions: # size offset fstype [fsize bsize bps/cpg] @@ -490,140 +680,197 @@ - Building the File System + Az állományrendszer + kiépítése - Now that you have all the disks labeled, you must - build the &man.ccd.4;. To do that, - use &man.ccdconfig.8;, with options similar to the following: + Most miután felcímkéztük az + összes lemezünket, lássunk neki a &man.ccd.4; + kiépítésének. Ezt a + &man.ccdconfig.8; meghívásával + és az alábbihoz hasonló + paraméterek átadásával + tehetjük meg: - ccdconfig ccd0 32 0 /dev/ad1e /dev/ad2e /dev/ad3e + ccdconfig ccd0 32 0 /dev/ad1e /dev/ad2e /dev/ad3e - The use and meaning of each option is shown below: + A paraméterek rövid leírása + és használata: - - - The first argument is the device to configure, in this case, - /dev/ccd0c. The /dev/ - portion is optional. - + + + Az elsõ paraméter a létrehozandó + eszköz, ami jelen esetünkben a + /dev/ccd0c. A /dev/ + részt nem kötelezõ megadni. + - + + A kihagyás nagysága az + állományrendszerben. A kihagyás + határozza meg a lemezblokkban alkalmazott + csíkozás vastagságát, ami + általában 512 bájt. Ennek + megfelelõen a 32-es kihagyás 16 384 bájtos + csíkokat ad meg. + - The interleave for the file system. The interleave - defines the size of a stripe in disk blocks, each normally 512 bytes. - So, an interleave of 32 would be 16,384 bytes. - + + A &man.ccdconfig.8; beállításai. Ha + engedélyezni akarjuk a lemezek + tükrözését, akkor itt megadhatjuk. + Mivel ez a konfiguráció most nem nyújt + tükrözést a &man.ccd.4; + számára, ezért állítsuk + nullára (0). + - >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Feb 8 11:51:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A3D6716A421; Fri, 8 Feb 2008 11:51: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 6941616A41A for ; Fri, 8 Feb 2008 11:51:42 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5AEF813C4DD for ; Fri, 8 Feb 2008 11:51:42 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18Bpfqo035871 for ; Fri, 8 Feb 2008 11:51:41 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18BpfdM035868 for perforce@freebsd.org; Fri, 8 Feb 2008 11:51:41 GMT (envelope-from sephe@FreeBSD.org) Date: Fri, 8 Feb 2008 11:51:41 GMT Message-Id: <200802081151.m18BpfdM035868@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 135035 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 11:51:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=135035 Change 135035 by sephe@sephe_zealot:sam_wifi on 2008/02/08 11:50:57 Do not update peer node sequence, if a multicast frame is received. This should make STA mode work better with broken APs, which do not support WME but use different sequence spaces for ucast and mcast frames. Discussed with: sam Obtained from: DragonFly Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#114 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#114 (text+ko) ==== @@ -230,7 +230,7 @@ ni->ni_rssi = rssi; ni->ni_noise = noise; ni->ni_rstamp = rstamp; - if (HAS_SEQ(type)) { + if (HAS_SEQ(type) && !IEEE80211_IS_MULTICAST(wh->i_addr1)) { uint8_t tid; if (IEEE80211_QOS_HAS_SEQ(wh)) { tid = ((struct ieee80211_qosframe *)wh)-> From owner-p4-projects@FreeBSD.ORG Fri Feb 8 13:21:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 40C5016A469; Fri, 8 Feb 2008 13:21:16 +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 CA4C516A417 for ; Fri, 8 Feb 2008 13:21:15 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AE52E13C442 for ; Fri, 8 Feb 2008 13:21:15 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18DLFhp052334 for ; Fri, 8 Feb 2008 13:21:15 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18DLFsB052331 for perforce@freebsd.org; Fri, 8 Feb 2008 13:21:15 GMT (envelope-from sephe@FreeBSD.org) Date: Fri, 8 Feb 2008 13:21:15 GMT Message-Id: <200802081321.m18DLFsB052331@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 135037 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 13:21:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=135037 Change 135037 by sephe@sephe_zealot:sam_wifi on 2008/02/08 13:21:08 Use single TX sequence space for packets sent by the NIC. This is used to assist some hardwares which can not generate TX sequence for outgoing packets, e.g. 2560 parts of ral(4). Discussed with: sam # This commit is tested on 2560 part, but from the 802.11 tap, it # seems that a newly setup beacon is sent after data, however, the # situation is much better than have 0 in beacons' sequence field # (192.168.5.1 is AP): # 21:05:07.043979 Beacon (sephe-hostap) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 6 # 0x0000: 8000 0000 ffff ffff ffff 0015 f2d7 420c # 0x0010: 0015 f2d7 420c 402b 2265 f103 0000 0000 # 0x0020: 6400 2104 000c 7365 7068 652d 686f 7374 # 0x0030: 6170 0108 8284 8b96 0c12 1824 0301 0605 # 0x0040: 0400 0101 0007 064e 414f 010e 002a 0100 # 0x0050: 3204 3048 606c # 21:05:07.065888 IP 192.168.5.2 > 192.168.5.1: ICMP echo request, id 23363, seq 39, length 64 # 0x0000: 0801 2c00 0015 f2d7 420c 0014 787a 5990 # 0x0010: 0015 f2d7 420c b002 aaaa 0300 0000 0800 # 0x0020: 4500 0054 b8c5 0000 4001 3690 c0a8 0502 # 0x0030: c0a8 0501 0800 1540 5b43 0027 47ac 5383 # 0x0040: 0001 0122 0809 0a0b 0c0d 0e0f 1011 1213 # 0x0050: 1415 1617 1819 1a1b 1c1d 1e1f 2021 2223 # 0x0060: 2425 2627 2829 2a2b 2c2d 2e2f 3031 3233 # 0x0070: 3435 3637 # 21:05:07.066144 IP 192.168.5.1 > 192.168.5.2: ICMP echo reply, id 23363, seq 39, length 64 # 0x0000: 0802 2c00 0014 787a 5990 0015 f2d7 420c # 0x0010: 0015 f2d7 420c 602b aaaa 0300 0000 0800 # 0x0020: 4500 0054 003b 0000 4001 ef1a c0a8 0501 # 0x0030: c0a8 0502 0000 1d40 5b43 0027 47ac 5383 # 0x0040: 0001 0122 0809 0a0b 0c0d 0e0f 1011 1213 # 0x0050: 1415 1617 1819 1a1b 1c1d 1e1f 2021 2223 # 0x0060: 2425 2627 2829 2a2b 2c2d 2e2f 3031 3233 # 0x0070: 3435 3637 # 21:05:07.145884 Beacon (sephe-hostap) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 6 # 0x0000: 8000 0000 ffff ffff ffff 0015 f2d7 420c # 0x0010: 0015 f2d7 420c 502b 34f3 f203 0000 0000 # 0x0020: 6400 2104 000c 7365 7068 652d 686f 7374 # 0x0030: 6170 0108 8284 8b96 0c12 1824 0301 0605 # 0x0040: 0400 0101 0007 064e 414f 010e 002a 0100 # 0x0050: 3204 3048 606c Affected files ... .. //depot/projects/wifi/sys/dev/ral/rt2560.c#33 edit .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#88 edit .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#80 edit .. //depot/projects/wifi/sys/net80211/ieee80211_var.h#63 edit Differences ... ==== //depot/projects/wifi/sys/dev/ral/rt2560.c#33 (text) ==== @@ -1316,6 +1316,7 @@ { struct ieee80211com *ic = &sc->sc_ic; struct rt2560_tx_data *data; + struct ieee80211_frame *wh; if (ic->ic_opmode != IEEE80211_M_IBSS && ic->ic_opmode != IEEE80211_M_HOSTAP) @@ -1333,6 +1334,12 @@ ieee80211_beacon_update(data->ni, &sc->sc_bo, data->m, 1); + /* 2560 needs software to setup seuqence */ + wh = mtod(data->m, struct ieee80211_frame *); + *(uint16_t *)wh->i_seq = + htole16(ic->ic_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); + ic->ic_txseqs[IEEE80211_NONQOS_TID]++; + if (bpf_peers_present(ic->ic_rawbpf)) bpf_mtap(ic->ic_rawbpf, data->m); ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#88 (text+ko) ==== @@ -575,10 +575,10 @@ si->isi_txpower = ni->ni_txpower; si->isi_vlan = ni->ni_vlan; if (ni->ni_flags & IEEE80211_NODE_QOS) { - memcpy(si->isi_txseqs, ni->ni_txseqs, sizeof(ni->ni_txseqs)); + memcpy(si->isi_txseqs, ic->ic_txseqs, sizeof(ic->ic_txseqs)); memcpy(si->isi_rxseqs, ni->ni_rxseqs, sizeof(ni->ni_rxseqs)); } else { - si->isi_txseqs[0] = ni->ni_txseqs[IEEE80211_NONQOS_TID]; + si->isi_txseqs[0] = ic->ic_txseqs[IEEE80211_NONQOS_TID]; si->isi_rxseqs[0] = ni->ni_rxseqs[IEEE80211_NONQOS_TID]; } /* NB: leave all cases in case we relax ni_associd == 0 check */ ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#80 (text+ko) ==== @@ -141,8 +141,8 @@ *(uint16_t *)&wh->i_dur[0] = 0; /* NB: use non-QoS tid */ *(uint16_t *)&wh->i_seq[0] = - htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseqs[IEEE80211_NONQOS_TID]++; + htole16(ic->ic_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); + ic->ic_txseqs[IEEE80211_NONQOS_TID]++; #undef WH4 } @@ -811,12 +811,12 @@ qwh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS; *(uint16_t *)wh->i_seq = - htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseqs[tid]++; + htole16(ic->ic_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT); + ic->ic_txseqs[tid]++; } else { *(uint16_t *)wh->i_seq = - htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseqs[IEEE80211_NONQOS_TID]++; + htole16(ic->ic_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); + ic->ic_txseqs[IEEE80211_NONQOS_TID]++; } /* check if xmit fragmentation is required */ txfrag = (m->m_pkthdr.len > ic->ic_fragthreshold && ==== //depot/projects/wifi/sys/net80211/ieee80211_var.h#63 (text+ko) ==== @@ -217,6 +217,8 @@ int ic_inact_auth; /* auth but not assoc setting */ int ic_inact_run; /* authorized setting */ int ic_inact_probe; /* inactive probe time */ + /* tx seq per-tid */ + uint16_t ic_txseqs[IEEE80211_TID_SIZE]; /* * Cipher state/configuration. From owner-p4-projects@FreeBSD.ORG Fri Feb 8 16:33:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8D60816A469; Fri, 8 Feb 2008 16:33:37 +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 5307916A421 for ; Fri, 8 Feb 2008 16:33:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 27BFD13C459 for ; Fri, 8 Feb 2008 16:33:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18GXbQq067932 for ; Fri, 8 Feb 2008 16:33:37 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18GXa81067929 for perforce@freebsd.org; Fri, 8 Feb 2008 16:33:36 GMT (envelope-from imp@freebsd.org) Date: Fri, 8 Feb 2008 16:33:36 GMT Message-Id: <200802081633.m18GXa81067929@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135042 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 16:33:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=135042 Change 135042 by imp@imp_lighthouse on 2008/02/08 16:32:57 Add a panic on a bad page fault for now. This will let us examine what is going wrong. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#11 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#11 (text+ko) ==== @@ -1677,7 +1677,7 @@ log(LOG_ERR, "pc address 0x%x is inaccessible, pde = 0x%p, pte = 0x%lx\n", pc, *pdep, ptep ? *ptep : 0); } - + panic("Bad trap"); } From owner-p4-projects@FreeBSD.ORG Fri Feb 8 16:47:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 445F316A420; Fri, 8 Feb 2008 16:47:52 +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 0925816A41B for ; Fri, 8 Feb 2008 16:47:52 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EA3F313C44B for ; Fri, 8 Feb 2008 16:47:51 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18Glpbc077960 for ; Fri, 8 Feb 2008 16:47:51 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18Glp89077957 for perforce@freebsd.org; Fri, 8 Feb 2008 16:47:51 GMT (envelope-from imp@freebsd.org) Date: Fri, 8 Feb 2008 16:47:51 GMT Message-Id: <200802081647.m18Glp89077957@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135043 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 16:47:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=135043 Change 135043 by imp@imp_lighthouse on 2008/02/08 16:47:48 Save/Restore v0 across the call to DO_AST in the one case where we need to preserve its value. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#13 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#13 (text+ko) ==== @@ -383,8 +383,9 @@ sw a3, STAND_RA_OFFSET + KERN_REG_SIZE(sp) # for debugging .set at - /* A call to AST would step on v0, I think, do we need to save it? */ + move s0, v0 DO_AST + move v0, s0 .set noat RESTORE_CPU # v0 contains the return address. From owner-p4-projects@FreeBSD.ORG Fri Feb 8 17:39:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1375116A41A; Fri, 8 Feb 2008 17:39: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 B4EC516A418 for ; Fri, 8 Feb 2008 17:39:45 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A192F13C458 for ; Fri, 8 Feb 2008 17:39:45 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18HdjUl081912 for ; Fri, 8 Feb 2008 17:39:45 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18HdjWd081909 for perforce@freebsd.org; Fri, 8 Feb 2008 17:39:45 GMT (envelope-from imp@freebsd.org) Date: Fri, 8 Feb 2008 17:39:45 GMT Message-Id: <200802081739.m18HdjWd081909@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135044 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 17:39:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=135044 Change 135044 by imp@imp_lighthouse on 2008/02/08 17:38:50 Big ugly hack: disable interrupts and reenable them inside of gets. The problem is that this is called with interrupts enabled, creating a race between the UART ISR and cngetc. I'm unsure why the UART interrupts are enabled, but we're hitting it in the simulator, so use the big hammer for now. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/libkern/gets.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/libkern/gets.c#2 (text+ko) ==== @@ -31,15 +31,18 @@ #include #include #include +#include void gets(char *cp, size_t size, int visible) { char *lp, *end; int c; + register_t s; lp = cp; end = cp + size - 1; + s = intr_disable(); for (;;) { c = cngetc() & 0177; switch (c) { @@ -47,6 +50,7 @@ case '\r': printf("%c", c); *lp = '\0'; + intr_restore(s); return; case '\b': case '\177': From owner-p4-projects@FreeBSD.ORG Fri Feb 8 20:06:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F28D616A468; Fri, 8 Feb 2008 20:06:19 +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 9F74916A41B for ; Fri, 8 Feb 2008 20:06:19 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8961C13C4CE for ; Fri, 8 Feb 2008 20:06:19 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18K6JrX094797 for ; Fri, 8 Feb 2008 20:06:19 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18K6JsV094794 for perforce@freebsd.org; Fri, 8 Feb 2008 20:06:19 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 8 Feb 2008 20:06:19 GMT Message-Id: <200802082006.m18K6JsV094794@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135046 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 20:06:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=135046 Change 135046 by kmacy@kmacy:entropy:iwarp on 2008/02/08 20:05:31 add logging, and asserts for DDP Affected files ... .. //depot/projects/iwarp/sys/amd64/conf/GENERIC#9 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#10 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#4 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_defs.h#8 integrate .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c#7 integrate .. //depot/projects/iwarp/sys/modules/cxgb/tom/Makefile#5 integrate Differences ... ==== //depot/projects/iwarp/sys/amd64/conf/GENERIC#9 (text+ko) ==== @@ -26,6 +26,7 @@ makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs hwpmc netgraph" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions MODULES_OVERRIDE="cxgb em" options SCHED_ULE options IPI_PREEMPTION @@ -215,12 +216,13 @@ options ALT_BREAK_TO_DEBUGGER -options ALQ -options KTR_ALQ -options KTR_COMPILE=(KTR_SCHED) -options KTR_CPUMASK=0x3 -options KTR_ENTRIES=8192 -options KTR_MASK=(KTR_SCHED) -options KTR_VERBOSE +options KTR +#options ALQ +#options KTR_ALQ +options KTR_COMPILE=(KTR_SPARE2) +options KTR_CPUMASK=0x7 +options KTR_ENTRIES=65536 +options KTR_MASK=(KTR_SPARE2) +#options KTR_VERBOSE ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#10 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -84,8 +85,6 @@ #include #include - - /* * For ULP connections HW may add headers, e.g., for digests, that aren't part * of the messages sent by the host but that are part of the TCP payload and @@ -151,7 +150,6 @@ #define cxgb_tcp_drop tcp_drop #endif - static inline void SBAPPEND(struct sockbuf *sb, struct mbuf *n) { @@ -319,9 +317,7 @@ } INP_LOCK_ASSERT(tp->t_inpcb); - SOCKBUF_LOCK(&so->so_snd); - d = TOM_DATA(TOE_DEV(so)); cdev = d->cdev; last = tail = so->so_snd.sb_sndptr ? so->so_snd.sb_sndptr : so->so_snd.sb_mb; @@ -646,10 +642,14 @@ toep->tp_enqueued_bytes = so->so_rcv.sb_cc; SOCKBUF_UNLOCK(&so->so_rcv); - if (credits > so->so_rcv.sb_mbmax) + if (credits > so->so_rcv.sb_mbmax) { printf("copied_seq=%u rcv_wup=%u credits=%u\n", toep->tp_copied_seq, toep->tp_rcv_wup, credits); - /* + credits = so->so_rcv.sb_mbmax; + } + + + /* * XXX this won't accurately reflect credit return - we need * to look at the difference between the amount that has been * put in the recv sockbuf and what is there now @@ -776,6 +776,9 @@ { struct cpl_set_tcb_field *req; + CTR4(KTR_TOM, "__set_tcb_field_ulp(tid=%u word=0x%x mask=%jx val=%jx", + toep->tp_tid, word, mask, val); + req = mtod(m, struct cpl_set_tcb_field *); m->m_pkthdr.len = m->m_len = sizeof(*req); req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); @@ -800,10 +803,12 @@ if (toep == NULL) return; - - if (tp->t_state == TCPS_CLOSED || (toep->tp_flags & TP_ABORT_SHUTDOWN)) + + if (tp->t_state == TCPS_CLOSED || (toep->tp_flags & TP_ABORT_SHUTDOWN)) { + printf("not seting field\n"); return; - + } + m = m_gethdr_nofail(sizeof(struct cpl_set_tcb_field)); __set_tcb_field(toep, m, word, mask, val, 1); @@ -874,10 +879,11 @@ static void t3_enable_ddp(struct socket *so, int on) { - if (on) + if (on) { + t3_set_tcb_field(so, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1), V_TF_DDP_OFF(0)); - else + } else t3_set_tcb_field(so, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | TP_DDP_TIMER_WORKAROUND_MASK, @@ -1660,6 +1666,7 @@ __be64 *tcb; so = toeptoso(toep); + tp = toep->tp_tp; SOCKBUF_LOCK(&so->so_rcv); /* Note that we only accout for CPL_GET_TCB issued by the DDP code. We @@ -1700,7 +1707,9 @@ "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u ddp_offset %u", tp->rcv_nxt, q->cur_buf, ddp_offset); #endif - + CTR3(KTR_TOM, "tcb_rpl_as_ddp_complete(seq=0x%x hwbuf=%u ddp_offset=%u", + tp->rcv_nxt, q->cur_buf, ddp_offset); + #if 0 { unsigned int ddp_flags, rcv_nxt, rx_hdr_offset, buf_idx; @@ -1791,7 +1800,6 @@ } KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); - tp = toep->tp_tp; m->m_ddp_gl = (unsigned char *)bsp->gl; m->m_flags |= M_DDP; m->m_seq = tp->rcv_nxt; @@ -1806,6 +1814,8 @@ "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u lskb->len %u", m->m_seq, q->cur_buf, m->m_pkthdr.len); #endif + CTR3(KTR_TOM, "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u m->m_pktlen %u", + m->m_seq, q->cur_buf, m->m_pkthdr.len); SBAPPEND(&so->so_rcv, m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) sorwakeup_locked(so); @@ -2167,7 +2177,12 @@ tp->rcv_nxt, bsp->cur_offset, ddp_report, G_DDP_OFFSET(ddp_report), skb->len); #endif - + CTR5(KTR_TOM, + "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u " + "ddp_report 0x%x offset %u, len %u", + tp->rcv_nxt, bsp->cur_offset, ddp_report, + G_DDP_OFFSET(ddp_report), m->m_len); + bsp->cur_offset += m->m_len; if (!(bsp->flags & DDP_BF_NOFLIP)) { @@ -2183,6 +2198,12 @@ tp->rcv_nxt, bsp->cur_offset, ddp_report, G_DDP_OFFSET(ddp_report)); #endif + CTR4(KTR_TOM, + "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u " + "ddp_report %u offset %u", + tp->rcv_nxt, bsp->cur_offset, ddp_report, + G_DDP_OFFSET(ddp_report)); + m->m_ddp_gl = (unsigned char *)bsp->gl; m->m_flags |= M_DDP; m->m_ddp_flags = (bsp->flags & DDP_BF_NOCOPY) | 1; @@ -3213,30 +3234,20 @@ DPRINTF("opt0l_status=%08x\n", rpl->opt0l_status); m_set_priority(reply_mbuf, mkprio(CPL_PRIORITY_SETUP, newtoep)); -#ifdef DEBUG_PRINT - { - int i; - - DPRINTF("rpl:\n"); - uint32_t *rplbuf = mtod(reply_mbuf, uint32_t *); - for (i = 0; i < sizeof(*rpl)/sizeof(uint32_t); i++) - DPRINTF("[%d] %08x\n", i, rplbuf[i]); - } -#endif - - l2t_send(cdev, reply_mbuf, e); m_free(m); - /* - * XXX this call path has to be converted to not depend on sockets - */ - if (newtoep->tp_ulp_mode) + if (newtoep->tp_ulp_mode) { + printf("setting ulp mode to DDP\n"); __set_tcb_field(newtoep, ddp_mbuf, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | TP_DDP_TIMER_WORKAROUND_MASK, V_TF_DDP_OFF(1) | - TP_DDP_TIMER_WORKAROUND_VAL, 1); + TP_DDP_TIMER_WORKAROUND_VAL, 1); + } else + printf("not offloading\n"); + + return; reject: @@ -3846,6 +3857,9 @@ unsigned int tid = toep->tp_tid; const struct tom_data *td = TOM_DATA(TOE_DEV(so)); unsigned int ppod_addr = tag * PPOD_SIZE + td->ddp_llimit; + + CTR6(KTR_TOM, "t3_setup_ppods(gl=%p nppods=%u tag=%u maxoff=%u pg_off=%u color=%u)", + gl, nppods, tag, maxoff, pg_off, color); for (i = 0; i < nppods; ++i) { m = m_gethdr_nofail(sizeof(*req) + PPOD_SIZE); @@ -3914,7 +3928,10 @@ unsigned int word, uint64_t mask, uint64_t val) { struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; - + + CTR4(KTR_TOM, "mk_set_tcb_field_ulp(tid=%u word=0x%x mask=%jx val=%jx", + tid, word, mask, val); + txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); @@ -3967,6 +3984,9 @@ req = (struct cpl_set_tcb_field *)(lock + 1); + CTR1(KTR_TOM, "t3_cancel_ddpbuf(bufidx=%u)", + bufidx); + /* Hmmm, not sure if this actually a good thing: reactivating * the other buffer might be an issue if it has been completed * already. However, that is unlikely, since the fact that the UBUF @@ -4025,6 +4045,8 @@ struct cpl_set_tcb_field *req; struct ddp_state *p = &toep->tp_ddp_state; + CTR4(KTR_TOM, "t3_setup_ppods(bufidx=%u tag0=%u tag1=%u len=%u)", + bufidx, tag0, tag1, len); SOCKBUF_LOCK_ASSERT(&toeptoso(toep)->so_rcv); wrlen = sizeof(*wr) + 3 * sizeof(*req) + sizeof(*getreq); m = m_gethdr_nofail(wrlen); @@ -4098,6 +4120,9 @@ struct work_request_hdr *wr; struct cpl_set_tcb_field *req; + CTR6(KTR_TOM, "t3_setup_ddpbufs(len0=%u offset0=%u len1=%u offset1=%u ddp_flags=0x%08x%08x ", + len0, offset0, len1, offset1, ddp_flags >> 32, ddp_flags & 0xffffffff); + SOCKBUF_LOCK_ASSERT(&toeptoso(toep)->so_rcv); wrlen = sizeof(*wr) + sizeof(*req) + (len0 ? sizeof(*req) : 0) + (len1 ? sizeof(*req) : 0) + ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#4 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -134,7 +135,7 @@ pg_off = addr & PAGE_MASK; npages = (pg_off + len + PAGE_SIZE - 1) >> PAGE_SHIFT; p = malloc(sizeof(struct ddp_gather_list) + npages * sizeof(vm_page_t *), - M_DEVBUF, M_NOWAIT); + M_DEVBUF, M_NOWAIT|M_ZERO); if (p == NULL) return (ENOMEM); @@ -229,6 +230,7 @@ int err, tag, npages, nppods; struct tom_data *d = TOM_DATA(TOE_DEV(so)); + SOCKBUF_LOCK_ASSERT(&so->so_rcv); npages = ((addr & PAGE_MASK) + len + PAGE_SIZE - 1) >> PAGE_SHIFT; nppods = min(pages2ppods(npages), MAX_PPODS); nppods = roundup2(nppods, PPOD_CLUSTER_SIZE); @@ -262,7 +264,8 @@ { struct toepcb *toep = sototcpcb(so)->t_toe; struct ddp_state *p = &toep->tp_ddp_state; - + + SOCKBUF_LOCK_ASSERT(&so->so_rcv); p->buf_state[bufidx].cur_offset = p->kbuf[bufidx]->dgl_offset; p->buf_state[bufidx].flags = p->kbuf_noinval ? DDP_BF_NOINVAL : 0; p->buf_state[bufidx].gl = p->kbuf[bufidx]; @@ -340,6 +343,7 @@ struct iovec *iov = uio->uio_iov; vm_offset_t addr = (vm_offset_t)iov->iov_base - oft; + SOCKBUF_LOCK_ASSERT(&so->so_rcv); if (__predict_false(p->ubuf_nppods == 0)) { err = alloc_buf1_ppods(so, p, addr, iov->iov_len + oft); if (err) @@ -385,6 +389,7 @@ if (p->ubuf == NULL) return; + SOCKBUF_LOCK_ASSERT(&so->so_rcv); p->cancel_ubuf = 1; while (ubuf_pending && !(so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED))) { #ifdef T3_TRACE @@ -394,6 +399,11 @@ p->buf_state[1].flags & (DDP_BF_NOFLIP | DDP_BF_NOCOPY), p->get_tcb_count); #endif + CTR3(KTR_TOM, + "t3_cancel_ubuf: flags0 0x%x flags1 0x%x get_tcb_count %d", + p->buf_state[0].flags & (DDP_BF_NOFLIP | DDP_BF_NOCOPY), + p->buf_state[1].flags & (DDP_BF_NOFLIP | DDP_BF_NOCOPY), + p->get_tcb_count); if (p->get_tcb_count == 0) t3_cancel_ddpbuf(toep, p->cur_buf); else { @@ -401,9 +411,9 @@ timeo = so->so_rcv.sb_timeo; flags = so->so_rcv.sb_flags; - so->so_rcv.sb_timeo = 3*hz; + so->so_rcv.sb_timeo = 30*hz; while (p->get_tcb_count && !(so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED))) { - if (count & 0xff) + if (count & 0xffffff) printf("waiting err=%d get_tcb_count=%d timeo=%d so=%p\n", err, p->get_tcb_count, so->so_rcv.sb_timeo, so); count++; @@ -441,6 +451,7 @@ return (EINVAL); } + SOCKBUF_LOCK_ASSERT(&so->so_rcv); err = setup_uio_ppods(so, uio, 0, &len); if (err) { return (err); @@ -485,6 +496,10 @@ " kbuf_idx %d", p->ubuf_tag, flags, OVERLAY_MASK, ubuf_idx, p->kbuf_idx); #endif + CTR5(KTR_TOM, + "t3_overlay_ubuf: tag %u flags 0x%x mask 0x%x ubuf_idx %d " + " kbuf_idx %d", + p->ubuf_tag, flags, OVERLAY_MASK, ubuf_idx, p->kbuf_idx); return (0); } @@ -555,6 +570,8 @@ T3_TRACE1(TIDTB(so), "t3_post_kbuf: cur_buf = kbuf_idx = %u ", p->cur_buf); #endif + CTR1(KTR_TOM, + "t3_post_kbuf: cur_buf = kbuf_idx = %u ", p->cur_buf); } /* @@ -571,9 +588,11 @@ struct ddp_state *p = &toep->tp_ddp_state; struct tom_data *d = TOM_DATA(toep->tp_toedev); + if (kbuf_size > M_TCB_RX_DDP_BUF0_LEN) return (EINVAL); + SOCKBUF_LOCK_ASSERT(&so->so_rcv); nonblock = (so->so_state & SS_NBIO); kbuf_pages = (kbuf_size + PAGE_SIZE - 1) >> PAGE_SHIFT; @@ -617,22 +636,25 @@ p->kbuf[idx]->phys_addr[i] = pci_map_page(p->pdev, p->kbuf[idx]->pages[i], 0, PAGE_SIZE, PCI_DMA_FROMDEVICE); -#endif +#endif t3_setup_ppods(so, p->kbuf[idx], nppods, p->kbuf_tag[idx], p->kbuf[idx]->dgl_length, 0, 0); } t3_set_ddp_tag(so, 0, p->kbuf_tag[0] << 6); t3_set_ddp_buf(so, 0, 0, p->kbuf[0]->dgl_length); t3_repost_kbuf(so, 0, 0, 1, nonblock); + t3_set_rcv_coalesce_enable(so, TOM_TUNABLE(TOE_DEV(so), ddp_rcvcoalesce)); - printf("ddp entered\n"); #ifdef T3_TRACE T3_TRACE4(TIDTB(so), "t3_enter_ddp: kbuf_size %u waitall %u tag0 %d tag1 %d", kbuf_size, waitall, p->kbuf_tag[0], p->kbuf_tag[1]); #endif + CTR4(KTR_TOM, + "t3_enter_ddp: kbuf_size %u waitall %u tag0 %d tag1 %d", + kbuf_size, waitall, p->kbuf_tag[0], p->kbuf_tag[1]); return (0); @@ -686,6 +708,8 @@ } memset(&td->ppod_map[i], 1, n); /* allocate range */ mtx_unlock(&td->ppod_map_lock); + CTR2(KTR_TOM, + "t3_alloc_ppods: n=%u tag=%u", n, i); *ptag = i; return (0); next: ; ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_defs.h#8 (text+ko) ==== @@ -43,7 +43,7 @@ #define TRACE_ENTER printf("%s:%s entered\n", __FUNCTION__, __FILE__) #define TRACE_EXIT printf("%s:%s:%d exited\n", __FUNCTION__, __FILE__, __LINE__) - +#define KTR_TOM KTR_SPARE2 struct toepcb; struct listen_ctx; ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c#7 (text+ko) ==== @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -140,7 +141,7 @@ { struct toepcb *toep; - toep = malloc(sizeof(struct toepcb), M_DEVBUF, M_NOWAIT); + toep = malloc(sizeof(struct toepcb), M_DEVBUF, M_NOWAIT|M_ZERO); if (toep == NULL) return (NULL); @@ -152,7 +153,6 @@ void toepcb_init(struct toepcb *toep) { - bzero(toep, sizeof(*toep)); toep->tp_refcount = 1; cv_init(&toep->tp_cv, "toep cv"); } @@ -203,9 +203,6 @@ struct toedev *tdev; struct adap_ports *port_info; - printf("%s called\n", __FUNCTION__); - - t = malloc(sizeof(*t), M_CXGB, M_NOWAIT|M_ZERO); if (t == NULL) @@ -353,6 +350,10 @@ t3_init_tunables(t); mtx_init(&t->listen_lock, "tom data listeners", NULL, MTX_DEF); + + printf("KTR_TOM=0x%x ktr_mask=0x%x KTR_COMPILE=0x%x doing test KTR entry now\n", KTR_TOM, ktr_mask, KTR_COMPILE); + CTR2(KTR_TOM, "t3_toe_attach dev=%p entry=%p", dev, entry); + /* Adjust TOE activation for this module */ t->conf.activated = activated; @@ -379,7 +380,7 @@ t->rx_page_size = rx_page_info.page_size; /* OK if this fails, we just can't do DDP */ t->nppods = (ddp.ulimit + 1 - ddp.llimit) / PPOD_SIZE; - t->ppod_map = malloc(t->nppods, M_DEVBUF, M_WAITOK); + t->ppod_map = malloc(t->nppods, M_DEVBUF, M_WAITOK|M_ZERO); mtx_init(&t->ppod_map_lock, "ppod map", NULL, MTX_DEF); @@ -440,19 +441,7 @@ t3_tom_init(void) { -#if 0 - struct socket *sock; - err = sock_create_kern(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock); - if (err < 0) { - printk(KERN_ERR "Could not create TCP socket, error %d\n", err); - return err; - } - t3_def_state_change = sock->sk->sk_state_change; - t3_def_data_ready = sock->sk->sk_data_ready; - t3_def_error_report = sock->sk->sk_error_report; - sock_release(sock); -#endif init_cpl_handlers(); if (t3_init_cpl_io() < 0) return -1; ==== //depot/projects/iwarp/sys/modules/cxgb/tom/Makefile#5 (text+ko) ==== @@ -7,7 +7,7 @@ SRCS= cxgb_tom.c cxgb_cpl_io.c cxgb_listen.c cxgb_tom_sysctl.c cxgb_cpl_socket.c SRCS+= cxgb_ddp.c cxgb_vm.c SRCS+= opt_compat.h opt_inet.h opt_inet6.h opt_ipsec.h opt_mac.h -SRCS+= opt_tcpdebug.h opt_ddb.h opt_sched.h +SRCS+= opt_tcpdebug.h opt_ddb.h opt_sched.h opt_global.h opt_ktr.h SRCS+= device_if.h bus_if.h pci_if.h #CFLAGS+= -DDEBUG_PRINT -DDEBUG From owner-p4-projects@FreeBSD.ORG Fri Feb 8 20:09:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2011316A419; Fri, 8 Feb 2008 20:09: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 D9AC616A420 for ; Fri, 8 Feb 2008 20:09:22 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C538913C46A for ; Fri, 8 Feb 2008 20:09:22 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18K9MOD094931 for ; Fri, 8 Feb 2008 20:09:22 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18K9M50094928 for perforce@freebsd.org; Fri, 8 Feb 2008 20:09:22 GMT (envelope-from swise@FreeBSD.org) Date: Fri, 8 Feb 2008 20:09:22 GMT Message-Id: <200802082009.m18K9M50094928@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 135047 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 20:09:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=135047 Change 135047 by swise@swise:vic10:iwarp on 2008/02/08 20:08:24 More fixes for running over TOE socket. - save listen ep in cm_id->provider_id - only upcall on recv sockbuf - fixed sending ABORT via linger on + linger time 0 Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#2 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#2 (text+ko) ==== @@ -265,7 +265,8 @@ void __free_ep(struct iwch_ep_common *epc) { PDBG("%s ep %p state %s\n", __FUNCTION__, epc, states[state_read(epc)]); - BUG_ON(epc->so); + if (epc->so) + printf("%s warning ep->so %p \n", __FUNCTION__, epc->so); free(epc, M_DEVBUF); } @@ -338,6 +339,11 @@ static void close_socket(struct iwch_ep_common *epc) { + SOCK_LOCK(epc->so); + epc->so->so_upcall = NULL; + epc->so->so_upcallarg = NULL; + epc->so->so_rcv.sb_flags &= ~SB_UPCALL; + SOCK_UNLOCK(epc->so); soclose(epc->so); epc->so = NULL; } @@ -347,18 +353,21 @@ { struct sockopt sopt; int err; - int linger_time=0; + struct linger l; + + l.l_onoff = 1; + l.l_linger = 0; /* linger_time of 0 forces RST to be sent */ sopt.sopt_dir = SOPT_SET; sopt.sopt_level = SOL_SOCKET; sopt.sopt_name = SO_LINGER; - sopt.sopt_val = (caddr_t)&linger_time; - sopt.sopt_valsize = sizeof linger_time; + sopt.sopt_val = (caddr_t)&l; + sopt.sopt_valsize = sizeof l; sopt.sopt_td = NULL; err = sosetopt(ep->com.so, &sopt); if (err) - printf("%s can't set linger to 0, no RST!\n", __FUNCTION__); + printf("%s can't set linger to 0, no RST! err %d\n", __FUNCTION__, err); close_socket(&ep->com); } @@ -1250,7 +1259,6 @@ epc->so->so_upcall = iwch_so_upcall; epc->so->so_upcallarg = epc; epc->so->so_rcv.sb_flags |= SB_UPCALL; - epc->so->so_snd.sb_flags |= SB_UPCALL; epc->so->so_state |= SS_NBIO; return 0; } @@ -1371,8 +1379,10 @@ } err = solisten(ep->com.so, ep->backlog, ep->com.thread); - if (!err) + if (!err) { + cm_id->provider_data = ep; goto out; + } fail2: close_socket(&ep->com); fail1: @@ -1522,7 +1532,6 @@ so->so_head = NULL; soref(so); so->so_rcv.sb_flags |= SB_UPCALL; - so->so_snd.sb_flags |= SB_UPCALL; so->so_state |= SS_NBIO; BUG_ON(!(so->so_state & SS_ISCONNECTED)); BUG_ON(so->so_error); @@ -1590,19 +1599,19 @@ } /* connection error */ - if (ep->com.so->so_error) { + if (so->so_error) { process_conn_error(ep); return; } /* peer close */ - if (ep->com.so->so_state & SS_ISDISCONNECTING && state < CLOSING) { + if (so->so_state & SS_ISDISCONNECTING && state < CLOSING) { process_peer_close(ep); return; } /* close complete */ - if (ep->com.so->so_state & (SS_ISDISCONNECTED)) { + if (so->so_state & (SS_ISDISCONNECTED)) { process_close_complete(ep); return; } From owner-p4-projects@FreeBSD.ORG Fri Feb 8 22:54:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 49F9216A41B; Fri, 8 Feb 2008 22:54:22 +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 0FAAB16A417 for ; Fri, 8 Feb 2008 22:54:22 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D68E513C461 for ; Fri, 8 Feb 2008 22:54:21 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18MsLqs016062 for ; Fri, 8 Feb 2008 22:54:21 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18MsKLr016059 for perforce@freebsd.org; Fri, 8 Feb 2008 22:54:20 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 22:54:20 GMT Message-Id: <200802082254.m18MsKLr016059@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135063 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 22:54:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=135063 Change 135063 by jb@jb_freebsd1 on 2008/02/08 22:53:53 Fix a typo. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_debug.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_debug.c#4 (text+ko) ==== @@ -59,7 +59,7 @@ u_char res; __asm __volatile( - " " lock " " + " lock ; " " cmpxchgl %2,%1 ; " " sete %0 ; " "1: " From owner-p4-projects@FreeBSD.ORG Fri Feb 8 22:55:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A340D16A420; Fri, 8 Feb 2008 22:55: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 5066816A418 for ; Fri, 8 Feb 2008 22:55:23 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 22B9113C448 for ; Fri, 8 Feb 2008 22:55:23 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18MtNOX016153 for ; Fri, 8 Feb 2008 22:55:23 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18MtNFW016150 for perforce@freebsd.org; Fri, 8 Feb 2008 22:55:23 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 22:55:23 GMT Message-Id: <200802082255.m18MtNFW016150@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135064 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 22:55:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=135064 Change 135064 by jb@jb_freebsd1 on 2008/02/08 22:54:55 Add a yabba-dabba-do kernel config to work around the fact that my Dell 531S really really doesn't like FreeBSD USB code. Affected files ... .. //depot/projects/dtrace/src/sys/i386/conf/YABBA#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Feb 8 23:12:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AF54716A41B; Fri, 8 Feb 2008 23:12:41 +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 541D016A418 for ; Fri, 8 Feb 2008 23:12:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3DC5513C45A for ; Fri, 8 Feb 2008 23:12:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18NCfWH018106 for ; Fri, 8 Feb 2008 23:12:41 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18NCfBW018103 for perforce@freebsd.org; Fri, 8 Feb 2008 23:12:41 GMT (envelope-from sam@freebsd.org) Date: Fri, 8 Feb 2008 23:12:41 GMT Message-Id: <200802082312.m18NCfBW018103@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135066 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 23:12:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=135066 Change 135066 by sam@sam_ebb on 2008/02/08 23:12:26 updates; add show all vaps/a Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ddb.c#4 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ddb.c#4 (text+ko) ==== @@ -76,7 +76,7 @@ "\21MONITOR\22TKIPMIC\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ "\37TXFRAG" -#define IEEE80211_HTCAP_BITS \ +#define IEEE80211_C_HTCAP_BITS \ "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ "\21AMPDU\22AMSDU\23HT" @@ -85,8 +85,30 @@ "\20\5TURBO\6CCK\7OFDM\0102GHZ\0115GHZ\12PASSIVE\13DYN\14GFSK" \ "\15STURBO\16HALF\17QUARTER\20HT20\21HT40U\22HT40D\23DFS" +#define IEEE80211_NODE_BITS \ + "\20\1AUTH\2QOS\3ERP\5PWR_MGT\6AREF\7HT\10HTCOMPAT\11WPS\12TSN" \ + "\13AMPDU_RX\14AMPDU_TX" + +#define IEEE80211_ERP_BITS \ + "\20\1NON_ERP_PRESENT\2USE_PROTECTION\3LONG_PREAMBLE" + +#define IEEE80211_CAPINFO_BITS \ + "\20\1ESS\2IBSS\3CF_POLLABLE\4CF_POLLREQ\5PRIVACY\6SHORT_PREAMBLE" \ + "\7PBCC\10CHNL_AGILITY\11SPECTRUM_MGMT\13SHORT_SLOTTIME\14RSN" \ + "\16DSSOFDM" + +#define IEEE80211_HTCAP_BITS \ + "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ + "\13DELBA\14AMSDU(7935)\15DSSSCCK40\16PSMP\1740INTOLERANT" \ + "\20LSIGTXOPPROT" + +#define IEEE80211_AGGR_BITS \ + "\20\1IMMEDIATE\2XCHGPEND\3RUNNING\4SETUP\5NAK" + static void _db_show_sta(const struct ieee80211_node *); static void _db_show_vap(const struct ieee80211vap *, int); +static void _db_show_com(const struct ieee80211com *, + int showvaps, int showsta, int showprocs); static void _db_show_channel(const char *tag, const struct ieee80211_channel *); static void _db_show_ssid(const char *tag, int ix, int len, const uint8_t *); @@ -130,14 +152,12 @@ DB_SHOW_COMMAND(com, db_show_com) { const struct ieee80211com *ic; - const struct ieee80211vap *vap; int i, showprocs = 0, showvaps = 0, showsta = 0; if (!have_addr) { db_printf("usage: show com \n"); return; } - ic = (const struct ieee80211com *) addr; for (i = 0; modif[i] != '\0'; i++) switch (modif[i]) { case 'a': @@ -154,204 +174,127 @@ break; } - db_printf("%p:", ic); - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) - db_printf(" %s(%p)", vap->iv_ifp->if_xname, vap); - db_printf("\n"); - db_printf("\tifp %p", ic->ic_ifp); - db_printf(" comlock %p", &ic->ic_comlock); - db_printf(" mgtq %p", &ic->ic_mgtq); - db_printf("\n"); - _db_show_stats(&ic->ic_stats); - db_printf("\theadroom %d", ic->ic_headroom); - db_printf(" phytype %d", ic->ic_phytype); - db_printf(" opmode %s", ieee80211_opmode_name[ic->ic_opmode]); - db_printf("\n"); - db_printf("\tmedia %p", &ic->ic_media); - db_printf(" myaddr %s", ether_sprintf(ic->ic_myaddr)); - db_printf(" inact %p", &ic->ic_inact); - db_printf("\n"); - - db_printf("\tflags=%b\n", ic->ic_flags, IEEE80211_F_BITS); - db_printf("\tflags_ext=%b\n", ic->ic_flags_ext, IEEE80211_FEXT_BITS); - db_printf("\tflags_ven=%b\n", ic->ic_flags_ven, IEEE80211_FVEN_BITS); - db_printf("\tcaps=%b\n", ic->ic_caps, IEEE80211_C_BITS); - db_printf("\thtcaps=%b\n", ic->ic_htcaps, IEEE80211_HTCAP_BITS); - -#if 0 - uint8_t ic_modecaps[2]; /* set of mode capabilities */ -#endif - db_printf("\tcurmode %u", ic->ic_curmode); - db_printf(" promisc %u", ic->ic_promisc); - db_printf(" allmulti %u", ic->ic_allmulti); - db_printf(" nrunning %u", ic->ic_nrunning); - db_printf("\n"); - db_printf("\tbintval %u", ic->ic_bintval); - db_printf(" lintval %u", ic->ic_lintval); - db_printf(" holdover %u", ic->ic_holdover); - db_printf(" txpowlimit %u", ic->ic_txpowlimit); - db_printf("\n"); -#if 0 - struct ieee80211_rateset ic_sup_rates[IEEE80211_MODE_MAX]; -#endif - /* - * Channel state: - * - * ic_channels is the set of available channels for the device; - * it is setup by the driver - * ic_nchans is the number of valid entries in ic_channels - * ic_chan_avail is a bit vector of these channels used to check - * whether a channel is available w/o searching the channel table. - * ic_chan_active is a (potentially) constrained subset of - * ic_chan_avail that reflects any mode setting or user-specified - * limit on the set of channels to use/scan - * ic_curchan is the current channel the device is set to; it may - * be different from ic_bsschan when we are off-channel scanning - * or otherwise doing background work - * ic_bsschan is the channel selected for operation; it may - * be undefined (IEEE80211_CHAN_ANYC) - * ic_prevchan is a cached ``previous channel'' used to optimize - * lookups when switching back+forth between two channels - * (e.g. for dynamic turbo) - */ - db_printf("\tnchans %d", ic->ic_nchans); -#if 0 - struct ieee80211_channel ic_channels[IEEE80211_CHAN_MAX+1]; - uint8_t ic_chan_avail[IEEE80211_CHAN_BYTES]; - uint8_t ic_chan_active[IEEE80211_CHAN_BYTES]; - uint8_t ic_chan_scan[IEEE80211_CHAN_BYTES]; -#endif - db_printf("\n"); - _db_show_channel("\tcurchan", ic->ic_curchan); - db_printf("\n"); - _db_show_channel("\tbsschan", ic->ic_bsschan); - db_printf("\n"); - _db_show_channel("\tprevchan", ic->ic_prevchan); - db_printf("\n"); - db_printf("\tregdomain %p", &ic->ic_regdomain); - db_printf("\n"); - - _db_show_channel("\tcsa_newchan", ic->ic_csa_newchan); - db_printf(" csa_count %d", ic->ic_csa_count); - db_printf( "dfs %p", &ic->ic_dfs); - db_printf("\n"); - - db_printf("\tscan %p", ic->ic_scan); - db_printf(" lastdata %d", ic->ic_lastdata); - db_printf(" lastscan %d", ic->ic_lastscan); - db_printf("\n"); - - db_printf("\tmax_keyix %d", ic->ic_max_keyix); - db_printf(" sta %p", &ic->ic_sta); - db_printf(" wme %p", &ic->ic_wme); - db_printf("\n"); - - db_printf("\tprotmode %d", ic->ic_protmode); - db_printf(" nonerpsta %u", ic->ic_nonerpsta); - db_printf(" longslotsta %u", ic->ic_longslotsta); - db_printf(" lastnonerp %d", ic->ic_lastnonerp); - db_printf("\n"); - db_printf("\tsta_assoc %u", ic->ic_sta_assoc); - db_printf(" ht_sta_assoc %u", ic->ic_ht_sta_assoc); - db_printf(" ht40_sta_assoc %u", ic->ic_ht40_sta_assoc); - db_printf("\n"); - db_printf("\tcurhtprotmode 0x%x", ic->ic_curhtprotmode); - db_printf(" htprotmode %d", ic->ic_htprotmode); - db_printf(" lastnonht %d", ic->ic_lastnonht); - db_printf("\n"); - - if (showprocs) { - db_printf("\tic_vap_create %p\n", ic->ic_vap_create); - db_printf("\tic_vap_delete %p\n", ic->ic_vap_delete); -#if 0 - /* operating mode attachment */ - ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX]; -#endif - db_printf("\tic_newassoc %p\n", ic->ic_newassoc); - db_printf("\tic_getradiocaps %p\n", ic->ic_getradiocaps); - db_printf("\tic_setregdomain %p\n", ic->ic_setregdomain); - db_printf("\tic_send_mgmt %p\n", ic->ic_send_mgmt); - db_printf("\tic_raw_xmit %p\n", ic->ic_raw_xmit); - db_printf("\tic_updateslot %p\n", ic->ic_updateslot); - db_printf("\tic_update_mcast %p\n", ic->ic_update_mcast); - db_printf("\tic_update_promisc %p\n", ic->ic_update_promisc); - db_printf("\tic_node_alloc %p\n", ic->ic_node_alloc); - db_printf("\tic_node_free %p\n", ic->ic_node_free); - db_printf("\tic_node_cleanup %p\n", ic->ic_node_cleanup); - db_printf("\tic_node_getrssi %p\n", ic->ic_node_getrssi); - db_printf("\tic_node_getsignal %p\n", ic->ic_node_getsignal); - db_printf("\tic_node_getmimoinfo %p\n", ic->ic_node_getmimoinfo); - db_printf("\tic_scan_start %p\n", ic->ic_scan_start); - db_printf("\tic_scan_end %p\n", ic->ic_scan_end); - db_printf("\tic_set_channel %p\n", ic->ic_set_channel); - db_printf("\tic_scan_curchan %p\n", ic->ic_scan_curchan); - db_printf("\tic_scan_mindwell %p\n", ic->ic_scan_mindwell); - db_printf("\tic_recv_action %p\n", ic->ic_recv_action); - db_printf("\tic_send_action %p\n", ic->ic_send_action); - db_printf("\tic_addba_request %p\n", ic->ic_addba_request); - db_printf("\tic_addba_response %p\n", ic->ic_addba_response); - db_printf("\tic_addba_stop %p\n", ic->ic_addba_stop); - } - if (showvaps && !TAILQ_EMPTY(&ic->ic_vaps)) { - db_printf("\n"); - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) - _db_show_vap(vap, showprocs); - } - if (showsta && !TAILQ_EMPTY(&ic->ic_sta.nt_node)) { - const struct ieee80211_node_table *nt = &ic->ic_sta; - const struct ieee80211_node *ni; - - db_printf("\n"); - TAILQ_FOREACH(ni, &nt->nt_node, ni_list) - _db_show_sta(ni); - } + ic = (const struct ieee80211com *) addr; + _db_show_com(ic, showvaps, showsta, showprocs); } DB_SHOW_ALL_COMMAND(vaps, db_show_all_vaps) { const struct ifnet *ifp; + int i, showall = 0; + for (i = 0; modif[i] != '\0'; i++) + switch (modif[i]) { + case 'a': + showall = 1; + break; + } + TAILQ_FOREACH(ifp, &ifnet, if_list) if (ifp->if_type == IFT_IEEE80211) { const struct ieee80211com *ic = ifp->if_softc; - const struct ieee80211vap *vap; - db_printf("%s: com %p vaps:", ifp->if_xname, ic); - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) - db_printf(" %s(%p)", vap->iv_ifp->if_xname, vap); - db_printf("\n"); + if (!showall) { + const struct ieee80211vap *vap; + db_printf("%s: com %p vaps:", + ifp->if_xname, ic); + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) + db_printf(" %s(%p)", + vap->iv_ifp->if_xname, vap); + db_printf("\n"); + } else + _db_show_com(ic, 1, 1, 1); } } static void +_db_show_txampdu(const char *sep, int ix, const struct ieee80211_tx_ampdu *tap) +{ + db_printf("%stxampdu[%d]: %p flags %b ac %u\n", + sep, ix, tap, tap->txa_flags, IEEE80211_AGGR_BITS, tap->txa_ac); + db_printf("%s token %u qbytes %d qframes %d seqstart %u start %u wnd %u\n", + sep, tap->txa_token, tap->txa_qbytes, tap->txa_qframes, + tap->txa_seqstart, tap->txa_start, tap->txa_wnd); + db_printf("%s attempts %d lastrequest %d\n", + sep, tap->txa_attempts, tap->txa_lastrequest); + /* XXX packet q + timer */ +} + +static void +_db_show_rxampdu(const char *sep, int ix, const struct ieee80211_rx_ampdu *rap) +{ + db_printf("%srxampdu[%d]: %p flags 0x%x tid %u\n", + sep, ix, rap, rap->rxa_flags, ix /*XXX */); + db_printf("%s qbytes %d qframes %d seqstart %u start %u wnd %u\n", + sep, rap->rxa_qbytes, rap->rxa_qframes, + rap->rxa_seqstart, rap->rxa_start, rap->rxa_wnd); + db_printf("%s age %d nframes %d\n", + sep, rap->rxa_age, rap->rxa_nframes); +} + +static void _db_show_sta(const struct ieee80211_node *ni) { + int i; + db_printf("0x%p: mac %s refcnt %d\n", ni, ether_sprintf(ni->ni_macaddr), ieee80211_node_refcnt(ni)); - db_printf("\tscangen %u authmode %u flags 0x%x\n", - ni->ni_scangen, ni->ni_authmode, ni->ni_flags); + db_printf("\tvap %p wdsvap %p ic %p table %p\n", + ni->ni_vap, ni->ni_wdsvap, ni->ni_ic, ni->ni_table); + db_printf("\tflags=%b\n", ni->ni_flags, IEEE80211_NODE_BITS); + db_printf("\tscangen %u authmode %u ath_flags 0x%x ath_defkeyix %u\n", + ni->ni_scangen, ni->ni_authmode, + ni->ni_ath_flags, ni->ni_ath_defkeyix); db_printf("\tassocid 0x%x txpower %u vlan %u\n", ni->ni_associd, ni->ni_txpower, ni->ni_vlan); + db_printf("\tjointime %d (%lu secs) challenge %p\n", + ni->ni_jointime, (unsigned long)(time_uptime - ni->ni_jointime), + ni->ni_challenge); + db_printf("\ties: data %p len %d\n", ni->ni_ies.data, ni->ni_ies.len); + db_printf("\t[wpa_ie %p rsn_ie %p wme_ie %p ath_ie %p\n", + ni->ni_ies.wpa_ie, ni->ni_ies.rsn_ie, ni->ni_ies.wme_ie, + ni->ni_ies.ath_ie); + db_printf("\t htcap_ie %p htinfo_ie %p]\n", + ni->ni_ies.htcap_ie, ni->ni_ies.htinfo_ie); db_printf("\ttxseq %u rxseq %u fragno %u rxfragstamp %u\n", ni->ni_txseqs[IEEE80211_NONQOS_TID], ni->ni_rxseqs[IEEE80211_NONQOS_TID] >> IEEE80211_SEQ_SEQ_SHIFT, ni->ni_rxseqs[IEEE80211_NONQOS_TID] & IEEE80211_SEQ_FRAG_MASK, ni->ni_rxfragstamp); - db_printf("\trstamp %u avgrssi 0x%x noise %d intval %u capinfo 0x%x\n", - ni->ni_rstamp, ni->ni_avgrssi, ni->ni_noise, - ni->ni_intval, ni->ni_capinfo); + db_printf("\trxfrag[0] %p rxfrag[1] %p rxfrag[2] %p\n", + ni->ni_rxfrag[0], ni->ni_rxfrag[1], ni->ni_rxfrag[2]); + db_printf("\trstamp %u avgrssi 0x%x (rssi %d) noise %d\n", + ni->ni_rstamp, ni->ni_avgrssi, + IEEE80211_RSSI_GET(ni->ni_avgrssi), ni->ni_noise); + db_printf("\tintval %u capinfo %b\n", + ni->ni_intval, ni->ni_capinfo, IEEE80211_CAPINFO_BITS); db_printf("\tbssid %s", ether_sprintf(ni->ni_bssid)); _db_show_ssid(" essid ", 0, ni->ni_esslen, ni->ni_essid); db_printf("\n"); _db_show_channel("\tchannel", ni->ni_chan); db_printf("\n"); - db_printf("\tinact %u txrate %u\n", - ni->ni_inact, ni->ni_txrate); - db_printf("\thtcap %x htparam %x htctlchan %u ht2ndchan %u\n", - ni->ni_htcap, ni->ni_htparam, - ni->ni_htctlchan, ni->ni_ht2ndchan); - db_printf("\thtopmode %x htstbc %x chw %u\n", - ni->ni_htopmode, ni->ni_htstbc, ni->ni_chw); + db_printf("\terp %b dtim_period %u dtim_count %u\n", + ni->ni_erp, IEEE80211_ERP_BITS, + ni->ni_dtim_period, ni->ni_dtim_count); + + db_printf("\thtcap %b htparam 0x%x htctlchan %u ht2ndchan %u\n", + ni->ni_htcap, IEEE80211_HTCAP_BITS, + ni->ni_htparam, ni->ni_htctlchan, ni->ni_ht2ndchan); + db_printf("\thtopmode 0x%x htstbc 0x%x reqcw %u chw %u\n", + ni->ni_htopmode, ni->ni_htstbc, ni->ni_reqcw, ni->ni_chw); + + /* XXX ampdu state */ + for (i = 0; i < WME_NUM_AC; i++) + if (ni->ni_tx_ampdu[i].txa_flags & IEEE80211_AGGR_SETUP) + _db_show_txampdu("\t", i, &ni->ni_tx_ampdu[i]); + for (i = 0; i < WME_NUM_TID; i++) + if (ni->ni_rx_ampdu[i].rxa_nframes) + _db_show_rxampdu("\t", i, &ni->ni_rx_ampdu[i]); + + db_printf("\tinact %u inact_reload %u txrate %u\n", + ni->ni_inact, ni->ni_inact_reload, ni->ni_txrate); + /* XXX savedq */ + /* XXX wdsq */ } static void @@ -384,7 +327,7 @@ db_printf("\tflags_ext=%b\n", vap->iv_flags_ext, IEEE80211_FEXT_BITS); db_printf("\tflags_ven=%b\n", vap->iv_flags_ven, IEEE80211_FVEN_BITS); db_printf("\tcaps=%b\n", vap->iv_caps, IEEE80211_C_BITS); - db_printf("\thtcaps=%b\n", vap->iv_htcaps, IEEE80211_HTCAP_BITS); + db_printf("\thtcaps=%b\n", vap->iv_htcaps, IEEE80211_C_HTCAP_BITS); _db_show_stats(&vap->iv_stats); @@ -414,15 +357,15 @@ db_printf("\tscanreq_duration %u", vap->iv_scanreq_duration); db_printf(" scanreq_mindwell %u", vap->iv_scanreq_mindwell); db_printf(" scanreq_maxdwell %u", vap->iv_scanreq_maxdwell); + db_printf("\n"); db_printf(" scanreq_flags 0x%x", vap->iv_scanreq_flags); - db_printf("\n"); db_printf("\tscanreq_nssid %d", vap->iv_scanreq_nssid); for (i = 0; i < vap->iv_scanreq_nssid; i++) _db_show_ssid(" scanreq_ssid[%u]", i, vap->iv_scanreq_ssid[i].len, vap->iv_scanreq_ssid[i].ssid); db_printf(" roaming %d", vap->iv_roaming); db_printf("\n"); - for (i = 0; i < IEEE80211_MODE_MAX; i++) + for (i = IEEE80211_MODE_11A; i < IEEE80211_MODE_MAX; i++) if (isset(ic->ic_modecaps, i)) { _db_show_roamparams("\troamparms[%s]", ieee80211_phymode_name[i], &vap->iv_roamparms[i]); @@ -463,7 +406,7 @@ db_printf(" fragthreshold %u", vap->iv_fragthreshold); db_printf(" inact_timer %d", vap->iv_inact_timer); db_printf("\n"); - for (i = 0; i < IEEE80211_MODE_MAX; i++) + for (i = IEEE80211_MODE_11A; i < IEEE80211_MODE_MAX; i++) if (isset(ic->ic_modecaps, i)) { _db_show_txparams("\ttxparms[%s]", ieee80211_phymode_name[i], &vap->iv_txparms[i]); @@ -516,6 +459,165 @@ } static void +_db_show_com(const struct ieee80211com *ic, int showvaps, int showsta, int showprocs) +{ + struct ieee80211vap *vap; + + db_printf("%p:", ic); + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) + db_printf(" %s(%p)", vap->iv_ifp->if_xname, vap); + db_printf("\n"); + db_printf("\tifp %p", ic->ic_ifp); + db_printf(" comlock %p", &ic->ic_comlock); + db_printf(" mgtq %p", &ic->ic_mgtq); + db_printf("\n"); + _db_show_stats(&ic->ic_stats); + db_printf("\theadroom %d", ic->ic_headroom); + db_printf(" phytype %d", ic->ic_phytype); + db_printf(" opmode %s", ieee80211_opmode_name[ic->ic_opmode]); + db_printf("\n"); + db_printf("\tmedia %p", &ic->ic_media); + db_printf(" myaddr %s", ether_sprintf(ic->ic_myaddr)); + db_printf(" inact %p", &ic->ic_inact); + db_printf("\n"); + + db_printf("\tflags=%b\n", ic->ic_flags, IEEE80211_F_BITS); + db_printf("\tflags_ext=%b\n", ic->ic_flags_ext, IEEE80211_FEXT_BITS); + db_printf("\tflags_ven=%b\n", ic->ic_flags_ven, IEEE80211_FVEN_BITS); + db_printf("\tcaps=%b\n", ic->ic_caps, IEEE80211_C_BITS); + db_printf("\thtcaps=%b\n", ic->ic_htcaps, IEEE80211_HTCAP_BITS); + +#if 0 + uint8_t ic_modecaps[2]; /* set of mode capabilities */ +#endif + db_printf("\tcurmode %u", ic->ic_curmode); + db_printf(" promisc %u", ic->ic_promisc); + db_printf(" allmulti %u", ic->ic_allmulti); + db_printf(" nrunning %u", ic->ic_nrunning); + db_printf("\n"); + db_printf("\tbintval %u", ic->ic_bintval); + db_printf(" lintval %u", ic->ic_lintval); + db_printf(" holdover %u", ic->ic_holdover); + db_printf(" txpowlimit %u", ic->ic_txpowlimit); + db_printf("\n"); +#if 0 + struct ieee80211_rateset ic_sup_rates[IEEE80211_MODE_MAX]; +#endif + /* + * Channel state: + * + * ic_channels is the set of available channels for the device; + * it is setup by the driver + * ic_nchans is the number of valid entries in ic_channels + * ic_chan_avail is a bit vector of these channels used to check + * whether a channel is available w/o searching the channel table. + * ic_chan_active is a (potentially) constrained subset of + * ic_chan_avail that reflects any mode setting or user-specified + * limit on the set of channels to use/scan + * ic_curchan is the current channel the device is set to; it may + * be different from ic_bsschan when we are off-channel scanning + * or otherwise doing background work + * ic_bsschan is the channel selected for operation; it may + * be undefined (IEEE80211_CHAN_ANYC) + * ic_prevchan is a cached ``previous channel'' used to optimize + * lookups when switching back+forth between two channels + * (e.g. for dynamic turbo) + */ + db_printf("\tnchans %d", ic->ic_nchans); +#if 0 + struct ieee80211_channel ic_channels[IEEE80211_CHAN_MAX+1]; + uint8_t ic_chan_avail[IEEE80211_CHAN_BYTES]; + uint8_t ic_chan_active[IEEE80211_CHAN_BYTES]; + uint8_t ic_chan_scan[IEEE80211_CHAN_BYTES]; +#endif + db_printf("\n"); + _db_show_channel("\tcurchan", ic->ic_curchan); + db_printf("\n"); + _db_show_channel("\tbsschan", ic->ic_bsschan); + db_printf("\n"); + _db_show_channel("\tprevchan", ic->ic_prevchan); + db_printf("\n"); + db_printf("\tregdomain %p", &ic->ic_regdomain); + db_printf("\n"); + + _db_show_channel("\tcsa_newchan", ic->ic_csa_newchan); + db_printf(" csa_count %d", ic->ic_csa_count); + db_printf( "dfs %p", &ic->ic_dfs); + db_printf("\n"); + + db_printf("\tscan %p", ic->ic_scan); + db_printf(" lastdata %d", ic->ic_lastdata); + db_printf(" lastscan %d", ic->ic_lastscan); + db_printf("\n"); + + db_printf("\tmax_keyix %d", ic->ic_max_keyix); + db_printf(" sta %p", &ic->ic_sta); + db_printf(" wme %p", &ic->ic_wme); + db_printf("\n"); + + db_printf("\tprotmode %d", ic->ic_protmode); + db_printf(" nonerpsta %u", ic->ic_nonerpsta); + db_printf(" longslotsta %u", ic->ic_longslotsta); + db_printf(" lastnonerp %d", ic->ic_lastnonerp); + db_printf("\n"); + db_printf("\tsta_assoc %u", ic->ic_sta_assoc); + db_printf(" ht_sta_assoc %u", ic->ic_ht_sta_assoc); + db_printf(" ht40_sta_assoc %u", ic->ic_ht40_sta_assoc); + db_printf("\n"); + db_printf("\tcurhtprotmode 0x%x", ic->ic_curhtprotmode); + db_printf(" htprotmode %d", ic->ic_htprotmode); + db_printf(" lastnonht %d", ic->ic_lastnonht); + db_printf("\n"); + + if (showprocs) { + db_printf("\tic_vap_create %p\n", ic->ic_vap_create); + db_printf("\tic_vap_delete %p\n", ic->ic_vap_delete); +#if 0 + /* operating mode attachment */ + ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX]; +#endif + db_printf("\tic_newassoc %p\n", ic->ic_newassoc); + db_printf("\tic_getradiocaps %p\n", ic->ic_getradiocaps); + db_printf("\tic_setregdomain %p\n", ic->ic_setregdomain); + db_printf("\tic_send_mgmt %p\n", ic->ic_send_mgmt); + db_printf("\tic_raw_xmit %p\n", ic->ic_raw_xmit); + db_printf("\tic_updateslot %p\n", ic->ic_updateslot); + db_printf("\tic_update_mcast %p\n", ic->ic_update_mcast); + db_printf("\tic_update_promisc %p\n", ic->ic_update_promisc); + db_printf("\tic_node_alloc %p\n", ic->ic_node_alloc); + db_printf("\tic_node_free %p\n", ic->ic_node_free); + db_printf("\tic_node_cleanup %p\n", ic->ic_node_cleanup); + db_printf("\tic_node_getrssi %p\n", ic->ic_node_getrssi); + db_printf("\tic_node_getsignal %p\n", ic->ic_node_getsignal); + db_printf("\tic_node_getmimoinfo %p\n", ic->ic_node_getmimoinfo); + db_printf("\tic_scan_start %p\n", ic->ic_scan_start); + db_printf("\tic_scan_end %p\n", ic->ic_scan_end); + db_printf("\tic_set_channel %p\n", ic->ic_set_channel); + db_printf("\tic_scan_curchan %p\n", ic->ic_scan_curchan); + db_printf("\tic_scan_mindwell %p\n", ic->ic_scan_mindwell); + db_printf("\tic_recv_action %p\n", ic->ic_recv_action); + db_printf("\tic_send_action %p\n", ic->ic_send_action); + db_printf("\tic_addba_request %p\n", ic->ic_addba_request); + db_printf("\tic_addba_response %p\n", ic->ic_addba_response); + db_printf("\tic_addba_stop %p\n", ic->ic_addba_stop); + } + if (showvaps && !TAILQ_EMPTY(&ic->ic_vaps)) { + db_printf("\n"); + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) + _db_show_vap(vap, showprocs); + } + if (showsta && !TAILQ_EMPTY(&ic->ic_sta.nt_node)) { + const struct ieee80211_node_table *nt = &ic->ic_sta; + const struct ieee80211_node *ni; + + TAILQ_FOREACH(ni, &nt->nt_node, ni_list) { + db_printf("\n"); + _db_show_sta(ni); + } + } +} + +static void _db_show_channel(const char *tag, const struct ieee80211_channel *c) { db_printf("%s ", tag); @@ -641,13 +743,14 @@ static void printrate(const char *tag, int v) { - if (v == 11) + if (v == IEEE80211_FIXED_RATE_NONE) + db_printf(" %s ", tag); + else if (v == 11) db_printf(" %s 5.5", tag); - else if (v & IEEE80211_RATE_MCS) { + else if (v & IEEE80211_RATE_MCS) db_printf(" %s MCS%d", tag, v &~ IEEE80211_RATE_MCS); - } else { + else db_printf(" %s %d", tag, v/2); - } } static void From owner-p4-projects@FreeBSD.ORG Fri Feb 8 23:13:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E864316A41B; Fri, 8 Feb 2008 23:13: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 9548E16A417 for ; Fri, 8 Feb 2008 23:13:42 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7FD1313C468 for ; Fri, 8 Feb 2008 23:13:42 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18NDg9p018851 for ; Fri, 8 Feb 2008 23:13:42 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18NDg7b018848 for perforce@freebsd.org; Fri, 8 Feb 2008 23:13:42 GMT (envelope-from sam@freebsd.org) Date: Fri, 8 Feb 2008 23:13:42 GMT Message-Id: <200802082313.m18NDg7b018848@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135067 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 23:13:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=135067 Change 135067 by sam@sam_ebb on 2008/02/08 23:13:00 add M_EAPOL for classifier to mark EAPOL frames Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_freebsd.h#16 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.h#16 (text+ko) ==== @@ -228,10 +228,12 @@ #define M_LINK0 M_PROTO1 /* WEP requested */ #define M_PWR_SAV M_PROTO4 /* bypass PS handling */ #define M_MORE_DATA M_PROTO5 /* more data frames to follow */ -#define M_FF 0x20000 /* fast frame */ -#define M_TXCB 0x40000 /* do tx complete callback */ -#define M_WDS 0x80000 /* WDS frame */ -#define M_80211_TX (0x60000|M_PROTO1|M_WME_AC_MASK|M_PROTO4|M_PROTO5|M_WDS) +#define M_FF 0x020000 /* fast frame */ +#define M_TXCB 0x040000 /* do tx complete callback */ +#define M_WDS 0x080000 /* WDS frame */ +#define M_EAPOL 0x100000 /* PAE/EAPOL frame */ +#define M_80211_TX \ + (0x60000|M_PROTO1|M_WME_AC_MASK|M_PROTO4|M_PROTO5|M_WDS|M_EAPOL) /* rx path usage */ #define M_AMPDU M_PROTO1 /* A-MPDU processing done */ From owner-p4-projects@FreeBSD.ORG Fri Feb 8 23:17:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 72FC216A474; Fri, 8 Feb 2008 23:17:47 +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 36E6316A46E for ; Fri, 8 Feb 2008 23:17:47 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 20A5413C43E for ; Fri, 8 Feb 2008 23:17:47 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18NHlE5019206 for ; Fri, 8 Feb 2008 23:17:47 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18NHk3u019203 for perforce@freebsd.org; Fri, 8 Feb 2008 23:17:46 GMT (envelope-from sam@freebsd.org) Date: Fri, 8 Feb 2008 23:17:46 GMT Message-Id: <200802082317.m18NHk3u019203@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135068 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 23:17:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=135068 Change 135068 by sam@sam_ebb on 2008/02/08 23:17:00 mark EAPOL frames w/ M_EAPOL in ieee80211_classify and assign them to the VO ac so they get high priority Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_output.c#26 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#26 (text+ko) ==== @@ -139,6 +139,9 @@ * Sanitize mbuf flags for net80211 use. We cannot * clear M_PWR_SAV because this may be set for frames * that are re-submitted from the power save queue. + * + * NB: This must be done before ieee80211_classify as + * it marks EAPOL in frames with M_EAPOL. */ m->m_flags &= ~(M_80211_TX - M_PWR_SAV); /* @@ -349,6 +352,14 @@ ni = ieee80211_ref_node(vap->iv_bss); } + /* + * Sanitize mbuf for net80211 flags leaked from above. + * + * NB: This must be done before ieee80211_classify as + * it marks EAPOL in frames with M_EAPOL. + */ + m->m_flags &= ~M_80211_TX; + /* calculate priority so drivers can find the tx queue */ /* XXX assumes an 802.3 frame */ if (ieee80211_classify(ni, m)) @@ -356,9 +367,6 @@ BPF_MTAP(ifp, m); - /* sanitize mbuf for net80211 flags leaked from above */ - m->m_flags &= ~M_80211_TX; - /* * NB: DLT_IEEE802_11_RADIO identifies the parameters are * present by setting the sa_len field of the sockaddr (yes, @@ -580,8 +588,21 @@ int ieee80211_classify(struct ieee80211_node *ni, struct mbuf *m) { + const struct ether_header *eh = mtod(m, struct ether_header *); int v_wme_ac, d_wme_ac, ac; + /* + * Always promote PAE/EAPOL frames to high priority. + */ + if (eh->ether_type == htons(ETHERTYPE_PAE)) { + /* NB: mark so others don't need to check header */ + m->m_flags |= M_EAPOL; + ac = WME_AC_VO; + goto done; + } + /* + * Non-qos traffic goes to BE. + */ if ((ni->ni_flags & IEEE80211_NODE_QOS) == 0) { ac = WME_AC_BE; goto done; @@ -607,7 +628,7 @@ } #ifdef INET - if (mtod(m, struct ether_header *)->ether_type == htons(ETHERTYPE_IP)) { + if (eh->ether_type == htons(ETHERTYPE_IP)) { uint8_t tos; /* * IP frame, map the DSCP bits from the TOS field. @@ -775,6 +796,9 @@ * If an error is encountered NULL is returned. The caller is required * to provide a node reference and pullup the ethernet header in the * first mbuf. + * + * NB: Packet is assumed to be processed by ieee80211_classify which + * marked EAPOL frames w/ M_EAPOL. */ struct mbuf * ieee80211_encap(struct ieee80211_node *ni, struct mbuf *m) @@ -816,7 +840,7 @@ key = ieee80211_crypto_getucastkey(vap, ni); else key = ieee80211_crypto_getmcastkey(vap, ni); - if (key == NULL && eh.ether_type != htons(ETHERTYPE_PAE)) { + if (key == NULL && (m->m_flags & M_EAPOL)) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, eh.ether_dhost, "no default transmit key (%s) deftxkey %u", @@ -834,7 +858,7 @@ * configurable. */ addqos = (ni->ni_flags & (IEEE80211_NODE_QOS|IEEE80211_NODE_HT)) && - eh.ether_type != htons(ETHERTYPE_PAE); + (m->m_flags & M_EAPOL) == 0; if (addqos) hdrsize = sizeof(struct ieee80211_qosframe); else @@ -1038,7 +1062,7 @@ * IEEE 802.1X: send EAPOL frames always in the clear. * WPA/WPA2: encrypt EAPOL keys when pairwise keys are set. */ - if (eh.ether_type != htons(ETHERTYPE_PAE) || + if ((m->m_flags & M_EAPOL) == 0 || ((vap->iv_flags & IEEE80211_F_WPA) && (vap->iv_opmode == IEEE80211_M_STA ? !IEEE80211_KEY_UNDEFINED(key) : From owner-p4-projects@FreeBSD.ORG Fri Feb 8 23:18:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CF6C616A41B; Fri, 8 Feb 2008 23:18:48 +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 619CC16A473 for ; Fri, 8 Feb 2008 23:18:48 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4C96013C45B for ; Fri, 8 Feb 2008 23:18:48 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18NImub019248 for ; Fri, 8 Feb 2008 23:18:48 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18NImoW019245 for perforce@freebsd.org; Fri, 8 Feb 2008 23:18:48 GMT (envelope-from sam@freebsd.org) Date: Fri, 8 Feb 2008 23:18:48 GMT Message-Id: <200802082318.m18NImoW019245@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135069 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 23:18:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=135069 Change 135069 by sam@sam_ebb on 2008/02/08 23:18:35 don't classify mgt frames according to QoS use; assign ProbeResponse frames to BE and all others to the VO q so they get high priority Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_output.c#27 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#27 (text+ko) ==== @@ -495,8 +495,8 @@ "encrypting frame (%s)", __func__); wh->i_fc[1] |= IEEE80211_FC1_WEP; } - if (ni->ni_flags & IEEE80211_NODE_QOS) { - /* NB: force all management frames to the highest queue */ + if (type != IEEE80211_FC0_SUBTYPE_PROBE_RESP) { + /* NB: force non-ProbeResp frames to the highest queue */ M_WME_SETAC(m, WME_AC_VO); } else M_WME_SETAC(m, WME_AC_BE); From owner-p4-projects@FreeBSD.ORG Fri Feb 8 23:21:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4D01A16A468; Fri, 8 Feb 2008 23:21:52 +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 1091F16A418 for ; Fri, 8 Feb 2008 23:21:52 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E5C8013C468 for ; Fri, 8 Feb 2008 23:21:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18NLp9E019502 for ; Fri, 8 Feb 2008 23:21:51 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18NLpX7019499 for perforce@freebsd.org; Fri, 8 Feb 2008 23:21:51 GMT (envelope-from sam@freebsd.org) Date: Fri, 8 Feb 2008 23:21:51 GMT Message-Id: <200802082321.m18NLpX7019499@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135071 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 23:21:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=135071 Change 135071 by sam@sam_ebb on 2008/02/08 23:21:23 correct HT protection handling of overlapping bss; need to give MIXED precedence over PROTOPT; this also fixes an issue with our bouncing between MIXED and PROTOPT on each beacon we received from an overlapping legacy bss Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_hostap.c#10 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#8 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_hostap.c#10 (text+ko) ==== @@ -1728,15 +1728,14 @@ break; } if (scan.htinfo == NULL) { - ic->ic_flags_ext |= IEEE80211_FEXT_NONHT_PR; - ic->ic_lastnonht = ticks; - ieee80211_htinfo_update(ic, + ieee80211_htprot_update(ic, IEEE80211_HTINFO_OPMODE_PROTOPT | IEEE80211_HTINFO_NONHT_PRESENT); } else if (ishtmixed(scan.htinfo)) { - /* XXX propagate HT20PR too? */ - ieee80211_htinfo_update(ic, - IEEE80211_HTINFO_OPMODE_MIXED); + /* XXX? take NONHT_PRESENT from beacon? */ + ieee80211_htprot_update(ic, + IEEE80211_HTINFO_OPMODE_MIXED | + IEEE80211_HTINFO_NONHT_PRESENT); } } break; ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#8 (text+ko) ==== @@ -930,12 +930,12 @@ { uint8_t protmode; - if (ic->ic_flags_ext & IEEE80211_FEXT_NONHT_PR) { + if (ic->ic_sta_assoc != ic->ic_ht_sta_assoc) { + protmode = IEEE80211_HTINFO_OPMODE_MIXED + | IEEE80211_HTINFO_NONHT_PRESENT; + } else if (ic->ic_flags_ext & IEEE80211_FEXT_NONHT_PR) { protmode = IEEE80211_HTINFO_OPMODE_PROTOPT - | IEEE80211_HTINFO_NONHT_PRESENT; - } else if (ic->ic_sta_assoc != ic->ic_ht_sta_assoc) { - protmode = IEEE80211_HTINFO_OPMODE_MIXED - | IEEE80211_HTINFO_NONHT_PRESENT; + | IEEE80211_HTINFO_NONHT_PRESENT; } else if (ic->ic_bsschan != IEEE80211_CHAN_ANYC && IEEE80211_IS_CHAN_HT40(ic->ic_bsschan) && ic->ic_sta_assoc != ic->ic_ht40_sta_assoc) { @@ -987,15 +987,36 @@ /* * Public version of htinfo_update; used for processing - * beacon frames from overlapping bss in hostap_recv_mgmt. + * beacon frames from overlapping bss. + * + * Caller can specify either IEEE80211_HTINFO_OPMODE_MIXED + * (on receipt of a beacon that advertises MIXED) or + * IEEE80211_HTINFO_OPMODE_PROTOPT (on receipt of a beacon + * from an overlapping legacy bss). We treat MIXED with + * a higher precedence than PROTOPT (i.e. we will not change + * change PROTOPT -> MIXED; only MIXED -> PROTOPT). This + * corresponds to how we handle things in htinfo_update. */ void -ieee80211_htinfo_update(struct ieee80211com *ic, int protmode) +ieee80211_htprot_update(struct ieee80211com *ic, int protmode) { - if (protmode != ic->ic_curhtprotmode) { - ic->ic_curhtprotmode = protmode; - htinfo_notify(ic); - } +#define OPMODE(x) SM(x, IEEE80211_HTINFO_OPMODE) + if (protmode == ic->ic_curhtprotmode) + return; + if (OPMODE(ic->ic_curhtprotmode) == IEEE80211_HTINFO_OPMODE_MIXED && + OPMODE(protmode) == IEEE80211_HTINFO_OPMODE_PROTOPT) + return; + + /* track non-HT station presence */ + KASSERT(protmode & IEEE80211_HTINFO_NONHT_PRESENT, + ("missing NONHT_PRESENT")); + ic->ic_flags_ext |= IEEE80211_FEXT_NONHT_PR; + ic->ic_lastnonht = ticks; + + /* push beacon update */ + ic->ic_curhtprotmode = protmode; + htinfo_notify(ic); +#undef OPMODE } /* From owner-p4-projects@FreeBSD.ORG Fri Feb 8 23:23:54 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9394316A474; Fri, 8 Feb 2008 23:23: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 5893616A420 for ; Fri, 8 Feb 2008 23:23:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 42B3F13C45B for ; Fri, 8 Feb 2008 23:23:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18NNsaL019581 for ; Fri, 8 Feb 2008 23:23:54 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18NNsl9019578 for perforce@freebsd.org; Fri, 8 Feb 2008 23:23:54 GMT (envelope-from sam@freebsd.org) Date: Fri, 8 Feb 2008 23:23:54 GMT Message-Id: <200802082323.m18NNsl9019578@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135072 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 23:23:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=135072 Change 135072 by sam@sam_ebb on 2008/02/08 23:23:09 track pps on ampdu-capable ac's and enable ampdu use when traffic crosses a threshold; we also provide access to these stats so drivers that want to maintain a cache of active BA streams can use them in making policy decisions Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_crypto_none.c#10 edit .. //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#17 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#9 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.h#7 edit .. //depot/projects/vap/sys/net80211/ieee80211_output.c#28 edit .. //depot/projects/vap/sys/net80211/ieee80211_var.h#25 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_crypto_none.c#10 (text+ko) ==== @@ -32,6 +32,7 @@ #include "opt_wlan.h" #include +#include #include #include #include ==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#17 (text+ko) ==== @@ -195,6 +195,22 @@ SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "bmiss_max", CTLFLAG_RW, &vap->iv_bmiss_max, 0, "consecutive beacon misses before scanning"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "ampdu_mintraffic_bk", CTLFLAG_RW, + &vap->iv_ampdu_mintraffic[WME_AC_BK], 0, + "BK traffic tx aggr threshold (pps)"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "ampdu_mintraffic_be", CTLFLAG_RW, + &vap->iv_ampdu_mintraffic[WME_AC_BE], 0, + "BE traffic tx aggr threshold (pps)"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "ampdu_mintraffic_vo", CTLFLAG_RW, + &vap->iv_ampdu_mintraffic[WME_AC_VO], 0, + "VO traffic tx aggr threshold (pps)"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "ampdu_mintraffic_vi", CTLFLAG_RW, + &vap->iv_ampdu_mintraffic[WME_AC_VI], 0, + "VI traffic tx aggr threshold (pps)"); vap->iv_sysctl = ctx; } ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#9 (text+ko) ==== @@ -135,6 +135,11 @@ vap->iv_ampdu_density = IEEE80211_HTCAP_MPDUDENSITY_NA; vap->iv_ampdu_limit = vap->iv_ampdu_rxmax; vap->iv_amsdu_limit = vap->iv_htcaps & IEEE80211_HTCAP_MAXAMSDU; + /* tx aggregation traffic thresholds */ + vap->iv_ampdu_mintraffic[WME_AC_BK] = 128; + vap->iv_ampdu_mintraffic[WME_AC_BE] = 64; + vap->iv_ampdu_mintraffic[WME_AC_VO] = 32; + vap->iv_ampdu_mintraffic[WME_AC_VI] = 32; if (vap->iv_htcaps & IEEE80211_HTC_HT) { /* @@ -781,6 +786,8 @@ */ ic->ic_addba_stop(ni, &ni->ni_tx_ampdu[i]); IEEE80211_TAPQ_DESTROY(tap); + tap->txa_lastsample = 0; + tap->txa_avgpps = 0; /* NB: clearing NAK means we may re-send ADDBA */ tap->txa_flags &= ~(IEEE80211_AGGR_SETUP | IEEE80211_AGGR_NAK); @@ -1532,6 +1539,11 @@ int tid, dialogtoken; static int tokens = 0; /* XXX */ + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, + "%s: enable AMPDU on %s, avgpps %d pkts %d", + __func__, ieee80211_wme_acnames[tap->txa_ac], + tap->txa_avgpps, tap->txa_pkts); + /* XXX locking */ if ((tap->txa_flags & IEEE80211_AGGR_SETUP) == 0) { /* do deferred setup of state */ ==== //depot/projects/vap/sys/net80211/ieee80211_ht.h#7 (text+ko) ==== @@ -46,6 +46,9 @@ #define IEEE80211_AGGR_NAK 0x0010 /* peer NAK'd ADDBA request */ uint8_t txa_ac; uint8_t txa_token; /* dialog token */ + int txa_lastsample; /* ticks @ last traffic sample */ + int txa_pkts; /* packets over last sample interval */ + int txa_avgpps; /* filtered traffic over window */ int txa_qbytes; /* data queued (bytes) */ short txa_qframes; /* data queued (frames) */ ieee80211_seq txa_seqstart; @@ -67,6 +70,65 @@ (((tap)->txa_flags & \ (IEEE80211_AGGR_RUNNING|IEEE80211_AGGR_XCHGPEND|IEEE80211_AGGR_NAK)) != 0) +/* + * Traffic estimator support. We estimate packets/sec for + * each AC that is setup for AMPDU or will potentially be + * setup for AMPDU. The traffic rate can be used to decide + * when AMPDU should be setup (according to a threshold) + * and is available for drivers to do things like cache + * eviction when only a limited number of BA streams are + * available and more streams are requested than available. + */ + +static void __inline +ieee80211_txampdu_update_pps(struct ieee80211_tx_ampdu *tap) +{ + /* NB: scale factor of 2 was picked heuristically */ + tap->txa_avgpps = ((tap->txa_avgpps << 2) - + tap->txa_avgpps + tap->txa_pkts) >> 2; +} + +/* + * Count a packet towards the pps estimate. + */ +static void __inline +ieee80211_txampdu_count_packet(struct ieee80211_tx_ampdu *tap) +{ + /* XXX bound loop/do more crude estimate? */ + while (ticks - tap->txa_lastsample >= hz) { + ieee80211_txampdu_update_pps(tap); + /* reset to start new sample interval */ + tap->txa_pkts = 0; + if (tap->txa_avgpps == 0) { + tap->txa_lastsample = ticks; + break; + } + tap->txa_lastsample += hz; + } + tap->txa_pkts++; +} + +/* + * Get the current pps estimate. If the average is out of + * date due to lack of traffic then we decay the estimate + * to account for the idle time. + */ +static int __inline +ieee80211_txampdu_getpps(struct ieee80211_tx_ampdu *tap) +{ + /* XXX bound loop/do more crude estimate? */ + while (ticks - tap->txa_lastsample >= hz) { + ieee80211_txampdu_update_pps(tap); + tap->txa_pkts = 0; + if (tap->txa_avgpps == 0) { + tap->txa_lastsample = ticks; + break; + } + tap->txa_lastsample += hz; + } + return tap->txa_avgpps; +} + struct ieee80211_rx_ampdu { int rxa_flags; int rxa_qbytes; /* data queued (bytes) */ @@ -106,7 +168,7 @@ void ieee80211_ht_wds_init(struct ieee80211_node *); void ieee80211_ht_node_join(struct ieee80211_node *); void ieee80211_ht_node_leave(struct ieee80211_node *); -void ieee80211_htinfo_update(struct ieee80211com *, int protmode); +void ieee80211_htprot_update(struct ieee80211com *, int protmode); void ieee80211_ht_timeout(struct ieee80211com *); void ieee80211_parse_htcap(struct ieee80211_node *, const uint8_t *); void ieee80211_parse_htinfo(struct ieee80211_node *, const uint8_t *); ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#28 (text+ko) ==== @@ -1013,8 +1013,8 @@ /* * Check if A-MPDU tx aggregation is setup or if we * should try to enable it. The sta must be associated - * with HT and A-MPDU enabled for use. On the first - * frame that goes out We issue an ADDBA request and + * with HT and A-MPDU enabled for use. When traffic + * passes a threshold we issue an ADDBA request and * wait for a reply. The frame being encapsulated * will go out w/o using A-MPDU, or possibly it might * be collected by the driver and held/retransmit. @@ -1026,12 +1026,14 @@ (vap->iv_flags_ext & IEEE80211_FEXT_AMPDU_TX)) { struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[ac]; + ieee80211_txampdu_count_packet(tap); if (IEEE80211_AMPDU_RUNNING(tap)) { /* * Operational, mark frame for aggregation. */ qos[0] |= IEEE80211_QOS_ACKPOLICY_BA; - } else if (!IEEE80211_AMPDU_REQUESTED(tap)) { + } else if (!IEEE80211_AMPDU_REQUESTED(tap) && + tap->txa_avgpps >= vap->iv_ampdu_mintraffic[tap->txa_ac]) { /* * Not negotiated yet, request service. */ ==== //depot/projects/vap/sys/net80211/ieee80211_var.h#25 (text+ko) ==== @@ -325,6 +325,7 @@ int iv_ampdu_density;/* A-MPDU density */ int iv_ampdu_limit; /* A-MPDU tx limit (bytes) */ int iv_amsdu_limit; /* A-MSDU tx limit (bytes) */ + u_int iv_ampdu_mintraffic[WME_NUM_AC]; uint32_t *iv_aid_bitmap; /* association id map */ uint16_t iv_max_aid; From owner-p4-projects@FreeBSD.ORG Fri Feb 8 23:57:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 48F8C16A41B; Fri, 8 Feb 2008 23:57: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 0EEC016A419 for ; Fri, 8 Feb 2008 23:57:32 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EEADB13C45A for ; Fri, 8 Feb 2008 23:57:31 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18NvVel020914 for ; Fri, 8 Feb 2008 23:57:31 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m18NvVMF020911 for perforce@freebsd.org; Fri, 8 Feb 2008 23:57:31 GMT (envelope-from jb@freebsd.org) Date: Fri, 8 Feb 2008 23:57:31 GMT Message-Id: <200802082357.m18NvVMF020911@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135074 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 23:57:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=135074 Change 135074 by jb@jb_freebsd1 on 2008/02/08 23:57:07 Allow the stub for smp_no_rendevous_barrier to be used in non-smp code. Affected files ... .. //depot/projects/dtrace/src/sys/sys/smp.h#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/sys/smp.h#6 (text+ko) ==== @@ -100,10 +100,10 @@ int restart_cpus(cpumask_t); int stop_cpus(cpumask_t); void smp_rendezvous_action(void); -void smp_no_rendevous_barrier(void *); extern struct mtx smp_ipi_mtx; #endif /* SMP */ +void smp_no_rendevous_barrier(void *); void smp_rendezvous(void (*)(void *), void (*)(void *), void (*)(void *), From owner-p4-projects@FreeBSD.ORG Sat Feb 9 00:46:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3254616A46B; Sat, 9 Feb 2008 00:46:24 +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 EB52316A417 for ; Sat, 9 Feb 2008 00:46:23 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D8D0E13C43E for ; Sat, 9 Feb 2008 00:46:23 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m190kN8s024874 for ; Sat, 9 Feb 2008 00:46:23 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m190kNte024871 for perforce@freebsd.org; Sat, 9 Feb 2008 00:46:23 GMT (envelope-from sam@freebsd.org) Date: Sat, 9 Feb 2008 00:46:23 GMT Message-Id: <200802090046.m190kNte024871@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135080 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 00:46:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=135080 Change 135080 by sam@sam_ebb on 2008/02/09 00:46:13 move debug msg down so it only shows up when an ADDBA request actually is to be sent Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#10 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#10 (text+ko) ==== @@ -1539,11 +1539,6 @@ int tid, dialogtoken; static int tokens = 0; /* XXX */ - IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, - "%s: enable AMPDU on %s, avgpps %d pkts %d", - __func__, ieee80211_wme_acnames[tap->txa_ac], - tap->txa_avgpps, tap->txa_pkts); - /* XXX locking */ if ((tap->txa_flags & IEEE80211_AGGR_SETUP) == 0) { /* do deferred setup of state */ @@ -1564,6 +1559,11 @@ /* XXX hack for not doing proper locking */ tap->txa_flags &= ~IEEE80211_AGGR_NAK; + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, + "%s: enable AMPDU on %s, avgpps %d pkts %d", + __func__, ieee80211_wme_acnames[tap->txa_ac], + tap->txa_avgpps, tap->txa_pkts); + dialogtoken = (tokens+1) % 63; /* XXX */ tid = WME_AC_TO_TID(tap->txa_ac); From owner-p4-projects@FreeBSD.ORG Sat Feb 9 02:55:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2156D16A475; Sat, 9 Feb 2008 02:55: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 DB54D16A473 for ; Sat, 9 Feb 2008 02:55:45 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CD24A13C468 for ; Sat, 9 Feb 2008 02:55:45 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m192tj2B043996 for ; Sat, 9 Feb 2008 02:55:45 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m192tjej043993 for perforce@freebsd.org; Sat, 9 Feb 2008 02:55:45 GMT (envelope-from rrs@cisco.com) Date: Sat, 9 Feb 2008 02:55:45 GMT Message-Id: <200802090255.m192tjej043993@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135084 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 02:55:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=135084 Change 135084 by rrs@rrs-mips2-jnpr on 2008/02/09 02:55:05 Fix a bug in TARGET_OCTEON. We were calling a clear function in the exception handler and then calling trap. Trap expects that a0 will have the stack frame pointer, the line above the CLEAR_STATUS sets the stack frame pointer into a0, but the octeon specific CLEAR_STATUS uses a0 thus blasting the arg to trap. re-arrange the lines so the clear status happens BEFORE the save off of the stack. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#14 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#14 (text+ko) ==== @@ -160,6 +160,7 @@ mfc0 k0, COP_0_BAD_VADDR #09: k0=bad address (again) beq k1, zero, 2f #0a: ==0 -- no page table srl k0, PGSHIFT - 2 #0b: k0=VPN (aka va>>10) + andi k0, k0, ((NPTEPG/2) - 1) << 3 #0c: k0=page tab offset addu k1, k1, k0 #0d: k1=pte address lw k0, 0(k1) #0e: k0=lo0 pte @@ -303,8 +304,8 @@ SAVE_REG(a3, PC, sp) ;\ addu v0, sp, KERN_EXC_FRAME_SIZE ;\ SAVE_REG(v0, SP, sp) ;\ + CLEAR_STATUS ;\ addu a0, sp, STAND_ARG_SIZE ;\ - CLEAR_STATUS ;\ ITLBNOPFIX #ifdef DDB From owner-p4-projects@FreeBSD.ORG Sat Feb 9 04:23:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7244A16A420; Sat, 9 Feb 2008 04:23:16 +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 1966F16A418 for ; Sat, 9 Feb 2008 04:23:16 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0B2C513C45B for ; Sat, 9 Feb 2008 04:23:16 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m194NFJQ051875 for ; Sat, 9 Feb 2008 04:23:16 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m194NEoi051872 for perforce@freebsd.org; Sat, 9 Feb 2008 04:23:14 GMT (envelope-from jb@freebsd.org) Date: Sat, 9 Feb 2008 04:23:14 GMT Message-Id: <200802090423.m194NEoi051872@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135085 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 04:23:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=135085 Change 135085 by jb@jb_freebsd1 on 2008/02/09 04:23:04 IFC Affected files ... .. //depot/projects/dtrace/doc/ru_RU.KOI8-R/man/man1/sh.1#2 integrate .. //depot/projects/dtrace/ports/LEGAL#33 integrate .. //depot/projects/dtrace/ports/Mk/bsd.sites.mk#22 integrate .. //depot/projects/dtrace/ports/UPDATING#52 integrate .. //depot/projects/dtrace/src/UPDATING#24 integrate .. //depot/projects/dtrace/src/bin/date/date.c#4 integrate .. //depot/projects/dtrace/src/etc/namedb/named.root#5 integrate .. //depot/projects/dtrace/src/lib/libc/stdlib/malloc.c#18 integrate .. //depot/projects/dtrace/src/lib/libfetch/common.c#6 integrate .. //depot/projects/dtrace/src/lib/libfetch/fetch.3#6 integrate .. //depot/projects/dtrace/src/lib/libfetch/ftp.c#8 integrate .. //depot/projects/dtrace/src/lib/libfetch/http.c#8 integrate .. //depot/projects/dtrace/src/lib/msun/ld128/s_exp2l.c#2 integrate .. //depot/projects/dtrace/src/lib/msun/ld80/s_exp2l.c#2 integrate .. //depot/projects/dtrace/src/lib/msun/src/e_exp.c#4 integrate .. //depot/projects/dtrace/src/lib/msun/src/e_expf.c#6 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_exp2.c#6 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_exp2f.c#7 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_expm1.c#4 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_expm1f.c#4 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_logb.c#5 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_truncl.c#4 integrate .. //depot/projects/dtrace/src/sbin/ipfw/ipfw.8#17 integrate .. //depot/projects/dtrace/src/sbin/md5/md5.c#4 integrate .. //depot/projects/dtrace/src/sys/fs/coda/coda_psdev.c#3 integrate .. //depot/projects/dtrace/src/sys/fs/coda/coda_subr.c#2 integrate .. //depot/projects/dtrace/src/sys/fs/coda/coda_venus.c#2 integrate .. //depot/projects/dtrace/src/sys/fs/coda/coda_vfsops.c#5 integrate .. //depot/projects/dtrace/src/sys/fs/coda/coda_vnops.c#6 integrate .. //depot/projects/dtrace/src/sys/fs/coda/coda_vnops.h#2 integrate .. //depot/projects/dtrace/src/sys/fs/nullfs/null_vfsops.c#9 integrate .. //depot/projects/dtrace/src/sys/i386/conf/YABBA#2 edit .. //depot/projects/dtrace/src/sys/kern/kern_lock.c#18 integrate .. //depot/projects/dtrace/src/sys/kern/kern_rwlock.c#14 integrate .. //depot/projects/dtrace/src/sys/kern/subr_sleepqueue.c#11 integrate .. //depot/projects/dtrace/src/sys/kern/subr_turnstile.c#12 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_shm.c#3 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_subr.c#30 integrate .. //depot/projects/dtrace/src/sys/netgraph/netflow/netflow.c#8 integrate .. //depot/projects/dtrace/src/sys/netinet/in_rmx.c#7 integrate .. //depot/projects/dtrace/src/sys/netinet/ip_carp.c#11 integrate .. //depot/projects/dtrace/src/sys/nfs4client/nfs4_vfsops.c#10 integrate .. //depot/projects/dtrace/src/sys/nfsclient/nfs_vfsops.c#15 integrate .. //depot/projects/dtrace/src/sys/sys/param.h#38 integrate .. //depot/projects/dtrace/src/sys/sys/proc.h#34 integrate .. //depot/projects/dtrace/src/usr.bin/ministat/ministat.c#2 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/netstat.h#7 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/route.c#10 integrate .. //depot/projects/dtrace/src/usr.bin/procstat/procstat.c#2 integrate .. //depot/projects/dtrace/src/usr.bin/procstat/procstat_basic.c#2 integrate .. //depot/projects/dtrace/src/usr.bin/procstat/procstat_files.c#4 integrate .. //depot/projects/dtrace/src/usr.bin/procstat/procstat_kstack.c#2 integrate .. //depot/projects/dtrace/src/usr.bin/procstat/procstat_threads.c#2 integrate .. //depot/projects/dtrace/src/usr.bin/procstat/procstat_vm.c#2 integrate .. //depot/projects/dtrace/src/usr.bin/uniq/uniq.c#5 integrate .. //depot/projects/dtrace/src/usr.sbin/bootparamd/Makefile#4 integrate .. //depot/projects/dtrace/src/usr.sbin/bootparamd/Makefile.inc#4 integrate .. //depot/projects/dtrace/src/usr.sbin/pkg_install/add/pkg_add.1#7 integrate Differences ... ==== //depot/projects/dtrace/doc/ru_RU.KOI8-R/man/man1/sh.1#2 (text+ko) ==== @@ -31,8 +31,8 @@ .\" .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" %FreeBSD: src/bin/sh/sh.1,v 1.125.2.1 2007/12/05 14:29:07 ru Exp % -.\" $FreeBSDru: frdp/doc/ru_RU.KOI8-R/man/man1/sh.1,v 1.2 2007/12/05 14:31:10 ru Exp $ -.\" $FreeBSD: doc/ru_RU.KOI8-R/man/man1/sh.1,v 1.2 2007/12/05 14:32:41 ru Exp $ +.\" $FreeBSDru: frdp/doc/ru_RU.KOI8-R/man/man1/sh.1,v 1.3 2008/02/08 13:05:39 ru Exp $ +.\" $FreeBSD: doc/ru_RU.KOI8-R/man/man1/sh.1,v 1.3 2008/02/08 13:52:03 ru Exp $ .\" .Dd 7 ÏËÔÑÂÒÑ 2006 .Dt SH 1 @@ -222,7 +222,7 @@ .Dv EOF ÎÁ ×ÈÏÄÅ. .It Fl i Li interactive -îÁÓÉÌØÎÏ ÕÓÔÁÎÏ×ÉÔØ ÉÎÔÅÒÁËÔÉ×ÎÙÊ ÒÅÖÉÍ ÒÁÂÏÔÙ ÏÂÏÌÏÞËÉ. +ðÒÉÎÕÄÉÔÅÌØÎÏ ÕÓÔÁÎÏ×ÉÔØ ÉÎÔÅÒÁËÔÉ×ÎÙÊ ÒÅÖÉÍ ÒÁÂÏÔÙ ÏÂÏÌÏÞËÉ. .It Fl m Li monitor ÷ËÌÀÞÉÔØ ÕÐÒÁ×ÌÅÎÉÅ ÚÁÄÁÎÉÑÍÉ (×ËÌÀÞÁÅÔÓÑ Á×ÔÏÍÁÔÉÞÅÓËÉ × ÉÎÔÅÒÁËÔÉ×ÎÏÍ ÒÅÖÉÍÅ). @@ -247,7 +247,7 @@ ÎÅ ÒÁ×ÅÎ ÒÅÁÌØÎÏÍÕ ÉÄÅÎÔÉÆÉËÁÔÏÒÕ ÐÏÌØÚÏ×ÁÔÅÌÑ ÉÌÉ ÇÒÕÐÐÙ. ÷ÙËÌÀÞÅÎÉÅ ÜÔÏÇÏ ÒÅÖÉÍÁ ÕÓÔÁÎÁ×ÌÉ×ÁÅÔ ÜÆÆÅËÔÉ×ÎÙÅ ÉÄÅÎÔÉÆÉËÁÔÏÒÙ ÐÏÌØÚÏ×ÁÔÅÌÑ É ÇÒÕÐÐÙ × ÒÅÁÌØÎÙÅ. -ëÏÇÄÁ ÜÔÏÔ ÒÅÖÉÍ ×ËÌÀÞÅÎ × ÉÎÔÅÒÁËÔÉ×ÎÏÊ ÏÂÏÌÏÞËÅ, ÔÏ ÐÏÓÌÅ ÆÁÊÌÁ +ëÏÇÄÁ ÜÔÏÔ ÒÅÖÉÍ ×ËÌÀÞÅÎ × ÉÎÔÅÒÁËÔÉ×ÎÏÊ ÏÂÏÌÏÞËÅ, ÐÏÓÌÅ ÆÁÊÌÁ .Pa /etc/profile ×ÍÅÓÔÏ .Pa ~/.profile @@ -425,7 +425,7 @@ ÓÏÚÄÁ×ÁÔØ ÆÕÎËÃÉÉ Ó ÁÒÇÕÍÅÎÔÁÍÉ. ïÎÉ ÔÁËÖÅ ÍÏÇÕÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÙ ÄÌÑ ÓÏÚÄÁÎÉÑ ÌÅËÓÉÞÅÓËÉ ÎÅ×ÒÁÚÕÍÉÔÅÌØÎÏÇÏ ËÏÄÁ. -éÓÐÏÌØÚÏ×ÁÎÉÅ ÐÓÅ×ÄÏÎÉÍÏ× ÄÌÑ ÜÔÉÈ ÃÅÌÅÊ ÎÅ ÒÅËÏÍÅÎÄÕÅÔÓÑ. +ôÁËÏÅ ÉÈ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÎÅ ÒÅËÏÍÅÎÄÕÅÔÓÑ. .Pp äÅÊÓÔ×ÉÅ ÐÓÅ×ÄÏÎÉÍÁ ÍÏÖÅÔ ÂÙÔØ ÏÔÍÅÎÅÎÏ × ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÅ, ÅÓÌÉ ÉÓÐÏÌØÚÏ×ÁÔØ ÜËÒÁÎÉÒÏ×ÁÎÉÅ ×ÎÕÔÒÉ ÉÌÉ ÓÍÅÖÎÏ Ó ÉÍÅÎÅÍ @@ -443,7 +443,7 @@ ïÓÎÏ×ÎÏÅ ÔÏ, ÞÔÏ ÞÉÔÁÅÔÓÑ ÓÔÒÏËÁ, É ÅÓÌÉ ÐÅÒ×ÏÅ ÓÌÏ×Ï × ÓÔÒÏËÅ (ÉÌÉ ÐÏÓÌÅ ÏÐÅÒÁÔÏÒÁ ÕÐÒÁ×ÌÅÎÉÑ) ÎÅ Ñ×ÌÑÅÔÓÑ ÚÁÒÅÚÅÒ×ÉÒÏ×ÁÎÎÙÍ, ÔÏ ÏÂÏÌÏÞËÁ ÒÁÓÐÏÚÎÁÌÁ ÐÒÏÓÔÕÀ ËÏÍÁÎÄÕ. -÷ ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ËÏÍÁÎÄÁ ÒÁÓÐÏÚÎÁ£ÔÓÑ ËÁË ÓÏÓÔÁ×ÎÁÑ ÉÌÉ ËÁË +÷ ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ËÏÍÁÎÄÁ ÒÁÓÐÏÚÎÁ£ÔÓÑ ËÁË ÓÌÏÖÎÁÑ ÉÌÉ ËÁË ÎÅËÏÔÏÒÁÑ ÄÒÕÇÁÑ ÓÐÅÃÉÁÌØÎÁÑ ËÏÎÓÔÒÕËÃÉÑ. .Ss ðÒÏÓÔÙÅ ËÏÍÁÎÄÙ ëÏÇÄÁ ÒÁÓÐÏÚÎÁ£ÔÓÑ ÐÒÏÓÔÁÑ ËÏÍÁÎÄÁ, ÏÂÏÌÏÞËÁ ÐÒÅÄÐÒÉÎÉÍÁÅÔ @@ -583,7 +583,7 @@ ÐÒÏÇÒÁÍÍÁ × ÆÁÊÌÏ×ÏÊ ÓÉÓÔÅÍÅ (ËÁË ÏÐÉÓÁÎÏ × ÓÌÅÄÕÀÝÅÍ ÒÁÚÄÅÌÅ). ëÏÇÄÁ ×ÙÐÏÌÎÑÅÔÓÑ ÏÂÙÞÎÁÑ ËÏÍÁÎÄÁ, ÏÂÏÌÏÞËÁ ÚÁÐÕÓËÁÅÔ ÜÔÕ ÐÒÏÇÒÁÍÍÕ, ÐÅÒÅÄÁ×ÁÑ ÅÊ ÁÒÇÕÍÅÎÔÙ É ÏËÒÕÖÅÎÉÅ. -åÓÌÉ ÐÒÏÇÒÁÍÍÁ ÎÅ Ñ×ÌÑÅÔÓÑ ÏÂÙÞÎÙÍ ÉÓÐÏÌÎÑÅÍÙÍ ÆÁÊÌ +åÓÌÉ ÐÒÏÇÒÁÍÍÁ ÎÅ Ñ×ÌÑÅÔÓÑ ÏÂÙÞÎÙÍ ÉÓÐÏÌÎÑÅÍÙÍ ÆÁÊÌÏÍ (Ô.Å.\& ÅÓÌÉ ÏÎÁ ÎÅ ÎÁÞÉÎÁÅÔÓÑ Ó .Dq "ÍÁÇÉÞÅÓËÏÇÏ ÞÉÓÌÁ" , ÞØ£ @@ -626,7 +626,7 @@ .Ev PATH ÄÏÌÖÅÎ ÂÙÔØ ÓÐÉÓÏË ÜÌÅÍÅÎÔÏ×, ÒÁÚÄÅÌ£ÎÎÙÈ Ä×ÏÅÔÏÞÉÑÍÉ. -÷ ËÁÖÄÏÍ ÜÌÅÍÅÎÔÅ ÕËÁÚÙ×ÁÅÔÓÑ +ëÁÖÄÙÊ ÜÌÅÍÅÎÔ ÚÁÄÁ£Ô ÉÍÑ ËÁÔÁÌÏÇÁ. ôÅËÕÝÉÊ ËÁÔÁÌÏÇ ÍÏÖÅÔ ÂÙÔØ ÚÁÄÁÎ ÎÅÑ×ÎÏ, ÐÕÓÔÙÍ ÉÍÅÎÅÍ ËÁÔÁÌÏÇÁ, @@ -648,10 +648,10 @@ ÎÏÍÅÒ ÓÉÇÎÁÌÁ. îÏÍÅÒÁ ÓÉÇÎÁÌÏ× ÏÐÒÅÄÅÌÅÎÙ × ÚÁÇÏÌÏ×ÏÞÎÏÍ ÆÁÊÌÅ .In sys/signal.h . -.Ss óÏÓÔÁ×ÎÙÅ ËÏÍÁÎÄÙ -óÏÓÔÁ×ÎÙÅ ËÏÍÁÎÄÙ \[em] ÜÔÏ ËÏÍÂÉÎÁÃÉÉ ÐÒÏÓÔÙÈ ËÏÍÁÎÄ +.Ss óÌÏÖÎÙÅ ËÏÍÁÎÄÙ +óÌÏÖÎÙÅ ËÏÍÁÎÄÙ \[em] ÜÔÏ ËÏÍÂÉÎÁÃÉÉ ÐÒÏÓÔÙÈ ËÏÍÁÎÄ Ó ÕÐÒÁ×ÌÑÀÝÉÍÉ ÏÐÅÒÁÔÏÒÁÍÉ ÉÌÉ ÚÁÒÅÚÅÒ×ÉÒÏ×ÁÎÎÙÍÉ ÓÌÏ×ÁÍÉ, ×ÍÅÓÔÅ ÓÏÓÔÁ×ÌÑÀÝÉÈ -ÏÄÎÕ ÂÏÌØÛÕÀ ÓÏÓÔÁ×ÎÕÀ ËÏÍÁÎÄÕ. +ÏÄÎÕ ÂÏÌØÛÕÀ ÓÌÏÖÎÕÀ ËÏÍÁÎÄÕ. ÷ ÏÂÝÅÍ, ËÏÍÁÎÄÁ ÂÙ×ÁÅÔ ÏÄÎÏÇÏ ÉÚ ÓÌÅÄÕÀÝÉÈ ÔÉÐÏ×: .Bl -item -offset indent .It @@ -1520,7 +1520,7 @@ ïÂÒÁÂÁÔÙ×ÁÔØ ÕÐÒÁ×ÌÑÀÝÉÅ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔÉ Ó ÏÂÒÁÔÎÏÊ ËÏÓÏÊ ÞÅÒÔÏÊ × ÓÔÉÌÅ C. ëÏÍÁÎÄÁ .Ic echo -ÐÏÎÉÍÁÅÔ ÓÌÅÄÕÀÝÉÅ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔÉ ÓÉÍ×ÏÌÏ×: +ÐÏÎÉÍÁÅÔ ÓÌÅÄÕÀÝÉÅ ÕÐÒÁ×ÌÑÀÝÉÅ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔÉ: .Bl -tag -width indent .It \ea óÉÇÎÁÌ ÔÒÅ×ÏÇÉ (ÐÏÚ×ÏÎÉÔØ × Ú×ÏÎÏË ÔÅÒÍÉÎÁÌÁ) @@ -1758,7 +1758,7 @@ ÷Ù×ÏÄÉÔ ÉÄÅÎÔÉÆÉËÁÔÏÒÙ ÐÒÏÃÅÓÓÏ× × ÕËÁÚÁÎÎÏÍ ÚÁÄÁÎÉÉ. åÓÌÉ ÁÒÇÕÍÅÎÔ .Ar ÚÁÄÁÎÉÅ -ÏÐÕÝÅÎ, ÉÓÐÏÌØÚÕÅÔÓÑ ÔÅËÕÝÁÑ ÚÁÄÁÎÉÅ. +ÏÐÕÝÅÎ, ÉÓÐÏÌØÚÕÅÔÓÑ ÔÅËÕÝÅÅ ÚÁÄÁÎÉÅ. .It Ic jobs Oo Fl lps Oc Op Ar ÚÁÄÁÎÉÅ ... ÷Ù×ÏÄÉÔ ÉÎÆÏÒÍÁÃÉÀ Ï ÕËÁÚÁÎÎÙÈ ÚÁÄÁÎÉÑÈ ÉÌÉ ×ÓÅÈ ÚÁÄÁÎÉÑÈ, ÅÓÌÉ ÎÅ ÕËÁÚÁÎ ÁÒÇÕÍÅÎÔ @@ -2060,7 +2060,7 @@ íÁËÓÉÍÁÌØÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÏÄÎÏ×ÒÅÍÅÎÎÏ ×ÙÐÏÌÎÑÀÝÉÈÓÑ ÐÒÏÃÅÓÓÏ× ÄÌÑ ÜÔÏÇÏ ÉÄÅÎÔÉÆÉËÁÔÏÒÁ ÐÏÌØÚÏ×ÁÔÅÌÑ. .It Fl v Ar virtualmem -íÁËÓÉÍÁÌØÎÙÊ ×ÉÒÔÕÁÌØÎÏÊ ÒÁÚÍÅÒ ÐÒÏÃÅÓÓÁ × ËÉÌÏÂÁÊÔÁÈ. +íÁËÓÉÍÁÌØÎÙÊ ×ÉÒÔÕÁÌØÎÙÊ ÒÁÚÍÅÒ ÐÒÏÃÅÓÓÁ × ËÉÌÏÂÁÊÔÁÈ. .El .It Ic umask Oo Fl S Oc Op Ar ÍÁÓËÁ õÓÔÁÎÁ×ÌÉ×ÁÅÔ ÍÁÓËÕ ÓÏÚÄÁÎÉÑ ÆÁÊÌÏ× (ÓÍ.\& ==== //depot/projects/dtrace/ports/LEGAL#33 (text+ko) ==== @@ -1,5 +1,5 @@ # Creator: Jordan Hubbard -# $FreeBSD: ports/LEGAL,v 1.564 2008/01/09 20:12:41 thierry Exp $ +# $FreeBSD: ports/LEGAL,v 1.565 2008/02/09 02:01:05 tabthorpe Exp $ ********************************************************************** *** NOTE TO COMMITTERS *** @@ -690,3 +690,4 @@ gamess.*/gamess* science/gamess No Redistribution vst_sdk2_3.zip audio/ardour Redistribution of the VST PlugIns SDK is not allowed send-* net-mgmt/send Not redistributable, license agreement required +rapid-* math/rapid No commercial use ==== //depot/projects/dtrace/ports/Mk/bsd.sites.mk#22 (text+ko) ==== @@ -20,7 +20,7 @@ # # Note: all entries should terminate with a slash. # -# $FreeBSD: ports/Mk/bsd.sites.mk,v 1.435 2008/02/01 08:05:09 linimon Exp $ +# $FreeBSD: ports/Mk/bsd.sites.mk,v 1.436 2008/02/07 16:13:41 shaun Exp $ # # Where to put distfiles that don't have any other master site @@ -1264,7 +1264,20 @@ # Updated: 2006-06-13 .if !defined(IGNORE_MASTER_SITE_VIM) MASTER_SITE_VIM+= \ - ftp://ftp.vim.org/pub/vim/unix/ \ + http://ftp.vim.org/pub/vim/unix/ \ + http://mirrors.24-7-solutions.net/pub/vim/unix/ \ + http://ftp.tw.vim.org/pub/vim/unix/ \ + http://vim.stu.edu.tw/unix/ \ + http://gd.tuwien.ac.at/pub/vim/unix/ \ + http://www.etsimo.uniovi.es/pub/vim/unix/ \ + http://www.pt.vim.org/pub/vim/unix/ \ + http://www.pangora.org/vim.org/pub/vim/unix/ \ + http://www.math.technion.ac.il/pub/vim/unix/ \ + http://vim.fyxm.net/pub/vim/unix/ \ + http://zloba.ath.cx/pub/vim/unix/ \ + http://ftp2.uk.vim.org/sites/ftp.vim.org/pub/vim/unix/ \ + http://vim.mirror.fr/unix/ \ + ftp://ftp.vim.org/pub/vim/unix/ \ ftp://ftp2.us.vim.org/pub/vim/unix/ \ ftp://ftp9.us.vim.org/pub/vim/unix/ \ ftp://ftp.ca.vim.org/pub/vim/unix/ \ @@ -1284,20 +1297,7 @@ ftp://vim.stu.edu.tw/pub/vim/unix/ \ ftp://ftp.jp.vim.org/pub/vim/unix/ \ ftp://ftp.kr.vim.org/pub/vim/unix/ \ - ftp://ftp.mirrorservice.org/sites/ftp.vim.org/pub/vim/unix/ \ - http://ftp.vim.org/pub/vim/unix/ \ - http://mirrors.24-7-solutions.net/pub/vim/unix/ \ - http://ftp.tw.vim.org/pub/vim/unix/ \ - http://vim.stu.edu.tw/unix/ \ - http://gd.tuwien.ac.at/pub/vim/unix/ \ - http://www.etsimo.uniovi.es/pub/vim/unix/ \ - http://www.pt.vim.org/pub/vim/unix/ \ - http://www.pangora.org/vim.org/pub/vim/unix/ \ - http://www.math.technion.ac.il/pub/vim/unix/ \ - http://vim.fyxm.net/pub/vim/unix/ \ - http://zloba.ath.cx/pub/vim/unix/ \ - http://ftp2.uk.vim.org/sites/ftp.vim.org/pub/vim/unix/ \ - http://vim.mirror.fr/unix/ + ftp://ftp.mirrorservice.org/sites/ftp.vim.org/pub/vim/unix/ .endif .if !defined(IGNORE_MASTER_SITE_WINDOWMAKER) ==== //depot/projects/dtrace/ports/UPDATING#52 (text+ko) ==== @@ -6,6 +6,16 @@ time you update your ports collection, before attempting any port upgrades. +20080208: + AFFECTS: users of ports-mgmt/portupgrade + AUTHOR: sem@FreeBSD.org + + As was claimed in an enrty 20070301 bellow in this file. You should fill + ALT_DEPENDS section of pkgtools.conf for portupgrade works correctly + with your alternative dependencies. Now it's an obligatory requirement. + + It was done as a compromise between speed and compexity. + 20080203: AFFECTS: users of www/xshttpd AUTHOR: johans@FreeBSD.org @@ -6061,4 +6071,4 @@ 2) Update all p5-* modules. portupgrade -f p5-\* -$FreeBSD: ports/UPDATING,v 1.584 2008/02/03 20:46:04 sat Exp $ +$FreeBSD: ports/UPDATING,v 1.586 2008/02/08 13:38:22 sem Exp $ ==== //depot/projects/dtrace/src/UPDATING#24 (text+ko) ==== @@ -22,6 +22,10 @@ to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20080208: + Belatedly note the addition of m_collapse for compacting + mbuf chains. + 20080126: The fts(3) structures have been changed to use adequate integer types for their members and so to be able to cope @@ -969,4 +973,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.517 2008/01/26 17:09:39 yar Exp $ +$FreeBSD: src/UPDATING,v 1.518 2008/02/08 21:24:58 sam Exp $ ==== //depot/projects/dtrace/src/bin/date/date.c#4 (text+ko) ==== @@ -40,7 +40,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/date/date.c,v 1.47 2005/01/10 08:39:21 imp Exp $"); +__FBSDID("$FreeBSD: src/bin/date/date.c,v 1.48 2008/02/07 16:04:24 ru Exp $"); #include #include @@ -186,8 +186,10 @@ const char *dot, *t; int century; + lt = localtime(&tval); + lt->tm_isdst = -1; /* divine correct DST */ + if (fmt != NULL) { - lt = localtime(&tval); t = strptime(p, fmt, lt); if (t == NULL) { fprintf(stderr, "Failed conversion of ``%s''" @@ -208,8 +210,6 @@ badformat(); } - lt = localtime(&tval); - if (dot != NULL) { /* .ss */ dot++; /* *dot++ = '\0'; */ if (strlen(dot) != 2) @@ -264,9 +264,6 @@ } } - /* Let mktime() decide whether summer time is in effect. */ - lt->tm_isdst = -1; - /* convert broken-down time to GMT clock time */ if ((tval = mktime(lt)) == -1) errx(1, "nonexistent time"); ==== //depot/projects/dtrace/src/etc/namedb/named.root#5 (text+ko) ==== @@ -1,5 +1,5 @@ ; -; $FreeBSD: src/etc/namedb/named.root,v 1.13 2007/11/02 22:37:15 dougb Exp $ +; $FreeBSD: src/etc/namedb/named.root,v 1.14 2008/02/07 06:28:02 dougb Exp $ ; ; This file holds the information on root name servers needed to @@ -13,14 +13,14 @@ ; on server FTP.INTERNIC.NET ; -OR- RS.INTERNIC.NET ; -; last update: Nov 01, 2007 -; related version of root zone: 2007110100 -; +; last update: Feb 04, 2008 +; related version of root zone: 2008020400 ; ; formerly NS.INTERNIC.NET ; . 3600000 IN NS A.ROOT-SERVERS.NET. A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 +A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30 ; ; formerly NS1.ISI.EDU ; @@ -46,6 +46,7 @@ ; . 3600000 NS F.ROOT-SERVERS.NET. F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 +F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f ; ; formerly NS.NIC.DDN.MIL ; @@ -56,6 +57,7 @@ ; . 3600000 NS H.ROOT-SERVERS.NET. H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 +H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803f:235 ; ; formerly NIC.NORDU.NET ; @@ -66,11 +68,13 @@ ; . 3600000 NS J.ROOT-SERVERS.NET. J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30 +J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30 ; ; operated by RIPE NCC ; . 3600000 NS K.ROOT-SERVERS.NET. K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129 +K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1 ; ; operated by ICANN ; @@ -81,4 +85,5 @@ ; . 3600000 NS M.ROOT-SERVERS.NET. M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33 +M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35 ; End of File ==== //depot/projects/dtrace/src/lib/libc/stdlib/malloc.c#18 (text+ko) ==== @@ -134,7 +134,7 @@ #define MALLOC_DSS #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.162 2008/02/06 02:59:54 jasone Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.164 2008/02/08 08:02:34 jasone Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -315,7 +315,8 @@ * trials (each deallocation is a trial), so the actual average threshold * for clearing the cache is somewhat lower. */ -# define LAZY_FREE_NPROBES 5 +# define LAZY_FREE_NPROBES_2POW_MIN 2 +# define LAZY_FREE_NPROBES_2POW_MAX 3 #endif /* @@ -929,30 +930,24 @@ static void *arena_palloc(arena_t *arena, size_t alignment, size_t size, size_t alloc_size); static size_t arena_salloc(const void *ptr); +#ifdef MALLOC_LAZY_FREE +static void arena_dalloc_lazy_hard(arena_t *arena, arena_chunk_t *chunk, + void *ptr, size_t pageind, arena_chunk_map_t *mapelm, unsigned slot); +#endif +static void arena_dalloc_large(arena_t *arena, arena_chunk_t *chunk, + void *ptr); static void arena_ralloc_resize_shrink(arena_t *arena, arena_chunk_t *chunk, void *ptr, size_t size, size_t oldsize); static bool arena_ralloc_resize_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr, size_t size, size_t oldsize); static bool arena_ralloc_resize(void *ptr, size_t size, size_t oldsize); static void *arena_ralloc(void *ptr, size_t size, size_t oldsize); -#ifdef MALLOC_LAZY_FREE -static void arena_dalloc_lazy_hard(arena_t *arena, arena_chunk_t *chunk, - void *ptr, size_t pageind, arena_chunk_map_t *mapelm); -#endif -static void arena_dalloc_large(arena_t *arena, arena_chunk_t *chunk, - void *ptr); static bool arena_new(arena_t *arena); static arena_t *arenas_extend(unsigned ind); static void *huge_malloc(size_t size, bool zero); static void *huge_palloc(size_t alignment, size_t size); static void *huge_ralloc(void *ptr, size_t size, size_t oldsize); static void huge_dalloc(void *ptr); -static void *imalloc(size_t size); -static void *ipalloc(size_t alignment, size_t size); -static void *icalloc(size_t size); -static size_t isalloc(const void *ptr); -static void *iralloc(void *ptr, size_t size); -static void idalloc(void *ptr); static void malloc_print_stats(void); static bool malloc_init_hard(void); @@ -2312,6 +2307,7 @@ == 0) { memset((void *)((uintptr_t)chunk + ((run_ind + i) << pagesize_2pow)), 0, pagesize); + /* CHUNK_MAP_UNTOUCHED is cleared below. */ } } @@ -2379,6 +2375,8 @@ * Initialize the map to contain one maximal free untouched * run. */ + memset(chunk->map, (CHUNK_MAP_LARGE | CHUNK_MAP_POS_MASK), + arena_chunk_header_npages); memset(&chunk->map[arena_chunk_header_npages], CHUNK_MAP_UNTOUCHED, (chunk_npages - arena_chunk_header_npages)); @@ -2498,7 +2496,8 @@ if (chunk->map[i] & CHUNK_MAP_DIRTY) { size_t npages; - chunk->map[i] = 0; + chunk->map[i] = (CHUNK_MAP_LARGE | + CHUNK_MAP_POS_MASK); chunk->ndirty--; arena->ndirty--; /* Find adjacent dirty run(s). */ @@ -2507,7 +2506,8 @@ (chunk->map[i - 1] & CHUNK_MAP_DIRTY); npages++) { i--; - chunk->map[i] = 0; + chunk->map[i] = (CHUNK_MAP_LARGE + | CHUNK_MAP_POS_MASK); chunk->ndirty--; arena->ndirty--; } @@ -2556,7 +2556,9 @@ size_t i; for (i = 0; i < run_pages; i++) { - chunk->map[run_ind + i] = CHUNK_MAP_DIRTY; + assert((chunk->map[run_ind + i] & CHUNK_MAP_DIRTY) == + 0); + chunk->map[run_ind + i] |= CHUNK_MAP_DIRTY; chunk->ndirty++; arena->ndirty++; } @@ -3005,6 +3007,28 @@ return (arena_malloc_large(arena, size, zero)); } +static inline void * +imalloc(size_t size) +{ + + assert(size != 0); + + if (size <= arena_maxclass) + return (arena_malloc(choose_arena(), size, false)); + else + return (huge_malloc(size, false)); +} + +static inline void * +icalloc(size_t size) +{ + + if (size <= arena_maxclass) + return (arena_malloc(choose_arena(), size, true)); + else + return (huge_malloc(size, true)); +} + /* Only handles large allocations that require more than page alignment. */ static void * arena_palloc(arena_t *arena, size_t alignment, size_t size, size_t alloc_size) @@ -3084,6 +3108,101 @@ return (ret); } +static inline void * +ipalloc(size_t alignment, size_t size) +{ + void *ret; + size_t ceil_size; + + /* + * Round size up to the nearest multiple of alignment. + * + * This done, we can take advantage of the fact that for each small + * size class, every object is aligned at the smallest power of two + * that is non-zero in the base two representation of the size. For + * example: + * + * Size | Base 2 | Minimum alignment + * -----+----------+------------------ + * 96 | 1100000 | 32 + * 144 | 10100000 | 32 + * 192 | 11000000 | 64 + * + * Depending on runtime settings, it is possible that arena_malloc() + * will further round up to a power of two, but that never causes + * correctness issues. + */ + ceil_size = (size + (alignment - 1)) & (-alignment); + /* + * (ceil_size < size) protects against the combination of maximal + * alignment and size greater than maximal alignment. + */ + if (ceil_size < size) { + /* size_t overflow. */ + return (NULL); + } + + if (ceil_size <= pagesize || (alignment <= pagesize + && ceil_size <= arena_maxclass)) + ret = arena_malloc(choose_arena(), ceil_size, false); + else { + size_t run_size; + + /* + * We can't achieve sub-page alignment, so round up alignment + * permanently; it makes later calculations simpler. + */ + alignment = PAGE_CEILING(alignment); + ceil_size = PAGE_CEILING(size); + /* + * (ceil_size < size) protects against very large sizes within + * pagesize of SIZE_T_MAX. + * + * (ceil_size + alignment < ceil_size) protects against the + * combination of maximal alignment and ceil_size large enough + * to cause overflow. This is similar to the first overflow + * check above, but it needs to be repeated due to the new + * ceil_size value, which may now be *equal* to maximal + * alignment, whereas before we only detected overflow if the + * original size was *greater* than maximal alignment. + */ + if (ceil_size < size || ceil_size + alignment < ceil_size) { + /* size_t overflow. */ + return (NULL); + } + + /* + * Calculate the size of the over-size run that arena_palloc() + * would need to allocate in order to guarantee the alignment. + */ + if (ceil_size >= alignment) + run_size = ceil_size + alignment - pagesize; + else { + /* + * It is possible that (alignment << 1) will cause + * overflow, but it doesn't matter because we also + * subtract pagesize, which in the case of overflow + * leaves us with a very large run_size. That causes + * the first conditional below to fail, which means + * that the bogus run_size value never gets used for + * anything important. + */ + run_size = (alignment << 1) - pagesize; + } + + if (run_size <= arena_maxclass) { + ret = arena_palloc(choose_arena(), alignment, ceil_size, + run_size); + } else if (alignment <= chunksize) + ret = huge_malloc(ceil_size, false); + else + ret = huge_palloc(alignment, ceil_size); + } + + assert(((uintptr_t)ret & (alignment - 1)) == 0); + return (ret); +} + /* Return the size of the allocation pointed to by ptr. */ static size_t arena_salloc(const void *ptr) @@ -3099,12 +3218,11 @@ chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); pageind = (((uintptr_t)ptr - (uintptr_t)chunk) >> pagesize_2pow); mapelm = chunk->map[pageind]; - if (mapelm != CHUNK_MAP_LARGE) { + if ((mapelm & CHUNK_MAP_LARGE) == 0) { arena_run_t *run; /* Small allocation size is in the run header. */ - assert(mapelm <= CHUNK_MAP_POS_MASK); - pageind -= mapelm; + pageind -= (mapelm & CHUNK_MAP_POS_MASK); run = (arena_run_t *)((uintptr_t)chunk + (pageind << pagesize_2pow)); assert(run->magic == ARENA_RUN_MAGIC); @@ -3127,166 +3245,38 @@ return (ret); } -static void -arena_ralloc_resize_shrink(arena_t *arena, arena_chunk_t *chunk, void *ptr, - size_t size, size_t oldsize) +static inline size_t +isalloc(const void *ptr) { - extent_node_t *node, key; + size_t ret; + arena_chunk_t *chunk; - assert(size < oldsize); - - /* - * Shrink the run, and make trailing pages available for other - * allocations. - */ - key.addr = (void *)((uintptr_t)ptr); -#ifdef MALLOC_BALANCE - arena_lock_balance(arena); -#else - malloc_spin_lock(&arena->lock); -#endif - node = RB_FIND(extent_tree_ad_s, &arena->runs_alloced_ad, &key); - assert(node != NULL); - arena_run_trim_tail(arena, chunk, node, (arena_run_t *)ptr, oldsize, - size, true); -#ifdef MALLOC_STATS - arena->stats.allocated_large -= oldsize - size; -#endif - malloc_spin_unlock(&arena->lock); -} - -static bool -arena_ralloc_resize_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr, - size_t size, size_t oldsize) -{ - extent_node_t *nodeC, key; - - /* Try to extend the run. */ - assert(size > oldsize); - key.addr = (void *)((uintptr_t)ptr + oldsize); -#ifdef MALLOC_BALANCE - arena_lock_balance(arena); -#else - malloc_spin_lock(&arena->lock); -#endif - nodeC = RB_FIND(extent_tree_ad_s, &arena->runs_avail_ad, &key); - if (nodeC != NULL && oldsize + nodeC->size >= size) { - extent_node_t *nodeA, *nodeB; - - /* - * The next run is available and sufficiently large. Split the - * following run, then merge the first part with the existing - * allocation. This results in a bit more tree manipulation - * than absolutely necessary, but it substantially simplifies - * the code. - */ - arena_run_split(arena, (arena_run_t *)nodeC->addr, size - - oldsize, false, false); - - key.addr = ptr; - nodeA = RB_FIND(extent_tree_ad_s, &arena->runs_alloced_ad, - &key); - assert(nodeA != NULL); - - key.addr = (void *)((uintptr_t)ptr + oldsize); - nodeB = RB_FIND(extent_tree_ad_s, &arena->runs_alloced_ad, - &key); - assert(nodeB != NULL); - - nodeA->size += nodeB->size; - - RB_REMOVE(extent_tree_ad_s, &arena->runs_alloced_ad, nodeB); - arena_chunk_node_dealloc(chunk, nodeB); - -#ifdef MALLOC_STATS - arena->stats.allocated_large += size - oldsize; -#endif - malloc_spin_unlock(&arena->lock); - return (false); - } - malloc_spin_unlock(&arena->lock); - - return (true); -} + assert(ptr != NULL); -/* - * Try to resize a large allocation, in order to avoid copying. This will - * always fail if growing an object, and the following run is already in use. - */ -static bool -arena_ralloc_resize(void *ptr, size_t size, size_t oldsize) -{ - arena_chunk_t *chunk; - arena_t *arena; - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - arena = chunk->arena; - assert(arena->magic == ARENA_MAGIC); + if (chunk != ptr) { + /* Region. */ + assert(chunk->arena->magic == ARENA_MAGIC); - if (size < oldsize) { - arena_ralloc_resize_shrink(arena, chunk, ptr, size, oldsize); - return (false); + ret = arena_salloc(ptr); } else { - return (arena_ralloc_resize_grow(arena, chunk, ptr, size, - oldsize)); - } -} + extent_node_t *node, key; -static void * -arena_ralloc(void *ptr, size_t size, size_t oldsize) -{ - void *ret; + /* Chunk (huge allocation). */ - /* Try to avoid moving the allocation. */ - if (size < small_min) { - if (oldsize < small_min && - ffs((int)(pow2_ceil(size) >> (TINY_MIN_2POW + 1))) - == ffs((int)(pow2_ceil(oldsize) >> (TINY_MIN_2POW + 1)))) - goto IN_PLACE; /* Same size class. */ - } else if (size <= small_max) { - if (oldsize >= small_min && oldsize <= small_max && - (QUANTUM_CEILING(size) >> opt_quantum_2pow) - == (QUANTUM_CEILING(oldsize) >> opt_quantum_2pow)) - goto IN_PLACE; /* Same size class. */ - } else if (size <= bin_maxclass) { - if (oldsize > small_max && oldsize <= bin_maxclass && - pow2_ceil(size) == pow2_ceil(oldsize)) - goto IN_PLACE; /* Same size class. */ - } else if (oldsize > bin_maxclass && oldsize <= arena_maxclass) { - size_t psize; + malloc_mutex_lock(&huge_mtx); - assert(size > bin_maxclass); - psize = PAGE_CEILING(size); + /* Extract from tree of huge allocations. */ + key.addr = __DECONST(void *, ptr); + node = RB_FIND(extent_tree_ad_s, &huge, &key); + assert(node != NULL); - if (psize == oldsize) - goto IN_PLACE; /* Same size class. */ + ret = node->size; - if (arena_ralloc_resize(ptr, psize, oldsize) == false) - goto IN_PLACE; + malloc_mutex_unlock(&huge_mtx); } - /* - * If we get here, then size and oldsize are different enough that we - * need to move the object. In that case, fall back to allocating new - * space and copying. - */ - ret = arena_malloc(choose_arena(), size, false); - if (ret == NULL) - return (NULL); - - /* Junk/zero-filling were already done by arena_malloc(). */ - if (size < oldsize) - memcpy(ret, ptr, size); - else - memcpy(ret, ptr, oldsize); - idalloc(ptr); return (ret); -IN_PLACE: - if (opt_junk && size < oldsize) - memset((void *)((uintptr_t)ptr + size), 0x5a, oldsize - size); - else if (opt_zero && size > oldsize) - memset((void *)((uintptr_t)ptr + oldsize), 0, size - oldsize); - return (ptr); } static inline void @@ -3297,8 +3287,7 @@ arena_bin_t *bin; size_t size; - assert(mapelm <= CHUNK_MAP_POS_MASK); - pageind -= mapelm; + pageind -= (mapelm & CHUNK_MAP_POS_MASK); run = (arena_run_t *)((uintptr_t)chunk + (pageind << pagesize_2pow)); assert(run->magic == ARENA_RUN_MAGIC); @@ -3360,7 +3349,7 @@ size_t pageind, arena_chunk_map_t *mapelm) { void **free_cache = arena->free_cache; - unsigned i, slot; + unsigned i, nprobes, slot; if (__isthreaded == false || opt_lazy_free_2pow < 0) { malloc_spin_lock(&arena->lock); @@ -3369,7 +3358,9 @@ return; } - for (i = 0; i < LAZY_FREE_NPROBES; i++) { + nprobes = (1U << LAZY_FREE_NPROBES_2POW_MIN) + PRN(lazy_free, + (LAZY_FREE_NPROBES_2POW_MAX - LAZY_FREE_NPROBES_2POW_MIN)); + for (i = 0; i < nprobes; i++) { slot = PRN(lazy_free, opt_lazy_free_2pow); if (atomic_cmpset_ptr((uintptr_t *)&free_cache[slot], (uintptr_t)NULL, (uintptr_t)ptr)) { @@ -3377,15 +3368,15 @@ } } - arena_dalloc_lazy_hard(arena, chunk, ptr, pageind, mapelm); + arena_dalloc_lazy_hard(arena, chunk, ptr, pageind, mapelm, slot); } static void arena_dalloc_lazy_hard(arena_t *arena, arena_chunk_t *chunk, void *ptr, - size_t pageind, arena_chunk_map_t *mapelm) + size_t pageind, arena_chunk_map_t *mapelm, unsigned slot) { void **free_cache = arena->free_cache; - unsigned i, slot; + unsigned i; malloc_spin_lock(&arena->lock); arena_dalloc_small(arena, chunk, ptr, pageind, *mapelm); @@ -3486,9 +3477,8 @@ pageind = (((uintptr_t)ptr - (uintptr_t)chunk) >> pagesize_2pow); mapelm = &chunk->map[pageind]; - if (*mapelm != CHUNK_MAP_LARGE) { + if ((*mapelm & CHUNK_MAP_LARGE) == 0) { /* Small allocation. */ - assert(*mapelm <= CHUNK_MAP_POS_MASK); #ifdef MALLOC_LAZY_FREE arena_dalloc_lazy(arena, chunk, ptr, pageind, mapelm); #else @@ -3502,6 +3492,197 @@ } } +static inline void +idalloc(void *ptr) +{ + arena_chunk_t *chunk; + + assert(ptr != NULL); + + chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); + if (chunk != ptr) + arena_dalloc(chunk->arena, chunk, ptr); + else + huge_dalloc(ptr); +} + +static void +arena_ralloc_resize_shrink(arena_t *arena, arena_chunk_t *chunk, void *ptr, + size_t size, size_t oldsize) +{ + extent_node_t *node, key; + + assert(size < oldsize); + + /* + * Shrink the run, and make trailing pages available for other + * allocations. + */ + key.addr = (void *)((uintptr_t)ptr); +#ifdef MALLOC_BALANCE + arena_lock_balance(arena); +#else + malloc_spin_lock(&arena->lock); +#endif + node = RB_FIND(extent_tree_ad_s, &arena->runs_alloced_ad, &key); + assert(node != NULL); + arena_run_trim_tail(arena, chunk, node, (arena_run_t *)ptr, oldsize, + size, true); +#ifdef MALLOC_STATS + arena->stats.allocated_large -= oldsize - size; +#endif + malloc_spin_unlock(&arena->lock); +} + +static bool +arena_ralloc_resize_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr, + size_t size, size_t oldsize) +{ + extent_node_t *nodeC, key; + + /* Try to extend the run. */ + assert(size > oldsize); + key.addr = (void *)((uintptr_t)ptr + oldsize); +#ifdef MALLOC_BALANCE + arena_lock_balance(arena); +#else + malloc_spin_lock(&arena->lock); +#endif + nodeC = RB_FIND(extent_tree_ad_s, &arena->runs_avail_ad, &key); + if (nodeC != NULL && oldsize + nodeC->size >= size) { + extent_node_t *nodeA, *nodeB; + + /* + * The next run is available and sufficiently large. Split the + * following run, then merge the first part with the existing + * allocation. This results in a bit more tree manipulation + * than absolutely necessary, but it substantially simplifies + * the code. + */ + arena_run_split(arena, (arena_run_t *)nodeC->addr, size - + oldsize, false, false); + + key.addr = ptr; + nodeA = RB_FIND(extent_tree_ad_s, &arena->runs_alloced_ad, + &key); + assert(nodeA != NULL); + + key.addr = (void *)((uintptr_t)ptr + oldsize); + nodeB = RB_FIND(extent_tree_ad_s, &arena->runs_alloced_ad, + &key); + assert(nodeB != NULL); + + nodeA->size += nodeB->size; + + RB_REMOVE(extent_tree_ad_s, &arena->runs_alloced_ad, nodeB); + arena_chunk_node_dealloc(chunk, nodeB); + +#ifdef MALLOC_STATS + arena->stats.allocated_large += size - oldsize; +#endif + malloc_spin_unlock(&arena->lock); + return (false); + } + malloc_spin_unlock(&arena->lock); + + return (true); +} + +/* + * Try to resize a large allocation, in order to avoid copying. This will + * always fail if growing an object, and the following run is already in use. >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Feb 9 04:44:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0650316A468; Sat, 9 Feb 2008 04:44:40 +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 A6DD516A418 for ; Sat, 9 Feb 2008 04:44:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9B9FE13C4E9 for ; Sat, 9 Feb 2008 04:44:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m194icRZ052571 for ; Sat, 9 Feb 2008 04:44:38 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m194icwU052568 for perforce@freebsd.org; Sat, 9 Feb 2008 04:44:38 GMT (envelope-from sam@freebsd.org) Date: Sat, 9 Feb 2008 04:44:38 GMT Message-Id: <200802090444.m194icwU052568@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135086 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 04:44:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=135086 Change 135086 by sam@sam_ebb on 2008/02/09 04:44:03 make addba parameters tunable through net.wlan knobs Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#18 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#11 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#18 (text+ko) ==== @@ -94,23 +94,37 @@ } IFC_SIMPLE_DECLARE(wlan, 0); -#ifdef IEEE80211_AMPDU_AGE static int -ieee80211_sysctl_ampdu_age(SYSCTL_HANDLER_ARGS) +ieee80211_sysctl_msecs_ticks(SYSCTL_HANDLER_ARGS) { - extern int ieee80211_ampdu_age; - int ampdu_age = ticks_to_msecs(ieee80211_ampdu_age); - int error; + int msecs = ticks_to_msecs(*(int *)arg1); + int error, t; - error = sysctl_handle_int(oidp, &du_age, 0, req); + error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; - ieee80211_ampdu_age = msecs_to_ticks(ampdu_age); + t = msecs_to_ticks(msecs); + *(int *)arg1 = (t < 1) ? 1 : t; return 0; } -SYSCTL_PROC(_net_wlan, OID_AUTO, "ampdu_age", CTLFLAG_RW, NULL, 0, - ieee80211_sysctl_ampdu_age, "A", "AMPDU max reorder age (ms)"); + +#ifdef IEEE80211_AMPDU_AGE +extern int ieee80211_ampdu_age; +SYSCTL_PROC(_net_wlan, OID_AUTO, ampdu_age, CTLFLAG_RW, + &ieee80211_ampdu_age, 0, ieee80211_sysctl_msecs_ticks, "I", + "AMPDU max reorder age (ms)"); #endif +extern int ieee80211_addba_timeout; +SYSCTL_PROC(_net_wlan, OID_AUTO, addba_timeout, CTLFLAG_RW, + &ieee80211_addba_timeout, 0, ieee80211_sysctl_msecs_ticks, "I", + "ADDBA request timeout (ms)"); +extern int ieee80211_addba_backoff; +SYSCTL_PROC(_net_wlan, OID_AUTO, addba_backoff, CTLFLAG_RW, + &ieee80211_addba_backoff, 0, ieee80211_sysctl_msecs_ticks, "I", + "ADDBA request backoff (ms)"); +extern int ieee80211_addba_maxtries; +SYSCTL_INT(_net_wlan, OID_AUTO, addba_maxtries, CTLFLAG_RW, + &ieee80211_addba_maxtries, 0, "max ADDBA requests sent before backoff"); static int ieee80211_sysctl_inact(SYSCTL_HANDLER_ARGS) ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#11 (text+ko) ==== @@ -87,10 +87,23 @@ int ieee80211_ampdu_age = -1; /* threshold for ampdu reorder q (ms) */ #endif int ieee80211_recv_bar_ena = 1; +int ieee80211_addba_timeout = -1; +int ieee80211_addba_backoff = -1; +int ieee80211_addba_maxtries = 3; -#define IEEE80211_AGGR_TIMEOUT msecs_to_ticks(250) -#define IEEE80211_AGGR_MINRETRY msecs_to_ticks(10*1000) -#define IEEE80211_AGGR_MAXTRIES 3 +/* + * Setup HT parameters that depends on the clock frequency. + */ +static void +ieee80211_ht_setup(void) +{ +#ifdef IEEE80211_AMPDU_AGE + ieee80211_ampdu_age = msecs_to_ticks(500); +#endif + ieee80211_addba_timeout = msecs_to_ticks(250); + ieee80211_addba_backoff = msecs_to_ticks(10*1000); +} +SYSINIT(wlan_ht, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_ht_setup, NULL); static int ieee80211_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, @@ -106,10 +119,6 @@ void ieee80211_ht_attach(struct ieee80211com *ic) { -#ifdef IEEE80211_AMPDU_AGE - if (ieee80211_ampdu_age == -1) - ieee80211_ampdu_age = msecs_to_ticks(500); -#endif /* setup default aggregation policy */ ic->ic_recv_action = ieee80211_aggr_recv_action; ic->ic_send_action = ieee80211_send_action; @@ -1232,7 +1241,7 @@ addba_start_timeout(struct ieee80211_tx_ampdu *tap) { /* XXX use CALLOUT_PENDING instead? */ - callout_reset(&tap->txa_timer, IEEE80211_AGGR_TIMEOUT, + callout_reset(&tap->txa_timer, ieee80211_addba_timeout, addba_timeout, tap); tap->txa_flags |= IEEE80211_AGGR_XCHGPEND; tap->txa_lastrequest = ticks; @@ -1546,12 +1555,12 @@ callout_init(&tap->txa_timer, CALLOUT_MPSAFE); tap->txa_flags |= IEEE80211_AGGR_SETUP; } - if (tap->txa_attempts >= IEEE80211_AGGR_MAXTRIES && - (ticks - tap->txa_lastrequest) < IEEE80211_AGGR_MINRETRY) { + if (tap->txa_attempts >= ieee80211_addba_maxtries && + (ticks - tap->txa_lastrequest) < ieee80211_addba_backoff) { /* - * Don't retry too often; IEEE80211_AGGR_MINRETRY + * Don't retry too often; ieee80211_addba_backoff * defines the minimum interval we'll retry after - * IEEE80211_AGGR_MAXTRIES failed attempts to + * ieee80211_addba_maxtries failed attempts to * negotiate use. */ return 0; @@ -1583,7 +1592,7 @@ ni, "%s: could not setup BA stream for AC %d", __func__, tap->txa_ac); /* defer next try so we don't slam the driver with requests */ - tap->txa_attempts = IEEE80211_AGGR_MAXTRIES; + tap->txa_attempts = ieee80211_addba_maxtries; tap->txa_lastrequest = ticks; return 0; } From owner-p4-projects@FreeBSD.ORG Sat Feb 9 05:18:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5FB7816A41B; Sat, 9 Feb 2008 05:18:13 +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 2509016A418 for ; Sat, 9 Feb 2008 05:18:13 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1A4F613C442 for ; Sat, 9 Feb 2008 05:18:13 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m195ICvg064864 for ; Sat, 9 Feb 2008 05:18:12 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m195IC84064861 for perforce@freebsd.org; Sat, 9 Feb 2008 05:18:12 GMT (envelope-from sam@freebsd.org) Date: Sat, 9 Feb 2008 05:18:12 GMT Message-Id: <200802090518.m195IC84064861@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135088 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 05:18:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=135088 Change 135088 by sam@sam_ebb on 2008/02/09 05:18:07 forgot to add knobs for cac and nol timeouts Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#19 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#19 (text+ko) ==== @@ -60,6 +60,12 @@ extern int ieee80211_recv_bar_ena; SYSCTL_INT(_net_wlan, OID_AUTO, recv_bar, CTLFLAG_RW, &ieee80211_recv_bar_ena, 0, "BAR frame processing (ena/dis)"); +extern int ieee80211_nol_timeout; +SYSCTL_INT(_net_wlan, OID_AUTO, nol_timeout, CTLFLAG_RW, + &ieee80211_nol_timeout, 0, "NOL timeout (secs)"); +extern int ieee80211_cac_timeout; +SYSCTL_INT(_net_wlan, OID_AUTO, cac_timeout, CTLFLAG_RW, + &ieee80211_cac_timeout, 0, "CAC timeout (secs)"); static int wlan_clone_create(struct if_clone *ifc, int unit, caddr_t params) From owner-p4-projects@FreeBSD.ORG Sat Feb 9 06:20:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 63F0E16A469; Sat, 9 Feb 2008 06:20:22 +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 284B116A421 for ; Sat, 9 Feb 2008 06:20:22 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1D27113C469 for ; Sat, 9 Feb 2008 06:20:22 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m196KLMF069488 for ; Sat, 9 Feb 2008 06:20:21 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m196KLAe069484 for perforce@freebsd.org; Sat, 9 Feb 2008 06:20:21 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 9 Feb 2008 06:20:21 GMT Message-Id: <200802090620.m196KLAe069484@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135092 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 06:20:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=135092 Change 135092 by kmacy@kmacy:storage:toehead on 2008/02/09 06:19:42 - add logging function for tcb - ensure tp->rcv_nxt is always protected by the inpcb lock - ensure that ddp state is always protected by the so_rcv lock - replace most console logging with ktr entries - move user_ddp_pending in to ddp_state to avoid queueing an empty mbuf - ensure that listening context's ULP mode is set Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#7 edit .. //depot/projects/toehead/sys/dev/cxgb/cxgb_osdep.h#4 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#17 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#18 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#8 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_defs.h#7 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_listen.c#2 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_t3_ddp.h#10 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#8 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#7 (text+ko) ==== @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -281,6 +282,32 @@ static int set_eeprom(struct port_info *pi, const uint8_t *data, int len, int offset); + +void +cxgb_log_tcb(struct adapter *sc, unsigned int tid) +{ + char buf[TCB_SIZE]; + uint64_t *tcb = (uint64_t *)buf; + int i, error; + struct mc7 *mem = &sc->cm; + + error = t3_mc7_bd_read(mem, tid*TCB_SIZE/8, TCB_SIZE/8, tcb); + if (error) + printf("cxgb_tcb_log failed\n"); + + CTR1(KTR_CXGB, "TCB tid=%u", tid); + for (i = 0; i < TCB_SIZE / 32; i++) { + CTR5(KTR_CXGB, "%1d: %08x %08x %08x %08x", + i, (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32), + (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32)); + tcb += 2; + CTR4(KTR_CXGB, " %08x %08x %08x %08x", + (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32), + (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32)); + tcb += 2; + } +} + static __inline char t3rev2char(struct adapter *adapter) { ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_osdep.h#4 (text+ko) ==== @@ -83,6 +83,9 @@ #define m_set_socket(m, a) ((m)->m_pkthdr.header = (a)) #define m_get_socket(m) ((m)->m_pkthdr.header) +#define KTR_CXGB KTR_SPARE2 +void cxgb_log_tcb(struct adapter *sc, unsigned int tid); + #define MT_DONTFREE 128 #if __FreeBSD_version > 700030 ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#17 (text+ko) ==== @@ -66,7 +66,6 @@ #include #include - #include #include #include @@ -775,7 +774,7 @@ { struct cpl_set_tcb_field *req; - CTR4(KTR_TOM, "__set_tcb_field_ulp(tid=%u word=0x%x mask=%jx val=%jx", + CTR4(KTR_TCB, "__set_tcb_field_ulp(tid=%u word=0x%x mask=%jx val=%jx", toep->tp_tid, word, mask, val); req = mtod(m, struct cpl_set_tcb_field *); @@ -1052,8 +1051,6 @@ l2t_release(L2DATA(cdev), toep->tp_l2t); toep->tp_l2t = NULL; } - printf("setting toep->tp_tp to NULL\n"); - toep->tp_tp = NULL; if (tp) { INP_LOCK_ASSERT(tp->t_inpcb); @@ -1264,7 +1261,6 @@ req->peer_port = inp->inp_fport; memcpy(&req->local_ip, &inp->inp_laddr, 4); memcpy(&req->peer_ip, &inp->inp_faddr, 4); - DPRINTF("connect smt_idx=%d\n", e->smt_idx); req->opt0h = htonl(calc_opt0h(so, toep->tp_mtu_idx) | V_L2T_IDX(e->idx) | V_TX_CHANNEL(e->smt_idx)); req->opt0l = htonl(calc_opt0l(so, toep->tp_ulp_mode)); @@ -1449,8 +1445,6 @@ toep = tp->t_toe; m_set_toep(m, tp->t_toe); - printf("sending off request\n"); - toep->tp_state = TCPS_SYN_SENT; l2t_send(d->cdev, (struct mbuf *)m, e); @@ -1670,6 +1664,8 @@ so = toeptoso(toep); tp = toep->tp_tp; + + INP_LOCK_ASSERT(tp->t_inpcb); SOCKBUF_LOCK(&so->so_rcv); /* Note that we only accout for CPL_GET_TCB issued by the DDP code. We @@ -1704,14 +1700,21 @@ ddp_offset = t >> S_TCB_RX_DDP_BUF1_OFFSET; } ddp_offset &= M_TCB_RX_DDP_BUF0_OFFSET; + m->m_cur_offset = bsp->cur_offset; + bsp->cur_offset = ddp_offset; + m->m_len = m->m_pkthdr.len = ddp_offset - m->m_cur_offset; + CTR5(KTR_TOM, + "tcb_rpl_as_ddp_complete: idx=%d seq=0x%x hwbuf=%u ddp_offset=%u cur_offset=%u", + q->cur_buf, tp->rcv_nxt, q->cur_buf, ddp_offset, m->m_cur_offset); + KASSERT(ddp_offset >= m->m_cur_offset, ("ddp_offset=%u less than cur_offset=%u", + ddp_offset, m->m_cur_offset)); + #ifdef T3_TRACE T3_TRACE3(TIDTB(so), "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u ddp_offset %u", tp->rcv_nxt, q->cur_buf, ddp_offset); #endif - CTR3(KTR_TOM, "tcb_rpl_as_ddp_complete(seq=0x%x hwbuf=%u ddp_offset=%u", - tp->rcv_nxt, q->cur_buf, ddp_offset); #if 0 { @@ -1743,10 +1746,6 @@ } #endif - m->m_cur_offset = bsp->cur_offset; - bsp->cur_offset = ddp_offset; - m->m_len = m->m_pkthdr.len = ddp_offset - m->m_cur_offset; - if (__predict_false(so_no_receive(so) && m->m_pkthdr.len)) { handle_excess_rx(toep, m); return; @@ -1802,16 +1801,11 @@ return; } - KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); m->m_ddp_gl = (unsigned char *)bsp->gl; m->m_flags |= M_DDP; m->m_seq = tp->rcv_nxt; tp->rcv_nxt += m->m_pkthdr.len; tp->t_rcvtime = ticks; - -#if 0 - skb->h.th = tcphdr_skb->h.th; -#endif #ifdef T3_TRACE T3_TRACE3(TB(q), "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u lskb->len %u", @@ -1819,7 +1813,10 @@ #endif CTR3(KTR_TOM, "tcb_rpl_as_ddp_complete: seq 0x%x hwbuf %u m->m_pktlen %u", m->m_seq, q->cur_buf, m->m_pkthdr.len); - SBAPPEND(&so->so_rcv, m); + if (m->m_pkthdr.len == 0) + q->user_ddp_pending = 0; + else + SBAPPEND(&so->so_rcv, m); if (__predict_true((so->so_state & SS_NOFDREF) == 0)) sorwakeup_locked(so); else @@ -1840,8 +1837,11 @@ printf("null toep in do_get_tcb_rpl\n"); return (CPL_RET_BUF_DONE); } + + INP_LOCK(toep->tp_tp->t_inpcb); tcb_rpl_as_ddp_complete(toep, m); - + INP_UNLOCK(toep->tp_tp->t_inpcb); + return (0); } @@ -1858,13 +1858,15 @@ if (tp->rcv_nxt == rcv_nxt) return; - TRACE_ENTER; + INP_LOCK_ASSERT(tp->t_inpcb); SOCKBUF_LOCK(&so->so_rcv); q = &toep->tp_ddp_state; bsp = &q->buf_state[q->cur_buf]; + KASSERT(SEQ_GT(rcv_nxt, tp->rcv_nxt), ("tp->rcv_nxt=0x%08x decreased rcv_nxt=0x08%x", + rcv_nxt, tp->rcv_nxt)); m->m_len = m->m_pkthdr.len = rcv_nxt - tp->rcv_nxt; KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); - printf("rcv_nxt=0x%x tp->rcv_next=0x%x len=%d\n", + CTR3(KTR_TOM, "rcv_nxt=0x%x tp->rcv_nxt=0x%x len=%d\n", rcv_nxt, tp->rcv_nxt, m->m_pkthdr.len); #ifdef T3_TRACE @@ -1880,8 +1882,6 @@ if (bsp->flags & DDP_BF_NOCOPY) bsp->flags &= ~DDP_BF_NOCOPY; - printf("ddp flags=0x%x\n", m->m_ddp_flags); - m->m_seq = tp->rcv_nxt; tp->rcv_nxt = rcv_nxt; bsp->cur_offset += m->m_pkthdr.len; @@ -1893,7 +1893,6 @@ */ q->ubuf_ddp_ready = 0; SOCKBUF_UNLOCK(&so->so_rcv); - TRACE_EXIT; } /* @@ -2017,17 +2016,17 @@ unsigned int ddp_len, rcv_nxt, ddp_report, end_offset, buf_idx; struct socket *so = toeptoso(toep); int nomoredata = 0; + + tp = sototcpcb(so); + INP_LOCK(tp->t_inpcb); if (__predict_false(so_no_receive(so))) { - struct inpcb *inp = sotoinpcb(so); - INP_LOCK(inp); handle_excess_rx(toep, m); - INP_UNLOCK(inp); + INP_UNLOCK(tp->t_inpcb); return; } - tp = sototcpcb(so); q = &toep->tp_ddp_state; hdr = cplhdr(m); ddp_report = ntohl(hdr->u.ddp_report); @@ -2044,33 +2043,32 @@ "new_rx_data_ddp: ddp_report 0x%x", ddp_report); #endif - + CTR4(KTR_TOM, + "new_rx_data_ddp: tp->rcv_nxt 0x%x cur_offset %u " + "hdr seq 0x%x len %u", + tp->rcv_nxt, bsp->cur_offset, ntohl(hdr->seq), + ntohs(hdr->len)); + CTR3(KTR_TOM, + "new_rx_data_ddp: offset %u ddp_report 0x%x buf_idx=%d", + G_DDP_OFFSET(ddp_report), ddp_report, buf_idx); + ddp_len = ntohs(hdr->len); rcv_nxt = ntohl(hdr->seq) + ddp_len; - /* - * Overload to store old RCV_NXT - */ m->m_seq = tp->rcv_nxt; tp->rcv_nxt = rcv_nxt; + tp->t_rcvtime = ticks; /* * Store the length in m->m_len. We are changing the meaning of * m->m_len here, we need to be very careful that nothing from now on * interprets ->len of this packet the usual way. */ - m->m_len = m->m_pkthdr.len = tp->rcv_nxt - m->m_seq; - /* - * Length is only meaningful for kbuf - */ - if (!(bsp->flags & DDP_BF_NOCOPY)) - KASSERT(m->m_len <= bsp->gl->dgl_length, - ("length received exceeds ddp pages: len=%d dgl_length=%d", - m->m_len, bsp->gl->dgl_length)); - - KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); - KASSERT(m->m_next == NULL, ("m_len=%p", m->m_next)); - + m->m_len = m->m_pkthdr.len = rcv_nxt - m->m_seq; + INP_UNLOCK(tp->t_inpcb); + CTR3(KTR_TOM, + "new_rx_data_ddp: m_len=%u rcv_next 0x%08x rcv_nxt_prev=0x%08x ", + m->m_len, rcv_nxt, m->m_seq); /* * Figure out where the new data was placed in the buffer and store it * in when. Assumes the buffer offset starts at 0, consumer needs to @@ -2078,11 +2076,26 @@ */ end_offset = G_DDP_OFFSET(ddp_report) + ddp_len; m->m_cur_offset = end_offset - m->m_pkthdr.len; + + SOCKBUF_LOCK(&so->so_rcv); m->m_ddp_gl = (unsigned char *)bsp->gl; m->m_flags |= M_DDP; bsp->cur_offset = end_offset; toep->tp_enqueued_bytes += m->m_pkthdr.len; + /* + * Length is only meaningful for kbuf + */ + if (!(bsp->flags & DDP_BF_NOCOPY)) + KASSERT(m->m_len <= bsp->gl->dgl_length, + ("length received exceeds ddp pages: len=%d dgl_length=%d", + m->m_len, bsp->gl->dgl_length)); + + KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); + KASSERT(m->m_next == NULL, ("m_len=%p", m->m_next)); + + + /* * Bit 0 of flags stores whether the DDP buffer is completed. * Note that other parts of the code depend on this being in bit 0. */ @@ -2104,9 +2117,7 @@ if (nomoredata) m->m_ddp_flags |= DDP_BF_NODATA; - tp->t_rcvtime = ticks; - SOCKBUF_LOCK(&so->so_rcv); SBAPPEND(&so->so_rcv, m); if ((so->so_state & SS_NOFDREF) == 0) @@ -2154,24 +2165,29 @@ unsigned int ddp_report, buf_idx, when; int nomoredata = 0; + INP_LOCK(tp->t_inpcb); if (__predict_false(so_no_receive(so))) { struct inpcb *inp = sotoinpcb(so); - INP_LOCK(inp); handle_excess_rx(toep, m); INP_UNLOCK(inp); return; } - TRACE_ENTER; q = &toep->tp_ddp_state; hdr = cplhdr(m); ddp_report = ntohl(hdr->ddp_report); buf_idx = (ddp_report >> S_DDP_BUF_IDX) & 1; - bsp = &q->buf_state[buf_idx]; + m->m_pkthdr.csum_data = tp->rcv_nxt; + SOCKBUF_LOCK(&so->so_rcv); + bsp = &q->buf_state[buf_idx]; when = bsp->cur_offset; m->m_len = m->m_pkthdr.len = G_DDP_OFFSET(ddp_report) - when; + tp->rcv_nxt += m->m_len; + tp->t_rcvtime = ticks; + INP_UNLOCK(tp->t_inpcb); + KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); #ifdef T3_TRACE T3_TRACE5(TIDTB(sk), @@ -2215,17 +2231,12 @@ if (nomoredata) m->m_ddp_flags |= DDP_BF_NODATA; - m->m_pkthdr.csum_data = tp->rcv_nxt; - tp->rcv_nxt += m->m_len; - - tp->t_rcvtime = ticks; SBAPPEND(&so->so_rcv, m); if ((so->so_state & SS_NOFDREF) == 0) sorwakeup_locked(so); else SOCKBUF_UNLOCK(&so->so_rcv); - TRACE_EXIT; } /* @@ -2302,6 +2313,7 @@ return (1); } + INP_LOCK_ASSERT(tp->t_inpcb); q = &toep->tp_ddp_state; SOCKBUF_LOCK(&so->so_rcv); bsp = &q->buf_state[q->cur_buf]; @@ -3215,8 +3227,6 @@ */ toepcb_hold(newtoep); syncache_add_accept_req(req, so, newtoep); - - rpl = cplhdr(reply_mbuf); reply_mbuf->m_pkthdr.len = reply_mbuf->m_len = sizeof(*rpl); @@ -3241,7 +3251,6 @@ l2t_send(cdev, reply_mbuf, e); m_free(m); if (newtoep->tp_ulp_mode) { - printf("setting ulp mode to DDP\n"); __set_tcb_field(newtoep, ddp_mbuf, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | TP_DDP_TIMER_WORKAROUND_MASK, @@ -3353,8 +3362,6 @@ #if 0 inet_sk(sk)->id = tp->write_seq ^ jiffies; #endif - - /* * XXX not clear what rcv_wup maps to */ @@ -3485,8 +3492,6 @@ toep->tp_wr_max = toep->tp_wr_avail = TOM_TUNABLE(tdev, max_wrs); toep->tp_wr_unacked = 0; toep->tp_qset = G_QNUM(ntohl(m->m_pkthdr.csum_data)); - toep->tp_ulp_mode = TOM_TUNABLE(tdev, ddp) && !(so->so_options & SO_NO_DDP) && - tp->rcv_wnd >= MIN_DDP_RCV_WIN ? ULP_MODE_TCPDDP : 0; toep->tp_qset_idx = 0; toep->tp_mtu_idx = select_mss(td, tp, toep->tp_l2t->neigh->rt_ifp->if_mtu); @@ -3499,6 +3504,8 @@ INP_UNLOCK(tp->t_inpcb); soisconnected(so); + CTR1(KTR_TOM, "do_pass_establish tid=%u", toep->tp_tid); + cxgb_log_tcb(cdev->adapter, toep->tp_tid); #ifdef notyet /* * XXX not sure how these checks map to us @@ -3657,6 +3664,9 @@ socket_act_establish(so, m); INP_UNLOCK(tp->t_inpcb); + CTR1(KTR_TOM, "do_act_establish tid=%u", toep->tp_tid); + cxgb_log_tcb(cdev->adapter, toep->tp_tid); + return (0); } @@ -3932,7 +3942,7 @@ { struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; - CTR4(KTR_TOM, "mk_set_tcb_field_ulp(tid=%u word=0x%x mask=%jx val=%jx", + CTR4(KTR_TCB, "mk_set_tcb_field_ulp(tid=%u word=0x%x mask=%jx val=%jx", tid, word, mask, val); txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); @@ -3987,8 +3997,7 @@ req = (struct cpl_set_tcb_field *)(lock + 1); - CTR1(KTR_TOM, "t3_cancel_ddpbuf(bufidx=%u)", - bufidx); + CTR1(KTR_TCB, "t3_cancel_ddpbuf(bufidx=%u)", bufidx); /* Hmmm, not sure if this actually a good thing: reactivating * the other buffer might be an issue if it has been completed @@ -4048,7 +4057,7 @@ struct cpl_set_tcb_field *req; struct ddp_state *p = &toep->tp_ddp_state; - CTR4(KTR_TOM, "t3_setup_ppods(bufidx=%u tag0=%u tag1=%u len=%u)", + CTR4(KTR_TCB, "t3_setup_ppods(bufidx=%u tag0=%u tag1=%u len=%u)", bufidx, tag0, tag1, len); SOCKBUF_LOCK_ASSERT(&toeptoso(toep)->so_rcv); wrlen = sizeof(*wr) + 3 * sizeof(*req) + sizeof(*getreq); @@ -4123,7 +4132,7 @@ struct work_request_hdr *wr; struct cpl_set_tcb_field *req; - CTR6(KTR_TOM, "t3_setup_ddpbufs(len0=%u offset0=%u len1=%u offset1=%u ddp_flags=0x%08x%08x ", + CTR6(KTR_TCB, "t3_setup_ddpbufs(len0=%u offset0=%u len1=%u offset1=%u ddp_flags=0x%08x%08x ", len0, offset0, len1, offset1, ddp_flags >> 32, ddp_flags & 0xffffffff); SOCKBUF_LOCK_ASSERT(&toeptoso(toep)->so_rcv); ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#18 (text+ko) ==== @@ -575,37 +575,41 @@ uint32_t offset; int err, flags, avail, len, copied, copied_unacked; int target; /* Read at least this many bytes */ - int user_ddp_ok, user_ddp_pending = 0; + int user_ddp_ok; struct ddp_state *p; struct inpcb *inp = sotoinpcb(so); avail = offset = copied = copied_unacked = 0; flags = flagsp ? (*flagsp &~ MSG_EOR) : 0; - err = sblock(&so->so_rcv, SBLOCKWAIT(flags)); + p = &toep->tp_ddp_state; if (err) return (err); SOCKBUF_LOCK(&so->so_rcv); + p->user_ddp_pending = 0; restart: len = uio->uio_resid; m = so->so_rcv.sb_mb; target = (flags & MSG_WAITALL) ? len : so->so_rcv.sb_lowat; - p = &toep->tp_ddp_state; user_ddp_ok = p->ubuf_ddp_ready; p->cancel_ubuf = 0; + if (len == 0) + goto done; +#if 0 while (m && m->m_len == 0) { so->so_rcv.sb_mb = m_free(m); m = so->so_rcv.sb_mb; } +#endif if (m) goto got_mbuf; /* empty receive queue */ if (copied >= target && (so->so_rcv.sb_mb == NULL) && - !user_ddp_pending) + !p->user_ddp_pending) goto done; if (copied) { @@ -629,7 +633,7 @@ goto done; } } - if (so->so_rcv.sb_mb && !user_ddp_pending) { + if (so->so_rcv.sb_mb && !p->user_ddp_pending) { SOCKBUF_UNLOCK(&so->so_rcv); INP_LOCK(inp); t3_cleanup_rbuf(tp, copied_unacked); @@ -638,22 +642,21 @@ copied_unacked = 0; goto restart; } - if (p->kbuf[0] && user_ddp_ok && !user_ddp_pending && + if (p->kbuf[0] && user_ddp_ok && !p->user_ddp_pending && uio->uio_iov->iov_len > p->kbuf[0]->dgl_length && p->ubuf_ddp_ready) { - user_ddp_pending = + p->user_ddp_pending = !t3_overlay_ubuf(so, uio, IS_NONBLOCKING(so), flags, 1, 1); - if (user_ddp_pending) { + if (p->user_ddp_pending) { p->kbuf_posted++; user_ddp_ok = 0; } - printf("user_ddp_pending=%d\n", user_ddp_pending); } if (p->kbuf[0] && (p->kbuf_posted == 0)) { t3_post_kbuf(so, 1); p->kbuf_posted++; } - if (user_ddp_pending) { + if (p->user_ddp_pending) { /* One shot at DDP if we already have enough data */ if (copied >= target) user_ddp_ok = 0; @@ -694,8 +697,8 @@ if (m->m_pkthdr.len == 0) { if ((m->m_ddp_flags & DDP_BF_NOCOPY) == 0) panic("empty mbuf and NOCOPY not set\n"); - printf("dropping empty mbuf\n"); - user_ddp_pending = 0; + CTR0(KTR_TOM, "ddp done notification"); + p->user_ddp_pending = 0; sbdroprecord_locked(&so->so_rcv); goto done; } @@ -712,9 +715,11 @@ avail = m->m_pkthdr.len - offset; if (len < avail) { if (is_ddp(m) && (m->m_ddp_flags & DDP_BF_NOCOPY)) - panic("bad state in t3_soreceive\n"); + panic("bad state in t3_soreceive len=%d avail=%d offset=%d\n", len, avail, offset); avail = len; } + CTR4(KTR_TOM, "t3_soreceive: m_len=%u offset=%u len=%u m_seq=0%08x", m->m_pkthdr.len, offset, len, m->m_seq); + #ifdef URGENT_DATA_SUPPORTED /* * Check if the data we are preparing to copy contains urgent @@ -746,25 +751,26 @@ #endif } - if (user_ddp_ok && !user_ddp_pending && + if (user_ddp_ok && !p->user_ddp_pending && uio->uio_iov->iov_len > p->kbuf[0]->dgl_length && p->ubuf_ddp_ready) { - user_ddp_pending = + p->user_ddp_pending = !t3_overlay_ubuf(so, uio, IS_NONBLOCKING(so), flags, 1, 1); - if (user_ddp_pending) { + if (p->user_ddp_pending) { p->kbuf_posted++; user_ddp_ok = 0; } - DPRINTF("user_ddp_pending=%d\n", user_ddp_pending); + DPRINTF("user_ddp_pending=%d\n", p->user_ddp_pending); } else DPRINTF("user_ddp_ok=%d user_ddp_pending=%d iov_len=%ld dgl_length=%d ubuf_ddp_ready=%d ulp_mode=%d is_ddp(m)=%d flags=0x%x ubuf=%p kbuf_posted=%d\n", - user_ddp_ok, user_ddp_pending, uio->uio_iov->iov_len, p->kbuf[0] ? p->kbuf[0]->dgl_length : 0, + user_ddp_ok, p->user_ddp_pending, uio->uio_iov->iov_len, p->kbuf[0] ? p->kbuf[0]->dgl_length : 0, p->ubuf_ddp_ready, toep->tp_ulp_mode, !!is_ddp(m), m->m_ddp_flags, p->ubuf, p->kbuf_posted); /* * If MSG_TRUNC is specified the data is discarded. * XXX need to check pr_atomic */ + KASSERT(avail > 0, ("avail=%d resid=%d offset=%d", avail, uio->uio_resid, offset)); if (__predict_true(!(flags & MSG_TRUNC))) { int resid = uio->uio_resid; @@ -800,11 +806,11 @@ struct mbuf *nextrecord; if (p->kbuf[0] != NULL && is_ddp(m) && (fl & 1)) { - if (is_ddp_psh(m) && user_ddp_pending) + if (is_ddp_psh(m) && p->user_ddp_pending) got_psh = 1; if (fl & DDP_BF_NOCOPY) - user_ddp_pending = 0; + p->user_ddp_pending = 0; else if ((fl & DDP_BF_NODATA) && IS_NONBLOCKING(so)) { p->kbuf_posted--; nomoredata = 1; @@ -828,10 +834,8 @@ sbdrop_locked(&so->so_rcv, m->m_pkthdr.len); #endif exitnow = got_psh || nomoredata; - if ((so->so_rcv.sb_mb == NULL) && exitnow) { - printf("exiting\n"); + if ((so->so_rcv.sb_mb == NULL) && exitnow) goto done; - } if (copied_unacked > (so->so_rcv.sb_hiwat >> 2)) { SOCKBUF_UNLOCK(&so->so_rcv); INP_LOCK(inp); @@ -841,19 +845,17 @@ SOCKBUF_LOCK(&so->so_rcv); } } - if (len > 0) + if (len > 0) goto restart; - done: - /* * If we can still receive decide what to do in preparation for the * next receive. Note that RCV_SHUTDOWN is set if the connection * transitioned to CLOSE but not if it was in that state to begin with. */ if (__predict_true((so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED)) == 0)) { - if (user_ddp_pending) { + if (p->user_ddp_pending) { SOCKBUF_UNLOCK(&so->so_rcv); SOCKBUF_LOCK(&so->so_rcv); user_ddp_ok = 0; @@ -861,9 +863,10 @@ if (so->so_rcv.sb_mb) { if (copied < 0) copied = 0; - goto restart; + if (len > 0) + goto restart; } - user_ddp_pending = 0; + p->user_ddp_pending = 0; } if ((p->kbuf[0] != NULL) && (p->kbuf_posted == 0)) { #ifdef T3_TRACE @@ -886,7 +889,7 @@ "chelsio_recvmsg <-: copied %d len %d buffers_freed %d " "kbuf_posted %d user_ddp_pending %u", copied, len, buffers_freed, p ? p->kbuf_posted : -1, - user_ddp_pending); + p->user_ddp_pending); #endif SOCKBUF_UNLOCK(&so->so_rcv); done_unlocked: ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#8 (text+ko) ==== @@ -156,7 +156,6 @@ p->dgl_length = len; p->dgl_offset = pg_off; p->dgl_nelem = npages; - printf("hold %jx -> %jx --- count=%d i=%d\n", addr, addr + npages*PAGE_SIZE, npages, i); #ifdef NEED_BUSDMA p->phys_addr[0] = pci_map_page(pdev, p->pages[0], pg_off, @@ -414,7 +413,7 @@ so->so_rcv.sb_timeo = 30*hz; while (p->get_tcb_count && !(so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED))) { if (count & 0xffffff) - printf("waiting err=%d get_tcb_count=%d timeo=%d so=%p\n", + CTR4(KTR_TCB, "waiting err=%d get_tcb_count=%d timeo=%d so=%p\n", err, p->get_tcb_count, so->so_rcv.sb_timeo, so); count++; err = sbwait(&so->so_rcv); @@ -496,10 +495,13 @@ " kbuf_idx %d", p->ubuf_tag, flags, OVERLAY_MASK, ubuf_idx, p->kbuf_idx); #endif - CTR5(KTR_TOM, - "t3_overlay_ubuf: tag %u flags 0x%x mask 0x%x ubuf_idx %d " - " kbuf_idx %d", - p->ubuf_tag, flags, OVERLAY_MASK, ubuf_idx, p->kbuf_idx); + CTR3(KTR_TOM, + "t3_overlay_ubuf: tag %u flags 0x%x mask 0x%x", + p->ubuf_tag, flags, OVERLAY_MASK); + CTR3(KTR_TOM, + "t3_overlay_ubuf: ubuf_idx %d kbuf_idx %d post_kbuf %d", + ubuf_idx, p->kbuf_idx, post_kbuf); + return (0); } @@ -561,11 +563,9 @@ struct toepcb *toep = sototcpcb(so)->t_toe; struct ddp_state *p = &toep->tp_ddp_state; - TRACE_ENTER; t3_set_ddp_tag(so, p->cur_buf, p->kbuf_tag[p->cur_buf] << 6); t3_set_ddp_buf(so, p->cur_buf, 0, p->kbuf[p->cur_buf]->dgl_length); t3_repost_kbuf(so, p->cur_buf, modulate, 1, (so->so_state & SS_NBIO)); - TRACE_EXIT; #ifdef T3_TRACE T3_TRACE1(TIDTB(so), "t3_post_kbuf: cur_buf = kbuf_idx = %u ", p->cur_buf); @@ -640,6 +640,8 @@ t3_setup_ppods(so, p->kbuf[idx], nppods, p->kbuf_tag[idx], p->kbuf[idx]->dgl_length, 0, 0); } + cxgb_log_tcb(TOEP_T3C_DEV(toep)->adapter, toep->tp_tid); + t3_set_ddp_tag(so, 0, p->kbuf_tag[0] << 6); t3_set_ddp_buf(so, 0, 0, p->kbuf[0]->dgl_length); t3_repost_kbuf(so, 0, 0, 1, nonblock); @@ -655,7 +657,8 @@ CTR4(KTR_TOM, "t3_enter_ddp: kbuf_size %u waitall %u tag0 %d tag1 %d", kbuf_size, waitall, p->kbuf_tag[0], p->kbuf_tag[1]); - + DELAY(100000); + cxgb_log_tcb(TOEP_T3C_DEV(toep)->adapter, toep->tp_tid); return (0); err: ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_defs.h#7 (text+ko) ==== @@ -44,6 +44,7 @@ #define TRACE_EXIT printf("%s:%s:%d exited\n", __FUNCTION__, __FILE__, __LINE__) #define KTR_TOM KTR_SPARE2 +#define KTR_TCB KTR_SPARE3 struct toepcb; struct listen_ctx; ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_listen.c#2 (text+ko) ==== @@ -246,26 +246,20 @@ printf("start listen\n"); - ctx = malloc(sizeof(*ctx), M_CXGB, M_NOWAIT); + ctx = malloc(sizeof(*ctx), M_CXGB, M_NOWAIT|M_ZERO); if (!ctx) return; ctx->tom_data = d; ctx->lso = so; - ctx->ulp_mode = 0; /* DDP if the default */ + ctx->ulp_mode = TOM_TUNABLE(dev, ddp) && !(so->so_options & SO_NO_DDP) ? ULP_MODE_TCPDDP : 0; LIST_INIT(&ctx->synq_head); stid = cxgb_alloc_stid(d->cdev, d->client, ctx); if (stid < 0) goto free_ctx; -#ifdef notyet - /* - * XXX need to mark inpcb as referenced - */ - sock_hold(sk); -#endif m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) goto free_stid; ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_t3_ddp.h#10 (text+ko) ==== @@ -115,6 +115,7 @@ int get_tcb_count; unsigned int kbuf_posted; int cancel_ubuf; + int user_ddp_pending; unsigned int kbuf_nppods[NUM_DDP_KBUF]; unsigned int kbuf_tag[NUM_DDP_KBUF]; struct ddp_gather_list *kbuf[NUM_DDP_KBUF]; /* kernel buffer for DDP prefetch */ ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#8 (text+ko) ==== @@ -167,12 +167,9 @@ toepcb_release(struct toepcb *toep) { if (toep->tp_refcount == 1) { - printf("doing final toepcb free\n"); - free(toep, M_DEVBUF); return; } - atomic_add_acq_int(&toep->tp_refcount, -1); } From owner-p4-projects@FreeBSD.ORG Sat Feb 9 07:41:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D197916A41B; Sat, 9 Feb 2008 07:41:50 +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 7E90A16A419 for ; Sat, 9 Feb 2008 07:41:50 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 74F9413C44B for ; Sat, 9 Feb 2008 07:41:50 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m197foao076941 for ; Sat, 9 Feb 2008 07:41:50 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m197foeJ076938 for perforce@freebsd.org; Sat, 9 Feb 2008 07:41:50 GMT (envelope-from jb@freebsd.org) Date: Sat, 9 Feb 2008 07:41:50 GMT Message-Id: <200802090741.m197foeJ076938@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135093 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 07:41:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=135093 Change 135093 by jb@jb_freebsd1 on 2008/02/09 07:41:07 Make i386 match amd64. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_asm.S#5 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_isa.c#6 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#10 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#36 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_asm.S#5 (text+ko) ==== @@ -24,7 +24,27 @@ * Use is subject to license terms. */ -#include +#define _ASM + +#include +#include +#include + +/* +void dtrace_invop_init(void) +*/ + ENTRY(dtrace_invop_init) + /* XXX */ + ret + END(dtrace_invop_init) + +/* +void dtrace_invop_uninit(void) +*/ + ENTRY(dtrace_invop_uninit) + /* XXX */ + ret + END(dtrace_invop_uninit) /* greg_t dtrace_getfp(void) @@ -209,3 +229,187 @@ rep; ret /* use 2 byte return instruction when branch target */ /* AMD Software Optimization Guide - Section 6.2 */ END(dtrace_membar_consumer) + +/* +dtrace_icookie_t dtrace_interrupt_disable(void) +*/ + ENTRY(dtrace_interrupt_disable) + pushfl + popl %eax + cli + ret + END(dtrace_interrupt_disable) + +/* +void dtrace_interrupt_enable(dtrace_icookie_t cookie) +*/ + ENTRY(dtrace_interrupt_enable) + movl 4(%esp), %eax + pushl %eax + popfl + ret + END(dtrace_interrupt_enable) + +/* + * The panic() and cmn_err() functions invoke vpanic() as a common entry point + * into the panic code implemented in panicsys(). vpanic() is responsible + * for passing through the format string and arguments, and constructing a + * regs structure on the stack into which it saves the current register + * values. If we are not dying due to a fatal trap, these registers will + * then be preserved in panicbuf as the current processor state. Before + * invoking panicsys(), vpanic() activates the first panic trigger (see + * common/os/panic.c) and switches to the panic_stack if successful. Note that + * DTrace takes a slightly different panic path if it must panic from probe + * context. Instead of calling panic, it calls into dtrace_vpanic(), which + * sets up the initial stack as vpanic does, calls dtrace_panic_trigger(), and + * branches back into vpanic(). + */ +/* +void vpanic(const char *format, va_list alist) +*/ + ENTRY(vpanic) /* Initial stack layout: */ + + pushl %ebp /* | %eip | 20 */ + movl %esp, %ebp /* | %ebp | 16 */ + pushl %eax /* | %eax | 12 */ + pushl %ebx /* | %ebx | 8 */ + pushl %ecx /* | %ecx | 4 */ + pushl %edx /* | %edx | 0 */ + + movl %esp, %ebx /* %ebx = current stack pointer */ + + lea panic_quiesce, %eax /* %eax = &panic_quiesce */ + pushl %eax /* push &panic_quiesce */ + call panic_trigger /* %eax = panic_trigger() */ + addl $4, %esp /* reset stack pointer */ + +vpanic_common: + cmpl $0, %eax /* if (%eax == 0) */ + je 0f /* goto 0f; */ + + /* + * If panic_trigger() was successful, we are the first to initiate a + * panic: we now switch to the reserved panic_stack before continuing. + */ + lea panic_stack, %esp /* %esp = panic_stack */ + addl $PANICSTKSIZE, %esp /* %esp += PANICSTKSIZE */ + +0: subl $REGSIZE, %esp /* allocate struct regs */ + + /* + * Now that we've got everything set up, store the register values as + * they were when we entered vpanic() to the designated location in + * the regs structure we allocated on the stack. + */ +#ifdef DOODAD + mov %gs, %edx + mov %edx, REGOFF_GS(%esp) + mov %fs, %edx + mov %edx, REGOFF_FS(%esp) + mov %es, %edx + mov %edx, REGOFF_ES(%esp) + mov %ds, %edx + mov %edx, REGOFF_DS(%esp) + movl %edi, REGOFF_EDI(%esp) + movl %esi, REGOFF_ESI(%esp) + movl 16(%ebx), %ecx + movl %ecx, REGOFF_EBP(%esp) + movl %ebx, %ecx + addl $20, %ecx + movl %ecx, REGOFF_ESP(%esp) + movl 8(%ebx), %ecx + movl %ecx, REGOFF_EBX(%esp) + movl 0(%ebx), %ecx + movl %ecx, REGOFF_EDX(%esp) + movl 4(%ebx), %ecx + movl %ecx, REGOFF_ECX(%esp) + movl 12(%ebx), %ecx + movl %ecx, REGOFF_EAX(%esp) + movl $0, REGOFF_TRAPNO(%esp) + movl $0, REGOFF_ERR(%esp) + lea vpanic, %ecx + movl %ecx, REGOFF_EIP(%esp) + mov %cs, %edx + movl %edx, REGOFF_CS(%esp) + pushfl + popl %ecx + movl %ecx, REGOFF_EFL(%esp) + movl $0, REGOFF_UESP(%esp) + mov %ss, %edx + movl %edx, REGOFF_SS(%esp) + + movl %esp, %ecx /* %ecx = ®s */ + pushl %eax /* push on_panic_stack */ + pushl %ecx /* push ®s */ + movl 12(%ebp), %ecx /* %ecx = alist */ + pushl %ecx /* push alist */ + movl 8(%ebp), %ecx /* %ecx = format */ + pushl %ecx /* push format */ + call panicsys /* panicsys(); */ + addl $16, %esp /* pop arguments */ + + addl $REGSIZE, %esp +#endif + popl %edx + popl %ecx + popl %ebx + popl %eax + leave + ret + END(vpanic) + +/* +void dtrace_vpanic(const char *format, va_list alist) +*/ + ENTRY(dtrace_vpanic) /* Initial stack layout: */ + + pushl %ebp /* | %eip | 20 */ + movl %esp, %ebp /* | %ebp | 16 */ + pushl %eax /* | %eax | 12 */ + pushl %ebx /* | %ebx | 8 */ + pushl %ecx /* | %ecx | 4 */ + pushl %edx /* | %edx | 0 */ + + movl %esp, %ebx /* %ebx = current stack pointer */ + + lea panic_quiesce, %eax /* %eax = &panic_quiesce */ + pushl %eax /* push &panic_quiesce */ + call dtrace_panic_trigger /* %eax = dtrace_panic_trigger() */ + addl $4, %esp /* reset stack pointer */ + jmp vpanic_common /* jump back to common code */ + + END(dtrace_vpanic) + +/* +int +panic_trigger(int *tp) +*/ + ENTRY(panic_trigger) + xorl %eax, %eax + movl $0xdefacedd, %edx + lock + xchgl %edx, (%edi) + cmpl $0, %edx + je 0f + movl $0, %eax + ret +0: movl $1, %eax + ret + END(panic_trigger) + +/* +int +dtrace_panic_trigger(int *tp) +*/ + ENTRY(dtrace_panic_trigger) + xorl %eax, %eax + movl $0xdefacedd, %edx + lock + xchgl %edx, (%edi) + cmpl $0, %edx + je 0f + movl $0, %eax + ret +0: movl $1, %eax + ret + END(dtrace_panic_trigger) ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_isa.c#6 (text+ko) ==== @@ -57,6 +57,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes, uint32_t *intrpc) { +#ifdef DOODAD int depth = 0; vm_offset_t callpc; register_t ebp; @@ -96,13 +97,14 @@ for (; depth < pcstack_limit; depth++) { pcstack[depth] = 0; } +#endif } +#ifdef DOODAD static int dtrace_getustack_common(uint64_t *pcstack, int pcstack_limit, uintptr_t pc, uintptr_t sp) { -#ifdef DOODAD klwp_t *lwp = ttolwp(curthread); proc_t *p = curproc; uintptr_t oldcontext = lwp->lwp_oldcontext; @@ -174,10 +176,8 @@ } return (ret); -#else -return 0; +} #endif -} void dtrace_getupcstack(uint64_t *pcstack, int pcstack_limit) @@ -388,6 +388,7 @@ uint64_t dtrace_getarg(int arg, int aframes) { +#ifdef DOODAD uintptr_t val; struct frame *fp = (struct frame *)dtrace_getfp(); uintptr_t *stack; @@ -474,12 +475,16 @@ DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); return (val); +#else + return (0); +#endif } /*ARGSUSED*/ int dtrace_getstackdepth(int aframes) { +#ifdef DOODAD int depth = 0; struct frame *frame; vm_offset_t ebp; @@ -505,6 +510,9 @@ return 0; else return depth - aframes; +#else + return (0); +#endif } ulong_t @@ -631,31 +639,35 @@ } void -dtrace_copyin(uintptr_t uaddr, uintptr_t kaddr, size_t size) +dtrace_copyin(uintptr_t uaddr, uintptr_t kaddr, size_t size, + volatile uint16_t *flags) { if (dtrace_copycheck(uaddr, kaddr, size)) dtrace_copy(uaddr, kaddr, size); } void -dtrace_copyout(uintptr_t kaddr, uintptr_t uaddr, size_t size) +dtrace_copyout(uintptr_t kaddr, uintptr_t uaddr, size_t size, + volatile uint16_t *flags) { if (dtrace_copycheck(uaddr, kaddr, size)) dtrace_copy(kaddr, uaddr, size); } void -dtrace_copyinstr(uintptr_t uaddr, uintptr_t kaddr, size_t size) +dtrace_copyinstr(uintptr_t uaddr, uintptr_t kaddr, size_t size, + volatile uint16_t *flags) { if (dtrace_copycheck(uaddr, kaddr, size)) - dtrace_copystr(uaddr, kaddr, size); + dtrace_copystr(uaddr, kaddr, size, flags); } void -dtrace_copyoutstr(uintptr_t kaddr, uintptr_t uaddr, size_t size) +dtrace_copyoutstr(uintptr_t kaddr, uintptr_t uaddr, size_t size, + volatile uint16_t *flags) { if (dtrace_copycheck(uaddr, kaddr, size)) - dtrace_copystr(kaddr, uaddr, size); + dtrace_copystr(kaddr, uaddr, size, flags); } uint8_t ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#10 (text+ko) ==== @@ -50,8 +50,7 @@ struct dtrace_invop_hdlr *dtih_next; } dtrace_invop_hdlr_t; -dtrace_invop_hdlr_t *dtrace_invop_hdlr; -uintptr_t dtrace_invop_addr; +dtrace_invop_hdlr_t *dtrace_invop_hdlr; int dtrace_invop(uintptr_t addr, uintptr_t *stack, uintptr_t eax) @@ -59,35 +58,9 @@ dtrace_invop_hdlr_t *hdlr; int rval; - /* - * Save the address in a global variable which can be - * read via the kernel debugger in the event that a - * double fault occurs. - * - * From kdb: p *dtrace_invop_addr - * - * Then look up the value in an objdump of the kernel. - */ - dtrace_invop_addr = addr; - - /* - * An invalid opcode fault should not occur while executing - * a probe because only dtrace_ functions are supposed to - * be called by design. Check here if dtrace_probe() is - * in-progress. If so, that's very bad. Very, very bad. We - * can't call any non-dtrace functions to report this, so - * just save the invalid opcode address and hope that the - * dtrace_ioctl will report it. If the DTrace port is - * working according to Sun's design, this should never - * occur. - */ - if (dtrace_in_probe) - dtrace_in_probe_addr = addr; - - for (hdlr = dtrace_invop_hdlr; hdlr != NULL; hdlr = hdlr->dtih_next) { + for (hdlr = dtrace_invop_hdlr; hdlr != NULL; hdlr = hdlr->dtih_next) if ((rval = hdlr->dtih_func(addr, stack, eax)) != 0) return (rval); - } return (0); } @@ -101,8 +74,6 @@ hdlr->dtih_func = func; hdlr->dtih_next = dtrace_invop_hdlr; dtrace_invop_hdlr = hdlr; - - dtrace_invop_func = dtrace_invop; } void @@ -130,19 +101,6 @@ } kmem_free(hdlr, 0); - - if (dtrace_invop_hdlr == NULL) - dtrace_invop_func = NULL; -} - -int -dtrace_getipl(void) -{ -#ifdef DOODAD - return (CPU->cpu_pri); -#else - return (0); -#endif } /*ARGSUSED*/ @@ -419,6 +377,13 @@ } #endif +uint64_t +dtrace_gethrestime(void) +{ + printf("%s(%d): XXX\n",__func__,__LINE__); + return (0); +} + /* Function to handle DTrace traps during probes. See i386/i386/trap.c */ int dtrace_trap(struct trapframe *frame, u_int type) ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#36 (text) ==== @@ -16126,7 +16126,7 @@ #include #include #include -#if defined(__amd64__) +#if defined(__amd64__) || defined(__i386__) #include #endif From owner-p4-projects@FreeBSD.ORG Sat Feb 9 07:43:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2566216A41B; Sat, 9 Feb 2008 07:43:53 +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 C6EB616A419 for ; Sat, 9 Feb 2008 07:43:52 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BE35713C442 for ; Sat, 9 Feb 2008 07:43:52 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m197hqZY077121 for ; Sat, 9 Feb 2008 07:43:52 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m197hquE077118 for perforce@freebsd.org; Sat, 9 Feb 2008 07:43:52 GMT (envelope-from jb@freebsd.org) Date: Sat, 9 Feb 2008 07:43:52 GMT Message-Id: <200802090743.m197hquE077118@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135094 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 07:43:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=135094 Change 135094 by jb@jb_freebsd1 on 2008/02/09 07:43:10 i386 needs another header for genassm.s Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/dtrace/Makefile#15 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/dtrace/Makefile#15 (text+ko) ==== @@ -25,6 +25,10 @@ # These are needed for assym.s SRCS+= opt_compat.h opt_kstack_pages.h opt_nfs.h +.if ${MACHINE_ARCH} == "i386" +SRCS+= opt_apic.h +.endif + CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ -I${.CURDIR}/../../../cddl/dev/dtrace \ -I${.CURDIR}/../../../cddl/dev/dtrace/${ARCHDIR} \ From owner-p4-projects@FreeBSD.ORG Sat Feb 9 07:44:54 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E21E16A418; Sat, 9 Feb 2008 07:44: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 23BD716A41A for ; Sat, 9 Feb 2008 07:44:54 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1AF0013C442 for ; Sat, 9 Feb 2008 07:44:54 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m197irrS077206 for ; Sat, 9 Feb 2008 07:44:53 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m197irxq077203 for perforce@freebsd.org; Sat, 9 Feb 2008 07:44:53 GMT (envelope-from jb@freebsd.org) Date: Sat, 9 Feb 2008 07:44:53 GMT Message-Id: <200802090744.m197irxq077203@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135095 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 07:44:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=135095 Change 135095 by jb@jb_freebsd1 on 2008/02/09 07:44:05 Add some stubs for things to come. WIP. Affected files ... .. //depot/projects/dtrace/src/lib/libproc/Makefile#4 edit .. //depot/projects/dtrace/src/lib/libproc/libproc.h#3 edit .. //depot/projects/dtrace/src/lib/libproc/proc_sym.c#1 add Differences ... ==== //depot/projects/dtrace/src/lib/libproc/Makefile#4 (text+ko) ==== @@ -4,6 +4,7 @@ SRCS= \ proc_create.c \ + proc_sym.c \ proc_util.c INCS= libproc.h ==== //depot/projects/dtrace/src/lib/libproc/libproc.h#3 (text+ko) ==== @@ -29,6 +29,8 @@ #ifndef _LIBPROC_H_ #define _LIBPROC_H_ +#include + struct proc_handle; /* Values returned by proc_state(). */ @@ -39,15 +41,24 @@ #define PS_DEAD 5 #define PS_LOST 6 +typedef struct prmap { + uintptr_t pr_vaddr; /* Virtual address. */ +} prmap_t; + /* Function prototype definitions. */ __BEGIN_DECLS +const prmap_t *proc_addr2map(struct proc_handle *, uintptr_t); +const prmap_t *proc_name2map(struct proc_handle *, const char *); +char *proc_objname(struct proc_handle *, uintptr_t, char *, size_t); +int proc_addr2sym(struct proc_handle *, uintptr_t, char *, size_t, GElf_Sym *); int proc_attach(pid_t pid, int flags, struct proc_handle **pphdl); int proc_continue(struct proc_handle *); int proc_clearflags(struct proc_handle *, int); int proc_create(const char *, char * const *, struct proc_handle **); int proc_detach(struct proc_handle *); int proc_getflags(struct proc_handle *); +int proc_name2sym(struct proc_handle *, const char *, const char *, GElf_Sym *); int proc_setflags(struct proc_handle *, int); int proc_state(struct proc_handle *); int proc_wait(struct proc_handle *); From owner-p4-projects@FreeBSD.ORG Sat Feb 9 07:46:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C7F6316A420; Sat, 9 Feb 2008 07:46:56 +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 8CFBE16A417 for ; Sat, 9 Feb 2008 07:46:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6BCDC13C458 for ; Sat, 9 Feb 2008 07:46:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m197kuOr077521 for ; Sat, 9 Feb 2008 07:46:56 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m197kuFG077518 for perforce@freebsd.org; Sat, 9 Feb 2008 07:46:56 GMT (envelope-from jb@freebsd.org) Date: Sat, 9 Feb 2008 07:46:56 GMT Message-Id: <200802090746.m197kuFG077518@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135096 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 07:46:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=135096 Change 135096 by jb@jb_freebsd1 on 2008/02/09 07:46:17 Add more compatibility mumbo. Things I don't want to put in out libproc. Affected files ... .. //depot/projects/dtrace/src/compat/opensolaris/include/libproc.h#4 edit Differences ... ==== //depot/projects/dtrace/src/compat/opensolaris/include/libproc.h#4 (text+ko) ==== @@ -33,11 +33,13 @@ #include #define ps_prochandle proc_handle +#define Lmid_t int #define PR_RLC 0x0001 #define PR_KLC 0x0002 #define PGRAB_RDONLY O_RDONLY +#define PGRAB_FORCE 0 #include_next From owner-p4-projects@FreeBSD.ORG Sat Feb 9 07:47:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D273216A468; Sat, 9 Feb 2008 07:47:57 +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 978CE16A417 for ; Sat, 9 Feb 2008 07:47:57 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8D79B13C43E for ; Sat, 9 Feb 2008 07:47:57 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m197lvZN077592 for ; Sat, 9 Feb 2008 07:47:57 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m197lvIc077589 for perforce@freebsd.org; Sat, 9 Feb 2008 07:47:57 GMT (envelope-from jb@freebsd.org) Date: Sat, 9 Feb 2008 07:47:57 GMT Message-Id: <200802090747.m197lvIc077589@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135097 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 07:47:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=135097 Change 135097 by jb@jb_freebsd1 on 2008/02/09 07:47:16 More WIP. Start using some of the functions in our libproc. More to come. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#15 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#12 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.c#12 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#18 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#15 (text) ==== @@ -236,8 +236,6 @@ static void dt_aggregate_usym(dtrace_hdl_t *dtp, uint64_t *data) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD uint64_t pid = data[0]; uint64_t *pc = &data[1]; struct ps_prochandle *P; @@ -251,19 +249,20 @@ dt_proc_lock(dtp, P); +#if defined(sun) if (Plookup_by_addr(P, *pc, NULL, 0, &sym) == 0) +#else + if (proc_addr2sym(P, *pc, NULL, 0, &sym) == 0) +#endif *pc = sym.st_value; dt_proc_unlock(dtp, P); dt_proc_release(dtp, P); -#endif } static void dt_aggregate_umod(dtrace_hdl_t *dtp, uint64_t *data) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD uint64_t pid = data[0]; uint64_t *pc = &data[1]; struct ps_prochandle *P; @@ -277,12 +276,15 @@ dt_proc_lock(dtp, P); +#if defined(sun) if ((map = Paddr_to_map(P, *pc)) != NULL) +#else + if ((map = proc_addr2map(P, *pc)) != NULL) +#endif *pc = map->pr_vaddr; dt_proc_unlock(dtp, P); dt_proc_release(dtp, P); -#endif } static void ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#12 (text) ==== @@ -568,8 +568,6 @@ dt_print_ustack(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr, uint64_t arg) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD /* LINTED - alignment */ uint64_t *pc = (uint64_t *)addr; uint32_t depth = DTRACE_USTACK_NFRAMES(arg); @@ -614,17 +612,22 @@ dt_proc_lock(dtp, P); /* lock handle while we perform lookups */ for (i = 0; i < depth && pc[i] != 0; i++) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD const prmap_t *map; -#endif if ((err = dt_printf(dtp, fp, "%*s", indent, "")) < 0) break; +#if defined(sun) if (P != NULL && Plookup_by_addr(P, pc[i], +#else + if (P != NULL && proc_addr2sym(P, pc[i], +#endif name, sizeof (name), &sym) == 0) { +#if defined(sun) (void) Pobjname(P, pc[i], objname, sizeof (objname)); +#else + (void) proc_objname(P, pc[i], objname, sizeof (objname)); +#endif if (pc[i] > sym.st_value) { (void) snprintf(c, sizeof (c), @@ -634,11 +637,13 @@ (void) snprintf(c, sizeof (c), "%s`%s", dt_basename(objname), name); } -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD } else if (str != NULL && str[0] != '\0' && str[0] != '@' && +#if defined(sun) (P != NULL && ((map = Paddr_to_map(P, pc[i])) == NULL || (map->pr_mflags & MA_WRITE)))) { +#else + (P != NULL && ((map = proc_addr2map(P, pc[i])) == NULL))) { +#endif /* * If the current string pointer in the string table * does not point to an empty string _and_ the program @@ -653,9 +658,12 @@ * case and we refuse to use the string. */ (void) snprintf(c, sizeof (c), "%s", str); -#endif } else { +#if defined(sun) if (P != NULL && Pobjname(P, pc[i], objname, +#else + if (P != NULL && proc_objname(P, pc[i], objname, +#endif sizeof (objname)) != 0) { (void) snprintf(c, sizeof (c), "%s`0x%llx", dt_basename(objname), (u_longlong_t)pc[i]); @@ -703,16 +711,11 @@ } return (err); -#else -return 0; -#endif } static int dt_print_usym(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, dtrace_actkind_t act) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD /* LINTED - alignment */ uint64_t pid = ((uint64_t *)addr)[0]; /* LINTED - alignment */ @@ -730,7 +733,11 @@ dt_proc_lock(dtp, P); +#if defined(sun) if (Plookup_by_addr(P, pc, NULL, 0, &sym) == 0) +#else + if (proc_addr2sym(P, pc, NULL, 0, &sym) == 0) +#endif pc = sym.st_value; dt_proc_unlock(dtp, P); @@ -744,16 +751,11 @@ } while ((len = dtrace_uaddr2str(dtp, pid, pc, s, n)) >= n); return (dt_printf(dtp, fp, format, s)); -#else -return 0; -#endif } int dt_print_umod(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD /* LINTED - alignment */ uint64_t pid = ((uint64_t *)addr)[0]; /* LINTED - alignment */ @@ -778,7 +780,11 @@ if (P != NULL) dt_proc_lock(dtp, P); /* lock handle while we perform lookups */ +#if defined(sun) if (P != NULL && Pobjname(P, pc, objname, sizeof (objname)) != 0) { +#else + if (P != NULL && proc_objname(P, pc, objname, sizeof (objname)) != 0) { +#endif (void) snprintf(c, sizeof (c), "%s", dt_basename(objname)); } else { (void) snprintf(c, sizeof (c), "0x%llx", (u_longlong_t)pc); @@ -792,9 +798,6 @@ } return (err); -#else -return 0; -#endif } int ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.c#12 (text) ==== @@ -43,7 +43,6 @@ #include #include -#ifdef DOODAD typedef struct dt_pid_probe { dtrace_hdl_t *dpp_dtp; dt_pcb_t *dpp_pcb; @@ -61,24 +60,24 @@ GElf_Sym dpp_last; uint_t dpp_last_taken; } dt_pid_probe_t; -#endif /* * Compose the lmid and object name into the canonical representation. We * omit the lmid for the default link map for convenience. */ -#ifdef DOODAD static void dt_pid_objname(char *buf, size_t len, Lmid_t lmid, const char *obj) { +#if defined(sun) if (lmid == LM_ID_BASE) (void) strncpy(buf, obj, len); else (void) snprintf(buf, len, "LM%lx`%s", lmid, obj); +#else + (void) strncpy(buf, obj, len); +#endif } -#endif -#ifdef DOODAD static int dt_pid_error(dtrace_hdl_t *dtp, dt_pcb_t *pcb, dt_proc_t *dpr, fasttrap_probe_spec_t *ftp, dt_errtag_t tag, const char *fmt, ...) @@ -105,9 +104,7 @@ return (1); } -#endif -#ifdef DOODAD static int dt_pid_per_sym(dt_pid_probe_t *pp, const GElf_Sym *symp, const char *func) { @@ -123,7 +120,11 @@ int isdash = strcmp("-", func) == 0; pid_t pid; +#if defined(sun) pid = Pstatus(pp->dpp_pr)->pr_pid; +#else + pid = proc_getpid(pp->dpp_pr); +#endif dt_dprintf("creating probe pid%d:%s:%s:%s\n", (int)pid, pp->dpp_obj, func, pp->dpp_name); @@ -143,6 +144,7 @@ pp->dpp_obj); if (!isdash && gmatch("return", pp->dpp_name)) { +#ifdef DOODAD if (dt_pid_create_return_probe(pp->dpp_pr, dtp, ftp, symp, pp->dpp_stret) < 0) { return (dt_pid_error(dtp, pcb, dpr, ftp, @@ -150,17 +152,20 @@ "for '%s': %s", func, dtrace_errmsg(dtp, dtrace_errno(dtp)))); } +#endif nmatches++; } if (!isdash && gmatch("entry", pp->dpp_name)) { +#ifdef DOODAD if (dt_pid_create_entry_probe(pp->dpp_pr, dtp, ftp, symp) < 0) { return (dt_pid_error(dtp, pcb, dpr, ftp, D_PROC_CREATEFAIL, "failed to create entry probe " "for '%s': %s", func, dtrace_errmsg(dtp, dtrace_errno(dtp)))); } +#endif nmatches++; } @@ -179,8 +184,10 @@ (u_longlong_t)off, func)); } +#ifdef DOODAD err = dt_pid_create_offset_probe(pp->dpp_pr, pp->dpp_dtp, ftp, symp, off); +#endif if (err == DT_PROC_ERR) { return (dt_pid_error(dtp, pcb, dpr, ftp, @@ -198,6 +205,7 @@ nmatches++; } else if (glob && !isdash) { +#ifdef DOODAD if (dt_pid_create_glob_offset_probes(pp->dpp_pr, pp->dpp_dtp, ftp, symp, pp->dpp_name) < 0) { return (dt_pid_error(dtp, pcb, dpr, ftp, @@ -205,6 +213,7 @@ "failed to create offset probes in '%s': %s", func, dtrace_errmsg(dtp, dtrace_errno(dtp)))); } +#endif nmatches++; } @@ -215,9 +224,7 @@ return (0); } -#endif -#ifdef DOODAD static int dt_pid_sym_filt(void *arg, const GElf_Sym *symp, const char *func) { @@ -252,9 +259,7 @@ return (0); } -#endif -#ifdef DOODAD static int dt_pid_per_mod(void *arg, const prmap_t *pmp, const char *obj) { @@ -267,13 +272,17 @@ if (obj == NULL) return (0); +#if defined(sun) (void) Plmid(pp->dpp_pr, pmp->pr_vaddr, &pp->dpp_lmid); +#endif + if ((pp->dpp_obj = strrchr(obj, '/')) == NULL) pp->dpp_obj = obj; else pp->dpp_obj++; +#if defined(sun) if (Pxlookup_by_name(pp->dpp_pr, pp->dpp_lmid, obj, ".stret1", &sym, NULL) == 0) pp->dpp_stret[0] = sym.st_value; @@ -297,6 +306,27 @@ pp->dpp_stret[3] = sym.st_value; else pp->dpp_stret[3] = 0; +#else + if (proc_name2sym(pp->dpp_pr, obj, ".stret1", &sym) == 0) + pp->dpp_stret[0] = sym.st_value; + else + pp->dpp_stret[0] = 0; + + if (proc_name2sym(pp->dpp_pr, obj, ".stret2", &sym) == 0) + pp->dpp_stret[1] = sym.st_value; + else + pp->dpp_stret[1] = 0; + + if (proc_name2sym(pp->dpp_pr, obj, ".stret4", &sym) == 0) + pp->dpp_stret[2] = sym.st_value; + else + pp->dpp_stret[2] = 0; + + if (proc_name2sym(pp->dpp_pr, obj, ".stret8", &sym) == 0) + pp->dpp_stret[3] = sym.st_value; + else + pp->dpp_stret[3] = 0; +#endif dt_dprintf("%s stret %llx %llx %llx %llx\n", obj, (u_longlong_t)pp->dpp_stret[0], (u_longlong_t)pp->dpp_stret[1], @@ -317,16 +347,24 @@ * just fail silently in the hopes that some other object will * contain the desired symbol. */ +#if defined(sun) if (Pxlookup_by_name(pp->dpp_pr, pp->dpp_lmid, obj, pp->dpp_func, &sym, NULL) != 0) { +#else + if (proc_name2sym(pp->dpp_pr, obj, pp->dpp_func, &sym) != 0) { +#endif if (strcmp("-", pp->dpp_func) == 0) { sym.st_name = 0; sym.st_info = GELF_ST_INFO(STB_LOCAL, STT_FUNC); sym.st_other = 0; sym.st_value = 0; +#if defined(sun) sym.st_size = Pstatus(pp->dpp_pr)->pr_dmodel == PR_MODEL_ILP32 ? -1U : -1ULL; +#else + sym.st_size = ~((Elf64_Xword) 0); +#endif } else if (!strisglob(pp->dpp_mod)) { return (dt_pid_error(dtp, pcb, dpr, NULL, @@ -349,14 +387,21 @@ * We don't instrument PLTs -- they're dynamically rewritten, * and, so, inherently dicey to instrument. */ +#ifdef DOODAD if (Ppltdest(pp->dpp_pr, sym.st_value) != NULL) return (0); +#endif +#if defined(sun) (void) Plookup_by_addr(pp->dpp_pr, sym.st_value, pp->dpp_func, +#else + (void) proc_addr2sym(pp->dpp_pr, sym.st_value, pp->dpp_func, +#endif DTRACE_FUNCNAMELEN, &sym); return (dt_pid_per_sym(pp, &sym, pp->dpp_func)); } else { +#ifdef DOODAD uint_t nmatches = pp->dpp_nmatches; if (Psymbol_iter_by_addr(pp->dpp_pr, obj, PR_SYMTAB, @@ -372,13 +417,12 @@ BIND_ANY | TYPE_FUNC, dt_pid_sym_filt, pp) == 1) return (1); } +#endif } return (0); } -#endif -#ifdef DOODAD static int dt_pid_mod_filt(void *arg, const prmap_t *pmp, const char *obj) { @@ -388,7 +432,11 @@ if (gmatch(obj, pp->dpp_mod)) return (dt_pid_per_mod(pp, pmp, obj)); +#if defined(sun) (void) Plmid(pp->dpp_pr, pmp->pr_vaddr, &pp->dpp_lmid); +#else + pp->dpp_lmid = 0; +#endif if ((pp->dpp_obj = strrchr(obj, '/')) == NULL) pp->dpp_obj = obj; @@ -402,17 +450,18 @@ return (0); } -#endif -#ifdef DOODAD static const prmap_t * dt_pid_fix_mod(dtrace_probedesc_t *pdp, struct ps_prochandle *P) { +#ifdef DOODAD char m[MAXPATHLEN]; Lmid_t lmid = PR_LMID_EVERY; const char *obj; +#endif const prmap_t *pmp; +#ifdef DOODAD /* * Pick apart the link map from the library name. */ @@ -444,19 +493,20 @@ obj++; (void) Plmid(P, pmp->pr_vaddr, &lmid); + dt_pid_objname(pdp->dtpd_mod, sizeof (pdp->dtpd_mod), lmid, obj); +#else +pmp = NULL; +#endif return (pmp); } -#endif static int dt_pid_create_pid_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *pcb, dt_proc_t *dpr) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD dt_pid_probe_t pp; int ret = 0; @@ -465,6 +515,7 @@ pp.dpp_pr = dpr->dpr_proc; pp.dpp_pcb = pcb; +#ifdef DOODAD /* * We can only trace dynamically-linked executables (since we've * hidden some magic in ld.so.1 as well as libc.so.1). @@ -474,6 +525,7 @@ "process %s is not a dynamically-linked executable", &pdp->dtpd_provider[3])); } +#endif pp.dpp_mod = pdp->dtpd_mod[0] != '\0' ? pdp->dtpd_mod : "*"; pp.dpp_func = pdp->dtpd_func[0] != '\0' ? pdp->dtpd_func : "*"; @@ -487,8 +539,13 @@ pp.dpp_mod = pdp->dtpd_mod; (void) strcpy(pdp->dtpd_mod, "a.out"); } else if (strisglob(pp.dpp_mod) || +#if defined(sun) (aout = Pname_to_map(pp.dpp_pr, "a.out")) == NULL || (pmp = Pname_to_map(pp.dpp_pr, pp.dpp_mod)) == NULL || +#else + (aout = proc_name2map(pp.dpp_pr, "a.out")) == NULL || + (pmp = proc_name2map(pp.dpp_pr, pp.dpp_mod)) == NULL || +#endif aout->pr_vaddr != pmp->pr_vaddr) { return (dt_pid_error(dtp, pcb, dpr, NULL, D_PROC_LIB, "only the a.out module is valid with the " @@ -507,6 +564,7 @@ * to iterate over each module and compare its name against the * pattern. An empty module name is treated as '*'. */ +#ifdef DOODAD if (strisglob(pp.dpp_mod)) { ret = Pobject_iter(pp.dpp_pr, dt_pid_mod_filt, &pp); } else { @@ -527,20 +585,19 @@ ret = dt_pid_per_mod(&pp, pmp, obj); } } +#endif return (ret); -#else -return 0; -#endif } -#ifdef DOODAD static int dt_pid_usdt_mapping(void *data, const prmap_t *pmp, const char *oname) { struct ps_prochandle *P = data; GElf_Sym sym; +#if defined(sun) prsyminfo_t sip; +#endif dof_helper_t dh; GElf_Half e_type; const char *mname; @@ -554,8 +611,12 @@ * run the code to instantiate these providers. */ for (i = 0; i < 2; i++) { +#if defined(sun) if (Pxlookup_by_name(P, PR_LMID_EVERY, oname, syms[i], &sym, &sip) != 0) { +#else + if (proc_name2sym(P, oname, syms[i], &sym) != 0) { +#endif continue; } @@ -566,18 +627,25 @@ dt_dprintf("lookup of %s succeeded for %s\n", syms[i], mname); +#ifdef DOODAD if (Pread(P, &e_type, sizeof (e_type), pmp->pr_vaddr + offsetof(Elf64_Ehdr, e_type)) != sizeof (e_type)) { dt_dprintf("read of ELF header failed"); continue; } +#endif dh.dofhp_dof = sym.st_value; dh.dofhp_addr = (e_type == ET_EXEC) ? 0 : pmp->pr_vaddr; dt_pid_objname(dh.dofhp_mod, sizeof (dh.dofhp_mod), +#if defined(sun) sip.prs_lmid, mname); +#else + 0, mname); +#endif +#ifdef DOODAD if (fd == -1 && (fd = pr_open(P, "/dev/dtrace/helper", O_RDWR, 0)) < 0) { dt_dprintf("pr_open of helper device failed: %s\n", @@ -587,33 +655,39 @@ if (pr_ioctl(P, fd, DTRACEHIOC_ADDDOF, &dh, sizeof (dh)) < 0) dt_dprintf("DOF was rejected for %s\n", dh.dofhp_mod); +#endif } +#ifdef DOODAD if (fd != -1) (void) pr_close(P, fd); +#endif return (0); } -#endif static int dt_pid_create_usdt_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *pcb, dt_proc_t *dpr) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD struct ps_prochandle *P = dpr->dpr_proc; int ret = 0; assert(DT_MUTEX_HELD(&dpr->dpr_lock)); +#ifdef DOODAD (void) Pupdate_maps(P); if (Pobject_iter(P, dt_pid_usdt_mapping, P) != 0) { ret = -1; (void) dt_pid_error(dtp, pcb, dpr, NULL, D_PROC_USDT, "failed to instantiate probes for pid %d: %s", +#if defined(sun) (int)Pstatus(P)->pr_pid, strerror(errno)); +#else + (int)proc_getpid(P), strerror(errno)); +#endif } +#endif /* * Put the module name in its canonical form. @@ -621,9 +695,6 @@ (void) dt_pid_fix_mod(pdp, P); return (ret); -#else -return 0; -#endif } static pid_t @@ -639,10 +710,8 @@ } if (last == NULL || (*(++last) == '\0')) { -#ifdef DOODAD (void) dt_pid_error(dtp, pcb, dpr, NULL, D_PROC_BADPROV, "'%s' is not a valid provider", pdp->dtpd_provider); -#endif return (-1); } @@ -650,10 +719,8 @@ pid = strtol(last, &end, 10); if (errno != 0 || end == last || end[0] != '\0' || pid <= 0) { -#ifdef DOODAD (void) dt_pid_error(dtp, pcb, dpr, NULL, D_PROC_BADPID, "'%s' does not contain a valid pid", pdp->dtpd_provider); -#endif return (-1); } @@ -663,8 +730,6 @@ int dt_pid_create_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *pcb) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD char provname[DTRACE_PROVNAMELEN]; struct ps_prochandle *P; dt_proc_t *dpr; @@ -729,9 +794,6 @@ } return (err ? -1 : 0); -#else -return 0; -#endif } int ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#18 (text) ==== @@ -948,8 +948,6 @@ dtrace_uaddr2str(dtrace_hdl_t *dtp, pid_t pid, uint64_t addr, char *str, int nbytes) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD char name[PATH_MAX], objname[PATH_MAX], c[PATH_MAX * 2]; struct ps_prochandle *P = NULL; GElf_Sym sym; @@ -965,8 +963,13 @@ dt_proc_lock(dtp, P); +#if defined(sun) if (Plookup_by_addr(P, addr, name, sizeof (name), &sym) == 0) { (void) Pobjname(P, addr, objname, sizeof (objname)); +#else + if (proc_addr2sym(P, addr, name, sizeof (name), &sym) == 0) { + (void) proc_objname(P, addr, objname, sizeof (objname)); +#endif obj = dt_basename(objname); @@ -976,7 +979,11 @@ } else { (void) snprintf(c, sizeof (c), "%s`%s", obj, name); } +#if defined(sun) } else if (Pobjname(P, addr, objname, sizeof (objname)) != 0) { +#else + } else if (proc_objname(P, addr, objname, sizeof (objname)) != 0) { +#endif (void) snprintf(c, sizeof (c), "%s`0x%llx", dt_basename(objname), addr); } else { @@ -987,7 +994,4 @@ dt_proc_release(dtp, P); return (dt_string2str(c, str, nbytes)); -#else -return 0; -#endif } From owner-p4-projects@FreeBSD.ORG Sat Feb 9 09:35:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6DC5B16A421; Sat, 9 Feb 2008 09:35:48 +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 19E7E16A418 for ; Sat, 9 Feb 2008 09:35:48 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0DF2713C502 for ; Sat, 9 Feb 2008 09:35:48 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m199Zl1B095508 for ; Sat, 9 Feb 2008 09:35:47 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m199Zlil095505 for perforce@freebsd.org; Sat, 9 Feb 2008 09:35:47 GMT (envelope-from jb@freebsd.org) Date: Sat, 9 Feb 2008 09:35:47 GMT Message-Id: <200802090935.m199Zlil095505@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135099 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 09:35:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=135099 Change 135099 by jb@jb_freebsd1 on 2008/02/09 09:34:53 In the great tradition of the undocumented clone_create() interface, if you pass a pointer to an uninitialised variable, you can get a panic "foo". Yes, "foo". This didn't happen on amd64, but it seems to happen all the time on i386. A closer inspection of the code in sys/kern/kern_conf.c shows that the variable should have been set to -1. Sigh. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_clone.c#9 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_clone.c#9 (text+ko) ==== @@ -32,7 +32,7 @@ static void dtrace_clone(void *arg, struct ucred *cred, char *name, int namelen, struct cdev **dev) { - int u; + int u = -1; size_t len; if (*dev != NULL) From owner-p4-projects@FreeBSD.ORG Sat Feb 9 17:08:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9841F16A46C; Sat, 9 Feb 2008 17:08: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 4261816A468 for ; Sat, 9 Feb 2008 17:08:42 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3008513C44B for ; Sat, 9 Feb 2008 17:08:42 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m19H8gSD062302 for ; Sat, 9 Feb 2008 17:08:42 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m19H8fs9062299 for perforce@freebsd.org; Sat, 9 Feb 2008 17:08:41 GMT (envelope-from sam@freebsd.org) Date: Sat, 9 Feb 2008 17:08:41 GMT Message-Id: <200802091708.m19H8fs9062299@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135115 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 17:08:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=135115 Change 135115 by sam@sam_ebb on 2008/02/09 17:08:05 bump copyright dates Affected files ... .. //depot/projects/vap/sys/net80211/_ieee80211.h#9 edit .. //depot/projects/vap/sys/net80211/ieee80211.c#22 edit .. //depot/projects/vap/sys/net80211/ieee80211.h#7 edit .. //depot/projects/vap/sys/net80211/ieee80211_acl.c#9 edit .. //depot/projects/vap/sys/net80211/ieee80211_adhoc.c#6 edit .. //depot/projects/vap/sys/net80211/ieee80211_adhoc.h#2 edit .. //depot/projects/vap/sys/net80211/ieee80211_crypto.c#10 edit .. //depot/projects/vap/sys/net80211/ieee80211_crypto.h#10 edit .. //depot/projects/vap/sys/net80211/ieee80211_crypto_ccmp.c#10 edit .. //depot/projects/vap/sys/net80211/ieee80211_crypto_none.c#11 edit .. //depot/projects/vap/sys/net80211/ieee80211_crypto_tkip.c#10 edit .. //depot/projects/vap/sys/net80211/ieee80211_crypto_wep.c#10 edit .. //depot/projects/vap/sys/net80211/ieee80211_ddb.c#5 edit .. //depot/projects/vap/sys/net80211/ieee80211_dfs.c#4 edit .. //depot/projects/vap/sys/net80211/ieee80211_dfs.h#2 edit .. //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#20 edit .. //depot/projects/vap/sys/net80211/ieee80211_freebsd.h#17 edit .. //depot/projects/vap/sys/net80211/ieee80211_hostap.c#11 edit .. //depot/projects/vap/sys/net80211/ieee80211_hostap.h#2 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#12 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.h#8 edit .. //depot/projects/vap/sys/net80211/ieee80211_input.c#27 edit .. //depot/projects/vap/sys/net80211/ieee80211_input.h#3 edit .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#26 edit .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.h#11 edit .. //depot/projects/vap/sys/net80211/ieee80211_monitor.c#3 edit .. //depot/projects/vap/sys/net80211/ieee80211_monitor.h#2 edit .. //depot/projects/vap/sys/net80211/ieee80211_node.c#26 edit .. //depot/projects/vap/sys/net80211/ieee80211_node.h#17 edit .. //depot/projects/vap/sys/net80211/ieee80211_output.c#29 edit .. //depot/projects/vap/sys/net80211/ieee80211_phy.c#3 edit .. //depot/projects/vap/sys/net80211/ieee80211_phy.h#3 edit .. //depot/projects/vap/sys/net80211/ieee80211_power.c#9 edit .. //depot/projects/vap/sys/net80211/ieee80211_power.h#4 edit .. //depot/projects/vap/sys/net80211/ieee80211_proto.c#20 edit .. //depot/projects/vap/sys/net80211/ieee80211_proto.h#13 edit .. //depot/projects/vap/sys/net80211/ieee80211_regdomain.c#6 edit .. //depot/projects/vap/sys/net80211/ieee80211_regdomain.h#3 edit .. //depot/projects/vap/sys/net80211/ieee80211_scan.c#15 edit .. //depot/projects/vap/sys/net80211/ieee80211_scan.h#11 edit .. //depot/projects/vap/sys/net80211/ieee80211_scan_sta.c#17 edit .. //depot/projects/vap/sys/net80211/ieee80211_sta.c#4 edit .. //depot/projects/vap/sys/net80211/ieee80211_sta.h#2 edit .. //depot/projects/vap/sys/net80211/ieee80211_var.h#26 edit .. //depot/projects/vap/sys/net80211/ieee80211_wds.c#6 edit .. //depot/projects/vap/sys/net80211/ieee80211_wds.h#2 edit .. //depot/projects/vap/sys/net80211/ieee80211_xauth.c#9 edit Differences ... ==== //depot/projects/vap/sys/net80211/_ieee80211.h#9 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211.c#22 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211.h#7 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_acl.c#9 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2004-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_adhoc.c#6 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_adhoc.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_crypto.c#10 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_crypto.h#10 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_crypto_ccmp.c#10 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_crypto_none.c#11 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_crypto_tkip.c#10 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_crypto_wep.c#10 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_ddb.c#5 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_dfs.c#4 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_dfs.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#20 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2003-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.h#17 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2003-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_hostap.c#11 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_hostap.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#12 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_ht.h#8 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_input.c#27 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_input.h#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#26 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.h#11 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_monitor.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_monitor.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_node.c#26 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_node.h#17 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#29 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_phy.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007,2008 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_phy.h#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007,2008 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_power.c#9 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_power.h#4 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_proto.c#20 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_proto.h#13 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_regdomain.c#6 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2005-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_regdomain.h#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2005-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_scan.c#15 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_scan.h#11 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2005-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_scan_sta.c#17 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_sta.c#4 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_sta.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_var.h#26 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_wds.c#6 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_wds.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/net80211/ieee80211_xauth.c#9 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2004 Video54 Technologies, Inc. - * Copyright (c) 2004-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2004-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-p4-projects@FreeBSD.ORG Sat Feb 9 20:01:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 31D0916A46D; Sat, 9 Feb 2008 20:01:43 +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 D264D16A46B for ; Sat, 9 Feb 2008 20:01:42 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C42D713C45A for ; Sat, 9 Feb 2008 20:01:42 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m19K1gtD080727 for ; Sat, 9 Feb 2008 20:01:42 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m19K1fie080724 for perforce@freebsd.org; Sat, 9 Feb 2008 20:01:41 GMT (envelope-from cognet@freebsd.org) Date: Sat, 9 Feb 2008 20:01:41 GMT Message-Id: <200802092001.m19K1fie080724@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 135117 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 20:01:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=135117 Change 135117 by cognet@cognet-mips on 2008/02/09 20:00:41 Remove the Octeon specific hack to enable interrupts in nexus_setup_intr(), it doesn't help that much. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/nexus.c#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/nexus.c#5 (text+ko) ==== @@ -183,15 +183,7 @@ cpu_establish_hardintr(device_get_nameunit(child), filt, intr, arg, irq, flags, cookiep); -#ifdef TARGET_OCTEON -#ifdef OCTEON_SMP - mp_intr_enable(); -#else - intr_enable(); -#endif -#else intr_restore(sr); -#endif return (0); } From owner-p4-projects@FreeBSD.ORG Sat Feb 9 20:32:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B219D16A421; Sat, 9 Feb 2008 20:32: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 5E63E16A41A for ; Sat, 9 Feb 2008 20:32:15 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4FF8113C45B for ; Sat, 9 Feb 2008 20:32:15 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m19KWF2L083876 for ; Sat, 9 Feb 2008 20:32:15 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m19KWFBQ083873 for perforce@freebsd.org; Sat, 9 Feb 2008 20:32:15 GMT (envelope-from thioretic@FreeBSD.org) Date: Sat, 9 Feb 2008 20:32:15 GMT Message-Id: <200802092032.m19KWFBQ083873@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 135119 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 20:32:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=135119 Change 135119 by thioretic@thioretic on 2008/02/09 20:31:45 Some cleanups basically. Affected files ... .. //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#9 edit .. //depot/projects/soc2007/thioretic_gidl2/sys/bus.h#9 edit Differences ... ==== //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#9 (text+ko) ==== @@ -11,6 +11,8 @@ #include #include #include +#include + static MALLOC_DEFINE(M_BUS_IO, "bus_io", "Bus io subsystem data structures"); @@ -42,13 +44,13 @@ #define IORF_TODESTROY 1<<3 u_int32_t flags; ior_link_list_t parents; - /*ior_link_list_t*/ int children; + int children; device_t origin; devicelink_list_t path; devicelink_t curdev; int queue_id; - struct mtx guard_spin_mtx; + struct mtx guard_mtx; TAILQ_ENTRY (ior) link; }; @@ -70,9 +72,6 @@ struct mtx guard_mtx; }; -#define IOR_QUEUES_NUM 1 -#define IOR_QUEUE_DEF 0 - static ior_queue ior_queues[IOR_QUEUES_NUM]; static struct mtx iors_list_mtx; @@ -238,46 +237,43 @@ ior_t ior_create (device_t origin, int type, void* data, - ior_t* parents, int pcount, char* path, int enqueue, int queue_id){ + ior_t* parents, int pcount, char* path, + int enqueue, int queue_id){ ior_t new_ior; - ior_link_t il, il2, cil, *ils; - int i = 0, error = 0, path_len; - device_t *dev_path; - devicelink_t dl; + ior_link_t pil, pils; + int i, error = 0; - new_ior = malloc (sizeof (struct ior), M_BUS_IO, M_NOWAIT|M_ZERO); + new_ior = malloc (sizeof (struct ior) + sizeof(struct ior_link) * pcount, + M_BUS_IO, M_NOWAIT|M_ZERO); if (!new_ior) return (NULL); - ils = malloc (sizeof(struct ior_link) * pcount /* * 2*/, M_BUS_IO, //REMOVE COMMENTS on type(ior->children) == ior_link_list_t - M_NOWAIT|M_ZERO); - if (!ils){ - free (new_ior); - return (NULL); - } + pils = (ior_link_t)((char *) new_ior + sizeof (struct ior)); mtx_init (&new_ior->guard_spin_mtx, - "ior_mtx", NULL, MTX_SPIN|MTX_RECURSE); - + "ior_mtx", NULL, MTX_DEF|MTX_RECURSE); + + TAILQ_INIT (&r->path); if (error = ior_set_path (new_ior, origin, path)){ - free (new_ior); free (ils); + free (new_ior); return (NULL); } new_ior->type = type; new_ior->data = data; + new_ior->state = IORS_NONE; + new_ior->flags = 0; + + TAILQ_INIT (&new_ior->parents); for (i = 0; i < pcount; i++){ - il = ils++; - il->iorp = parents[i]; - TAILQ_INSERT_TAIL (&new_ior->parents, il, link); - + pil = pils++; + pil->iorp = parents[i]; + TAILQ_INSERT_TAIL (&new_ior->parents, pil, link); parents[i]->children++; -/* il = ils++; - il->iorp = new_ior; - TAILQ_INSERT_TAIL (&(parents[i])->children, il, link); -*/ //REMOVE COMMENTS on type(ior->children) == ior_link_list_t } - new_ior->origin = origin; + + new_ior->children = 0; + new_ior->origin = new_ior->curdev = origin; if (enqueue){ ior_enqueue_adv (new_ior, queue_id); @@ -289,33 +285,55 @@ static void ior_destroy_async (ior_t r){ - devicelink_t dl; + ior_link_t il; - while (dl = TAILQ_FIRST (&r->path)){ - TAILQ_REMOVE (&r->path, dl, link); + ior_set_path (r, r->origin, NULL); + + while (!TAILQ_EMPTY (&r->parents)){ + il = TAILQ_FIRST (&r->parents); + il->iorp->children--; + TAILQ_REMOVE (&r->parents, il, link); } + mtx_destroy (r->guard_spin_mtx); free (r); } int ior_destroy (ior_t r){ - if (!TAILQ_EMPTY (&new_ior->parents)) + devicelink_t dev; + + if (r->children) return (0); - if (ior_get_state (r) == IORS_NONE){ - ior_destroy_async (r); - } else { - ior_set_flags (r, ior_get_flags (r) | IORF_TODESTROY); + + ior_add_flags (r, IORF_TODESTROY); + + ior_lock (r); + + while (dev = TAILQ_NEXT(r->curdev)){ + TAILQ_REMOVE (&r->path, dev, link); } + + ior_unlock (r); + return (1); } -void +int +ior_abort (ior_t r, u_int32_t flags){ + if (ior_destroy (r)){ + ior_add_flags (r, flags); + return (1); + } + return (0); +} + +static void ior_set_state (ior_t r, u_int32_t val){ r->state = val; } -u_int32_t +static u_int32_t ior_get_state (ior_t r){ return (r->state); } @@ -324,6 +342,10 @@ ior_set_flags (ior_t r, u_int32_t val){ r->flags = val; } +void +ior_add_flag (ior_t r, u_int32_t val){ + r->flags |= val; +} u_int32_t ior_get_flags (ior_t r){ @@ -333,31 +355,36 @@ int ior_set_path (ior_t r, device_t origin, char* path){ int i = 0, error = 0, path_len; - device_t *dev_path; + device_t *dev_path = NULL; devicelink_t dl; + devicelink_t ddl = NULL; - if (error = resolve_path (origin, path, &dev_path, &path_len)){ + if (path && error = resolve_path (origin, path, &dev_path, &path_len) && + (dl = malloc (sizeof (struct devicelink) * path_len, M_BUS_IO, + M_NOWAIT|M_ZERO) || (free (dev_path), error = ENOMEM, 1))){ return (error); } - dl = malloc (sizeof (struct devicelink) * path_len, M_BUS_IO, - M_NOWAIT|M_ZERO); - if (!dl) { - free (dev_path); - return (ENOMEM); + ior_lock (r); + + if (!TAILQ_EMPTY(&r->path)){ + ddl = TAILQ_LAST (&r->path, devicelink_list); + TAILQ_REMOVE (&r->path, ddl, link); } + if (ddl) + free (ddl); - mtx_lock_spin (&r->guard_spin_mtx); - - for (i = 0; i < path_len; i++){ - dl->device_ptr = dev_path[i]; - TAILQ_INSERT_TAIL (&r->path, dl, link); - dl++; + if (dev_path){ + for (i = 0; i < path_len; i++){ + dl->device_ptr = dev_path[i]; + TAILQ_INSERT_TAIL (&r->path, dl, link); + dl++; + } + free (dev_path); } - mtx_unlock_spin (&r->guard_spin_mtx); + ior_unlock (r); - free (dev_path); return (0); } @@ -366,7 +393,7 @@ int i = 0; devicelink_t dl; - mtx_lock (&r->guard_mtx); + ior_lock (r); TAILQ_FOREACH (dl, &r->path, link){ (*path_len)++; @@ -376,7 +403,7 @@ M_NOWAIT|M_ZERO); if (!(*dev_path)){ - mtx_unlock (&r->guard_mtx); + ior_unlock (r); return (ENOMEM); } @@ -384,12 +411,12 @@ (*dev_path)[i++] = dl->device_ptr; } - mtx_unlock (&r->path); + ior_unlock (r); return (0); } -void //static for now +void ior_enqueue_adv (ior_t r, int queue_id){ ior_queue q = ior_queues[queue_id]; @@ -455,12 +482,12 @@ static void ior_lock (ior_t r){ - mtx_lock_spin (&r->guard_spin_mtx); + mtx_lock (&r->guard_mtx); } static void ior_unlock (ior_t r){ - mtx_unlock_spin (&r->guard_spin_mtx); + mtx_unlock (&r->guard_mtx); } static void @@ -468,23 +495,16 @@ devicelink_t nextdev; while (1){ - ior_lock (r); nextdev = TAILQ_NEXT(r->curdev, link); if (!nextdev){ ior_set_flags (r, IORF_INVALIDATE); } - ior_unlock (r); - if (ior_get_flags(r) >= IORF_DONE) - break; - r->curdev = nextdev; IOR_DO (r->curdev->device_ptr, r); - if (ior_get_flags(r) & IORF_TODESTOY){ - ior_destroy_async (r); - return; - } + if (ior_get_state(r) == IORS_NONE) + return(); if ((nextdev = TAILQ_NEXT(r->curdev, link)) && (device_get_flags(nextdev->device_ptr) & DF_ENQUEUEIORS)) @@ -498,16 +518,12 @@ devicelink_t nextdev; while (1){ - ior_lock (r); - nextdev = TAILQ_NEXT(r->curdev, link); + nextdev = TAILQ_PREV(r->curdev, devicelink_list, link); if (!nextdev){ - ior_set_flags (r, IORF_INVALIDATE); + ior_destroy_async (r); + return(); } - ior_unlock (r); - if (ior_get_flags(r) >= IORF_DONE) - break; - r->curdev = nextdev; IOR_DONE (r->curdev->device_ptr, r); @@ -516,7 +532,7 @@ return; } - if ((nextdev = TAILQ_NEXT(r->curdev, link)) && + if ((nextdev = TAILQ_PREV(r->curdev, devicelink_list, link)) && (device_get_flags(nextdev->device_ptr) & DF_ENQUEUEIORS)) break; } ==== //depot/projects/soc2007/thioretic_gidl2/sys/bus.h#9 (text+ko) ==== @@ -753,9 +753,8 @@ ior_t *parents, int pcount, char* path, int enqueue, int queue_id); int ior_destroy (ior_t r); -void ior_set_state (ior_t r, u_int32_t val); -u_int32_t ior_get_state (ior_t r); void ior_set_flags (ior_t r, u_int32_t val); +void ior_add_flags (ior_t r, u_int32_t val); u_int32_t ior_get_flags (ior_t r); int ior_set_path (ior_t r, device_t origin, char* path); int ior_get_path (ior_t r, device_t** dev_path, int* path_len); From owner-p4-projects@FreeBSD.ORG Sat Feb 9 21:18:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C68F816A41A; Sat, 9 Feb 2008 21:18:02 +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 8B55116A417 for ; Sat, 9 Feb 2008 21:18:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7D47A13C44B for ; Sat, 9 Feb 2008 21:18:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m19LI2A9096550 for ; Sat, 9 Feb 2008 21:18:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m19LI2OY096547 for perforce@freebsd.org; Sat, 9 Feb 2008 21:18:02 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 9 Feb 2008 21:18:02 GMT Message-Id: <200802092118.m19LI2OY096547@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135120 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 21:18:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=135120 Change 135120 by hselasky@hselasky_laptop001 on 2008/02/09 21:17:58 BUS-DMA fix for NetBSD. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_subr.c#94 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.c#94 (text+ko) ==== @@ -2725,8 +2725,8 @@ &ptr, BUS_DMA_WAITOK | BUS_DMA_COHERENT)) { goto done_3; } - if (bus_dmamap_create(tag, size, utag->n_seg, USB_PAGE_SIZE, - 0, BUS_DMA_WAITOK, &map)) { + if (bus_dmamap_create(tag, size, utag->n_seg, (align == 1) ? + USB_PAGE_SIZE : size, 0, BUS_DMA_WAITOK, &map)) { goto done_2; } if (bus_dmamap_load(tag, map, ptr, size, NULL, From owner-p4-projects@FreeBSD.ORG Sat Feb 9 21:26:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 40A7C16A46B; Sat, 9 Feb 2008 21:26:11 +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 054FD16A420 for ; Sat, 9 Feb 2008 21:26:11 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EBDA013C474 for ; Sat, 9 Feb 2008 21:26:10 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m19LQAEp097438 for ; Sat, 9 Feb 2008 21:26:10 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m19LQA9r097435 for perforce@freebsd.org; Sat, 9 Feb 2008 21:26:10 GMT (envelope-from jb@freebsd.org) Date: Sat, 9 Feb 2008 21:26:10 GMT Message-Id: <200802092126.m19LQA9r097435@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135121 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 21:26:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=135121 Change 135121 by jb@jb_freebsd1 on 2008/02/09 21:25:41 Change a comment to reflect the fact that the Statically Defined Tracing (sdt) implementation for FreeBSD doesn't use breakpoints. Affected files ... .. //depot/projects/dtrace/src/sys/amd64/amd64/exception.S#9 edit Differences ... ==== //depot/projects/dtrace/src/sys/amd64/amd64/exception.S#9 (text+ko) ==== @@ -188,10 +188,10 @@ FAKE_MCOUNT(TF_RIP(%rsp)) #ifdef KDTRACE_HOOKS /* - * DTrace Function Boundary Trace (fbt) and Statically Defined - * Trace (sdt) probes are triggered by int3 (0xcc) which causes - * the #BP (T_BPTFLT) breakpoint interrupt. For all other trap - * types, just handle them in the usual way. + * DTrace Function Boundary Trace (fbt) probes are triggered + * by int3 (0xcc) which causes the #BP (T_BPTFLT) breakpoint + * interrupt. For all other trap types, just handle them in + * the usual way. */ cmpq $T_BPTFLT,TF_TRAPNO(%rsp) jne calltrap From owner-p4-projects@FreeBSD.ORG Sat Feb 9 23:01:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 38B2F16A41A; Sat, 9 Feb 2008 23:01:53 +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 D9BFA16A418 for ; Sat, 9 Feb 2008 23:01:52 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CB7FF13C461 for ; Sat, 9 Feb 2008 23:01:52 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m19N1qT7005564 for ; Sat, 9 Feb 2008 23:01:52 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m19N1qFZ005561 for perforce@freebsd.org; Sat, 9 Feb 2008 23:01:52 GMT (envelope-from sam@freebsd.org) Date: Sat, 9 Feb 2008 23:01:52 GMT Message-Id: <200802092301.m19N1qFZ005561@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135128 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 23:01:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=135128 Change 135128 by sam@sam_ebb on 2008/02/09 23:01:20 o move policy that determines when to enable ampdu to a new ic_ampdu_enable method so drivers can override (e.g. to incorporate rate control/link condition state) o pre-calculate the time to retry addba request and allow drivers to override the default setting Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ddb.c#6 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#13 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.h#9 edit .. //depot/projects/vap/sys/net80211/ieee80211_output.c#30 edit .. //depot/projects/vap/sys/net80211/ieee80211_var.h#27 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ddb.c#6 (text+ko) ==== @@ -215,8 +215,8 @@ db_printf("%s token %u qbytes %d qframes %d seqstart %u start %u wnd %u\n", sep, tap->txa_token, tap->txa_qbytes, tap->txa_qframes, tap->txa_seqstart, tap->txa_start, tap->txa_wnd); - db_printf("%s attempts %d lastrequest %d\n", - sep, tap->txa_attempts, tap->txa_lastrequest); + db_printf("%s attempts %d nextrequest %d\n", + sep, tap->txa_attempts, tap->txa_nextrequest); /* XXX packet q + timer */ } ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#13 (text+ko) ==== @@ -105,6 +105,8 @@ } SYSINIT(wlan_ht, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_ht_setup, NULL); +static int ieee80211_ampdu_enable(struct ieee80211_node *ni, + struct ieee80211_tx_ampdu *tap); static int ieee80211_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, int dialogtoken, int baparamset, int batimeout); @@ -122,6 +124,7 @@ /* setup default aggregation policy */ ic->ic_recv_action = ieee80211_aggr_recv_action; ic->ic_send_action = ieee80211_send_action; + ic->ic_ampdu_enable = ieee80211_ampdu_enable; ic->ic_addba_request = ieee80211_addba_request; ic->ic_addba_response = ieee80211_addba_response; ic->ic_addba_stop = ieee80211_addba_stop; @@ -1244,7 +1247,7 @@ callout_reset(&tap->txa_timer, ieee80211_addba_timeout, addba_timeout, tap); tap->txa_flags |= IEEE80211_AGGR_XCHGPEND; - tap->txa_lastrequest = ticks; + tap->txa_nextrequest = ticks + ieee80211_addba_timeout; } static void @@ -1535,6 +1538,39 @@ */ /* + * Check if A-MPDU should be requested/enabled for a stream. + * We require a traffic rate above a per-AC threshold and we + * also handle backoff from previous failed attempts. + * + * Drivers may override this method to bring in information + * such as link state conditions in making the decision. + */ +static int +ieee80211_ampdu_enable(struct ieee80211_node *ni, + struct ieee80211_tx_ampdu *tap) +{ + struct ieee80211vap *vap = ni->ni_vap; + + if (tap->txa_avgpps < vap->iv_ampdu_mintraffic[tap->txa_ac]) + return 0; + /* XXX check rssi? */ + if (tap->txa_attempts >= ieee80211_addba_maxtries && + ticks < tap->txa_nextrequest) { + /* + * Don't retry too often; txa_nextrequest is set + * to the minimum interval we'll retry after + * ieee80211_addba_maxtries failed attempts are made. + */ + return 0; + } + IEEE80211_NOTE(vap, IEEE80211_MSG_11N, ni, + "%s: enable AMPDU on %s, avgpps %d pkts %d", + __func__, ieee80211_wme_acnames[tap->txa_ac], + tap->txa_avgpps, tap->txa_pkts); + return 1; +} + +/* * Request A-MPDU tx aggregation. Setup local state and * issue an ADDBA request. BA use will only happen after * the other end replies with ADDBA response. @@ -1555,24 +1591,9 @@ callout_init(&tap->txa_timer, CALLOUT_MPSAFE); tap->txa_flags |= IEEE80211_AGGR_SETUP; } - if (tap->txa_attempts >= ieee80211_addba_maxtries && - (ticks - tap->txa_lastrequest) < ieee80211_addba_backoff) { - /* - * Don't retry too often; ieee80211_addba_backoff - * defines the minimum interval we'll retry after - * ieee80211_addba_maxtries failed attempts to - * negotiate use. - */ - return 0; - } /* XXX hack for not doing proper locking */ tap->txa_flags &= ~IEEE80211_AGGR_NAK; - IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, - "%s: enable AMPDU on %s, avgpps %d pkts %d", - __func__, ieee80211_wme_acnames[tap->txa_ac], - tap->txa_avgpps, tap->txa_pkts); - dialogtoken = (tokens+1) % 63; /* XXX */ tid = WME_AC_TO_TID(tap->txa_ac); @@ -1593,7 +1614,9 @@ __func__, tap->txa_ac); /* defer next try so we don't slam the driver with requests */ tap->txa_attempts = ieee80211_addba_maxtries; - tap->txa_lastrequest = ticks; + /* NB: check in case driver wants to override */ + if (tap->txa_nextrequest <= ticks) + tap->txa_nextrequest = ticks + ieee80211_addba_backoff; return 0; } tokens = dialogtoken; /* allocate token */ ==== //depot/projects/vap/sys/net80211/ieee80211_ht.h#9 (text+ko) ==== @@ -54,8 +54,8 @@ ieee80211_seq txa_seqstart; ieee80211_seq txa_start; uint16_t txa_wnd; /* BA window size */ - uint8_t txa_attempts; /* # setup attempts */ - int txa_lastrequest;/* time of last ADDBA request */ + uint8_t txa_attempts; /* # ADDBA requests w/o a response */ + int txa_nextrequest;/* soonest to make next ADDBA request */ struct ifqueue txa_q; /* packet queue */ struct callout txa_timer; void *txa_private; /* driver-private storage */ ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#30 (text+ko) ==== @@ -1013,14 +1013,14 @@ /* * Check if A-MPDU tx aggregation is setup or if we * should try to enable it. The sta must be associated - * with HT and A-MPDU enabled for use. When traffic - * passes a threshold we issue an ADDBA request and - * wait for a reply. The frame being encapsulated - * will go out w/o using A-MPDU, or possibly it might - * be collected by the driver and held/retransmit. - * ieee80211_ampdu_request handles staggering requests - * in case the receiver NAK's us or we are otherwise - * unable to establish a BA stream. + * with HT and A-MPDU enabled for use. When the policy + * routine decides we should enable A-MPDU we issue an + * ADDBA request and wait for a reply. The frame being + * encapsulated will go out w/o using A-MPDU, or possibly + * it might be collected by the driver and held/retransmit. + * The default ic_ampdu_enable routine handles staggering + * ADDBA requests in case the receiver NAK's us or we are + * otherwise unable to establish a BA stream. */ if ((ni->ni_flags & IEEE80211_NODE_AMPDU_TX) && (vap->iv_flags_ext & IEEE80211_FEXT_AMPDU_TX)) { @@ -1033,7 +1033,7 @@ */ qos[0] |= IEEE80211_QOS_ACKPOLICY_BA; } else if (!IEEE80211_AMPDU_REQUESTED(tap) && - tap->txa_avgpps >= vap->iv_ampdu_mintraffic[tap->txa_ac]) { + ic->ic_ampdu_enable(ni, tap)) { /* * Not negotiated yet, request service. */ ==== //depot/projects/vap/sys/net80211/ieee80211_var.h#27 (text+ko) ==== @@ -249,6 +249,9 @@ int (*ic_send_action)(struct ieee80211_node *, int category, int action, uint16_t args[4]); + /* check if A-MPDU should be enabled this station+ac */ + int (*ic_ampdu_enable)(struct ieee80211_node *, + struct ieee80211_tx_ampdu *); /* start/stop doing A-MPDU tx aggregation for a station */ int (*ic_addba_request)(struct ieee80211_node *, struct ieee80211_tx_ampdu *, From owner-p4-projects@FreeBSD.ORG Sat Feb 9 23:51:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2675916A41B; Sat, 9 Feb 2008 23:51:45 +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 DF8E516A418 for ; Sat, 9 Feb 2008 23:51:44 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D09DC13C4D1 for ; Sat, 9 Feb 2008 23:51:44 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m19NpihH009545 for ; Sat, 9 Feb 2008 23:51:44 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m19NpiKI009542 for perforce@freebsd.org; Sat, 9 Feb 2008 23:51:44 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 9 Feb 2008 23:51:44 GMT Message-Id: <200802092351.m19NpiKI009542@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135131 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 23:51:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=135131 Change 135131 by kmacy@kmacy:storage:toehead on 2008/02/09 23:50:52 remove some dead code and substantially reduce debugging noise converting to KTR entries where appropriate Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/cxgb_l2t.c#5 edit .. //depot/projects/toehead/sys/dev/cxgb/cxgb_l2t.h#3 edit .. //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#8 edit .. //depot/projects/toehead/sys/dev/cxgb/cxgb_offload.c#7 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#18 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#19 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#9 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_listen.c#3 edit .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#9 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_l2t.c#5 (text+ko) ==== @@ -175,11 +175,8 @@ sin.sin_family = AF_INET; sin.sin_len = sizeof(struct sockaddr_in); sin.sin_addr.s_addr = e->addr; - - - - printf("send slow on rt=%p eaddr=0x%08x\n", rt, e->addr); - + + CTR2(KTR_CXGB, "send slow on rt=%p eaddr=0x%08x\n", rt, e->addr); again: switch (e->state) { case L2T_STATE_STALE: /* entry is stale, kick off revalidation */ @@ -199,8 +196,6 @@ } arpq_enqueue(e, m); mtx_unlock(&e->lock); - printf("enqueueing arp request\n"); - /* * Only the first packet added to the arpq should kick off * resolution. However, because the m_gethdr below can fail, @@ -209,10 +204,9 @@ * A better way would be to use a work request to retry L2T * entries when there's no memory. */ - printf("doing arpresolve on 0x%x \n", e->addr); if (arpresolve(rt->rt_ifp, rt, NULL, (struct sockaddr *)&sin, e->dmac) == 0) { - printf("mac=%x:%x:%x:%x:%x:%x\n", + CTR6(KTR_CXGB, "mac=%x:%x:%x:%x:%x:%x\n", e->dmac[0], e->dmac[1], e->dmac[2], e->dmac[3], e->dmac[4], e->dmac[5]); if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL) @@ -396,8 +390,6 @@ /* Need to allocate a new entry */ e = alloc_l2e(d); if (e) { - printf("initializing new entry\n"); - mtx_lock(&e->lock); /* avoid race with t3_l2t_free */ e->next = d->l2tab[hash].first; d->l2tab[hash].first = e; @@ -472,8 +464,6 @@ int hash = arp_hash(addr, ifidx, d); struct llinfo_arp *la; - printf("t3_l2t_update called with arp info\n"); - rw_rlock(&d->lock); for (e = d->l2tab[hash].first; e; e = e->next) if (e->addr == addr && e->ifindex == ifidx) { @@ -481,7 +471,7 @@ goto found; } rw_runlock(&d->lock); - printf("addr=0x%08x not found\n", addr); + CTR1(KTR_CXGB, "t3_l2t_update: addr=0x%08x not found", addr); return; found: ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_l2t.h#3 (text+ko) ==== @@ -143,8 +143,6 @@ if (__predict_true(e->state == L2T_STATE_VALID)) { return cxgb_ofld_send(dev, (struct mbuf *)m); } - printf("send slow\n"); - return t3_l2t_send_slow(dev, (struct mbuf *)m, e); } ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#8 (text+ko) ==== @@ -825,8 +825,6 @@ return (EINVAL); } sc->msix_irq_rid[k] = rid; - printf("setting up interrupt for port=%d\n", - qs->port->port_id); if (bus_setup_intr(sc->dev, sc->msix_irq_res[k], INTR_MPSAFE|INTR_TYPE_NET, #ifdef INTR_FILTERS @@ -1536,7 +1534,6 @@ t3_intr_enable(sc); if (!(sc->flags & QUEUES_BOUND)) { - printf("bind qsets\n"); bind_qsets(sc); sc->flags |= QUEUES_BOUND; } @@ -1601,7 +1598,7 @@ int adap_up = adapter->open_device_map & PORT_MASK; int err = 0; - printf("device_map=0x%x\n", adapter->open_device_map); + CTR1(KTR_CXGB, "device_map=0x%x", adapter->open_device_map); if (atomic_cmpset_int(&adapter->open_device_map, (adapter->open_device_map & ~(1<open_device_map | (1<port_id); ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_offload.c#7 (text+ko) ==== @@ -105,16 +105,12 @@ TAILQ_INSERT_TAIL(&client_list, client, client_entry); if (client->add) { - printf("client->add set\n"); - TAILQ_FOREACH(tdev, &ofld_dev_list, entry) { if (offload_activated(tdev)) { - printf("calling add=%p on %p\n", - client->add, tdev); - client->add(tdev); } else - printf("%p not activated\n", tdev); + CTR1(KTR_CXGB, + "cxgb_register_client: %p not activated\n", tdev); } } @@ -635,7 +631,7 @@ m = m_get(M_NOWAIT, MT_DATA); if (__predict_true(m != NULL)) { mk_tid_release(m, tid); - printf("sending tid release\n"); + CTR1(KTR_CXGB, "releasing tid=%u", tid); cxgb_ofld_send(tdev, m); t->tid_tab[tid].ctx = NULL; @@ -1302,7 +1298,7 @@ log(LOG_ERR, "Unable to set offload capabilities\n"); #endif } - printf("adding adapter %p\n", adapter); + CTR1(KTR_CXGB, "adding adapter %p", adapter); add_adapter(adapter); device_printf(adapter->dev, "offload started\n"); #if 0 ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#18 (text+ko) ==== @@ -3187,23 +3187,12 @@ newtoep->tp_toedev = tdev; tp->rcv_wnd = select_rcv_wnd(tdev, so); - printf("inserting tid=%d rcv_wnd=%ld\n", tid, tp->rcv_wnd); cxgb_insert_tid(cdev, d->client, newtoep, tid); SOCK_LOCK(so); LIST_INSERT_HEAD(&lctx->synq_head, newtoep, synq_entry); SOCK_UNLOCK(so); -#ifdef notyet - if (lctx->ulp_mode) { - ddp_mbuf = m_gethdr(M_NOWAIT, MT_DATA); - - if (!ddp_mbuf) - newtoep->tp_ulp_mode = 0; - else - newtoep->tp_ulp_mode = lctx->ulp_mode; - } -#else - newtoep->tp_ulp_mode = TOM_TUNABLE(tdev, ddp) && /* !sock_flag(sk, NO_DDP) && */ + newtoep->tp_ulp_mode = TOM_TUNABLE(tdev, ddp) && !(so->so_options & SO_NO_DDP) && tp->rcv_wnd >= MIN_DDP_RCV_WIN ? ULP_MODE_TCPDDP : 0; if (newtoep->tp_ulp_mode) { @@ -3213,15 +3202,9 @@ newtoep->tp_ulp_mode = 0; } - printf("ddp=%d rcv_wnd=%ld min_win=%d ulp_mode=%d\n", + CTR4(KTR_TOM, "ddp=%d rcv_wnd=%ld min_win=%d ulp_mode=%d\n", TOM_TUNABLE(tdev, ddp), tp->rcv_wnd, MIN_DDP_RCV_WIN, newtoep->tp_ulp_mode); - -#endif - set_arp_failure_handler(reply_mbuf, pass_accept_rpl_arp_failure); - - DPRINTF("adding request to syn cache\n"); - /* * XXX workaround for lack of syncache drop */ @@ -3237,11 +3220,9 @@ rpl->rsvd = rpl->opt2; /* workaround for HW bug */ rpl->peer_ip = req->peer_ip; // req->peer_ip is not overwritten - DPRINTF("accept smt_idx=%d\n", e->smt_idx); - rpl->opt0h = htonl(calc_opt0h(so, select_mss(td, NULL, dst->rt_ifp->if_mtu)) | V_L2T_IDX(e->idx) | V_TX_CHANNEL(e->smt_idx)); - rpl->opt0l_status = htonl(calc_opt0l(so, lctx->ulp_mode) | + rpl->opt0l_status = htonl(calc_opt0l(so, newtoep->tp_ulp_mode) | CPL_PASS_OPEN_ACCEPT); DPRINTF("opt0l_status=%08x\n", rpl->opt0l_status); ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#19 (text+ko) ==== @@ -878,7 +878,7 @@ p->kbuf_posted++; } else if (so_should_ddp(toep, copied) && !IS_NONBLOCKING(so)) { - printf("entering ddp\n"); + CTR1(KTR_TOM ,"entering ddp on tid=%u", toep->tp_tid); t3_enter_ddp(so, TOM_TUNABLE(TOE_DEV(so), ddp_copy_limit), 0); p->kbuf_posted = 1; ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#9 (text+ko) ==== @@ -406,20 +406,14 @@ if (p->get_tcb_count == 0) t3_cancel_ddpbuf(toep, p->cur_buf); else { - int err = 0, timeo, flags, count=0; - timeo = so->so_rcv.sb_timeo; - flags = so->so_rcv.sb_flags; - - so->so_rcv.sb_timeo = 30*hz; + int err = 0, count=0; while (p->get_tcb_count && !(so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED))) { - if (count & 0xffffff) + if (count & 0xffff) CTR4(KTR_TCB, "waiting err=%d get_tcb_count=%d timeo=%d so=%p\n", err, p->get_tcb_count, so->so_rcv.sb_timeo, so); count++; err = sbwait(&so->so_rcv); } - so->so_rcv.sb_timeo = timeo; - so->so_rcv.sb_flags = flags; } ubuf_pending = t3_ddp_ubuf_pending(toep); ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_listen.c#3 (text+ko) ==== @@ -244,8 +244,7 @@ if (!TOM_TUNABLE(dev, activated)) return; - printf("start listen\n"); - + CTR1(KTR_TOM, "start listen on port %u", ntohs(inp->inp_lport)); ctx = malloc(sizeof(*ctx), M_CXGB, M_NOWAIT|M_ZERO); if (!ctx) ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#9 (text+ko) ==== @@ -179,8 +179,6 @@ static void t3cdev_add(struct tom_data *t) { - printf("t3cdev_add\n"); - mtx_lock(&cxgb_list_lock); TAILQ_INSERT_TAIL(&cxgb_list, t, entry); mtx_unlock(&cxgb_list_lock); @@ -201,7 +199,6 @@ struct adap_ports *port_info; t = malloc(sizeof(*t), M_CXGB, M_NOWAIT|M_ZERO); - if (t == NULL) return; @@ -231,13 +228,11 @@ } TOM_DATA(tdev) = t; - printf("nports=%d\n", port_info->nports); for (i = 0; i < port_info->nports; i++) { struct ifnet *ifp = port_info->lldevs[i]; TOEDEV(ifp) = tdev; - printf("enabling toe on %p\n", ifp); - + CTR1(KTR_TOM, "enabling toe on %p", ifp); ifp->if_capabilities |= IFCAP_TOE4; ifp->if_capenable |= IFCAP_TOE4; } @@ -346,11 +341,7 @@ #endif t3_init_tunables(t); mtx_init(&t->listen_lock, "tom data listeners", NULL, MTX_DEF); - - - printf("KTR_TOM=0x%x ktr_mask=0x%x KTR_COMPILE=0x%x doing test KTR entry now\n", KTR_TOM, ktr_mask, KTR_COMPILE); CTR2(KTR_TOM, "t3_toe_attach dev=%p entry=%p", dev, entry); - /* Adjust TOE activation for this module */ t->conf.activated = activated; @@ -407,11 +398,8 @@ mtx_lock(&cxgb_list_lock); TAILQ_FOREACH(p, &cxgb_list, entry) { - if (tp->t_state == TCPS_LISTEN) { - printf("stopping listen on port=%d\n", - ntohs(tp->t_inpcb->inp_lport)); + if (tp->t_state == TCPS_LISTEN) t3_listen_stop(&p->tdev, so, p->cdev); - } } mtx_unlock(&cxgb_list_lock); } @@ -432,13 +420,9 @@ INP_INFO_RUNLOCK(&tcbinfo); } - - static int t3_tom_init(void) { - - init_cpl_handlers(); if (t3_init_cpl_io() < 0) return -1; @@ -462,7 +446,6 @@ TAILQ_INIT(&cxgb_list); /* Register to offloading devices */ - printf("setting add to %p\n", t3c_tom_add); t3c_tom_client.add = t3c_tom_add; cxgb_register_client(&t3c_tom_client); cxgb_register_listeners(); @@ -476,8 +459,6 @@ switch (cmd) { case MOD_LOAD: - printf("wheeeeee ...\n"); - t3_tom_init(); break; case MOD_QUIESCE: