Date: Thu, 9 Aug 2007 19:32:54 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 124973 for review Message-ID: <200708091932.l79JWsUH088475@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124973 Change 124973 by bz@bz_dopt_ah on 2007/08/09 19:32:03 IFC @124959 Affected files ... .. //depot/projects/fast_ipsec/src/sys/arm/arm/cpufunc.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/arm/arm/genassym.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/arm/arm/swtch.S#4 integrate .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/libat91/Makefile#5 integrate .. //depot/projects/fast_ipsec/src/sys/compat/linux/linux_socket.c#10 integrate .. //depot/projects/fast_ipsec/src/sys/conf/NOTES#15 integrate .. //depot/projects/fast_ipsec/src/sys/conf/files#20 integrate .. //depot/projects/fast_ipsec/src/sys/conf/kern.pre.mk#9 integrate .. //depot/projects/fast_ipsec/src/sys/conf/options#18 integrate .. //depot/projects/fast_ipsec/src/sys/dev/adlink/adlink.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/dev/an/if_an.c#8 integrate .. //depot/projects/fast_ipsec/src/sys/dev/ath/if_ath.c#13 integrate .. //depot/projects/fast_ipsec/src/sys/dev/dc/if_dc.c#12 integrate .. //depot/projects/fast_ipsec/src/sys/dev/dc/if_dcreg.h#7 integrate .. //depot/projects/fast_ipsec/src/sys/dev/em/if_em.c#13 integrate .. //depot/projects/fast_ipsec/src/sys/dev/re/if_re.c#14 integrate .. //depot/projects/fast_ipsec/src/sys/dev/streams/streams.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/dev/usb/if_axe.c#10 integrate .. //depot/projects/fast_ipsec/src/sys/dev/usb/if_axereg.h#5 integrate .. //depot/projects/fast_ipsec/src/sys/dev/wi/if_wi.c#9 integrate .. //depot/projects/fast_ipsec/src/sys/fs/msdosfs/denode.h#5 integrate .. //depot/projects/fast_ipsec/src/sys/fs/msdosfs/msdosfs_conv.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/fs/msdosfs/msdosfs_denode.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/fs/msdosfs/msdosfs_fat.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/fs/msdosfs/msdosfs_fileno.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/fs/msdosfs/msdosfs_iconv.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/fs/msdosfs/msdosfs_lookup.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/fs/msdosfs/msdosfs_vfsops.c#9 integrate .. //depot/projects/fast_ipsec/src/sys/fs/msdosfs/msdosfs_vnops.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/ia64/ia64/clock.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/ia64/ia64/exception.S#3 integrate .. //depot/projects/fast_ipsec/src/sys/ia64/ia64/interrupt.c#7 integrate .. //depot/projects/fast_ipsec/src/sys/ia64/ia64/machdep.c#8 integrate .. //depot/projects/fast_ipsec/src/sys/ia64/ia64/mp_machdep.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/ia64/ia64/pmap.c#11 integrate .. //depot/projects/fast_ipsec/src/sys/ia64/include/ia64_cpu.h#3 integrate .. //depot/projects/fast_ipsec/src/sys/ia64/include/md_var.h#4 integrate .. //depot/projects/fast_ipsec/src/sys/kern/kern_descrip.c#10 integrate .. //depot/projects/fast_ipsec/src/sys/kern/kern_lockf.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/kern/kern_poll.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/kern/sys_socket.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/kern/uipc_domain.c#7 integrate .. //depot/projects/fast_ipsec/src/sys/kern/uipc_syscalls.c#13 integrate .. //depot/projects/fast_ipsec/src/sys/net/bpf.c#10 integrate .. //depot/projects/fast_ipsec/src/sys/net/bpfdesc.h#5 integrate .. //depot/projects/fast_ipsec/src/sys/net/bridgestp.c#8 integrate .. //depot/projects/fast_ipsec/src/sys/net/bridgestp.h#4 integrate .. //depot/projects/fast_ipsec/src/sys/net/netisr.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/netgraph/netflow/netflow.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/in_mcast.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/in_pcb.h#8 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/ip_divert.c#9 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/ip_dummynet.c#8 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/ip_fw2.c#12 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/ip_input.c#10 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/ip_ipsec.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/ip_ipsec.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/ip_mroute.c#9 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/sctp_constants.h#3 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/sctp_input.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/sctp_uio.h#3 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/sctp_usrreq.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/sctputil.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/netinet/tcp_syncache.c#9 integrate .. //depot/projects/fast_ipsec/src/sys/netinet6/ip6_ipsec.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/netinet6/ip6_ipsec.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/netipsec/xform_ah.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/netipsec/xform_esp.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/netipsec/xform_ipcomp.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/nfsclient/bootp_subr.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/nfsclient/krpc_subr.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/nfsclient/nfs_socket.c#13 integrate .. //depot/projects/fast_ipsec/src/sys/nfsclient/nfs_vfsops.c#11 integrate .. //depot/projects/fast_ipsec/src/sys/nfsserver/nfs_srvsock.c#9 integrate .. //depot/projects/fast_ipsec/src/sys/nfsserver/nfs_srvsubs.c#9 integrate .. //depot/projects/fast_ipsec/src/sys/nfsserver/nfs_syscalls.c#7 integrate .. //depot/projects/fast_ipsec/src/sys/pci/if_xl.c#8 integrate .. //depot/projects/fast_ipsec/src/sys/powerpc/include/interruptvar.h#2 delete .. //depot/projects/fast_ipsec/src/sys/powerpc/include/intr_machdep.h#4 integrate .. //depot/projects/fast_ipsec/src/sys/powerpc/include/trap.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/powerpc/powerpc/interrupt.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/powerpc/powerpc/intr_machdep.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/powerpc/powerpc/trap.c#7 integrate .. //depot/projects/fast_ipsec/src/sys/rpc/rpcclnt.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/security/mac/mac_syscalls.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/sparc64/include/iommureg.h#3 integrate .. //depot/projects/fast_ipsec/src/sys/sparc64/include/iommuvar.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/sparc64/pci/psycho.c#7 integrate .. //depot/projects/fast_ipsec/src/sys/sparc64/pci/psychoreg.h#5 integrate .. //depot/projects/fast_ipsec/src/sys/sparc64/sbus/sbus.c#7 integrate .. //depot/projects/fast_ipsec/src/sys/sparc64/sbus/sbusreg.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/sparc64/sparc64/iommu.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/sys/mutex.h#7 integrate .. //depot/projects/fast_ipsec/src/sys/vm/device_pager.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/vm/phys_pager.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/vm/swap_pager.c#10 integrate .. //depot/projects/fast_ipsec/src/sys/vm/vm_pager.c#3 integrate Differences ... ==== //depot/projects/fast_ipsec/src/sys/arm/arm/cpufunc.c#6 (text+ko) ==== @@ -45,7 +45,7 @@ * Created : 30/01/97 */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.17 2007/07/27 14:39:41 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.18 2007/08/07 18:37:21 cognet Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -148,9 +148,9 @@ arm7tdmi_cache_flushID, /* idcache_wbinv_all */ (void *)arm7tdmi_cache_flushID, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -210,9 +210,9 @@ arm8_cache_purgeID, /* idcache_wbinv_all */ (void *)arm8_cache_purgeID, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -271,9 +271,9 @@ arm9_idcache_wbinv_all, /* idcache_wbinv_all */ arm9_idcache_wbinv_range, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -333,9 +333,9 @@ arm10_idcache_wbinv_all, /* idcache_wbinv_all */ arm10_idcache_wbinv_range, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -395,9 +395,9 @@ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -456,9 +456,9 @@ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -517,9 +517,9 @@ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -581,9 +581,9 @@ xscale_cache_purgeID, /* idcache_wbinv_all */ xscale_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ ==== //depot/projects/fast_ipsec/src/sys/arm/arm/genassym.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.9 2007/05/23 13:21:57 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.10 2007/08/08 09:27:52 cognet Exp $"); #include <sys/param.h> #include <sys/systm.h> #include <sys/assym.h> @@ -92,6 +92,7 @@ ASSYM(TD_PROC, offsetof(struct thread, td_proc)); ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_MD, offsetof(struct thread, td_md)); +ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(MD_TP, offsetof(struct mdthread, md_tp)); ASSYM(TF_R0, offsetof(struct trapframe, tf_r0)); ==== //depot/projects/fast_ipsec/src/sys/arm/arm/swtch.S#4 (text+ko) ==== @@ -83,7 +83,7 @@ #include <machine/asm.h> #include <machine/asmacros.h> #include <machine/armreg.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.19 2006/04/09 20:16:47 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.20 2007/08/07 18:20:55 cognet Exp $"); /* @@ -127,6 +127,8 @@ .word _C_LABEL(block_userspace_access) .Lcpu_do_powersave: .word _C_LABEL(cpu_do_powersave) +.Lblocked_lock: + .word _C_LABEL(blocked_lock) ENTRY(cpu_throw) mov r5, r1 @@ -214,6 +216,7 @@ ENTRY(cpu_switch) stmfd sp!, {r4-r7, lr} + mov r6, r2 /* Save the mutex */ .Lswitch_resume: /* rem: r0 = old lwp */ @@ -241,10 +244,11 @@ /* Stage two : Save old context */ - /* Get the user structure for the old lwp. */ + /* Get the user structure for the old thread. */ ldr r2, [r0, #(TD_PCB)] + mov r4, r0 /* Save the old thread. */ - /* Save all the registers in the old lwp's pcb */ + /* Save all the registers in the old thread's pcb */ #ifndef __XSCALE__ add r7, r2, #(PCB_R8) stmia r7, {r8-r13} @@ -324,8 +328,7 @@ mov lr, pc ldr pc, [r1, #CF_IDCACHE_WBINV_ALL] .Lcs_cache_purge_skipped: - /* rem: r4 = &block_userspace_access */ - /* rem: r6 = new lwp */ + /* rem: r6 = lock */ /* rem: r9 = new PCB */ /* rem: r10 = old L1 */ /* rem: r11 = new L1 */ @@ -389,6 +392,17 @@ .Lcs_context_switched: + /* Release the old thread */ + str r6, [r4, #TD_LOCK] + ldr r6, .Lblocked_lock + ldr r3, .Lcurthread + ldr r3, [r3] + +1: + ldr r4, [r3, #TD_LOCK] + cmp r4, r6 + beq 1b + /* XXXSCW: Safe to re-enable FIQs here */ /* rem: r9 = new PCB */ @@ -419,7 +433,7 @@ ldr r13, [r7, #(PCB_SP)] #endif - /* rem: r6 = new lwp */ + /* rem: r6 = lock */ /* rem: r7 = new pcb */ #ifdef ARMFPE @@ -429,7 +443,7 @@ #endif /* rem: r5 = new lwp's proc */ - /* rem: r6 = new lwp */ + /* rem: r6 = lock */ /* rem: r7 = new PCB */ .Lswitch_return: ==== //depot/projects/fast_ipsec/src/sys/boot/arm/at91/libat91/Makefile#5 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.9 2007/07/13 14:27:04 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.10 2007/08/09 05:16:55 imp Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -8,7 +8,7 @@ putchar.c printf.c reset.c spi_flash.c xmodem.c \ sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ memset.c memcmp.c -SRCS+=ashldi3.c divsi3.c +SRCS+=ashldi3.c divsi3.S NO_MAN= .if ${MK_TAG_LIST} != "no" ==== //depot/projects/fast_ipsec/src/sys/compat/linux/linux_socket.c#10 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.73 2007/04/14 10:35:09 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.74 2007/08/06 14:25:59 rwatson Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -670,7 +670,6 @@ * socket and use the file descriptor reference instead of * creating a new one. */ - NET_LOCK_GIANT(); error = fgetsock(td, linux_args.s, &so, &fflag); if (error == 0) { error = EISCONN; @@ -683,7 +682,6 @@ } fputsock(so); } - NET_UNLOCK_GIANT(); return (error); } ==== //depot/projects/fast_ipsec/src/sys/conf/NOTES#15 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1447 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1448 2007/08/05 16:16:15 bz Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -501,15 +501,15 @@ options IPSEC #IP security (requires device crypto) #options IPSEC_DEBUG #debug for IP security # -# Set IPSEC_FILTERGIF to force packets coming through a gif tunnel -# to be processed by any configured packet filtering (ipfw, ipf). -# The default is that packets coming from a tunnel are _not_ processed; +# Set IPSEC_FILTERTUNNEL to force packets coming through a tunnel +# to be processed by any configured packet filtering twice. +# The default is that packets coming out of a tunnel are _not_ processed; # they are assumed trusted. # # IPSEC history is preserved for such packets, and can be filtered # using ipfw(8)'s 'ipsec' keyword, when this option is enabled. # -#options IPSEC_FILTERGIF #filter ipsec packets from a tunnel +#options IPSEC_FILTERTUNNEL #filter ipsec packets from a tunnel options IPX #IPX/SPX communications protocols ==== //depot/projects/fast_ipsec/src/sys/conf/files#20 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1241 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1242 2007/08/09 01:11:21 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -259,7 +259,7 @@ contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ ==== //depot/projects/fast_ipsec/src/sys/conf/kern.pre.mk#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.91 2007/07/31 03:15:32 marcel Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.92 2007/08/08 19:12:06 marcel Exp $ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. @@ -88,7 +88,8 @@ CFLAGS+= --param inline-unit-growth=100 CFLAGS+= --param large-function-growth=1000 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" || \ - ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" + ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "powerpc" || \ + ${MACHINE_ARCH} == "sparc64" WERROR?= -Werror .endif .endif ==== //depot/projects/fast_ipsec/src/sys/conf/options#18 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.603 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/options,v 1.605 2007/08/06 14:25:59 rwatson Exp $ # # On the handling of kernel options # @@ -362,7 +362,7 @@ INET6 opt_inet6.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h -IPSEC_FILTERGIF opt_ipsec.h +IPSEC_FILTERTUNNEL opt_ipsec.h IPDIVERT DUMMYNET opt_ipdn.h IPFILTER opt_ipfilter.h @@ -383,7 +383,6 @@ MBUF_STRESS_TEST NCP NETATALK opt_atalk.h -NET_WITH_GIANT opt_net.h PPP_BSDCOMP opt_ppp.h PPP_DEFLATE opt_ppp.h PPP_FILTER opt_ppp.h ==== //depot/projects/fast_ipsec/src/sys/dev/adlink/adlink.c#4 (text+ko) ==== @@ -43,7 +43,7 @@ #ifdef _KERNEL #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.16 2007/02/23 12:18:29 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.17 2007/08/04 17:43:11 kib Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -119,6 +119,7 @@ static struct cdevsw adlink_cdevsw = { .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = adlink_ioctl, .d_mmap = adlink_mmap, .d_name = "adlink", ==== //depot/projects/fast_ipsec/src/sys/dev/an/if_an.c#8 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.82 2007/08/02 02:20:19 avatar Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.83 2007/08/07 12:26:19 avatar Exp $"); /* * The Aironet 4500/4800 series cards come in PCMCIA, ISA and PCI form. @@ -1065,8 +1065,10 @@ rx_frame.an_rsvd0); #endif #endif + AN_UNLOCK(sc); (*ifp->if_input)(ifp, m); - + AN_LOCK(sc); + an_rx_desc.an_valid = 1; an_rx_desc.an_len = AN_RX_BUFFER_SIZE; an_rx_desc.an_done = 0; ==== //depot/projects/fast_ipsec/src/sys/dev/ath/if_ath.c#13 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.172 2007/06/24 01:57:20 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.173 2007/08/06 14:25:59 rwatson Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -888,11 +888,9 @@ * truly a bmiss we'll get another interrupt soon and that'll * be dispatched up for processing. */ - if (tsf - lastrx > bmisstimeout) { - NET_LOCK_GIANT(); + if (tsf - lastrx > bmisstimeout) ieee80211_beacon_miss(ic); - NET_UNLOCK_GIANT(); - } else + else sc->sc_stats.ast_bmiss_phantom++; } } @@ -3447,7 +3445,6 @@ int16_t nf; u_int64_t tsf; - NET_LOCK_GIANT(); /* XXX */ DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending); ngood = 0; @@ -3715,7 +3712,6 @@ !IFQ_IS_EMPTY(&ifp->if_snd)) ath_start(ifp); - NET_UNLOCK_GIANT(); /* XXX */ #undef PA2DESC } ==== //depot/projects/fast_ipsec/src/sys/dev/dc/if_dc.c#12 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.191 2007/02/23 12:18:37 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.192 2007/08/05 11:28:19 marius Exp $"); /* * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143 @@ -294,7 +294,6 @@ static void dc_apply_fixup(struct dc_softc *, int); static void dc_dma_map_txbuf(void *, bus_dma_segment_t *, int, bus_size_t, int); -static void dc_dma_map_rxbuf(void *, bus_dma_segment_t *, int, bus_size_t, int); #ifdef DC_USEIOSPACE #define DC_RES SYS_RES_IOPORT @@ -2424,29 +2423,6 @@ return (0); } -static void -dc_dma_map_rxbuf(arg, segs, nseg, mapsize, error) - void *arg; - bus_dma_segment_t *segs; - int nseg; - bus_size_t mapsize; - int error; -{ - struct dc_softc *sc; - struct dc_desc *c; - - sc = arg; - c = &sc->dc_ldata->dc_rx_list[sc->dc_cdata.dc_rx_cur]; - if (error) { - sc->dc_cdata.dc_rx_err = error; - return; - } - - KASSERT(nseg == 1, ("wrong number of segments, should be 1")); - sc->dc_cdata.dc_rx_err = 0; - c->dc_data = htole32(segs->ds_addr); -} - /* * Initialize an RX descriptor and attach an MBUF cluster. */ @@ -2455,7 +2431,8 @@ { struct mbuf *m_new; bus_dmamap_t tmp; - int error; + bus_dma_segment_t segs[1]; + int error, nseg; if (alloc) { m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); @@ -2478,17 +2455,14 @@ /* No need to remap the mbuf if we're reusing it. */ if (alloc) { - sc->dc_cdata.dc_rx_cur = i; - error = bus_dmamap_load_mbuf(sc->dc_mtag, sc->dc_sparemap, - m_new, dc_dma_map_rxbuf, sc, 0); + error = bus_dmamap_load_mbuf_sg(sc->dc_mtag, sc->dc_sparemap, + m_new, segs, &nseg, 0); + KASSERT(nseg == 1, ("wrong number of segments, should be 1")); if (error) { m_freem(m_new); return (error); } - if (sc->dc_cdata.dc_rx_err != 0) { - m_freem(m_new); - return (sc->dc_cdata.dc_rx_err); - } + sc->dc_ldata->dc_rx_list[i].dc_data = htole32(segs->ds_addr); bus_dmamap_unload(sc->dc_mtag, sc->dc_cdata.dc_rx_map[i]); tmp = sc->dc_cdata.dc_rx_map[i]; sc->dc_cdata.dc_rx_map[i] = sc->dc_sparemap; @@ -2865,12 +2839,11 @@ sc->dc_cdata.dc_tx_cnt--; DC_INC(idx, DC_TX_LIST_CNT); } + sc->dc_cdata.dc_tx_cons = idx; - if (idx != sc->dc_cdata.dc_tx_cons) { - /* Some buffers have been freed. */ - sc->dc_cdata.dc_tx_cons = idx; + if (DC_TX_LIST_CNT - sc->dc_cdata.dc_tx_cnt > DC_TX_LIST_RSVD) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - } + if (sc->dc_cdata.dc_tx_cnt == 0) sc->dc_wdog_timer = 0; } @@ -3161,10 +3134,8 @@ int cur, first, frag, i; sc = arg; - if (error) { - sc->dc_cdata.dc_tx_err = error; + if (error) return; - } first = cur = frag = sc->dc_cdata.dc_tx_prod; for (i = 0; i < nseg; i++) { @@ -3217,7 +3188,7 @@ /* * If there's no way we can send any packets, return now. */ - if (DC_TX_LIST_CNT - sc->dc_cdata.dc_tx_cnt < 6) + if (DC_TX_LIST_CNT - sc->dc_cdata.dc_tx_cnt <= DC_TX_LIST_RSVD) return (ENOBUFS); /* @@ -3229,27 +3200,30 @@ for (m = *m_head; m != NULL; m = m->m_next) chainlen++; - if ((chainlen > DC_TX_LIST_CNT / 4) || - ((DC_TX_LIST_CNT - (chainlen + sc->dc_cdata.dc_tx_cnt)) < 6)) { + m = NULL; + if ((sc->dc_flags & DC_TX_COALESCE && ((*m_head)->m_next != NULL || + sc->dc_flags & DC_TX_ALIGN)) || (chainlen > DC_TX_LIST_CNT / 4) || + (DC_TX_LIST_CNT - (chainlen + sc->dc_cdata.dc_tx_cnt) <= + DC_TX_LIST_RSVD)) { m = m_defrag(*m_head, M_DONTWAIT); - if (m == NULL) + if (m == NULL) { + m_freem(*m_head); + *m_head = NULL; return (ENOBUFS); + } *m_head = m; } - - /* - * Start packing the mbufs in this chain into - * the fragment pointers. Stop when we run out - * of fragments or hit the end of the mbuf chain. - */ idx = sc->dc_cdata.dc_tx_prod; sc->dc_cdata.dc_tx_mapping = *m_head; error = bus_dmamap_load_mbuf(sc->dc_mtag, sc->dc_cdata.dc_tx_map[idx], *m_head, dc_dma_map_txbuf, sc, 0); - if (error) - return (error); - if (sc->dc_cdata.dc_tx_err != 0) - return (sc->dc_cdata.dc_tx_err); + if (error != 0 || sc->dc_cdata.dc_tx_err != 0) { + if (m != NULL) { + m_freem(m); + *m_head = NULL; + } + return (error != 0 ? error : sc->dc_cdata.dc_tx_err); + } bus_dmamap_sync(sc->dc_mtag, sc->dc_cdata.dc_tx_map[idx], BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sc->dc_ltag, sc->dc_lmap, @@ -3279,7 +3253,7 @@ dc_start_locked(struct ifnet *ifp) { struct dc_softc *sc; - struct mbuf *m_head = NULL, *m; + struct mbuf *m_head = NULL; unsigned int queued = 0; int idx; @@ -3300,20 +3274,9 @@ if (m_head == NULL) break; - if (sc->dc_flags & DC_TX_COALESCE && - (m_head->m_next != NULL || - sc->dc_flags & DC_TX_ALIGN)) { - m = m_defrag(m_head, M_DONTWAIT); - if (m == NULL) { - IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; + if (dc_encap(sc, &m_head)) { + if (m_head == NULL) break; - } else { - m_head = m; - } - } - - if (dc_encap(sc, &m_head)) { IFQ_DRV_PREPEND(&ifp->if_snd, m_head); ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; ==== //depot/projects/fast_ipsec/src/sys/dev/dc/if_dcreg.h#7 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/dc/if_dcreg.h,v 1.53 2006/12/06 01:56:38 marius Exp $ + * $FreeBSD: src/sys/dev/dc/if_dcreg.h,v 1.54 2007/08/05 11:28:19 marius Exp $ */ /* @@ -461,6 +461,7 @@ #define DC_RX_LIST_CNT 64 #endif #define DC_TX_LIST_CNT 256 +#define DC_TX_LIST_RSVD 5 #define DC_MIN_FRAMELEN 60 #define DC_RXLEN 1536 @@ -496,8 +497,6 @@ int dc_tx_prod; int dc_tx_cons; int dc_tx_cnt; - int dc_rx_err; - int dc_rx_cur; int dc_rx_prod; }; ==== //depot/projects/fast_ipsec/src/sys/dev/em/if_em.c#13 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.182 2007/07/27 14:48:05 cognet Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.183 2007/08/06 14:25:59 rwatson Exp $*/ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -1474,7 +1474,6 @@ struct adapter *adapter = context; struct ifnet *ifp; - NET_LOCK_GIANT(); ifp = adapter->ifp; /* @@ -1493,7 +1492,6 @@ } em_enable_intr(adapter); - NET_UNLOCK_GIANT(); } /********************************************************************* ==== //depot/projects/fast_ipsec/src/sys/dev/re/if_re.c#14 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.93 2007/07/27 00:43:12 yongari Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.94 2007/08/05 11:20:33 marius Exp $"); /* * RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver @@ -1005,6 +1005,7 @@ } cmdstat = segs[i].ds_len; totlen += segs[i].ds_len; + d->rl_vlanctl = 0; d->rl_bufaddr_lo = htole32(RL_ADDR_LO(segs[i].ds_addr)); d->rl_bufaddr_hi = htole32(RL_ADDR_HI(segs[i].ds_addr)); if (i == 0) ==== //depot/projects/fast_ipsec/src/sys/dev/streams/streams.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/streams/streams.c,v 1.55 2007/04/04 09:11:31 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/streams/streams.c,v 1.56 2007/08/06 14:26:00 rwatson Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -244,9 +244,7 @@ return error; /* An extra reference on `fp' has been held for us by falloc(). */ - NET_LOCK_GIANT(); error = socreate(family, &so, type, protocol, td->td_ucred, td); - NET_UNLOCK_GIANT(); if (error) { fdclose(fdp, fp, fd, td); fdrop(fp, td); ==== //depot/projects/fast_ipsec/src/sys/dev/usb/if_axe.c#10 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/if_axe.c,v 1.52 2007/06/30 20:08:08 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/if_axe.c,v 1.53 2007/08/09 04:40:07 imp Exp $"); /* * ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the @@ -468,7 +468,7 @@ /* * Get station address. */ - axe_cmd(sc, AXE_CMD_READ_NODEID, 0, 0, &eaddr); + axe_cmd(sc, AXE_172_CMD_READ_NODEID, 0, 0, &eaddr); /* * Load IPG values and PHY indexes. @@ -894,12 +894,12 @@ } /* Set transmitter IPG values */ - axe_cmd(sc, AXE_CMD_WRITE_IPG0, 0, sc->axe_ipgs[0], NULL); - axe_cmd(sc, AXE_CMD_WRITE_IPG1, 0, sc->axe_ipgs[1], NULL); - axe_cmd(sc, AXE_CMD_WRITE_IPG2, 0, sc->axe_ipgs[2], NULL); + axe_cmd(sc, AXE_172_CMD_WRITE_IPG0, 0, sc->axe_ipgs[0], NULL); + axe_cmd(sc, AXE_172_CMD_WRITE_IPG1, 0, sc->axe_ipgs[1], NULL); + axe_cmd(sc, AXE_172_CMD_WRITE_IPG2, 0, sc->axe_ipgs[2], NULL); /* Enable receiver, set RX mode */ - rxmode = AXE_RXCMD_UNICAST|AXE_RXCMD_MULTICAST|AXE_RXCMD_ENABLE; + rxmode = AXE_172_RXCMD_UNICAST|AXE_RXCMD_MULTICAST|AXE_RXCMD_ENABLE; /* If we want promiscuous mode, set the allframes bit. */ if (ifp->if_flags & IFF_PROMISC) ==== //depot/projects/fast_ipsec/src/sys/dev/usb/if_axereg.h#5 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/usb/if_axereg.h,v 1.13 2007/06/30 20:08:08 imp Exp $ + * $FreeBSD: src/sys/dev/usb/if_axereg.h,v 1.14 2007/08/09 04:40:07 imp Exp $ */ /* @@ -53,9 +53,11 @@ #define AXE_CMD_LEN(x) (((x) & 0xF000) >> 12) #define AXE_CMD_CMD(x) ((x) & 0x00FF) -#define AXE_CMD_READ_RXTX_SRAM 0x2002 -#define AXE_CMD_WRITE_RX_SRAM 0x0103 -#define AXE_CMD_WRITE_TX_SRAM 0x0104 +#define AXE_172_CMD_READ_RXTX_SRAM 0x2002 +#define AXE_182_CMD_READ_RXTX_SRAM 0x8002 +#define AXE_172_CMD_WRITE_RX_SRAM 0x0103 +#define AXE_172_CMD_WRITE_TX_SRAM 0x0104 +#define AXE_182_CMD_WRITE_RXTX_SRAM 0x8103 #define AXE_CMD_MII_OPMODE_SW 0x0106 #define AXE_CMD_MII_READ_REG 0x2007 #define AXE_CMD_MII_WRITE_REG 0x2108 @@ -68,35 +70,79 @@ #define AXE_CMD_RXCTL_READ 0x200F #define AXE_CMD_RXCTL_WRITE 0x0110 #define AXE_CMD_READ_IPG012 0x3011 -#define AXE_CMD_WRITE_IPG0 0x0112 -#define AXE_CMD_WRITE_IPG1 0x0113 -#define AXE_CMD_WRITE_IPG2 0x0114 +#define AXE_172_CMD_WRITE_IPG0 0x0112 +#define AXE_172_CMD_WRITE_IPG1 0x0113 +#define AXE_172_CMD_WRITE_IPG2 0x0114 +#define AXE_178_CMD_WRITE_IPG012 0x0112 #define AXE_CMD_READ_MCAST 0x8015 #define AXE_CMD_WRITE_MCAST 0x8116 -#define AXE_CMD_READ_NODEID 0x6017 -#define AXE_CMD_WRITE_NODEID 0x6118 +#define AXE_172_CMD_READ_NODEID 0x6017 +#define AXE_172_CMD_WRITE_NODEID 0x6118 +#define AXE_178_CMD_READ_NODEID 0x6013 +#define AXE_178_CMD_WRITE_NODEID 0x6114 #define AXE_CMD_READ_PHYID 0x2019 -#define AXE_CMD_READ_MEDIA 0x101A +#define AXE_172_CMD_READ_MEDIA 0x101A +#define AXE_178_CMD_READ_MEDIA 0x201A #define AXE_CMD_WRITE_MEDIA 0x011B #define AXE_CMD_READ_MONITOR_MODE 0x101C #define AXE_CMD_WRITE_MONITOR_MODE 0x011D #define AXE_CMD_READ_GPIO 0x101E #define AXE_CMD_WRITE_GPIO 0x011F +#define AXE_CMD_SW_RESET_REG 0x0120 +#define AXE_CMD_SW_PHY_STATUS 0x0021 +#define AXE_CMD_SW_PHY_SELECT 0x0122 + +#define AXE_SW_RESET_CLEAR 0x00 +#define AXE_SW_RESET_RR 0x01 +#define AXE_SW_RESET_RT 0x02 +#define AXE_SW_RESET_PRTE 0x04 +#define AXE_SW_RESET_PRL 0x08 +#define AXE_SW_RESET_BZ 0x10 +#define AXE_SW_RESET_IPRL 0x20 +#define AXE_SW_RESET_IPPD 0x40 + +/* AX88178 documentation says to always write this bit... */ +#define AXE_178_RESET_MAGIC 0x40 + +#define AXE_178_MEDIA_GMII 0x0001 +#define AXE_MEDIA_FULL_DUPLEX 0x0002 +#define AXE_172_MEDIA_TX_ABORT_ALLOW 0x0004 +/* AX88178 documentation says to always write 1 to reserved bit... */ +#define AXE_178_MEDIA_MAGIC 0x0004 +#define AXE_178_MEDIA_ENCK 0x0008 +#define AXE_172_MEDIA_FLOW_CONTROL_EN 0x0010 +#define AXE_178_MEDIA_RXFLOW_CONTROL_EN 0x0010 +#define AXE_178_MEDIA_TXFLOW_CONTROL_EN 0x0020 +#define AXE_178_MEDIA_JUMBO_EN 0x0040 +#define AXE_178_MEDIA_LTPF_ONLY 0x0080 +#define AXE_178_MEDIA_RX_EN 0x0100 +#define AXE_178_MEDIA_100TX 0x0200 +#define AXE_178_MEDIA_SBP 0x0800 +#define AXE_178_MEDIA_SUPERMAC 0x1000 #define AXE_RXCMD_PROMISC 0x0001 #define AXE_RXCMD_ALLMULTI 0x0002 -#define AXE_RXCMD_UNICAST 0x0004 +#define AXE_172_RXCMD_UNICAST 0x0004 +#define AXE_178_RXCMD_KEEP_INVALID_CRC 0x0004 #define AXE_RXCMD_BROADCAST 0x0008 #define AXE_RXCMD_MULTICAST 0x0010 #define AXE_RXCMD_ENABLE 0x0080 +#define AXE_178_RXCMD_MFB 0x0300 #define AXE_NOPHY 0xE0 +#define AXE_INTPHY 0x10 #define AXE_TIMEOUT 1000 +#define AXE_172_BUFSZ 1536 +#define AXE_178_MIN_BUFSZ 2048 +#define AXE_178_MAX_BUFSZ 16384 #define AXE_MIN_FRAMELEN 60 #define AXE_RX_FRAMES 1 #define AXE_TX_FRAMES 1 +#define AXE_RX_LIST_CNT 1 +#define AXE_TX_LIST_CNT 1 + #define AXE_CTL_READ 0x01 #define AXE_CTL_WRITE 0x02 >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708091932.l79JWsUH088475>