svn commit: r268833 - head/sys/dev/bge
Author: peter Date: Fri Jul 18 07:41:38 2014 New Revision: 268833 URL: http://svnweb.freebsd.org/changeset/base/268833 Log: Fix an apparent conversion error in bge to the new driver api. if_multiaddr_array() does the LLADDR work, don't do it twice. This broke IPv6 in "interesting" ways in the FreeBSD.org cluster. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Fri Jul 18 07:18:37 2014(r268832) +++ head/sys/dev/bge/if_bge.c Fri Jul 18 07:41:38 2014(r268833) @@ -1646,8 +1646,8 @@ bge_setmulti(struct bge_softc *sc) if_multiaddr_array(ifp, mta, &mcnt, mc_count); for(i = 0; i < mcnt; i++) { - h = ether_crc32_le(LLADDR((struct sockaddr_dl *) - (mta + (i * ETHER_ADDR_LEN))), ETHER_ADDR_LEN) & 0x7F; + h = ether_crc32_le(mta + (i * ETHER_ADDR_LEN), + ETHER_ADDR_LEN) & 0x7F; hashes[(h & 0x60) >> 5] |= 1 << (h & 0x1F); } ___ 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: r268834 - in head/sys: arm/conf arm/freescale/imx boot/fdt/dts/arm
Author: br Date: Fri Jul 18 07:47:50 2014 New Revision: 268834 URL: http://svnweb.freebsd.org/changeset/base/268834 Log: o Enable GPIO device driver for i.MX6. It was originally written for i.MX5 and compatible with newer chip. o Extend device tree information o style(9) fixes Discussed with: ian Modified: head/sys/arm/conf/IMX6 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/imx/imx51_gpio.c head/sys/boot/fdt/dts/arm/imx6.dtsi head/sys/boot/fdt/dts/arm/wandboard-dual.dts head/sys/boot/fdt/dts/arm/wandboard-quad.dts head/sys/boot/fdt/dts/arm/wandboard-solo.dts Modified: head/sys/arm/conf/IMX6 == --- head/sys/arm/conf/IMX6 Fri Jul 18 07:41:38 2014(r268833) +++ head/sys/arm/conf/IMX6 Fri Jul 18 07:47:50 2014(r268834) @@ -82,6 +82,9 @@ devicemiibus # Required for etherne device bpf # Berkeley packet filter (required for DHCP) #deviceiomux # IO Multiplexor +# General-purpose input/output +device gpio + # Serial (COM) ports device uart# Multi-uart driver @@ -106,7 +109,7 @@ device u3g # USB modems #deviceukbd# Allow keyboard like HIDs to control console #deviceums # USB mouse -# USB Ethernet, requires miibus +# USB Ethernet, requires miibus #deviceaue # ADMtek USB Ethernet #deviceaxe # ASIX Electronics USB Ethernet #devicecdce# Generic USB over Ethernet Modified: head/sys/arm/freescale/imx/files.imx6 == --- head/sys/arm/freescale/imx/files.imx6 Fri Jul 18 07:41:38 2014 (r268833) +++ head/sys/arm/freescale/imx/files.imx6 Fri Jul 18 07:47:50 2014 (r268834) @@ -26,6 +26,7 @@ arm/freescale/imx/imx6_mp.c optional sm arm/freescale/imx/imx6_pl310.c standard arm/freescale/imx/imx_machdep.cstandard arm/freescale/imx/imx_gpt.cstandard +arm/freescale/imx/imx51_gpio.c optional gpio # # Optional devices. @@ -50,8 +51,6 @@ arm/freescale/imx/imx6_usbphy.c optiona # Not ready yet... # #arm/freescale/imx/imx51_iomux.c optional iomux -#arm/freescale/imx/imx51_gpio.coptional gpio #dev/ata/chipsets/ata-fsl.coptional imxata #arm/freescale/imx/i2c.c optional fsliic #arm/freescale/imx/imx51_ipuv3.c optional sc - Modified: head/sys/arm/freescale/imx/imx51_gpio.c == --- head/sys/arm/freescale/imx/imx51_gpio.c Fri Jul 18 07:41:38 2014 (r268833) +++ head/sys/arm/freescale/imx/imx51_gpio.c Fri Jul 18 07:47:50 2014 (r268834) @@ -102,6 +102,13 @@ struct imx51_gpio_softc { struct gpio_pin gpio_pins[NGPIO]; }; +static struct ofw_compat_data compat_data[] = { + {"fsl,imx6q-gpio", 1}, + {"fsl,imx53-gpio", 1}, + {"fsl,imx51-gpio", 1}, + {NULL, 0} +}; + static struct resource_spec imx_gpio_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, @@ -373,9 +380,8 @@ imx51_gpio_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "fsl,imx51-gpio") || - ofw_bus_is_compatible(dev, "fsl,imx53-gpio")) { - device_set_desc(dev, "i.MX515 GPIO Controller"); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "Freescale i.MX GPIO Controller"); return (BUS_PROBE_DEFAULT); } Modified: head/sys/boot/fdt/dts/arm/imx6.dtsi == --- head/sys/boot/fdt/dts/arm/imx6.dtsi Fri Jul 18 07:41:38 2014 (r268833) +++ head/sys/boot/fdt/dts/arm/imx6.dtsi Fri Jul 18 07:47:50 2014 (r268834) @@ -102,6 +102,20 @@ interrupts = <119 120>; }; + /* System Reset Controller */ + src: src@4006E000 { + compatible = "fsl,imx6-src"; + reg = <0x020D8000 0x100>; + }; + + sdma: sdma@020ec000 { + compatible = "fsl,imx6q-sdma"; + reg = <0x020ec000 0x4000>; + interrupt-parent = <&gic>; + interrupts = <34>; + status = "disabled"; + }; +
svn commit: r268835 - head/sys/arm/freescale/imx
Author: br Date: Fri Jul 18 07:52:35 2014 New Revision: 268835 URL: http://svnweb.freebsd.org/changeset/base/268835 Log: Rename gpio driver file. Added: head/sys/arm/freescale/imx/imx_gpio.c - copied unchanged from r268834, head/sys/arm/freescale/imx/imx51_gpio.c Deleted: head/sys/arm/freescale/imx/imx51_gpio.c Modified: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 Modified: head/sys/arm/freescale/imx/files.imx51 == --- head/sys/arm/freescale/imx/files.imx51 Fri Jul 18 07:47:50 2014 (r268834) +++ head/sys/arm/freescale/imx/files.imx51 Fri Jul 18 07:52:35 2014 (r268835) @@ -22,7 +22,7 @@ arm/freescale/imx/tzic.c standard arm/freescale/imx/imx51_iomux.coptional iomux # GPIO -arm/freescale/imx/imx51_gpio.c optional gpio +arm/freescale/imx/imx_gpio.c optional gpio # Generic Periodic Timer arm/freescale/imx/imx_gpt.cstandard Modified: head/sys/arm/freescale/imx/files.imx53 == --- head/sys/arm/freescale/imx/files.imx53 Fri Jul 18 07:47:50 2014 (r268834) +++ head/sys/arm/freescale/imx/files.imx53 Fri Jul 18 07:52:35 2014 (r268835) @@ -25,7 +25,7 @@ arm/freescale/imx/tzic.c standard arm/freescale/imx/imx51_iomux.coptional iomux # GPIO -arm/freescale/imx/imx51_gpio.c optional gpio +arm/freescale/imx/imx_gpio.c optional gpio # Generic Periodic Timer arm/freescale/imx/imx_gpt.cstandard Modified: head/sys/arm/freescale/imx/files.imx6 == --- head/sys/arm/freescale/imx/files.imx6 Fri Jul 18 07:47:50 2014 (r268834) +++ head/sys/arm/freescale/imx/files.imx6 Fri Jul 18 07:52:35 2014 (r268835) @@ -26,7 +26,7 @@ arm/freescale/imx/imx6_mp.c optional sm arm/freescale/imx/imx6_pl310.c standard arm/freescale/imx/imx_machdep.cstandard arm/freescale/imx/imx_gpt.cstandard -arm/freescale/imx/imx51_gpio.c optional gpio +arm/freescale/imx/imx_gpio.c optional gpio # # Optional devices. Copied: head/sys/arm/freescale/imx/imx_gpio.c (from r268834, head/sys/arm/freescale/imx/imx51_gpio.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx_gpio.c Fri Jul 18 07:52:35 2014 (r268835, copy of r268834, head/sys/arm/freescale/imx/imx51_gpio.c) @@ -0,0 +1,491 @@ +/*- + * Copyright (c) 2012, 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Oleksandr Rybalko under sponsorship + * from the FreeBSD Foundation. + * + * 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 AUTHOR 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 AUTHOR 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. + */ + +/* + * Freescale i.MX515 GPIO driver. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include "gpio_if.h" + +#define GPIO_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#defineGPIO_UNLOCK(_sc)mtx_unlock(&(_sc)->sc_mtx) +#define GPIO_LOCK_INIT(_sc)mtx_init(&_sc->sc_mtx, \ + device_get_nameunit(_sc->sc_dev), "imx_gpio", MTX_DEF) +#define GPIO_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); +#define GPIO_ASSERT_LOCKED(_sc)mtx_assert(&_sc->sc_mtx, MA_OWNED)
svn commit: r268836 - head/sys/boot/fdt/dts/arm
Author: br Date: Fri Jul 18 08:08:45 2014 New Revision: 268836 URL: http://svnweb.freebsd.org/changeset/base/268836 Log: Fix typo. Modified: head/sys/boot/fdt/dts/arm/wandboard-dual.dts head/sys/boot/fdt/dts/arm/wandboard-quad.dts head/sys/boot/fdt/dts/arm/wandboard-solo.dts Modified: head/sys/boot/fdt/dts/arm/wandboard-dual.dts == --- head/sys/boot/fdt/dts/arm/wandboard-dual.dtsFri Jul 18 07:52:35 2014(r268835) +++ head/sys/boot/fdt/dts/arm/wandboard-dual.dtsFri Jul 18 08:08:45 2014(r268836) @@ -49,7 +49,7 @@ gpio@020a { status = "okay"; }; gpio@020a4000 { status = "okay"; }; gpio@020a8000 { status = "okay"; }; - gpio@020aC000 { status = "okay"; }; + gpio@020ac000 { status = "okay"; }; gpio@020b { status = "okay"; }; gpio@020b4000 { status = "okay"; }; console:serial@0202 { status = "okay"; }; Modified: head/sys/boot/fdt/dts/arm/wandboard-quad.dts == --- head/sys/boot/fdt/dts/arm/wandboard-quad.dtsFri Jul 18 07:52:35 2014(r268835) +++ head/sys/boot/fdt/dts/arm/wandboard-quad.dtsFri Jul 18 08:08:45 2014(r268836) @@ -49,7 +49,7 @@ gpio@020a { status = "okay"; }; gpio@020a4000 { status = "okay"; }; gpio@020a8000 { status = "okay"; }; - gpio@020aC000 { status = "okay"; }; + gpio@020ac000 { status = "okay"; }; gpio@020b { status = "okay"; }; gpio@020b4000 { status = "okay"; }; console:serial@0202 { status = "okay"; }; Modified: head/sys/boot/fdt/dts/arm/wandboard-solo.dts == --- head/sys/boot/fdt/dts/arm/wandboard-solo.dtsFri Jul 18 07:52:35 2014(r268835) +++ head/sys/boot/fdt/dts/arm/wandboard-solo.dtsFri Jul 18 08:08:45 2014(r268836) @@ -49,7 +49,7 @@ gpio@020a { status = "okay"; }; gpio@020a4000 { status = "okay"; }; gpio@020a8000 { status = "okay"; }; - gpio@020aC000 { status = "okay"; }; + gpio@020ac000 { status = "okay"; }; gpio@020b { status = "okay"; }; gpio@020b4000 { status = "okay"; }; console:serial@0202 { status = "okay"; }; ___ 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: r268837 - head/sys/netinet
Author: adrian Date: Fri Jul 18 08:22:13 2014 New Revision: 268837 URL: http://svnweb.freebsd.org/changeset/base/268837 Log: Update the default RSS hash to the Chelsio T5 firmware one - it provides markedly better distribution of IPv6 address/ports than the previous key. The previous key would hash large swaths of the port space for a given source/destination IP address to the same low handful of bits, effectively mapping them to the same queue. This made testing very .. special. Modified: head/sys/netinet/in_rss.c Modified: head/sys/netinet/in_rss.c == --- head/sys/netinet/in_rss.c Fri Jul 18 08:08:45 2014(r268836) +++ head/sys/netinet/in_rss.c Fri Jul 18 08:22:13 2014(r268837) @@ -149,16 +149,16 @@ SYSCTL_INT(_net_inet_rss, OID_AUTO, base * * XXXRW: And that we don't randomize it yet! * - * XXXRW: This default is actually the default key from Chelsio T3 cards, as + * XXXRW: This default is actually the default key from Chelsio T5 cards, as * it offers reasonable distribution, unlike all-0 keys which always * generate a hash of 0 (upsettingly). */ -static uint8_t rss_key[RSS_KEYSIZE] = { +static uint8_t rss_key[RSS_KEYSIZE] = { + 0xbe, 0xac, 0x01, 0xfa, 0x6a, 0x42, 0xb7, 0x3b, + 0x80, 0x30, 0xf2, 0x0c, 0x77, 0xcb, 0x2d, 0xa3, + 0xae, 0x7b, 0x30, 0xb4, 0xd0, 0xca, 0x2b, 0xcb, 0x43, 0xa3, 0x8f, 0xb0, 0x41, 0x67, 0x25, 0x3d, 0x25, 0x5b, 0x0e, 0xc2, 0x6d, 0x5a, 0x56, 0xda, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; /* ___ 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: r268838 - in head/sys: arm/conf boot/fdt/dts/arm
Author: br Date: Fri Jul 18 08:23:53 2014 New Revision: 268838 URL: http://svnweb.freebsd.org/changeset/base/268838 Log: Add support for Toradex Apalis i.MX6 development board. Sponsored by: Toradex AG Added: head/sys/arm/conf/APALIS-IMX6 (contents, props changed) head/sys/boot/fdt/dts/arm/apalis-imx6.dts (contents, props changed) Added: head/sys/arm/conf/APALIS-IMX6 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/APALIS-IMX6 Fri Jul 18 08:23:53 2014 (r268838) @@ -0,0 +1,31 @@ +# Kernel configuration for Toradex Apalis i.MX6 +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +#NO_UNIVERSE + +include"IMX6" +ident APALIS-IMX6 + +makeoptionsMODULES_OVERRIDE="" +makeoptionsWITHOUT_MODULES="ahc" + +# Flattened Device Tree +optionsFDT +optionsFDT_DTB_STATIC +makeoptionsFDT_DTS_FILE=apalis-imx6.dts Added: head/sys/boot/fdt/dts/arm/apalis-imx6.dts == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/apalis-imx6.dts Fri Jul 18 08:23:53 2014 (r268838) @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2014 Ruslan Bukin + * 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 AUTHOR 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 AUTHOR 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$ + */ + +/dts-v1/; +/include/ "imx6.dtsi" + +/ { + #address-cells = <1>; + #size-cells = <1>; + + model = "Toradex Apalis i.MX6"; + compatible = "toradex,imx6q-apalis", "fsl,imx6q"; + + memory { + reg = <0x1000 0x4000>; /* RAM 1GB */ + }; + + SOC: soc@ { + aips@0200 { /* AIPS1 */ + iomux@020e { status = "okay"; }; + gpio@0209c000 { status = "okay"; }; + gpio@020a { status = "okay"; }; + gpio@020a4000 { status = "okay"; }; + gpio@020a8000 { status = "okay"; }; + gpio@020ac000 { status = "okay"; }; + gpio@020b { status = "okay"; }; + gpio@020b4000 { status = "okay"; }; + console:serial@0202 { status = "okay"; }; + serial@021e8000 { status = "disabled"; }; + serial@021ec000 { status = "disabled"; }; + serial@021f { status = "disabled"; }; + serial@021f4000 { status = "disabled"; }; + usbphy@020c9000 { status = "okay"; }; + usbphy@020ca000 { status = "okay"; }; + ecspi@02008000 { status = "okay"; }; + ssi@02028000{ status = "okay"; }; + sdma@020ec000 { sta
svn commit: r268840 - head/usr.sbin/unbound/local-setup
Author: des Date: Fri Jul 18 12:33:22 2014 New Revision: 268840 URL: http://svnweb.freebsd.org/changeset/base/268840 Log: Use a combination of unblock-lan-zones (r268839) and domain-insecure to fix reverse lookups on networks using private addresses. Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh == --- head/usr.sbin/unbound/local-setup/local-unbound-setup.shFri Jul 18 11:32:44 2014(r268839) +++ head/usr.sbin/unbound/local-setup/local-unbound-setup.shFri Jul 18 12:33:22 2014(r268840) @@ -33,6 +33,7 @@ user="" unbound_conf="" forward_conf="" +lanzones_conf="" workdir="" confdir="" chrootdir="" @@ -59,6 +60,7 @@ set_defaults() { : ${confdir:=${workdir}/conf.d} : ${unbound_conf:=${workdir}/unbound.conf} : ${forward_conf:=${workdir}/forward.conf} + : ${lanzones_conf:=${workdir}/lan-zones.conf} : ${anchor:=${workdir}/root.key} : ${pidfile:=/var/run/local_unbound.pid} : ${resolv_conf:=/etc/resolv.conf} @@ -73,7 +75,8 @@ set_defaults() { # set_chrootdir() { chrootdir="${workdir}" - for file in "${unbound_conf}" "${forward_conf}" "${anchor}" ; do + for file in "${unbound_conf}" "${forward_conf}" \ + "${lanzones_conf}" "${anchor}" ; do if [ "${file#${workdir%/}/}" = "${file}" ] ; then echo "warning: ${file} is outside ${workdir}" >&2 chrootdir="" @@ -171,6 +174,7 @@ gen_resolvconf_conf() { # gen_forward_conf() { echo "# Generated by $self" + echo "# Do not edit this file." echo "forward-zone:" echo "name: ." for forwarder ; do @@ -183,6 +187,42 @@ gen_forward_conf() { } # +# Generate lan-zones.conf +# +gen_lanzones_conf() { + echo "# Generated by $self" + echo "# Do not edit this file." + echo "server:" + echo "# Unblock reverse lookups for LAN addresses" + echo "unblock-lan-zones: yes" + echo "domain-insecure: 10.in-addr.arpa." + echo "domain-insecure: 127.in-addr.arpa." + echo "domain-insecure: 16.172.in-addr.arpa." + echo "domain-insecure: 17.172.in-addr.arpa." + echo "domain-insecure: 18.172.in-addr.arpa." + echo "domain-insecure: 19.172.in-addr.arpa." + echo "domain-insecure: 20.172.in-addr.arpa." + echo "domain-insecure: 21.172.in-addr.arpa." + echo "domain-insecure: 22.172.in-addr.arpa." + echo "domain-insecure: 23.172.in-addr.arpa." + echo "domain-insecure: 24.172.in-addr.arpa." + echo "domain-insecure: 25.172.in-addr.arpa." + echo "domain-insecure: 26.172.in-addr.arpa." + echo "domain-insecure: 27.172.in-addr.arpa." + echo "domain-insecure: 28.172.in-addr.arpa." + echo "domain-insecure: 29.172.in-addr.arpa." + echo "domain-insecure: 30.172.in-addr.arpa." + echo "domain-insecure: 31.172.in-addr.arpa." + echo "domain-insecure: 168.192.in-addr.arpa." + echo "domain-insecure: 254.169.in-addr.arpa." + echo "domain-insecure: d.f.ip6.arpa." + echo "domain-insecure: 8.e.ip6.arpa." + echo "domain-insecure: 9.e.ip6.arpa." + echo "domain-insecure: a.e.ip6.arpa." + echo "domain-insecure: b.e.ip6.arpa." +} + +# # Generate unbound.conf # gen_unbound_conf() { @@ -197,6 +237,9 @@ gen_unbound_conf() { if [ -f "${forward_conf}" ] ; then echo "include: ${forward_conf}" fi + if [ -f "${lanzones_conf}" ] ; then + echo "include: ${lanzones_conf}" + fi if [ -d "${confdir}" ] ; then echo "include: ${confdir}/*.conf" fi @@ -323,6 +366,13 @@ main() { fi # + # Generate lan-zones.conf. + # + local tmp_lanzones_conf=$(mktemp -u "${lanzones_conf}.X") + gen_lanzones_conf >"${tmp_lanzones_conf}" + replace "${lanzones_conf}" "${tmp_lanzones_conf}" + + # # Generate unbound.conf. # local tmp_unbound_conf=$(mktemp -u "${unbound_conf}.X") ___ 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: r268842 - head/usr.bin/iscsictl
Author: gavin Date: Fri Jul 18 12:51:35 2014 New Revision: 268842 URL: http://svnweb.freebsd.org/changeset/base/268842 Log: Fix two typos in iscsictl.8 PR: 191581 Submitted by: Jimmy Olgeni MFC after:3 days Modified: head/usr.bin/iscsictl/iscsictl.8 Modified: head/usr.bin/iscsictl/iscsictl.8 == --- head/usr.bin/iscsictl/iscsictl.8Fri Jul 18 12:36:18 2014 (r268841) +++ head/usr.bin/iscsictl/iscsictl.8Fri Jul 18 12:51:35 2014 (r268842) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 18, 2014 +.Dd July 18, 2014 .Dt ISCSICTL 8 .Os .Sh NAME @@ -96,7 +96,7 @@ The default is Target host name or address used for SendTargets discovery. When used, it will add a temporary discovery session. After discovery is done, sessions will be added for each discovered target, -and the temporary discovery sesion will be removed. +and the temporary discovery session will be removed. .It Fl i Session ID, as displayed by .Nm @@ -115,7 +115,7 @@ CHAP login. Verbose mode. .El .Pp -Certain parameters are neccessary when adding a session. +Certain parameters are necessary when adding a session. One can specify these either via command line (using the .Fl t , .Fl p , ___ 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: r268833 - head/sys/dev/bge
On Jul 18, 2014, at 12:41 AM, Peter Wemm wrote: > Author: peter > Date: Fri Jul 18 07:41:38 2014 > New Revision: 268833 > URL: http://svnweb.freebsd.org/changeset/base/268833 > > Log: > Fix an apparent conversion error in bge to the new driver api. > if_multiaddr_array() does the LLADDR work, don't do it twice. Thanks! -- Marcel Moolenaar mar...@xcllnt.net signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r268843 - in head: lib/libc/sys sys/kern sys/sys
Author: bapt Date: Fri Jul 18 14:27:04 2014 New Revision: 268843 URL: http://svnweb.freebsd.org/changeset/base/268843 Log: Extend kqueue's EVFILT_TIMER by adding precision unit flags support Define the precision macros as bits sets to conform with XNU equivalent. Test fflags passed for EVFILT_TIMER and return EINVAL in case an invalid flag is passed. Phabric: https://phabric.freebsd.org/D421 Reviewed by: kib Modified: head/lib/libc/sys/kqueue.2 head/sys/kern/kern_event.c head/sys/sys/event.h Modified: head/lib/libc/sys/kqueue.2 == --- head/lib/libc/sys/kqueue.2 Fri Jul 18 12:51:35 2014(r268842) +++ head/lib/libc/sys/kqueue.2 Fri Jul 18 14:27:04 2014(r268843) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 7, 2014 +.Dd July 18, 2014 .Dt KQUEUE 2 .Os .Sh NAME @@ -454,7 +454,7 @@ Establishes an arbitrary timer identifie .Va ident . When adding a timer, .Va data -specifies the timeout period in milliseconds. +specifies the timeout period. The timer will be periodic unless EV_ONESHOT is specified. On return, .Va data @@ -465,8 +465,25 @@ There is a system wide limit on the numb which is controlled by the .Va kern.kq_calloutmax sysctl. +.Bl -tag -width XXNOTE_USECONDS +.It Dv NOTE_SECONDS +.Va data +is in seconds. +.It Dv NOTE_MSECONDS +.Va data +is in milliseconds. +.It Dv NOTE_USECONDS +.Va data +is in microseconds. +.It Dv NOTE_NSECONDS +.Va data +is in nanoseconds. +.It +.El .Pp -On return, +If +.Va fflags +is not set, the default is milliseconds. On return, .Va fflags contains the events which triggered the filter. .It Dv EVFILT_USER Modified: head/sys/kern/kern_event.c == --- head/sys/kern/kern_event.c Fri Jul 18 12:51:35 2014(r268842) +++ head/sys/kern/kern_event.c Fri Jul 18 14:27:04 2014(r268843) @@ -523,15 +523,38 @@ knote_fork(struct knlist *list, int pid) * XXX: EVFILT_TIMER should perhaps live in kern_time.c beside the * interval timer support code. */ + +#define NOTE_TIMER_PRECMASK(NOTE_SECONDS|NOTE_MSECONDS|NOTE_USECONDS| \ + NOTE_NSECONDS) + static __inline sbintime_t -timer2sbintime(intptr_t data) +timer2sbintime(intptr_t data, int flags) { + sbintime_t modifier; + + switch (flags & NOTE_TIMER_PRECMASK) { + case NOTE_SECONDS: + modifier = SBT_1S; + break; + case NOTE_MSECONDS: /* FALLTHROUGH */ + case 0: + modifier = SBT_1MS; + break; + case NOTE_USECONDS: + modifier = SBT_1US; + break; + case NOTE_NSECONDS: + modifier = SBT_1NS; + break; + default: + return (-1); + } #ifdef __LP64__ - if (data > SBT_MAX / SBT_1MS) + if (data > SBT_MAX / modifier) return (SBT_MAX); #endif - return (SBT_1MS * data); + return (modifier * data); } static void @@ -547,13 +570,13 @@ filt_timerexpire(void *knx) if ((kn->kn_flags & EV_ONESHOT) != EV_ONESHOT) { calloutp = (struct callout *)kn->kn_hook; callout_reset_sbt_on(calloutp, - timer2sbintime(kn->kn_sdata), 0 /* 1ms? */, + timer2sbintime(kn->kn_sdata, kn->kn_sfflags), 0, filt_timerexpire, kn, PCPU_GET(cpuid), 0); } } /* - * data contains amount of time to sleep, in milliseconds + * data contains amount of time to sleep */ static int filt_timerattach(struct knote *kn) @@ -566,7 +589,11 @@ filt_timerattach(struct knote *kn) return (EINVAL); if ((intptr_t)kn->kn_sdata == 0 && (kn->kn_flags & EV_ONESHOT) == 0) kn->kn_sdata = 1; - to = timer2sbintime(kn->kn_sdata); + /* Only precision unit are supported in flags so far */ + if (kn->kn_sfflags & ~NOTE_TIMER_PRECMASK) + return (EINVAL); + + to = timer2sbintime(kn->kn_sdata, kn->kn_sfflags); if (to < 0) return (EINVAL); @@ -583,7 +610,7 @@ filt_timerattach(struct knote *kn) calloutp = malloc(sizeof(*calloutp), M_KQUEUE, M_WAITOK); callout_init(calloutp, CALLOUT_MPSAFE); kn->kn_hook = calloutp; - callout_reset_sbt_on(calloutp, to, 0 /* 1ms? */, + callout_reset_sbt_on(calloutp, to, 0, filt_timerexpire, kn, PCPU_GET(cpuid), 0); return (0); Modified: head/sys/sys/event.h == --- head/sys/sys/event.hFri Jul 18 12:51:35 2014(r268842) +++ head/sys/sys/event.hFri Jul 18 14:27:04 2014(r268843) @@ -133,6 +133,12 @@ struct kevent { #defineNOTE_TRACKERR 0x0002 /* could not track child */ #defineNOTE_CHILD 0x
Re: svn commit: r268827 - head/usr.sbin/ndp
On Fri, Jul 18, 2014 at 2:48 AM, Peter Wemm wrote: > Author: peter > Date: Fri Jul 18 06:48:02 2014 > New Revision: 268827 > URL: http://svnweb.freebsd.org/changeset/base/268827 > > Log: > Fix "ndp -d hostname". > > MFC? -Ben ___ 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: r268844 - head/sys/kern
Author: glebius Date: Fri Jul 18 14:59:35 2014 New Revision: 268844 URL: http://svnweb.freebsd.org/changeset/base/268844 Log: Use assignment instead of bcopy. Submitted by: jmg Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c == --- head/sys/kern/uipc_mbuf.c Fri Jul 18 14:27:04 2014(r268843) +++ head/sys/kern/uipc_mbuf.c Fri Jul 18 14:59:35 2014(r268844) @@ -377,7 +377,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) atomic_add_int(m->m_ext.ext_cnt, 1); } - bcopy(&m->m_ext, &n->m_ext, sizeof(m->m_ext)); + n->m_ext = m->m_ext; n->m_flags |= M_EXT; n->m_flags |= m->m_flags & M_RDONLY; } ___ 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: r268845 - in head: . share/man/man9
Author: alc Date: Fri Jul 18 15:39:07 2014 New Revision: 268845 URL: http://svnweb.freebsd.org/changeset/base/268845 Log: Remove obsolete man pages. The corresponding code was removed in r255608. Deleted: head/share/man/man9/zero_copy.9 Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Fri Jul 18 14:59:35 2014(r268844) +++ head/ObsoleteFiles.inc Fri Jul 18 15:39:07 2014(r268845) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20140718: Remove obsolete man pages +OLD_FILES+=usr/share/man/man9/zero_copy.9.gz +OLD_FILES+=usr/share/man/man9/zero_copy_sockets.9.gz # 20140718: Remove an obsolete man page OLD_FILES+=usr/share/man/man9/pmap_page_protect.9.gz # 20140717: Remove an obsolete man page Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileFri Jul 18 14:59:35 2014 (r268844) +++ head/share/man/man9/MakefileFri Jul 18 15:39:07 2014 (r268845) @@ -384,7 +384,6 @@ MAN=accept_filter.9 \ vrele.9 \ vslock.9 \ watchdog.9 \ - zero_copy.9 \ zone.9 MLINKS=unr.9 alloc_unr.9 \ @@ -1574,7 +1573,6 @@ MLINKS+=vref.9 VREF.9 MLINKS+=vrele.9 vput.9 \ vrele.9 vunref.9 MLINKS+=vslock.9 vsunlock.9 -MLINKS+=zero_copy.9 zero_copy_sockets.9 MLINKS+=zone.9 uma.9 \ zone.9 uma_zalloc.9 \ zone.9 uma_zalloc_arg.9 \ ___ 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: r268846 - head/include
Author: pfg Date: Fri Jul 18 16:21:15 2014 New Revision: 268846 URL: http://svnweb.freebsd.org/changeset/base/268846 Log: Revertr268826: The current ordering of this header is a feature as it is more consistent with POSIX. Also adding gratuitous newlines is not elegant. Pointed out by: bde Modified: head/include/search.h Modified: head/include/search.h == --- head/include/search.h Fri Jul 18 15:39:07 2014(r268845) +++ head/include/search.h Fri Jul 18 16:21:15 2014(r268846) @@ -1,8 +1,8 @@ /*- - * Written by J.T. Conklin + * Written by J.T. Conklin * Public domain. * - * $NetBSD: search.h,v 1.18 2005/07/06 15:47:15 drochner Exp $ + * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $ * $FreeBSD$ */ @@ -49,14 +49,12 @@ __BEGIN_DECLS int hcreate(size_t); voidhdestroy(void); ENTRY *hsearch(ENTRY, ACTION); - +voidinsque(void *, void *); void *lfind(const void *, const void *, size_t *, size_t, int (*)(const void *, const void *)); void *lsearch(const void *, void *, size_t *, size_t, int (*)(const void *, const void *)); -voidinsque(void *, void *); voidremque(void *); - void *tdelete(const void * __restrict, void ** __restrict, int (*)(const void *, const void *)); void *tfind(const void *, void * const *, ___ 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: r268847 - head/sys/dev/e1000
Author: hiren Date: Fri Jul 18 16:25:35 2014 New Revision: 268847 URL: http://svnweb.freebsd.org/changeset/base/268847 Log: The description is a bit misleading. Trying to make it more obvious. Phabric:https://phabric.freebsd.org/D435 Reviewed by: gnn Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Fri Jul 18 16:21:15 2014(r268846) +++ head/sys/dev/e1000/if_igb.c Fri Jul 18 16:25:35 2014(r268847) @@ -5853,7 +5853,7 @@ igb_add_hw_stats(struct adapter *adapter "Transmit Descriptor Tail"); SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", CTLFLAG_RD, &txr->no_desc_avail, - "Queue No Descriptor Available"); + "Queue Descriptors Unavailable"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tx_packets", CTLFLAG_RD, &txr->total_packets, "Queue Packets Transmitted"); ___ 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: r268837 - head/sys/netinet
Update the default RSS hash to the Chelsio T5 firmware one - it provides markedly better distribution of IPv6 address/ports than the previous key. That's actually the key that's used for verification in the Microsoft spec, though it looks like you have the bytes arranged backwards, which appears to be an artifact of the strange way the key is programmed into the Chelsio. My suggestion is: put the bytes in the default key in the order they are in the spec. This allows independent verification of the hash function in hardware by injecting frames with the values from the spec and looking at what h/w provides. Then, fix how it is programmed in the Chelsio. From memory, the Intel registers were a byte array. I also recall that the Qlogic FCOE adapters were 32-bits at a time, but big-endian. On the contents of the has, so long as there are a enough random 1-bits in the key, the distribution is as good as the Jenkins hash. Easy to verify with a test harness and ministat etc, but also verified at Netapp in the mega performance lab with a number of different key values. later, Peter. ___ 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: r268837 - head/sys/netinet
On 18 July 2014 09:46, Peter Grehan wrote: >>Update the default RSS hash to the Chelsio T5 firmware one - it >> provides >>markedly better distribution of IPv6 address/ports than the previous >> key. > > > That's actually the key that's used for verification in the Microsoft spec, > though it looks like you have the bytes arranged backwards, which appears to > be an artifact of the strange way the key is programmed into the Chelsio. Hah! I wonder why the key from the T3 NIC that Robert committed was so .. terrible then. Are you saying that the actual byte order is totally reversed, or just endian? > My suggestion is: put the bytes in the default key in the order they are in > the spec. This allows independent verification of the hash function in > hardware by injecting frames with the values from the spec and looking at > what h/w provides. Then, fix how it is programmed in the Chelsio. From > memory, the Intel registers were a byte array. I also recall that the Qlogic > FCOE adapters were 32-bits at a time, but big-endian. Cool. > On the contents of the has, so long as there are a enough random 1-bits in > the key, the distribution is as good as the Jenkins hash. Easy to verify > with a test harness and ministat etc, but also verified at Netapp in the > mega performance lab with a number of different key values. I think that was Roberts main concern with using a randomised key at startup. It sounds Netapp have already done a lot of the work that I was thinking about in the back of my mind - I'll add that to my TODO list so we can write a random key generation function at boot time. Thanks1 -a ___ 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: r268837 - head/sys/netinet
Hi Adrian, Hah! I wonder why the key from the T3 NIC that Robert committed was so .. terrible then. Are you saying that the actual byte order is totally reversed, or just endian? The 32-bit word order of your array is reversed. The last 4 bytes should be the first, etc. Have a look at the values in the Microsoft spec. I think that was Roberts main concern with using a randomised key at startup. It sounds Netapp have already done a lot of the work that I was thinking about in the back of my mind - I'll add that to my TODO list so we can write a random key generation function at boot time. It's still useful to select the Microsoft value e.g. with a tunable, since it allows easy verification when folk are implementing RSS. later, Peter. ___ 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: r268854 - head/sys/dev/bxe
Author: davidcs Date: Fri Jul 18 20:04:11 2014 New Revision: 268854 URL: http://svnweb.freebsd.org/changeset/base/268854 Log: Initiate error recovery stats fail to update after 3 retries. Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to panic only if ECORE_STOP_ON_ERROR is defined. MFC after:5 days Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe.h head/sys/dev/bxe/bxe_stats.c head/sys/dev/bxe/ecore_reg.h head/sys/dev/bxe/ecore_sp.h Modified: head/sys/dev/bxe/bxe.c == --- head/sys/dev/bxe/bxe.c Fri Jul 18 18:11:24 2014(r268853) +++ head/sys/dev/bxe/bxe.c Fri Jul 18 20:04:11 2014(r268854) @@ -11471,6 +11471,10 @@ bxe_process_kill(struct bxe_softc *sc, bxe_process_kill_chip_reset(sc, global); mb(); +/* clear errors in PGB */ +if (!CHIP_IS_E1(sc)) +REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f); + /* Recover after reset: */ /* MCP */ if (global && bxe_reset_mcp_comp(sc, val)) { Modified: head/sys/dev/bxe/bxe.h == --- head/sys/dev/bxe/bxe.h Fri Jul 18 18:11:24 2014(r268853) +++ head/sys/dev/bxe/bxe.h Fri Jul 18 20:04:11 2014(r268854) @@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx } \ } while(0) +#ifdef ECORE_STOP_ON_ERROR + #define bxe_panic(sc, msg) \ do { \ panic msg; \ } while (0) +#else + +#define bxe_panic(sc, msg) \ +device_printf((sc)->dev, "%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#endif + #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data)); #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe) Modified: head/sys/dev/bxe/bxe_stats.c == --- head/sys/dev/bxe/bxe_stats.cFri Jul 18 18:11:24 2014 (r268853) +++ head/sys/dev/bxe/bxe_stats.cFri Jul 18 20:04:11 2014 (r268854) @@ -1302,7 +1302,10 @@ bxe_stats_update(struct bxe_softc *sc) if (bxe_storm_stats_update(sc)) { if (sc->stats_pending++ == 3) { -bxe_panic(sc, ("storm stats not updated for 3 times\n")); + if (sc->ifnet->if_drv_flags & IFF_DRV_RUNNING) { + atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT); + taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); + } } return; } Modified: head/sys/dev/bxe/ecore_reg.h == --- head/sys/dev/bxe/ecore_reg.hFri Jul 18 18:11:24 2014 (r268853) +++ head/sys/dev/bxe/ecore_reg.hFri Jul 18 20:04:11 2014 (r268854) @@ -1039,6 +1039,8 @@ __FBSDID("$FreeBSD$"); 0x942cUL #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \ 0x9430UL +#define PGLUE_B_REG_LATCHED_ERRORS_CLR \ + 0x943CUL #define PGLUE_B_REG_PGLUE_B_INT_STS \ 0x9298UL #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \ Modified: head/sys/dev/bxe/ecore_sp.h == --- head/sys/dev/bxe/ecore_sp.h Fri Jul 18 18:11:24 2014(r268853) +++ head/sys/dev/bxe/ecore_sp.h Fri Jul 18 20:04:11 2014(r268854) @@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m #define ecore_sp_post(_sc, _a, _b, _c, _d) \ bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d) +#ifdef ECORE_STOP_ON_ERROR + #define ECORE_DBG_BREAK_IF(exp) \ do {\ if (__predict_false(exp)) { \ @@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m }\ } while (0) +#else + +#define ECORE_DBG_BREAK_IF(exp) \ +printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG(exp) \ +printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG_ON(exp) \ +printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + + +#endif /* #ifdef ECORE_STOP_ON_ERROR */ + #define ECORE_ERR(str, ...) \ BLOGE(sc, "ECORE: " str, ##__VA_ARGS__) ___ 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: Phabric IDs / URLs in commits
On 11 July 2014 12:38, John Baldwin wrote: >> CR: https://phabric.freebsd.org/D312 >> Reviewed by:jilles >> MFC after: 1 week > > Just picking my own commit here as a sample case. > > I think we should be annotating commits with phabricator code reviews in some > way when a change has gone through that review. It is very useful to get back > to the review details from the commit log message in svnweb, etc. FYI, Phabricator's canonical format for this is: Differential Revision: http://phabric.freebsd.org/D312 It will then automatically associate the commit with the review and close the review. See for example LLVM review D4563: Review: http://reviews.llvm.org/D4563 Commit: http://reviews.llvm.org/rL213304 (from LLVM's Phabricator repo browser; LLVM's viewvc seems to be down at the moment.) "Differential Revision" seems a bit unwieldy and "CR" does fit in better with our other tags. But we'll want to teach Phabricator to parse our custom tag if we go that way. ___ 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: r268840 - head/usr.sbin/unbound/local-setup
should this be noted in UPDATING to re-gen the files locally or something? On 2014-07-18 07:33, Dag-Erling Smørgrav wrote: Author: des Date: Fri Jul 18 12:33:22 2014 New Revision: 268840 URL: http://svnweb.freebsd.org/changeset/base/268840 Log: Use a combination of unblock-lan-zones (r268839) and domain-insecure to fix reverse lookups on networks using private addresses. Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh == --- head/usr.sbin/unbound/local-setup/local-unbound-setup.shFri Jul 18 11:32:44 2014(r268839) +++ head/usr.sbin/unbound/local-setup/local-unbound-setup.shFri Jul 18 12:33:22 2014(r268840) @@ -33,6 +33,7 @@ user="" unbound_conf="" forward_conf="" +lanzones_conf="" workdir="" confdir="" chrootdir="" @@ -59,6 +60,7 @@ set_defaults() { : ${confdir:=${workdir}/conf.d} : ${unbound_conf:=${workdir}/unbound.conf} : ${forward_conf:=${workdir}/forward.conf} + : ${lanzones_conf:=${workdir}/lan-zones.conf} : ${anchor:=${workdir}/root.key} : ${pidfile:=/var/run/local_unbound.pid} : ${resolv_conf:=/etc/resolv.conf} @@ -73,7 +75,8 @@ set_defaults() { # set_chrootdir() { chrootdir="${workdir}" - for file in "${unbound_conf}" "${forward_conf}" "${anchor}" ; do + for file in "${unbound_conf}" "${forward_conf}" \ + "${lanzones_conf}" "${anchor}" ; do if [ "${file#${workdir%/}/}" = "${file}" ] ; then echo "warning: ${file} is outside ${workdir}" >&2 chrootdir="" @@ -171,6 +174,7 @@ gen_resolvconf_conf() { # gen_forward_conf() { echo "# Generated by $self" + echo "# Do not edit this file." echo "forward-zone:" echo "name: ." for forwarder ; do @@ -183,6 +187,42 @@ gen_forward_conf() { } # +# Generate lan-zones.conf +# +gen_lanzones_conf() { + echo "# Generated by $self" + echo "# Do not edit this file." + echo "server:" + echo "# Unblock reverse lookups for LAN addresses" + echo "unblock-lan-zones: yes" + echo "domain-insecure: 10.in-addr.arpa." + echo "domain-insecure: 127.in-addr.arpa." + echo "domain-insecure: 16.172.in-addr.arpa." + echo "domain-insecure: 17.172.in-addr.arpa." + echo "domain-insecure: 18.172.in-addr.arpa." + echo "domain-insecure: 19.172.in-addr.arpa." + echo "domain-insecure: 20.172.in-addr.arpa." + echo "domain-insecure: 21.172.in-addr.arpa." + echo "domain-insecure: 22.172.in-addr.arpa." + echo "domain-insecure: 23.172.in-addr.arpa." + echo "domain-insecure: 24.172.in-addr.arpa." + echo "domain-insecure: 25.172.in-addr.arpa." + echo "domain-insecure: 26.172.in-addr.arpa." + echo "domain-insecure: 27.172.in-addr.arpa." + echo "domain-insecure: 28.172.in-addr.arpa." + echo "domain-insecure: 29.172.in-addr.arpa." + echo "domain-insecure: 30.172.in-addr.arpa." + echo "domain-insecure: 31.172.in-addr.arpa." + echo "domain-insecure: 168.192.in-addr.arpa." + echo "domain-insecure: 254.169.in-addr.arpa." + echo "domain-insecure: d.f.ip6.arpa." + echo "domain-insecure: 8.e.ip6.arpa." + echo "domain-insecure: 9.e.ip6.arpa." + echo "domain-insecure: a.e.ip6.arpa." + echo "domain-insecure: b.e.ip6.arpa." +} + +# # Generate unbound.conf # gen_unbound_conf() { @@ -197,6 +237,9 @@ gen_unbound_conf() { if [ -f "${forward_conf}" ] ; then echo "include: ${forward_conf}" fi + if [ -f "${lanzones_conf}" ] ; then + echo "include: ${lanzones_conf}" + fi if [ -d "${confdir}" ] ; then echo "include: ${confdir}/*.conf" fi @@ -323,6 +366,13 @@ main() { fi # + # Generate lan-zones.conf. + # + local tmp_lanzones_conf=$(mktemp -u "${lanzones_conf}.X") + gen_lanzones_conf >"${tmp_lanzones_conf}" + replace "${lanzones_conf}" "${tmp_lanzones_conf}" + + # # Generate unbound.conf. # local tmp_unbound_conf=$(mktemp -u "${unbound_conf}.X") ___ svn-src-...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org" -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 (c) E-Mail: l...@lerctr.org US Mail: 108 Turvey Cove, Hutto, TX 78634-5688 ___
svn commit: r268855 - in head: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Author: delphij Date: Fri Jul 18 20:41:40 2014 New Revision: 268855 URL: http://svnweb.freebsd.org/changeset/base/268855 Log: MFV r268848: Instead of asserting all zio's be properly aligned, only assert on the logical ones. Cap uberblocks at 8k, otherwise with ashift=17, there would be only one uberblock. This fixes a problem that zdb would trip assert on pools with ashift >= 0xe (8k). While there, also change the code so it only attempt to condense space map unless the uncondensed size consumes greater than zfs_metaslab_condense_block_threshold blocks. Illumos issue: 4958 zdb trips assert on pools with ashift >= 0xe MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c == --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Fri Jul 18 20:04:11 2014(r268854) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Fri Jul 18 20:41:40 2014(r268855) @@ -810,7 +810,7 @@ static uint64_t ztest_get_ashift(void) { if (ztest_opts.zo_ashift == 0) - return (SPA_MINBLOCKSHIFT + ztest_random(3)); + return (SPA_MINBLOCKSHIFT + ztest_random(5)); return (ztest_opts.zo_ashift); } @@ -969,11 +969,28 @@ ztest_random_spa_version(uint64_t initia return (version); } +/* + * Find the largest ashift used + */ +static uint64_t +ztest_spa_get_ashift() { + uint64_t i; + uint64_t ashift = SPA_MINBLOCKSHIFT; + vdev_t *rvd = ztest_spa->spa_root_vdev; + + for (i = 0; i < rvd->vdev_children; i++) { + ashift = MAX(ashift, rvd->vdev_child[i]->vdev_ashift); + } + return (ashift); +} + static int ztest_random_blocksize(void) { - return (1 << (SPA_MINBLOCKSHIFT + - ztest_random(SPA_MAXBLOCKSHIFT - SPA_MINBLOCKSHIFT + 1))); + // Choose a block size >= the ashift. + uint64_t block_shift = + ztest_random(SPA_MAXBLOCKSHIFT - ztest_spa_get_ashift() + 1); + return (1 << (SPA_MINBLOCKSHIFT + block_shift)); } static int @@ -5768,16 +5785,30 @@ ztest_freeze(void) spa_freeze(spa); /* +* Because it is hard to predict how much space a write will actually +* require beforehand, we leave ourselves some fudge space to write over +* capacity. +*/ + uint64_t capacity = metaslab_class_get_space(spa_normal_class(spa)) / 2; + + /* * Run tests that generate log records but don't alter the pool config * or depend on DSL sync tasks (snapshots, objset create/destroy, etc). * We do a txg_wait_synced() after each iteration to force the txg * to increase well beyond the last synced value in the uberblock. * The ZIL should be OK with that. +* +* Run a random number of times less than zo_maxloops and ensure we do +* not run out of space on the pool. */ while (ztest_random(10) != 0 && - numloops++ < ztest_opts.zo_maxloops) { - ztest_dmu_write_parallel(zd, 0); - ztest_dmu_object_alloc_free(zd, 0); + numloops++ < ztest_opts.zo_maxloops && + metaslab_class_get_alloc(spa_normal_class(spa)) < capacity) { + ztest_od_t od; + ztest_od_init(&od, 0, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0); + VERIFY0(ztest_object_init(zd, &od, sizeof (od), B_FALSE)); + ztest_io(zd, od.od_object, + ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); txg_wait_synced(spa_get_dsl(spa), 0); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri Jul 18 20:04:11 2014(r268854) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri Jul 18 20:41:40 2014(r268855) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved
Re: svn commit: r268854 - head/sys/dev/bxe
On 18 Jul 2014, at 20:04 , David C Somayajulu wrote: > Author: davidcs > Date: Fri Jul 18 20:04:11 2014 > New Revision: 268854 > URL: http://svnweb.freebsd.org/changeset/base/268854 > > Log: > Initiate error recovery stats fail to update after 3 retries. > Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to > panic only if ECORE_STOP_ON_ERROR is defined. > > MFC after:5 days This broke builds: /scratch/tmp/bz/head.svn/sys/modules/bxe/../../dev/bxe/bxe_stats.c:1305:11: error: no member named 'ifnet' in 'struct bxe_softc' > > Modified: > head/sys/dev/bxe/bxe.c > head/sys/dev/bxe/bxe.h > head/sys/dev/bxe/bxe_stats.c > head/sys/dev/bxe/ecore_reg.h > head/sys/dev/bxe/ecore_sp.h > > Modified: head/sys/dev/bxe/bxe.c > == > --- head/sys/dev/bxe/bxe.cFri Jul 18 18:11:24 2014(r268853) > +++ head/sys/dev/bxe/bxe.cFri Jul 18 20:04:11 2014(r268854) > @@ -11471,6 +11471,10 @@ bxe_process_kill(struct bxe_softc *sc, > bxe_process_kill_chip_reset(sc, global); > mb(); > > +/* clear errors in PGB */ > +if (!CHIP_IS_E1(sc)) > +REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f); > + > /* Recover after reset: */ > /* MCP */ > if (global && bxe_reset_mcp_comp(sc, val)) { > > Modified: head/sys/dev/bxe/bxe.h > == > --- head/sys/dev/bxe/bxe.hFri Jul 18 18:11:24 2014(r268853) > +++ head/sys/dev/bxe/bxe.hFri Jul 18 20:04:11 2014(r268854) > @@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx > } \ > } while(0) > > +#ifdef ECORE_STOP_ON_ERROR > + > #define bxe_panic(sc, msg) \ > do { \ > panic msg; \ > } while (0) > > +#else > + > +#define bxe_panic(sc, msg) \ > +device_printf((sc)->dev, "%s (%s,%d)\n", __FUNCTION__, __FILE__, > __LINE__); > + > +#endif > + > #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data)); > #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe) > > > Modified: head/sys/dev/bxe/bxe_stats.c > == > --- head/sys/dev/bxe/bxe_stats.c Fri Jul 18 18:11:24 2014 > (r268853) > +++ head/sys/dev/bxe/bxe_stats.c Fri Jul 18 20:04:11 2014 > (r268854) > @@ -1302,7 +1302,10 @@ bxe_stats_update(struct bxe_softc *sc) > > if (bxe_storm_stats_update(sc)) { > if (sc->stats_pending++ == 3) { > -bxe_panic(sc, ("storm stats not updated for 3 times\n")); > + if (sc->ifnet->if_drv_flags & IFF_DRV_RUNNING) { > + atomic_store_rel_long(&sc->chip_tq_flags, > CHIP_TQ_REINIT); > + taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); > + } > } > return; > } > > Modified: head/sys/dev/bxe/ecore_reg.h > == > --- head/sys/dev/bxe/ecore_reg.h Fri Jul 18 18:11:24 2014 > (r268853) > +++ head/sys/dev/bxe/ecore_reg.h Fri Jul 18 20:04:11 2014 > (r268854) > @@ -1039,6 +1039,8 @@ __FBSDID("$FreeBSD$"); > 0x942cUL > #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \ > 0x9430UL > +#define PGLUE_B_REG_LATCHED_ERRORS_CLR \ > + 0x943CUL > #define PGLUE_B_REG_PGLUE_B_INT_STS \ > 0x9298UL > #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \ > > Modified: head/sys/dev/bxe/ecore_sp.h > == > --- head/sys/dev/bxe/ecore_sp.h Fri Jul 18 18:11:24 2014 > (r268853) > +++ head/sys/dev/bxe/ecore_sp.h Fri Jul 18 20:04:11 2014 > (r268854) > @@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m > #define ecore_sp_post(_sc, _a, _b, _c, _d) \ > bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d) > > +#ifdef ECORE_STOP_ON_ERROR > + > #define ECORE_DBG_BREAK_IF(exp) \ > do {\ > if (__predict_false(exp)) { \ > @@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m > }\ > } while (0) > > +#else > + > +#define ECORE_DBG_BREAK_IF(exp) \ > +printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); > + > +#define ECORE_BUG(exp) \ > +printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); > + > +#define ECORE_BUG_ON(exp) \ > +printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); > + > + > +#endif /* #ifdef ECORE_STOP_ON_ERROR */ > + > #define ECORE_ERR(str, ...) \ > BLOGE(sc, "ECORE: " str, ##__VA_ARGS__) > > — Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 ___ svn-src-head@freebsd.org mailing list http://
svn commit: r268856 - head/sys/dev/bxe
Author: delphij Date: Fri Jul 18 21:28:59 2014 New Revision: 268856 URL: http://svnweb.freebsd.org/changeset/base/268856 Log: Fix build by using the driver API (driver converted in r266979 which should be upstreamed). X-MFC with: r268854 MFC after:5 days Modified: head/sys/dev/bxe/bxe_stats.c Modified: head/sys/dev/bxe/bxe_stats.c == --- head/sys/dev/bxe/bxe_stats.cFri Jul 18 20:41:40 2014 (r268855) +++ head/sys/dev/bxe/bxe_stats.cFri Jul 18 21:28:59 2014 (r268856) @@ -1302,7 +1302,7 @@ bxe_stats_update(struct bxe_softc *sc) if (bxe_storm_stats_update(sc)) { if (sc->stats_pending++ == 3) { - if (sc->ifnet->if_drv_flags & IFF_DRV_RUNNING) { + if (if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING) { atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT); taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); } ___ 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: r268857 - head/lib/libc/gen
Author: jilles Date: Fri Jul 18 21:29:59 2014 New Revision: 268857 URL: http://svnweb.freebsd.org/changeset/base/268857 Log: ttyname(3): Fix EBADF/ENOTTY error descriptions. Also, make sure to document the return values and errors for all three functions in the man page. PR: 191931 MFC after:1 week Modified: head/lib/libc/gen/ttyname.3 Modified: head/lib/libc/gen/ttyname.3 == --- head/lib/libc/gen/ttyname.3 Fri Jul 18 21:28:59 2014(r268856) +++ head/lib/libc/gen/ttyname.3 Fri Jul 18 21:29:59 2014(r268857) @@ -28,7 +28,7 @@ .\" @(#)ttyname.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 14, 2005 +.Dd July 18, 2014 .Dt TTYNAME 3 .Os .Sh NAME @@ -76,6 +76,14 @@ function takes a buffer and length as arguments to avoid this problem. .Sh RETURN VALUES The +.Fn isatty +function returns 1 if +.Fa fd +refers to a terminal type device; +otherwise, it returns 0 and may set +.Va errno +to indicate the error. +The .Fn ttyname function returns the null terminated name if the device is found and @@ -89,15 +97,23 @@ The function returns 0 if successful. Otherwise an error number is returned. .Sh ERRORS -The -.Fn ttyname_r -may fail and return the following error codes: +These functions may fail if: .Bl -tag -width Er -.It Bq Er ENOTTY +.It Bq Er EBADF The .Fa fd argument is not a valid file descriptor. +.It Bq Er ENOTTY +The file associated with +.Fa fd +is not a terminal. +.El +.Pp +Additionally, +.Fn ttyname_r +may fail if: +.Bl -tag -width Er .It Bq Er ERANGE The .Fa bufsize ___ 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: r268858 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: delphij Date: Fri Jul 18 22:04:21 2014 New Revision: 268858 URL: http://svnweb.freebsd.org/changeset/base/268858 Log: MFV r268850: Change the interaction between the DMU and ARC so that when the DMU is shutting down an objset, we do not evict the data from the ARC. Instead we simply coordinate the destruction of the DMU's data with the ARC. The only case where we actually need to explicitly evict from the ARC is when dbuf_rele_and_unlock() determines that the administrator has requested that it not be kept in memory, via the primarycache/secondarycache properties. In this case, we evict the data from the ARC by its blkptr_t, the same way as when a block is freed we explicitly evict it from the ARC. Illumos issue: 4631 zvol_get_stats triggering too many reads MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jul 18 21:29:59 2014(r268857) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jul 18 22:04:21 2014(r268858) @@ -104,7 +104,7 @@ * with the buffer may be evicted prior to the callback. The callback * must be made with *no locks held* (to prevent deadlock). Additionally, * the users of callbacks must ensure that their private data is - * protected from simultaneous callbacks from arc_buf_evict() + * protected from simultaneous callbacks from arc_clear_callback() * and arc_do_user_evicts(). * * Note that the majority of the performance stats are manipulated @@ -1645,8 +1645,12 @@ arc_buf_data_free(arc_buf_t *buf, void ( } } +/* + * Free up buf->b_data and if 'remove' is set, then pull the + * arc_buf_t off of the the arc_buf_hdr_t's list and free it. + */ static void -arc_buf_destroy(arc_buf_t *buf, boolean_t recycle, boolean_t all) +arc_buf_destroy(arc_buf_t *buf, boolean_t recycle, boolean_t remove) { arc_buf_t **bufp; @@ -1699,7 +1703,7 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ } /* only remove the buf if requested */ - if (!all) + if (!remove) return; /* remove the buf from the hdr list */ @@ -2353,7 +2357,7 @@ restart: mutex_exit(&buf->b_evict_lock); if (buf->b_efunc != NULL) - VERIFY(buf->b_efunc(buf) == 0); + VERIFY0(buf->b_efunc(buf->b_private)); buf->b_efunc = NULL; buf->b_private = NULL; @@ -3488,16 +3492,25 @@ arc_freed(spa_t *spa, const blkptr_t *bp } /* - * This is used by the DMU to let the ARC know that a buffer is - * being evicted, so the ARC should clean up. If this arc buf - * is not yet in the evicted state, it will be put there. + * Clear the user eviction callback set by arc_set_callback(), first calling + * it if it exists. Because the presence of a callback keeps an arc_buf cached + * clearing the callback may result in the arc_buf being destroyed. However, + * it will not result in the *last* arc_buf being destroyed, hence the data + * will remain cached in the ARC. We make a copy of the arc buffer here so + * that we can process the callback without holding any locks. + * + * It's possible that the callback is already in the process of being cleared + * by another thread. In this case we can not clear the callback. + * + * Returns B_TRUE if the callback was successfully called and cleared. */ -int -arc_buf_evict(arc_buf_t *buf) +boolean_t +arc_clear_callback(arc_buf_t *buf) { arc_buf_hdr_t *hdr; kmutex_t *hash_lock; - arc_buf_t **bufp; + arc_evict_func_t *efunc = buf->b_efunc; + void *private = buf->b_private; list_t *list, *evicted_list; kmutex_t *lock, *evicted_lock; @@ -3509,17 +3522,16 @@ arc_buf_evict(arc_buf_t *buf) */ ASSERT(buf->b_data == NULL); mutex_exit(&buf->b_evict_lock); - return (0); + return (B_FALSE); } else if (buf->b_data == NULL) { - arc_buf_t copy = *buf; /* structure assignment */ /* * We are on the eviction list; process this buffer now * but let arc_do_user_evicts() do the reaping. */ buf->b_efunc = NULL; mutex_exit(&buf->b_evict_lock); - VERIFY(copy.b_efunc(©) == 0); - return (1); + VERIFY0(efunc(private)); + return (B_TRUE); } hash_lock = HDR_LOCK(hdr); mutex_enter(hash_lock); @@
svn commit: r268859 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: delphij Date: Fri Jul 18 22:34:01 2014 New Revision: 268859 URL: http://svnweb.freebsd.org/changeset/base/268859 Log: MFV r268851: When a sync task is waiting for a txg to complete, we should hurry it along by increasing the number of outstanding async writes (i.e. make vdev_queue_max_async_writes() return a larger number). Illumos issue: 4753 increase number of outstanding async writes when sync task is waiting MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Jul 18 22:04:21 2014(r268858) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Jul 18 22:34:01 2014(r268859) @@ -1932,6 +1932,16 @@ spa_writeable(spa_t *spa) return (!!(spa->spa_mode & FWRITE)); } +/* + * Returns true if there is a pending sync task in any of the current + * syncing txg, the current quiescing txg, or the current open txg. + */ +boolean_t +spa_has_pending_synctask(spa_t *spa) +{ + return (!txg_all_lists_empty(&spa->spa_dsl_pool->dp_sync_tasks)); +} + int spa_mode(spa_t *spa) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Fri Jul 18 22:04:21 2014(r268858) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Fri Jul 18 22:34:01 2014(r268859) @@ -800,6 +800,7 @@ extern uint64_t bp_get_dsize(spa_t *spa, extern boolean_t spa_has_slogs(spa_t *spa); extern boolean_t spa_is_root(spa_t *spa); extern boolean_t spa_writeable(spa_t *spa); +extern boolean_t spa_has_pending_synctask(spa_t *spa); extern int spa_mode(spa_t *spa); extern uint64_t zfs_strtonum(const char *str, char **nptr); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h Fri Jul 18 22:04:21 2014(r268858) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h Fri Jul 18 22:34:01 2014(r268859) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_TXG_H @@ -112,6 +112,7 @@ extern boolean_t txg_sync_waiting(struct extern void txg_list_create(txg_list_t *tl, size_t offset); extern void txg_list_destroy(txg_list_t *tl); extern boolean_t txg_list_empty(txg_list_t *tl, uint64_t txg); +extern boolean_t txg_all_lists_empty(txg_list_t *tl); extern boolean_t txg_list_add(txg_list_t *tl, void *p, uint64_t txg); extern boolean_t txg_list_add_tail(txg_list_t *tl, void *p, uint64_t txg); extern void *txg_list_remove(txg_list_t *tl, uint64_t txg); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Fri Jul 18 22:04:21 2014(r268858) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Fri Jul 18 22:34:01 2014(r268859) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -726,6 +726,24 @@ txg_list_empty(txg_list_t *tl, uint64_t } /* + * Returns true if all txg lists are empty. + * + * Warning: this is inherently racy (an item could be added immediately after this + * function returns). We don't bother with the lock because it wouldn't change the + * semantics. + */ +boolean_t +txg_all_lists_empty(txg_list_t *tl) +{ + for (int i = 0; i < TXG_SIZE; i++) { + if (!txg_list_empty(tl, i)) { + return (B_FALSE); + } + } + return (B_TRUE); +} + +/* * Add an entry to the list (unless it's already on the list). * Returns B_TRUE if it was actually added. */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c == --- head/sys/cddl/contrib/opensolaris/u
svn commit: r268860 - head/usr.sbin/sysrc
Author: dteske Date: Fri Jul 18 22:44:15 2014 New Revision: 268860 URL: http://svnweb.freebsd.org/changeset/base/268860 Log: Minor enhancements, bug fixes, and man-page adjustments. + Make `sysrc -x foo' produce error status if foo is unset. NB: Reported by lme (everything else ``while I'm at it'') + Remove mention of SYSRC_VERBOSE from `sysrc --help' output. NB: False documentation leftover from an ancient precursor. + Make `sysrc -qc foo' work the same as `sysrc -ic foo' when foo is unset NB: For syntax convenience (my fingers know `-q' more than `-i'). + Update description of `-c' flag in help message/manual. + Update description of `-q' flag in help message/manual. + Make `sysrc -vc foo' work as documented in the manual NB: Show message stating whether foo is currently set. + Make `sysrc -vc foo=1' work as documented in the manual NB: Show message stating how value of foo would be changed (if at all). + Remove odd usage of parentheses in `-R dir' section of manual. + Clarify syntax section of manual w/respect to sysctl(8) similarities. + Add new/missing people to the `THANKS TO' section of the manual. Reported by: lme MFC after:3 days X-MFC-to: stable/10, stable/9, ports Modified: head/usr.sbin/sysrc/sysrc head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc == --- head/usr.sbin/sysrc/sysrc Fri Jul 18 22:34:01 2014(r268859) +++ head/usr.sbin/sysrc/sysrc Fri Jul 18 22:44:15 2014(r268860) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010-2013 Devin Teske +# Copyright (c) 2010-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" # # Version information # -SYSRC_VERSION="6.0 Nov-07,2013" +SYSRC_VERSION="6.1 Jul-18,2014" # # Options @@ -102,7 +102,7 @@ help() f_err "$optfmt" "-A" \ "Dump a list of all configuration variables (incl. defaults)." f_err "$optfmt" "-c" \ - "Check. Return success if no changes needed, else error." + "Check. Return success if set or no changes, else error." f_err "$optfmt" "-d" \ "Print a description of the given variable." f_err "$optfmt" "-D" \ @@ -134,7 +134,7 @@ help() f_err "$optfmt" "-N" \ "Show only variable names, not their values." f_err "$optfmt" "-q" \ - "Quiet. Ignore previous \`-v' and/or SYSRC_VERBOSE." + "Quiet. Disable verbose and hide certain errors." f_err "$optfmt" "-R dir" \ "Operate within the root directory \`dir' rather than \`/'." f_err "$optfmt" "-v" \ @@ -152,8 +152,6 @@ help() "Override default rc_conf_files (even if set to NULL)." f_err "$envfmt" "RC_DEFAULTS" \ "Location of \`/etc/defaults/rc.conf' file." - f_err "$envfmt" "SYSRC_VERBOSE" \ - "Default verbosity. Set to non-NULL to enable." die } @@ -527,7 +525,7 @@ fi # # Process command-line arguments # -costatus=$SUCCESS +status=$SUCCESS while [ $# -gt 0 ]; do NAME="${1%%=*}" @@ -558,7 +556,7 @@ while [ $# -gt 0 ]; do # desire to set some value # if [ "$DELETE" ]; then - f_sysrc_delete "$NAME" + f_sysrc_delete "$NAME" || status=$FAILURE shift 1 continue fi @@ -568,10 +566,23 @@ while [ $# -gt 0 ]; do # if [ "$CHECK_ONLY" ]; then if ! IGNORED=$( f_sysrc_get "$NAME?" ); then - costatus=$FAILURE - else - value=$( f_sysrc_get "$NAME" ) - [ "$value" = "${1#*=}" ] || costatus=$FAILURE + status=$FAILURE + [ "$SYSRC_VERBOSE" ] && + echo "$NAME: not currently set" + shift 1 + continue + fi + value=$( f_sysrc_get "$NAME" ) + if [ "$value" != "${1#*=}" ]; then + status=$FAILURE + if [ "$SYSRC_VERBOSE" ]; then + echo -n "$( f_sysrc_find "$NAME" ): " + echo -n "$NAME: would change from " + echo "\`$value' to \`${1#*=}'" + fi + elif [ "$SYSRC_VERBOSE" ]; then + echo -n "$( f_sysrc_find "$NAME" ): " + echo "$NAME: already set to \`$value'" fi
svn commit: r268861 - head/usr.bin/timeout
Author: bapt Date: Fri Jul 18 22:56:59 2014 New Revision: 268861 URL: http://svnweb.freebsd.org/changeset/base/268861 Log: Improve timeout(1) man page Document the exit values and the duration format Improve wording Pet mandoc -Tlint Sort SEE ALSO Phabric: https://phabric.freebsd.org/D432 Reviewed by: wblock Modified: head/usr.bin/timeout/timeout.1 Modified: head/usr.bin/timeout/timeout.1 == --- head/usr.bin/timeout/timeout.1 Fri Jul 18 22:44:15 2014 (r268860) +++ head/usr.bin/timeout/timeout.1 Fri Jul 18 22:56:59 2014 (r268861) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2014 +.Dd July 19, 2014 .Dt TIMEOUT 1 .Os .Sh NAME @@ -44,9 +44,15 @@ starts the .Ar command with its -.Ar args -and kills if it is still runs after -.Ar duration . +.Ar args. +If +.Ar command +is still running after +.Ar duration , +it is killed. +By default, +.Ar SIGTERM. +is sent. .Bl -tag -width "-k time, --kill-after time" .It Fl -preserve-status Always exits with the same status as @@ -57,14 +63,52 @@ Do not propagate timeout to the .Ar command children. .It Fl s Ar sig , Fl -signal Ar sig -Speficy the signal to send on timeout by default +Specify the signal to send on timeout. +By default, .Ar SIGTERM . +is sent. .It Fl k Ar time , Fl -kill-after Ar time -Send a second kill if the +Send a second kill signal if .Ar command is still running after .Ar time -seconds after the first signal was sent +after the first signal was sent. +.El +.Sh DURATION FORMAT +.Ar duration +and +.Ar time +can be integer or decimal numbers. +Values without unit symbols are interpreted as seconds. +.Pp +Supported unit symbols are: +.Bl -tag -width indent -compact +.It s +seconds +.It m +minutes +.It h +hours +.It d +days +.El +.Sh EXIT STATUS +If the timeout was not reached, the exit status of +.Ar command +is returned. +.Pp +If the timeout was reached and +.Fl -preserve-status +is set, the exit status of +.Ar command +is returned. +If +.Fl -preserve-status +is not set, an exit status of 124 is returned. +.Pp +If +.Ar command +exits after receiving a signal, the exit status returned is the signal number plus 128. .Sh SEE ALSO -.Xr signal 3 , -.Xr kill 1 +.Xr kill 1 , +.Xr signal 3 ___ 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: r268862 - head
Author: bapt Date: Fri Jul 18 23:04:27 2014 New Revision: 268862 URL: http://svnweb.freebsd.org/changeset/base/268862 Log: Add libsbuf.so.6 to obsolete libraries since it has been bumped to .so.7 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Fri Jul 18 22:56:59 2014(r268861) +++ head/ObsoleteFiles.inc Fri Jul 18 23:04:27 2014(r268862) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20140719: libsbuf version bump +OLD_LIBS+=lib/libsbuf.so.6 # 20140718: Remove obsolete man pages OLD_FILES+=usr/share/man/man9/zero_copy.9.gz OLD_FILES+=usr/share/man/man9/zero_copy_sockets.9.gz ___ 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: r268863 - head/usr.sbin/sysrc
Author: dteske Date: Fri Jul 18 23:23:52 2014 New Revision: 268863 URL: http://svnweb.freebsd.org/changeset/base/268863 Log: Oops, forgot to bump manual date/copyright in r268860. MFC after:3 days X-MFC-to: stable/10, stable/9, ports X-MFC-with: r268860 Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 == --- head/usr.sbin/sysrc/sysrc.8 Fri Jul 18 23:04:27 2014(r268862) +++ head/usr.sbin/sysrc/sysrc.8 Fri Jul 18 23:23:52 2014(r268863) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2013 Devin Teske +.\" Copyright (c) 2011-2014 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Nov 20, 2013 +.Dd Jul 18, 2014 .Dt SYSRC 8 .Os .Sh NAME ___ 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: r268494 - in head: lib/libsbuf sys/kern sys/sys
On 2014-07-10 08:08, Pietro Cerutti wrote: Author: gahr (ports committer) Date: Thu Jul 10 13:08:51 2014 New Revision: 268494 URL: http://svnweb.freebsd.org/changeset/base/268494 Log: Implement Short/Small String Optimization in SBUF(9) and change lengths and positions in the API from ssize_t and int to size_t. CR: D388 Approved by: des, bapt Modified: head/lib/libsbuf/Makefile head/sys/kern/subr_sbuf.c head/sys/sys/sbuf.h Modified: head/lib/libsbuf/Makefile == --- head/lib/libsbuf/Makefile Thu Jul 10 13:04:52 2014(r268493) +++ head/lib/libsbuf/Makefile Thu Jul 10 13:08:51 2014(r268494) @@ -4,7 +4,7 @@ LIB=sbuf SHLIBDIR?= /lib SRCS= subr_sbuf.c -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 7 SYMBOL_MAPS=${.CURDIR}/Symbol.map VERSION_DEF= ${.CURDIR}/Version.def We have symbol versioning in libsbuf. Shouldn't need to bump the version. Just need to add a compat function for everything. It would be a lot of work, but bumping for ssize_t->size_t seems gratuitous to me. -- Regards, Bryan Drewery ___ 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: r268840 - head/usr.sbin/unbound/local-setup
Larry Rosenman writes: > should this be noted in UPDATING to re-gen the files locally or > something? Good point, thank you. DES -- Dag-Erling Smørgrav - d...@des.no ___ 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: r268864 - head
Author: des Date: Sat Jul 19 00:11:51 2014 New Revision: 268864 URL: http://svnweb.freebsd.org/changeset/base/268864 Log: Document the need to regenerate the local_unbound configuration. Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Fri Jul 18 23:23:52 2014(r268863) +++ head/UPDATING Sat Jul 19 00:11:51 2014(r268864) @@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20140719: + The default unbound configuration has been modified to address + issues with reverse lookups on networks that use private + address ranges. If you use the local_unbound service, run + "service local_unbound setup" as root to regenerate your + configuration, then "service local_unbound reload" to load the + new configuration. + 20140709: The GNU texinfo and GNU info pages are not built and installed anymore, WITH_INFO knob has been added to allow to built and install ___ 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: r268865 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: delphij Date: Sat Jul 19 00:26:03 2014 New Revision: 268865 URL: http://svnweb.freebsd.org/changeset/base/268865 Log: Reduce lock contention on the z_teardown_lock under heavily cached read workload by splitting the single teardown rrw lock into RRM_NUM_LOCKS (17) of them. Read acquisitions are randomly distributed among these locks based on curthread pointer. Write acquisitions are going to all the locks, which for the usage of this type of lock should be rare. Illumos issue: 5008 lock contention (rrw_exit) while running a read only load MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c Sat Jul 19 00:11:51 2014(r268864) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c Sat Jul 19 00:26:03 2014(r268865) @@ -286,3 +286,91 @@ rrw_tsd_destroy(void *arg) (void *)curthread, (void *)rn->rn_rrl); } } + +/* + * A reader-mostly lock implementation, tuning above reader-writer locks + * for hightly parallel read acquisitions, while pessimizing writes. + * + * The idea is to split single busy lock into array of locks, so that + * each reader can lock only one of them for read, depending on result + * of simple hash function. That proportionally reduces lock congestion. + * Writer same time has to sequentially aquire write on all the locks. + * That makes write aquisition proportionally slower, but in places where + * it is used (filesystem unmount) performance is not critical. + * + * All the functions below are direct wrappers around functions above. + */ +void +rrm_init(rrmlock_t *rrl, boolean_t track_all) +{ + int i; + + for (i = 0; i < RRM_NUM_LOCKS; i++) + rrw_init(&rrl->locks[i], track_all); +} + +void +rrm_destroy(rrmlock_t *rrl) +{ + int i; + + for (i = 0; i < RRM_NUM_LOCKS; i++) + rrw_destroy(&rrl->locks[i]); +} + +void +rrm_enter(rrmlock_t *rrl, krw_t rw, void *tag) +{ + if (rw == RW_READER) + rrm_enter_read(rrl, tag); + else + rrm_enter_write(rrl); +} + +/* + * This maps the current thread to a specific lock. Note that the lock + * must be released by the same thread that acquired it. We do this + * mapping by taking the thread pointer mod a prime number. We examine + * only the low 32 bits of the thread pointer, because 32-bit division + * is faster than 64-bit division, and the high 32 bits have little + * entropy anyway. + */ +#defineRRM_TD_LOCK() (((uint32_t)(uintptr_t)(curthread)) % RRM_NUM_LOCKS) + +void +rrm_enter_read(rrmlock_t *rrl, void *tag) +{ + rrw_enter_read(&rrl->locks[RRM_TD_LOCK()], tag); +} + +void +rrm_enter_write(rrmlock_t *rrl) +{ + int i; + + for (i = 0; i < RRM_NUM_LOCKS; i++) + rrw_enter_write(&rrl->locks[i]); +} + +void +rrm_exit(rrmlock_t *rrl, void *tag) +{ + int i; + + if (rrl->locks[0].rr_writer == curthread) { + for (i = 0; i < RRM_NUM_LOCKS; i++) + rrw_exit(&rrl->locks[i], tag); + } else { + rrw_exit(&rrl->locks[RRM_TD_LOCK()], tag); + } +} + +boolean_t +rrm_held(rrmlock_t *rrl, krw_t rw) +{ + if (rw == RW_WRITER) { + return (rrw_held(&rrl->locks[0], rw)); + } else { + return (rrw_held(&rrl->locks[RRM_TD_LOCK()], rw)); + } +} Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h Sat Jul 19 00:11:51 2014(r268864) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h Sat Jul 19 00:26:03 2014(r268865) @@ -79,6 +79,31 @@ void rrw_tsd_destroy(void *arg); #defineRRW_LOCK_HELD(x) \ (rrw_held(x, RW_WRITER) || rrw_held(x, RW_READER)) +/* + * A reader-mostly lock implementation, tuning above reader-writer locks + * for hightly parallel read acquisitions, pessimizing write acquisitions. + * + * This should be a prime number. See comment in rrwlock.c near + * RRM_TD_LOCK() for details. + */ +#defineRRM_NUM_LOCKS 17 +typedef struct rrmlock { +
svn commit: r268866 - head/usr.sbin/nfsd
Author: rmacklem Date: Sat Jul 19 01:15:01 2014 New Revision: 268866 URL: http://svnweb.freebsd.org/changeset/base/268866 Log: r243637 changed the default number of nfsd threads created, but the man page did not reflect this. This is a content change. Reported by: bde MFC after:2 weeks Modified: head/usr.sbin/nfsd/nfsd.8 Modified: head/usr.sbin/nfsd/nfsd.8 == --- head/usr.sbin/nfsd/nfsd.8 Sat Jul 19 00:26:03 2014(r268865) +++ head/usr.sbin/nfsd/nfsd.8 Sat Jul 19 01:15:01 2014(r268866) @@ -28,7 +28,7 @@ .\"@(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd April 23, 2011 +.Dd July 18, 2014 .Dt NFSD 8 .Os .Sh NAME @@ -53,7 +53,7 @@ At least one .Nm must be running for a machine to operate as a server. .Pp -Unless otherwise specified, four servers for +Unless otherwise specified, eight servers per CPU for .Tn UDP transport are started. .Pp ___ 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: r268867 - head/lib/libc/net
Author: pfg Date: Sat Jul 19 01:53:52 2014 New Revision: 268867 URL: http://svnweb.freebsd.org/changeset/base/268867 Log: Use unsigned optlen in getsourcefilter() Sizes can not be negative and the functions that use it expect an unsigned value anyways. Obtained from:Apple (Libc-997.90.3) MFC after:1 week Modified: head/lib/libc/net/sourcefilter.c Modified: head/lib/libc/net/sourcefilter.c == --- head/lib/libc/net/sourcefilter.cSat Jul 19 01:15:01 2014 (r268866) +++ head/lib/libc/net/sourcefilter.cSat Jul 19 01:53:52 2014 (r268867) @@ -337,7 +337,8 @@ getsourcefilter(int s, uint32_t interfac { struct __msfilterreq msfr; sockunion_t *psu; - int err, level, nsrcs, optlen, optname; + int err, level, nsrcs, optname; + unsigned int optlen; if (interface == 0 || group == NULL || numsrc == NULL || fmode == NULL) { ___ 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: r268869 - in head/sys: amd64/amd64 cddl/dev/dtrace/amd64 cddl/dev/fbt
Author: markj Date: Sat Jul 19 02:27:31 2014 New Revision: 268869 URL: http://svnweb.freebsd.org/changeset/base/268869 Log: Use a C wrapper for trap() instead of checking and calling the DTrace trap hook in assembly. Suggested by: kib Reviewed by: kib (original version) X-MFC-With: r268600 Modified: head/sys/amd64/amd64/exception.S head/sys/amd64/amd64/trap.c head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c head/sys/cddl/dev/fbt/fbt.c Modified: head/sys/amd64/amd64/exception.S == --- head/sys/amd64/amd64/exception.SSat Jul 19 02:15:28 2014 (r268868) +++ head/sys/amd64/amd64/exception.SSat Jul 19 02:27:31 2014 (r268869) @@ -228,24 +228,7 @@ alltraps_pushregs_no_rdi: .type calltrap,@function calltrap: movq%rsp,%rdi -#ifdef KDTRACE_HOOKS - /* -* Give DTrace a chance to vet this trap and skip the call to trap() if -* it turns out that it was caused by a DTrace probe. -*/ - movqdtrace_trap_func,%rax - testq %rax,%rax - je skiphook - call*%rax - testq %rax,%rax - jne skiptrap - movq%rsp,%rdi -skiphook: -#endif - calltrap -#ifdef KDTRACE_HOOKS -skiptrap: -#endif + calltrap_check MEXITCOUNT jmp doreti /* Handle any pending ASTs */ Modified: head/sys/amd64/amd64/trap.c == --- head/sys/amd64/amd64/trap.c Sat Jul 19 02:15:28 2014(r268868) +++ head/sys/amd64/amd64/trap.c Sat Jul 19 02:27:31 2014(r268869) @@ -97,7 +97,8 @@ PMC_SOFT_DEFINE( , , page_fault, write); #include #endif -extern void trap(struct trapframe *frame); +extern void __noinline trap(struct trapframe *frame); +extern void trap_check(struct trapframe *frame); extern void syscall(struct trapframe *frame); void dblfault_handler(struct trapframe *frame); @@ -604,6 +605,19 @@ out: return; } +/* + * Ensure that we ignore any DTrace-induced faults. This function cannot + * be instrumented, so it cannot generate such faults itself. + */ +void +trap_check(struct trapframe *frame) +{ + + if (dtrace_trap_func != NULL && (*dtrace_trap_func)(frame)) + return; + trap(frame); +} + static int trap_pfault(frame, usermode) struct trapframe *frame; Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c == --- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cSat Jul 19 02:15:28 2014(r268868) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cSat Jul 19 02:27:31 2014(r268869) @@ -462,9 +462,7 @@ dtrace_gethrestime(void) return (current_time.tv_sec * 10ULL + current_time.tv_nsec); } -/* - * Function to handle DTrace traps during probes. See amd64/amd64/exception.S. - */ +/* Function to handle DTrace traps during probes. See amd64/amd64/trap.c. */ int dtrace_trap(struct trapframe *frame) { Modified: head/sys/cddl/dev/fbt/fbt.c == --- head/sys/cddl/dev/fbt/fbt.c Sat Jul 19 02:15:28 2014(r268868) +++ head/sys/cddl/dev/fbt/fbt.c Sat Jul 19 02:27:31 2014(r268869) @@ -232,13 +232,18 @@ fbt_provide_module_function(linker_file_ int size; u_int8_t *instr, *limit; - if (strncmp(name, "dtrace_", 7) == 0 && - strncmp(name, "dtrace_safe_", 12) != 0) { + if ((strncmp(name, "dtrace_", 7) == 0 && + strncmp(name, "dtrace_safe_", 12) != 0) || + strcmp(name, "trap_check") == 0) { /* * Anything beginning with "dtrace_" may be called * from probe context unless it explicitly indicates * that it won't be called from probe context by * using the prefix "dtrace_safe_". +* +* Additionally, we avoid instrumenting trap_check() to avoid +* the possibility of generating a fault in probe context before +* DTrace's fault handler is called. */ return (0); } ___ 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"