Re: svn commit: r283526 - in head: . contrib/llvm/include/llvm/Target contrib/llvm/lib/Analysis contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/ExecutionEngine/RuntimeD
On Sun, 11 Oct 2015 01:40:46 +0200 Dimitry Andric wrote: > On 10 Oct 2015, at 23:32, Ivan Klymenko wrote: > > On Mon, 25 May 2015 13:43:03 + (UTC) > > Dimitry Andric wrote: > > > >> Author: dim > >> Date: Mon May 25 13:43:03 2015 > >> New Revision: 283526 > >> URL: https://svnweb.freebsd.org/changeset/base/283526 > >> > >> Log: > >> Upgrade our copy of clang and llvm to 3.6.1 release. > > This is some time ago already, you probably meant the upgrade to > 3.7.0? :-) > Oops. Yes :) sorry. > > > Cannot emit physreg copy instruction > > UNREACHABLE executed > > at > > /usr/src/lib/clang/libllvmx86codegen/../../../contrib/llvm/lib/Target/X86/X86InstrInfo.cpp:3935! > > cc: error: unable to execute command: Abort trap cc: error: clang > > frontend command failed due to signal (use -v to see invocation) > > FreeBSD clang version 3.7.0 (tags/RELEASE_370/final 246257) > > 20150906 Target: x86_64-unknown-freebsd11.0 Thread model: posix > > cc: note: diagnostic msg: PLEASE submit a bug report to > > https://bugs.freebsd.org/submit/ and include the crash backtrace, > > preprocessed source, and associated run script. cc: note: > > diagnostic msg: > > > > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > > Preprocessed source(s) and associated run script(s) are located at: > > cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.c > > cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.sh > > Yes, this error has already been reported; please see the thread > starting here: > > https://lists.freebsd.org/pipermail/freebsd-current/2015-October/057701.html > Thanks! > It has been submitted as an upstream bug, and a fix is being worked > on. For now, you can work around it by unsetting CPUTYPE. > > -Dimitry > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289136 - head/sys/cam/ctl
Author: mav Date: Sun Oct 11 08:28:49 2015 New Revision: 289136 URL: https://svnweb.freebsd.org/changeset/base/289136 Log: Remove lock upgrade attempt from ctl_be_block_open_file(). I am not sure what for it was done. Now open routine should automatically fall back to read-only if open for writing is impossible. In such case attempt to upgrade to write sounds strange. MFC after:1 week Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c == --- head/sys/cam/ctl/ctl_backend_block.cSun Oct 11 08:28:36 2015 (r289135) +++ head/sys/cam/ctl/ctl_backend_block.cSun Oct 11 08:28:49 2015 (r289136) @@ -1840,21 +1840,6 @@ ctl_be_block_open_file(struct ctl_be_blo return (error); } - /* -* Verify that we have the ability to upgrade to exclusive -* access on this file so we can trap errors at open instead -* of reporting them during first access. -*/ - if (VOP_ISLOCKED(be_lun->vn) != LK_EXCLUSIVE) { - vn_lock(be_lun->vn, LK_UPGRADE | LK_RETRY); - if (be_lun->vn->v_iflag & VI_DOOMED) { - error = EBADF; - snprintf(req->error_str, sizeof(req->error_str), -"error locking file %s", be_lun->dev_path); - return (error); - } - } - file_data->cred = crhold(curthread->td_ucred); if (params->lun_size_bytes != 0) be_lun->size_bytes = params->lun_size_bytes; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289137 - in head: . sbin/geom/class/raid share/man/man4 sys/amd64/conf sys/arm/conf sys/cam sys/cam/ata sys/conf sys/geom sys/geom/raid sys/i386/conf sys/mips/conf sys/pc98/conf
Author: mav Date: Sun Oct 11 13:01:51 2015 New Revision: 289137 URL: https://svnweb.freebsd.org/changeset/base/289137 Log: Remove compatibility shims for legacy ATA device names. We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely removed old stack at 10.x, so at 11.x it is time to remove compat shims. Modified: head/UPDATING head/sbin/geom/class/raid/graid.8 head/share/man/man4/ada.4 head/sys/amd64/conf/GENERIC head/sys/arm/conf/A20 head/sys/arm/conf/ALPINE head/sys/arm/conf/CRB head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EP80219 head/sys/arm/conf/IMX53 head/sys/arm/conf/IQ31244 head/sys/cam/ata/ata_da.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h head/sys/conf/NOTES head/sys/geom/geom_dev.c head/sys/geom/raid/g_raid.c head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/mips/conf/OCTEON1 head/sys/mips/conf/std.SWARM head/sys/pc98/conf/GENERIC Modified: head/UPDATING == --- head/UPDATING Sun Oct 11 08:28:49 2015(r289136) +++ head/UPDATING Sun Oct 11 13:01:51 2015(r289137) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151011: + Compatibility shims for legacy ATA device names have been removed. + It includes ATA_STATIC_ID kernel option, kern.cam.ada.legacy_aliases + and kern.geom.raid.legacy_aliases loader tunables, kern.devalias.* + environment variables, /dev/ad* and /dev/ar* symbolic links. + 20151006: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.7.0. Please see the 20141231 entry below for information about prerequisites Modified: head/sbin/geom/class/raid/graid.8 == --- head/sbin/geom/class/raid/graid.8 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sbin/geom/class/raid/graid.8 Sun Oct 11 13:01:51 2015 (r289137) @@ -304,9 +304,6 @@ Write errors are always considered as di Time to wait for missing array components on startup. .It Va kern.geom.raid. Ns Ar X Ns Va .enable : No 1 Enable taste for specific metadata or transformation module. -.It Va kern.geom.raid.legacy_aliases : No 0 -Enable geom raid emulation of legacy /dev/ar%d devices. -This should aid the upgrade of systems from legacy to modern releases. .El .Sh EXIT STATUS Exit status is 0 on success, and non-zero if the command fails. Modified: head/share/man/man4/ada.4 == --- head/share/man/man4/ada.4 Sun Oct 11 08:28:49 2015(r289136) +++ head/share/man/man4/ada.4 Sun Oct 11 13:01:51 2015(r289137) @@ -146,16 +146,6 @@ instead of .Pa /etc/sysctl.conf . The global default is currently 1. The per-device default is to leave it as-is (follow global setting). -.It Va kern.cam.ada.legacy_aliases -.Pp -This variable determines whether -.Pa /dev/ad Ns Ar Y -symbolic links are created, -which tries to mimic old -.Xr ata 4 -numbering. -Set to 1 to enable legacy aliases symlinks, 0 to disable. -The default is currently enabled. .El .Sh FILES .Bl -tag -width ".Pa /dev/ada*" -compact Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Sun Oct 11 08:28:49 2015(r289136) +++ head/sys/amd64/conf/GENERIC Sun Oct 11 13:01:51 2015(r289137) @@ -109,7 +109,6 @@ device fdc # ATA controllers device ahci# AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -optionsATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis# SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/arm/conf/A20 == --- head/sys/arm/conf/A20 Sun Oct 11 08:28:49 2015(r289136) +++ head/sys/arm/conf/A20 Sun Oct 11 13:01:51 2015(r289137) @@ -62,7 +62,6 @@ devicemmcsd # mmc/sd flash cards # ATA controllers device ahci# AHCI-compatible SATA controllers #deviceata # Legacy ATA/SATA controllers -#options ATA_STATIC_ID # Static device numbering # Console and misc device uart Modified: head/sys/arm/conf/ALPINE == --- head/sys/arm/conf/ALPINESun Oct 11 08:28:49 2015(r289136) +++ head/sys/arm/conf/ALPI
svn commit: r289138 - in head/sys/cam: ata scsi
Author: mav Date: Sun Oct 11 13:48:20 2015 New Revision: 289138 URL: https://svnweb.freebsd.org/changeset/base/289138 Log: Remove legacy CHS geometry from dmesg and unify capacity outputs. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c == --- head/sys/cam/ata/ata_da.c Sun Oct 11 13:01:51 2015(r289137) +++ head/sys/cam/ata/ata_da.c Sun Oct 11 13:48:20 2015(r289138) @@ -1345,12 +1345,9 @@ adaregister(struct cam_periph *periph, v dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), - "%juMB (%ju %u byte sectors: %dH %dS/T %dC)", - (uintmax_t)(((uintmax_t)dp->secsize * - dp->sectors) / (1024*1024)), - (uintmax_t)dp->sectors, - dp->secsize, dp->heads, - dp->secs_per_track, dp->cylinders); + "%juMB (%ju %u byte sectors)", + ((uintmax_t)dp->secsize * dp->sectors) / (1024 * 1024), + (uintmax_t)dp->sectors, dp->secsize); xpt_announce_periph(periph, announce_buf); xpt_announce_quirks(periph, softc->quirks, ADA_Q_BIT_STRING); Modified: head/sys/cam/scsi/scsi_cd.c == --- head/sys/cam/scsi/scsi_cd.c Sun Oct 11 13:01:51 2015(r289137) +++ head/sys/cam/scsi/scsi_cd.c Sun Oct 11 13:48:20 2015(r289138) @@ -1081,11 +1081,11 @@ cddone(struct cam_periph *periph, union if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP || (error = cderror(done_ccb, CAM_RETRY_SELTO, SF_RETRY_UA | SF_NO_PRINT)) == 0) { - snprintf(announce_buf, sizeof(announce_buf), - "cd present [%lu x %lu byte records]", - cdp->disksize, (u_long)cdp->blksize); - + "%juMB (%ju %u byte sectors)", + ((uintmax_t)cdp->disksize * cdp->blksize) / +(1024 * 1024), + (uintmax_t)cdp->disksize, cdp->blksize); } else { if (error == ERESTART) { /* Modified: head/sys/cam/scsi/scsi_da.c == --- head/sys/cam/scsi/scsi_da.c Sun Oct 11 13:01:51 2015(r289137) +++ head/sys/cam/scsi/scsi_da.c Sun Oct 11 13:48:20 2015(r289138) @@ -3149,13 +3149,10 @@ dadone(struct cam_periph *periph, union lbp = (lalba & SRC16_LBPME_A); dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), - "%juMB (%ju %u byte sectors: %dH %dS/T " -"%dC)", (uintmax_t) - (((uintmax_t)dp->secsize * - dp->sectors) / (1024*1024)), - (uintmax_t)dp->sectors, - dp->secsize, dp->heads, -dp->secs_per_track, dp->cylinders); + "%juMB (%ju %u byte sectors)", + ((uintmax_t)dp->secsize * dp->sectors) / +(1024 * 1024), + (uintmax_t)dp->sectors, dp->secsize); } } else { int error; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289137 - in head: . sbin/geom/class/raid share/man/man4 sys/amd64/conf sys/arm/conf sys/cam sys/cam/ata sys/conf sys/geom sys/geom/raid sys/i386/conf sys/mips/conf sys/pc98/conf
> On Oct 11, 2015, at 06:01, Alexander Motin wrote: > > Author: mav > Date: Sun Oct 11 13:01:51 2015 > New Revision: 289137 > URL: https://svnweb.freebsd.org/changeset/base/289137 > > Log: > Remove compatibility shims for legacy ATA device names. > > We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely > removed old stack at 10.x, so at 11.x it is time to remove compat shims. Relnotes: yes! ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289144 - head/contrib/dma
Author: bapt Date: Sun Oct 11 17:45:20 2015 New Revision: 289144 URL: https://svnweb.freebsd.org/changeset/base/289144 Log: Fix build with gcc 4.2 Modified: head/contrib/dma/conf.c head/contrib/dma/dma.c head/contrib/dma/mail.c Modified: head/contrib/dma/conf.c == --- head/contrib/dma/conf.c Sun Oct 11 17:37:21 2015(r289143) +++ head/contrib/dma/conf.c Sun Oct 11 17:45:20 2015(r289144) @@ -121,7 +121,7 @@ parse_authfile(const char *path) au = calloc(1, sizeof(*au)); if (au == NULL) - errlog(EX_OSERR, NULL); + errlog(EX_OSERR, "calloc()"); data = strdup(line); au->login = strsep(&data, "|"); Modified: head/contrib/dma/dma.c == --- head/contrib/dma/dma.c Sun Oct 11 17:37:21 2015(r289143) +++ head/contrib/dma/dma.c Sun Oct 11 17:45:20 2015(r289144) @@ -596,7 +596,7 @@ skipopts: errlog(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases); if ((sender = set_from(&queue, sender)) == NULL) - errlog(EX_SOFTWARE, NULL); + errlog(EX_SOFTWARE, "set_from()"); if (newspoolf(&queue) != 0) errlog(EX_CANTCREAT, "can not create temp file in `%s'", config.spooldir); Modified: head/contrib/dma/mail.c == --- head/contrib/dma/mail.c Sun Oct 11 17:37:21 2015(r289143) +++ head/contrib/dma/mail.c Sun Oct 11 17:45:20 2015(r289144) @@ -333,7 +333,7 @@ newaddr: ps->pos = 0; addr = strdup(ps->addr); if (addr == NULL) - errlog(EX_SOFTWARE, NULL); + errlog(EX_SOFTWARE, "strdup"); if (add_recp(queue, addr, EXPAND_WILDCARD) != 0) errlogx(EX_DATAERR, "invalid recipient `%s'", addr); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289146 - in head: share/man/man4 sys/cam/scsi
Author: mav Date: Sun Oct 11 18:26:06 2015 New Revision: 289146 URL: https://svnweb.freebsd.org/changeset/base/289146 Log: Make delete method set via kern.cam.da.X.delete_method persistent. This allows to set delete method via tunable, before device capabilities are known. Also allow ZERO method for devices not reporting LBP, if user explicitly requests it -- it may be useful if storage supports compression and WRITE SAME, but does not support UNMAP. MFC after:2 weeks Modified: head/share/man/man4/da.4 head/sys/cam/scsi/scsi_da.c Modified: head/share/man/man4/da.4 == --- head/share/man/man4/da.4Sun Oct 11 17:59:20 2015(r289145) +++ head/share/man/man4/da.4Sun Oct 11 18:26:06 2015(r289146) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 22, 2014 +.Dd October 11, 2015 .Dt DA 4 .Os .Sh NAME @@ -133,8 +133,7 @@ variables and .Xr loader 8 tunables: .Bl -tag -width 12 -.It kern.cam.da.retry_count -.Pp +.It Va kern.cam.da.retry_count This variable determines how many times the .Nm driver will retry a READ or WRITE command. @@ -143,8 +142,7 @@ the .Nm driver dump routine. This value currently defaults to 4. -.It kern.cam.da.default_timeout -.Pp +.It Va kern.cam.da.default_timeout This variable determines how long the .Nm driver will wait before timing out an outstanding command. @@ -152,20 +150,31 @@ The units for this value are seconds, an seconds. .It Va kern.cam.sort_io_queue .It Va kern.cam.da. Ns Ar X Ns Va .sort_io_queue -.Pp These variables determine whether request queue should be sorted trying to optimize head seeks. Set to 1 to enable sorting, 0 to disable, -1 to leave it as-is. The default is sorting enabled for HDDs and disabled for SSDs. -.It kern.cam.da.%d.minimum_cmd_size -.Pp +.It Va kern.cam.da. Ns Ar X Ns Va .delete_method +This variable specifies method to handle BIO_DELETE requests: +.Bl -tag +.It ATA_TRIM +ATA TRIM via ATA COMMAND PASS THROUGH command, +.It UNMAP +UNMAP command, +.It WS16 +WRITE SAME(16) command with UNMAP flag, +.It WS10 +WRITE SAME(10) command with UNMAP flag, +.It ZERO +WRITE SAME(10) command without UNMAP flag, +.It DISABLE +disable BIO_DELETE support. +.El +.It Va kern.cam.da. Ns Ar X Ns Va .minimum_cmd_size This variable determines what the minimum READ/WRITE CDB size is for a given .Nm unit. -(The %d above denotes the unit number of the -.Nm -driver instance, e.g.\& 1, 2, 4, 8, etc.) Valid minimum command size values are 6, 10, 12 and 16 bytes. The default is 6 bytes. .Pp Modified: head/sys/cam/scsi/scsi_da.c == --- head/sys/cam/scsi/scsi_da.c Sun Oct 11 17:59:20 2015(r289145) +++ head/sys/cam/scsi/scsi_da.c Sun Oct 11 18:26:06 2015(r289146) @@ -219,6 +219,7 @@ struct da_softc { uint32_tunmap_max_ranges; uint32_tunmap_max_lba; /* Max LBAs in UNMAP req */ uint64_tws_max_blks; + da_delete_methods delete_method_pref; da_delete_methods delete_method; da_delete_func_t*delete_func; struct disk_params params; @@ -1801,7 +1802,7 @@ dasysctlinit(void *context, int pending) * the fly. */ SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RW, + OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RWTUN, softc, 0, dadeletemethodsysctl, "A", "BIO_DELETE execution method"); SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), @@ -1912,7 +1913,6 @@ static void dadeletemethodset(struct da_softc *softc, da_delete_methods delete_method) { - softc->delete_method = delete_method; softc->disk->d_delmaxsize = dadeletemaxsize(softc, delete_method); softc->delete_func = da_delete_functions[delete_method]; @@ -1965,25 +1965,17 @@ daprobedone(struct cam_periph *periph, u snprintf(buf, sizeof(buf), "Delete methods: <"); sep = 0; - for (i = DA_DELETE_MIN; i <= DA_DELETE_MAX; i++) { - if (softc->delete_available & (1 << i)) { - if (sep) { - strlcat(buf, ",", sizeof(buf)); - } else { - sep = 1; - } - strlcat(buf, da_delete_method_names[i], - sizeof(buf)); - if (i == softc->delete_method) { - strlcat(buf, "(*)", sizeof(buf)); - } - } - } - if (sep == 0) { -
svn commit: r289147 - head/sys/mips/conf
Author: sbruno Date: Sun Oct 11 18:37:29 2015 New Revision: 289147 URL: https://svnweb.freebsd.org/changeset/base/289147 Log: Correct flash layout (this is a 4M flash unit). Remove "rootfs" entry and assign the 800K or so to the kernel partition as this unit boots from usb mass storage. Modified: head/sys/mips/conf/TP-MR3020.hints Modified: head/sys/mips/conf/TP-MR3020.hints == --- head/sys/mips/conf/TP-MR3020.hints Sun Oct 11 18:26:06 2015 (r289146) +++ head/sys/mips/conf/TP-MR3020.hints Sun Oct 11 18:37:29 2015 (r289147) @@ -8,7 +8,7 @@ hint.argemdio.0.at="nexus0" hint.argemdio.0.maddr=0x1a00 hint.argemdio.0.msize=0x1000 hint.argemdio.0.order=0 - + # There's no need to set the ar933x GMAC configuration bits. # This just creates a switch instance and correctly uses it. @@ -39,7 +39,7 @@ hint.ath.0.eepromsize=16384 hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00 -# The board 16MiB flash layout in uboot env: +# The board 4MiB flash layout in uboot env: # # 256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART) @@ -58,35 +58,28 @@ hint.map.1.at="flash/spi0" hint.map.1.start=0x0004 hint.map.1.end=0x0005 hint.map.1.name="uboot-env" -hint.map.1.readonly=0 +hint.map.1.readonly=1 -# 2752KB +# 3648KB hint.map.2.at="flash/spi0" hint.map.2.start=0x0005 -hint.map.2.end="search:0x0010:0x1:.!/bin/sh" +hint.map.2.end=0x003e hint.map.2.name="kernel" -hint.map.2.readonly=0 +hint.map.2.readonly=1 -# 896KB +# 64K NVRAM hint.map.3.at="flash/spi0" -hint.map.3.start="search:0x0010:0x1:.!/bin/sh" -hint.map.3.end=0x003e -hint.map.3.name="rootfs" +hint.map.3.start=0x003e +hint.map.3.end=0x003f +hint.map.3.name="cfg" hint.map.3.readonly=0 -# 64K NVRAM -hint.map.4.at="flash/spi0" -hint.map.4.start=0x003e -hint.map.4.end=0x003f -hint.map.4.name="cfg" -hint.map.4.readonly=0 - # 64K ART -hint.map.5.at="flash/spi0" -hint.map.5.start=0x003f -hint.map.5.end=0x0040 -hint.map.5.name="art" -hint.map.5.readonly=1 +hint.map.4.at="flash/spi0" +hint.map.4.start=0x003f +hint.map.4.end=0x0040 +hint.map.4.name="art" +hint.map.4.readonly=1 # GPIO specific configuration block ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289114 - in head: libexec/dma/dmagent share/mk usr.sbin/ppp
Baptiste Daroussin writes: > Modified: head/share/mk/bsd.own.mk > == > --- head/share/mk/bsd.own.mk Sat Oct 10 09:37:31 2015(r289113) > +++ head/share/mk/bsd.own.mk Sat Oct 10 10:48:09 2015(r289114) > @@ -213,7 +213,7 @@ NLSGRP?= ${SHAREGRP} > NLSMODE?=${NOBINMODE} > > INCLUDEDIR?= /usr/include > -ETCDIR?= /etc > +CONFIGDIR?= /etc > > # > # install(1) parameters. Why do you need CONFIGDIR when there's CONFDIR? Also, the former lacks description in the header of the file. signature.asc Description: PGP signature
Re: svn commit: r289114 - in head: libexec/dma/dmagent share/mk usr.sbin/ppp
On Sun, Oct 11, 2015 at 09:17:57PM +0200, Jan Beich wrote: > Baptiste Daroussin writes: > > > Modified: head/share/mk/bsd.own.mk > > == > > --- head/share/mk/bsd.own.mkSat Oct 10 09:37:31 2015 > > (r289113) > > +++ head/share/mk/bsd.own.mkSat Oct 10 10:48:09 2015 > > (r289114) > > @@ -213,7 +213,7 @@ NLSGRP?=${SHAREGRP} > > NLSMODE?= ${NOBINMODE} > > > > INCLUDEDIR?= /usr/include > > -ETCDIR?= /etc > > +CONFIGDIR?=/etc > > > > # > > # install(1) parameters. > > Why do you need CONFIGDIR when there's CONFDIR? Also, the former lacks > description in the header of the file. Because I missed it, fixed now. Best regards, Bapt signature.asc Description: PGP signature
svn commit: r289148 - in head: libexec/dma/dmagent share/mk usr.sbin/ppp
Author: bapt Date: Sun Oct 11 19:25:39 2015 New Revision: 289148 URL: https://svnweb.freebsd.org/changeset/base/289148 Log: Use existing CONFDIR instead of adding a new CONFIGDIR Reported by: jbeich Modified: head/libexec/dma/dmagent/Makefile head/share/mk/bsd.own.mk head/usr.sbin/ppp/Makefile Modified: head/libexec/dma/dmagent/Makefile == --- head/libexec/dma/dmagent/Makefile Sun Oct 11 18:37:29 2015 (r289147) +++ head/libexec/dma/dmagent/Makefile Sun Oct 11 19:25:39 2015 (r289148) @@ -17,7 +17,7 @@ SRCS= aliases_parse.y \ util.c MAN8= dma.8 CONFS= dma.conf -CONFSDIR= ${CONFIGDIR}/dma +CONFSDIR= ${CONFDIR}/dma YFLAGS+= -i CLEANFILES=aliases_parse.i FILES= mailer.conf Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkSun Oct 11 18:37:29 2015(r289147) +++ head/share/mk/bsd.own.mkSun Oct 11 19:25:39 2015(r289148) @@ -213,7 +213,6 @@ NLSGRP?=${SHAREGRP} NLSMODE?= ${NOBINMODE} INCLUDEDIR?= /usr/include -CONFIGDIR?=/etc # # install(1) parameters. Modified: head/usr.sbin/ppp/Makefile == --- head/usr.sbin/ppp/Makefile Sun Oct 11 18:37:29 2015(r289147) +++ head/usr.sbin/ppp/Makefile Sun Oct 11 19:25:39 2015(r289148) @@ -22,7 +22,7 @@ PPP_NO_RADIUS= PPP_NO_SUID= .endif CONFS= ppp.conf -CONFSDIR= ${CONFIGDIR}/ppp +CONFSDIR= ${CONFDIR}/ppp CONFSMODE= 600 .if ${MK_ATM} == "no" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289150 - head/contrib/gcc/cp
Author: pfg Date: Sun Oct 11 19:58:57 2015 New Revision: 289150 URL: https://svnweb.freebsd.org/changeset/base/289150 Log: Correct handling of enum attributes with g++ From OpenBSD's commit log: This was responsible for memory corruption with recent versions of Mesa where c and c++ code share a header with a packed enum type. Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219 Obtained from:OpenBSD (CVS rev. 1.2) MFC after:1 week Modified: head/contrib/gcc/cp/parser.c Modified: head/contrib/gcc/cp/parser.c == --- head/contrib/gcc/cp/parser.cSun Oct 11 19:30:09 2015 (r289149) +++ head/contrib/gcc/cp/parser.cSun Oct 11 19:58:57 2015 (r289150) @@ -10906,6 +10906,7 @@ cp_parser_enum_specifier (cp_parser* par if (cp_parser_allow_gnu_extensions_p (parser)) { tree trailing_attr = cp_parser_attributes_opt (parser); + trailing_attr = chainon (trailing_attr, attributes); cplus_decl_attributes (&type, trailing_attr, (int) ATTR_FLAG_TYPE_IN_PLACE); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289151 - head/share/mk
Author: ngie Date: Sun Oct 11 20:02:10 2015 New Revision: 289151 URL: https://svnweb.freebsd.org/changeset/base/289151 Log: Simplify netbsd-tests.test.mk - projects/bmake and subsequent commits provide SRCTOP; there's no need to manually specify it now. - Compute a sane default for OBJTOP based on .OBJDIR and RELDIR. Manually specifying this is probably no longer needed, but it persists just in case (supporting commits will need to be made to move it out of some of the meta .mk files). - Compute a sane default for TESTSRC. Error out if the path cannot be found. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/netbsd-tests.test.mk Directory Properties: head/ (props changed) Modified: head/share/mk/netbsd-tests.test.mk == --- head/share/mk/netbsd-tests.test.mk Sun Oct 11 19:58:57 2015 (r289150) +++ head/share/mk/netbsd-tests.test.mk Sun Oct 11 20:02:10 2015 (r289151) @@ -3,16 +3,12 @@ .if !target(__netbsd_tests.test.mk__) __netbsd_tests.test.mk__: -.if !defined(OBJTOP) -.error "Please define OBJTOP to the absolute path of the top of the object tree" -.endif +OBJTOP?= ${.OBJDIR:S/${RELDIR}//} -.if !defined(SRCTOP) -.error "Please define SRCTOP to the absolute path of the top of the source tree" -.endif +TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:H} -.if !defined(TESTSRC) -.error "Please define TESTSRC to the absolute path of the test sources, e.g. contrib/netbsd-tests/lib/libc/stdio" +.if !exists(${TESTSRC}/) +.error "Please define TESTSRC to the absolute path of the test sources, e.g. $${SRCTOP}/contrib/netbsd-tests/lib/libc/stdio" .endif .PATH: ${TESTSRC} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289085 - head/share/mk
Baptiste Daroussin writes: > +++ head/share/mk/bsd.confs.mkFri Oct 9 21:57:42 2015 > (r289085) [...] > +CONFGROUPS?= CONFS [...] > +.error bsd.conf.mk cannot be included directly. > +.for group in ${CONFSGROUPS} Typo: plural vs. singular [...] > +${group}OWN?=${SHAREOWN} > +${group}GRP?=${SHAREGRP} > +${group}MODE?= ${SHAREMODE} > +${group}DIR?=${ETCDIR}/ Have you considered patching bsd.files.mk instead of copying it just to modify a few defaults? For one, bsd.confs.mk lacks r257095, r267276, r284345, r287185 - anything from a few years ago. Here's a quick attempt to merge changes back. Due to .mk files being out of sync I may have missed some. $ svn patch /path/to/below.diff $ rm -f /usr/share/mk/bsd.files.mk $ make -s install -C share/mk $ make -sj2 all -C libexec/dma/dmagent $ make -j2 install -C libexec/dma/dmagent --- _proginstall --- --- _FILESINS --- --- _proginstall --- install -s -o root -g mail -m 2555 dma /usr/libexec/dma --- _FILESINS --- install -o root -g wheel -m 444 mailer.conf /usr/share/examples/dma --- _CONFSINS --- install -o root -g wheel -m 644 dma.conf /etc/dma --- _maninstall --- install -o root -g wheel -m 444 dma.8.gz /usr/share/man/man8 Index: share/mk/bsd.prog.mk === --- share/mk/bsd.prog.mk(revision 289150) +++ share/mk/bsd.prog.mk(working copy) @@ -249,7 +249,6 @@ _SCRIPTSINS_${script:T}: ${script} NLSNAME?= ${PROG} .include -.include .include .include .include Index: share/mk/bsd.files.mk === --- share/mk/bsd.files.mk (revision 289150) +++ share/mk/bsd.files.mk (working copy) @@ -7,7 +7,8 @@ .if !target() : -FILESGROUPS?= FILES +FILESGROUPS?= FILES CONFS +FILESVARPREFIX?=FILES.SHARE CONFS.CONF .for group in ${FILESGROUPS} # Add in foo.yes and remove duplicates from all the groups @@ -22,10 +23,10 @@ all: buildfiles .if defined(${group}) && !empty(${group}) installfiles: installfiles-${group} -${group}OWN?= ${SHAREOWN} -${group}GRP?= ${SHAREGRP} -${group}MODE?= ${SHAREMODE} -${group}DIR?= ${BINDIR} +${group}OWN?= ${${FILESVARPREFIX:M${group}.*:E}OWN} +${group}GRP?= ${${FILESVARPREFIX:M${group}.*:E}GRP} +${group}MODE?= ${${FILESVARPREFIX:M${group}.*:E}MODE} +${group}DIR?= ${${FILESVARPREFIX:M${group}.*:E}DIR} .if !make(buildincludes) STAGE_SETS+= ${group} .endif @@ -56,7 +57,7 @@ stage_as.${file:T}: ${file} installfiles-${group}: _${group}INS_${file:T} _${group}INS_${file:T}: ${file} - ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \ + ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} @@ -70,11 +71,11 @@ stage_files.${group}: ${_${group}FILES} installfiles-${group}: _${group}INS _${group}INS: ${_${group}FILES} .if defined(${group}NAME) - ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ + ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} \ -m ${${group}MODE} ${.ALLSRC} \ ${DESTDIR}${${group}DIR}/${${group}NAME} .else - ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ + ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} \ -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR} .endif .endif Index: share/mk/bsd.lib.mk === --- share/mk/bsd.lib.mk (revision 289150) +++ share/mk/bsd.lib.mk (working copy) @@ -390,7 +390,6 @@ _libinstall: .include .include .include -.include .endif .include signature.asc Description: PGP signature
svn commit: r289153 - head/sys/dev/ntb/if_ntb
Author: cem Date: Sun Oct 11 20:58:00 2015 New Revision: 289153 URL: https://svnweb.freebsd.org/changeset/base/289153 Log: NTB: MFV 113fc505: Handle 64bit BAR sizes 64bit BAR sizes are permissible with an NTB device. To support them various modifications and clean-ups were required, most significantly using 2 32bit scratch pad registers for each BAR. Also, modify the driver to allow more than 2 Memory Windows. Authored by: Jon Mason Obtained from:Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c == --- head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 20:57:09 2015 (r289152) +++ head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 20:58:00 2015 (r289153) @@ -194,11 +194,22 @@ struct ntb_payload_header { }; enum { + /* +* The order of this enum is part of the if_ntb remote protocol. Do +* not reorder without bumping protocol version (and it's probably best +* to keep the protocol in lock-step with the Linux NTB driver. +*/ IF_NTB_VERSION = 0, - IF_NTB_MW0_SZ, - IF_NTB_MW1_SZ, - IF_NTB_NUM_QPS, IF_NTB_QP_LINKS, + IF_NTB_NUM_QPS, + IF_NTB_NUM_MWS, + /* +* N.B.: transport_link_work assumes MW1 enums = MW0 + 2. +*/ + IF_NTB_MW0_SZ_HIGH, + IF_NTB_MW0_SZ_LOW, + IF_NTB_MW1_SZ_HIGH, + IF_NTB_MW1_SZ_LOW, IF_NTB_MAX_SPAD, }; @@ -242,6 +253,7 @@ static void ntb_rx_completion_task(void static void ntb_transport_event_callback(void *data, enum ntb_hw_event event); static void ntb_transport_link_work(void *arg); static int ntb_set_mw(struct ntb_netdev *nt, int num_mw, unsigned int size); +static void ntb_free_mw(struct ntb_netdev *nt, int num_mw); static void ntb_transport_setup_qp_mw(struct ntb_netdev *nt, unsigned int qp_num); static void ntb_qp_link_work(void *arg); @@ -514,9 +526,7 @@ ntb_transport_free(void *transport) ntb_unregister_event_callback(ntb); for (i = 0; i < NTB_NUM_MW; i++) - if (nt->mw[i].virt_addr != NULL) - contigfree(nt->mw[i].virt_addr, nt->mw[i].size, - M_NTB_IF); + ntb_free_mw(nt, i); free(nt->qps, M_NTB_IF); ntb_unregister_transport(ntb); @@ -1019,19 +1029,24 @@ ntb_transport_link_work(void *arg) struct ntb_netdev *nt = arg; struct ntb_softc *ntb = nt->ntb; struct ntb_transport_qp *qp; + uint64_t val64; uint32_t val; int rc, i; - /* send the local info */ - rc = ntb_write_remote_spad(ntb, IF_NTB_VERSION, NTB_TRANSPORT_VERSION); - if (rc != 0) - goto out; - - rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ, ntb_get_mw_size(ntb, 0)); - if (rc != 0) - goto out; + /* send the local info, in the opposite order of the way we read it */ + for (i = 0; i < NTB_NUM_MW; i++) { + rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), + ntb_get_mw_size(ntb, i) >> 32); + if (rc != 0) + goto out; + + rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), + (uint32_t)ntb_get_mw_size(ntb, i)); + if (rc != 0) + goto out; + } - rc = ntb_write_remote_spad(ntb, IF_NTB_MW1_SZ, ntb_get_mw_size(ntb, 1)); + rc = ntb_write_remote_spad(ntb, IF_NTB_NUM_MWS, NTB_NUM_MW); if (rc != 0) goto out; @@ -1039,11 +1054,7 @@ ntb_transport_link_work(void *arg) if (rc != 0) goto out; - rc = ntb_read_remote_spad(ntb, IF_NTB_QP_LINKS, &val); - if (rc != 0) - goto out; - - rc = ntb_write_remote_spad(ntb, IF_NTB_QP_LINKS, val); + rc = ntb_write_remote_spad(ntb, IF_NTB_VERSION, NTB_TRANSPORT_VERSION); if (rc != 0) goto out; @@ -1062,27 +1073,32 @@ ntb_transport_link_work(void *arg) if (val != nt->max_qps) goto out; - rc = ntb_read_local_spad(ntb, IF_NTB_MW0_SZ, &val); - if (rc != 0) - goto out; - - if (val == 0) - goto out; - - rc = ntb_set_mw(nt, 0, val); - if (rc != 0) - return; - - rc = ntb_read_local_spad(ntb, IF_NTB_MW1_SZ, &val); + rc = ntb_read_local_spad(ntb, IF_NTB_NUM_MWS, &val); if (rc != 0) goto out; - if (val == 0) + if (val != NTB_NUM_MW) goto out; - rc = ntb_set_mw(nt, 1, val); - if (rc != 0) - return; + for (i = 0; i < NTB_NUM_MW; i++) { + rc = ntb_read_local_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), + &val); +
svn commit: r289152 - head/sys/dev/ntb/if_ntb
Author: cem Date: Sun Oct 11 20:57:09 2015 New Revision: 289152 URL: https://svnweb.freebsd.org/changeset/base/289152 Log: NTB: MFV cc0f868d: fix pointer math issues ->remote_rx_info and ->rx_info are struct ntb_rx_info pointers. If we add sizeof(struct ntb_rx_info) then it goes too far. Authored by: Dan Carpenter Obtained from:Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c == --- head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 20:02:10 2015 (r289151) +++ head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 20:57:09 2015 (r289152) @@ -548,7 +548,7 @@ ntb_transport_init_queue(struct ntb_netd (qp_num / NTB_NUM_MW * tx_size)); tx_size -= sizeof(struct ntb_rx_info); - qp->tx_mw = qp->rx_info + sizeof(struct ntb_rx_info); + qp->tx_mw = qp->rx_info + 1; qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), tx_size); qp->tx_max_entry = tx_size / qp->tx_max_frame; @@ -1148,7 +1148,7 @@ ntb_transport_setup_qp_mw(struct ntb_net (qp_num / NTB_NUM_MW * rx_size)); rx_size -= sizeof(struct ntb_rx_info); - qp->rx_buff = qp->remote_rx_info + sizeof(struct ntb_rx_info); + qp->rx_buff = qp->remote_rx_info + 1; qp->rx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), rx_size); qp->rx_max_entry = rx_size / qp->rx_max_frame; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289154 - head/sys/dev/ntb/if_ntb
Author: cem Date: Sun Oct 11 20:59:02 2015 New Revision: 289154 URL: https://svnweb.freebsd.org/changeset/base/289154 Log: NTB: MFV b77b2637: Link toggle memory leak Each link-up will allocate a new NTB receive buffer when the NTB properties are negotiated with the remote system. These allocations did not check for existing buffers and thus did not free them. Now, the driver will check for an existing buffer and free it if not of the correct size, before trying to alloc a new one. Authored by: Jon Mason Obtained from:Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c == --- head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 20:58:00 2015 (r289153) +++ head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 20:59:02 2015 (r289154) @@ -1129,12 +1129,20 @@ ntb_set_mw(struct ntb_netdev *nt, int nu { struct ntb_transport_mw *mw = &nt->mw[num_mw]; + /* No need to re-setup */ + if (mw->size == size) + return (0); + + if (mw->size != 0) + ntb_free_mw(nt, num_mw); + /* Alloc memory for receiving data. Must be 4k aligned */ mw->size = size; mw->virt_addr = contigmalloc(mw->size, M_NTB_IF, M_ZERO, 0, BUS_SPACE_MAXADDR, mw->size, 0); if (mw->virt_addr == NULL) { + mw->size = 0; printf("ntb: Unable to allocate MW buffer of size %d\n", (int)mw->size); return (ENOMEM); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289155 - head/sys/dev/ntb/if_ntb
Author: cem Date: Sun Oct 11 20:59:40 2015 New Revision: 289155 URL: https://svnweb.freebsd.org/changeset/base/289155 Log: NTB: MFV 90f9e934: reset tx_index on link toggle If the NTB link toggles, the driver could stop receiving due to the tx_index not being set to 0 on the transmitting size on a link-up event. This is due to the driver expecting the incoming data to start at the beginning of the receive buffer and not at a random place. Authored by: Jon Mason Obtained from:Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c == --- head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 20:59:02 2015 (r289154) +++ head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 20:59:40 2015 (r289155) @@ -562,7 +562,6 @@ ntb_transport_init_queue(struct ntb_netd qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), tx_size); qp->tx_max_entry = tx_size / qp->tx_max_frame; - qp->tx_index = 0; callout_init(&qp->link_work, 0); callout_init(&qp->queue_full, 1); @@ -1192,7 +1191,6 @@ ntb_transport_setup_qp_mw(struct ntb_net rx_size); qp->rx_max_entry = rx_size / qp->rx_max_frame; qp->rx_index = 0; - qp->tx_index = 0; qp->remote_rx_info->entry = qp->rx_max_entry; @@ -1206,6 +1204,7 @@ ntb_transport_setup_qp_mw(struct ntb_net qp->rx_pkts = 0; qp->tx_pkts = 0; + qp->tx_index = 0; } static void ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289156 - head/sys/dev/ntb/if_ntb
Author: cem Date: Sun Oct 11 21:00:19 2015 New Revision: 289156 URL: https://svnweb.freebsd.org/changeset/base/289156 Log: NTB: MFV c9d534c8: Correctly handle receive buffers of the minimal size The ring logic of the NTB receive buffer/transmit memory window requires there to be at least 2 payload sized allotments. For the minimal size case, split the buffer into two and set the transport_mtu to the appropriate size. Authored by: Jon Mason Obtained from:Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c == --- head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 20:59:40 2015 (r289155) +++ head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 21:00:19 2015 (r289156) @@ -559,8 +559,9 @@ ntb_transport_init_queue(struct ntb_netd tx_size -= sizeof(struct ntb_rx_info); qp->tx_mw = qp->rx_info + 1; + /* Due to house-keeping, there must be at least 2 buffs */ qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), - tx_size); + tx_size / 2); qp->tx_max_entry = tx_size / qp->tx_max_frame; callout_init(&qp->link_work, 0); @@ -1187,12 +1188,13 @@ ntb_transport_setup_qp_mw(struct ntb_net rx_size -= sizeof(struct ntb_rx_info); qp->rx_buff = qp->remote_rx_info + 1; + /* Due to house-keeping, there must be at least 2 buffs */ qp->rx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), - rx_size); + rx_size / 2); qp->rx_max_entry = rx_size / qp->rx_max_frame; qp->rx_index = 0; - qp->remote_rx_info->entry = qp->rx_max_entry; + qp->remote_rx_info->entry = qp->rx_max_entry - 1; /* setup the hdr offsets with 0's */ for (i = 0; i < qp->rx_max_entry; i++) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289157 - head/sys/dev/ntb/if_ntb
Author: cem Date: Sun Oct 11 21:01:14 2015 New Revision: 289157 URL: https://svnweb.freebsd.org/changeset/base/289157 Log: NTB: MFV c336acd3: memcpy lockup workaround The system will appear to lockup for long periods of time due to the NTB driver spending too much time in memcpy. Avoid this by reducing the number of packets that can be serviced on a given interrupt. Authored by: Jon Mason Obtained from:Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c == --- head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 21:00:19 2015 (r289156) +++ head/sys/dev/ntb/if_ntb/if_ntb.cSun Oct 11 21:01:14 2015 (r289157) @@ -853,7 +853,8 @@ ntb_rx_pendq_full(void *arg) static void ntb_transport_rx(struct ntb_transport_qp *qp) { - int rc, i; + uint64_t i; + int rc; /* * Limit the number of packets processed in a single interrupt to @@ -861,7 +862,7 @@ ntb_transport_rx(struct ntb_transport_qp */ mtx_lock(&qp->transport->rx_lock); CTR0(KTR_NTB, "RX: transport_rx"); - for (i = 0; i < NTB_RX_MAX_PKTS; i++) { + for (i = 0; i < qp->rx_max_entry; i++) { rc = ntb_process_rxc(qp); if (rc != 0) { CTR0(KTR_NTB, "RX: process_rxc failed"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289158 - head/share/mk
Author: ngie Date: Sun Oct 11 21:29:24 2015 New Revision: 289158 URL: https://svnweb.freebsd.org/changeset/base/289158 Log: Default TESTSDIR to /usr/tests/${RELDIR:H} When run from bin/ls/tests, for example, the value of TESTSDIR would be ${TESTSBASE}/${RELDIR:H} -> /usr/tests/bin/ls/tests/.. -> /usr/tests/bin/ls Document the new behavior in bsd.README. While here, also document TESTSBASE Relnotes: yes Differential Revision: D1022 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.README head/share/mk/bsd.test.mk Directory Properties: head/ (props changed) Modified: head/share/mk/bsd.README == --- head/share/mk/bsd.READMESun Oct 11 21:01:14 2015(r289157) +++ head/share/mk/bsd.READMESun Oct 11 21:29:24 2015(r289158) @@ -474,10 +474,16 @@ It has seven targets: It sets/uses the following variables, among many others: -TESTDIRPath to the installed tests. Must be a subdirectory of +TESTSBASE Installation prefix for tests. Defaults to /usr/tests + +TESTSDIR Path to the installed tests. Must be a subdirectory of TESTSBASE and the subpath should match the relative location of the tests within the src tree. + The value of TESTSDIR defaults to + ${TESTSBASE}/${RELDIR:H} , e.g. /usr/tests/bin/ls when + included from bin/ls/tests . + KYUAFILE If 'auto' (the default), generate a Kyuafile out of the test programs defined in the Makefile. If 'yes', then a manually-crafted Kyuafile must be supplied with the Modified: head/share/mk/bsd.test.mk == --- head/share/mk/bsd.test.mk Sun Oct 11 21:01:14 2015(r289157) +++ head/share/mk/bsd.test.mk Sun Oct 11 21:29:24 2015(r289158) @@ -10,9 +10,8 @@ : -.ifndef TESTSDIR -.error "Please define TESTSDIR when including bsd.test.mk" -.endif +# Tests install directory +TESTSDIR?= ${TESTSBASE}/${RELDIR:H} # List of subdirectories containing tests into which to recurse. This has the # same semantics as SUBDIR at build-time. However, the directories listed here ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289157 - head/sys/dev/ntb/if_ntb
On Sun, Oct 11, 2015 at 2:01 PM, Conrad E. Meyer wrote: > Author: cem > Date: Sun Oct 11 21:01:14 2015 > New Revision: 289157 > URL: https://svnweb.freebsd.org/changeset/base/289157 > > Log: > NTB: MFV c336acd3: memcpy lockup workaround This catches us up to the dual-licensed (BSD/GPL) Linux driver as of May 15, 2013. Best, Conrad ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289085 - head/share/mk
On Sun, Oct 11, 2015 at 10:41:09PM +0200, Jan Beich wrote: > Baptiste Daroussin writes: > > > +++ head/share/mk/bsd.confs.mk Fri Oct 9 21:57:42 2015 > > (r289085) > [...] > > +CONFGROUPS?= CONFS > [...] > > +.error bsd.conf.mk cannot be included directly. > > +.for group in ${CONFSGROUPS} > > Typo: plural vs. singular > > [...] > > +${group}OWN?= ${SHAREOWN} > > +${group}GRP?= ${SHAREGRP} > > +${group}MODE?= ${SHAREMODE} > > +${group}DIR?= ${ETCDIR}/ > > Have you considered patching bsd.files.mk instead of copying it just to > modify a few defaults? For one, bsd.confs.mk lacks r257095, r267276, > r284345, r287185 - anything from a few years ago. Yes I planned to merge, bsd.confs.mk was temporary to quickly unlock me on my work on packaging base. > > Here's a quick attempt to merge changes back. Due to .mk files being > out of sync I may have missed some. > > $ svn patch /path/to/below.diff > $ rm -f /usr/share/mk/bsd.files.mk > $ make -s install -C share/mk > $ make -sj2 all -C libexec/dma/dmagent > $ make -j2 install -C libexec/dma/dmagent That misses the point, the goal here is explicitly not to install the configuration files during make install, but only when one call make installconfig which I have hoocked to make distribution (in Makefile.inc1) to allow mergemaster/etcupdate to continue being able to merge them after installing them into a temporary destdir. Best regards, Bapt signature.asc Description: PGP signature
svn commit: r289159 - head/bin/sh
Author: jilles Date: Sun Oct 11 21:33:00 2015 New Revision: 289159 URL: https://svnweb.freebsd.org/changeset/base/289159 Log: sh: Make struct arglist an array instead of a linked list. This simplifies the code (e.g. allowing use of qsort(3) instead of a hand-rolled mergesort) and should have better cache properties. The waste of unused args arrays after resizes is approximately the same as the savings from getting rid of the next pointers. At the same time, remove a piece of global state and move some duplicated code into a function. Modified: head/bin/sh/eval.c head/bin/sh/eval.h head/bin/sh/expand.c head/bin/sh/expand.h head/bin/sh/var.c head/bin/sh/var.h Modified: head/bin/sh/eval.c == --- head/bin/sh/eval.c Sun Oct 11 21:29:24 2015(r289158) +++ head/bin/sh/eval.c Sun Oct 11 21:33:00 2015(r289159) @@ -82,7 +82,7 @@ static int builtin_flags; /* evalcommand char *commandname; -struct strlist *cmdenviron; +struct arglist *cmdenviron; int exitstatus;/* exit status of last command */ int oexitstatus; /* saved exit status */ @@ -352,20 +352,19 @@ evalfor(union node *n, int flags) { struct arglist arglist; union node *argp; - struct strlist *sp; + int i; int status; - arglist.lastp = &arglist.list; + emptyarglist(&arglist); for (argp = n->nfor.args ; argp ; argp = argp->narg.next) { oexitstatus = exitstatus; expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); } - *arglist.lastp = NULL; loopnest++; status = 0; - for (sp = arglist.list ; sp ; sp = sp->next) { - setvar(n->nfor.var, sp->text, 0); + for (i = 0; i < arglist.count; i++) { + setvar(n->nfor.var, arglist.args[i], 0); evaltree(n->nfor.body, flags); status = exitstatus; if (evalskip) { @@ -396,12 +395,12 @@ evalcase(union node *n) union node *patp; struct arglist arglist; - arglist.lastp = &arglist.list; + emptyarglist(&arglist); oexitstatus = exitstatus; expandarg(n->ncase.expr, &arglist, EXP_TILDE); for (cp = n->ncase.cases ; cp ; cp = cp->nclist.next) { for (patp = cp->nclist.pattern ; patp ; patp = patp->narg.next) { - if (casematch(patp, arglist.list->text)) { + if (casematch(patp, arglist.args[0])) { while (cp->nclist.next && cp->type == NCLISTFALLTHRU && cp->nclist.body == NULL) @@ -508,7 +507,7 @@ exphere(union node *redir, struct arglis else { handler = &jmploc; expandarg(redir->nhere.doc, fn, 0); - redir->nhere.expdoc = fn->list->text; + redir->nhere.expdoc = fn->args[0]; INTOFF; } handler = savehandler; @@ -532,7 +531,7 @@ expredir(union node *n) for (redir = n ; redir ; redir = redir->nfile.next) { struct arglist fn; - fn.lastp = &fn.list; + emptyarglist(&fn); switch (redir->type) { case NFROM: case NTO: @@ -540,13 +539,13 @@ expredir(union node *n) case NAPPEND: case NCLOBBER: expandarg(redir->nfile.fname, &fn, EXP_TILDE); - redir->nfile.expfname = fn.list->text; + redir->nfile.expfname = fn.args[0]; break; case NFROMFD: case NTOFD: if (redir->ndup.vname) { expandarg(redir->ndup.vname, &fn, EXP_TILDE); - fixredir(redir, fn.list->text, 1); + fixredir(redir, fn.args[0], 1); } break; case NXHERE: @@ -753,28 +752,30 @@ isdeclarationcmd(struct narg *arg) static void xtracecommand(struct arglist *varlist, struct arglist *arglist) { - struct strlist *sp; char sep = 0; - const char *p, *ps4; + const char *text, *p, *ps4; + int i; ps4 = expandstr(ps4val()); out2str(ps4 != NULL ? ps4 : ps4val()); - for (sp = varlist->list ; sp ; sp = sp->next) { + for (i = 0; i < varlist->count; i++) { + text = varlist->args[i]; if (sep != 0) out2c(' '); - p = strchr(sp->text, '='); + p = strchr(text, '='); if (p != NULL) { p++; - outbin(sp->text, p - sp->text, out2); + outbin(text, p - text, out2);
Re: svn commit: r289150 - head/contrib/gcc/cp
Heya! How'd you test this? Sean is reporting (on irc) there's some weirdness after this commit. -a On 11 October 2015 at 12:58, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Oct 11 19:58:57 2015 > New Revision: 289150 > URL: https://svnweb.freebsd.org/changeset/base/289150 > > Log: > Correct handling of enum attributes with g++ > > From OpenBSD's commit log: > > This was responsible for memory corruption with recent versions > of Mesa where c and c++ code share a header with a packed enum type. > > Reference: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219 > > Obtained from:OpenBSD (CVS rev. 1.2) > MFC after:1 week > > Modified: > head/contrib/gcc/cp/parser.c > > Modified: head/contrib/gcc/cp/parser.c > == > --- head/contrib/gcc/cp/parser.cSun Oct 11 19:30:09 2015 > (r289149) > +++ head/contrib/gcc/cp/parser.cSun Oct 11 19:58:57 2015 > (r289150) > @@ -10906,6 +10906,7 @@ cp_parser_enum_specifier (cp_parser* par >if (cp_parser_allow_gnu_extensions_p (parser)) > { >tree trailing_attr = cp_parser_attributes_opt (parser); > + trailing_attr = chainon (trailing_attr, attributes); >cplus_decl_attributes (&type, > trailing_attr, > (int) ATTR_FLAG_TYPE_IN_PLACE); > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289150 - head/contrib/gcc/cp
On 11/10/2015 07:20 p.m., Adrian Chadd wrote: Heya! How'd you test this? Sean is reporting (on irc) there's some weirdness after this commit. Hmm... I only rebuilt it and ran minimal tests in my box. It only looked imporant for mesa. I will revert to investigate, thanks for the report. Pedro. -a On 11 October 2015 at 12:58, Pedro F. Giffuni wrote: Author: pfg Date: Sun Oct 11 19:58:57 2015 New Revision: 289150 URL: https://svnweb.freebsd.org/changeset/base/289150 Log: Correct handling of enum attributes with g++ From OpenBSD's commit log: This was responsible for memory corruption with recent versions of Mesa where c and c++ code share a header with a packed enum type. Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219 Obtained from:OpenBSD (CVS rev. 1.2) MFC after:1 week Modified: head/contrib/gcc/cp/parser.c Modified: head/contrib/gcc/cp/parser.c == --- head/contrib/gcc/cp/parser.cSun Oct 11 19:30:09 2015 (r289149) +++ head/contrib/gcc/cp/parser.cSun Oct 11 19:58:57 2015 (r289150) @@ -10906,6 +10906,7 @@ cp_parser_enum_specifier (cp_parser* par if (cp_parser_allow_gnu_extensions_p (parser)) { tree trailing_attr = cp_parser_attributes_opt (parser); + trailing_attr = chainon (trailing_attr, attributes); cplus_decl_attributes (&type, trailing_attr, (int) ATTR_FLAG_TYPE_IN_PLACE); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289160 - head/contrib/gcc/cp
Author: pfg Date: Mon Oct 12 02:05:25 2015 New Revision: 289160 URL: https://svnweb.freebsd.org/changeset/base/289160 Log: Revertr289150: Correct handling of enum attributes with g++ It is causing issues on some platforms. Reported by: sbruno (through adrian) Modified: head/contrib/gcc/cp/parser.c Modified: head/contrib/gcc/cp/parser.c == --- head/contrib/gcc/cp/parser.cSun Oct 11 21:33:00 2015 (r289159) +++ head/contrib/gcc/cp/parser.cMon Oct 12 02:05:25 2015 (r289160) @@ -10906,7 +10906,6 @@ cp_parser_enum_specifier (cp_parser* par if (cp_parser_allow_gnu_extensions_p (parser)) { tree trailing_attr = cp_parser_attributes_opt (parser); - trailing_attr = chainon (trailing_attr, attributes); cplus_decl_attributes (&type, trailing_attr, (int) ATTR_FLAG_TYPE_IN_PLACE); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289162 - in head/sys: dev/ath dev/usb/wlan net80211
Author: adrian Date: Mon Oct 12 03:27:08 2015 New Revision: 289162 URL: https://svnweb.freebsd.org/changeset/base/289162 Log: net80211: separate mbuf cleanup from ieee80211_fragment() * Create ieee80211_free_mbuf() which frees a list of mbufs. * Use it in the fragment transmit path and ath / uath transmit paths. * Call it in xmit_pkt() if the transmission fails; otherwise fragments may be leaked. This should be a big no-op. Submitted by: Differential Revision:https://reviews.freebsd.org/D3769 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx.h head/sys/dev/usb/wlan/if_uath.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Oct 12 03:21:44 2015(r289161) +++ head/sys/dev/ath/if_ath.c Mon Oct 12 03:27:08 2015(r289162) @@ -3262,7 +3262,7 @@ ath_transmit(struct ieee80211com *ic, st * XXXGL: is mbuf valid after ath_txfrag_setup? If yes, * we shouldn't free it but return back. */ - ath_freetx(m); + ieee80211_free_mbuf(m); m = NULL; goto bad; } @@ -3356,7 +3356,7 @@ reclaim: __func__, ieee80211_state_name[ni->ni_vap->iv_state]); /* XXX dmamap */ - ath_freetx(next); + ieee80211_free_mbuf(next); goto reclaim; } m = next; Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cMon Oct 12 03:21:44 2015 (r289161) +++ head/sys/dev/ath/if_ath_tx.cMon Oct 12 03:27:08 2015 (r289162) @@ -283,22 +283,6 @@ ath_txfrag_setup(struct ath_softc *sc, a return !TAILQ_EMPTY(frags); } -/* - * Reclaim mbuf resources. For fragmented frames we - * need to claim each frag chained with m_nextpkt. - */ -void -ath_freetx(struct mbuf *m) -{ - struct mbuf *next; - - do { - next = m->m_nextpkt; - m->m_nextpkt = NULL; - m_freem(m); - } while ((m = next) != NULL); -} - static int ath_tx_dmasetup(struct ath_softc *sc, struct ath_buf *bf, struct mbuf *m0) { @@ -317,7 +301,7 @@ ath_tx_dmasetup(struct ath_softc *sc, st bf->bf_nseg = ATH_MAX_SCATTER + 1; } else if (error != 0) { sc->sc_stats.ast_tx_busdma++; - ath_freetx(m0); + ieee80211_free_mbuf(m0); return error; } /* @@ -329,7 +313,7 @@ ath_tx_dmasetup(struct ath_softc *sc, st sc->sc_stats.ast_tx_linear++; m = m_collapse(m0, M_NOWAIT, ATH_MAX_SCATTER); if (m == NULL) { - ath_freetx(m0); + ieee80211_free_mbuf(m0); sc->sc_stats.ast_tx_nombuf++; return ENOMEM; } @@ -339,14 +323,14 @@ ath_tx_dmasetup(struct ath_softc *sc, st BUS_DMA_NOWAIT); if (error != 0) { sc->sc_stats.ast_tx_busdma++; - ath_freetx(m0); + ieee80211_free_mbuf(m0); return error; } KASSERT(bf->bf_nseg <= ATH_MAX_SCATTER, ("too many segments after defrag; nseg %u", bf->bf_nseg)); } else if (bf->bf_nseg == 0) { /* null packet, discard */ sc->sc_stats.ast_tx_nodata++; - ath_freetx(m0); + ieee80211_free_mbuf(m0); return EIO; } DPRINTF(sc, ATH_DEBUG_XMIT, "%s: m %p len %u\n", @@ -1581,7 +1565,7 @@ ath_tx_normal_setup(struct ath_softc *sc /* Handle encryption twiddling if needed */ if (! ath_tx_tag_crypto(sc, ni, m0, iswep, isfrag, &hdrlen, &pktlen, &keyix)) { - ath_freetx(m0); + ieee80211_free_mbuf(m0); return EIO; } @@ -1693,7 +1677,7 @@ ath_tx_normal_setup(struct ath_softc *sc wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK, __func__); /* XXX statistic */ /* XXX free tx dmamap */ - ath_freetx(m0); + ieee80211_free_mbuf(m0); return EIO; } @@ -1749,7 +1733,7 @@ ath_tx_normal_setup(struct ath_softc *sc "%s: discard frame, ACK required w/ TDMA\n", __func__); sc->sc_stats.ast_tdma_ack++; /* XXX free tx dmamap */ - ath_freetx(m0); + iee
svn commit: r289163 - head/sys/dev/wpi
Author: adrian Date: Mon Oct 12 04:05:12 2015 New Revision: 289163 URL: https://svnweb.freebsd.org/changeset/base/289163 Log: wpi(4): add support for TX fragmentation. Tested: * Tested with Intel 3945BG, HOSTAP and STA modes Differential Revision:https://reviews.freebsd.org/D3770 Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c == --- head/sys/dev/wpi/if_wpi.c Mon Oct 12 03:27:08 2015(r289162) +++ head/sys/dev/wpi/if_wpi.c Mon Oct 12 04:05:12 2015(r289163) @@ -196,6 +196,7 @@ static void wpi_debug_registers(struct w #endif static voidwpi_fatal_intr(struct wpi_softc *); static voidwpi_intr(void *); +static voidwpi_free_txfrags(struct wpi_softc *, uint16_t); static int wpi_cmd2(struct wpi_softc *, struct wpi_buf *); static int wpi_tx_data(struct wpi_softc *, struct mbuf *, struct ieee80211_node *); @@ -458,6 +459,7 @@ wpi_attach(device_t dev) | IEEE80211_C_MONITOR /* monitor mode supported */ | IEEE80211_C_AHDEMO/* adhoc demo mode */ | IEEE80211_C_BGSCAN/* capable of bg scanning */ + | IEEE80211_C_TXFRAG/* handle tx frags */ | IEEE80211_C_TXPMGT/* tx power management */ | IEEE80211_C_SHSLOT/* short slot time supported */ | IEEE80211_C_WPA /* 802.11i */ @@ -1168,6 +1170,7 @@ wpi_alloc_tx_ring(struct wpi_softc *sc, ring->qid = qid; ring->queued = 0; ring->cur = 0; + ring->pending = 0; ring->update = 0; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); @@ -1288,6 +1291,7 @@ wpi_reset_tx_ring(struct wpi_softc *sc, BUS_DMASYNC_PREWRITE); ring->queued = 0; ring->cur = 0; + ring->pending = 0; ring->update = 0; } @@ -2572,6 +2576,34 @@ done: end: WPI_UNLOCK(sc); } +static void +wpi_free_txfrags(struct wpi_softc *sc, uint16_t ac) +{ + struct wpi_tx_ring *ring; + struct wpi_tx_data *data; + uint8_t cur; + + WPI_TXQ_LOCK(sc); + ring = &sc->txq[ac]; + + while (ring->pending != 0) { + ring->pending--; + cur = (ring->cur + ring->pending) % WPI_TX_RING_COUNT; + data = &ring->data[cur]; + + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->data_dmat, data->map); + m_freem(data->m); + data->m = NULL; + + ieee80211_node_decref(data->ni); + data->ni = NULL; + } + + WPI_TXQ_UNLOCK(sc); +} + static int wpi_cmd2(struct wpi_softc *sc, struct wpi_buf *buf) { @@ -2582,9 +2614,9 @@ wpi_cmd2(struct wpi_softc *sc, struct wp struct wpi_tx_ring *ring; struct mbuf *m1; bus_dma_segment_t *seg, segs[WPI_MAX_SCATTER]; - uint8_t pad; + uint8_t cur, pad; uint16_t hdrlen; - int error, i, nsegs, totlen; + int error, i, nsegs, totlen, frag; WPI_TXQ_LOCK(sc); @@ -2601,6 +2633,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp wh = mtod(buf->m, struct ieee80211_frame *); hdrlen = ieee80211_anyhdrsize(wh); totlen = buf->m->m_pkthdr.len; + frag = ((buf->m->m_flags & (M_FRAG | M_LASTFRAG)) == M_FRAG); if (__predict_false(totlen < sizeof(struct ieee80211_frame_min))) { error = EINVAL; @@ -2614,15 +2647,16 @@ wpi_cmd2(struct wpi_softc *sc, struct wp pad = 0; ring = &sc->txq[buf->ac]; - desc = &ring->desc[ring->cur]; - data = &ring->data[ring->cur]; + cur = (ring->cur + ring->pending) % WPI_TX_RING_COUNT; + desc = &ring->desc[cur]; + data = &ring->data[cur]; /* Prepare TX firmware command. */ - cmd = &ring->cmd[ring->cur]; + cmd = &ring->cmd[cur]; cmd->code = buf->code; cmd->flags = 0; cmd->qid = ring->qid; - cmd->idx = ring->cur; + cmd->idx = cur; memcpy(cmd->data, buf->data, buf->size); @@ -2662,7 +2696,8 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (ring->qid < WPI_CMD_QUEUE_NUM) { if_inc_counter(buf->ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); - ieee80211_free_node(buf->ni); + if (!frag) + ieee80211_free_node(buf->ni); } m_freem(buf->m); error = 0; @@ -2678,7 +2713,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp data->ni = buf->ni; DPRINTF(sc, WPI_DEBUG
svn commit: r289164 - in head/sys: dev/iwn net80211
Author: adrian Date: Mon Oct 12 04:30:38 2015 New Revision: 289164 URL: https://svnweb.freebsd.org/changeset/base/289164 Log: net80211: free node reference in the ieee80211_parent_xmitpkt() when error happened. Move error handling into ieee80211_parent_xmitpkt() instead of spreading it between functions. Submitted by: Differential Revision:https://reviews.freebsd.org/D3772 Modified: head/sys/dev/iwn/if_iwn.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_power.c head/sys/net80211/ieee80211_superg.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Mon Oct 12 04:05:12 2015(r289163) +++ head/sys/dev/iwn/if_iwn.c Mon Oct 12 04:30:38 2015(r289164) @@ -4950,9 +4950,7 @@ iwn_transmit(struct ieee80211com *ic, st } error = iwn_tx_data(sc, m, ni); - if (error) { - if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); - } else + if (!error) sc->sc_tx_timer = 5; IWN_UNLOCK(sc); return (error); Modified: head/sys/net80211/ieee80211_freebsd.c == --- head/sys/net80211/ieee80211_freebsd.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_freebsd.c Mon Oct 12 04:30:38 2015 (r289164) @@ -529,9 +529,6 @@ ieee80211_get_rx_params(struct mbuf *m, /* * Transmit a frame to the parent interface. - * - * TODO: if the transmission fails, make sure the parent node is freed - * (the callers will first need modifying.) */ int ieee80211_parent_xmitpkt(struct ieee80211com *ic, struct mbuf *m) @@ -544,8 +541,16 @@ ieee80211_parent_xmitpkt(struct ieee8021 */ IEEE80211_TX_LOCK_ASSERT(ic); error = ic->ic_transmit(ic, m); - if (error) + if (error) { + struct ieee80211_node *ni; + + ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; + + /* XXX number of fragments */ + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); ieee80211_free_mbuf(m); + } return (error); } Modified: head/sys/net80211/ieee80211_hostap.c == --- head/sys/net80211/ieee80211_hostap.cMon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_hostap.cMon Oct 12 04:30:38 2015 (r289164) @@ -2327,12 +2327,11 @@ ieee80211_recv_pspoll(struct ieee80211_n /* * Do the right thing; if it's an encap'ed frame then -* call ieee80211_parent_xmitpkt() (and free the ref) else +* call ieee80211_parent_xmitpkt() else * call ieee80211_vap_xmitpkt(). */ if (m->m_flags & M_ENCAP) { - if (ieee80211_parent_xmitpkt(ic, m) != 0) - ieee80211_free_node(ni); + (void) ieee80211_parent_xmitpkt(ic, m); } else { (void) ieee80211_vap_xmitpkt(vap, m); } Modified: head/sys/net80211/ieee80211_mesh.c == --- head/sys/net80211/ieee80211_mesh.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_mesh.c Mon Oct 12 04:30:38 2015 (r289164) @@ -1239,12 +1239,8 @@ mesh_forward(struct ieee80211vap *vap, s IEEE80211_TX_LOCK(ic); err = ieee80211_parent_xmitpkt(ic, mcopy); IEEE80211_TX_UNLOCK(ic); - if (err != 0) { - /* NB: IFQ_HANDOFF reclaims mbuf */ - ieee80211_free_node(ni); - } else { + if (!err) if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - } } static struct mbuf * Modified: head/sys/net80211/ieee80211_output.c == --- head/sys/net80211/ieee80211_output.cMon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_output.cMon Oct 12 04:30:38 2015 (r289164) @@ -132,7 +132,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 { struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = vap->iv_ifp; - int error, len, mcast; + int len, mcast; if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && (m->m_flags & M_PWR_SAV) == 0) { @@ -264,18 +264,13 @@ ieee80211_vap_pkt_send_dest(struct ieee8 return (ENOBUFS); } } - error = ieee80211_parent_xmitpkt(ic, m); + (void) ieee80211_parent_xmitpkt(ic, m); /* * Unlock at this point - no need to hold it
svn commit: r289165 - in head/sys: dev/ath dev/bwi dev/bwn dev/iwm dev/iwn dev/malo dev/mwl dev/otus dev/ral dev/usb/wlan dev/wi dev/wpi net80211
Author: adrian Date: Mon Oct 12 04:55:20 2015 New Revision: 289165 URL: https://svnweb.freebsd.org/changeset/base/289165 Log: net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output(). This doesn't free the mbuf upon error; the driver ic_raw_xmit method is still doing that. Submitted by: Differential Revision:https://reviews.freebsd.org/D3774 Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/bwi/if_bwi.c head/sys/dev/bwn/if_bwn.c head/sys/dev/iwm/if_iwm.c head/sys/dev/iwn/if_iwn.c head/sys/dev/malo/if_malo.c head/sys/dev/mwl/if_mwl.c head/sys/dev/otus/if_otus.c head/sys/dev/ral/rt2560.c head/sys/dev/ral/rt2661.c head/sys/dev/ral/rt2860.c head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_zyd.c head/sys/dev/wi/if_wi.c head/sys/dev/wpi/if_wpi.c head/sys/net80211/ieee80211_output.c Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cMon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/ath/if_ath_tx.cMon Oct 12 04:55:20 2015 (r289165) @@ -2452,7 +2452,6 @@ badbad: ATH_KTR(sc, ATH_KTR_TX, 2, "ath_raw_xmit: bad0: m=%p, params=%p", m, params); sc->sc_stats.ast_tx_raw_fail++; - ieee80211_free_node(ni); return error; } Modified: head/sys/dev/bwi/if_bwi.c == --- head/sys/dev/bwi/if_bwi.c Mon Oct 12 04:30:38 2015(r289164) +++ head/sys/dev/bwi/if_bwi.c Mon Oct 12 04:55:20 2015(r289165) @@ -1399,7 +1399,6 @@ bwi_raw_xmit(struct ieee80211_node *ni, int idx, error; if ((sc->sc_flags & BWI_F_RUNNING) == 0) { - ieee80211_free_node(ni); m_freem(m); return ENETDOWN; } @@ -1424,9 +1423,7 @@ bwi_raw_xmit(struct ieee80211_node *ni, tbd->tbd_used++; tbd->tbd_idx = (idx + 1) % BWI_TX_NDESC; sc->sc_tx_timer = 5; - } else - /* NB: m is reclaimed on encap failure */ - ieee80211_free_node(ni); + } BWI_UNLOCK(sc); return error; } Modified: head/sys/dev/bwn/if_bwn.c == --- head/sys/dev/bwn/if_bwn.c Mon Oct 12 04:30:38 2015(r289164) +++ head/sys/dev/bwn/if_bwn.c Mon Oct 12 04:55:20 2015(r289165) @@ -2684,29 +2684,26 @@ bwn_raw_xmit(struct ieee80211_node *ni, struct ieee80211com *ic = ni->ni_ic; struct bwn_softc *sc = ic->ic_softc; struct bwn_mac *mac = sc->sc_curmac; + int error; if ((sc->sc_flags & BWN_FLAG_RUNNING) == 0 || mac->mac_status < BWN_MAC_STATUS_STARTED) { - ieee80211_free_node(ni); m_freem(m); return (ENETDOWN); } BWN_LOCK(sc); if (bwn_tx_isfull(sc, m)) { - ieee80211_free_node(ni); m_freem(m); BWN_UNLOCK(sc); return (ENOBUFS); } - if (bwn_tx_start(sc, ni, m) != 0) { - if (ni != NULL) - ieee80211_free_node(ni); - } - sc->sc_watchdog_timer = 5; + error = bwn_tx_start(sc, ni, m); + if (error == 0) + sc->sc_watchdog_timer = 5; BWN_UNLOCK(sc); - return (0); + return (error); } /* Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Oct 12 04:30:38 2015(r289164) +++ head/sys/dev/iwm/if_iwm.c Mon Oct 12 04:55:20 2015(r289165) @@ -2877,7 +2877,6 @@ iwm_raw_xmit(struct ieee80211_node *ni, "->%s begin\n", __func__); if ((sc->sc_flags & IWM_FLAG_HW_INITED) == 0) { - ieee80211_free_node(ni); m_freem(m); IWM_DPRINTF(sc, IWM_DEBUG_XMIT, "<-%s not RUNNING\n", __func__); @@ -2891,10 +2890,6 @@ iwm_raw_xmit(struct ieee80211_node *ni, } else { error = iwm_tx(sc, m, ni, 0); } - if (error != 0) { - /* NB: m is reclaimed on tx failure */ - ieee80211_free_node(ni); - } sc->sc_tx_timer = 5; IWM_UNLOCK(sc); Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Mon Oct 12 04:30:38 2015(r289164) +++ head/sys/dev/iwn/if_iwn.c Mon Oct 12 04:55:20 2015(r289165) @@ -4875,7 +4875,6 @@
svn commit: r289167 - in head/sys: dev/usb/wlan modules/usb/urtwn
Author: adrian Date: Mon Oct 12 05:14:49 2015 New Revision: 289167 URL: https://svnweb.freebsd.org/changeset/base/289167 Log: urtwn(4): split *reg and *var parts (no functional change). Submitted by: Differential Revision:https://reviews.freebsd.org/D3775 Added: head/sys/dev/usb/wlan/if_urtwnvar.h (contents, props changed) Modified: head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_urtwnreg.h head/sys/modules/usb/urtwn/Makefile Modified: head/sys/dev/usb/wlan/if_urtwn.c == --- head/sys/dev/usb/wlan/if_urtwn.cMon Oct 12 04:57:36 2015 (r289166) +++ head/sys/dev/usb/wlan/if_urtwn.cMon Oct 12 05:14:49 2015 (r289167) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef USB_DEBUG static int urtwn_debug = 0; Modified: head/sys/dev/usb/wlan/if_urtwnreg.h == --- head/sys/dev/usb/wlan/if_urtwnreg.h Mon Oct 12 04:57:36 2015 (r289166) +++ head/sys/dev/usb/wlan/if_urtwnreg.h Mon Oct 12 05:14:49 2015 (r289167) @@ -1061,197 +1061,6 @@ struct r92c_tx_desc { /* - * Driver definitions. - */ -#define URTWN_RX_LIST_COUNT1 -#define URTWN_TX_LIST_COUNT8 -#define URTWN_HOST_CMD_RING_COUNT 32 - -#define URTWN_RXBUFSZ (16 * 1024) -#define URTWN_TXBUFSZ (sizeof(struct r92c_tx_desc) + IEEE80211_MAX_LEN) -#defineURTWN_RX_DESC_SIZE (sizeof(struct r92c_rx_stat)) -#defineURTWN_TX_DESC_SIZE (sizeof(struct r92c_tx_desc)) - -#define URTWN_RIDX_COUNT 28 - -#define URTWN_TX_TIMEOUT 5000/* ms */ - -#define URTWN_LED_LINK 0 -#define URTWN_LED_DATA 1 - -struct urtwn_rx_radiotap_header { - struct ieee80211_radiotap_header wr_ihdr; - uint8_t wr_flags; - uint8_t wr_rate; - uint16_twr_chan_freq; - uint16_twr_chan_flags; - uint8_t wr_dbm_antsignal; -} __packed __aligned(8); - -#define URTWN_RX_RADIOTAP_PRESENT \ - (1 << IEEE80211_RADIOTAP_FLAGS |\ -1 << IEEE80211_RADIOTAP_RATE | \ -1 << IEEE80211_RADIOTAP_CHANNEL | \ -1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) - -struct urtwn_tx_radiotap_header { - struct ieee80211_radiotap_header wt_ihdr; - uint8_t wt_flags; - uint16_twt_chan_freq; - uint16_twt_chan_flags; -} __packed __aligned(8); - -#define URTWN_TX_RADIOTAP_PRESENT \ - (1 << IEEE80211_RADIOTAP_FLAGS |\ -1 << IEEE80211_RADIOTAP_CHANNEL) - -struct urtwn_softc; - -struct urtwn_data { - struct urtwn_softc *sc; - uint8_t *buf; - uint16_tbuflen; - struct mbuf *m; - struct ieee80211_node *ni; - STAILQ_ENTRY(urtwn_data)next; -}; -typedef STAILQ_HEAD(, urtwn_data) urtwn_datahead; - -struct urtwn_cmdq { - void*arg0; - void*arg1; - void(*func)(void *); - struct ieee80211_key*k; - struct ieee80211_keykey; - uint8_t mac[IEEE80211_ADDR_LEN]; - uint8_t wcid; -}; - -struct urtwn_fw_info { - const uint8_t *data; - size_t size; -}; - -struct urtwn_vap { - struct ieee80211vap vap; - - int (*newstate)(struct ieee80211vap *, - enum ieee80211_state, int); -}; -#defineURTWN_VAP(vap) ((struct urtwn_vap *)(vap)) - -struct urtwn_host_cmd { - void(*cb)(struct urtwn_softc *, void *); - uint8_t data[256]; -}; - -struct urtwn_cmd_newstate { - enum ieee80211_statestate; - int arg; -}; - -struct urtwn_cmd_key { - struct ieee80211_keykey; - uint16_tassocid; -}; - -enum { - URTWN_BULK_RX, - URTWN_BULK_TX_BE, /* = WME_AC_BE */ - URTWN_BULK_TX_BK, /* = WME_AC_BK */ - URTWN_BULK_TX_VI, /* = WME_AC_VI */ - URTWN_BULK_TX_VO, /* = WME_AC_VI */ - URTWN_N_TRANSFER = 5, -}; - -#defineURTWN_EP_QUEUES URTWN_BULK_RX - -struct urtwn_softc { - struct ieee80211com sc_ic; - struct mbufqsc_snd; - device_tsc_dev; - struct usb_device *sc_udev; - - int ac2idx[WME_NUM_AC]; - u_int sc_flags; -#define URTWN_FLAG_CCK_HIPWR 0x01 -#define URTWN_DETACHED 0x02 -#defineURTWN_RUNNING 0x04 - - u_int chip; -#defineURTWN_CHIP_92
svn commit: r289168 - in head/sys/dev: iwm otus ral usb/wlan
Author: adrian Date: Mon Oct 12 05:21:51 2015 New Revision: 289168 URL: https://svnweb.freebsd.org/changeset/base/289168 Log: net80211 drivers: eliminate any references to sc_rxtap_len/sc_txtap_len (never used here) Submitted by: Differential Revision:https://reviews.freebsd.org/D3776 Modified: head/sys/dev/iwm/if_iwmvar.h head/sys/dev/otus/if_otus.c head/sys/dev/otus/if_otusreg.h head/sys/dev/ral/rt2560var.h head/sys/dev/ral/rt2661var.h head/sys/dev/ral/rt2860var.h head/sys/dev/usb/wlan/if_rsureg.h head/sys/dev/usb/wlan/if_runvar.h head/sys/dev/usb/wlan/if_uathvar.h head/sys/dev/usb/wlan/if_upgtvar.h head/sys/dev/usb/wlan/if_uralvar.h head/sys/dev/usb/wlan/if_urtwnvar.h head/sys/dev/usb/wlan/if_urtwvar.h head/sys/dev/usb/wlan/if_zydreg.h Modified: head/sys/dev/iwm/if_iwmvar.h == --- head/sys/dev/iwm/if_iwmvar.hMon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/iwm/if_iwmvar.hMon Oct 12 05:21:51 2015 (r289168) @@ -496,14 +496,12 @@ struct iwm_softc { uint8_t pad[IEEE80211_RADIOTAP_HDRLEN]; } sc_rxtapu; #define sc_rxtap sc_rxtapu.th - int sc_rxtap_len; union { struct iwm_tx_radiotap_header th; uint8_t pad[IEEE80211_RADIOTAP_HDRLEN]; } sc_txtapu; #define sc_txtap sc_txtapu.th - int sc_txtap_len; int sc_max_rssi; }; Modified: head/sys/dev/otus/if_otus.c == --- head/sys/dev/otus/if_otus.c Mon Oct 12 05:14:49 2015(r289167) +++ head/sys/dev/otus/if_otus.c Mon Oct 12 05:21:51 2015(r289168) @@ -1712,7 +1712,6 @@ otus_sub_rxeof(struct otus_softc *sc, ui break; } mb.m_data = (caddr_t)tap; - mb.m_len = sc->sc_rxtap_len; mb.m_next = m; mb.m_nextpkt = NULL; mb.m_type = 0; Modified: head/sys/dev/otus/if_otusreg.h == --- head/sys/dev/otus/if_otusreg.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/otus/if_otusreg.h Mon Oct 12 05:21:51 2015 (r289168) @@ -1017,14 +1017,12 @@ struct otus_softc { uint8_t pad[64]; } sc_rxtapu; #define sc_rxtap sc_rxtapu.th - int sc_rxtap_len; union { struct otus_tx_radiotap_header th; uint8_t pad[64]; } sc_txtapu; #define sc_txtap sc_txtapu.th - int sc_txtap_len; }; #endif /* __IF_OTUSREG_H__ */ Modified: head/sys/dev/ral/rt2560var.h == --- head/sys/dev/ral/rt2560var.hMon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/ral/rt2560var.hMon Oct 12 05:21:51 2015 (r289168) @@ -146,10 +146,8 @@ struct rt2560_softc { int nb_ant; struct rt2560_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; - struct rt2560_tx_radiotap_header sc_txtap; - int sc_txtap_len; + #define RT2560_F_INPUT_RUNNING 0x1 #define RT2560_F_RUNNING 0x2 int sc_flags; Modified: head/sys/dev/ral/rt2661var.h == --- head/sys/dev/ral/rt2661var.hMon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/ral/rt2661var.hMon Oct 12 05:21:51 2015 (r289168) @@ -157,9 +157,7 @@ struct rt2661_softc { int dwelltime; struct rt2661_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; struct rt2661_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; intrt2661_attach(device_t, int); Modified: head/sys/dev/ral/rt2860var.h == --- head/sys/dev/ral/rt2860var.hMon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/ral/rt2860var.hMon Oct 12 05:21:51 2015 (r289168) @@ -194,9 +194,7 @@ struct rt2860_softc { uint32_ttxpow40mhz_5ghz[5]; struct rt2860_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; struct rt2860_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; intrt2860_attach(device_t, int); Modified: head/sys/dev/usb/wlan/if_rsureg.h == --- head/s