svn commit: r318701 - head/lib/libc/gen
Author: ngie Date: Tue May 23 06:58:08 2017 New Revision: 318701 URL: https://svnweb.freebsd.org/changeset/base/318701 Log: tcsendbreak(3): delete spurious blank line at the end of the man page MFC after:2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/tcsendbreak.3 Modified: head/lib/libc/gen/tcsendbreak.3 == --- head/lib/libc/gen/tcsendbreak.3 Tue May 23 06:56:57 2017 (r318700) +++ head/lib/libc/gen/tcsendbreak.3 Tue May 23 06:58:08 2017 (r318701) @@ -177,4 +177,3 @@ without writing all output. The default value for .Va kern.tty_drainwait is 300 seconds. - ___ 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: r318700 - head/lib/libc/gen
Author: ngie Date: Tue May 23 06:56:57 2017 New Revision: 318700 URL: https://svnweb.freebsd.org/changeset/base/318700 Log: dirname(3): fix section ordering IMPLEMENTATION NOTES come before RETURN VALUES MFC after:2 weeks Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/dirname.3 Modified: head/lib/libc/gen/dirname.3 == --- head/lib/libc/gen/dirname.3 Tue May 23 06:55:51 2017(r318699) +++ head/lib/libc/gen/dirname.3 Tue May 23 06:56:57 2017(r318700) @@ -37,6 +37,16 @@ Any trailing .Sq \&/ characters are not counted as part of the directory name. +.Sh IMPLEMENTATION NOTES +This implementation of +.Fn dirname +uses the buffer provided by the caller to store the resulting parent +directory. +Other vendor implementations may return a pointer to internal storage +space instead. +The advantage of the former approach is that it ensures thread-safety, +while also placing no upper limit on the supported length of the +pathname. .Sh RETURN VALUES If .Fa path @@ -50,16 +60,6 @@ signifying the current directory. Otherwise, it returns a pointer to the parent directory of .Fa path . -.Sh IMPLEMENTATION NOTES -This implementation of -.Fn dirname -uses the buffer provided by the caller to store the resulting parent -directory. -Other vendor implementations may return a pointer to internal storage -space instead. -The advantage of the former approach is that it ensures thread-safety, -while also placing no upper limit on the supported length of the -pathname. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , ___ 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: r318699 - head/lib/libc/gen
Author: ngie Date: Tue May 23 06:55:51 2017 New Revision: 318699 URL: https://svnweb.freebsd.org/changeset/base/318699 Log: directory(3): delete trailing whitespace and rewrite `E.g.` as `e.g.` Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/directory.3 Modified: head/lib/libc/gen/directory.3 == --- head/lib/libc/gen/directory.3 Tue May 23 06:53:31 2017 (r318698) +++ head/lib/libc/gen/directory.3 Tue May 23 06:55:51 2017 (r318699) @@ -28,7 +28,7 @@ .\" @(#)directory.38.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 31, 2016 +.Dd May 22, 2017 .Dt DIRECTORY 3 .Os .Sh NAME @@ -292,14 +292,15 @@ is likely to be wrong if there are paral and the directory is larger than one page. There is code to ensure that a .Fn seekdir -to the location given by a +to the location given by a .Fn telldir -immediately before the last +immediately before the last .Fn readdir will always set the correct location to return the same value as that last .Fn readdir performed. -This is enough for some applications which want to "push back the last entry read" E.g. Samba. +This is enough for some applications which want to +"push back the last entry read", e.g. Samba. Seeks back to any other location, other than the beginning of the directory, may result in unexpected behaviour if deletes are present. ___ 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: r318698 - head/lib/libc/gen
Author: ngie Date: Tue May 23 06:53:31 2017 New Revision: 318698 URL: https://svnweb.freebsd.org/changeset/base/318698 Log: basename(3): fix section ordering IMPLEMENTATION NOTES come before RETURN VALUES MFC after:2 weeks Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/basename.3 Modified: head/lib/libc/gen/basename.3 == --- head/lib/libc/gen/basename.3Tue May 23 06:20:24 2017 (r318697) +++ head/lib/libc/gen/basename.3Tue May 23 06:53:31 2017 (r318698) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2016 +.Dd May 22, 2017 .Dt BASENAME 3 .Os .Sh NAME @@ -34,6 +34,16 @@ function returns the last component from deleting any trailing .Sq \&/ characters. +.Sh IMPLEMENTATION NOTES +This implementation of +.Fn basename +uses the buffer provided by the caller to store the resulting pathname +component. +Other vendor implementations may return a pointer to internal storage +space instead. +The advantage of the former approach is that it ensures thread-safety, +while also placing no upper limit on the supported length of the +pathname. .Sh RETURN VALUES If .Fa path @@ -50,16 +60,6 @@ is returned. Otherwise, it returns a pointer to the last component of .Fa path . -.Sh IMPLEMENTATION NOTES -This implementation of -.Fn basename -uses the buffer provided by the caller to store the resulting pathname -component. -Other vendor implementations may return a pointer to internal storage -space instead. -The advantage of the former approach is that it ensures thread-safety, -while also placing no upper limit on the supported length of the -pathname. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , ___ 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: r318697 - head/sys/mips/atheros
Author: adrian Date: Tue May 23 06:20:24 2017 New Revision: 318697 URL: https://svnweb.freebsd.org/changeset/base/318697 Log: [ar71xx] remove dead code! Modified: head/sys/mips/atheros/ar71xx_fixup.c Modified: head/sys/mips/atheros/ar71xx_fixup.c == --- head/sys/mips/atheros/ar71xx_fixup.cTue May 23 06:20:06 2017 (r318696) +++ head/sys/mips/atheros/ar71xx_fixup.cTue May 23 06:20:24 2017 (r318697) @@ -110,43 +110,3 @@ ar71xx_pci_slot_create_eeprom_firmware(d } device_printf(dev, "device EEPROM '%s' registered\n", buf); } - -#if 0 -static void -ar71xx_pci_slot_fixup(device_t dev, u_int bus, u_int slot, u_int func) -{ - long int flash_addr; - char buf[64]; - int size; - - /* -* Check whether the given slot has a hint to poke. -*/ - if (bootverbose) - device_printf(dev, "%s: checking dev %s, %d/%d/%d\n", - __func__, device_get_nameunit(dev), bus, slot, func); - - snprintf(buf, sizeof(buf), "bus.%d.%d.%d.ath_fixup_addr", - bus, slot, func); - - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - buf, &flash_addr) == 0) { - snprintf(buf, sizeof(buf), "bus.%d.%d.%d.ath_fixup_size", - bus, slot, func); - if (resource_int_value(device_get_name(dev), - device_get_unit(dev), buf, &size) != 0) { - device_printf(dev, - "%s: missing hint '%s', aborting EEPROM\n", - __func__, buf); - return; - } - - - device_printf(dev, "found EEPROM at 0x%lx on %d.%d.%d\n", - flash_addr, bus, slot, func); - ar71xx_pci_fixup(dev, bus, slot, func, flash_addr, size); - ar71xx_pci_slot_create_eeprom_firmware(dev, bus, slot, func, - flash_addr, size); - } -} -#endif /* 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: r318696 - head/sys/mips/atheros
Author: adrian Date: Tue May 23 06:20:06 2017 New Revision: 318696 URL: https://svnweb.freebsd.org/changeset/base/318696 Log: [ar71xx] add a very simple early boot driver called "caldata" to commit cross-layer atrocities. The (eventually) upcoming ath(4) changes will include being able to load ath(4) devices on the AHB bus (ie the on-die wifi part of the SoC) as modules. In order for this to happen, a copy of the calibration data needs to be copied away before the SPI driver runs or the memory map access hack won't work. Now, ideally (!) there'd be some driver that can come up after the MTD pieces (eg, SPI, NAND, etc) and load into a firmware chunk the calibration data. (Or, really really nicely, would be an actual async firmware API that would lead itself to having a driver schedule a file read - or a raw device read - to get to the calibration data.) Now, until all of the above is done - I'm going to perpetuate the layer breaking atrocity here by simply doing the PCI bus fixup EEPROM/calibration data hack here. This will work for any AR71xx (and later on, AR231x/AR531x) device, as well as the handful of QCA MIPS + QCA9880v2 802.11ac boards with NOR flash. To use, this goes into the kernel config: # Enable EEPROM hacks options AR71XX_ATH_EEPROM device ar71xx_caldata device firmware # This enables the ath_ahb driver (when I commit the change!) to # pull data out of the firmware hack. options ATH_EEPROM_FIRMWARE In the hints file: # ART calibration data mapping device hint.ar71xx_caldata.0.at="nexus0" hint.ar71xx_caldata.0.order=0 # Where the ART is - last 64k in the first 8MB of flash hint.ar71xx_caldata.0.map.0.ath_fixup_addr=0x1fff hint.ar71xx_caldata.0.map.0.ath_fixup_size=16384 # And now tell the ath(4) driver where to look! hint.ath.0.eeprom_firmware="ar71xx_caldata.0.map.0.eeprom_firmware" Tested: * carambola2, AR933x SoC, using a set of ath and ath_hal modules to load TODO: * unify this bit of firmware loading code, as I will definitely need to include both the PCI bus firmware version (for PCI ID fixups too!) as well as AHB/on-chip calibration data. * Commit the ath_ahb bus code * Convert .. everything over. That'll take the majority of the time. Added: head/sys/mips/atheros/ar71xx_caldata.c (contents, props changed) Modified: head/sys/mips/atheros/files.ar71xx Added: head/sys/mips/atheros/ar71xx_caldata.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/ar71xx_caldata.c Tue May 23 06:20:06 2017 (r318696) @@ -0,0 +1,176 @@ +/*- + * Copyright (c) 2017, Adrian Chadd . + * 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 unmodified, 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_ar71xx.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +struct ar71xx_caldata_softc { + device_tsc_dev; +}; + +static int +ar71xx_caldata_probe(device_t dev) +{ + + return (BUS_PROBE_NOWILDCARD); +} + +/* XXX TODO: unify with what's in ar71xx_fixup.c */ + +/* + * Create a calibration block from memory mapped SPI data for use by + * various drivers. Right now it's just ath(4) but later board support + * will include 802.11ac NICs with calibration data in NOR flash. + * + * (Yes, there are a handful of QCA MIPS boards with QCA9880v2 802.11ac chips + * with calibration data in flash..
svn commit: r318695 - head/lib/libc/gen
Author: ngie Date: Tue May 23 06:14:02 2017 New Revision: 318695 URL: https://svnweb.freebsd.org/changeset/base/318695 Log: err(3): use `NULL`, aka `(void*)0` per POSIX instead of `(FILE *)0` This is being done to aid humans and static analysis checkers. MFC after:2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/err.c Modified: head/lib/libc/gen/err.c == --- head/lib/libc/gen/err.c Tue May 23 06:05:54 2017(r318694) +++ head/lib/libc/gen/err.c Tue May 23 06:14:02 2017(r318695) @@ -97,7 +97,7 @@ void verrc(int eval, int code, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { vfprintf(err_file, fmt, ap); @@ -122,7 +122,7 @@ void verrx(int eval, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) vfprintf(err_file, fmt, ap); @@ -162,7 +162,7 @@ void vwarnc(int code, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { vfprintf(err_file, fmt, ap); @@ -184,7 +184,7 @@ void vwarnx(const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) vfprintf(err_file, fmt, ap); ___ 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: r318694 - head/usr.sbin/bsdinstall/partedit
Author: ngie Date: Tue May 23 06:05:54 2017 New Revision: 318694 URL: https://svnweb.freebsd.org/changeset/base/318694 Log: style(9): sort headers MFC after:2 weeks MFC with: r318693 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c == --- head/usr.sbin/bsdinstall/partedit/part_wizard.c Tue May 23 06:04:38 2017(r318693) +++ head/usr.sbin/bsdinstall/partedit/part_wizard.c Tue May 23 06:05:54 2017(r318694) @@ -27,11 +27,10 @@ */ #include +#include #include -#include #include - -#include +#include #include #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"
svn commit: r318693 - head/usr.sbin/bsdinstall/partedit
Author: ngie Date: Tue May 23 06:04:38 2017 New Revision: 318693 URL: https://svnweb.freebsd.org/changeset/base/318693 Log: Some minor style(9) fixes - Wrap at <80 columns. - Sort by type MFC after:2 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c == --- head/usr.sbin/bsdinstall/partedit/part_wizard.c Tue May 23 04:14:34 2017(r318692) +++ head/usr.sbin/bsdinstall/partedit/part_wizard.c Tue May 23 06:04:38 2017(r318693) @@ -47,11 +47,12 @@ static char *boot_disk(struct gmesh *mes static char *wizard_partition(struct gmesh *mesh, const char *disk); int -part_wizard(const char *fsreq) { - int error; - struct gmesh mesh; +part_wizard(const char *fsreq) +{ char *disk, *schemeroot; const char *fstype; + struct gmesh mesh; + int error; if (fsreq != NULL) fstype = fsreq; @@ -199,9 +200,9 @@ wizard_partition(struct gmesh *mesh, con struct gclass *classp; struct ggeom *gpart = NULL; struct gconfig *gc; - char message[512]; - const char *scheme = NULL; char *retval = NULL; + const char *scheme = NULL; + char message[512]; int choice; LIST_FOREACH(classp, &mesh->lg_class, lg_class) @@ -295,15 +296,17 @@ query: } int -wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, int interactive) +wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, +int interactive) { - struct gmesh submesh; struct gclass *classp; struct ggeom *gp; struct gprovider *pp; - intmax_t swapsize, available; - char swapsizestr[10], rootsizestr[10], *fsname; char *fsnames[] = {"freebsd-ufs", "freebsd-zfs"}; + char *fsname; + struct gmesh submesh; + char swapsizestr[10], rootsizestr[10]; + intmax_t swapsize, available; int retval; if (strcmp(fstype, "zfs") == 0) { @@ -362,4 +365,3 @@ wizard_makeparts(struct gmesh *mesh, con return (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: r318690 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Tue May 23 03:48:42 2017 New Revision: 318690 URL: https://svnweb.freebsd.org/changeset/base/318690 Log: [arswitch] add phy debugging to the internal PHY read/write functions. Modified: head/sys/dev/etherswitch/arswitch/arswitch_phy.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_phy.c == --- head/sys/dev/etherswitch/arswitch/arswitch_phy.cTue May 23 00:13:27 2017(r318689) +++ head/sys/dev/etherswitch/arswitch/arswitch_phy.cTue May 23 03:48:42 2017(r318690) @@ -151,10 +151,20 @@ arswitch_readphy_internal(device_t dev, data = arswitch_readreg_lsb(dev, a) & AR8X16_MDIO_CTRL_DATA_MASK; ARSWITCH_UNLOCK(sc); + + DPRINTF(sc, ARSWITCH_DBG_PHYIO, + "%s: phy=0x%08x, reg=0x%08x, ret=0x%08x\n", + __func__, phy, reg, data); + return (data); fail: ARSWITCH_UNLOCK(sc); + + DPRINTF(sc, ARSWITCH_DBG_PHYIO, + "%s: phy=0x%08x, reg=0x%08x, fail; err=%d\n", + __func__, phy, reg, err); + return (-1); } @@ -194,6 +204,11 @@ arswitch_writephy_internal(device_t dev, } if (timeout < 0) err = EIO; + + DPRINTF(sc, ARSWITCH_DBG_PHYIO, + "%s: phy=0x%08x, reg=0x%08x, data=0x%08x, err=%d\n", + __func__, phy, reg, data, err); + out: DEVERR(dev, err, "arswitch_writephy()=%d: phy=%d.%02x\n", phy, reg); ARSWITCH_UNLOCK(sc); ___ 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: r318689 - head/sys/net
Author: mav Date: Tue May 23 00:13:27 2017 New Revision: 318689 URL: https://svnweb.freebsd.org/changeset/base/318689 Log: Add parent interface reference counting to if_vlan. Using plain ifunit() looks like a request for troubles. MFC after:1 week Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c == --- head/sys/net/if_vlan.c Mon May 22 23:31:28 2017(r318688) +++ head/sys/net/if_vlan.c Tue May 23 00:13:27 2017(r318689) @@ -474,6 +474,7 @@ trunk_destroy(struct ifvlantrunk *trunk) trunk->parent->if_vlantrunk = NULL; TRUNK_UNLOCK(trunk); TRUNK_LOCK_DESTROY(trunk); + if_rele(trunk->parent); free(trunk, M_VLAN); } @@ -848,16 +849,20 @@ vlan_clone_match_ethervid(const char *na if ((cp = strchr(ifname, '.')) == NULL) return (NULL); *cp = '\0'; - if ((ifp = ifunit(ifname)) == NULL) + if ((ifp = ifunit_ref(ifname)) == NULL) return (NULL); /* Parse VID. */ - if (*++cp == '\0') + if (*++cp == '\0') { + if_rele(ifp); return (NULL); + } vid = 0; for(; *cp >= '0' && *cp <= '9'; cp++) vid = (vid * 10) + (*cp - '0'); - if (*cp != '\0') + if (*cp != '\0') { + if_rele(ifp); return (NULL); + } if (vidp != NULL) *vidp = vid; @@ -890,7 +895,6 @@ vlan_clone_create(struct if_clone *ifc, int unit; int error; int vid; - int ethertag; struct ifvlan *ifv; struct ifnet *ifp; struct ifnet *p; @@ -915,23 +919,21 @@ vlan_clone_create(struct if_clone *ifc, error = copyin(params, &vlr, sizeof(vlr)); if (error) return error; - p = ifunit(vlr.vlr_parent); + p = ifunit_ref(vlr.vlr_parent); if (p == NULL) return (ENXIO); error = ifc_name2unit(name, &unit); - if (error != 0) + if (error != 0) { + if_rele(p); return (error); - - ethertag = 1; + } vid = vlr.vlr_tag; wildcard = (unit < 0); } else if ((p = vlan_clone_match_ethervid(name, &vid)) != NULL) { - ethertag = 1; unit = -1; wildcard = 0; } else { - ethertag = 0; - + p = NULL; error = ifc_name2unit(name, &unit); if (error != 0) return (error); @@ -940,8 +942,11 @@ vlan_clone_create(struct if_clone *ifc, } error = ifc_alloc_unit(ifc, &unit); - if (error != 0) + if (error != 0) { + if (p != NULL) + if_rele(p); return (error); + } /* In the wildcard case, we need to update the name. */ if (wildcard) { @@ -957,6 +962,8 @@ vlan_clone_create(struct if_clone *ifc, if (ifp == NULL) { ifc_free_unit(ifc, unit); free(ifv, M_VLAN); + if (p != NULL) + if_rele(p); return (ENOSPC); } SLIST_INIT(&ifv->vlan_mc_listhead); @@ -990,8 +997,9 @@ vlan_clone_create(struct if_clone *ifc, sdl = (struct sockaddr_dl *)ifa->ifa_addr; sdl->sdl_type = IFT_L2VLAN; - if (ethertag) { + if (p != NULL) { error = vlan_config(ifv, p, vid); + if_rele(p); if (error != 0) { /* * Since we've partially failed, we need to back @@ -1278,6 +1286,7 @@ vlan_config(struct ifvlan *ifv, struct i TRUNK_LOCK(trunk); p->if_vlantrunk = trunk; trunk->parent = p; + if_ref(trunk->parent); } else { VLAN_LOCK(); exists: @@ -1693,8 +1702,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd VLAN_LOCK(); if (TRUNK(ifv) != NULL) { p = PARENT(ifv); + if_ref(p); VLAN_UNLOCK(); error = (*p->if_ioctl)(p, SIOCGIFMEDIA, data); + if_rele(p); /* Limit the result to the parent's current config. */ if (error == 0) { struct ifmediareq *ifmr; @@ -1756,12 +1767,13 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd vlan_unconfig(ifp); break; } - p = ifunit(vlr.vlr_parent); + p = ifunit_ref(vlr.vlr_parent); if (p == NULL) { error = ENOENT;
svn commit: r318688 - head/sys/sys
Author: rpokala Date: Mon May 22 23:31:28 2017 New Revision: 318688 URL: https://svnweb.freebsd.org/changeset/base/318688 Log: "struct ata_params" field "reserved206[2]" actually starts at offset 20*7*. MFC after:1 week Sponsored by: Panasas Modified: head/sys/sys/ata.h Modified: head/sys/sys/ata.h == --- head/sys/sys/ata.h Mon May 22 23:21:24 2017(r318687) +++ head/sys/sys/ata.h Mon May 22 23:31:28 2017(r318688) @@ -263,7 +263,7 @@ struct ata_params { u_int16_t reserved170[6]; /*176*/ u_int8_tmedia_serial[60]; /*206*/ u_int16_t sct; - u_int16_t reserved206[2]; + u_int16_t reserved207[2]; /*209*/ u_int16_t lsalign; /*210*/ u_int16_t wrv_sectors_m3_1; u_int16_t wrv_sectors_m3_2; ___ 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: r318687 - head/lib/libproc
Author: markj Date: Mon May 22 23:21:24 2017 New Revision: 318687 URL: https://svnweb.freebsd.org/changeset/base/318687 Log: Ensure that the mappings table is populated in proc_objname(). MFC after:1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c == --- head/lib/libproc/proc_sym.c Mon May 22 23:17:55 2017(r318686) +++ head/lib/libproc/proc_sym.c Mon May 22 23:21:24 2017(r318687) @@ -339,6 +339,9 @@ proc_objname(struct proc_handle *p, uint prmap_t *map; size_t i; + if (p->nmappings == 0) + if (proc_rdagent(p) == NULL) + return (NULL); for (i = 0; i < p->nmappings; i++) { map = &p->mappings[i].map; if (addr >= map->pr_vaddr && ___ 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: r318686 - head/include
Author: pfg Date: Mon May 22 23:17:55 2017 New Revision: 318686 URL: https://svnweb.freebsd.org/changeset/base/318686 Log: ndbm.h: Add a comment pointing out our non-compliance with POSIX. Changing it to full conformance breaks the ABI. Reference: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/ndbm.h.html Discussion at:https://reviews.freebsd.org/D10544 Modified: head/include/ndbm.h Modified: head/include/ndbm.h == --- head/include/ndbm.h Mon May 22 22:10:02 2017(r318685) +++ head/include/ndbm.h Mon May 22 23:17:55 2017(r318686) @@ -53,7 +53,7 @@ typedef struct { void *dptr; - int dsize; + int dsize; /* XXX Should be size_t according to 1003.1-2008. */ } datum; typedef DB DBM; ___ 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: r318685 - stable/10/sys/fs/nfsclient
Author: rmacklem Date: Mon May 22 22:10:02 2017 New Revision: 318685 URL: https://svnweb.freebsd.org/changeset/base/318685 Log: MFC: r318287 Make nfscl_mtofh() return ENXIO when *nfhpp == NULL. r317272 introduced a case where nfscl_mtofh() could return 0 when *nfhpp is NULL. This patch makes it return ENXIO for this case. Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c == --- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 22:02:06 2017 (r318684) +++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 22:10:02 2017 (r318685) @@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, s if (*++tl != 0) { nd->nd_flag |= ND_NOMOREDATA; flag = 0; + error = ENXIO; /* Return ENXIO so *nfhpp isn't used. */ } } if (flag) { ___ 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: r318684 - stable/11/sys/fs/nfsclient
Author: rmacklem Date: Mon May 22 22:02:06 2017 New Revision: 318684 URL: https://svnweb.freebsd.org/changeset/base/318684 Log: MFC: r318287 Make nfscl_mtofh() return ENXIO when *nfhpp == NULL. r317272 introduced a case where nfscl_mtofh() could return 0 when *nfhpp is NULL. This patch makes it return ENXIO for this case. Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c == --- stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 21:52:06 2017 (r318683) +++ stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 22:02:06 2017 (r318684) @@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, s if (*++tl != 0) { nd->nd_flag |= ND_NOMOREDATA; flag = 0; + error = ENXIO; /* Return ENXIO so *nfhpp isn't used. */ } } if (flag) { ___ 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: r318683 - stable/10/sbin/mount_nfs
Author: rmacklem Date: Mon May 22 21:52:06 2017 New Revision: 318683 URL: https://svnweb.freebsd.org/changeset/base/318683 Log: MFC: r317931 Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts. The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871 modified umount so that it doesn't remove any entry created by mount_nfs. Modified: stable/10/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_nfs/mount_nfs.c == --- stable/10/sbin/mount_nfs/mount_nfs.cMon May 22 21:41:34 2017 (r318682) +++ stable/10/sbin/mount_nfs/mount_nfs.cMon May 22 21:52:06 2017 (r318683) @@ -650,7 +650,7 @@ getnfsargs(char *spec, struct iovec **io build_iovec(iov, iovlen, "hostname", nam, (size_t)-1); /* Add mounted file system to PATH_MOUNTTAB */ - if (!add_mtab(hostp, spec)) + if (mountmode != V4 && !add_mtab(hostp, spec)) warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec); return (1); } ___ 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: r318682 - stable/11/sbin/mount_nfs
Author: rmacklem Date: Mon May 22 21:41:34 2017 New Revision: 318682 URL: https://svnweb.freebsd.org/changeset/base/318682 Log: MFC: r317931 Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts. The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871 modified umount so that it doesn't remove any entry created by mount_nfs. Modified: stable/11/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mount_nfs/mount_nfs.c == --- stable/11/sbin/mount_nfs/mount_nfs.cMon May 22 21:17:44 2017 (r318681) +++ stable/11/sbin/mount_nfs/mount_nfs.cMon May 22 21:41:34 2017 (r318682) @@ -651,7 +651,7 @@ getnfsargs(char *spec, struct iovec **io build_iovec(iov, iovlen, "hostname", nam, (size_t)-1); /* Add mounted file system to PATH_MOUNTTAB */ - if (!add_mtab(hostp, spec)) + if (mountmode != V4 && !add_mtab(hostp, spec)) warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec); return (1); } ___ 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: r318680 - in head/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/proc usr.sbin/dtrace/tests/common/proc
Author: markj Date: Mon May 22 20:34:51 2017 New Revision: 318680 URL: https://svnweb.freebsd.org/changeset/base/318680 Log: Add a little helper program for tst.exitcore.ksh. sleep(1) is capsicumized, which means that we cannot rely on it to dump core as required by the test. MFC after:1 week Sponsored by: Dell EMC Isilon Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c (contents, props changed) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c Mon May 22 20:34:51 2017(r318680) @@ -0,0 +1,36 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2017 Mark Johnston + */ + +#include + +int +main(int argc, char **argv) +{ + + for (;;) + sleep(1); + + return (0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh == --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh Mon May 22 20:27:29 2017(r318679) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh Mon May 22 20:34:51 2017(r318680) @@ -52,7 +52,7 @@ script() /curpsinfo->pr_ppid == $child && execargs == "$longsleep" && args[0] != CLD_DUMPED/ { - printf("Child process could did dump core."); + printf("Child process could not dump core."); exit(1); } EOF @@ -62,10 +62,9 @@ sleeper() { while true; do $longsleep & - /bin/sleep 1 +/bin/sleep 1 kill -SEGV $! done - /bin/rm -f $corefile } if [ $# != 1 ]; then @@ -74,8 +73,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -longsleep="/bin/sleep 1" -corefile=/tmp/sleep.core +longsleep="./tst.exitcore.exe" sleeper & child=$! @@ -83,10 +81,6 @@ child=$! script status=$? -#pstop $child -#pkill -P $child kill $child -#prun $child -/bin/rm -f $corefile exit $status Modified: head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile == --- head/cddl/usr.sbin/dtrace/tests/common/proc/MakefileMon May 22 20:27:29 2017(r318679) +++ head/cddl/usr.sbin/dtrace/tests/common/proc/MakefileMon May 22 20:34:51 2017(r318680) @@ -23,6 +23,7 @@ TESTEXES= \ CFILES= \ + tst.exitcore.c \ tst.sigwait.c \ ___ 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: r318427 - in head: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi
> -Original Message- > From: Konstantin Belousov [mailto:kostik...@gmail.com] > Sent: Monday, May 22, 2017 8:57 AM > To: Stephen McConnell > Cc: src-committ...@freebsd.org; svn-src-all@freebsd.org; svn-src- > h...@freebsd.org > Subject: Re: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr > sys/dev/mpr/mpi > > On Wed, May 17, 2017 at 09:33:37PM +, Stephen McConnell wrote: > > Author: slm > > Date: Wed May 17 21:33:37 2017 > > New Revision: 318427 > > URL: https://svnweb.freebsd.org/changeset/base/318427 > > > > Log: > > Add tri-mode support (SAS/SATA/PCIe). > > > > This includes NVMe device support and adds support for the following > adapters: > > SAS 3408 > > SAS 3416 > > SAS 3508 > > SAS 3516 > > SAS 3616 > > SAS 3708 > > SAS 3716 > > > > Reviewed by:ken, scottl, asomers, mav > > Approved by: ken, scottl, mav > > MFC after: 2 weeks > > Relnotes: yes > > Differential Revision: https://reviews.freebsd.org/D10095 > > It seems that this commit causes the following compilation issue: > > cc1: warnings being treated as errors > /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c: In function > 'mprsas_build_nvme_unm > ap': > /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c:1839: warning: cast to pointer > from integer of different size [-Wint-to-pointer-cast] > --- mpr_sas.o --- > *** [mpr_sas.o] Error code 1 > > at least on powerpc. Fixed in r318679 ___ 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: r318679 - head/sys/dev/mpr
Author: slm Date: Mon May 22 20:27:29 2017 New Revision: 318679 URL: https://svnweb.freebsd.org/changeset/base/318679 Log: Fix powerpc compiler error. Approved by: ken Modified: head/sys/dev/mpr/mpr_sas.c Modified: head/sys/dev/mpr/mpr_sas.c == --- head/sys/dev/mpr/mpr_sas.c Mon May 22 20:11:40 2017(r318678) +++ head/sys/dev/mpr/mpr_sas.c Mon May 22 20:27:29 2017(r318679) @@ -1836,8 +1836,8 @@ mprsas_build_nvme_unmap(struct mpr_softc mprsas_log_command(cm, MPR_XINFO, "%s cm %p ccb %p outstanding %u\n", __func__, cm, ccb, targ->outstanding); - mpr_build_nvme_prp(sc, cm, req, (void *)nvme_dsm_ranges_dma_handle, 0, - data_length); + mpr_build_nvme_prp(sc, cm, req, + (void *)(uintptr_t)nvme_dsm_ranges_dma_handle, 0, data_length); mpr_map_command(sc, cm); out: ___ 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: r318678 - head/sys/boot/common
Author: oshogbo Date: Mon May 22 20:11:40 2017 New Revision: 318678 URL: https://svnweb.freebsd.org/changeset/base/318678 Log: Replacing iterating over rootpath by strsep(3). Submitted by: kczekirda Reviewed by: tsoome, bapt, jhb, oshogbo MFC after:3 weeks Sponsored by: Oktawave Differential Revision:https://reviews.freebsd.org/D10726 Modified: head/sys/boot/common/dev_net.c Modified: head/sys/boot/common/dev_net.c == --- head/sys/boot/common/dev_net.c Mon May 22 20:00:01 2017 (r318677) +++ head/sys/boot/common/dev_net.c Mon May 22 20:11:40 2017 (r318678) @@ -387,16 +387,14 @@ net_print(int verbose) uint32_t net_parse_rootpath() { - int i; n_long addr = INADDR_NONE; + char *ptr; - for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) - if (rootpath[i] == ':') - break; - if (i && i != FNAME_SIZE && rootpath[i] == ':') { - rootpath[i++] = '\0'; - addr = inet_addr(&rootpath[0]); - bcopy(&rootpath[i], rootpath, strlen(&rootpath[i])+1); + ptr = rootpath; + (void)strsep(&ptr, ":"); + if (ptr != NULL) { + addr = inet_addr(rootpath); + bcopy(ptr, rootpath, strlen(ptr) + 1); } return (addr); ___ 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: r318677 - in head/sys: compat/ndis dev/if_ndis
Author: glebius Date: Mon May 22 20:00:01 2017 New Revision: 318677 URL: https://svnweb.freebsd.org/changeset/base/318677 Log: Fix regression in ndis(4) after r286410. This adds a bunch of checks for whether this is a Ethernet or 802.11 device and does proper dereferencing. PR: 213237 Submitted by: MFC after:2 weeks Modified: head/sys/compat/ndis/kern_ndis.c head/sys/compat/ndis/subr_ndis.c head/sys/dev/if_ndis/if_ndis.c head/sys/dev/if_ndis/if_ndisvar.h Modified: head/sys/compat/ndis/kern_ndis.c == --- head/sys/compat/ndis/kern_ndis.cMon May 22 19:57:28 2017 (r318676) +++ head/sys/compat/ndis/kern_ndis.cMon May 22 20:00:01 2017 (r318677) @@ -210,8 +210,8 @@ ndis_status_func(adapter, status, sbuf, block = adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - ifp = sc->ifp; - if (ifp->if_flags & IFF_DEBUG) + ifp = NDISUSB_GET_IFNET(sc); + if ( ifp && ifp->if_flags & IFF_DEBUG) device_printf(sc->ndis_dev, "status: %x\n", status); } @@ -225,8 +225,8 @@ ndis_statusdone_func(adapter) block = adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - ifp = sc->ifp; - if (ifp->if_flags & IFF_DEBUG) + ifp = NDISUSB_GET_IFNET(sc); + if (ifp && ifp->if_flags & IFF_DEBUG) device_printf(sc->ndis_dev, "status complete\n"); } @@ -264,9 +264,9 @@ ndis_resetdone_func(ndis_handle adapter, block = adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - ifp = sc->ifp; + ifp = NDISUSB_GET_IFNET(sc); - if (ifp->if_flags & IFF_DEBUG) + if (ifp && ifp->if_flags & IFF_DEBUG) device_printf(sc->ndis_dev, "reset done...\n"); KeSetEvent(&block->nmb_resetevent, IO_NO_INCREMENT, FALSE); } @@ -285,6 +285,9 @@ ndis_create_sysctls(arg) return (EINVAL); sc = arg; + /* + device_printf(sc->ndis_dev, "ndis_create_sysctls() sc=%p\n", sc); + */ vals = sc->ndis_regvals; TAILQ_INIT(&sc->ndis_cfglist_head); @@ -698,8 +701,8 @@ ndis_ptom(m0, p) */ eh = mtod((*m0), struct ether_header *); - ifp = ((struct ndis_softc *)p->np_softc)->ifp; - if (totlen > ETHER_MAX_FRAME(ifp, eh->ether_type, FALSE)) { + ifp = NDISUSB_GET_IFNET((struct ndis_softc *)p->np_softc); + if (ifp && totlen > ETHER_MAX_FRAME(ifp, eh->ether_type, FALSE)) { diff = totlen - ETHER_MAX_FRAME(ifp, eh->ether_type, FALSE); totlen -= diff; m->m_len -= diff; Modified: head/sys/compat/ndis/subr_ndis.c == --- head/sys/compat/ndis/subr_ndis.cMon May 22 19:57:28 2017 (r318676) +++ head/sys/compat/ndis/subr_ndis.cMon May 22 20:00:01 2017 (r318677) @@ -626,6 +626,9 @@ NdisReadConfiguration(status, parm, cfg, block = (ndis_miniport_block *)cfg; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); + /* + device_printf(sc->ndis_dev, "NdisReadConfiguration sc=%p\n", sc); + */ if (key->us_len == 0 || key->us_buf == NULL) { *status = NDIS_STATUS_FAILURE; @@ -984,7 +987,7 @@ NdisWriteErrorLogEntry(ndis_handle adapt dev = block->nmb_physdeviceobj->do_devext; drv = block->nmb_deviceobj->do_drvobj; sc = device_get_softc(dev); - ifp = sc->ifp; + ifp = NDISUSB_GET_IFNET(sc); if (ifp != NULL && ifp->if_flags & IFF_DEBUG) { error = pe_get_message((vm_offset_t)drv->dro_driverstart, @@ -1304,17 +1307,19 @@ NdisReadNetworkAddress(status, addr, add ndis_handle adapter; { struct ndis_softc *sc; + struct ifnet*ifp; ndis_miniport_block *block; uint8_t empty[] = { 0, 0, 0, 0, 0, 0 }; block = (ndis_miniport_block *)adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - if (sc->ifp == NULL) { + ifp = NDISUSB_GET_IFNET(sc); + if (ifp == NULL) { *status = NDIS_STATUS_FAILURE; return; } - if (sc->ifp->if_addr == NULL || + if (ifp->if_addr == NULL || bcmp(IF_LLADDR(sc->ifp), empty, ETHER_ADDR_LEN) == 0) *status = NDIS_STATUS_FAILURE; else { Modified: head/sys/dev/if_ndis/if_ndis.c == --- head/sys/dev/if_ndis/if_ndis.c Mon May 22 19:57:28 2017 (r318676) +++ head/sys/dev/if_ndis/if_ndis.c Mon May 22 20:00:01 2017 (r318677) @@ -147,7 +147,7 @@ static funcptr ndis_rxeof_xfr_done_wrap; static funcptr ndis_linksts_wrap; static funcptr ndis_linksts_done_w
svn commit: r318676 - head/sys/dev/qlnx/qlnxe
Author: davidcs Date: Mon May 22 19:57:28 2017 New Revision: 318676 URL: https://svnweb.freebsd.org/changeset/base/318676 Log: Check for IPV6 TCP/UDP CSUM offload in pkt header during transmits. Submitted by:shminderjit.si...@cavium.com Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c == --- head/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:57:20 2017 (r318675) +++ head/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:57:28 2017 (r318676) @@ -2946,7 +2946,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f (1 << ETH_TX_1ST_BD_FLAGS_IP_CSUM_SHIFT); } - if (m_head->m_pkthdr.csum_flags & (CSUM_UDP | CSUM_TCP)) { + if (m_head->m_pkthdr.csum_flags & + (CSUM_UDP | CSUM_TCP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6)) { first_bd->data.bd_flags.bitfields |= (1 << ETH_TX_1ST_BD_FLAGS_L4_CSUM_SHIFT); } ___ 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: r318675 - stable/10/sys/rpc
Author: rmacklem Date: Mon May 22 19:57:20 2017 New Revision: 318675 URL: https://svnweb.freebsd.org/changeset/base/318675 Log: MFC: r317906 Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). When sosend() replies ERESTART in the client side krpc, it indicates that the RPC message hasn't yet been sent and that the send queue is full or locked while a signal is posted for the process. Without this patch, this would result in a RPC_CANTSEND reply from clnt_vc_call(), which would cause clnt_reconnect_call() to create a new TCP transport connection. For most NFS servers, this wasn't a serious problem, although it did imply retries of outstanding RPCs, which could possibly have missed the DRC. For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since AmazonEFS often didn't retain the NFSv4.1 session and would reply with NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which requires open/lock state recovery. Three options were considered to fix this: - Return the ERESTART all the way up to the system call boundary and then have the system call redone. This is fraught with risk, due to convoluted code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it is still a work in prgress and may not be feasible. - Set SB_NOINTR for the socket buffer. This fixes the problem, but makes the sosend() completely non interruptible, which kib@ considered inappropriate. It also would break forced dismount when a thread was blocked in sosend(). - Modify the retry loop in clnt_vc_call(), so that it loops for this case for up to 15sec. Testing showed that the sosend() usually succeeded by the 2nd retry. The extreme case observed was 111 loop iterations, or about 100msec of delay. This third alternative is what is implemented in this patch, since the change is: - localized - straightforward - forced dismount is not broken by it. This patch has been tested by cperciva@ extensively against AmazonEFS. Modified: stable/10/sys/rpc/clnt_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/clnt_vc.c == --- stable/10/sys/rpc/clnt_vc.c Mon May 22 19:44:26 2017(r318674) +++ stable/10/sys/rpc/clnt_vc.c Mon May 22 19:57:20 2017(r318675) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,6 +108,8 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); +static int fake_wchan; + /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. @@ -298,7 +301,7 @@ clnt_vc_call( uint32_t xid; struct mbuf *mreq = NULL, *results; struct ct_request *cr; - int error; + int error, trycnt; cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); @@ -328,8 +331,20 @@ clnt_vc_call( timeout = ct->ct_wait; /* use default timeout */ } + /* +* After 15sec of looping, allow it to return RPC_CANTSEND, which will +* cause the clnt_reconnect layer to create a new TCP connection. +*/ + trycnt = 15 * hz; call_again: mtx_assert(&ct->ct_lock, MA_OWNED); + if (ct->ct_closing || ct->ct_closed) { + ct->ct_threads--; + wakeup(ct); + mtx_unlock(&ct->ct_lock); + free(cr, M_RPC); + return (RPC_CANTSEND); + } ct->ct_xid++; xid = ct->ct_xid; @@ -397,13 +412,16 @@ call_again: */ error = sosend(ct->ct_socket, NULL, NULL, mreq, NULL, 0, curthread); mreq = NULL; - if (error == EMSGSIZE) { + if (error == EMSGSIZE || (error == ERESTART && + (ct->ct_waitflag & PCATCH) == 0 && trycnt-- > 0)) { SOCKBUF_LOCK(&ct->ct_socket->so_snd); sbwait(&ct->ct_socket->so_snd); SOCKBUF_UNLOCK(&ct->ct_socket->so_snd); AUTH_VALIDATE(auth, xid, NULL, NULL); mtx_lock(&ct->ct_lock); TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); + /* Sleep for 1 clock tick before trying the sosend() again. */ + msleep(&fake_wchan, &ct->ct_lock, 0, "rpclpsnd", 1); goto call_again; } ___ 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: r318669 - in vendor/libc++/dist: test/libcxx/selftest utils/libcxx utils/libcxx/test
Author: dim Date: Mon May 22 19:44:05 2017 New Revision: 318669 URL: https://svnweb.freebsd.org/changeset/base/318669 Log: Vendor import of libc++ trunk r303571: https://llvm.org/svn/llvm-project/libcxx/trunk@303571 Added: vendor/libc++/dist/test/libcxx/selftest/test.arc.fail.mm vendor/libc++/dist/test/libcxx/selftest/test.arc.pass.mm vendor/libc++/dist/test/libcxx/selftest/test.fail.mm vendor/libc++/dist/test/libcxx/selftest/test.pass.mm Modified: vendor/libc++/dist/utils/libcxx/compiler.py vendor/libc++/dist/utils/libcxx/test/config.py vendor/libc++/dist/utils/libcxx/test/format.py Added: vendor/libc++/dist/test/libcxx/selftest/test.arc.fail.mm == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/selftest/test.arc.fail.mmMon May 22 19:44:05 2017(r318669) @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===--===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===--===// + +#if __has_feature(objc_arc) +#error This test should not compile. +#endif Added: vendor/libc++/dist/test/libcxx/selftest/test.arc.pass.mm == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/selftest/test.arc.pass.mmMon May 22 19:44:05 2017(r318669) @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===--===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===--===// + +#if __has_feature(objc_arc) == 0 +#error "arc should be enabled" +#endif + +int main() +{ +} Added: vendor/libc++/dist/test/libcxx/selftest/test.fail.mm == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/selftest/test.fail.mmMon May 22 19:44:05 2017(r318669) @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===--===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===--===// + +#if __has_feature(objc_arc) == 0 +#error This test should not compile. +#endif Added: vendor/libc++/dist/test/libcxx/selftest/test.pass.mm == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/selftest/test.pass.mmMon May 22 19:44:05 2017(r318669) @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===--===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===--===// + +#if __has_feature(objc_arc) +#error "arc should *not* be enabled" +#endif + +int main() +{ +} Modified: vendor/libc++/dist/utils/libcxx/compiler.py == --- vendor/libc++/dist/utils/libcxx/compiler.py Mon May 22 19:44:02 2017 (r318668) +++ vendor/libc++/dist/utils/libcxx/compiler.py Mon May 22 19:44:05 2017 (r318669) @@ -24,6 +24,7 @@ class CXXCompiler(object): modules_flags=None, use_modules=False, use_ccache=False, use_warnings=False, compile_env=None, cxx_type=None, cxx_version=None): +self.source_lang = 'c++' self.path = path self.flags = list(flags or []) self.compile_flags = list(compile_flags or []) @@ -108,7 +109,7 @@ class CXXCompiler(object): if out is not None: cmd += ['-o', out] if input_is_cxx: -cmd += ['-x', 'c++'] +cmd += ['-x', self.source_lang] if isinstance(source_files, list): cmd += source_files elif isinstance(source_files, str): Modified: vendor/libc++/dist/utils/libcxx/test/config.py == ---
svn commit: r318672 - vendor/lld/lld-trunk-r303571
Author: dim Date: Mon May 22 19:44:18 2017 New Revision: 318672 URL: https://svnweb.freebsd.org/changeset/base/318672 Log: Tag lld trunk r303571. Added: vendor/lld/lld-trunk-r303571/ - copied from r318671, vendor/lld/dist/ ___ 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: r318671 - in vendor/lld/dist: COFF ELF test/COFF test/ELF
Author: dim Date: Mon May 22 19:44:12 2017 New Revision: 318671 URL: https://svnweb.freebsd.org/changeset/base/318671 Log: Vendor import of lld trunk r303571: https://llvm.org/svn/llvm-project/lld/trunk@303571 Added: vendor/lld/dist/test/COFF/pdb-options.test vendor/lld/dist/test/ELF/arm-sbrel32.s (contents, props changed) Deleted: vendor/lld/dist/COFF/Librarian.cpp vendor/lld/dist/COFF/ModuleDef.cpp Modified: vendor/lld/dist/COFF/CMakeLists.txt vendor/lld/dist/COFF/Config.h vendor/lld/dist/COFF/DLL.cpp vendor/lld/dist/COFF/DLL.h vendor/lld/dist/COFF/Driver.cpp vendor/lld/dist/COFF/Driver.h vendor/lld/dist/COFF/DriverUtils.cpp vendor/lld/dist/COFF/InputFiles.cpp vendor/lld/dist/COFF/InputFiles.h vendor/lld/dist/COFF/Options.td vendor/lld/dist/COFF/PDB.cpp vendor/lld/dist/COFF/SymbolTable.h vendor/lld/dist/COFF/Writer.cpp vendor/lld/dist/ELF/InputSection.cpp vendor/lld/dist/ELF/InputSection.h vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/MapFile.cpp vendor/lld/dist/ELF/MapFile.h vendor/lld/dist/ELF/Relocations.cpp vendor/lld/dist/ELF/Relocations.h vendor/lld/dist/ELF/SyntheticSections.cpp vendor/lld/dist/ELF/SyntheticSections.h vendor/lld/dist/ELF/Target.cpp vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/test/COFF/armnt-imports.test vendor/lld/dist/test/COFF/hello32.test vendor/lld/dist/test/COFF/imports.test vendor/lld/dist/test/COFF/invalid-debug-type.test vendor/lld/dist/test/COFF/options.test vendor/lld/dist/test/COFF/pdb-none.test vendor/lld/dist/test/COFF/pdb.test Modified: vendor/lld/dist/COFF/CMakeLists.txt == --- vendor/lld/dist/COFF/CMakeLists.txt Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/CMakeLists.txt Mon May 22 19:44:12 2017 (r318671) @@ -14,11 +14,9 @@ add_lld_library(lldCOFF Error.cpp ICF.cpp InputFiles.cpp - Librarian.cpp LTO.cpp MapFile.cpp MarkLive.cpp - ModuleDef.cpp PDB.cpp Strings.cpp SymbolTable.cpp Modified: vendor/lld/dist/COFF/Config.h == --- vendor/lld/dist/COFF/Config.h Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/Config.h Mon May 22 19:44:12 2017 (r318671) @@ -155,7 +155,6 @@ struct Configuration { uint32_t MajorOSVersion = 6; uint32_t MinorOSVersion = 0; bool DynamicBase = true; - bool AllowBind = true; bool NxCompat = true; bool AllowIsolation = true; bool TerminalServerAware = true; @@ -164,7 +163,6 @@ struct Configuration { bool AppContainer = false; // This is for debugging. - bool DebugPdb = false; bool DumpPdb = false; }; Modified: vendor/lld/dist/COFF/DLL.cpp == --- vendor/lld/dist/COFF/DLL.cppMon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/DLL.cppMon May 22 19:44:12 2017 (r318671) @@ -100,13 +100,17 @@ public: void writeTo(uint8_t *Buf) const override { auto *E = (coff_import_directory_table_entry *)(Buf + OutputSectionOff); -E->ImportLookupTableRVA = LookupTab->getRVA(); E->NameRVA = DLLName->getRVA(); + +// The import descriptor table contains two pointers to +// the tables describing dllimported symbols. But the +// Windows loader actually uses only one. So we create +// only one table and set both fields to its address. +E->ImportLookupTableRVA = AddressTab->getRVA(); E->ImportAddressTableRVA = AddressTab->getRVA(); } Chunk *DLLName; - Chunk *LookupTab; Chunk *AddressTab; }; @@ -136,9 +140,9 @@ binImports(const std::vectorgetDLLName().lower()].push_back(Sym); std::vector> V; - for (auto &P : M) { + for (auto &KV : M) { // Sort symbols by name for each group. -std::vector &Syms = P.second; +std::vector &Syms = KV.second; std::sort(Syms.begin(), Syms.end(), [](DefinedImportData *A, DefinedImportData *B) { return A->getName() < B->getName(); @@ -383,21 +387,14 @@ uint64_t IdataContents::getIATSize() { // See Microsoft PE/COFF spec 5.4 for details. std::vector IdataContents::getChunks() { create(); - std::vector V; + // The loader assumes a specific order of data. // Add each type in the correct order. - for (std::unique_ptr &C : Dirs) -V.push_back(C.get()); - for (std::unique_ptr &C : Lookups) -V.push_back(C.get()); - for (std::unique_ptr &C : Addresses) -V.push_back(C.get()); - for (std::unique_ptr &C : Hints) -V.push_back(C.get()); - for (auto &P : DLLNames) { -std::unique_ptr &C = P.second; -V.push_back(C.get()); - } + std::vector V; + V.insert(V.end(), Dirs.begin(), Dirs.end()); + V.insert(V.end(), Addresses.begin(), Addresses.end()); + V.insert(V.end(), Hints.begin(), Hints.end()); + V.insert(V.end(), DLLNames.
svn commit: r318667 - in vendor/compiler-rt/dist: include/xray lib/asan lib/asan/tests lib/lsan lib/msan lib/msan/tests lib/sanitizer_common lib/sanitizer_common/tests lib/scudo lib/xray test/asan/...
Author: dim Date: Mon May 22 19:43:56 2017 New Revision: 318667 URL: https://svnweb.freebsd.org/changeset/base/318667 Log: Vendor import of compiler-rt trunk r303571: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303571 Deleted: vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test.cc vendor/compiler-rt/dist/test/msan/strndup.cc Modified: vendor/compiler-rt/dist/include/xray/xray_interface.h vendor/compiler-rt/dist/lib/asan/asan_flags.cc vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h vendor/compiler-rt/dist/lib/scudo/scudo_flags.cpp vendor/compiler-rt/dist/lib/xray/xray_interface.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-sigbus.cpp vendor/compiler-rt/dist/test/xray/TestCases/Linux/custom-event-logging.cc vendor/compiler-rt/dist/test/xray/TestCases/Linux/func-id-utils.cc Modified: vendor/compiler-rt/dist/include/xray/xray_interface.h == --- vendor/compiler-rt/dist/include/xray/xray_interface.h Mon May 22 19:43:53 2017(r318666) +++ vendor/compiler-rt/dist/include/xray/xray_interface.h Mon May 22 19:43:56 2017(r318667) @@ -69,6 +69,10 @@ extern int __xray_remove_handler_arg1(); /// Provide a function to invoke when XRay encounters a custom event. extern int __xray_set_customevent_handler(void (*entry)(void*, std::size_t)); +/// This removes whatever the currently provided custom event handler is. +/// Returns 1 on success, 0 on error. +extern int __xray_remove_customevent_handler(); + enum XRayPatchingStatus { NOT_INITIALIZED = 0, SUCCESS = 1, Modified: vendor/compiler-rt/dist/lib/asan/asan_flags.cc == --- vendor/compiler-rt/dist/lib/asan/asan_flags.cc Mon May 22 19:43:53 2017(r318666) +++ vendor/compiler-rt/dist/lib/asan/asan_flags.cc Mon May 22 19:43:56 2017(r318667) @@ -194,10 +194,6 @@ void InitializeFlags() { Report("WARNING: strchr* interceptors are enabled even though " "replace_str=0. Use intercept_strchr=0 to disable them."); } - if (!f->replace_str && common_flags()->intercept_strndup) { -Report("WARNING: strndup* interceptors are enabled even though " - "replace_str=0. Use intercept_strndup=0 to disable them."); - } } } // namespace __asan Modified: vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc == --- vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc Mon May 22 19:43:53 2017(r318666) +++ vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc Mon May 22 19:43:56 2017(r318667) @@ -154,27 +154,6 @@ TEST(AddressSanitizer, MAYBE_StrDupOOBTe free(str); } -#if SANITIZER_TEST_HAS_STRNDUP -TEST(AddressSanitizer, MAYBE_StrNDupOOBTest) { - size_t size = Ident(42); - char *str = MallocAndMemsetString(size); - char *new_str; - // Normal strndup calls. - str[size - 1] = '\0'; - new_str = strndup(str, size - 13); - free(new_str); - new_str = strndup(str + size - 1, 13); - free(new_str); - // Argument points to not allocated memory. - EXPECT_DEATH(Ident(strndup(str - 1, 13)), LeftOOBReadMessage(1)); - EXPECT_DEATH(Ident(strndup(str + size, 13)), RightOOBReadMessage(0)); - // Overwrite the terminating '\0' and hit unallocated memory. - str[size - 1] = 'z'; - EXPECT_DEATH(Ident(strndup(str, size + 13)), RightOOBReadMessage(0)); - free(str); -} -#endif // SANITIZER_TEST_HAS_STRNDUP - TEST(AddressSanitizer, StrCpyOOBTest) { size_t to_size = Ident(30); size_t from_size =
svn commit: r318670 - vendor/libc++/libc++-trunk-r303571
Author: dim Date: Mon May 22 19:44:10 2017 New Revision: 318670 URL: https://svnweb.freebsd.org/changeset/base/318670 Log: Tag libc++ trunk r303571. Added: vendor/libc++/libc++-trunk-r303571/ - copied from r318669, vendor/libc++/dist/ ___ 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: r318674 - vendor/lldb/lldb-trunk-r303571
Author: dim Date: Mon May 22 19:44:26 2017 New Revision: 318674 URL: https://svnweb.freebsd.org/changeset/base/318674 Log: Tag lldb trunk r303571. Added: vendor/lldb/lldb-trunk-r303571/ - copied from r318673, vendor/lldb/dist/ ___ 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: r318673 - in vendor/lldb/dist: include/lldb/Utility packages/Python/lldbsuite/test source/Core source/Utility unittests/Utility
Author: dim Date: Mon May 22 19:44:21 2017 New Revision: 318673 URL: https://svnweb.freebsd.org/changeset/base/318673 Log: Vendor import of lldb trunk r303571: https://llvm.org/svn/llvm-project/lldb/trunk@303571 Modified: vendor/lldb/dist/include/lldb/Utility/Status.h vendor/lldb/dist/packages/Python/lldbsuite/test/configuration.py vendor/lldb/dist/source/Core/IOHandler.cpp vendor/lldb/dist/source/Utility/Status.cpp vendor/lldb/dist/unittests/Utility/StatusTest.cpp Modified: vendor/lldb/dist/include/lldb/Utility/Status.h == --- vendor/lldb/dist/include/lldb/Utility/Status.h Mon May 22 19:44:18 2017(r318672) +++ vendor/lldb/dist/include/lldb/Utility/Status.h Mon May 22 19:44:21 2017(r318673) @@ -1,5 +1,4 @@ -//===-- Status.h -*- C++ -//-*-===// +//===-- Status.h *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -8,22 +7,20 @@ // //===--===// -#ifndef __DCError_h__ -#define __DCError_h__ -#if defined(__cplusplus) +#ifndef LLDB_UTILITY_STATUS_H +#define LLDB_UTILITY_STATUS_H #include "lldb/lldb-defines.h" #include "lldb/lldb-enumerations.h" // for ErrorType, ErrorType... #include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/Support/Error.h" #include "llvm/Support/FormatVariadic.h" - #include +#include // for uint32_t #include #include // for error_code #include // for forward -#include // for uint32_t - namespace llvm { class raw_ostream; } @@ -106,6 +103,10 @@ public: ~Status(); + // llvm::Error support + explicit Status(llvm::Error error); + llvm::Error ToError() const; + //-- /// Get the error string associated with the current error. // @@ -274,5 +275,4 @@ template <> struct format_providerCreateSubWindow("Threads", threads_bounds, false)); WindowSP status_window_sp( -main_window_sp->CreateSubWindow("Error", status_bounds, false)); +main_window_sp->CreateSubWindow("Status", status_bounds, false)); status_window_sp->SetCanBeActive( false); // Don't let the status bar become the active window main_window_sp->SetDelegate( Modified: vendor/lldb/dist/source/Utility/Status.cpp == --- vendor/lldb/dist/source/Utility/Status.cpp Mon May 22 19:44:18 2017 (r318672) +++ vendor/lldb/dist/source/Utility/Status.cpp Mon May 22 19:44:21 2017 (r318673) @@ -56,6 +56,37 @@ Status::Status(const char *format, ...) va_end(args); } +Status::Status(llvm::Error error) +: m_code(0), m_type(ErrorType::eErrorTypeGeneric) { + if (!error) +return; + + // if the error happens to be a errno error, preserve the error code + error = llvm::handleErrors( + std::move(error), [&](std::unique_ptr e) -> llvm::Error { +std::error_code ec = e->convertToErrorCode(); +if (ec.category() == std::generic_category()) { + m_code = ec.value(); + m_type = ErrorType::eErrorTypePOSIX; + return llvm::Error::success(); +} +return llvm::Error(std::move(e)); + }); + + // Otherwise, just preserve the message + if (error) +SetErrorString(llvm::toString(std::move(error))); +} + +llvm::Error Status::ToError() const { + if (Success()) +return llvm::Error::success(); + if (m_type == ErrorType::eErrorTypePOSIX) +return llvm::errorCodeToError(std::error_code(m_code, std::generic_category())); + return llvm::make_error(AsCString(), + llvm::inconvertibleErrorCode()); +} + //-- // Assignment operator //-- Modified: vendor/lldb/dist/unittests/Utility/StatusTest.cpp == --- vendor/lldb/dist/unittests/Utility/StatusTest.cpp Mon May 22 19:44:18 2017(r318672) +++ vendor/lldb/dist/unittests/Utility/StatusTest.cpp Mon May 22 19:44:21 2017(r318673) @@ -11,9 +11,40 @@ #include "gtest/gtest.h" using namespace lldb_private; +using namespace lldb; TEST(StatusTest, Formatv) { EXPECT_EQ("", llvm::formatv("{0}", Status()).str()); EXPECT_EQ("Hello Status", llvm::formatv("{0}", Status("Hello Status")).str()); EXPECT_EQ("Hello", llvm::formatv("{0:5}", Status("Hello Error")).str()); } + +TEST(StatusTest, ErrorConstructor) { + EXPECT_TRUE(Status(llvm::Error::success()).Success()); + + Status eagain( + llvm::errorCodeToError(std::error_code(EAGAIN, std::generic_category(; + EXPECT_TRUE(eagain.Fail()); + EXPECT_EQ(eE
svn commit: r318664 - vendor/llvm/llvm-trunk-r303571
Author: dim Date: Mon May 22 19:43:35 2017 New Revision: 318664 URL: https://svnweb.freebsd.org/changeset/base/318664 Log: Tag llvm trunk r303571. Added: vendor/llvm/llvm-trunk-r303571/ - copied from r318663, vendor/llvm/dist/ ___ 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: r318666 - vendor/clang/clang-trunk-r303571
Author: dim Date: Mon May 22 19:43:53 2017 New Revision: 318666 URL: https://svnweb.freebsd.org/changeset/base/318666 Log: Tag clang trunk r303571. Added: vendor/clang/clang-trunk-r303571/ - copied from r318665, vendor/clang/dist/ ___ 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: r318668 - vendor/compiler-rt/compiler-rt-trunk-r303571
Author: dim Date: Mon May 22 19:44:02 2017 New Revision: 318668 URL: https://svnweb.freebsd.org/changeset/base/318668 Log: Tag compiler-rt trunk r303571. Added: vendor/compiler-rt/compiler-rt-trunk-r303571/ - copied from r318667, vendor/compiler-rt/dist/ ___ 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: r318665 - in vendor/clang/dist: include/clang/AST include/clang/Basic include/clang/Format include/clang/Lex include/clang/Parse include/clang/Sema include/clang/Serialization lib/AST l...
Author: dim Date: Mon May 22 19:43:45 2017 New Revision: 318665 URL: https://svnweb.freebsd.org/changeset/base/318665 Log: Vendor import of clang trunk r303571: https://llvm.org/svn/llvm-project/cfe/trunk@303571 Added: vendor/clang/dist/test/CodeGen/micromips-attr.c (contents, props changed) vendor/clang/dist/test/CodeGen/wchar-size.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/amdgcn-automatic-variable.cpp (contents, props changed) vendor/clang/dist/test/CodeGenOpenCL/amdgcn-automatic-variable.cl vendor/clang/dist/test/Modules/extern_cxx.cpp (contents, props changed) vendor/clang/dist/test/Modules/macro-redefinition.cpp (contents, props changed) vendor/clang/dist/test/Sema/attr-micromips.c (contents, props changed) vendor/clang/dist/test/SemaCXX/Inputs/nullability-completeness.h (contents, props changed) Modified: vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/CXXInheritance.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/Basic/AddressSpaces.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Format/Format.h vendor/clang/dist/include/clang/Lex/ModuleMap.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/DeclSpec.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/Serialization/ASTWriter.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/CXXInheritance.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGAtomic.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CGValue.h vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypeCache.h vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.h vendor/clang/dist/lib/Format/BreakableToken.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/Format.cpp vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/UnwrappedLineFormatter.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Index/IndexBody.cpp vendor/clang/dist/lib/Index/IndexDecl.cpp vendor/clang/dist/lib/Index/IndexSymbol.cpp vendor/clang/dist/lib/Index/USRGeneration.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseOpenMP.cpp vendor/clang/dist/lib/Parse/ParsePragma.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporter.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp vendor/clang/dist/test/CodeGen/address-space.c vendor/clang/dist/test/CodeGenCUDA/flush-denormals.cu vendor/clang/dist/test/CodeGenCXX/strict-vtable-pointers.cpp vendor/clang/dist/test/CodeGenOpenCL/amdgpu-alignment
svn commit: r318663 - in vendor/llvm/dist: docs include/llvm include/llvm/ADT include/llvm/Analysis include/llvm/CodeGen include/llvm/DebugInfo/CodeView include/llvm/DebugInfo/DWARF include/llvm/De...
Author: dim Date: Mon May 22 19:43:28 2017 New Revision: 318663 URL: https://svnweb.freebsd.org/changeset/base/318663 Log: Vendor import of llvm trunk r303571: https://llvm.org/svn/llvm-project/llvm/trunk@303571 Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeCollection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeTableCollection.h (contents, props changed) vendor/llvm/dist/include/llvm/IR/DerivedUser.h (contents, props changed) vendor/llvm/dist/include/llvm/Object/COFFModuleDefinition.h (contents, props changed) vendor/llvm/dist/include/llvm/Object/WindowsResource.h (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeIndex.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeTableCollection.cpp (contents, props changed) vendor/llvm/dist/lib/Object/COFFImportFile.cpp (contents, props changed) vendor/llvm/dist/lib/Object/COFFModuleDefinition.cpp (contents, props changed) vendor/llvm/dist/lib/Object/WindowsResource.cpp (contents, props changed) vendor/llvm/dist/lib/Support/BinaryStreamRef.cpp (contents, props changed) vendor/llvm/dist/test/CodeGen/AMDGPU/frame-index-elimination.ll vendor/llvm/dist/test/CodeGen/AMDGPU/function-args.ll vendor/llvm/dist/test/CodeGen/AMDGPU/function-returns.ll vendor/llvm/dist/test/CodeGen/AMDGPU/lshl64-to-32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/regcoalesce-prune.mir vendor/llvm/dist/test/CodeGen/Generic/opt-codegen-no-target-machine.ll vendor/llvm/dist/test/CodeGen/Mips/dins.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-attr.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/add-vec.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-sub-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-sub-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-sub-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/sub-vec.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-setcc-128.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-setcc-256.ll vendor/llvm/dist/test/CodeGen/X86/fmsubadd-combine.ll vendor/llvm/dist/test/CodeGen/X86/leaFixup32.mir vendor/llvm/dist/test/CodeGen/X86/leaFixup64.mir vendor/llvm/dist/test/CodeGen/X86/subcarry.ll vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-addr-object-relocation.dwo (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-addr-object-relocation.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-multiple-cu.dwo (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-multiple-cu.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge1.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge2.yaml vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergetypes.test vendor/llvm/dist/test/LTO/X86/Inputs/strip-debug-info-bar.ll vendor/llvm/dist/test/MC/Disassembler/AMDGPU/exp_vi.txt (contents, props changed) vendor/llvm/dist/test/ThinLTO/X86/Inputs/merge-triple.ll vendor/llvm/dist/test/ThinLTO/X86/merge-triple.ll vendor/llvm/dist/test/Transforms/InstCombine/AMDGPU/amdgcn-demanded-vector-elts.ll vendor/llvm/dist/test/Transforms/InstCombine/NVPTX/ vendor/llvm/dist/test/Transforms/InstCombine/NVPTX/lit.local.cfg vendor/llvm/dist/test/Transforms/InstCombine/NVPTX/nvvm-intrins.ll vendor/llvm/dist/test/Transforms/InstCombine/wcslen-1.ll vendor/llvm/dist/test/Transforms/InstCombine/wcslen-2.ll vendor/llvm/dist/test/Transforms/InstCombine/wcslen-3.ll vendor/llvm/dist/test/Transforms/InstSimplify/icmp-bool-constant.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/canonical-2.ll vendor/llvm/dist/test/Transforms/NewGVN/completeness.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32838.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32845.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32897.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32945.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33014.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33086.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33116.ll vendor/llvm/dist/tes
svn commit: r318662 - stable/10/sys/dev/qlnx/qlnxe
Author: davidcs Date: Mon May 22 19:40:56 2017 New Revision: 318662 URL: https://svnweb.freebsd.org/changeset/base/318662 Log: MFC r318383 QL_DPRINT macro modfied to handle multiple args; print line#. Submitted by:shminderjit.si...@cavium.com Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h == --- stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:36:26 2017 (r318661) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:40:56 2017 (r318662) @@ -483,35 +483,141 @@ typedef struct qlnx_host qlnx_host_t; #ifdef QLNX_DEBUG -#define QL_DPRINT1(ha, x) if (ha->dbg_level & 0x0001) device_printf x -#define QL_DPRINT2(ha, x) if (ha->dbg_level & 0x0002) device_printf x -#define QL_DPRINT3(ha, x) if (ha->dbg_level & 0x0004) device_printf x -#define QL_DPRINT4(ha, x) if (ha->dbg_level & 0x0008) device_printf x -#define QL_DPRINT5(ha, x) if (ha->dbg_level & 0x0010) device_printf x -#define QL_DPRINT6(ha, x) if (ha->dbg_level & 0x0020) device_printf x -#define QL_DPRINT7(ha, x) if (ha->dbg_level & 0x0040) device_printf x -#define QL_DPRINT8(ha, x) if (ha->dbg_level & 0x0080) device_printf x -#define QL_DPRINT9(ha, x) if (ha->dbg_level & 0x0100) device_printf x -#define QL_DPRINT11(ha, x) if (ha->dbg_level & 0x0400) device_printf x -#define QL_DPRINT12(ha, x) if (ha->dbg_level & 0x0800) device_printf x -#define QL_DPRINT13(ha, x) if (ha->dbg_level & 0x1000) device_printf x -#define QL_DPRINT14(ha, x) if (ha->dbg_level & 0x2000) device_printf x +#define QL_DPRINT1(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0001) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT2(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0002) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT3(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0004) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT4(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0008) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT5(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0010) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT6(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0020) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ +
svn commit: r318661 - in stable/10/sys: dev/qlnx/qlnxe modules/qlnx/qlnxe
Author: davidcs Date: Mon May 22 19:36:26 2017 New Revision: 318661 URL: https://svnweb.freebsd.org/changeset/base/318661 Log: MFC r318382 1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for processing interrupts drops to around 1% for 100G and under 1% for other speeds. 2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN 3. remove unused mtx tx_lock 4. bind taskqueue kernel thread to the appropriate cpu core 5. when tx_ring is full, stop further transmits till at least 1/16th of the Tx Ring is empty. In our case 1K entries. Also if there are rx_pkts to process, put the taskqueue thread to sleep for 100ms, before enabling interrupts. 6. Use rx_pkt_threshold of 128. Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c stable/10/sys/dev/qlnx/qlnxe/qlnx_os.h stable/10/sys/modules/qlnx/qlnxe/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h == --- stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:36:26 2017 (r318661) @@ -191,6 +191,7 @@ struct qlnx_fastpath { struct mtx tx_mtx; chartx_mtx_name[32]; struct buf_ring *tx_br; + uint32_ttx_ring_full; struct task fp_task; struct taskqueue*fp_taskqueue; @@ -364,6 +365,8 @@ struct qlnx_host { /* debug */ uint32_tdbg_level; + uint32_tdbg_trace_lro_cnt; + uint32_tdbg_trace_tso_pkt_len; uint32_tdp_level; uint32_tdp_module; @@ -386,7 +389,6 @@ struct qlnx_host { /* tx related */ struct callout tx_callout; - struct mtx tx_lock; uint32_ttxr_idx; /* rx related */ Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c == --- stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:36:26 2017 (r318661) @@ -382,16 +382,77 @@ qlnx_fp_taskqueue(void *context, int pen struct ifnet *ifp; struct mbuf*mp; intret; + int lro_enable, tc; + int rx_int = 0, total_rx_count = 0; + struct thread *cthread; fp = context; if (fp == NULL) return; + cthread = curthread; + + thread_lock(cthread); + + if (!sched_is_bound(cthread)) + sched_bind(cthread, fp->rss_id); + + thread_unlock(cthread); + ha = (qlnx_host_t *)fp->edev; ifp = ha->ifp; + lro_enable = ha->ifp->if_capenable & IFCAP_LRO; + + rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, lro_enable); + + if (rx_int) { + fp->rx_pkts += rx_int; + total_rx_count += rx_int; + } + +#ifdef QLNX_SOFT_LRO + { + struct lro_ctrl *lro; + + lro = &fp->rxq->lro; + + if (lro_enable && total_rx_count) { + +#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) + + if (ha->dbg_trace_lro_cnt) { + if (lro->lro_mbuf_count & ~1023) + fp->lro_cnt_1024++; + else if (lro->lro_mbuf_count & ~511) + fp->lro_cnt_512++; + else if (lro->lro_mbuf_count & ~255) + fp->lro_cnt_256++; + else if (lro->lro_mbuf_count & ~127) + fp->lro_cnt_128++; + else if (lro->lro_mbuf_count & ~63) + fp->lro_cnt_64++; + } + tcp_lro_flush_all(lro); + +#else + struct lro_entry *queued; + + while ((!SLIST_EMPTY(&lro->lro_active))) { + queued = SLIST_FIRST(&lro->lro_active); + SLIST_REMOVE_HEAD(&lro->lro_active, next); + tcp_lro_flush(lro, queued); + } +#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ + } + } +#endif /* #ifdef QLNX_SOFT_LRO */ + + ecore_sb_update_sb_idx(fp->sb_info); + rmb(); + mtx_lock(&fp->tx_mtx); if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !
svn commit: r318660 - stable/11/sys/rpc
Author: rmacklem Date: Mon May 22 19:34:37 2017 New Revision: 318660 URL: https://svnweb.freebsd.org/changeset/base/318660 Log: MFC: r317906 Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). When sosend() replies ERESTART in the client side krpc, it indicates that the RPC message hasn't yet been sent and that the send queue is full or locked while a signal is posted for the process. Without this patch, this would result in a RPC_CANTSEND reply from clnt_vc_call(), which would cause clnt_reconnect_call() to create a new TCP transport connection. For most NFS servers, this wasn't a serious problem, although it did imply retries of outstanding RPCs, which could possibly have missed the DRC. For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since AmazonEFS often didn't retain the NFSv4.1 session and would reply with NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which requires open/lock state recovery. Three options were considered to fix this: - Return the ERESTART all the way up to the system call boundary and then have the system call redone. This is fraught with risk, due to convoluted code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it is still a work in prgress and may not be feasible. - Set SB_NOINTR for the socket buffer. This fixes the problem, but makes the sosend() completely non interruptible, which kib@ considered inappropriate. It also would break forced dismount when a thread was blocked in sosend(). - Modify the retry loop in clnt_vc_call(), so that it loops for this case for up to 15sec. Testing showed that the sosend() usually succeeded by the 2nd retry. The extreme case observed was 111 loop iterations, or about 100msec of delay. This third alternative is what is implemented in this patch, since the change is: - localized - straightforward - forced dismount is not broken by it. This patch has been tested by cperciva@ extensively against AmazonEFS. Modified: stable/11/sys/rpc/clnt_vc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/rpc/clnt_vc.c == --- stable/11/sys/rpc/clnt_vc.c Mon May 22 19:28:38 2017(r318659) +++ stable/11/sys/rpc/clnt_vc.c Mon May 22 19:34:37 2017(r318660) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,6 +108,8 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); +static int fake_wchan; + /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. @@ -298,7 +301,7 @@ clnt_vc_call( uint32_t xid; struct mbuf *mreq = NULL, *results; struct ct_request *cr; - int error; + int error, trycnt; cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); @@ -328,8 +331,20 @@ clnt_vc_call( timeout = ct->ct_wait; /* use default timeout */ } + /* +* After 15sec of looping, allow it to return RPC_CANTSEND, which will +* cause the clnt_reconnect layer to create a new TCP connection. +*/ + trycnt = 15 * hz; call_again: mtx_assert(&ct->ct_lock, MA_OWNED); + if (ct->ct_closing || ct->ct_closed) { + ct->ct_threads--; + wakeup(ct); + mtx_unlock(&ct->ct_lock); + free(cr, M_RPC); + return (RPC_CANTSEND); + } ct->ct_xid++; xid = ct->ct_xid; @@ -397,13 +412,16 @@ call_again: */ error = sosend(ct->ct_socket, NULL, NULL, mreq, NULL, 0, curthread); mreq = NULL; - if (error == EMSGSIZE) { + if (error == EMSGSIZE || (error == ERESTART && + (ct->ct_waitflag & PCATCH) == 0 && trycnt-- > 0)) { SOCKBUF_LOCK(&ct->ct_socket->so_snd); sbwait(&ct->ct_socket->so_snd); SOCKBUF_UNLOCK(&ct->ct_socket->so_snd); AUTH_VALIDATE(auth, xid, NULL, NULL); mtx_lock(&ct->ct_lock); TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); + /* Sleep for 1 clock tick before trying the sosend() again. */ + msleep(&fake_wchan, &ct->ct_lock, 0, "rpclpsnd", 1); goto call_again; } ___ 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: r318659 - stable/11/sys/dev/qlnx/qlnxe
Author: davidcs Date: Mon May 22 19:28:38 2017 New Revision: 318659 URL: https://svnweb.freebsd.org/changeset/base/318659 Log: MFC r318383 QL_DPRINT macro modfied to handle multiple args; print line#. Submitted by:shminderjit.si...@cavium.com Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h == --- stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:28:24 2017 (r318658) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:28:38 2017 (r318659) @@ -483,35 +483,141 @@ typedef struct qlnx_host qlnx_host_t; #ifdef QLNX_DEBUG -#define QL_DPRINT1(ha, x) if (ha->dbg_level & 0x0001) device_printf x -#define QL_DPRINT2(ha, x) if (ha->dbg_level & 0x0002) device_printf x -#define QL_DPRINT3(ha, x) if (ha->dbg_level & 0x0004) device_printf x -#define QL_DPRINT4(ha, x) if (ha->dbg_level & 0x0008) device_printf x -#define QL_DPRINT5(ha, x) if (ha->dbg_level & 0x0010) device_printf x -#define QL_DPRINT6(ha, x) if (ha->dbg_level & 0x0020) device_printf x -#define QL_DPRINT7(ha, x) if (ha->dbg_level & 0x0040) device_printf x -#define QL_DPRINT8(ha, x) if (ha->dbg_level & 0x0080) device_printf x -#define QL_DPRINT9(ha, x) if (ha->dbg_level & 0x0100) device_printf x -#define QL_DPRINT11(ha, x) if (ha->dbg_level & 0x0400) device_printf x -#define QL_DPRINT12(ha, x) if (ha->dbg_level & 0x0800) device_printf x -#define QL_DPRINT13(ha, x) if (ha->dbg_level & 0x1000) device_printf x -#define QL_DPRINT14(ha, x) if (ha->dbg_level & 0x2000) device_printf x +#define QL_DPRINT1(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0001) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT2(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0002) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT3(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0004) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT4(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0008) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT5(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0010) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ + ## __VA_ARGS__);\ + } \ + } while (0) + +#define QL_DPRINT6(ha, x, ...) \ + do {\ + if ((ha)->dbg_level & 0x0020) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x,\ + __func__, __LINE__, \ +
svn commit: r318657 - in stable/11/sys: dev/qlnx/qlnxe modules/qlnx/qlnxe
Author: davidcs Date: Mon May 22 19:22:06 2017 New Revision: 318657 URL: https://svnweb.freebsd.org/changeset/base/318657 Log: MFC r318382 1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for processing interrupts drops to around 1% for 100G and under 1% for other speeds. 2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN 3. remove unused mtx tx_lock 4. bind taskqueue kernel thread to the appropriate cpu core 5. when tx_ring is full, stop further transmits till at least 1/16th of the Tx Ring is empty. In our case 1K entries. Also if there are rx_pkts to process, put the taskqueue thread to sleep for 100ms, before enabling interrupts. 6. Use rx_pkt_threshold of 128. Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c stable/11/sys/dev/qlnx/qlnxe/qlnx_os.h stable/11/sys/modules/qlnx/qlnxe/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h == --- stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:22:06 2017 (r318657) @@ -191,6 +191,7 @@ struct qlnx_fastpath { struct mtx tx_mtx; chartx_mtx_name[32]; struct buf_ring *tx_br; + uint32_ttx_ring_full; struct task fp_task; struct taskqueue*fp_taskqueue; @@ -364,6 +365,8 @@ struct qlnx_host { /* debug */ uint32_tdbg_level; + uint32_tdbg_trace_lro_cnt; + uint32_tdbg_trace_tso_pkt_len; uint32_tdp_level; uint32_tdp_module; @@ -386,7 +389,6 @@ struct qlnx_host { /* tx related */ struct callout tx_callout; - struct mtx tx_lock; uint32_ttxr_idx; /* rx related */ Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c == --- stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:22:06 2017 (r318657) @@ -382,16 +382,77 @@ qlnx_fp_taskqueue(void *context, int pen struct ifnet *ifp; struct mbuf*mp; intret; + int lro_enable, tc; + int rx_int = 0, total_rx_count = 0; + struct thread *cthread; fp = context; if (fp == NULL) return; + cthread = curthread; + + thread_lock(cthread); + + if (!sched_is_bound(cthread)) + sched_bind(cthread, fp->rss_id); + + thread_unlock(cthread); + ha = (qlnx_host_t *)fp->edev; ifp = ha->ifp; + lro_enable = ha->ifp->if_capenable & IFCAP_LRO; + + rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, lro_enable); + + if (rx_int) { + fp->rx_pkts += rx_int; + total_rx_count += rx_int; + } + +#ifdef QLNX_SOFT_LRO + { + struct lro_ctrl *lro; + + lro = &fp->rxq->lro; + + if (lro_enable && total_rx_count) { + +#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) + + if (ha->dbg_trace_lro_cnt) { + if (lro->lro_mbuf_count & ~1023) + fp->lro_cnt_1024++; + else if (lro->lro_mbuf_count & ~511) + fp->lro_cnt_512++; + else if (lro->lro_mbuf_count & ~255) + fp->lro_cnt_256++; + else if (lro->lro_mbuf_count & ~127) + fp->lro_cnt_128++; + else if (lro->lro_mbuf_count & ~63) + fp->lro_cnt_64++; + } + tcp_lro_flush_all(lro); + +#else + struct lro_entry *queued; + + while ((!SLIST_EMPTY(&lro->lro_active))) { + queued = SLIST_FIRST(&lro->lro_active); + SLIST_REMOVE_HEAD(&lro->lro_active, next); + tcp_lro_flush(lro, queued); + } +#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ + } + } +#endif /* #ifdef QLNX_SOFT_LRO */ + + ecore_sb_update_sb_idx(fp->sb_info); + rmb(); + mtx_lock(&fp->tx_mtx); if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_
svn commit: r318655 - in head/contrib/llvm: include/llvm/MC lib/MC lib/Target/ARM/MCTargetDesc
Author: dim Date: Mon May 22 16:16:48 2017 New Revision: 318655 URL: https://svnweb.freebsd.org/changeset/base/318655 Log: Pull in r302416 from upstream llvm trunk (by Martin Storsjö): [ARM] Clear the constant pool cache on explicit .ltorg directives Multiple ldr pseudoinstructions with the same constant value will reuse the same constant pool entry. However, if the constant pool is explicitly flushed with a .ltorg directive, we should not try to reference constants in the previous pool any longer, since they may be out of range. This fixes assembling hand-written assembler source which repeatedly loads the same constant value, across a binary size larger than the pc-relative fixup range for ldr instructions (4096 bytes). Such assembler source already uses explicit .ltorg instructions to emit constant pools with regular intervals. However if we try to reuse constants emitted in earlier pools, they end up out of range. This makes the output of the testcase match what binutils gas does (prior to this patch, it would fail to assemble). Differential Revision: https://reviews.llvm.org/D32847 This should fix "out of range pc-relative fixup value" errors, when compiling certain ARM inline assembly for www/webkit-gtk[23]. Reported by: mmel MFC after:3 days Modified: head/contrib/llvm/include/llvm/MC/ConstantPools.h head/contrib/llvm/lib/MC/ConstantPools.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Modified: head/contrib/llvm/include/llvm/MC/ConstantPools.h == --- head/contrib/llvm/include/llvm/MC/ConstantPools.h Mon May 22 16:13:30 2017(r318654) +++ head/contrib/llvm/include/llvm/MC/ConstantPools.h Mon May 22 16:16:48 2017(r318655) @@ -60,6 +60,8 @@ public: // Return true if the constant pool is empty bool empty(); + + void clearCache(); }; class AssemblerConstantPools { @@ -83,6 +85,7 @@ class AssemblerConstantPools { public: void emitAll(MCStreamer &Streamer); void emitForCurrentSection(MCStreamer &Streamer); + void clearCacheForCurrentSection(MCStreamer &Streamer); const MCExpr *addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc); Modified: head/contrib/llvm/lib/MC/ConstantPools.cpp == --- head/contrib/llvm/lib/MC/ConstantPools.cpp Mon May 22 16:13:30 2017 (r318654) +++ head/contrib/llvm/lib/MC/ConstantPools.cpp Mon May 22 16:16:48 2017 (r318655) @@ -54,6 +54,10 @@ const MCExpr *ConstantPool::addEntry(con bool ConstantPool::empty() { return Entries.empty(); } +void ConstantPool::clearCache() { + CachedEntries.clear(); +} + // // AssemblerConstantPools implementation // @@ -95,6 +99,13 @@ void AssemblerConstantPools::emitForCurr } } +void AssemblerConstantPools::clearCacheForCurrentSection(MCStreamer &Streamer) { + MCSection *Section = Streamer.getCurrentSectionOnly(); + if (ConstantPool *CP = getConstantPool(Section)) { +CP->clearCache(); + } +} + const MCExpr *AssemblerConstantPools::addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc) { Modified: head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp == --- head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Mon May 22 16:13:30 2017(r318654) +++ head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Mon May 22 16:16:48 2017(r318655) @@ -33,6 +33,7 @@ const MCExpr *ARMTargetStreamer::addCons void ARMTargetStreamer::emitCurrentConstantPool() { ConstantPools->emitForCurrentSection(Streamer); + ConstantPools->clearCacheForCurrentSection(Streamer); } // finish() - write out any non-empty assembler constant pools. ___ 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: r318654 - head/lib
Author: dim Date: Mon May 22 16:13:30 2017 New Revision: 318654 URL: https://svnweb.freebsd.org/changeset/base/318654 Log: For now, disable building libc++experimental for arm, since there are a number of static assertion failures in the time_t related parts. Reported by: mmel, kib Modified: head/lib/Makefile Modified: head/lib/Makefile == --- head/lib/Makefile Mon May 22 16:11:46 2017(r318653) +++ head/lib/Makefile Mon May 22 16:13:30 2017(r318654) @@ -156,7 +156,10 @@ _libclang_rt= libclang_rt .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt -_libcplusplus= libc++ libc++experimental +_libcplusplus= libc++ +.if ${MACHINE_CPUARCH} != "arm" +_libcplusplus+=libc++experimental +.endif .endif SUBDIR.${MK_EFI}+= libefivar ___ 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: r318653 - in stable: 10/usr.bin/sort 11/usr.bin/sort
Author: gjb Date: Mon May 22 16:11:46 2017 New Revision: 318653 URL: https://svnweb.freebsd.org/changeset/base/318653 Log: MFC r305613 (gabor): Fix typo. PR: 211245 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/sort/sort.1.in Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/sort/sort.1.in Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.bin/sort/sort.1.in == --- stable/10/usr.bin/sort/sort.1.inMon May 22 16:07:17 2017 (r318652) +++ stable/10/usr.bin/sort/sort.1.inMon May 22 16:11:46 2017 (r318653) @@ -133,7 +133,7 @@ also checks that there are no lines with .It Fl s Stable sort. This option maintains the original record order of records that have -and equal key. +an equal key. This is a non-standard feature, but it is widely accepted and used. .It Fl Fl version Print the version and silently exits. ___ 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: r318653 - in stable: 10/usr.bin/sort 11/usr.bin/sort
Author: gjb Date: Mon May 22 16:11:46 2017 New Revision: 318653 URL: https://svnweb.freebsd.org/changeset/base/318653 Log: MFC r305613 (gabor): Fix typo. PR: 211245 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.bin/sort/sort.1.in Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/sort/sort.1.in Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.bin/sort/sort.1.in == --- stable/11/usr.bin/sort/sort.1.inMon May 22 16:07:17 2017 (r318652) +++ stable/11/usr.bin/sort/sort.1.inMon May 22 16:11:46 2017 (r318653) @@ -133,7 +133,7 @@ also checks that there are no lines with .It Fl s Stable sort. This option maintains the original record order of records that have -and equal key. +an equal key. This is a non-standard feature, but it is widely accepted and used. .It Fl Fl version Print the version and silently exits. ___ 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: r318652 - stable/11/etc
Author: gjb Date: Mon May 22 16:07:17 2017 New Revision: 318652 URL: https://svnweb.freebsd.org/changeset/base/318652 Log: MFC r307469 (imp): Allow root_rw_mount to be both lower and upper case. Before, if it was upper case, you'd wind up with a read-only filesystem when you should sometimes. PR: 213549 Sponsored by: The FreeBSD Foundation Modified: stable/11/etc/rc Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc == --- stable/11/etc/rcMon May 22 15:53:30 2017(r318651) +++ stable/11/etc/rcMon May 22 16:07:17 2017(r318652) @@ -135,16 +135,16 @@ done # Note: this assumes firstboot_sentinel is on / when we have # a read-only /, or that it is on media that's writable. if [ -e ${firstboot_sentinel} ]; then - [ ${root_rw_mount} = "yes" ] || mount -uw / + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -uw / chflags -R 0 ${firstboot_sentinel} rm -rf ${firstboot_sentinel} if [ -e ${firstboot_sentinel}-reboot ]; then chflags -R 0 ${firstboot_sentinel}-reboot rm -rf ${firstboot_sentinel}-reboot - [ ${root_rw_mount} = "yes" ] || mount -ur / + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur / kill -INT 1 fi - [ ${root_rw_mount} = "yes" ] || mount -ur / + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur / fi echo '' ___ 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: r318651 - head/sys
Author: ngie Date: Mon May 22 15:53:30 2017 New Revision: 318651 URL: https://svnweb.freebsd.org/changeset/base/318651 Log: Remove glimpse make target added in r181432 The textproc/glimpse port expired over 3 years ago because there weren't any more publicly available distfiles, and because it lacked a maintainer. Remove the target as it's no longer executable on FreeBSD. Differential Revision:D10764 MFC after:1 month Reviewed by: imp Sponsored by: Dell EMC Isilon Modified: head/sys/Makefile Modified: head/sys/Makefile == --- head/sys/Makefile Mon May 22 15:51:17 2017(r318650) +++ head/sys/Makefile Mon May 22 15:53:30 2017(r318651) @@ -59,19 +59,7 @@ TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope. rm -f ${.CURDIR}/TAGS cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files -# You need the textproc/glimpse ports for this. -glimpse: -.if !exists(${.CURDIR}/.glimpse_exclude) - echo .svn > ${.CURDIR}/.glimpse_exclude - echo /compile/ >> ${.CURDIR}/.glimpse_exclude -.endif - cd ${.CURDIR}; glimpseindex -H . -B -f -o . - -glimpse-clean: - cd ${.CURDIR}; rm -f .glimpse_* - -.if !(make(cscope) || make(cscope-clean) || make(cscope-hook) || make(TAGS) || \ -make(glimpse) || make(glimpse-clean)) +.if !(make(cscope) || make(cscope-clean) || make(cscope-hook) || make(TAGS)) .include # The boot loader ___ 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: r318427 - in head: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi
> -Original Message- > From: Konstantin Belousov [mailto:kostik...@gmail.com] > Sent: Monday, May 22, 2017 8:57 AM > To: Stephen McConnell > Cc: src-committ...@freebsd.org; svn-src-all@freebsd.org; svn-src- > h...@freebsd.org > Subject: Re: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr > sys/dev/mpr/mpi > > On Wed, May 17, 2017 at 09:33:37PM +, Stephen McConnell wrote: > > Author: slm > > Date: Wed May 17 21:33:37 2017 > > New Revision: 318427 > > URL: https://svnweb.freebsd.org/changeset/base/318427 > > > > Log: > > Add tri-mode support (SAS/SATA/PCIe). > > > > This includes NVMe device support and adds support for the following > adapters: > > SAS 3408 > > SAS 3416 > > SAS 3508 > > SAS 3516 > > SAS 3616 > > SAS 3708 > > SAS 3716 > > > > Reviewed by:ken, scottl, asomers, mav > > Approved by: ken, scottl, mav > > MFC after: 2 weeks > > Relnotes: yes > > Differential Revision: https://reviews.freebsd.org/D10095 > > It seems that this commit causes the following compilation issue: > > cc1: warnings being treated as errors > /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c: In function > 'mprsas_build_nvme_unm > ap': > /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c:1839: warning: cast to pointer > from integer of different size [-Wint-to-pointer-cast] > --- mpr_sas.o --- > *** [mpr_sas.o] Error code 1 > > at least on powerpc. Thanks. I'll take a look. ___ 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: r318650 - in stable: 10/usr.bin/grep 11/usr.bin/grep
Author: gjb Date: Mon May 22 15:51:17 2017 New Revision: 318650 URL: https://svnweb.freebsd.org/changeset/base/318650 Log: MFC r313955 (emaste): bsdgrep: document ignored option -u MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if running on an UNIX system." The option has no effect on systems that do not use CRLF line endings. PR: 171200 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/grep/grep.1 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/grep/grep.1 Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.bin/grep/grep.1 == --- stable/10/usr.bin/grep/grep.1 Mon May 22 15:29:10 2017 (r318649) +++ stable/10/usr.bin/grep/grep.1 Mon May 22 15:51:17 2017 (r318650) @@ -352,6 +352,8 @@ Nonexistent and unreadable files are ign (i.e. their error messages are suppressed). .It Fl U , Fl Fl binary Search binary files, but do not attempt to print them. +.It Fl u +This option has no effect and is provided only for compatibility with GNU grep. .It Fl V , Fl Fl version Display version information and exit. .It Fl v , Fl Fl invert-match ___ 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: r318650 - in stable: 10/usr.bin/grep 11/usr.bin/grep
Author: gjb Date: Mon May 22 15:51:17 2017 New Revision: 318650 URL: https://svnweb.freebsd.org/changeset/base/318650 Log: MFC r313955 (emaste): bsdgrep: document ignored option -u MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if running on an UNIX system." The option has no effect on systems that do not use CRLF line endings. PR: 171200 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.bin/grep/grep.1 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/grep/grep.1 Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.bin/grep/grep.1 == --- stable/11/usr.bin/grep/grep.1 Mon May 22 15:29:10 2017 (r318649) +++ stable/11/usr.bin/grep/grep.1 Mon May 22 15:51:17 2017 (r318650) @@ -352,6 +352,8 @@ Nonexistent and unreadable files are ign (i.e. their error messages are suppressed). .It Fl U , Fl Fl binary Search binary files, but do not attempt to print them. +.It Fl u +This option has no effect and is provided only for compatibility with GNU grep. .It Fl V , Fl Fl version Display version information and exit. .It Fl v , Fl Fl invert-match ___ 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: r318649 - in head/sys: netinet netinet6
Author: tuexen Date: Mon May 22 15:29:10 2017 New Revision: 318649 URL: https://svnweb.freebsd.org/changeset/base/318649 Log: The connect() system call should return -1 and set errno to EAFNOSUPPORT if it is called on a TCP socket * with an IPv6 address and the socket is bound to an IPv4-mapped IPv6 address. * with an IPv4-mapped IPv6 address and the socket is bound to an IPv6 address. Thanks to Jonathan T. Leighton for reporting this issue. Reviewed by: bz gnn MFC after:3 days Differential Revision:https://reviews.freebsd.org/D9163 Modified: head/sys/netinet/tcp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c == --- head/sys/netinet/tcp_usrreq.c Mon May 22 15:12:49 2017 (r318648) +++ head/sys/netinet/tcp_usrreq.c Mon May 22 15:29:10 2017 (r318649) @@ -597,6 +597,10 @@ tcp6_usr_connect(struct socket *so, stru error = EINVAL; goto out; } + if ((inp->inp_vflag & INP_IPV4) == 0) { + error = EAFNOSUPPORT; + goto out; + } in6_sin6_2_sin(&sin, sin6p); inp->inp_vflag |= INP_IPV4; @@ -614,6 +618,11 @@ tcp6_usr_connect(struct socket *so, stru #endif error = tp->t_fb->tfb_tcp_output(tp); goto out; + } else { + if ((inp->inp_vflag & INP_IPV6) == 0) { + error = EAFNOSUPPORT; + goto out; + } } #endif inp->inp_vflag &= ~INP_IPV4; Modified: head/sys/netinet6/udp6_usrreq.c == --- head/sys/netinet6/udp6_usrreq.c Mon May 22 15:12:49 2017 (r318648) +++ head/sys/netinet6/udp6_usrreq.c Mon May 22 15:29:10 2017 (r318649) @@ -1119,6 +1119,10 @@ udp6_connect(struct socket *so, struct s error = EINVAL; goto out; } + if ((inp->inp_vflag & INP_IPV4) == 0) { + error = EAFNOSUPPORT; + goto out; + } if (inp->inp_faddr.s_addr != INADDR_ANY) { error = EISCONN; goto out; @@ -1136,6 +1140,11 @@ udp6_connect(struct socket *so, struct s if (error == 0) soisconnected(so); goto out; + } else { + if ((inp->inp_vflag & INP_IPV6) == 0) { + error = EAFNOSUPPORT; + goto out; + } } #endif if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { ___ 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: r318648 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: asomers Date: Mon May 22 15:12:49 2017 New Revision: 318648 URL: https://svnweb.freebsd.org/changeset/base/318648 Log: MFC r318189: vdev_geom may associate multiple vdevs per g_consumer vdev_geom.c currently uses the g_consumer's private field to point to a vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For example, when you remove a disk, the vdev's status will change to REMOVED. However, vdev_geom will sometimes attach multiple vdevs to the same GEOM consumer. If this happens, then geom events will only be propagated to one of the vdevs. Fix this by storing a linked list of vdevs in g_consumer's private field. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c * g_consumer.private now stores a linked list of vdev pointers associated with the consumer instead of just a single vdev pointer. * Change vdev_geom_set_physpath's signature to more closely match vdev_geom_set_rotation_rate * Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed that we've already accessed the consumer by the time we get here. * Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it in vdev_geom_open, after we know that the open has succeeded. PR: 218634 Reviewed by: gibbs Sponsored by: Spectra Logic Corp Differential Revision:https://reviews.freebsd.org/D10391 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon May 22 14:46:13 2017(r318647) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon May 22 15:12:49 2017(r318648) @@ -49,6 +49,16 @@ struct g_class zfs_vdev_class = { .attrchanged = vdev_geom_attrchanged, }; +struct consumer_vdev_elem { + SLIST_ENTRY(consumer_vdev_elem) elems; + vdev_t *vd; +}; + +SLIST_HEAD(consumer_priv_t, consumer_vdev_elem); +_Static_assert(sizeof(((struct g_consumer*)NULL)->private) +== sizeof(struct consumer_priv_t*), +"consumer_priv_t* can't be stored in g_consumer.private"); + DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev); SYSCTL_DECL(_vfs_zfs_vdev); @@ -85,21 +95,16 @@ vdev_geom_set_rotation_rate(vdev_t *vd, } static void -vdev_geom_set_physpath(struct g_consumer *cp, boolean_t do_null_update) +vdev_geom_set_physpath(vdev_t *vd, struct g_consumer *cp, + boolean_t do_null_update) { boolean_t needs_update = B_FALSE; - vdev_t *vd; char *physpath; int error, physpath_len; - if (g_access(cp, 1, 0, 0) != 0) - return; - - vd = cp->private; physpath_len = MAXPATHLEN; physpath = g_malloc(physpath_len, M_WAITOK|M_ZERO); error = g_io_getattr("GEOM::physpath", cp, &physpath_len, physpath); - g_access(cp, -1, 0, 0); if (error == 0) { char *old_physpath; @@ -130,37 +135,40 @@ vdev_geom_set_physpath(struct g_consumer static void vdev_geom_attrchanged(struct g_consumer *cp, const char *attr) { - vdev_t *vd; char *old_physpath; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; int error; - vd = cp->private; - if (vd == NULL) + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) return; - if (strcmp(attr, "GEOM::rotation_rate") == 0) { - vdev_geom_set_rotation_rate(vd, cp); - return; - } - - if (strcmp(attr, "GEOM::physpath") == 0) { - vdev_geom_set_physpath(cp, /*do_null_update*/B_TRUE); - return; + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + if (strcmp(attr, "GEOM::rotation_rate") == 0) { + vdev_geom_set_rotation_rate(vd, cp); + return; + } + if (strcmp(attr, "GEOM::physpath") == 0) { + vdev_geom_set_physpath(vd, cp, /*null_update*/B_TRUE); + return; + } } } static void vdev_geom_orphan(struct g_consumer *cp) { - vdev_t *vd; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; g_topology_assert(); - vd = cp->private; - if (vd == NULL) { + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) /* Vdev close in progress. Ignore the event. */ return; - } /* * Orphan callbacks occur from the GEOM event thread. @@ -176,8 +184,12 @@ vdev_geom_orphan(struct g_consumer *cp)
Re: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi
On Wed, May 17, 2017 at 09:33:37PM +, Stephen McConnell wrote: > Author: slm > Date: Wed May 17 21:33:37 2017 > New Revision: 318427 > URL: https://svnweb.freebsd.org/changeset/base/318427 > > Log: > Add tri-mode support (SAS/SATA/PCIe). > > This includes NVMe device support and adds support for the following > adapters: > SAS 3408 > SAS 3416 > SAS 3508 > SAS 3516 > SAS 3616 > SAS 3708 > SAS 3716 > > Reviewed by:ken, scottl, asomers, mav > Approved by:ken, scottl, mav > MFC after: 2 weeks > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D10095 It seems that this commit causes the following compilation issue: cc1: warnings being treated as errors /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c: In function 'mprsas_build_nvme_unm ap': /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c:1839: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] --- mpr_sas.o --- *** [mpr_sas.o] Error code 1 at least on powerpc. ___ 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: r318647 - in head: share/man/man4 sys/conf sys/dev/ena sys/modules sys/modules/ena
Author: zbb Date: Mon May 22 14:46:13 2017 New Revision: 318647 URL: https://svnweb.freebsd.org/changeset/base/318647 Log: Add support for Amazon Elastic Network Adapter (ENA) NIC ENA is a networking interface designed to make good use of modern CPU features and system architectures. The ENA device exposes a lightweight management interface with a minimal set of memory mapped registers and extendable command set through an Admin Queue. The driver supports a range of ENA devices, is link-speed independent (i.e., the same driver is used for 10GbE, 25GbE, 40GbE, etc.), and has a negotiated and extendable feature set. Some ENA devices support SR-IOV. This driver is used for both the SR-IOV Physical Function (PF) and Virtual Function (VF) devices. ENA devices enable high speed and low overhead network traffic processing by providing multiple Tx/Rx queue pairs (the maximum number is advertised by the device via the Admin Queue), a dedicated MSI-X interrupt vector per Tx/Rx queue pair, and CPU cacheline optimized data placement. The ENA driver supports industry standard TCP/IP offload features such as checksum offload and TCP transmit segmentation offload (TSO). Receive-side scaling (RSS) is supported for multi-core scaling. The ENA driver and its corresponding devices implement health monitoring mechanisms such as watchdog, enabling the device and driver to recover in a manner transparent to the application, as well as debug logs. Some of the ENA devices support a working mode called Low-latency Queue (LLQ), which saves several more microseconds. This feature will be implemented for driver in future releases. Submitted by: Michal Krawczyk Jakub Palider Jan Medala Obtained from: Semihalf Sponsored by: Amazon.com Inc. Differential revision: https://reviews.freebsd.org/D10427 Added: head/share/man/man4/ena.4 (contents, props changed) head/sys/dev/ena/ head/sys/dev/ena/ena.c (contents, props changed) head/sys/dev/ena/ena.h (contents, props changed) head/sys/dev/ena/ena_sysctl.c (contents, props changed) head/sys/dev/ena/ena_sysctl.h (contents, props changed) head/sys/modules/ena/ head/sys/modules/ena/Makefile (contents, props changed) Modified: head/sys/conf/files head/sys/modules/Makefile Added: head/share/man/man4/ena.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ena.4 Mon May 22 14:46:13 2017(r318647) @@ -0,0 +1,255 @@ +.\" Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. +.\" 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 COPYRIGHT HOLDERS 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 COPYRIGHT +.\" OWNER 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 May 04, 2017 +.Dt ENA 4 +.Os +.Sh NAME +.Nm ena +.Nd "FreeBSD kernel driver for Elastic Network Adapter (ENA) family" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ena" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ena_load="YES" +.Ed +.Sh DESCRIPTION +The ENA is a networking interface designed to make good use of modern CPU +features and system architectures. +.Pp +The ENA device exposes a lightweight management interface with a +minimal set of memory mapped registers and extendable command set +through an Admin Queue. +.Pp +The driver supports a range of ENA devices, is link-speed independent +(i.e., the same driver is used for 10GbE,
Re: svn commit: r318643 - head/usr.sbin/efivar
On Mon, May 22, 2017 at 8:56 AM, Glen Barber wrote: > Author: gjb > Date: Mon May 22 13:55:59 2017 > New Revision: 318643 > URL: https://svnweb.freebsd.org/changeset/base/318643 > > Log: > Correct the "first appeared in" version for efivar(8). > Hmm, I guess I should have put an MFC note for r318599, then. -Ben ___ 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: r318646 - in head/release: . scripts
Author: gjb Date: Mon May 22 14:21:45 2017 New Revision: 318646 URL: https://svnweb.freebsd.org/changeset/base/318646 Log: Allow PORTSDIR to be overridden in the pkg-stage target. Submitted by: Johannes Jost Meixner (original) PR: 218393 MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile head/release/scripts/pkg-stage.sh Modified: head/release/Makefile == --- head/release/Makefile Mon May 22 14:21:07 2017(r318645) +++ head/release/Makefile Mon May 22 14:21:45 2017(r318646) @@ -270,7 +270,7 @@ packagesystem: base.txz kernel.txz ${EXT pkg-stage: .if !defined(NOPKG) - env REPOS_DIR=${.CURDIR}/pkg_repos/ \ + env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ sh ${.CURDIR}/scripts/pkg-stage.sh mkdir -p ${.OBJDIR}/dvd/packages/repos/ cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ Modified: head/release/scripts/pkg-stage.sh == --- head/release/scripts/pkg-stage.sh Mon May 22 14:21:07 2017 (r318645) +++ head/release/scripts/pkg-stage.sh Mon May 22 14:21:45 2017 (r318646) @@ -10,6 +10,7 @@ export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" +export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES="archivers/unzip devel/subversion @@ -33,8 +34,8 @@ x11/kde4 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). -if [ ! -f /usr/ports/Makefile ]; then - echo "*** /usr/ports is missing!***" +if [ ! -f ${PORTSDIR}/Makefile ]; then + echo "*** ${PORTSDIR} is missing!***" echo "*** Skipping pkg-stage.sh ***" echo "*** Unset NOPORTS to fix this ***" exit 0 @@ -42,7 +43,7 @@ fi if [ ! -x /usr/local/sbin/pkg ]; then /etc/rc.d/ldconfig restart - /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean + /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean fi export DVD_DIR="dvd/packages" @@ -58,7 +59,7 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "/usr/ports/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else echo "*** Skipping nonexistent port: ${_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"
svn commit: r318645 - head/gnu/usr.bin/groff/tmac
Author: gjb Date: Mon May 22 14:21:07 2017 New Revision: 318645 URL: https://svnweb.freebsd.org/changeset/base/318645 Log: Add 11.1 to the mdoc(7) mdoc.local.in. Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/groff/tmac/mdoc.local.in Modified: head/gnu/usr.bin/groff/tmac/mdoc.local.in == --- head/gnu/usr.bin/groff/tmac/mdoc.local.in Mon May 22 13:56:34 2017 (r318644) +++ head/gnu/usr.bin/groff/tmac/mdoc.local.in Mon May 22 14:21:07 2017 (r318645) @@ -65,6 +65,7 @@ .ds doc-operating-system-FreeBSD-10.2 10.2 .ds doc-operating-system-FreeBSD-10.3 10.3 .ds doc-operating-system-FreeBSD-11.0 11.0 +.ds doc-operating-system-FreeBSD-11.1 11.1 .ds doc-operating-system-FreeBSD-12.0 12.0 . .\" Definitions for other *BSDs not (yet) in doc-common ___ 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: r318644 - stable/11/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Mon May 22 13:56:34 2017 New Revision: 318644 URL: https://svnweb.freebsd.org/changeset/base/318644 Log: Document r318576, efivar(8) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:55:59 2017(r318643) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:56:34 2017(r318644) @@ -230,6 +230,10 @@ The &man.daemon.8; utility has been updated to allow redirecting &man.stdout.4; and &man.stderr.4; output to &man.syslog.3; or to a file. + + The + &man.efivar.8; utility has been added, providing an interface + to manage UEFI variables. ___ 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: r318643 - head/usr.sbin/efivar
Author: gjb Date: Mon May 22 13:55:59 2017 New Revision: 318643 URL: https://svnweb.freebsd.org/changeset/base/318643 Log: Correct the "first appeared in" version for efivar(8). MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/efivar/efivar.8 Modified: head/usr.sbin/efivar/efivar.8 == --- head/usr.sbin/efivar/efivar.8 Mon May 22 13:27:31 2017 (r318642) +++ head/usr.sbin/efivar/efivar.8 Mon May 22 13:55:59 2017 (r318643) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 21, 2017 +.Dd May 22, 2017 .Dt EFIVAR 8 .Os .Sh NAME @@ -180,4 +180,4 @@ have the format described in RFC 4122. The .Nm utility first appeared in -.Fx 12.0 . +.Fx 11.1 . ___ 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: r318642 - stable/11/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Mon May 22 13:27:31 2017 New Revision: 318642 URL: https://svnweb.freebsd.org/changeset/base/318642 Log: Document r315514, if_ipsec(4) addition. Submitted by: ae Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:21:28 2017(r318641) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:27:31 2017(r318642) @@ -602,6 +602,12 @@ sponsor="&netgate;">The &man.etherswitch.4; driver has been updated to support RTL8366RB and RTL8366SR cards. + The + &man.if.ipsec.4; virtual tunneling interface has been added, + implementing route-based VPNs protected + with Encapsulating Security Payload + (ESP). + The &man.qlnxe.4; driver has been added, providing support for Cavium® Qlogic™ 45000 Series adapters. ___ 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: r318641 - head/lib/libthr
Author: vangyzen Date: Mon May 22 13:21:28 2017 New Revision: 318641 URL: https://svnweb.freebsd.org/changeset/base/318641 Log: Revert r318583 (libthr: use default WARNS level of 6) Revert this while I fix RISC-V, SPARC, and probably all architectures that use GCC. Reported by: kib Pointy hat to:vangyzen Sponsored by: Dell EMC Modified: head/lib/libthr/Makefile Modified: head/lib/libthr/Makefile == --- head/lib/libthr/MakefileMon May 22 13:15:59 2017(r318640) +++ head/lib/libthr/MakefileMon May 22 13:21:28 2017(r318641) @@ -16,6 +16,7 @@ MK_SSP= no LIB=thr SHLIB_MAJOR= 3 +WARNS?=3 NO_WTHREAD_SAFETY=1 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ ___ 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: r318640 - stable/11/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Mon May 22 13:15:59 2017 New Revision: 318640 URL: https://svnweb.freebsd.org/changeset/base/318640 Log: Fix typo: s/LDD/LLD/ Spotted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:11 2017(r318639) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:15:59 2017(r318640) @@ -176,7 +176,7 @@ /usr/bin/ld if set. - LDD has been enabled by default and + LLD has been enabled by default and installed as /usr/bin/ld on &os;/&arch.arm64;. ___ 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: r318639 - stable/11/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Mon May 22 13:00:11 2017 New Revision: 318639 URL: https://svnweb.freebsd.org/changeset/base/318639 Log: Document r309312, PCI passthrough enabled on Hyper-V VMs. Document r314091, hv_netvsc(4) SR-IOV/VF support. Document r316272, Hyper-V Gen 2 support. Document r317119, Hyper-V synthetic keyboard support. Submitted by: sephe Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:10 2017(r318638) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:11 2017(r318639) @@ -646,6 +646,25 @@ sponsor="&chelsio;">PCI passthrough with &man.bhyve.4; resets functions via FLR when a virtual machine is started and stopped. + + PCI passthrough support has + been enabled on &os; virtual machines running on + Microsoft® Hyper-V™. + + The + &man.hv.netvsc.4; driver SR-IOV + implementation has been updated to support Virtual Function + (VF) devices, such as the Mellanox® + Connect-X3™ network card. + + Support + for Microsoft® Hyper-V™ Generation 2 virtual + machines has been added. + + Support + for synthetic keyboards has been added for virtual machines + running on Microsoft® Hyper-V™. ___ 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: r318638 - stable/11/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Mon May 22 13:00:10 2017 New Revision: 318638 URL: https://svnweb.freebsd.org/changeset/base/318638 Log: Document r318472, LDD enabled by default on arm64. Submitted by: andrew Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 12:35:31 2017(r318637) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:10 2017(r318638) @@ -174,6 +174,11 @@ WITH_LLD_AS_LD build knob has been added, which installs LLD as /usr/bin/ld if set. + + + LDD has been enabled by default and + installed as /usr/bin/ld on + &os;/&arch.arm64;. ___ 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: r318637 - stable/11/sys/arm/include
Author: mmel Date: Mon May 22 12:35:31 2017 New Revision: 318637 URL: https://svnweb.freebsd.org/changeset/base/318637 Log: MFC r318530: Increase maximum text segment size. LLVM binaries are huge... Modified: stable/11/sys/arm/include/vmparam.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/include/vmparam.h == --- stable/11/sys/arm/include/vmparam.h Mon May 22 12:28:20 2017 (r318636) +++ stable/11/sys/arm/include/vmparam.h Mon May 22 12:35:31 2017 (r318637) @@ -42,7 +42,7 @@ * Virtual memory related constants, all in bytes */ #ifndefMAXTSIZ -#defineMAXTSIZ (64UL*1024*1024)/* max text size */ +#defineMAXTSIZ (256UL*1024*1024) /* max text size */ #endif #ifndefDFLDSIZ #defineDFLDSIZ (128UL*1024*1024) /* initial data size limit */ ___ 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: r318636 - stable/11/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Mon May 22 12:28:20 2017 New Revision: 318636 URL: https://svnweb.freebsd.org/changeset/base/318636 Log: Fix typo and grammar. Submitted by: pfg Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 11:45:45 2017(r318635) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 12:28:20 2017(r318636) @@ -384,8 +384,8 @@ clock and choose between absolute and relative mode. The clang - nullability qualifier has been added to the - C library headers. + nullability qualifiers have been added to + the C library headers. Uses of the GNU __nonnull__ attribute have been replaced ___ 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: r318635 - in head/sys: compat/freebsd32 kern
Author: emaste Date: Mon May 22 11:45:45 2017 New Revision: 318635 URL: https://svnweb.freebsd.org/changeset/base/318635 Log: Regen sysent after r318634, no open(2) in capability mode Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cMon May 22 11:43:19 2017(r318634) +++ head/sys/compat/freebsd32/freebsd32_sysent.cMon May 22 11:45:45 2017(r318635) @@ -57,7 +57,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)sys_fork, AUE_FORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 2 = fork */ { AS(read_args), (sy_call_t *)sys_read, AUE_READ, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 3 = read */ { AS(write_args), (sy_call_t *)sys_write, AUE_WRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = write */ - { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 5 = open */ + { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 5 = open */ { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 6 = close */ { AS(freebsd32_wait4_args), (sy_call_t *)freebsd32_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC },/* 7 = freebsd32_wait4 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 8 = obsolete old creat */ Modified: head/sys/kern/init_sysent.c == --- head/sys/kern/init_sysent.c Mon May 22 11:43:19 2017(r318634) +++ head/sys/kern/init_sysent.c Mon May 22 11:45:45 2017(r318635) @@ -50,7 +50,7 @@ struct sysent sysent[] = { { 0, (sy_call_t *)sys_fork, AUE_FORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 2 = fork */ { AS(read_args), (sy_call_t *)sys_read, AUE_READ, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 3 = read */ { AS(write_args), (sy_call_t *)sys_write, AUE_WRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = write */ - { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 5 = open */ + { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 5 = open */ { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 6 = close */ { AS(wait4_args), (sy_call_t *)sys_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC },/* 7 = wait4 */ { compat(AS(ocreat_args),creat), AUE_CREAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 8 = old creat */ ___ 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: r318634 - in head/sys: compat/freebsd32 kern
Author: emaste Date: Mon May 22 11:43:19 2017 New Revision: 318634 URL: https://svnweb.freebsd.org/changeset/base/318634 Log: disallow open(2) in capability mode Previously open(2) was allowed in capability mode, with a comment that suggested this was likely the case to facilitate debugging. The system call would still fail later on, but it's better to disallow the syscall altogether. We now have the kern.trap_enotcap sysctl or PROC_TRAPCAP_CTL proccontrol to aid in debugging. In any case libc has translated open() to the openat syscall since r277032. Reviewed by: kib, rwatson Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D10850 Modified: head/sys/compat/freebsd32/capabilities.conf head/sys/kern/capabilities.conf Modified: head/sys/compat/freebsd32/capabilities.conf == --- head/sys/compat/freebsd32/capabilities.conf Mon May 22 11:41:17 2017 (r318633) +++ head/sys/compat/freebsd32/capabilities.conf Mon May 22 11:43:19 2017 (r318634) @@ -188,7 +188,6 @@ renameat symlinkat unlinkat freebsd32_utimensat -open pdfork pdgetpid pdkill Modified: head/sys/kern/capabilities.conf == --- head/sys/kern/capabilities.conf Mon May 22 11:41:17 2017 (r318633) +++ head/sys/kern/capabilities.conf Mon May 22 11:43:19 2017 (r318634) @@ -460,14 +460,6 @@ unlinkat utimensat ## -## Allow entry into open(2). This system call will fail, since access to the -## global file namespace has been disallowed, but allowing entry into the -## syscall means that an audit trail will be generated (which is also very -## useful for debugging). -## -open - -## ## Process descriptor-related system calls are allowed. ## pdfork ___ 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: r318633 - head/usr.sbin/bsdinstall/scripts
Author: royger Date: Mon May 22 11:41:17 2017 New Revision: 318633 URL: https://svnweb.freebsd.org/changeset/base/318633 Log: bsdinstall: do not use distextract in scripted mode It requires a tty, which might not be available in scripted installs. Instead extract the sets manually using tar. Reviewed by: tsoome Sponsored by: Citrix Systems R&D MFC after:1 week Differential revision:https://reviews.freebsd.org/D10736 Modified: head/usr.sbin/bsdinstall/scripts/script Modified: head/usr.sbin/bsdinstall/scripts/script == --- head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:38:39 2017 (r318632) +++ head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:41:17 2017 (r318633) @@ -114,7 +114,10 @@ fi # Unpack distributions bsdinstall checksum -bsdinstall distextract +for set in $DISTRIBUTIONS; do + f_dprintf "Extracting $BSDINSTALL_DISTDIR/$set" + tar -xf "$BSDINSTALL_DISTDIR/$set" -C $BSDINSTALL_CHROOT +done # Finalize install bsdinstall config ___ 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: r318632 - head/usr.sbin/bsdinstall/scripts
Author: royger Date: Mon May 22 11:38:39 2017 New Revision: 318632 URL: https://svnweb.freebsd.org/changeset/base/318632 Log: bsdinstall: mount is not needed for the ZFS install case Because the datasets are already mounted by zfsboot, and the mount script doesn't know anything about ZFS. Also do not execute the "umount" script for ZFS for the same reasons. Reviewed by: dteske, tsoome Sponsored by: Citrix Systems R&D MFC after:1 week Differential revision:https://reviews.freebsd.org/D10738 Modified: head/usr.sbin/bsdinstall/scripts/script Modified: head/usr.sbin/bsdinstall/scripts/script == --- head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:33:44 2017 (r318631) +++ head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:38:39 2017 (r318632) @@ -42,6 +42,11 @@ f_include $BSDCFG_SHARE/variable.subr # DISTRIBUTIONS # BSDINSTALL_DISTDIR +# +# Default name of the ZFS boot-pool +# +: ${ZFSBOOT_POOL_NAME:=zroot} + GLOBALS # @@ -53,8 +58,6 @@ msg_installation_error="Installation Err error() { - [ -f "$PATH_FSTAB" ] && bsdinstall umount - local file f_getvar "$VAR_DEBUG_FILE#+" file if [ "$file" ]; then @@ -63,6 +66,13 @@ error() # No need to restore title, pining for the fjords fi + [ -f "$PATH_FSTAB" ] || exit + if [ "$ZFSBOOT_DISKS" ]; then + zpool export $ZFSBOOT_POOL_NAME + else + bsdinstall umount + fi + exit 1 } @@ -99,8 +109,8 @@ if [ "$ZFSBOOT_DISKS" ]; then bsdinstall zfsboot else bsdinstall scriptedpart "$PARTITIONS" + bsdinstall mount fi -bsdinstall mount # Unpack distributions bsdinstall checksum @@ -125,7 +135,11 @@ if [ -f /tmp/bsdinstall-installscript-ab fi bsdinstall entropy -bsdinstall umount +if [ "$ZFSBOOT_DISKS" ]; then + zpool export $ZFSBOOT_POOL_NAME +else + bsdinstall umount +fi f_dprintf "Installation Completed at %s" "$( date )" ___ 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: r318631 - head/sys/dev/xen/netfront
Author: royger Date: Mon May 22 11:33:44 2017 New Revision: 318631 URL: https://svnweb.freebsd.org/changeset/base/318631 Log: xen/netfront: don't drop the RX lock in xn_rxeof Since netfront uses different locks for the RX and TX paths there's no need to drop the RX lock before calling if_input. Suggested by: jhb Tested by:cperciva Sponsored by: Citrix Systems R&D MFC with: r318523 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c == --- head/sys/dev/xen/netfront/netfront.cMon May 22 10:28:17 2017 (r318630) +++ head/sys/dev/xen/netfront/netfront.cMon May 22 11:33:44 2017 (r318631) @@ -1224,7 +1224,6 @@ xn_rxeof(struct netfront_rxq *rxq) RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); } while (work_to_do); - XN_RX_UNLOCK(rxq); mbufq_drain(&mbufq_errq); /* * Process all the mbufs after the remapping is complete. @@ -1253,7 +1252,6 @@ xn_rxeof(struct netfront_rxq *rxq) */ tcp_lro_flush_all(lro); #endif - XN_RX_LOCK(rxq); } static void ___ 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: r318630 - stable/11/sbin/dhclient
Author: n_hibma Date: Mon May 22 10:28:17 2017 New Revision: 318630 URL: https://svnweb.freebsd.org/changeset/base/318630 Log: MFC: r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines Fix the output of very large rebind, renew and lease time options in lease file. Some routers set very large values for rebind time (Netgear) and these are erroneously reported as negative in the leasefile. This was due to a wrong printf format specification of %ld for an unsigned long on 32-bit platforms. r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines Fix handling of large DHCP expiry values. They would overflow a signed 32-bit time_t on 32 bit architectures. This was taken care of, but a compiler optimisation makes this behave erratically. This could be resolved by adding a -fwrapv flag, but instead we can check the value before adding the current timestamp to it. In the lease file values are still wrong though: option dhcp-rebinding-time -644245096; PR: 218980 Modified: stable/11/sbin/dhclient/dhclient.c stable/11/sbin/dhclient/options.c Modified: stable/11/sbin/dhclient/dhclient.c == --- stable/11/sbin/dhclient/dhclient.c Mon May 22 08:20:50 2017 (r318629) +++ stable/11/sbin/dhclient/dhclient.c Mon May 22 10:28:17 2017 (r318630) @@ -107,7 +107,11 @@ struct pidfh *pidfile; */ #define ASSERT_STATE(state_is, state_shouldbe) {} -#define TIME_MAX 2147483647 +/* + * We need to check that the expiry, renewal and rebind times are not beyond + * the end of time (~2038 when a 32-bit time_t is being used). + */ +#define TIME_MAXtime_t) 1 << (sizeof(time_t) * CHAR_BIT - 2)) - 1) * 2 + 1) intlog_priority; intno_daemon; @@ -762,15 +766,17 @@ dhcpack(struct packet *packet) else ip->client->new->expiry = default_lease_time; /* A number that looks negative here is really just very large, - because the lease expiry offset is unsigned. */ - if (ip->client->new->expiry < 0) - ip->client->new->expiry = TIME_MAX; + because the lease expiry offset is unsigned. Also make sure that + the addition of cur_time below does not overflow (a 32 bit) time_t. */ + if (ip->client->new->expiry < 0 || +ip->client->new->expiry > TIME_MAX - cur_time) + ip->client->new->expiry = TIME_MAX - cur_time; /* XXX should be fixed by resetting the client state */ if (ip->client->new->expiry < 60) ip->client->new->expiry = 60; /* Unless overridden in the config, take the server-provided renewal - * time if there is one; otherwise figure it out according to the spec. + * time if there is one. Otherwise figure it out according to the spec. * Also make sure the renewal time does not exceed the expiry time. */ if (ip->client->config->default_actions[DHO_DHCP_RENEWAL_TIME] == @@ -782,7 +788,8 @@ dhcpack(struct packet *packet) ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data); else ip->client->new->renewal = ip->client->new->expiry / 2; -if (ip->client->new->renewal > ip->client->new->expiry / 2) +if (ip->client->new->renewal < 0 || +ip->client->new->renewal > ip->client->new->expiry / 2) ip->client->new->renewal = ip->client->new->expiry / 2; /* Same deal with the rebind time. */ @@ -794,20 +801,15 @@ dhcpack(struct packet *packet) ip->client->new->rebind = getULong( ip->client->new->options[DHO_DHCP_REBINDING_TIME].data); else - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; -if (ip->client->new->rebind > ip->client->new->renewal * 7 / 4) -ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - - ip->client->new->expiry += cur_time; - /* Lease lengths can never be negative. */ - if (ip->client->new->expiry < cur_time) - ip->client->new->expiry = TIME_MAX; - ip->client->new->renewal += cur_time; - if (ip->client->new->renewal < cur_time) - ip->client->new->renewal = TIME_MAX; - ip->client->new->rebind += cur_time; - if (ip->client->new->rebind < cur_time) - ip->client->new->rebind = TIME_MAX; + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + if (ip->client->new->rebind < 0 || +ip->client->new->rebind > ip->client->new->re
svn commit: r318629 - stable/9/sys/ofed/drivers/net/mlx4
Author: hselasky Date: Mon May 22 08:20:50 2017 New Revision: 318629 URL: https://svnweb.freebsd.org/changeset/base/318629 Log: MFC r318531: mlx4: Use the CQ quota for SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the firmware). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the firmware total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/eq.c stable/9/sys/ofed/drivers/net/mlx4/main.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/eq.c == --- stable/9/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:19:08 2017 (r318628) +++ stable/9/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:20:50 2017 (r318629) @@ -1169,8 +1169,7 @@ int mlx4_init_eq_table(struct mlx4_dev * } for (i = 0; i < dev->caps.num_comp_vectors; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); @@ -1190,8 +1189,7 @@ int mlx4_init_eq_table(struct mlx4_dev * for (i = dev->caps.num_comp_vectors + 1; i < dev->caps.num_comp_vectors + dev->caps.comp_pool + 1; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c == --- stable/9/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:19:08 2017 (r318628) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:20:50 2017 (r318629) @@ -3448,6 +3448,8 @@ slave_start: goto err_free_eq; } + mlx4_init_quotas(dev); + err = mlx4_setup_hca(dev); if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && !mlx4_is_mfunc(dev)) { @@ -3461,7 +3463,6 @@ slave_start: if (err) goto err_steer; - mlx4_init_quotas(dev); mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { ___ 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: r318628 - stable/10/sys/ofed/drivers/net/mlx4
Author: hselasky Date: Mon May 22 08:19:08 2017 New Revision: 318628 URL: https://svnweb.freebsd.org/changeset/base/318628 Log: MFC r318531: mlx4: Use the CQ quota for SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the firmware). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the firmware total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c stable/10/sys/ofed/drivers/net/mlx4/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c == --- stable/10/sys/ofed/drivers/net/mlx4/eq.cMon May 22 08:17:07 2017 (r318627) +++ stable/10/sys/ofed/drivers/net/mlx4/eq.cMon May 22 08:19:08 2017 (r318628) @@ -1169,8 +1169,7 @@ int mlx4_init_eq_table(struct mlx4_dev * } for (i = 0; i < dev->caps.num_comp_vectors; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); @@ -1190,8 +1189,7 @@ int mlx4_init_eq_table(struct mlx4_dev * for (i = dev->caps.num_comp_vectors + 1; i < dev->caps.num_comp_vectors + dev->caps.comp_pool + 1; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c == --- stable/10/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:17:07 2017 (r318627) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:19:08 2017 (r318628) @@ -3448,6 +3448,8 @@ slave_start: goto err_free_eq; } + mlx4_init_quotas(dev); + err = mlx4_setup_hca(dev); if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && !mlx4_is_mfunc(dev)) { @@ -3461,7 +3463,6 @@ slave_start: if (err) goto err_steer; - mlx4_init_quotas(dev); mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { ___ 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: r318627 - stable/11/sys/ofed/drivers/net/mlx4
Author: hselasky Date: Mon May 22 08:17:07 2017 New Revision: 318627 URL: https://svnweb.freebsd.org/changeset/base/318627 Log: MFC r318531: mlx4: Use the CQ quota for SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the firmware). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the firmware total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c stable/11/sys/ofed/drivers/net/mlx4/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c == --- stable/11/sys/ofed/drivers/net/mlx4/eq.cMon May 22 06:29:20 2017 (r318626) +++ stable/11/sys/ofed/drivers/net/mlx4/eq.cMon May 22 08:17:07 2017 (r318627) @@ -1169,8 +1169,7 @@ int mlx4_init_eq_table(struct mlx4_dev * } for (i = 0; i < dev->caps.num_comp_vectors; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); @@ -1190,8 +1189,7 @@ int mlx4_init_eq_table(struct mlx4_dev * for (i = dev->caps.num_comp_vectors + 1; i < dev->caps.num_comp_vectors + dev->caps.comp_pool + 1; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); Modified: stable/11/sys/ofed/drivers/net/mlx4/main.c == --- stable/11/sys/ofed/drivers/net/mlx4/main.c Mon May 22 06:29:20 2017 (r318626) +++ stable/11/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:17:07 2017 (r318627) @@ -3446,6 +3446,8 @@ slave_start: goto err_free_eq; } + mlx4_init_quotas(dev); + err = mlx4_setup_hca(dev); if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && !mlx4_is_mfunc(dev)) { @@ -3459,7 +3461,6 @@ slave_start: if (err) goto err_steer; - mlx4_init_quotas(dev); mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { ___ 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"