svn commit: r287124 - head/sys/netinet6
Author: adrian Date: Tue Aug 25 06:12:59 2015 New Revision: 287124 URL: https://svnweb.freebsd.org/changeset/base/287124 Log: Call the new RSS hash calculation function to correctly calculate a hash based on the configured requirements for the protocol. Tested: * UDP IPv6 TX/RX testing, w/ RSS enabled, 82599 ixgbe(4) hardware Modified: head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/udp6_usrreq.c == --- head/sys/netinet6/udp6_usrreq.c Tue Aug 25 05:31:00 2015 (r287123) +++ head/sys/netinet6/udp6_usrreq.c Tue Aug 25 06:12:59 2015 (r287124) @@ -840,19 +840,36 @@ udp6_output(struct inpcb *inp, struct mb m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); } - /* -* XXX for now assume UDP is 2-tuple. -* Later on this may become configurable as 4-tuple; -* we should support that. -* -* XXX .. and we should likely cache this in the inpcb. -*/ #ifdef RSS - m->m_pkthdr.flowid = rss_hash_ip6_2tuple(faddr, laddr); - M_HASHTYPE_SET(m, M_HASHTYPE_RSS_IPV6); + { + uint32_t hash_val, hash_type; + uint8_t pr; + + pr = inp->inp_socket->so_proto->pr_protocol; + /* +* Calculate an appropriate RSS hash for UDP and +* UDP Lite. +* +* The called function will take care of figuring out +* whether a 2-tuple or 4-tuple hash is required based +* on the currently configured scheme. +* +* Later later on connected socket values should be +* cached in the inpcb and reused, rather than constantly +* re-calculating it. +* +* UDP Lite is a different protocol number and will +* likely end up being hashed as a 2-tuple until +* RSS / NICs grow UDP Lite protocol awareness. +*/ + if (rss_proto_software_hash_v6(faddr, laddr, fport, + inp->inp_lport, pr, &hash_val, &hash_type) == 0) { + m->m_pkthdr.flowid = hash_val; + M_HASHTYPE_SET(m, hash_type); + } + } #endif flags = 0; - #ifdef RSS /* * Don't override with the inp cached flowid. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287123 - head/usr.bin/at
Author: delphij Date: Tue Aug 25 05:31:00 2015 New Revision: 287123 URL: https://svnweb.freebsd.org/changeset/base/287123 Log: Finish r89633 and completely remove the remaining of VERSION. PR: bin/202308 Submitted by: John Hein MFC after:2 weeks Modified: head/usr.bin/at/Makefile.inc Modified: head/usr.bin/at/Makefile.inc == --- head/usr.bin/at/Makefile.incTue Aug 25 04:03:51 2015 (r287122) +++ head/usr.bin/at/Makefile.incTue Aug 25 05:31:00 2015 (r287123) @@ -1,4 +1,5 @@ -VERSION= 2.9 +# $FreeBSD$ + LOCKFILE = .lockfile ATSPOOL_DIR=/var/at/spool ATJOB_DIR=/var/at/jobs @@ -13,7 +14,7 @@ PERM_PATH=/var/at CFLAGS += -DATJOB_DIR=\"$(ATJOB_DIR)/\" \ -DLFILE=\"$(ATJOB_DIR)/$(LOCKFILE)\" \ -DLOADAVG_MX=$(LOADAVG_MX) -DATSPOOL_DIR=\"$(ATSPOOL_DIR)\" \ - -DVERSION=\"$(VERSION)\" -DDAEMON_UID=$(DAEMON_UID) -DDAEMON_GID=$(DAEMON_GID) \ + -DDAEMON_UID=$(DAEMON_UID) -DDAEMON_GID=$(DAEMON_GID) \ -DDEFAULT_BATCH_QUEUE=\'$(DEFAULT_BATCH_QUEUE)\' \ -DDEFAULT_AT_QUEUE=\'$(DEFAULT_AT_QUEUE)\' -DPERM_PATH=\"$(PERM_PATH)/\" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287122 - stable/10/usr.bin/mkimg
Author: marcel Date: Tue Aug 25 04:03:51 2015 New Revision: 287122 URL: https://svnweb.freebsd.org/changeset/base/287122 Log: MFC r286660, r286419, r286417, r286395, r286215, r284883 - Add the ntfs alias - Fix the dynamic VHD format to work with qemu - Update manpage MFH: Differential Revision: Modified: stable/10/usr.bin/mkimg/gpt.c stable/10/usr.bin/mkimg/image.c stable/10/usr.bin/mkimg/image.h stable/10/usr.bin/mkimg/mbr.c stable/10/usr.bin/mkimg/mkimg.1 stable/10/usr.bin/mkimg/scheme.c stable/10/usr.bin/mkimg/scheme.h stable/10/usr.bin/mkimg/vhd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkimg/gpt.c == --- stable/10/usr.bin/mkimg/gpt.c Tue Aug 25 01:01:25 2015 (r287121) +++ stable/10/usr.bin/mkimg/gpt.c Tue Aug 25 04:03:51 2015 (r287122) @@ -57,6 +57,7 @@ static uuid_t gpt_uuid_freebsd_ufs = GPT static uuid_t gpt_uuid_freebsd_vinum = GPT_ENT_TYPE_FREEBSD_VINUM; static uuid_t gpt_uuid_freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS; static uuid_t gpt_uuid_mbr = GPT_ENT_TYPE_MBR; +static uuid_t gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; static struct mkimg_alias gpt_aliases[] = { { ALIAS_EFI, ALIAS_PTR2TYPE(&gpt_uuid_efi) }, @@ -68,6 +69,7 @@ static struct mkimg_alias gpt_aliases[] { ALIAS_FREEBSD_VINUM, ALIAS_PTR2TYPE(&gpt_uuid_freebsd_vinum) }, { ALIAS_FREEBSD_ZFS, ALIAS_PTR2TYPE(&gpt_uuid_freebsd_zfs) }, { ALIAS_MBR, ALIAS_PTR2TYPE(&gpt_uuid_mbr) }, +{ ALIAS_NTFS, ALIAS_PTR2TYPE(&gpt_uuid_ms_basic_data) }, { ALIAS_NONE, 0 } /* Keep last! */ }; Modified: stable/10/usr.bin/mkimg/image.c == --- stable/10/usr.bin/mkimg/image.c Tue Aug 25 01:01:25 2015 (r287121) +++ stable/10/usr.bin/mkimg/image.c Tue Aug 25 04:03:51 2015 (r287122) @@ -517,14 +517,14 @@ image_copyout_memory(int fd, size_t size return (0); } -static int -image_copyout_zeroes(int fd, size_t size) +int +image_copyout_zeroes(int fd, size_t count) { static uint8_t *zeroes = NULL; size_t sz; int error; - if (lseek(fd, (off_t)size, SEEK_CUR) != -1) + if (lseek(fd, (off_t)count, SEEK_CUR) != -1) return (0); /* @@ -537,12 +537,12 @@ image_copyout_zeroes(int fd, size_t size return (ENOMEM); } - while (size > 0) { - sz = (size > secsz) ? secsz : size; + while (count > 0) { + sz = (count > secsz) ? secsz : count; error = image_copyout_memory(fd, sz, zeroes); if (error) return (error); - size -= sz; + count -= sz; } return (0); } Modified: stable/10/usr.bin/mkimg/image.h == --- stable/10/usr.bin/mkimg/image.h Tue Aug 25 01:01:25 2015 (r287121) +++ stable/10/usr.bin/mkimg/image.h Tue Aug 25 04:03:51 2015 (r287122) @@ -35,6 +35,7 @@ int image_copyin(lba_t blk, int fd, uint int image_copyout(int fd); int image_copyout_done(int fd); int image_copyout_region(int fd, lba_t blk, lba_t size); +int image_copyout_zeroes(int fd, size_t count); int image_data(lba_t blk, lba_t size); lba_t image_get_size(void); int image_init(void); Modified: stable/10/usr.bin/mkimg/mbr.c == --- stable/10/usr.bin/mkimg/mbr.c Tue Aug 25 01:01:25 2015 (r287121) +++ stable/10/usr.bin/mkimg/mbr.c Tue Aug 25 04:03:51 2015 (r287122) @@ -51,6 +51,7 @@ static struct mkimg_alias mbr_aliases[] { ALIAS_EFI, ALIAS_INT2TYPE(DOSPTYP_EFI) }, { ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) }, { ALIAS_FREEBSD, ALIAS_INT2TYPE(DOSPTYP_386BSD) }, +{ ALIAS_NTFS, ALIAS_INT2TYPE(DOSPTYP_NTFS) }, { ALIAS_NONE, 0 } /* Keep last! */ }; Modified: stable/10/usr.bin/mkimg/mkimg.1 == --- stable/10/usr.bin/mkimg/mkimg.1 Tue Aug 25 01:01:25 2015 (r287121) +++ stable/10/usr.bin/mkimg/mkimg.1 Tue Aug 25 04:03:51 2015 (r287122) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 22, 2015 +.Dd August 7, 2015 .Dt MKIMG 1 .Os .Sh NAME @@ -141,7 +141,7 @@ utility will create images that are iden .Pp A set of long options exist to query about the .Nm -utilty itself. +utility itself. Options in this set should be given by themselves because the .Nm utility exits immediately after providing the requested information. @@ -165,6 +165,85 @@ run the .Nm utility without any arguments. This will print a usage message with all the necessary details. +.Sh DISK FORMATS +The +.Nm +utility s
svn commit: r287121 - head/sys/vm
Author: alc Date: Tue Aug 25 01:01:25 2015 New Revision: 287121 URL: https://svnweb.freebsd.org/changeset/base/287121 Log: Testing whether a page is dirty does not require the page lock. Moreover, it may involve a pmap operation that iterates over the page's PV list, so unnecessarily holding the page lock is undesirable. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c == --- head/sys/vm/vm_pageout.cMon Aug 24 23:40:36 2015(r287120) +++ head/sys/vm/vm_pageout.cTue Aug 25 01:01:25 2015(r287121) @@ -415,10 +415,13 @@ more: ib = 0; break; } - vm_page_lock(p); vm_page_test_dirty(p); - if (p->dirty == 0 || - p->queue != PQ_INACTIVE || + if (p->dirty == 0) { + ib = 0; + break; + } + vm_page_lock(p); + if (p->queue != PQ_INACTIVE || p->hold_count != 0) { /* may be undergoing I/O */ vm_page_unlock(p); ib = 0; @@ -442,10 +445,11 @@ more: if ((p = vm_page_next(ps)) == NULL || vm_page_busied(p)) break; - vm_page_lock(p); vm_page_test_dirty(p); - if (p->dirty == 0 || - p->queue != PQ_INACTIVE || + if (p->dirty == 0) + break; + vm_page_lock(p); + if (p->queue != PQ_INACTIVE || p->hold_count != 0) { /* may be undergoing I/O */ vm_page_unlock(p); break; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287120 - head/sys/net/altq
Author: loos Date: Mon Aug 24 23:40:36 2015 New Revision: 287120 URL: https://svnweb.freebsd.org/changeset/base/287120 Log: Fix the spelling of eri's name. Pointy hat to:loos MFC with: r287009 Modified: head/sys/net/altq/altq_codel.c head/sys/net/altq/altq_codel.h Modified: head/sys/net/altq/altq_codel.c == --- head/sys/net/altq/altq_codel.c Mon Aug 24 21:41:05 2015 (r287119) +++ head/sys/net/altq/altq_codel.c Mon Aug 24 23:40:36 2015 (r287120) @@ -1,7 +1,7 @@ /* * CoDel - The Controlled-Delay Active Queue Management algorithm * - * Copyright (C) 2013 Ermal Luci + * Copyright (C) 2013 Ermal Luçi * Copyright (C) 2011-2012 Kathleen Nichols * Copyright (C) 2011-2012 Van Jacobson * Copyright (C) 2012 Michael D. Taht Modified: head/sys/net/altq/altq_codel.h == --- head/sys/net/altq/altq_codel.h Mon Aug 24 21:41:05 2015 (r287119) +++ head/sys/net/altq/altq_codel.h Mon Aug 24 23:40:36 2015 (r287120) @@ -1,7 +1,7 @@ /* * CoDel - The Controlled-Delay Active Queue Management algorithm * - * Copyright (C) 2013 Ermal Luci + * Copyright (C) 2013 Ermal Luçi * Copyright (C) 2011-2012 Kathleen Nichols * Copyright (C) 2011-2012 Van Jacobson * Copyright (C) 2012 Michael D. Taht ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287119 - head/sys/netpfil/pf
Author: loos Date: Mon Aug 24 21:41:05 2015 New Revision: 287119 URL: https://svnweb.freebsd.org/changeset/base/287119 Log: Reapply r196551 which was accidentally reverted by r223637 (update to OpenBSD pf 4.5). Fix argument ordering to memcpy as well as the size of the copy in the (theoretical) case that pfi_buffer_cnt should be greater than ~_max. This fix the failure when you hit the self table size and force it to be resized. MFC after:3 days Sponsored by: Rubicon Communications (Netgate) Modified: head/sys/netpfil/pf/pf_if.c Modified: head/sys/netpfil/pf/pf_if.c == --- head/sys/netpfil/pf/pf_if.c Mon Aug 24 20:39:22 2015(r287118) +++ head/sys/netpfil/pf/pf_if.c Mon Aug 24 21:41:05 2015(r287119) @@ -581,7 +581,7 @@ pfi_address_add(struct sockaddr *sa, int __func__, V_pfi_buffer_cnt, PFI_BUFFER_MAX); return; } - memcpy(V_pfi_buffer, p, V_pfi_buffer_cnt * sizeof(*V_pfi_buffer)); + memcpy(p, V_pfi_buffer, V_pfi_buffer_max * sizeof(*V_pfi_buffer)); /* no need to zero buffer */ free(V_pfi_buffer, PFI_MTYPE); V_pfi_buffer = p; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r287117 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ioat sys/modules sys/modules/ioat tools/tools/ioat
On Mon, Aug 24, 2015 at 1:18 PM, Xin Li wrote: > Hi, > > Quick question -- why the ioatcontrol is not imported to e.g. usr.sbin > instead? > > Cheers, > -- > Xin LI https://www.delphij.net/ Hi, The tool's name is a little misleading. It's not a general purpose tool — it's really only useful to developers working on the driver. I don't think it belongs in base. Thanks, Conrad ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287118 - head/tools/tools/ioat
Author: cem Date: Mon Aug 24 20:39:22 2015 New Revision: 287118 URL: https://svnweb.freebsd.org/changeset/base/287118 Log: ioatcontrol(8): Fix build Tripped up by the FBSD SVN pre-commit hook! Approved by: markj (mentor) Sponsored by: EMC / Isilon Storage Division Modified: head/tools/tools/ioat/ioatcontrol.c Modified: head/tools/tools/ioat/ioatcontrol.c == --- head/tools/tools/ioat/ioatcontrol.c Mon Aug 24 19:32:03 2015 (r287117) +++ head/tools/tools/ioat/ioatcontrol.c Mon Aug 24 20:39:22 2015 (r287118) @@ -24,6 +24,7 @@ * SUCH DAMAGE. */ +#include __FBSDID("$FreeBSD$"); #include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r287117 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ioat sys/modules sys/modules/ioat tools/tools/ioat
Hi, On 08/24/15 12:32, Conrad E. Meyer wrote: > Author: cem > Date: Mon Aug 24 19:32:03 2015 > New Revision: 287117 > URL: https://svnweb.freebsd.org/changeset/base/287117 > > Log: > Import ioat(4) driver > > Added: > head/share/man/man4/ioat.4 (contents, props changed) > head/sys/dev/ioat/ > head/sys/dev/ioat/ioat.c (contents, props changed) > head/sys/dev/ioat/ioat.h (contents, props changed) > head/sys/dev/ioat/ioat_hw.h (contents, props changed) > head/sys/dev/ioat/ioat_internal.h (contents, props changed) > head/sys/dev/ioat/ioat_test.c (contents, props changed) > head/sys/dev/ioat/ioat_test.h (contents, props changed) > head/sys/modules/ioat/ > head/sys/modules/ioat/Makefile (contents, props changed) > head/tools/tools/ioat/ > head/tools/tools/ioat/Makefile (contents, props changed) > head/tools/tools/ioat/ioatcontrol.8 (contents, props changed) > head/tools/tools/ioat/ioatcontrol.c (contents, props changed) Thanks! Quick question -- why the ioatcontrol is not imported to e.g. usr.sbin instead? Cheers, -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die signature.asc Description: OpenPGP digital signature
Re: svn commit: r287117 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ioat sys/modules sys/modules/ioat tools/tools/ioat
On Mon, Aug 24, 2015 at 12:32 PM, Conrad E. Meyer wrote: > Author: cem > Date: Mon Aug 24 19:32:03 2015 > New Revision: 287117 > URL: https://svnweb.freebsd.org/changeset/base/287117 > > Log: > Import ioat(4) driver > > I/OAT is also referred to as Crystal Beach DMA and is a Platform Storage > Extension (PSE) on some Intel server platforms. > > This driver currently supports DMA descriptors only and is part of a > larger effort to upstream an interconnect between multiple systems using > the Non-Transparent Bridge (NTB) PSE. > > For now, this driver is only built on AMD64 platforms. It may be ported > to work on i386 later, if that is desired. The hardware is exclusive to > x86. > > Further documentation on ioat(4), including API documentation and usage, > can be found in the new manual page. > > Bring in a test tool, ioatcontrol(8), in tools/tools/ioat. The test > tool is not hooked up to the build and is not intended for end users. > > Submitted by: jimharris, Carl Delsey > Reviewed by: jimharris (reviewed my changes) > Approved by: markj (mentor) > Relnotes: yes > Sponsored by: Intel > Sponsored by: EMC / Isilon Storage Division > Differential Revision:https://reviews.freebsd.org/D3456 > > Thanks! ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287117 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ioat sys/modules sys/modules/ioat tools/tools/ioat
Author: cem Date: Mon Aug 24 19:32:03 2015 New Revision: 287117 URL: https://svnweb.freebsd.org/changeset/base/287117 Log: Import ioat(4) driver I/OAT is also referred to as Crystal Beach DMA and is a Platform Storage Extension (PSE) on some Intel server platforms. This driver currently supports DMA descriptors only and is part of a larger effort to upstream an interconnect between multiple systems using the Non-Transparent Bridge (NTB) PSE. For now, this driver is only built on AMD64 platforms. It may be ported to work on i386 later, if that is desired. The hardware is exclusive to x86. Further documentation on ioat(4), including API documentation and usage, can be found in the new manual page. Bring in a test tool, ioatcontrol(8), in tools/tools/ioat. The test tool is not hooked up to the build and is not intended for end users. Submitted by: jimharris, Carl Delsey Reviewed by: jimharris (reviewed my changes) Approved by: markj (mentor) Relnotes: yes Sponsored by: Intel Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D3456 Added: head/share/man/man4/ioat.4 (contents, props changed) head/sys/dev/ioat/ head/sys/dev/ioat/ioat.c (contents, props changed) head/sys/dev/ioat/ioat.h (contents, props changed) head/sys/dev/ioat/ioat_hw.h (contents, props changed) head/sys/dev/ioat/ioat_internal.h (contents, props changed) head/sys/dev/ioat/ioat_test.c (contents, props changed) head/sys/dev/ioat/ioat_test.h (contents, props changed) head/sys/modules/ioat/ head/sys/modules/ioat/Makefile (contents, props changed) head/tools/tools/ioat/ head/tools/tools/ioat/Makefile (contents, props changed) head/tools/tools/ioat/ioatcontrol.8 (contents, props changed) head/tools/tools/ioat/ioatcontrol.c (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/amd64/conf/NOTES head/sys/conf/files.amd64 head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileMon Aug 24 19:09:56 2015 (r287116) +++ head/share/man/man4/MakefileMon Aug 24 19:32:03 2015 (r287117) @@ -207,6 +207,7 @@ MAN=aac.4 \ intpm.4 \ intro.4 \ ${_io.4} \ + ${_ioat.4} \ ip.4 \ ip6.4 \ ipfirewall.4 \ @@ -800,6 +801,7 @@ _xnb.4= xnb.4 .if ${MACHINE_CPUARCH} == "amd64" _if_ntb.4= if_ntb.4 +_ioat.4= ioat.4 _ntb.4=ntb.4 _ntb_hw.4= ntb_hw.4 _qlxge.4= qlxge.4 Added: head/share/man/man4/ioat.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ioat.4 Mon Aug 24 19:32:03 2015(r287117) @@ -0,0 +1,153 @@ +.\" Copyright (c) 2015 EMC / Isilon Storage Division +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 24, 2015 +.Dt IOAT 4 +.Os +.Sh NAME +.Nm I/OAT +.Nd Intel I/O Acceleration Technology +.Sh SYNOPSIS +.Cd "device ioat" +In +.Xr loader.conf 5 : +.Pp +.Cd hw.ioat.force_legacy_interrupts=0 +.Pp +In +.Xr loader.conf 5 or +.Xr sysctl.conf 5 : +.Pp +.Cd hw.ioat.enable_ioat_test=0 +.Cd hw.ioat.debug_level=0 +(only critical errors; maximum of 3) +.Pp +.Ft typedef void +.Fn (*bus_dmaengine_callback_t) "void *arg" +.Pp +.Ft bus_dmaengine_t +.Fn ioat_get_dmaengine "uint32_t channel_index" +.Ft void +.Fn ioat_acquire "bus_dmaengine_t dmaengine" +.Ft void +.Fn ioat_release "bus_dmaeng
svn commit: r287116 - head/sys/mips/mips
Author: adrian Date: Mon Aug 24 19:09:56 2015 New Revision: 287116 URL: https://svnweb.freebsd.org/changeset/base/287116 Log: Enable hardfloat for assembly generation. gcc versions later than 4.2 started erroring out on seeing hardware floating point references when soft-float was enabled. Reviewed by: imp Modified: head/sys/mips/mips/fp.S Modified: head/sys/mips/mips/fp.S == --- head/sys/mips/mips/fp.S Mon Aug 24 18:57:32 2015(r287115) +++ head/sys/mips/mips/fp.S Mon Aug 24 19:09:56 2015(r287116) @@ -76,6 +76,8 @@ #defineCOND_LESS 0x4 #defineCOND_SIGNAL 0x8 +.set hardfloat + /* * * MipsEmulateFP -- ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287115 - head/sys/dev/hwpmc
Author: bz Date: Mon Aug 24 18:57:32 2015 New Revision: 287115 URL: https://svnweb.freebsd.org/changeset/base/287115 Log: When forking a child process with PMC_F_DESCENDANTS set in pmc_attach() in the parent, we will inherit the pmcids but cannot execute any operations on them in the child. The reason for this is that pmc_find_pmc() only tries to find the current process on the owners hash list, but given the child does not own the attachment, we cannot find it. Thus, in case the initial lookup fails, try to find the pmc_process state affiliated with the child process, lookup the pmc from there using the row index, and get the owner process from that pmc. Then continue as normal and lookup the pmc context of the owner (process). This allows us to call, e.g., pmc_start() in the child process before we start the work there, but to collect the accumulated results later in the parent. Sponsored by: DARPA,AFRL Obtained from:L41 Tested by:rwatson, L41 MFC after:4 weeks Reviewed by: gnn Differential Revision:https://reviews.freebsd.org/D2052 Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c == --- head/sys/dev/hwpmc/hwpmc_mod.c Mon Aug 24 17:58:11 2015 (r287114) +++ head/sys/dev/hwpmc/hwpmc_mod.c Mon Aug 24 18:57:32 2015 (r287115) @@ -2538,13 +2538,35 @@ static int pmc_find_pmc(pmc_id_t pmcid, struct pmc **pmc) { - struct pmc *pm; + struct pmc *pm, *opm; struct pmc_owner *po; + struct pmc_process *pp; + KASSERT(PMC_ID_TO_ROWINDEX(pmcid) < md->pmd_npmc, + ("[pmc,%d] Illegal pmc index %d (max %d)", __LINE__, + PMC_ID_TO_ROWINDEX(pmcid), md->pmd_npmc)); PMCDBG1(PMC,FND,1, "find-pmc id=%d", pmcid); - if ((po = pmc_find_owner_descriptor(curthread->td_proc)) == NULL) - return ESRCH; + if ((po = pmc_find_owner_descriptor(curthread->td_proc)) == NULL) { + /* +* In case of PMC_F_DESCENDANTS child processes we will not find +* the current process in the owners hash list. Find the owner +* process first and from there lookup the po. +*/ + if ((pp = pmc_find_process_descriptor(curthread->td_proc, + PMC_FLAG_NONE)) == NULL) { + return ESRCH; + } else { + opm = pp->pp_pmcs[PMC_ID_TO_ROWINDEX(pmcid)].pp_pmc; + if (opm == NULL) + return ESRCH; + if ((opm->pm_flags & (PMC_F_ATTACHED_TO_OWNER| + PMC_F_DESCENDANTS)) != (PMC_F_ATTACHED_TO_OWNER| + PMC_F_DESCENDANTS)) + return ESRCH; + po = opm->pm_owner; + } + } if ((pm = pmc_find_pmc_descriptor_in_process(po, pmcid)) == NULL) return EINVAL; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287114 - head/contrib/libxo/libxo
Author: marcel Date: Mon Aug 24 17:58:11 2015 New Revision: 287114 URL: https://svnweb.freebsd.org/changeset/base/287114 Log: Fix build for architectures that define wchar_t as an unsigned int. Reported by: bz@ Modified: head/contrib/libxo/libxo/xo_wcwidth.h Modified: head/contrib/libxo/libxo/xo_wcwidth.h == --- head/contrib/libxo/libxo/xo_wcwidth.h Mon Aug 24 17:28:19 2015 (r287113) +++ head/contrib/libxo/libxo/xo_wcwidth.h Mon Aug 24 17:58:11 2015 (r287114) @@ -62,8 +62,8 @@ #include struct interval { - int first; - int last; + wchar_t first; + wchar_t last; }; /* auxiliary function for binary search in interval table */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r287111 - in head: bin/ls bin/ps contrib/libxo contrib/libxo/bin contrib/libxo/doc contrib/libxo/encoder contrib/libxo/encoder/cbor contrib/libxo/encoder/test contrib/libxo/libxo contr
> On Aug 24, 2015, at 10:07 AM, Bjoern A. Zeeb wrote: > > >> On 24 Aug 2015, at 16:26 , Marcel Moolenaar wrote: >> >> Author: marcel >> Date: Mon Aug 24 16:26:20 2015 >> New Revision: 287111 >> URL: https://svnweb.freebsd.org/changeset/base/287111 >> >> Log: >> Upgrade libxo to 0.4.5. >> >> Local changes incorporated by 0.4.5: r284340 >> Local changes retained: r276260, r282117 >> >> Obtained from: https://github.com/Juniper/libxo > > > arm* broke with a couple of those: > > In file included from /scratch/tmp/bz/head.svn/contrib/libxo/libxo/libxo.c:73: > /scratch/tmp/bz/head.svn/contrib/libxo/libxo/xo_wcwidth.h:76:11: error: > comparison of integers of different signs: 'wchar_t' (aka 'unsigned int') and > 'const int' [-Werror,-Wsign-compare] > if (ucs < table[0].first || ucs > table[max].last) > ~~~ ^ ~~ Ugh. Thanks, -- Marcel Moolenaar mar...@xcllnt.net signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r287113 - head/sys/arm64/arm64
Author: andrew Date: Mon Aug 24 17:28:19 2015 New Revision: 287113 URL: https://svnweb.freebsd.org/changeset/base/287113 Log: Check the frame pointer is within the kernel before accessing it. Modified: head/sys/arm64/arm64/unwind.c Modified: head/sys/arm64/arm64/unwind.c == --- head/sys/arm64/arm64/unwind.c Mon Aug 24 16:32:57 2015 (r287112) +++ head/sys/arm64/arm64/unwind.c Mon Aug 24 17:28:19 2015 (r287113) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include int unwind_frame(struct unwind_state *frame) @@ -39,7 +40,7 @@ unwind_frame(struct unwind_state *frame) uint64_t fp; fp = frame->fp; - if (fp == 0) + if (!INKERNEL(fp)) return (-1); frame->sp = fp + 0x10; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r287111 - in head: bin/ls bin/ps contrib/libxo contrib/libxo/bin contrib/libxo/doc contrib/libxo/encoder contrib/libxo/encoder/cbor contrib/libxo/encoder/test contrib/libxo/libxo contr
> On 24 Aug 2015, at 16:26 , Marcel Moolenaar wrote: > > Author: marcel > Date: Mon Aug 24 16:26:20 2015 > New Revision: 287111 > URL: https://svnweb.freebsd.org/changeset/base/287111 > > Log: > Upgrade libxo to 0.4.5. > > Local changes incorporated by 0.4.5: r284340 > Local changes retained: r276260, r282117 > > Obtained from: https://github.com/Juniper/libxo arm* broke with a couple of those: In file included from /scratch/tmp/bz/head.svn/contrib/libxo/libxo/libxo.c:73: /scratch/tmp/bz/head.svn/contrib/libxo/libxo/xo_wcwidth.h:76:11: error: comparison of integers of different signs: 'wchar_t' (aka 'unsigned int') and 'const int' [-Werror,-Wsign-compare] if (ucs < table[0].first || ucs > table[max].last) ~~~ ^ ~~ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287112 - head/sys/dev/e1000
Author: sbruno Date: Mon Aug 24 16:32:57 2015 New Revision: 287112 URL: https://svnweb.freebsd.org/changeset/base/287112 Log: Style/whitespace cleanup in shared/common code. Differential Revision:https://reviews.freebsd.org/D3159 Submitted by: erj MFC after:2 weeks Modified: head/sys/dev/e1000/e1000_82541.c head/sys/dev/e1000/e1000_82541.h head/sys/dev/e1000/e1000_82542.c head/sys/dev/e1000/e1000_82543.c head/sys/dev/e1000/e1000_82543.h head/sys/dev/e1000/e1000_82571.h head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_api.h head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_manage.c head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_regs.h Modified: head/sys/dev/e1000/e1000_82541.c == --- head/sys/dev/e1000/e1000_82541.cMon Aug 24 16:26:20 2015 (r287111) +++ head/sys/dev/e1000/e1000_82541.cMon Aug 24 16:32:57 2015 (r287112) @@ -49,34 +49,34 @@ static s32 e1000_init_mac_params_82541( static s32 e1000_reset_hw_82541(struct e1000_hw *hw); static s32 e1000_init_hw_82541(struct e1000_hw *hw); static s32 e1000_get_link_up_info_82541(struct e1000_hw *hw, u16 *speed, - u16 *duplex); +u16 *duplex); static s32 e1000_phy_hw_reset_82541(struct e1000_hw *hw); static s32 e1000_setup_copper_link_82541(struct e1000_hw *hw); static s32 e1000_check_for_link_82541(struct e1000_hw *hw); static s32 e1000_get_cable_length_igp_82541(struct e1000_hw *hw); static s32 e1000_set_d3_lplu_state_82541(struct e1000_hw *hw, - bool active); + bool active); static s32 e1000_setup_led_82541(struct e1000_hw *hw); static s32 e1000_cleanup_led_82541(struct e1000_hw *hw); static void e1000_clear_hw_cntrs_82541(struct e1000_hw *hw); static s32 e1000_read_mac_addr_82541(struct e1000_hw *hw); static s32 e1000_config_dsp_after_link_change_82541(struct e1000_hw *hw, - bool link_up); +bool link_up); static s32 e1000_phy_init_script_82541(struct e1000_hw *hw); static void e1000_power_down_phy_copper_82541(struct e1000_hw *hw); -static const u16 e1000_igp_cable_length_table[] = -{ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 25, 25, 25, - 25, 25, 25, 25, 30, 30, 30, 30, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 50, 50, 50, 50, 50, 50, 50, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 70, 70, 70, 70, 70, 70, 80, 80, 80, 80, 80, 80, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120}; +static const u16 e1000_igp_cable_length_table[] = { + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, + 10, 10, 20, 20, 20, 20, 20, 25, 25, 25, 25, 25, 25, 25, 30, 30, 30, 30, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 50, 50, 50, 50, 50, 50, 50, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 70, 70, 70, 70, 70, 70, 80, 80, 80, 80, 80, + 80, 90, 90, 90, 90, 90, 90, 90, 90, 90, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120}; #define IGP01E1000_AGC_LENGTH_TABLE_SIZE \ -(sizeof(e1000_igp_cable_length_table) / \ - sizeof(e1000_igp_cable_length_table[0])) + (sizeof(e1000_igp_cable_length_table) / \ +sizeof(e1000_igp_cable_length_table[0])) /** * e1000_init_phy_params_82541 - Init PHY func ptrs. @@ -89,23 +89,23 @@ static s32 e1000_init_phy_params_82541(s DEBUGFUNC("e1000_init_phy_params_82541"); - phy->addr = 1; - phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; - phy->reset_delay_us= 1; - phy->type = e1000_phy_igp; + phy->addr = 1; + phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; + phy->reset_delay_us = 1; + phy->type = e1000_phy_igp; /* Function Pointers */ - phy->ops.check_polarity= e1000_check_polarity_igp; - phy->ops.force_speed_duplex= e1000_phy_force_speed_duplex_igp; - phy->ops.get_cable_length = e1000_get_cable_length_igp_82541; - phy->ops.get_cfg_done = e1000_get_cfg_done_generic; - phy->ops.get_info = e1000_get_phy_info_igp; - phy->ops.read_reg
svn commit: r287111 - in head: bin/ls bin/ps contrib/libxo contrib/libxo/bin contrib/libxo/doc contrib/libxo/encoder contrib/libxo/encoder/cbor contrib/libxo/encoder/test contrib/libxo/libxo contri...
Author: marcel Date: Mon Aug 24 16:26:20 2015 New Revision: 287111 URL: https://svnweb.freebsd.org/changeset/base/287111 Log: Upgrade libxo to 0.4.5. Local changes incorporated by 0.4.5: r284340 Local changes retained: r276260, r282117 Obtained from:https://github.com/Juniper/libxo Added: head/contrib/libxo/INSTALL.md head/contrib/libxo/encoder/ head/contrib/libxo/encoder/Makefile.am (contents, props changed) head/contrib/libxo/encoder/cbor/ head/contrib/libxo/encoder/cbor/Makefile.am (contents, props changed) head/contrib/libxo/encoder/cbor/enc_cbor.c (contents, props changed) head/contrib/libxo/encoder/test/ head/contrib/libxo/encoder/test/Makefile.am (contents, props changed) head/contrib/libxo/encoder/test/enc_test.c (contents, props changed) head/contrib/libxo/libxo/add.man head/contrib/libxo/libxo/add.man.in (contents, props changed) head/contrib/libxo/libxo/xo_buf.h (contents, props changed) head/contrib/libxo/libxo/xo_config.h - copied, changed from r287110, head/contrib/libxo/libxo/xoconfig.h head/contrib/libxo/libxo/xo_emit_err.3 (contents, props changed) head/contrib/libxo/libxo/xo_encoder.c (contents, props changed) head/contrib/libxo/libxo/xo_encoder.h (contents, props changed) head/contrib/libxo/libxo/xo_humanize.h (contents, props changed) head/contrib/libxo/libxo/xo_message.3 (contents, props changed) head/contrib/libxo/libxo/xo_set_syslog_enterprise_id.3 (contents, props changed) head/contrib/libxo/libxo/xo_syslog.3 (contents, props changed) head/contrib/libxo/libxo/xo_syslog.c (contents, props changed) head/contrib/libxo/libxo/xo_wcwidth.h (contents, props changed) head/contrib/libxo/tests/core/saved/test_01.E.err head/contrib/libxo/tests/core/saved/test_01.E.out head/contrib/libxo/tests/core/saved/test_02.E.err head/contrib/libxo/tests/core/saved/test_02.E.out head/contrib/libxo/tests/core/saved/test_03.E.err head/contrib/libxo/tests/core/saved/test_03.E.out head/contrib/libxo/tests/core/saved/test_04.E.err head/contrib/libxo/tests/core/saved/test_04.E.out head/contrib/libxo/tests/core/saved/test_05.E.err head/contrib/libxo/tests/core/saved/test_05.E.out (contents, props changed) head/contrib/libxo/tests/core/saved/test_06.E.err head/contrib/libxo/tests/core/saved/test_06.E.out head/contrib/libxo/tests/core/saved/test_07.E.err head/contrib/libxo/tests/core/saved/test_07.E.out head/contrib/libxo/tests/core/saved/test_08.E.err head/contrib/libxo/tests/core/saved/test_08.E.out head/contrib/libxo/tests/core/saved/test_09.E.err head/contrib/libxo/tests/core/saved/test_09.E.out head/contrib/libxo/tests/core/saved/test_10.E.err head/contrib/libxo/tests/core/saved/test_10.E.out head/contrib/libxo/tests/core/saved/test_11.E.err head/contrib/libxo/tests/core/saved/test_11.E.out head/contrib/libxo/tests/core/saved/test_11.H.err head/contrib/libxo/tests/core/saved/test_11.H.out head/contrib/libxo/tests/core/saved/test_11.HIPx.err head/contrib/libxo/tests/core/saved/test_11.HIPx.out head/contrib/libxo/tests/core/saved/test_11.HP.err head/contrib/libxo/tests/core/saved/test_11.HP.out head/contrib/libxo/tests/core/saved/test_11.J.err head/contrib/libxo/tests/core/saved/test_11.J.out head/contrib/libxo/tests/core/saved/test_11.JP.err head/contrib/libxo/tests/core/saved/test_11.JP.out head/contrib/libxo/tests/core/saved/test_11.T.err head/contrib/libxo/tests/core/saved/test_11.T.out head/contrib/libxo/tests/core/saved/test_11.X.err head/contrib/libxo/tests/core/saved/test_11.X.out head/contrib/libxo/tests/core/saved/test_11.XP.err head/contrib/libxo/tests/core/saved/test_11.XP.out head/contrib/libxo/tests/core/test_11.c (contents, props changed) head/contrib/libxo/tests/gettext/ head/contrib/libxo/tests/gettext/Makefile.am (contents, props changed) head/contrib/libxo/tests/gettext/gt_01.c (contents, props changed) head/contrib/libxo/tests/gettext/gt_01.pot head/contrib/libxo/tests/gettext/ldns.pot head/contrib/libxo/tests/gettext/po/ head/contrib/libxo/tests/gettext/po/pig_latin/ head/contrib/libxo/tests/gettext/po/pig_latin/gt_01.po head/contrib/libxo/tests/gettext/po/pig_latin/ldns.po head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po head/contrib/libxo/tests/gettext/saved/ head/contrib/libxo/tests/gettext/saved/gt_01.H.err head/contrib/libxo/tests/gettext/saved/gt_01.H.out head/contrib/libxo/tests/gettext/saved/gt_01.HIPx.err head/contrib/libxo/tests/gettext/saved/gt_01.HIPx.out head/contrib/libxo/tests/gettext/saved/gt_01.HP.err head/contrib/libxo/tests/gettext/saved/gt_01.HP.out head/contrib/libxo/tests/gettext/saved/gt_01.J.err head/contrib/libxo/tests/gettext/saved/gt_01.J.out head/contrib/libxo/tests/gettext/saved/gt_01.JP.err head/contrib/libxo/tests/gettext/saved/gt_01.JP.out head/contrib/libxo/tests/gettext/saved/gt_01.T.err head/contrib/libxo/tests/get
svn commit: r287110 - stable/10/usr.sbin/bhyve
Author: brueffer Date: Mon Aug 24 14:32:57 2015 New Revision: 287110 URL: https://svnweb.freebsd.org/changeset/base/287110 Log: MFC: r286409 Manpage cleanup. - new sentence -> new line - fix manpage references - fix macro usage - fix a typo Modified: stable/10/usr.sbin/bhyve/bhyve.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/bhyve.8 == --- stable/10/usr.sbin/bhyve/bhyve.8Mon Aug 24 14:04:44 2015 (r287109) +++ stable/10/usr.sbin/bhyve/bhyve.8Mon Aug 24 14:32:57 2015 (r287110) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 17, 2014 +.Dd August 7, 2015 .Dt BHYVE 8 .Os .Sh NAME @@ -50,7 +50,7 @@ Parameters such as the number of virtual I/O connectivity can be specified with command-line parameters. .Pp The guest operating system must be loaded with -.Xr bhyveload 4 +.Xr bhyveload 8 or a similar boot loader before running .Nm . .Pp @@ -61,8 +61,8 @@ exit is detected. .Bl -tag -width 10n .It Fl a The guest's local APIC is configured in xAPIC mode. -The xAPIC mode is the default setting so this option is redundant. It will be -deprecated in a future version. +The xAPIC mode is the default setting so this option is redundant. +It will be deprecated in a future version. .It Fl A Generate ACPI tables. Required for @@ -122,7 +122,7 @@ Force the guest virtual CPU to exit when .It Fl s Ar slot,emulation Ns Op , Ns Ar conf Configure a virtual PCI slot and function. .Pp -.Nm bhyve +.Nm provides PCI bus emulation and virtual devices that can be attached to slots on the bus. There are 32 available slots, with the option of providing up to 8 functions @@ -134,11 +134,19 @@ per slot. .Pp The .Ar pcislot -value is 0 to 31. The optional function value is 0 to 7. The optional +value is 0 to 31. +The optional +.Ar function +value is 0 to 7. +The optional .Ar bus value is 0 to 255. -If not specified, the function value defaults to 0. -If not specified, the bus value defaults to 0. +If not specified, the +.Ar function +value defaults to 0. +If not specified, the +.Ar bus +value defaults to 0. .It Ar emulation .Bl -tag -width 10n .It Li hostbridge | Li amd_hostbridge @@ -219,7 +227,9 @@ TTY devices: .Bl -tag -width 10n .It Li stdio Connect the serial port to the standard input and output of -the bhyve process. +the +.Nm +process. .It Pa /dev/xxx Use the host TTY device for serial port I/O. .El @@ -249,7 +259,8 @@ in the guest's System Management BIOS Sy By default a UUID is generated from the host's hostname and .Ar vmname . .It Fl w -Ignore accesses to unimplemented Model Specific Registers (MSRs). This is intended for debug purposes. +Ignore accesses to unimplemented Model Specific Registers (MSRs). +This is intended for debug purposes. .It Fl W Force virtio PCI device emulations to use MSI interrupts instead of MSI-X interrupts. @@ -264,7 +275,7 @@ This should be the same as that created .El .Sh EXAMPLES The guest operating system must have been loaded with -.Xr bhyveload 4 +.Xr bhyveload 8 or a similar boot loader before .Xr bhyve 4 can be run. @@ -292,7 +303,7 @@ Run an 8GB quad-CPU virtual machine with CD-ROM, a single virtio network port, an AMD hostbridge, and the console port connected to an .Xr nmdm 4 -null-model device. +null-modem device. .Bd -literal -offset indent bhyve -c 4 \\ -s 0,amd_hostbridge -s 1,lpc \\ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287109 - head/sys/fs/devfs
Author: trasz Date: Mon Aug 24 14:04:44 2015 New Revision: 287109 URL: https://svnweb.freebsd.org/changeset/base/287109 Log: Make it possible to forcibly unmount devfs. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/devfs/devfs_vfsops.c Modified: head/sys/fs/devfs/devfs_vfsops.c == --- head/sys/fs/devfs/devfs_vfsops.cMon Aug 24 13:46:12 2015 (r287108) +++ head/sys/fs/devfs/devfs_vfsops.cMon Aug 24 14:04:44 2015 (r287109) @@ -182,6 +182,8 @@ devfs_unmount(struct mount *mp, int mntf fmp = VFSTODEVFS(mp); KASSERT(fmp->dm_mount != NULL, ("devfs_unmount unmounted devfs_mount")); + if (mntflags & MNT_FORCE) + flags |= FORCECLOSE; /* There is 1 extra root vnode reference from devfs_mount(). */ error = vflush(mp, 1, flags, curthread); if (error) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287108 - in head: . share/mk
Author: bapt Date: Mon Aug 24 13:46:12 2015 New Revision: 287108 URL: https://svnweb.freebsd.org/changeset/base/287108 Log: Remove now unused LIBPRIVATEDIR Sponsored by: Gandi.net Modified: head/Makefile.inc1 head/share/mk/bsd.own.mk Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Mon Aug 24 13:18:13 2015(r287107) +++ head/Makefile.inc1 Mon Aug 24 13:46:12 2015(r287108) @@ -449,7 +449,6 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${LIB32 PATH=${TMPPATH} \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 \ - LIBPRIVATEDIR=/usr/lib32/private \ DTRACE="${DTRACE} -32" LIB32WMAKEFLAGS+= CC="${XCC} ${LIB32FLAGS}" \ CXX="${XCXX} ${LIB32FLAGS}" \ Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkMon Aug 24 13:18:13 2015(r287107) +++ head/share/mk/bsd.own.mkMon Aug 24 13:46:12 2015(r287108) @@ -28,8 +28,6 @@ # # LIBCOMPATDIR Base path for compat libraries. [/usr/lib/compat] # -# LIBPRIVATEDIRBase path for private libraries. [/usr/lib/private] -# # LIBDATADIR Base path for misc. utility data files. [/usr/libdata] # # LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec] @@ -171,7 +169,6 @@ DTBMODE?= 444 LIBDIR?= /usr/lib LIBCOMPATDIR?= /usr/lib/compat -LIBPRIVATEDIR?=/usr/lib/private LIBDATADIR?= /usr/libdata LIBEXECDIR?= /usr/libexec LINTLIBDIR?= /usr/libdata/lint ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287107 - in head/sys: kern sys
Author: trasz Date: Mon Aug 24 13:18:13 2015 New Revision: 287107 URL: https://svnweb.freebsd.org/changeset/base/287107 Log: Make vfs_unmountall() unmount /dev after /, not before. The only reason this didn't result in an unclean shutdown is that devfs ignores MNT_FORCE flag. Reviewed by: kib@ MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D3467 Modified: head/sys/kern/vfs_mount.c head/sys/kern/vfs_mountroot.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_mount.c == --- head/sys/kern/vfs_mount.c Mon Aug 24 12:17:15 2015(r287106) +++ head/sys/kern/vfs_mount.c Mon Aug 24 13:18:13 2015(r287107) @@ -1359,6 +1359,8 @@ dounmount(struct mount *mp, int flags, s vput(coveredvp); } vfs_event_signal(NULL, VQ_UNMOUNT, 0); + if (mp == rootdevmp) + rootdevmp = NULL; vfs_mount_destroy(mp); return (0); } Modified: head/sys/kern/vfs_mountroot.c == --- head/sys/kern/vfs_mountroot.c Mon Aug 24 12:17:15 2015 (r287106) +++ head/sys/kern/vfs_mountroot.c Mon Aug 24 13:18:13 2015 (r287107) @@ -95,6 +95,11 @@ static struct mntarg *parse_mountroot_op */ struct vnode *rootvnode; +/* + * Mount of the system's /dev. + */ +struct mount *rootdevmp; + char *rootdevnames[2] = {NULL, NULL}; struct mtx root_holds_mtx; @@ -236,6 +241,7 @@ vfs_mountroot_devfs(struct thread *td, s mtx_unlock(&mountlist_mtx); *mpp = mp; + rootdevmp = mp; set_rootvnode(); error = kern_symlinkat(td, "/", AT_FDCWD, "dev", UIO_SYSSPACE); Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cMon Aug 24 12:17:15 2015(r287106) +++ head/sys/kern/vfs_subr.cMon Aug 24 13:18:13 2015(r287107) @@ -3543,6 +3543,21 @@ SYSCTL_PROC(_kern, KERN_VNODE, vnode, CT ""); #endif +static void +unmount_or_warn(struct mount *mp) +{ + int error; + + error = dounmount(mp, MNT_FORCE, curthread); + if (error != 0) { + printf("unmount of %s failed (", mp->mnt_stat.f_mntonname); + if (error == EBUSY) + printf("BUSY)\n"); + else + printf("%d)\n", error); + } +} + /* * Unmount all filesystems. The list is traversed in reverse order * of mounting to avoid dependencies. @@ -3550,42 +3565,28 @@ SYSCTL_PROC(_kern, KERN_VNODE, vnode, CT void vfs_unmountall(void) { - struct mount *mp; - struct thread *td; - int error; + struct mount *mp, *tmp; CTR1(KTR_VFS, "%s: unmounting all filesystems", __func__); - td = curthread; /* * Since this only runs when rebooting, it is not interlocked. */ - while(!TAILQ_EMPTY(&mountlist)) { - mp = TAILQ_LAST(&mountlist, mntlist); + TAILQ_FOREACH_REVERSE_SAFE(mp, &mountlist, mntlist, mnt_list, tmp) { vfs_ref(mp); - error = dounmount(mp, MNT_FORCE, td); - if (error != 0) { - TAILQ_REMOVE(&mountlist, mp, mnt_list); - /* -* XXX: Due to the way in which we mount the root -* file system off of devfs, devfs will generate a -* "busy" warning when we try to unmount it before -* the root. Don't print a warning as a result in -* order to avoid false positive errors that may -* cause needless upset. -*/ - if (strcmp(mp->mnt_vfc->vfc_name, "devfs") != 0) { - printf("unmount of %s failed (", - mp->mnt_stat.f_mntonname); - if (error == EBUSY) - printf("BUSY)\n"); - else - printf("%d)\n", error); - } - } else { - /* The unmount has removed mp from the mountlist */ - } + + /* +* Forcibly unmounting "/dev" before "/" would prevent clean +* unmount of the latter. +*/ + if (mp == rootdevmp) + continue; + + unmount_or_warn(mp); } + + if (rootdevmp != NULL) + unmount_or_warn(rootdevmp); } /* Modified: head/sys/sys/vnode.h == --- head/sys/sys/vnode.hMon Aug 24 1
svn commit: r287106 - head/lib/libproc
Author: andrew Date: Mon Aug 24 12:17:15 2015 New Revision: 287106 URL: https://svnweb.freebsd.org/changeset/base/287106 Log: Fix libproc on architectures that don't need the program counter to be adjusted. This seems to be the case on all non-x86 architectures libproc supports. Reviewed by: kib Obtained from:ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D3465 Modified: head/lib/libproc/proc_bkpt.c Modified: head/lib/libproc/proc_bkpt.c == --- head/lib/libproc/proc_bkpt.cMon Aug 24 12:01:39 2015 (r287105) +++ head/lib/libproc/proc_bkpt.cMon Aug 24 12:17:15 2015 (r287106) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #elif defined(__amd64__) || defined(__i386__) #defineBREAKPOINT_INSTR0xcc/* int 0x3 */ #defineBREAKPOINT_INSTR_SZ 1 +#defineBREAKPOINT_ADJUST_SZBREAKPOINT_INSTR_SZ #elif defined(__arm__) #defineBREAKPOINT_INSTR0xe7ff /* bkpt */ #defineBREAKPOINT_INSTR_SZ 4 @@ -195,11 +196,19 @@ proc_bkptdel(struct proc_handle *phdl, u /* * Decrement pc so that we delete the breakpoint at the correct * address, i.e. at the BREAKPOINT_INSTR address. + * + * This is only needed on some architectures where the pc value + * when reading registers points at the instruction after the + * breakpoint, e.g. x86. */ void proc_bkptregadj(unsigned long *pc) { - *pc = *pc - BREAKPOINT_INSTR_SZ; + + (void)pc; +#ifdef BREAKPOINT_ADJUST_SZ + *pc = *pc - BREAKPOINT_ADJUST_SZ; +#endif } /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287105 - head/sys/arm64/arm64
Author: andrew Date: Mon Aug 24 12:01:39 2015 New Revision: 287105 URL: https://svnweb.freebsd.org/changeset/base/287105 Log: Add support for pmap_sync_icache on arm64. Reviewed by: emaste, imp (both earlier version) Obtained from:ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D3438 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Mon Aug 24 10:55:54 2015(r287104) +++ head/sys/arm64/arm64/pmap.c Mon Aug 24 12:01:39 2015(r287105) @@ -3050,10 +3050,32 @@ pmap_activate(struct thread *td) } void -pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +pmap_sync_icache(pmap_t pmap, vm_offset_t va, vm_size_t sz) { - panic("ARM64TODO: pmap_sync_icache"); + if (va >= VM_MIN_KERNEL_ADDRESS) { + cpu_icache_sync_range(va, sz); + } else { + u_int len, offset; + vm_paddr_t pa; + + /* Find the length of data in this page to flush */ + offset = va & PAGE_MASK; + len = imin(PAGE_SIZE - offset, sz); + + while (sz != 0) { + /* Extract the physical address & find it in the DMAP */ + pa = pmap_extract(pmap, va); + if (pa != 0) + cpu_icache_sync_range(PHYS_TO_DMAP(pa), len); + + /* Move to the next page */ + sz -= len; + va += len; + /* Set the length for the next iteration */ + len = imin(PAGE_SIZE, sz); + } + } } /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287104 - head/sys/arm64/arm64
Author: andrew Date: Mon Aug 24 10:55:54 2015 New Revision: 287104 URL: https://svnweb.freebsd.org/changeset/base/287104 Log: Add pages used by the PV entries to minidumps. Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Mon Aug 24 09:48:50 2015(r287103) +++ head/sys/arm64/arm64/pmap.c Mon Aug 24 10:55:54 2015(r287104) @@ -1516,9 +1516,7 @@ free_pv_chunk(struct pv_chunk *pc) PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); /* entire chunk is free, return it */ m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); -#if 0 /* TODO: For minidump */ dump_drop_page(m->phys_addr); -#endif vm_page_unwire(m, PQ_INACTIVE); vm_page_free(m); } @@ -1580,9 +1578,7 @@ retry: } PV_STAT(atomic_add_int(&pc_chunk_count, 1)); PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); -#if 0 /* TODO: This is for minidump */ dump_add_page(m->phys_addr); -#endif pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; pc->pc_map[0] = PC_FREE0 & ~1ul;/* preallocated bit 0 */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287103 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: avg Date: Mon Aug 24 09:48:50 2015 New Revision: 287103 URL: https://svnweb.freebsd.org/changeset/base/287103 Log: MFV (partial) r286889: 5692 expose the number of hole blocks in a file FreeBSD porting notes: - only kernel-side changes are merged - the new ioctl is not actually implemented yet - thus, the goal is to synchronize DMU code illumos/illumos-gate@2bcf0248e992f292c7b814458bcdce2f004925d6 https://www.illumos.org/issues/5692 we would like to expose the number of hole (sparse) blocks in a file. this can be useful to for example if you want to fill in the holes with some data; knowing the number of holes in advances allows you to report progress on hole filling. We could use SEEK_HOLE to do that but it would be O(n) where n is the number of holes present in the file. Author: Max Grossman Reviewed by: Adam Leventhal Reviewed by: Matthew Ahrens Reviewed by: Boris Protopopov Approved by: Richard Lowe Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Mon Aug 24 09:33:12 2015(r287102) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Mon Aug 24 09:48:50 2015(r287103) @@ -1900,25 +1900,20 @@ int dmu_offset_next(objset_t *os, uint64_t object, boolean_t hole, uint64_t *off) { dnode_t *dn; - int i, err; + int err; - err = dnode_hold(os, object, FTAG, &dn); - if (err) - return (err); /* * Sync any current changes before * we go trundling through the block pointers. */ - for (i = 0; i < TXG_SIZE; i++) { - if (list_link_active(&dn->dn_dirty_link[i])) - break; + err = dmu_object_wait_synced(os, object); + if (err) { + return (err); } - if (i != TXG_SIZE) { - dnode_rele(dn, FTAG); - txg_wait_synced(dmu_objset_pool(os), 0); - err = dnode_hold(os, object, FTAG, &dn); - if (err) - return (err); + + err = dnode_hold(os, object, FTAG, &dn); + if (err) { + return (err); } err = dnode_next_offset(dn, (hole ? DNODE_FIND_HOLE : 0), off, 1, 1, 0); @@ -1927,6 +1922,36 @@ dmu_offset_next(objset_t *os, uint64_t o return (err); } +/* + * Given the ZFS object, if it contains any dirty nodes + * this function flushes all dirty blocks to disk. This + * ensures the DMU object info is updated. A more efficient + * future version might just find the TXG with the maximum + * ID and wait for that to be synced. + */ +int +dmu_object_wait_synced(objset_t *os, uint64_t object) { + dnode_t *dn; + int error, i; + + error = dnode_hold(os, object, FTAG, &dn); + if (error) { + return (error); + } + + for (i = 0; i < TXG_SIZE; i++) { + if (list_link_active(&dn->dn_dirty_link[i])) { + break; + } + } + dnode_rele(dn, FTAG); + if (i != TXG_SIZE) { + txg_wait_synced(dmu_objset_pool(os), 0); + } + + return (0); +} + void dmu_object_info_from_dnode(dnode_t *dn, dmu_object_info_t *doi) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Mon Aug 24 09:33:12 2015(r287102) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Mon Aug 24 09:48:50 2015(r287103) @@ -915,6 +915,15 @@ int dmu_offset_next(objset_t *os, uint64 uint64_t *off); /* + * Check if a DMU object has any dirty blocks. If so, sync out + * all pending transaction groups. Otherwise, this function + * does not alter DMU state. This could be improved to only sync + * out the necessary transaction groups for this particular + * object. + */ +int dmu_object_wait_synced(objset_t *os, uint64_t object); + +/* * Initial setup and final teardown. */ extern void dmu_init(void); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Aug 24 09:33:12 2015(r287102) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Aug 24 09:48:50 2015(r287103) @@ -293,24 +293,31 @@ zfs_ioctl(vnode_t *vp, u_long com, intpt
svn commit: r287102 - head/usr.sbin/ctld
Author: trasz Date: Mon Aug 24 09:33:12 2015 New Revision: 287102 URL: https://svnweb.freebsd.org/changeset/base/287102 Log: Some random tweaks to ctl.conf(5). MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 == --- head/usr.sbin/ctld/ctl.conf.5 Mon Aug 24 09:30:27 2015 (r287101) +++ head/usr.sbin/ctld/ctl.conf.5 Mon Aug 24 09:33:12 2015 (r287102) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2015 +.Dd August 24, 2015 .Dt CTL.CONF 5 .Os .Sh NAME @@ -104,11 +104,11 @@ which can then be assigned to any number .It Ic lun Ar name Create a .Sy lun -configuration context, defining a LUN to be exported by some target(s). +configuration context, defining a LUN to be exported by any number of targets. .It Ic target Ar name Create a .Sy target -configuration context, which can contain one or more +configuration context, which can optionally contain one or more .Sy lun contexts. .It Ic timeout Ar seconds @@ -265,9 +265,10 @@ Another predefined .Qq Ar no-authentication , may be used to permit access without authentication. -Note that targets must only use one of -.Sy auth-group , chap , No or Sy chap-mutual ; -it is a configuration error to mix multiple types in one target. +Note that this clause can be overridden using the second argument +to a +.Sy portal-group +clause. .It Ic auth-type Ar type Sets the authentication type. Type can be either @@ -314,20 +315,42 @@ This clause is mutually exclusive with .Sy auth-group ; one cannot use both in a single target. -.It Ic portal-group Ar name Op Ar agname +.Pp +The +.Sy auth-type , +.Sy chap , +.Sy chap-mutual , +.Sy initiator-name , +and +.Sy initiator-portal +clauses in the target context provide an alternative to assigning an +.Sy auth-group +defined separately, useful in the common case of authentication settings +specific to a single target. +.It Ic portal-group Ar name Op Ar ag-name Assign a previously defined portal group to the target. The default portal group is .Qq Ar default , which makes the target available on TCP port 3260 on all configured IPv4 and IPv6 addresses. -Optional second argument specifies auth group name for connections -to this specific portal group. -If second argument is not specified, target auth group is used. +Optional second argument specifies +.Sy auth-group +for connections to this specific portal group. +If second argument is not specified, target +.Sy auth-group +is used. .It Ic port Ar name .It Ic port Ar name/pp .It Ic port Ar name/pp/vp Assign specified CTL port (such as "isp0" or "isp2/1") to the target. -On startup ctld configures LUN mapping and enables all assigned ports. +This is used to export the target through a specific physical - eg Fibre +Channel - port, in addition to portal-groups configured for the target. +Use +.Cm "ctladm portlist" +command to retrieve the list of available ports. +On startup +.Xr ctld 8 +configures LUN mapping and enables all assigned ports. Each port can be assigned to only one target. .It Ic redirect Ar address IPv4 or IPv6 address to redirect initiators to. @@ -342,6 +365,9 @@ by the parent target. Create a .Sy lun configuration context, defining a LUN exported by the parent target. +.Pp +This is an alternative to defining the LUN separately, useful in the common +case of a LUN being exported by a single target. .El .Ss lun Context .Bl -tag -width indent @@ -429,7 +455,7 @@ target iqn.2012-06.com.example:target1 { lun 0 example_1 lun 1 { path /dev/zvol/tank/example_2 - option foo bar + option vendor "FreeBSD" } } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287101 - head/sys/netinet
Author: jch Date: Mon Aug 24 09:30:27 2015 New Revision: 287101 URL: https://svnweb.freebsd.org/changeset/base/287101 Log: Revert r284245: "Fix a callout race condition introduced in TCP timers callouts with r281599." r281599 fixed a TCP timer race condition, but due a callout(9) bug it also introduced another race condition workaround-ed with r284245. The callout(9) bug being fixed with r286880, we can now revert the workaround (r284245). Differential Revision:https://reviews.freebsd.org/D2079 (Initial change) Differential Revision:https://reviews.freebsd.org/D2763 (Workaround) Differential Revision:https://reviews.freebsd.org/D3078 (Fix) Sponsored by: Verisign, Inc. MFC after:2 weeks Modified: head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timer.h Modified: head/sys/netinet/tcp_timer.c == --- head/sys/netinet/tcp_timer.cMon Aug 24 08:44:44 2015 (r287100) +++ head/sys/netinet/tcp_timer.cMon Aug 24 09:30:27 2015 (r287101) @@ -355,12 +355,10 @@ tcp_timer_2msl(void *xtp) TCPSTAT_INC(tcps_finwait2_drops); tp = tcp_close(tp); } else { - if (ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) { - if (!callout_reset(&tp->t_timers->tt_2msl, - TP_KEEPINTVL(tp), tcp_timer_2msl, tp)) { - tp->t_timers->tt_flags &= ~TT_2MSL_RST; - } - } else + if (ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) + callout_reset(&tp->t_timers->tt_2msl, + TP_KEEPINTVL(tp), tcp_timer_2msl, tp); + else tp = tcp_close(tp); } @@ -440,14 +438,11 @@ tcp_timer_keep(void *xtp) tp->rcv_nxt, tp->snd_una - 1, 0); free(t_template, M_TEMP); } - if (!callout_reset(&tp->t_timers->tt_keep, TP_KEEPINTVL(tp), - tcp_timer_keep, tp)) { - tp->t_timers->tt_flags &= ~TT_KEEP_RST; - } - } else if (!callout_reset(&tp->t_timers->tt_keep, TP_KEEPIDLE(tp), - tcp_timer_keep, tp)) { - tp->t_timers->tt_flags &= ~TT_KEEP_RST; - } + callout_reset(&tp->t_timers->tt_keep, TP_KEEPINTVL(tp), + tcp_timer_keep, tp); + } else + callout_reset(&tp->t_timers->tt_keep, TP_KEEPIDLE(tp), + tcp_timer_keep, tp); #ifdef TCPDEBUG if (inp->inp_socket->so_options & SO_DEBUG) @@ -806,7 +801,6 @@ tcp_timer_activate(struct tcpcb *tp, uin timeout_t *f_callout; struct inpcb *inp = tp->t_inpcb; int cpu = inp_to_cpuid(inp); - uint32_t f_reset; #ifdef TCP_OFFLOAD if (tp->t_flags & TF_TOE) @@ -820,49 +814,38 @@ tcp_timer_activate(struct tcpcb *tp, uin case TT_DELACK: t_callout = &tp->t_timers->tt_delack; f_callout = tcp_timer_delack; - f_reset = TT_DELACK_RST; break; case TT_REXMT: t_callout = &tp->t_timers->tt_rexmt; f_callout = tcp_timer_rexmt; - f_reset = TT_REXMT_RST; break; case TT_PERSIST: t_callout = &tp->t_timers->tt_persist; f_callout = tcp_timer_persist; - f_reset = TT_PERSIST_RST; break; case TT_KEEP: t_callout = &tp->t_timers->tt_keep; f_callout = tcp_timer_keep; - f_reset = TT_KEEP_RST; break; case TT_2MSL: t_callout = &tp->t_timers->tt_2msl; f_callout = tcp_timer_2msl; - f_reset = TT_2MSL_RST; break; default: panic("tp %p bad timer_type %#x", tp, timer_type); } if (delta == 0) { if ((tp->t_timers->tt_flags & timer_type) && - callout_stop(t_callout) && - (tp->t_timers->tt_flags & f_reset)) { - tp->t_timers->tt_flags &= ~(timer_type | f_reset); + callout_stop(t_callout)) { + tp->t_timers->tt_flags &= ~timer_type; } } else { if ((tp->t_timers->tt_flags & timer_type) == 0) { - tp->t_timers->tt_flags |= (timer_type | f_reset); + tp->t_timers->tt_flags |= timer_type; callout_reset_on(t_callout, del
svn commit: r287100 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Mon Aug 24 08:44:44 2015 New Revision: 287100 URL: https://svnweb.freebsd.org/changeset/base/287100 Log: spa_import_rootpool: prevent lock and resource leak The lock leak could lead to a deadlock later. PR: 198563 Submitted by: Fabian Keil MFC after:1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Aug 24 08:10:52 2015(r287099) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Aug 24 08:44:44 2015(r287100) @@ -4146,6 +4146,8 @@ spa_import_rootpool(const char *name) &spa->spa_ubsync.ub_version) != 0) spa->spa_ubsync.ub_version = SPA_VERSION_INITIAL; } else if ((spa = spa_lookup(name)) == NULL) { + mutex_exit(&spa_namespace_lock); + nvlist_free(config); cmn_err(CE_NOTE, "Cannot find the pool label for '%s'", name); return (EIO); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r287009 - in head: sbin/pfctl share/man/man4 sys/conf sys/net/altq sys/netpfil/pf
On Sun, Aug 23, 2015 at 12:34 AM, Luiz Otavio O Souza wrote: > On Sat, Aug 22, 2015 at 6:18 AM, Ermal Luçi wrote: > > > > > > On Sat, Aug 22, 2015 at 12:02 AM, Luiz Otavio O Souza > > wrote: > >> > >> Author: loos > >> Date: Fri Aug 21 22:02:22 2015 > >> New Revision: 287009 > >> URL: https://svnweb.freebsd.org/changeset/base/287009 > >> > >> Log: > >> Add ALTQ(9) support for the CoDel algorithm. > >> > >> CoDel is a parameterless queue discipline that handles variable > >> bandwidth > >> and RTT. > >> > >> It can be used as the single queue discipline on an interface or as a > >> sub > >> discipline of existing queue disciplines such as PRIQ, CBQ, HFSC, > FAIRQ. > >> > >> Differential Revision:https://reviews.freebsd.org/D3272 > >> Reviewd by: rpaulo, gnn (previous version) > > > > > > I thought part of this commit message was taken from me as a reviewer, > no? > > Sorry Ermal, my bad. As you only commented and not accepted the review > I thought you don't want to be implied with a reviewed by. > No issue just to be sure that you understood the whole thing there! > > [...] > > >> Added: head/sys/net/altq/altq_codel.c > >> > >> > == > >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) > >> +++ head/sys/net/altq/altq_codel.c Fri Aug 21 22:02:22 2015 > >> (r287009) > >> @@ -0,0 +1,477 @@ > >> +/* > >> + * CoDel - The Controlled-Delay Active Queue Management algorithm > >> + * > >> + * Copyright (C) 2013 Ermal Luci > > > > > > Can you correct my name? > > > > Sure, I'll commit the fix soon (probably on monday) I'm AFK this weekend. > > No rush :) > I really appreciate your work on Codel. > > Regards, > Luiz > -- Ermal ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r287099 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Mon Aug 24 08:10:52 2015 New Revision: 287099 URL: https://svnweb.freebsd.org/changeset/base/287099 Log: account for ashift when gathering buffers to be written to l2arc device The change that introduced the L2ARC compression support also introduced a bug where the on-disk size of the selected buffers could end up larger than the target size if the ashift is greater than 9. This was because the buffer selection could did not take into account the fact that on-disk size could be larger than the in-memory buffer size due to the alignment requirements. At the moment b_asize is a misnomer as it does not always represent the allocated size: if a buffer is compressed, then the compressed size is properly rounded (on FreeBSD), but if the compression fails or it is not applied, then the original size is kept and it could be smaller than what ashift requires. For the same reasons arcstat_l2_asize and the reported used space on the cache device could be smaller than the actual allocated size if ashift > 9. That problem is not fixed by this change. This change only ensures that l2ad_hand is not advanced by more than target_sz. Otherwise we would overwrite active (unevicted) L2ARC buffers. That problem is manifested as growing l2_cksum_bad and l2_io_error counters. This change also changes 'p' prefix to 'a' prefix in a few places where variables represent allocated rather than physical size. The resolved problem could also result in the reported allocated size being greater than the cache device's capacity, because of the overwritten buffers (more than one buffer claiming the same disk space). This change is already in ZFS-on-Linux: zfsonlinux/zfs@ef56b0780c80ebb0b1e637b8b8c79530a8ab3201 PR: 198242 PR: 195746 (possibly related) Reviewed by: mahrens (https://reviews.csiden.org/r/229/) Tested by:gkon...@aicom.gr (most recently) MFC after:15 days X-MFC note: patch does not apply as is at the moment Relnotes: yes Sponsored by: ClusterHQ Differential Revision:https://reviews.freebsd.org/D2764 Reviewed by: noone (@FreeBSD.org) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Aug 24 07:49:27 2015(r287098) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Aug 24 08:10:52 2015(r287099) @@ -6182,8 +6182,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de boolean_t *headroom_boost) { arc_buf_hdr_t *hdr, *hdr_prev, *head; - uint64_t write_asize, write_psize, write_sz, headroom, - buf_compress_minsz; + uint64_t write_asize, write_sz, headroom, buf_compress_minsz; void *buf_data; boolean_t full; l2arc_write_callback_t *cb; @@ -6198,7 +6197,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de *headroom_boost = B_FALSE; pio = NULL; - write_sz = write_asize = write_psize = 0; + write_sz = write_asize = 0; full = B_FALSE; head = kmem_cache_alloc(hdr_l2only_cache, KM_PUSHPAGE); head->b_flags |= ARC_FLAG_L2_WRITE_HEAD; @@ -6240,6 +6239,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de for (; hdr; hdr = hdr_prev) { kmutex_t *hash_lock; uint64_t buf_sz; + uint64_t buf_a_sz; if (arc_warm == B_FALSE) hdr_prev = multilist_sublist_next(mls, hdr); @@ -6271,7 +6271,15 @@ l2arc_write_buffers(spa_t *spa, l2arc_de continue; } - if ((write_sz + hdr->b_size) > target_sz) { + /* +* Assume that the buffer is not going to be compressed +* and could take more space on disk because of a larger +* disk block size. +*/ + buf_sz = hdr->b_size; + buf_a_sz = vdev_psize_to_asize(dev->l2ad_vdev, buf_sz); + + if ((write_asize + buf_a_sz) > target_sz) { full = B_TRUE; mutex_exit(hash_lock); ARCSTAT_BUMP(arcstat_l2_write_full); @@ -6336,8 +6344,6 @@ l2arc_write_buffers(spa_t *spa, l2arc_de * using it to denote the header's state change. */ hdr->b_l2hdr.b_daddr = L2ARC_ADDR_UNSET; - - buf_sz = hdr->b_size; hdr->b_flags |= ARC_FLAG_HAS_L2HDR; mutex_enter(&dev->l2ad_mtx); @@ -6354,6 +6360,7 @@ l2arc_write
svn commit: r287098 - head/sys/teken
Author: ed Date: Mon Aug 24 07:49:27 2015 New Revision: 287098 URL: https://svnweb.freebsd.org/changeset/base/287098 Log: Sync HPA and VPA implementations with CUP. After fixing the 16-bits integer arithmetic overflow in 286981, we should also make sure to fix the VPA sequence. Bring HPA and VPA in sync with how we now implement CUP. PR: 202612 Reported by: kcwu csie org MFC after:1 month Modified: head/sys/teken/teken_subr.h Modified: head/sys/teken/teken_subr.h == --- head/sys/teken/teken_subr.h Mon Aug 24 05:38:05 2015(r287097) +++ head/sys/teken/teken_subr.h Mon Aug 24 07:49:27 2015(r287098) @@ -583,9 +583,9 @@ static void teken_subr_horizontal_position_absolute(teken_t *t, unsigned int col) { - t->t_cursor.tp_col = col - 1; - if (t->t_cursor.tp_col >= t->t_winsize.tp_col) - t->t_cursor.tp_col = t->t_winsize.tp_col - 1; + col--; + t->t_cursor.tp_col = col < t->t_winsize.tp_col ? + col : t->t_winsize.tp_col - 1; t->t_stateflags &= ~TS_WRAPPED; teken_funcs_cursor(t); @@ -1297,9 +1297,9 @@ static void teken_subr_vertical_position_absolute(teken_t *t, unsigned int row) { - t->t_cursor.tp_row = t->t_originreg.ts_begin + row - 1; - if (t->t_cursor.tp_row >= t->t_originreg.ts_end) - t->t_cursor.tp_row = t->t_originreg.ts_end - 1; + row = row - 1 + t->t_originreg.ts_begin; + t->t_cursor.tp_row = row < t->t_originreg.ts_end ? + row : t->t_originreg.ts_end - 1; t->t_stateflags &= ~TS_WRAPPED; teken_funcs_cursor(t); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"