svn commit: r215418 - head/sys/netinet6
Author: bz Date: Wed Nov 17 09:25:08 2010 New Revision: 215418 URL: http://svn.freebsd.org/changeset/base/215418 Log: No need to re-initialize the callout. We initially do it in in6_lltable_new() right after allocation. Worse, we are losing the right flags here. MFC after:4 days Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c == --- head/sys/netinet6/nd6.c Wed Nov 17 08:56:01 2010(r215417) +++ head/sys/netinet6/nd6.c Wed Nov 17 09:25:08 2010(r215418) @@ -851,10 +851,8 @@ nd6_lookup(struct in6_addr *addr6, int f llflags |= LLE_EXCLUSIVE; ln = lla_lookup(LLTABLE6(ifp), llflags, (struct sockaddr *)sin6); - if ((ln != NULL) (flags LLE_CREATE)) { + if ((ln != NULL) (flags LLE_CREATE)) ln-ln_state = ND6_LLINFO_NOSTATE; - callout_init(ln-ln_timer_ch, 0); - } return (ln); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215419 - head/sys/compat/ndis
Author: bschmidt Date: Wed Nov 17 09:28:17 2010 New Revision: 215419 URL: http://svn.freebsd.org/changeset/base/215419 Log: Use kmem_alloc_contig() to honour the cache_type variable. Pointed out by: alc Modified: head/sys/compat/ndis/ntoskrnl_var.h head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/ntoskrnl_var.h == --- head/sys/compat/ndis/ntoskrnl_var.h Wed Nov 17 09:25:08 2010 (r215418) +++ head/sys/compat/ndis/ntoskrnl_var.h Wed Nov 17 09:28:17 2010 (r215419) @@ -162,6 +162,16 @@ typedef struct mdl mdl, ndis_buffer; #defineWDM_MINOR_WINXP 0x20 #defineWDM_MINOR_WIN2003 0x30 +enum nt_caching_type { + MmNonCached = 0, + MmCached= 1, + MmWriteCombined = 2, + MmHardwareCoherentCached= 3, + MmNonCachedUnordered= 4, + MmUSWCCached= 5, + MmMaximumCacheType = 6 +}; + /*- * The ndis_kspin_lock type is called KSPIN_LOCK in MS-Windows. * According to the Windows DDK header files, KSPIN_LOCK is defined like this: Modified: head/sys/compat/ndis/subr_ntoskrnl.c == --- head/sys/compat/ndis/subr_ntoskrnl.cWed Nov 17 09:25:08 2010 (r215418) +++ head/sys/compat/ndis/subr_ntoskrnl.cWed Nov 17 09:28:17 2010 (r215419) @@ -68,6 +68,7 @@ __FBSDID($FreeBSD$); #include vm/uma.h #include vm/vm_kern.h #include vm/vm_map.h +#include vm/vm_extern.h #include compat/ndis/pe_var.h #include compat/ndis/cfg_var.h @@ -197,9 +198,10 @@ static uint32_t InterlockedDecrement(vol static void ExInterlockedAddLargeStatistic(uint64_t *, uint32_t); static void *MmAllocateContiguousMemory(uint32_t, uint64_t); static void *MmAllocateContiguousMemorySpecifyCache(uint32_t, - uint64_t, uint64_t, uint64_t, uint32_t); + uint64_t, uint64_t, uint64_t, enum nt_caching_type); static void MmFreeContiguousMemory(void *); -static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, uint32_t); +static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, + enum nt_caching_type); static uint32_t MmSizeOfMdl(void *, size_t); static void *MmMapLockedPages(mdl *, uint8_t); static void *MmMapLockedPagesSpecifyCache(mdl *, @@ -2424,11 +2426,34 @@ MmAllocateContiguousMemorySpecifyCache(s uint64_tlowest; uint64_thighest; uint64_tboundary; - uint32_tcachetype; + enum nt_caching_typecachetype; { + vm_memattr_tmemattr; + void*ret; - return (contigmalloc(size, M_DEVBUF, M_ZERO|M_NOWAIT, lowest, - highest, PAGE_SIZE, boundary)); + switch (cachetype) { + case MmNonCached: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmWriteCombined: + memattr = VM_MEMATTR_WRITE_COMBINING; + break; + case MmNonCachedUnordered: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmCached: + case MmHardwareCoherentCached: + case MmUSWCCached: + default: + memattr = VM_MEMATTR_DEFAULT; + break; + } + + ret = (void *)kmem_alloc_contig(kernel_map, size, M_ZERO | M_NOWAIT, + lowest, highest, PAGE_SIZE, boundary, memattr); + if (ret != NULL) + malloc_type_allocated(M_DEVBUF, round_page(size)); + return (ret); } static void @@ -2442,7 +2467,7 @@ static void MmFreeContiguousMemorySpecifyCache(base, size, cachetype) void*base; uint32_tsize; - uint32_tcachetype; + enum nt_caching_typecachetype; { contigfree(base, size, M_DEVBUF); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215420 - head/sys/compat/ndis
Author: bschmidt Date: Wed Nov 17 09:32:39 2010 New Revision: 215420 URL: http://svn.freebsd.org/changeset/base/215420 Log: Fix a panic on i386 for drivers using MmAllocateContiguousMemory() and MmAllocateContiguousMemorySpecifyCache(). Those two functions take 64-bit variable(s) for their arguments. On i386 that takes additional 32-bit variable per argument. This is required so that windrv_wrap() can correctly wrap function that miniport driver calls with stdcall convention. Similar explanation is provided in subr_ndis.c for other functions. Submitted by: Paul B Mahol onemda at gmail.com Modified: head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/subr_ntoskrnl.c == --- head/sys/compat/ndis/subr_ntoskrnl.cWed Nov 17 09:28:17 2010 (r215419) +++ head/sys/compat/ndis/subr_ntoskrnl.cWed Nov 17 09:32:39 2010 (r215420) @@ -4237,8 +4237,8 @@ image_patch_table ntoskrnl_functbl[] = { IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2), IMPORT_SFUNC(IoAllocateMdl, 5), IMPORT_SFUNC(IoFreeMdl, 1), - IMPORT_SFUNC(MmAllocateContiguousMemory, 2), - IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5), + IMPORT_SFUNC(MmAllocateContiguousMemory, 2 + 1), + IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5 + 3), IMPORT_SFUNC(MmFreeContiguousMemory, 1), IMPORT_SFUNC(MmFreeContiguousMemorySpecifyCache, 3), IMPORT_SFUNC_MAP(MmGetPhysicalAddress, pmap_kextract, 1), ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215423 - head/sys/netinet6
Author: bz Date: Wed Nov 17 10:43:20 2010 New Revision: 215423 URL: http://svn.freebsd.org/changeset/base/215423 Log: Do not initialize flag variables before needed. Consistently use the LLE_ prefix for lla_lookup() and the ND6_ prefix for nd6_lookup() even though both are defined the same. Use the right flag variable when checking each. No real functional change. MFC after:4 days Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c == --- head/sys/netinet6/nd6.c Wed Nov 17 09:49:51 2010(r215422) +++ head/sys/netinet6/nd6.c Wed Nov 17 10:43:20 2010(r215423) @@ -836,7 +836,7 @@ nd6_lookup(struct in6_addr *addr6, int f { struct sockaddr_in6 sin6; struct llentry *ln; - int llflags = 0; + int llflags; bzero(sin6, sizeof(sin6)); sin6.sin6_len = sizeof(struct sockaddr_in6); @@ -845,13 +845,14 @@ nd6_lookup(struct in6_addr *addr6, int f IF_AFDATA_LOCK_ASSERT(ifp); + llflags = 0; if (flags ND6_CREATE) llflags |= LLE_CREATE; if (flags ND6_EXCLUSIVE) llflags |= LLE_EXCLUSIVE; ln = lla_lookup(LLTABLE6(ifp), llflags, (struct sockaddr *)sin6); - if ((ln != NULL) (flags LLE_CREATE)) + if ((ln != NULL) (llflags LLE_CREATE)) ln-ln_state = ND6_LLINFO_NOSTATE; return (ln); @@ -1451,7 +1452,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru int do_update; int olladdr; int llchange; - int flags = 0; + int flags; int newstate = 0; uint16_t router = 0; struct sockaddr_in6 sin6; @@ -1478,13 +1479,13 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * Spec says nothing in sections for RA, RS and NA. There's small * description on it in NS section (RFC 2461 7.2.3). */ - flags |= lladdr ? ND6_EXCLUSIVE : 0; + flags = lladdr ? ND6_EXCLUSIVE : 0; IF_AFDATA_LOCK(ifp); ln = nd6_lookup(from, flags, ifp); if (ln == NULL) { - flags |= LLE_EXCLUSIVE; - ln = nd6_lookup(from, flags |ND6_CREATE, ifp); + flags |= ND6_EXCLUSIVE; + ln = nd6_lookup(from, flags | ND6_CREATE, ifp); IF_AFDATA_UNLOCK(ifp); is_newentry = 1; } else { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215425 - head/usr.sbin/iostat
Author: ivoras Date: Wed Nov 17 15:12:10 2010 New Revision: 215425 URL: http://svn.freebsd.org/changeset/base/215425 Log: Change wait banner to qlen to be more indicative of its purpose and to be more inline with what gstat uses. Reviewed by: gnn Silence from: phk, keramida Modified: head/usr.sbin/iostat/iostat.8 head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.8 == --- head/usr.sbin/iostat/iostat.8 Wed Nov 17 13:52:09 2010 (r215424) +++ head/usr.sbin/iostat/iostat.8 Wed Nov 17 15:12:10 2010 (r215425) @@ -348,7 +348,7 @@ write operations per second kilobytes read per second .It kw/s kilobytes write per second -.It wait +.It qlen transactions queue length .It svc_t average duration of transactions, in milliseconds Modified: head/usr.sbin/iostat/iostat.c == --- head/usr.sbin/iostat/iostat.c Wed Nov 17 13:52:09 2010 (r215424) +++ head/usr.sbin/iostat/iostat.c Wed Nov 17 15:12:10 2010 (r215425) @@ -750,11 +750,11 @@ devstats(int perf_select, long double et printf(\n); if (Iflag == 0) printf( - device r/s w/skr/skw/s wait svc_t %%b + device r/s w/skr/skw/s qlen svc_t %%b ); else printf( - device r/i w/ikr/ikw/i wait svc_t %%b + device r/i w/ikr/ikw/i qlen svc_t %%b ); if (Tflag 0) printf(tin tout ); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215426 - in head: lib/libautofs sbin/mount_autofs
Author: jhb Date: Wed Nov 17 15:42:47 2010 New Revision: 215426 URL: http://svn.freebsd.org/changeset/base/215426 Log: Remove unused autofs userland bits. Approved by: core Deleted: head/lib/libautofs/ head/sbin/mount_autofs/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215427 - head/sys/crypto/aesni
Author: kib Date: Wed Nov 17 16:17:15 2010 New Revision: 215427 URL: http://svn.freebsd.org/changeset/base/215427 Log: Only save FPU context when not executing in the context of the crypto thread. Tested by:Mike Tancsa Modified: head/sys/crypto/aesni/aesni_wrap.c Modified: head/sys/crypto/aesni/aesni_wrap.c == --- head/sys/crypto/aesni/aesni_wrap.c Wed Nov 17 15:42:47 2010 (r215426) +++ head/sys/crypto/aesni/aesni_wrap.c Wed Nov 17 16:17:15 2010 (r215427) @@ -246,14 +246,21 @@ int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) { struct thread *td; - int error; + int error, saved_ctx; td = curthread; - error = fpu_kern_enter(td, ses-fpu_ctx, FPU_KERN_NORMAL); + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, ses-fpu_ctx, FPU_KERN_NORMAL); + saved_ctx = 1; + } else { + error = 0; + saved_ctx = 0; + } if (error == 0) { error = aesni_cipher_setup_common(ses, encini-cri_key, encini-cri_klen); - fpu_kern_leave(td, ses-fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, ses-fpu_ctx); } return (error); } @@ -264,16 +271,22 @@ aesni_cipher_process(struct aesni_sessio { struct thread *td; uint8_t *buf; - int error, allocated; + int error, allocated, saved_ctx; buf = aesni_cipher_alloc(enccrd, crp, allocated); if (buf == NULL) return (ENOMEM); td = curthread; - error = fpu_kern_enter(td, ses-fpu_ctx, FPU_KERN_NORMAL); - if (error != 0) - goto out; + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, ses-fpu_ctx, FPU_KERN_NORMAL); + if (error != 0) + goto out; + saved_ctx = 1; + } else { + saved_ctx = 0; + error = 0; + } if ((enccrd-crd_flags CRD_F_KEY_EXPLICIT) != 0) { error = aesni_cipher_setup_common(ses, enccrd-crd_key, @@ -311,7 +324,8 @@ aesni_cipher_process(struct aesni_sessio ses-iv); } } - fpu_kern_leave(td, ses-fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, ses-fpu_ctx); if (allocated) crypto_copyback(crp-crp_flags, crp-crp_buf, enccrd-crd_skip, enccrd-crd_len, buf); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215428 - head/sys/dev/ata/chipsets
Author: mav Date: Wed Nov 17 16:17:35 2010 New Revision: 215428 URL: http://svn.freebsd.org/changeset/base/215428 Log: Add IDs for VIA VX900 chipset SATA controller. MFC after:1 week Modified: head/sys/dev/ata/chipsets/ata-via.c Modified: head/sys/dev/ata/chipsets/ata-via.c == --- head/sys/dev/ata/chipsets/ata-via.c Wed Nov 17 16:17:15 2010 (r215427) +++ head/sys/dev/ata/chipsets/ata-via.c Wed Nov 17 16:17:35 2010 (r215428) @@ -106,6 +106,7 @@ ata_via_probe(device_t dev) { ATA_VIACX700, 0x00, VIA133, VIASATA, ATA_SA150, CX700 }, { ATA_VIAVX800, 0x00, VIA133, VIASATA, ATA_SA150, VX800 }, { ATA_VIAVX855, 0x00, VIA133, 0x00,ATA_UDMA6, VX855 }, + { ATA_VIAVX900, 0x00, VIA133, VIASATA, ATA_SA300, VX900 }, { 0, 0, 0, 0, 0, 0 }}; static struct ata_chip_id new_ids[] = {{ ATA_VIA6410, 0x00, 0, 0x00,ATA_UDMA6, 6410 }, @@ -123,7 +124,9 @@ ata_via_probe(device_t dev) if (pci_get_devid(dev) == ATA_VIA82C571 || pci_get_devid(dev) == ATA_VIACX700IDE || - pci_get_devid(dev) == ATA_VIASATAIDE) { + pci_get_devid(dev) == ATA_VIASATAIDE || + pci_get_devid(dev) == ATA_VIASATAIDE2 || + pci_get_devid(dev) == ATA_VIASATAIDE3) { if (!(ctlr-chip = ata_find_chip(dev, ids, -99))) return ENXIO; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215431 - head/sys/dev/ata
Author: mav Date: Wed Nov 17 17:52:04 2010 New Revision: 215431 URL: http://svn.freebsd.org/changeset/base/215431 Log: Add IDs for VIA VX900 chipset SATA controller. (Missed part of r215428) Modified: head/sys/dev/ata/ata-pci.h Modified: head/sys/dev/ata/ata-pci.h == --- head/sys/dev/ata/ata-pci.h Wed Nov 17 17:29:22 2010(r215430) +++ head/sys/dev/ata/ata-pci.h Wed Nov 17 17:52:04 2010(r215431) @@ -512,7 +512,10 @@ struct ata_pci_controller { #define ATA_VIACX7000x83241106 #define ATA_VIASATAIDE 0x53241106 #define ATA_VIAVX8000x83531106 +#define ATA_VIASATAIDE2 0xc4091106 #define ATA_VIAVX8550x84091106 +#define ATA_VIASATAIDE3 0x90011106 +#define ATA_VIAVX9000x84101106 /* global prototypes ata-pci.c */ int ata_pci_probe(device_t dev); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r215425 - head/usr.sbin/iostat
On Wed Nov 17 10, Ivan Voras wrote: Author: ivoras Date: Wed Nov 17 15:12:10 2010 New Revision: 215425 URL: http://svn.freebsd.org/changeset/base/215425 Log: Change wait banner to qlen to be more indicative of its purpose and to be more inline with what gstat uses. any thoughts on this manual page change? cheers. alex Reviewed by:gnn Silence from: phk, keramida Modified: head/usr.sbin/iostat/iostat.8 head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.8 == --- head/usr.sbin/iostat/iostat.8 Wed Nov 17 13:52:09 2010 (r215424) +++ head/usr.sbin/iostat/iostat.8 Wed Nov 17 15:12:10 2010 (r215425) @@ -348,7 +348,7 @@ write operations per second kilobytes read per second .It kw/s kilobytes write per second -.It wait +.It qlen transactions queue length .It svc_t average duration of transactions, in milliseconds Modified: head/usr.sbin/iostat/iostat.c == --- head/usr.sbin/iostat/iostat.c Wed Nov 17 13:52:09 2010 (r215424) +++ head/usr.sbin/iostat/iostat.c Wed Nov 17 15:12:10 2010 (r215425) @@ -750,11 +750,11 @@ devstats(int perf_select, long double et printf(\n); if (Iflag == 0) printf( - device r/s w/skr/skw/s wait svc_t %%b + device r/s w/skr/skw/s qlen svc_t %%b ); else printf( - device r/i w/ikr/ikw/i wait svc_t %%b + device r/i w/ikr/ikw/i qlen svc_t %%b ); if (Tflag 0) printf(tin tout ); -- a13x diff --git a/usr.sbin/iostat/iostat.8 b/usr.sbin/iostat/iostat.8 index 6a9ef02..3b03acc 100644 --- a/usr.sbin/iostat/iostat.8 +++ b/usr.sbin/iostat/iostat.8 @@ -60,7 +60,7 @@ .\ .\@(#)iostat.88.1 (Berkeley) 6/6/93 .\ -.Dd April 17, 2006 +.Dd November 17, 2010 .Dt IOSTAT 8 .Os .Sh NAME @@ -102,11 +102,15 @@ Repeat the display times. If no repeat .Ar count -is specified, the default is infinity. +is specified, and +.Fl w +is specified, the default is infinity, otherwise the default is one. .It Fl C Display CPU statistics. This is on by default, unless .Fl d +or +.Fl x is specified. .It Fl d Display only device statistics. @@ -231,6 +235,8 @@ output, up to the number of devices that can be displayed in Display TTY statistics. This is on by default, unless .Fl d +or +.Fl x is specified. .It Fl w Pause ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215432 - head/sys/dev/nfe
Author: yongari Date: Wed Nov 17 18:09:02 2010 New Revision: 215432 URL: http://svn.freebsd.org/changeset/base/215432 Log: MCP55 is the only NVIDIA controller that supports VLAN tag insertion/stripping and it also supports TSO over VLAN. Implement TSO over VLAN support for MCP55 controller. While I'm here clean up SIOCSIFCAP ioctl handler. Since nfe(4) sets ifp capabilities based on various hardware flags in device attach, there is no need to check hardware flags again in SIOCSIFCAP ioctl handler. Also fix a bug which toggled both TX and RX checksum offloading even if user requested either TX or RX checksum configuration change. Tested by:Rob Farmer ( rfarmer predatorlabs dot net ) Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c == --- head/sys/dev/nfe/if_nfe.c Wed Nov 17 17:52:04 2010(r215431) +++ head/sys/dev/nfe/if_nfe.c Wed Nov 17 18:09:02 2010(r215432) @@ -593,7 +593,8 @@ nfe_attach(device_t dev) if ((sc-nfe_flags NFE_HW_VLAN) != 0) { ifp-if_capabilities |= IFCAP_VLAN_HWTAGGING; if ((ifp-if_capabilities IFCAP_HWCSUM) != 0) - ifp-if_capabilities |= IFCAP_VLAN_HWCSUM; + ifp-if_capabilities |= IFCAP_VLAN_HWCSUM | + IFCAP_VLAN_HWTSO; } if (pci_find_extcap(dev, PCIY_PMG, reg) == 0) @@ -1777,20 +1778,35 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, if ((mask IFCAP_WOL_MAGIC) != 0 (ifp-if_capabilities IFCAP_WOL_MAGIC) != 0) ifp-if_capenable ^= IFCAP_WOL_MAGIC; - - if ((sc-nfe_flags NFE_HW_CSUM) != 0 - (mask IFCAP_HWCSUM) != 0) { - ifp-if_capenable ^= IFCAP_HWCSUM; - if ((IFCAP_TXCSUM ifp-if_capenable) != 0 - (IFCAP_TXCSUM ifp-if_capabilities) != 0) + if ((mask IFCAP_TXCSUM) != 0 + (ifp-if_capabilities IFCAP_TXCSUM) != 0) { + ifp-if_capenable ^= IFCAP_TXCSUM; + if ((ifp-if_capenable IFCAP_TXCSUM) != 0) ifp-if_hwassist |= NFE_CSUM_FEATURES; else ifp-if_hwassist = ~NFE_CSUM_FEATURES; + } + if ((mask IFCAP_RXCSUM) != 0 + (ifp-if_capabilities IFCAP_RXCSUM) != 0) { + ifp-if_capenable ^= IFCAP_RXCSUM; init++; } - if ((sc-nfe_flags NFE_HW_VLAN) != 0 - (mask IFCAP_VLAN_HWTAGGING) != 0) { + if ((mask IFCAP_TSO4) != 0 + (ifp-if_capabilities IFCAP_TSO4) != 0) { + ifp-if_capenable ^= IFCAP_TSO4; + if ((IFCAP_TSO4 ifp-if_capenable) != 0) + ifp-if_hwassist |= CSUM_TSO; + else + ifp-if_hwassist = ~CSUM_TSO; + } + if ((mask IFCAP_VLAN_HWTSO) != 0 + (ifp-if_capabilities IFCAP_VLAN_HWTSO) != 0) + ifp-if_capenable ^= IFCAP_VLAN_HWTSO; + if ((mask IFCAP_VLAN_HWTAGGING) != 0 + (ifp-if_capabilities IFCAP_VLAN_HWTAGGING) != 0) { ifp-if_capenable ^= IFCAP_VLAN_HWTAGGING; + if ((ifp-if_capenable IFCAP_VLAN_HWTAGGING) == 0) + ifp-if_capenable = ~IFCAP_VLAN_HWTSO; init++; } /* @@ -1800,28 +1816,17 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, * VLAN stripping. So when we know Rx checksum offload is * disabled turn entire hardware VLAN assist off. */ - if ((sc-nfe_flags (NFE_HW_CSUM | NFE_HW_VLAN)) == - (NFE_HW_CSUM | NFE_HW_VLAN)) { - if ((ifp-if_capenable IFCAP_RXCSUM) == 0) - ifp-if_capenable = ~IFCAP_VLAN_HWTAGGING; + if ((ifp-if_capenable IFCAP_RXCSUM) == 0) { + if ((ifp-if_capenable IFCAP_VLAN_HWTAGGING) != 0) + init++; + ifp-if_capenable = ~(IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_HWTSO); } - - if ((sc-nfe_flags NFE_HW_CSUM) != 0 - (mask IFCAP_TSO4) != 0) { - ifp-if_capenable ^= IFCAP_TSO4; - if ((IFCAP_TSO4 ifp-if_capenable) != 0 - (IFCAP_TSO4 ifp-if_capabilities) != 0) - ifp-if_hwassist |= CSUM_TSO; - else - ifp-if_hwassist =
svn commit: r215434 - in head: sys/netinet usr.bin/netstat
Author: gnn Date: Wed Nov 17 18:55:12 2010 New Revision: 215434 URL: http://svn.freebsd.org/changeset/base/215434 Log: Add new, per connection, statistics for TCP, including: Retransmitted Packets Zero Window Advertisements Out of Order Receives These statistics are available via the -T argument to netstat(1). MFC after:2 weeks Modified: head/sys/netinet/tcp.h head/sys/netinet/tcp_output.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/usr.bin/netstat/inet.c head/usr.bin/netstat/main.c head/usr.bin/netstat/netstat.1 head/usr.bin/netstat/netstat.h Modified: head/sys/netinet/tcp.h == --- head/sys/netinet/tcp.h Wed Nov 17 18:21:29 2010(r215433) +++ head/sys/netinet/tcp.h Wed Nov 17 18:55:12 2010(r215434) @@ -225,9 +225,12 @@ struct tcp_info { u_int32_t tcpi_snd_nxt; /* Next egress seqno */ u_int32_t tcpi_rcv_nxt; /* Next ingress seqno */ u_int32_t tcpi_toe_tid; /* HWTID for TOE endpoints */ + u_int32_t tcpi_snd_rexmitpack;/* Retransmitted packets */ + u_int32_t tcpi_rcv_ooopack; /* Out-of-order packets */ + u_int32_t tcpi_snd_zerowin; /* Zero-sized windows sent */ /* Padding to grow without breaking ABI. */ - u_int32_t __tcpi_pad[29]; /* Padding. */ + u_int32_t __tcpi_pad[26]; /* Padding. */ }; #endif Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_output.c Wed Nov 17 18:55:12 2010 (r215434) @@ -803,6 +803,7 @@ send: if ((tp-t_flags TF_FORCEDATA) len == 1) TCPSTAT_INC(tcps_sndprobe); else if (SEQ_LT(tp-snd_nxt, tp-snd_max) || sack_rxmit) { + tp-t_sndrexmitpack++; TCPSTAT_INC(tcps_sndrexmitpack); TCPSTAT_ADD(tcps_sndrexmitbyte, len); } else { @@ -1027,9 +1028,10 @@ send: * to read more data than can be buffered prior to transmitting on * the connection. */ - if (th-th_win == 0) + if (th-th_win == 0) { + tp-t_sndzerowin++; tp-t_flags |= TF_RXWIN0SENT; - else + } else tp-t_flags = ~TF_RXWIN0SENT; if (SEQ_GT(tp-snd_up, tp-snd_nxt)) { th-th_urp = htons((u_short)(tp-snd_up - tp-snd_nxt)); Modified: head/sys/netinet/tcp_reass.c == --- head/sys/netinet/tcp_reass.cWed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_reass.cWed Nov 17 18:55:12 2010 (r215434) @@ -266,6 +266,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd th-th_seq += i; } } + tp-t_rcvoopack++; TCPSTAT_INC(tcps_rcvoopack); TCPSTAT_ADD(tcps_rcvoobyte, *tlenp); Modified: head/sys/netinet/tcp_usrreq.c == --- head/sys/netinet/tcp_usrreq.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_usrreq.c Wed Nov 17 18:55:12 2010 (r215434) @@ -1218,6 +1218,9 @@ tcp_fill_info(struct tcpcb *tp, struct t ti-tcpi_rcv_mss = tp-t_maxseg; if (tp-t_flags TF_TOE) ti-tcpi_options |= TCPI_OPT_TOE; + ti-tcpi_snd_rexmitpack = tp-t_sndrexmitpack; + ti-tcpi_rcv_ooopack = tp-t_rcvoopack; + ti-tcpi_snd_zerowin = tp-t_sndzerowin; } /* Modified: head/sys/netinet/tcp_var.h == --- head/sys/netinet/tcp_var.h Wed Nov 17 18:21:29 2010(r215433) +++ head/sys/netinet/tcp_var.h Wed Nov 17 18:55:12 2010(r215434) @@ -177,6 +177,7 @@ struct tcpcb { u_long snd_cwnd_prev; /* cwnd prior to retransmit */ u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */ tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */ + int t_sndzerowin; /* zero-window updates sent */ u_int t_badrxtwin;/* window for retransmit recovery */ u_char snd_limited;/* segments limited transmitted */ /* SACK related state */ @@ -193,6 +194,8 @@ struct tcpcb { u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */ int rfbuf_cnt; /* recv buffer autoscaling byte count */ struct toe_usrreqs *t_tu; /* offload operations vector */ + int t_sndrexmitpack;/* retransmit packets
svn commit: r215435 - head/sys/boot/powerpc/ofw
Author: andreast Date: Wed Nov 17 19:25:37 2010 New Revision: 215435 URL: http://svn.freebsd.org/changeset/base/215435 Log: Load the full 16k stack space. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/powerpc/ofw/start.c Modified: head/sys/boot/powerpc/ofw/start.c == --- head/sys/boot/powerpc/ofw/start.c Wed Nov 17 18:55:12 2010 (r215434) +++ head/sys/boot/powerpc/ofw/start.c Wed Nov 17 19:25:37 2010 (r215435) @@ -48,7 +48,7 @@ stack:\n\ _start:\n\ lis %r1,st...@ha\n\ addi%r1,%r1,st...@l \n\ - addi%r1,%r1,8192\n\ + addi%r1,%r1,16384 \n\ \n\ b startup \n\ ); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215436 - head/sys/boot/powerpc/ofw
Author: andreast Date: Wed Nov 17 19:28:48 2010 New Revision: 215436 URL: http://svn.freebsd.org/changeset/base/215436 Log: Make sure the .bss is cleared at the beginning. The pSeries OF ELF loader does not clear .bss automatically. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/powerpc/ofw/start.c Modified: head/sys/boot/powerpc/ofw/start.c == --- head/sys/boot/powerpc/ofw/start.c Wed Nov 17 19:25:37 2010 (r215435) +++ head/sys/boot/powerpc/ofw/start.c Wed Nov 17 19:28:48 2010 (r215436) @@ -50,7 +50,20 @@ _start: \n\ addi%r1,%r1,st...@l \n\ addi%r1,%r1,16384 \n\ \n\ - b startup \n\ + /* Clear the .bss!!! */ \n\ + li %r0,0 \n\ + lis %r8,_ed...@ha \n\ + addi%r8,%r8,_ed...@l\n\ + lis %r9,_...@ha \n\ + addi%r9,%r9,_...@l \n\ + \n\ +1: cmpw0,%r8,%r9 \n\ + bge 2f \n\ + stw %r0,0(%r8) \n\ + addi%r8,%r8,4 \n\ + b 1b \n\ + \n\ +2: b startup \n\ ); void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215437 - head/sys/boot/ofw/libofw
Author: andreast Date: Wed Nov 17 19:31:48 2010 New Revision: 215437 URL: http://svn.freebsd.org/changeset/base/215437 Log: Move the declaration of the eh struct (used only when debugging is enabled) from ofwn_put into the debug section. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/ofw/libofw/ofw_net.c Modified: head/sys/boot/ofw/libofw/ofw_net.c == --- head/sys/boot/ofw/libofw/ofw_net.c Wed Nov 17 19:28:48 2010 (r215436) +++ head/sys/boot/ofw/libofw/ofw_net.c Wed Nov 17 19:31:48 2010 (r215437) @@ -90,11 +90,11 @@ ofwn_probe(struct netif *nif, void *mach static int ofwn_put(struct iodesc *desc, void *pkt, size_t len) { - struct ether_header *eh; size_t sendlen; ssize_t rv; #if defined(NETIF_DEBUG) + struct ether_header *eh; printf(netif_put: desc=0x%x pkt=0x%x len=%d\n, desc, pkt, len); eh = pkt; printf(dst: %s , ether_sprintf(eh-ether_dhost)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215438 - head/sys/boot/ofw/libofw
Author: andreast Date: Wed Nov 17 19:35:56 2010 New Revision: 215438 URL: http://svn.freebsd.org/changeset/base/215438 Log: Check the real-mode? OF property to find out whether we operate in real or virtual mode. In virtual mode we have to do memory mapping. On PowerMacs it is usually false while on pSeries we have found that it is true. The real-mode? property is not available on sparc64. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/ofw/libofw/ofw_copy.c head/sys/boot/ofw/libofw/openfirm.c head/sys/boot/ofw/libofw/openfirm.h Modified: head/sys/boot/ofw/libofw/ofw_copy.c == --- head/sys/boot/ofw/libofw/ofw_copy.c Wed Nov 17 19:31:48 2010 (r215437) +++ head/sys/boot/ofw/libofw/ofw_copy.c Wed Nov 17 19:35:56 2010 (r215438) @@ -91,16 +91,22 @@ ofw_mapmem(vm_offset_t dest, const size_ return (ENOMEM); } -if (OF_call_method(claim, mmu, 3, 1, destp, dlen, 0, addr) == -1) { -printf(ofw_mapmem: virtual claim failed\n); -return (ENOMEM); -} - -if (OF_call_method(map, mmu, 4, 0, destp, destp, dlen, 0) == -1) { -printf(ofw_mapmem: map failed\n); -return (ENOMEM); -} + /* +* We only do virtual memory management when real_mode is false. +*/ + if (real_mode == 0) { + if (OF_call_method(claim, mmu, 3, 1, destp, dlen, 0, addr) + == -1) { + printf(ofw_mapmem: virtual claim failed\n); + return (ENOMEM); + } + if (OF_call_method(map, mmu, 4, 0, destp, destp, dlen, 0) + == -1) { + printf(ofw_mapmem: map failed\n); + return (ENOMEM); + } + } last_dest = (vm_offset_t) destp; last_len = dlen; Modified: head/sys/boot/ofw/libofw/openfirm.c == --- head/sys/boot/ofw/libofw/openfirm.c Wed Nov 17 19:31:48 2010 (r215437) +++ head/sys/boot/ofw/libofw/openfirm.c Wed Nov 17 19:35:56 2010 (r215438) @@ -69,12 +69,15 @@ int (*openfirmware)(void *); phandle_t chosen; ihandle_t mmu; ihandle_t memory; +int real_mode = 0; /* Initialiser */ void OF_init(int (*openfirm)(void *)) { + phandle_t options; + char mode[8]; openfirmware = openfirm; @@ -89,6 +92,15 @@ OF_init(int (*openfirm)(void *)) } if (OF_getprop(chosen, mmu, mmu, sizeof(mmu)) == -1) OF_exit(); + + /* +* Check if we run in real mode. If so, we do not need to map +* memory later on. +*/ + options = OF_finddevice(/options); + OF_getprop(options, real-mode?, mode, sizeof(mode)); + if (strncmp(mode, true, 4) == 0) + real_mode = 1; } /* Modified: head/sys/boot/ofw/libofw/openfirm.h == --- head/sys/boot/ofw/libofw/openfirm.h Wed Nov 17 19:31:48 2010 (r215437) +++ head/sys/boot/ofw/libofw/openfirm.h Wed Nov 17 19:35:56 2010 (r215438) @@ -72,6 +72,7 @@ typedef unsigned long int cell_t; extern int (*openfirmware)(void *); extern phandle_t chosen; extern ihandle_t memory, mmu; +extern int real_mode; /* * This isn't actually an Open Firmware function, but it seemed like the right ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215439 - in head/gnu/usr.bin: binutils/ld cc/cc_tools
Author: tijl Date: Wed Nov 17 19:54:01 2010 New Revision: 215439 URL: http://svn.freebsd.org/changeset/base/215439 Log: Let gcc and ld know where to find 32 bit libraries on amd64. Reviewed by: arch@ Approved by: kib (mentor) Modified: head/gnu/usr.bin/binutils/ld/Makefile.amd64 head/gnu/usr.bin/cc/cc_tools/Makefile Modified: head/gnu/usr.bin/binutils/ld/Makefile.amd64 == --- head/gnu/usr.bin/binutils/ld/Makefile.amd64 Wed Nov 17 19:35:56 2010 (r215438) +++ head/gnu/usr.bin/binutils/ld/Makefile.amd64 Wed Nov 17 19:54:01 2010 (r215439) @@ -12,7 +12,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT ${NATIVE_EMULATION} no ${NATIVE_EMULATION} ${TARGET_TUPLE} X86_EMULATION= elf_i386_fbsd -_i386_path=\${TOOLS_PREFIX}/usr/lib/i386\ +_i386_path=\${TOOLS_PREFIX}/usr/lib32\ EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+=${X86_EMULATION}.${ext} Modified: head/gnu/usr.bin/cc/cc_tools/Makefile == --- head/gnu/usr.bin/cc/cc_tools/Makefile Wed Nov 17 19:35:56 2010 (r215438) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Wed Nov 17 19:54:01 2010 (r215439) @@ -307,7 +307,7 @@ GENSRCS+= gcov-iov.h # Multilib config file multilib.h: -.if ${TARGET_ARCH} == powerpc64 +.if ${TARGET_ARCH} == powerpc64 || ${TARGET_ARCH} == amd64 echo 'static const char *const multilib_raw[] = { \ . !m64 !m32;, \ 64:../lib m64 !m32;, \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215441 - head/sys/boot/powerpc/ofw
Author: andreast Date: Wed Nov 17 20:37:16 2010 New Revision: 215441 URL: http://svn.freebsd.org/changeset/base/215441 Log: Revert r215435. We need to figure out the exact value to be loaded. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/powerpc/ofw/start.c Modified: head/sys/boot/powerpc/ofw/start.c == --- head/sys/boot/powerpc/ofw/start.c Wed Nov 17 20:21:10 2010 (r215440) +++ head/sys/boot/powerpc/ofw/start.c Wed Nov 17 20:37:16 2010 (r215441) @@ -48,7 +48,7 @@ stack:\n\ _start:\n\ lis %r1,st...@ha\n\ addi%r1,%r1,st...@l \n\ - addi%r1,%r1,16384 \n\ + addi%r1,%r1,8192\n\ \n\ /* Clear the .bss!!! */ \n\ li %r0,0 \n\ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r215443 - in head/sys: kern sys
Author: jhb Date: Wed Nov 17 22:28:04 2010 New Revision: 215443 URL: http://svn.freebsd.org/changeset/base/215443 Log: Add a resource_list_reserved() method that returns true if a resource list entry contains a reserved resource. Modified: head/sys/kern/subr_bus.c head/sys/sys/bus.h Modified: head/sys/kern/subr_bus.c == --- head/sys/kern/subr_bus.cWed Nov 17 21:45:11 2010(r215442) +++ head/sys/kern/subr_bus.cWed Nov 17 22:28:04 2010(r215443) @@ -2934,6 +2934,30 @@ resource_list_busy(struct resource_list } /** + * @brief Determine if a resource entry is reserved. + * + * Returns true if a resource entry is reserved meaning that it has an + * associated reserved resource. The resource can either be + * allocated or unallocated. + * + * @param rl the resource list to search + * @param type the resource entry type (e.g. SYS_RES_MEMORY) + * @param rid the resource identifier + * + * @returns Non-zero if the entry is reserved, zero otherwise. + */ +int +resource_list_reserved(struct resource_list *rl, int type, int rid) +{ + struct resource_list_entry *rle; + + rle = resource_list_find(rl, type, rid); + if (rle != NULL rle-flags RLE_RESERVED) + return (1); + return (0); +} + +/** * @brief Find a resource entry by type and rid. * * @param rl the resource list to search Modified: head/sys/sys/bus.h == --- head/sys/sys/bus.h Wed Nov 17 21:45:11 2010(r215442) +++ head/sys/sys/bus.h Wed Nov 17 22:28:04 2010(r215443) @@ -256,6 +256,7 @@ int resource_list_add_next(struct resour u_long start, u_long end, u_long count); intresource_list_busy(struct resource_list *rl, int type, int rid); +intresource_list_reserved(struct resource_list *rl, int type, int rid); struct resource_list_entry* resource_list_find(struct resource_list *rl, int type, int rid); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org