svn commit: r298875 - head/sys/dev/iwm
Author: adrian Date: Sun May 1 05:01:10 2016 New Revision: 298875 URL: https://svnweb.freebsd.org/changeset/base/298875 Log: [iwn] fill in the TX command rate info flags consistently. The Linux driver sets the rate_n_flags regardless of whether it's being sent using firmware rate control or local rate control. This includes the antenna configuration. Thanks to Kyle Evansfor pointing this out to me and doing some investigation/testing on his end. Tested: * Intel 7260 STA, 2G and 5G networks Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Sun May 1 02:39:39 2016(r298874) +++ head/sys/dev/iwm/if_iwm.c Sun May 1 05:01:10 2016(r298875) @@ -2572,9 +2572,7 @@ iwm_tx_rateidx_lookup(struct iwm_softc * } /* - * Fill in various bit for management frames, and leave them - * unfilled for data frames (firmware takes care of that). - * Return the selected TX rate. + * Fill in the rate related information for a transmit command. */ static const struct iwm_rate * iwm_tx_fill_cmd(struct iwm_softc *sc, struct iwm_node *in, @@ -2606,28 +2604,28 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, st IWM_DPRINTF(sc, IWM_DEBUG_XMIT | IWM_DEBUG_TXRATE, "%s: start with i=%d, txrate %d\n", __func__, i, iwm_rates[ridx].rate); - /* XXX no rate_n_flags? */ - return _rates[ridx]; - } - - /* -* For non-data, use the lowest supported rate for the given -* operational mode. -* -* Note: there may not be any rate control information available. -* This driver currently assumes if we're transmitting data -* frames, use the rate control table. Grr. -* -* XXX TODO: use the configured rate for the traffic type! -*/ - if (ic->ic_curmode == IEEE80211_MODE_11A) { + } else { /* -* XXX this assumes the mode is either 11a or not 11a; -* definitely won't work for 11n. +* For non-data, use the lowest supported rate for the given +* operational mode. +* +* Note: there may not be any rate control information available. +* This driver currently assumes if we're transmitting data +* frames, use the rate control table. Grr. +* +* XXX TODO: use the configured rate for the traffic type! +* XXX TODO: this should be per-vap, not curmode; as we later +* on we'll want to handle off-channel stuff (eg TDLS). */ - ridx = IWM_RIDX_OFDM; - } else { - ridx = IWM_RIDX_CCK; + if (ic->ic_curmode == IEEE80211_MODE_11A) { + /* +* XXX this assumes the mode is either 11a or not 11a; +* definitely won't work for 11n. +*/ + ridx = IWM_RIDX_OFDM; + } else { + ridx = IWM_RIDX_CCK; + } } rinfo = _rates[ridx]; @@ -2642,7 +2640,6 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, st rate_flags = 1 << IWM_RATE_MCS_ANT_POS; if (IWM_RIDX_IS_CCK(ridx)) rate_flags |= IWM_RATE_MCS_CCK_MSK; - /* XXX hard-coded tx rate */ tx->rate_n_flags = htole32(rate_flags | rinfo->plcp); return rinfo; ___ 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: r298874 - head/sbin/restore
Author: pfg Date: Sun May 1 02:39:39 2016 New Revision: 298874 URL: https://svnweb.freebsd.org/changeset/base/298874 Log: restore: fix resource handle leak. CID: 1007784 MFC after:5 days Modified: head/sbin/restore/symtab.c Modified: head/sbin/restore/symtab.c == --- head/sbin/restore/symtab.c Sun May 1 02:31:22 2016(r298873) +++ head/sbin/restore/symtab.c Sun May 1 02:39:39 2016(r298874) @@ -559,6 +559,7 @@ initsymtable(char *filename) fprintf(stderr, "read: %s\n", strerror(errno)); panic("cannot read symbol table file %s\n", filename); } + (void)close(fd); switch (command) { case 'r': /* ___ 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: r298873 - head/sbin/restore
Author: pfg Date: Sun May 1 02:31:22 2016 New Revision: 298873 URL: https://svnweb.freebsd.org/changeset/base/298873 Log: restore: drop casts for calloc(). Modified: head/sbin/restore/symtab.c Modified: head/sbin/restore/symtab.c == --- head/sbin/restore/symtab.c Sun May 1 02:24:05 2016(r298872) +++ head/sbin/restore/symtab.c Sun May 1 02:31:22 2016(r298873) @@ -535,9 +535,8 @@ initsymtable(char *filename) vprintf(stdout, "Initialize symbol table.\n"); if (filename == NULL) { entrytblsize = maxino / HASHFACTOR; - entry = (struct entry **) - calloc((unsigned)entrytblsize, sizeof(struct entry *)); - if (entry == (struct entry **)NULL) + entry = calloc((unsigned)entrytblsize, sizeof(struct entry *)); + if (entry == NULL) panic("no memory for entry table\n"); ep = addentry(".", ROOTINO, NODE); ep->e_flags |= NEW; ___ 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: r298872 - in head/sbin: dump fsck_ffs geom/class/virstor recoverdisk
Author: pfg Date: Sun May 1 02:24:05 2016 New Revision: 298872 URL: https://svnweb.freebsd.org/changeset/base/298872 Log: sbin: ake use of our rounddown() macro when sys/param.h is available. No functional change. Modified: head/sbin/dump/main.c head/sbin/fsck_ffs/inode.c head/sbin/fsck_ffs/suj.c head/sbin/geom/class/virstor/geom_virstor.c head/sbin/recoverdisk/recoverdisk.c Modified: head/sbin/dump/main.c == --- head/sbin/dump/main.c Sun May 1 02:19:49 2016(r298871) +++ head/sbin/dump/main.c Sun May 1 02:24:05 2016(r298872) @@ -267,7 +267,7 @@ main(int argc, char *argv[]) } if (blocksperfile) - blocksperfile = blocksperfile / ntrec * ntrec; /* round down */ + blocksperfile = rounddown(blocksperfile, ntrec); else if (!unlimited) { /* * Determine how to default tape size and density Modified: head/sbin/fsck_ffs/inode.c == --- head/sbin/fsck_ffs/inode.c Sun May 1 02:19:49 2016(r298871) +++ head/sbin/fsck_ffs/inode.c Sun May 1 02:24:05 2016(r298872) @@ -293,7 +293,7 @@ ginode(ino_t inumber) if (pbp != NULL) pbp->b_flags &= ~B_INUSE; pbp = getdatablk(iblk, sblock.fs_bsize, BT_INODES); - startinum = (inumber / INOPB()) * INOPB(); + startinum = rounddown(inumber, INOPB()); } if (sblock.fs_magic == FS_UFS1_MAGIC) return ((union dinode *) Modified: head/sbin/fsck_ffs/suj.c == --- head/sbin/fsck_ffs/suj.cSun May 1 02:19:49 2016(r298871) +++ head/sbin/fsck_ffs/suj.cSun May 1 02:24:05 2016(r298872) @@ -911,7 +911,7 @@ ino_isat(ino_t parent, off_t diroff, ino * certain we hit a valid record and not some junk in the middle * of a file name. Stop when we reach or pass the expected offset. */ - dpoff = (doff / DIRBLKSIZ) * DIRBLKSIZ; + dpoff = rounddown(doff, DIRBLKSIZ); do { dp = (struct direct *)[dpoff]; if (dpoff == doff) Modified: head/sbin/geom/class/virstor/geom_virstor.c == --- head/sbin/geom/class/virstor/geom_virstor.c Sun May 1 02:19:49 2016 (r298871) +++ head/sbin/geom/class/virstor/geom_virstor.c Sun May 1 02:24:05 2016 (r298872) @@ -255,7 +255,7 @@ virstor_label(struct gctl_req *req) if (md.md_chunk_size % MAXPHYS != 0) { /* XXX: This is not strictly needed, but it's convenient to * impose some limitations on it, so why not MAXPHYS. */ - size_t new_size = (md.md_chunk_size / MAXPHYS) * MAXPHYS; + size_t new_size = rounddown(md.md_chunk_size, MAXPHYS); if (new_size < md.md_chunk_size) new_size += MAXPHYS; fprintf(stderr, "Resizing chunk size to be a multiple of " Modified: head/sbin/recoverdisk/recoverdisk.c == --- head/sbin/recoverdisk/recoverdisk.c Sun May 1 02:19:49 2016 (r298871) +++ head/sbin/recoverdisk/recoverdisk.c Sun May 1 02:24:05 2016 (r298872) @@ -207,7 +207,7 @@ main(int argc, char * const argv[]) sectorsize = stripesize; minsize = sectorsize; - bigsize = (bigsize / sectorsize) * sectorsize; + bigsize = rounddown(bigsize, sectorsize); error = ioctl(fdr, DIOCGMEDIASIZE, ); if (error < 0) @@ -222,7 +222,7 @@ main(int argc, char * const argv[]) for (ch = 0; (bigsize >> ch) > minsize; ch++) continue; medsize = bigsize >> (ch / 2); - medsize = (medsize / minsize) * minsize; + medsize = rounddown(medsize, minsize); fprintf(stderr, "Bigsize = %zu, medsize = %zu, minsize = %zu\n", bigsize, medsize, minsize); ___ 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: r298871 - in head/sbin: growfs newfs_nandfs
Author: pfg Date: Sun May 1 02:19:49 2016 New Revision: 298871 URL: https://svnweb.freebsd.org/changeset/base/298871 Log: sbin: use our howmany() macro when available through . Modified: head/sbin/growfs/debug.c head/sbin/newfs_nandfs/newfs_nandfs.c Modified: head/sbin/growfs/debug.c == --- head/sbin/growfs/debug.cSat Apr 30 23:42:46 2016(r298870) +++ head/sbin/growfs/debug.cSun May 1 02:19:49 2016(r298871) @@ -518,7 +518,8 @@ dbg_dump_frmap(struct fs *sb, const char cp = (unsigned char *)cg_blksfree(cgr); if (sb->fs_old_nspf) - e = howmany((sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf), CHAR_BIT); + e = howmany(sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf, + CHAR_BIT); else e = 0; for (j = 0; j < e; j += 32) { Modified: head/sbin/newfs_nandfs/newfs_nandfs.c == --- head/sbin/newfs_nandfs/newfs_nandfs.c Sat Apr 30 23:42:46 2016 (r298870) +++ head/sbin/newfs_nandfs/newfs_nandfs.c Sun May 1 02:19:49 2016 (r298871) @@ -132,7 +132,7 @@ static uint32_t nuserfiles; static uint32_t seg_nblocks; static uint32_t seg_endblock; -#define SIZE_TO_BLOCK(size) (((size) + (blocksize - 1)) / blocksize) +#define SIZE_TO_BLOCK(size) howmany(size, blocksize) static uint32_t nandfs_first_block(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: r298868 - head/sbin/restore
Author: pfg Date: Sat Apr 30 22:51:09 2016 New Revision: 298868 URL: https://svnweb.freebsd.org/changeset/base/298868 Log: restore: fix memory leak. CID: 272297 MFC after:5 days Modified: head/sbin/restore/main.c Modified: head/sbin/restore/main.c == --- head/sbin/restore/main.cSat Apr 30 22:20:32 2016(r298867) +++ head/sbin/restore/main.cSat Apr 30 22:51:09 2016(r298868) @@ -366,7 +366,8 @@ obsolete(int *argcp, char **argvp[]) if (flags) { *p = '\0'; *nargv++ = flagsp; - } + } else + free(flagsp); /* Copy remaining arguments. */ while ((*nargv++ = *argv++)); ___ 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: r298768 - in head: bin/tests cddl/lib/tests cddl/sbin/tests cddl/tests cddl/usr.bin/tests cddl/usr.sbin/tests gnu/lib/tests gnu/tests gnu/usr.bin/tests lib/atf/libatf-c/tests/detail li
> On Apr 28, 2016, at 22:28, Glen Barberwrote: > > Author: gjb > Date: Fri Apr 29 05:28:40 2016 > New Revision: 298768 > URL: https://svnweb.freebsd.org/changeset/base/298768 > > Log: > Fix including Kyuafile in packaged base system. > > Fix a related typo while here. > > Note, this change results in the Kyuafile inclusion in the runtime > package, which needs to be fixed, however addresses the PR as far > as I can tell in my tests. > > PR: 209114 > Submitted by:ngie > Sponsored by:The FreeBSD Foundation Unfortunately it’s still broken in subdirectories. I’m fixing the issue right now. ___ 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: r298864 - head/share/mk
Author: ngie Date: Sat Apr 30 21:32:29 2016 New Revision: 298864 URL: https://svnweb.freebsd.org/changeset/base/298864 Log: Allow FILESGROUPS to be specified more than once by pruning out duplicates MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.files.mk Modified: head/share/mk/bsd.files.mk == --- head/share/mk/bsd.files.mk Sat Apr 30 21:27:41 2016(r298863) +++ head/share/mk/bsd.files.mk Sat Apr 30 21:32:29 2016(r298864) @@ -9,7 +9,7 @@ : FILESGROUPS?= FILES -_FILESGROUPS= ${FILESGROUPS:C,[/*],_,g} +_FILESGROUPS= ${FILESGROUPS:C,[/*],_,g:u} .for group in ${_FILESGROUPS} # Add in foo.yes and remove duplicates from all the groups ___ 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: r298863 - in head: share/man/man5 usr.sbin/jail
Author: jamie Date: Sat Apr 30 21:27:41 2016 New Revision: 298863 URL: https://svnweb.freebsd.org/changeset/base/298863 Log: Clarify when happens when there is a "depend" parameter in jail.conf, and how this affects the "jail_list" option in rc.conf. Modified: head/share/man/man5/rc.conf.5 head/usr.sbin/jail/jail.8 Modified: head/share/man/man5/rc.conf.5 == --- head/share/man/man5/rc.conf.5 Sat Apr 30 20:05:23 2016 (r298862) +++ head/share/man/man5/rc.conf.5 Sat Apr 30 21:27:41 2016 (r298863) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 29, 2016 +.Dd April 30, 2016 .Dt RC.CONF 5 .Os .Sh NAME @@ -3868,6 +3868,9 @@ The names specified in this list control instances missing from .Va jail_list must be started manually. +Note that a jail's +.Va depend +parameter in the configuration file may override this list. .It Va jail_reverse_stop .Pq Vt bool When set to Modified: head/usr.sbin/jail/jail.8 == --- head/usr.sbin/jail/jail.8 Sat Apr 30 20:05:23 2016(r298862) +++ head/usr.sbin/jail/jail.8 Sat Apr 30 21:27:41 2016(r298863) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2016 +.Dd April 30, 2016 .Dt JAIL 8 .Os .Sh NAME @@ -838,13 +838,14 @@ Allow making changes to a jail. .It Va depend Specify a jail (or jails) that this jail depends on. -Any such jails must be fully created, up to the last +When this jail is to be created, any jail(s) it depends on must already exist. +If not, they will be created automatically, up to the completion of the last .Va exec.poststart command, before any action will taken to create this jail. When jails are removed the opposite is true: -this jail must be fully removed, up to the last +this jail will be removed, up to the last .Va exec.poststop -command, before the jail(s) it depends on are stopped. +command, before any jail(s) it depends on are stopped. .El .Sh EXAMPLES Jails are typically set up using one of two philosophies: either to ___ 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: r298862 - head/sbin/restore
Author: pfg Date: Sat Apr 30 20:05:23 2016 New Revision: 298862 URL: https://svnweb.freebsd.org/changeset/base/298862 Log: restore: use our howmany() instead of reinventing the macro. Modified: head/sbin/restore/interactive.c Modified: head/sbin/restore/interactive.c == --- head/sbin/restore/interactive.c Sat Apr 30 19:58:54 2016 (r298861) +++ head/sbin/restore/interactive.c Sat Apr 30 20:05:23 2016 (r298862) @@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$"); #include "restore.h" #include "extern.h" -#define round(a, b) (((a) + (b) - 1) / (b) * (b)) - /* * Things to handle interruptions. */ @@ -671,7 +669,7 @@ formatf(struct afile *list, int nentry) columns = 81 / width; if (columns == 0) columns = 1; - lines = (nentry + columns - 1) / columns; + lines = howmany(nentry, columns); for (i = 0; i < lines; i++) { for (j = 0; j < columns; j++) { fp = [j * lines + i]; ___ 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: r298861 - in head/sbin: fdisk fdisk_pc98
Author: pfg Date: Sat Apr 30 19:58:54 2016 New Revision: 298861 URL: https://svnweb.freebsd.org/changeset/base/298861 Log: fdisk: drop unused macro and make use of roundup()/rounddown(). Modified: head/sbin/fdisk/fdisk.c head/sbin/fdisk_pc98/fdisk.c Modified: head/sbin/fdisk/fdisk.c == --- head/sbin/fdisk/fdisk.c Sat Apr 30 19:50:59 2016(r298860) +++ head/sbin/fdisk/fdisk.c Sat Apr 30 19:58:54 2016(r298861) @@ -67,8 +67,6 @@ static char lbuf[LBUF]; #define Decimal(str, ans, tmp, maxval) if (decimal(str, , ans, maxval)) ans = tmp -#define RoundCyl(x) x) + cylsecs - 1) / cylsecs) * cylsecs) - #define MAX_SEC_SIZE 2048 /* maximum section size that is supported */ #define MIN_SEC_SIZE 512 /* the sector size to start sensing at */ static int secsize = 0;/* the sensed sector size */ @@ -387,7 +385,7 @@ main(int argc, char *argv[]) partp->dp_typ = DOSPTYP_386BSD; partp->dp_flag = ACTIVE; partp->dp_start = dos_sectors; - partp->dp_size = (disksecs / dos_cylsecs) * dos_cylsecs - + partp->dp_size = rounddown(disksecs, dos_cylsecs) - dos_sectors; dos(partp); if (v_flag) @@ -540,11 +538,11 @@ init_sector0(unsigned long start) partp->dp_typ = DOSPTYP_386BSD; partp->dp_flag = ACTIVE; - start = ((start + dos_sectors - 1) / dos_sectors) * dos_sectors; + start = roundup(start, dos_sectors); if(start == 0) start = dos_sectors; partp->dp_start = start; - partp->dp_size = (disksecs / dos_cylsecs) * dos_cylsecs - start; + partp->dp_size = rounddown(disksecs, dos_cylsecs) - start; dos(partp); } @@ -1188,8 +1186,8 @@ process_partition(CMD *command) prev_partp->dp_size; } if (partp->dp_start % dos_sectors != 0) { - prev_head_boundary = partp->dp_start / - dos_sectors * dos_sectors; + prev_head_boundary = rounddown(partp->dp_start, + dos_sectors); partp->dp_start = prev_head_boundary + dos_sectors; } @@ -1203,15 +1201,15 @@ process_partition(CMD *command) if (command->args[3].arg_str != NULL) { if (strcmp(command->args[3].arg_str, "*") == 0) - partp->dp_size = ((disksecs / dos_cylsecs) * - dos_cylsecs) - partp->dp_start; + partp->dp_size = rounddown(disksecs, dos_cylsecs) - + partp->dp_start; else { partp->dp_size = str2sectors(command->args[3].arg_str); if (partp->dp_size == NO_DISK_SECTORS) break; } - prev_cyl_boundary = ((partp->dp_start + partp->dp_size) / - dos_cylsecs) * dos_cylsecs; + prev_cyl_boundary = rounddown(partp->dp_start + partp->dp_size, + dos_cylsecs); if (prev_cyl_boundary > partp->dp_start) partp->dp_size = prev_cyl_boundary - partp->dp_start; } else @@ -1235,7 +1233,7 @@ process_partition(CMD *command) * Adjust start upwards, if necessary, to fall on a head boundary. */ if (partp->dp_start % dos_sectors != 0) { - prev_head_boundary = partp->dp_start / dos_sectors * dos_sectors; + prev_head_boundary = rounddown(partp->dp_start, dos_sectors); if (max_end < dos_sectors || prev_head_boundary > max_end - dos_sectors) { /* @@ -1259,8 +1257,8 @@ process_partition(CMD *command) * Adjust size downwards, if necessary, to fall on a cylinder * boundary. */ - prev_cyl_boundary = - ((partp->dp_start + partp->dp_size) / dos_cylsecs) * dos_cylsecs; + prev_cyl_boundary = rounddown(partp->dp_start + partp->dp_size, + dos_cylsecs); if (prev_cyl_boundary > partp->dp_start) adj_size = prev_cyl_boundary - partp->dp_start; else { @@ -1451,7 +1449,7 @@ sanitize_partition(struct dos_partition * Adjust start upwards, if necessary, to fall on a head boundary. */ if (start % dos_sectors != 0) { - prev_head_boundary = start / dos_sectors * dos_sectors; + prev_head_boundary = rounddown(start, dos_sectors); if (max_end < dos_sectors || prev_head_boundary >= max_end - dos_sectors) { /* @@ -1468,7 +1466,7 @@ sanitize_partition(struct dos_partition * Adjust size downwards,
svn commit: r298860 - head/sys/powerpc/powerpc
Author: pfg Date: Sat Apr 30 19:50:59 2016 New Revision: 298860 URL: https://svnweb.freebsd.org/changeset/base/298860 Log: powerpc: Replace rounddown() from r298856 with roundup(). Both are equivalent but roundup is more logical for this case. Catch another case while here. Pointed out by: jhibbits Modified: head/sys/powerpc/powerpc/exec_machdep.c Modified: head/sys/powerpc/powerpc/exec_machdep.c == --- head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 19:29:03 2016 (r298859) +++ head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 19:50:59 2016 (r298860) @@ -162,7 +162,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, code = siginfo32.si_code; sfp = (caddr_t) sfpsize = sizeof(sf32); - rndfsize = rounddown(sizeof(sf32) + 15, 16); + rndfsize = roundup(sizeof(sf32), 16); /* * Save user context @@ -189,9 +189,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, * 64-bit PPC defines a 288 byte scratch region * below the stack. */ - rndfsize = 288 + rounddown(sizeof(sf) + 47, 48); + rndfsize = 288 + roundup(sizeof(sf), 48); #else - rndfsize = rounddown(sizeof(sf) + 15, 16); + rndfsize = roundup(sizeof(sf), 16); #endif /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r298856 - head/sys/powerpc/powerpc
On 04/30/16 14:24, Justin Hibbits wrote: On Apr 30, 2016 13:56, "Pedro F. Giffuni"> wrote: Author: pfg Date: Sat Apr 30 18:56:35 2016 New Revision: 298856 URL: https://svnweb.freebsd.org/changeset/base/298856 Log: powerpc: Make use of our rounddown() macro when sys/param.h is available. No functional change. Modified: head/sys/powerpc/powerpc/exec_machdep.c Modified: head/sys/powerpc/powerpc/exec_machdep.c == --- head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:07:13 2016(r298855) +++ head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:56:35 2016(r298856) @@ -162,7 +162,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, code = siginfo32.si_code; sfp = (caddr_t) sfpsize = sizeof(sf32); - rndfsize = ((sizeof(sf32) + 15) / 16) * 16; + rndfsize = rounddown(sizeof(sf32) + 15, 16); /* * Save user context @@ -189,9 +189,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, * 64-bit PPC defines a 288 byte scratch region * below the stack. */ - rndfsize = 288 + ((sizeof(sf) + 47) / 48) * 48; + rndfsize = 288 + rounddown(sizeof(sf) + 47, 48); #else - rndfsize = ((sizeof(sf) + 15) / 16) * 16; + rndfsize = rounddown(sizeof(sf) + 15, 16); #endif /* I think these should all be roundup(sizeof(sf), (16 or 48)). Yes, makes sense. roundup() is a special case of rounddown() but coccinelle doesn't do math ;). Thanks, Pedro. ___ 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: r298859 - in head/sys/mips: include mips
Author: rwatson Date: Sat Apr 30 19:29:03 2016 New Revision: 298859 URL: https://svnweb.freebsd.org/changeset/base/298859 Log: When attempting to satisfy mmap() requests for superpage alignment on 64-bit MIPS, use superpage rather than physical-segment constants, or we may improperly fail to apply suitable alignment -- yet still allow mmap() to appear to succeed. Reviewed by: sson MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/sys/mips/include/param.h head/sys/mips/mips/pmap.c Modified: head/sys/mips/include/param.h == --- head/sys/mips/include/param.h Sat Apr 30 19:04:59 2016 (r298858) +++ head/sys/mips/include/param.h Sat Apr 30 19:29:03 2016 (r298859) @@ -146,12 +146,14 @@ #defineSEGSHIFT(PAGE_SHIFT + NPTEPGSHIFT + NPDEPGSHIFT) #defineNBSEG (1ul << SEGSHIFT) #definePDRSHIFT(PAGE_SHIFT + NPTEPGSHIFT) +#definePDRSIZE (1ul << PDRSHIFT) #definePDRMASK ((1 << PDRSHIFT) - 1) #else #defineNPDEPGSHIFT 10 /* LOG2(NPTEPG) */ #defineSEGSHIFT(PAGE_SHIFT + NPTEPGSHIFT) #defineNBSEG (1 << SEGSHIFT) /* bytes/segment */ #definePDRSHIFTSEGSHIFT/* alias for SEG in 32 bit */ +#definePDRSIZE (1ul << PDRSHIFT) #definePDRMASK ((1 << PDRSHIFT) - 1) #endif #defineNBPDR (1 << PDRSHIFT) /* bytes/pagedir */ Modified: head/sys/mips/mips/pmap.c == --- head/sys/mips/mips/pmap.c Sat Apr 30 19:04:59 2016(r298858) +++ head/sys/mips/mips/pmap.c Sat Apr 30 19:29:03 2016(r298859) @@ -3299,18 +3299,18 @@ pmap_align_superpage(vm_object_t object, { vm_offset_t superpage_offset; - if (size < NBSEG) + if (size < PDRSIZE) return; if (object != NULL && (object->flags & OBJ_COLORED) != 0) offset += ptoa(object->pg_color); - superpage_offset = offset & SEGMASK; - if (size - ((NBSEG - superpage_offset) & SEGMASK) < NBSEG || - (*addr & SEGMASK) == superpage_offset) + superpage_offset = offset & PDRMASK; + if (size - ((PDRSIZE - superpage_offset) & PDRMASK) < PDRSIZE || + (*addr & PDRMASK) == superpage_offset) return; - if ((*addr & SEGMASK) < superpage_offset) - *addr = (*addr & ~SEGMASK) + superpage_offset; + if ((*addr & PDRMASK) < superpage_offset) + *addr = (*addr & ~PDRMASK) + superpage_offset; else - *addr = ((*addr + SEGMASK) & ~SEGMASK) + superpage_offset; + *addr = ((*addr + PDRMASK) & ~PDRMASK) + superpage_offset; } #ifdef DDB ___ 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: r298856 - head/sys/powerpc/powerpc
On Apr 30, 2016 13:56, "Pedro F. Giffuni"wrote: > > Author: pfg > Date: Sat Apr 30 18:56:35 2016 > New Revision: 298856 > URL: https://svnweb.freebsd.org/changeset/base/298856 > > Log: > powerpc: Make use of our rounddown() macro when sys/param.h is available. > > No functional change. > > Modified: > head/sys/powerpc/powerpc/exec_machdep.c > > Modified: head/sys/powerpc/powerpc/exec_machdep.c > == > --- head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:07:13 2016 (r298855) > +++ head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:56:35 2016 (r298856) > @@ -162,7 +162,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, > code = siginfo32.si_code; > sfp = (caddr_t) > sfpsize = sizeof(sf32); > - rndfsize = ((sizeof(sf32) + 15) / 16) * 16; > + rndfsize = rounddown(sizeof(sf32) + 15, 16); > > /* > * Save user context > @@ -189,9 +189,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, > * 64-bit PPC defines a 288 byte scratch region > * below the stack. > */ > - rndfsize = 288 + ((sizeof(sf) + 47) / 48) * 48; > + rndfsize = 288 + rounddown(sizeof(sf) + 47, 48); > #else > - rndfsize = ((sizeof(sf) + 15) / 16) * 16; > + rndfsize = rounddown(sizeof(sf) + 15, 16); > #endif > > /* > I think these should all be roundup(sizeof(sf), (16 or 48)). - Justin ___ 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: r298858 - in head/sbin: camcontrol ipfw pfctl swapon
Author: pfg Date: Sat Apr 30 19:04:59 2016 New Revision: 298858 URL: https://svnweb.freebsd.org/changeset/base/298858 Log: sbin: minor spelling fixes. No functional change. Modified: head/sbin/camcontrol/fwdownload.c head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipv6.c head/sbin/pfctl/parse.y head/sbin/swapon/swapon.c Modified: head/sbin/camcontrol/fwdownload.c == --- head/sbin/camcontrol/fwdownload.c Sat Apr 30 19:01:51 2016 (r298857) +++ head/sbin/camcontrol/fwdownload.c Sat Apr 30 19:04:59 2016 (r298858) @@ -216,7 +216,7 @@ static struct fw_vendor vendors_list[] = * since we won't actually send a WRITE BUFFER with any of the * listed parameters. If a SATA device is behind a SAS controller, * the SCSI to ATA translation code (at least for LSI) doesn't -* generaly translate a SCSI WRITE BUFFER into an ATA DOWNLOAD +* generally translate a SCSI WRITE BUFFER into an ATA DOWNLOAD * MICROCODE command. So, we use the SCSI ATA PASS_THROUGH command * to send the ATA DOWNLOAD MICROCODE command instead. */ Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Sat Apr 30 19:01:51 2016(r298857) +++ head/sbin/ipfw/ipfw2.c Sat Apr 30 19:04:59 2016(r298858) @@ -82,7 +82,7 @@ int ipfw_socket = -1; * Check if we have enough space in cmd buffer. Note that since * first 8? u32 words are reserved by reserved header, full cmd * buffer can't be used, so we need to protect from buffer overrun - * only. At the beginnig, cblen is less than actual buffer size by + * only. At the beginning, cblen is less than actual buffer size by * size of ipfw_insn_u32 instruction + 1 u32 work. This eliminates need * for checking small instructions fitting in given range. * We also (ab)use the fact that ipfw_insn is always the first field @@ -4929,7 +4929,7 @@ table_search_ctlv(ipfw_obj_ctlv *ctlv, u * Rules in reply are modified to store their actual ruleset number. * * (*1) TLVs inside IPFW_TLV_TBL_LIST needs to be sorted ascending - * accoring to their idx field and there has to be no duplicates. + * according to their idx field and there has to be no duplicates. * (*2) Numbered rules inside IPFW_TLV_RULE_LIST needs to be sorted ascending. * (*3) Each ip_fw structure needs to be aligned to u64 boundary. */ Modified: head/sbin/ipfw/ipv6.c == --- head/sbin/ipfw/ipv6.c Sat Apr 30 19:01:51 2016(r298857) +++ head/sbin/ipfw/ipv6.c Sat Apr 30 19:04:59 2016(r298858) @@ -325,7 +325,7 @@ lookup_host6 (char *host, struct in6_add * any matches any IP6. Actually returns an empty instruction. * me returns O_IP6_*_ME * - * 03f1::234:123:0342 single IP6 addres + * 03f1::234:123:0342 single IP6 address * 03f1::234:123:0342/24 address/mask * 03f1::234:123:0342/24,03f1::234:123:0343/ List of address * Modified: head/sbin/pfctl/parse.y == --- head/sbin/pfctl/parse.y Sat Apr 30 19:01:51 2016(r298857) +++ head/sbin/pfctl/parse.y Sat Apr 30 19:04:59 2016(r298858) @@ -6173,7 +6173,7 @@ rt_tableid_max(void) /* * As the OpenBSD code only compares > and not >= we need to adjust * here given we only accept values of 0..n and want to avoid #ifdefs -* in the grammer. +* in the grammar. */ return (fibs - 1); #else Modified: head/sbin/swapon/swapon.c == --- head/sbin/swapon/swapon.c Sat Apr 30 19:01:51 2016(r298857) +++ head/sbin/swapon/swapon.c Sat Apr 30 19:04:59 2016(r298858) @@ -428,7 +428,7 @@ swap_on_off_geli(const char *name, char free(args); if (error) { - /* error occured during creation. */ + /* error occurred during creation. */ if (qflag == 0) warnx("%s: Invalid parameters", name); return (NULL); ___ 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: r298857 - head/etc/rc.d
Author: peter Date: Sat Apr 30 19:01:51 2016 New Revision: 298857 URL: https://svnweb.freebsd.org/changeset/base/298857 Log: Fix incorrect permissions for /etc/rc.d/sendmail in fallout from release-pkg merge. Modified: head/etc/rc.d/Makefile Modified: head/etc/rc.d/Makefile == --- head/etc/rc.d/Makefile Sat Apr 30 18:56:35 2016(r298856) +++ head/etc/rc.d/Makefile Sat Apr 30 19:01:51 2016(r298857) @@ -295,7 +295,7 @@ FILESGROUPS+= SMRCD SMRCD= sendmail .endif SMRCDDIR= /etc/rc.d -SMRCDDIRMODE= ${BINMODE} +SMRCDMODE= ${BINMODE} SMRCDPACKAGE= sendmail .if ${MK_TIMED} != "no" ___ 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: r298856 - head/sys/powerpc/powerpc
Author: pfg Date: Sat Apr 30 18:56:35 2016 New Revision: 298856 URL: https://svnweb.freebsd.org/changeset/base/298856 Log: powerpc: Make use of our rounddown() macro when sys/param.h is available. No functional change. Modified: head/sys/powerpc/powerpc/exec_machdep.c Modified: head/sys/powerpc/powerpc/exec_machdep.c == --- head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:07:13 2016 (r298855) +++ head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:56:35 2016 (r298856) @@ -162,7 +162,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, code = siginfo32.si_code; sfp = (caddr_t) sfpsize = sizeof(sf32); - rndfsize = ((sizeof(sf32) + 15) / 16) * 16; + rndfsize = rounddown(sizeof(sf32) + 15, 16); /* * Save user context @@ -189,9 +189,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, * 64-bit PPC defines a 288 byte scratch region * below the stack. */ - rndfsize = 288 + ((sizeof(sf) + 47) / 48) * 48; + rndfsize = 288 + rounddown(sizeof(sf) + 47, 48); #else - rndfsize = ((sizeof(sf) + 15) / 16) * 16; + rndfsize = rounddown(sizeof(sf) + 15, 16); #endif /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r298855 - head/sys/arm/allwinner
Author: manu Date: Sat Apr 30 18:07:13 2016 New Revision: 298855 URL: https://svnweb.freebsd.org/changeset/base/298855 Log: ACK the interrupt after disabling it, this avoid an interrupt storm. Approved by: andrew (mentor) Modified: head/sys/arm/allwinner/aw_nmi.c Modified: head/sys/arm/allwinner/aw_nmi.c == --- head/sys/arm/allwinner/aw_nmi.c Sat Apr 30 17:27:33 2016 (r298854) +++ head/sys/arm/allwinner/aw_nmi.c Sat Apr 30 18:07:13 2016 (r298855) @@ -277,8 +277,11 @@ aw_nmi_teardown_intr(device_t dev, struc static void aw_nmi_pre_ithread(device_t dev, struct intr_irqsrc *isrc) { + struct aw_nmi_softc *sc; + sc = device_get_softc(dev); aw_nmi_disable_intr(dev, isrc); + SC_NMI_WRITE(sc, NMI_IRQ_PENDING_REG, NMI_IRQ_ACK); } 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: r298854 - in head/sys: arm/allwinner arm/arm arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/include arm/nvidia/tegra124 arm/qemu arm/ti conf
Author: andrew Date: Sat Apr 30 17:27:33 2016 New Revision: 298854 URL: https://svnweb.freebsd.org/changeset/base/298854 Log: Add a MULTIDELAY option to allow the ARM kernel to have multiple DELAY implementations. Early in the boot the kernel will use an approximate, however after the timer has been probed it will switch to a more accurate implementation. Reviewed by: manu Sponsored by: ABT Systems Ltd Differential Revision:https://reviews.freebsd.org/D5762 Modified: head/sys/arm/allwinner/allwinner_machdep.c head/sys/arm/allwinner/timer.c head/sys/arm/arm/generic_timer.c head/sys/arm/arm/machdep.c head/sys/arm/arm/platform.c head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/conf/A10 head/sys/arm/conf/ALLWINNER head/sys/arm/conf/VIRT head/sys/arm/freescale/imx/imx51_machdep.c head/sys/arm/freescale/imx/imx53_machdep.c head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/include/machdep.h head/sys/arm/include/platformvar.h head/sys/arm/nvidia/tegra124/tegra124_machdep.c head/sys/arm/qemu/virt_machdep.c head/sys/arm/ti/ti_machdep.c head/sys/conf/options.arm Modified: head/sys/arm/allwinner/allwinner_machdep.c == --- head/sys/arm/allwinner/allwinner_machdep.c Sat Apr 30 16:01:37 2016 (r298853) +++ head/sys/arm/allwinner/allwinner_machdep.c Sat Apr 30 17:27:33 2016 (r298854) @@ -148,7 +148,7 @@ static platform_method_t a10_methods[] = PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(a10, "a10", 0, "allwinner,sun4i-a10"); +FDT_PLATFORM_DEF(a10, "a10", 0, "allwinner,sun4i-a10", 200); #endif #if defined(SOC_ALLWINNER_A20) @@ -163,7 +163,7 @@ static platform_method_t a20_methods[] = #endif PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(a20, "a20", 0, "allwinner,sun7i-a20"); +FDT_PLATFORM_DEF(a20, "a20", 0, "allwinner,sun7i-a20", 200); #endif #if defined(SOC_ALLWINNER_A31) @@ -178,7 +178,7 @@ static platform_method_t a31_methods[] = #endif PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(a31, "a31", 0, "allwinner,sun6i-a31"); +FDT_PLATFORM_DEF(a31, "a31", 0, "allwinner,sun6i-a31", 200); #endif #if defined(SOC_ALLWINNER_A31S) @@ -193,7 +193,7 @@ static platform_method_t a31s_methods[] #endif PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(a31s, "a31s", 0, "allwinner,sun6i-a31s"); +FDT_PLATFORM_DEF(a31s, "a31s", 0, "allwinner,sun6i-a31s", 200); #endif u_int Modified: head/sys/arm/allwinner/timer.c == --- head/sys/arm/allwinner/timer.c Sat Apr 30 16:01:37 2016 (r298853) +++ head/sys/arm/allwinner/timer.c Sat Apr 30 17:27:33 2016 (r298854) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -100,11 +101,12 @@ static inta10_timer_timer_stop(struct e static uint64_t timer_read_counter64(void); -static int a10_timer_initialized = 0; static int a10_timer_hardclock(void *); static int a10_timer_probe(device_t); static int a10_timer_attach(device_t); +static delay_func a10_timer_delay; + static struct timecounter a10_timer_timecounter = { .tc_name = "a10_timer timer0", .tc_get_timecount = a10_timer_get_timecount, @@ -209,8 +211,10 @@ a10_timer_attach(device_t dev) sc->et.et_priv = sc; et_register(>et); - if (device_get_unit(dev) == 0) + if (device_get_unit(dev) == 0) { + arm_set_delay(a10_timer_delay, sc); a10_timer_sc = sc; + } a10_timer_timecounter.tc_frequency = sc->timer0_freq; tc_init(_timer_timecounter); @@ -224,8 +228,6 @@ a10_timer_attach(device_t dev) a10_timer_timecounter.tc_frequency); } - a10_timer_initialized = 1; - return (0); } @@ -352,23 +354,15 @@ static devclass_t a10_timer_devclass; EARLY_DRIVER_MODULE(a10_timer, simplebus, a10_timer_driver, a10_timer_devclass, 0, 0, BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); -void -DELAY(int usec) +static void +a10_timer_delay(int usec, void *arg) { - uint32_t counter; + struct a10_timer_softc *sc = arg; uint64_t end, now; - if (!a10_timer_initialized) { - for (; usec > 0; usec--) - for (counter = 50; counter > 0; counter--) - cpufunc_nullop(); - return; - } - now = timer_read_counter64(); - end = now + (a10_timer_sc->timer0_freq / 100) * (usec + 1); + end = now + (sc->timer0_freq / 100) * (usec + 1); while (now < end) now = timer_read_counter64(); } - Modified: head/sys/arm/arm/generic_timer.c == --- head/sys/arm/arm/generic_timer.cSat Apr 30 16:01:37 2016 (r298853) +++
svn commit: r298853 - head/sys/fs/fdescfs
Author: emaste Date: Sat Apr 30 16:01:37 2016 New Revision: 298853 URL: https://svnweb.freebsd.org/changeset/base/298853 Log: Rationalize license numbering in fdescfs(5) Modified: head/sys/fs/fdescfs/fdesc.h head/sys/fs/fdescfs/fdesc_vfsops.c head/sys/fs/fdescfs/fdesc_vnops.c Modified: head/sys/fs/fdescfs/fdesc.h == --- head/sys/fs/fdescfs/fdesc.h Sat Apr 30 15:06:18 2016(r298852) +++ head/sys/fs/fdescfs/fdesc.h Sat Apr 30 16:01:37 2016(r298853) @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors *may be used to endorse or promote products derived from this software *without specific prior written permission. * Modified: head/sys/fs/fdescfs/fdesc_vfsops.c == --- head/sys/fs/fdescfs/fdesc_vfsops.c Sat Apr 30 15:06:18 2016 (r298852) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Sat Apr 30 16:01:37 2016 (r298853) @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors *may be used to endorse or promote products derived from this software *without specific prior written permission. * Modified: head/sys/fs/fdescfs/fdesc_vnops.c == --- head/sys/fs/fdescfs/fdesc_vnops.c Sat Apr 30 15:06:18 2016 (r298852) +++ head/sys/fs/fdescfs/fdesc_vnops.c Sat Apr 30 16:01:37 2016 (r298853) @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors *may be used to endorse or promote products derived from this software *without specific prior written permission. * ___ 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: r298852 - in stable/10: etc/defaults etc/rc.d share/man/man5
Author: jamie Date: Sat Apr 30 15:06:18 2016 New Revision: 298852 URL: https://svnweb.freebsd.org/changeset/base/298852 Log: MFC r295471: Add new rc.conf parameter "jail_reverse_stop" When a user defines "jail_list" in rc.conf the jails are started in the order defined. Currently the jails are not are stopped in reverse order which may break dependencies between jails/services and prevent a clean shutdown. The new parameter "jail_reverse_stop" will shutdown jails in "jail_list" in reverse order when set to "YES". Please note that this does not affect manual invocation of the jail rc script. If a user runs the command # service jail stop jail1 jail2 jail3 the jails will be stopped in exactly the order specified regardless of jail_reverse_stop being defined in rc.conf. MFC r295568: Document the new jail_reverse_stop parameter While here clean up the documentation for jail_list PR: 196152 Submitted by: feld Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/jail stable/10/share/man/man5/rc.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf == --- stable/10/etc/defaults/rc.conf Sat Apr 30 14:48:30 2016 (r298851) +++ stable/10/etc/defaults/rc.conf Sat Apr 30 15:06:18 2016 (r298852) @@ -700,6 +700,7 @@ rctl_rules="/etc/rctl.conf" # rctl(8) ru jail_enable="NO" # Set to NO to disable starting of any jails jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails +jail_reverse_stop="NO" # Stop jails in reverse order ## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## Modified: stable/10/etc/rc.d/jail == --- stable/10/etc/rc.d/jail Sat Apr 30 14:48:30 2016(r298851) +++ stable/10/etc/rc.d/jail Sat Apr 30 15:06:18 2016(r298852) @@ -517,7 +517,11 @@ jail_stop() command=$jail_program rc_flags=$jail_flags command_args="-f $jail_conf -r" - $jail_jls name | while read _j; do + if checkyesno jail_reverse_stop; then + $jail_jls name | tail -r + else + $jail_jls name + fi | while read _j; do echo -n " $_j" _tmp=`mktemp -t jail` || exit 3 $command $rc_flags $command_args $_j >> $_tmp 2>&1 @@ -532,6 +536,7 @@ jail_stop() return ;; esac + checkyesno jail_reverse_stop && set -- $(reverse_list $@) for _j in $@; do _j=$(echo $_j | tr /. _) _jv=$(echo -n $_j | tr -c '[:alnum:]' _) @@ -567,5 +572,6 @@ jail_warn() load_rc_config $name case $# in 1) run_rc_command $@ ${jail_list:-_ALL} ;; -*) run_rc_command $@ ;; +*) jail_reverse_stop="no" + run_rc_command $@ ;; esac Modified: stable/10/share/man/man5/rc.conf.5 == --- stable/10/share/man/man5/rc.conf.5 Sat Apr 30 14:48:30 2016 (r298851) +++ stable/10/share/man/man5/rc.conf.5 Sat Apr 30 15:06:18 2016 (r298852) @@ -3938,20 +3938,22 @@ for every jail in .Va jail_list . .It Va jail_list .Pq Vt str -A space separated list of names for jails. -If this variable is empty, -all of +A space-delimited list of jail names. +When left empty, all of the .Xr jail 8 -instances in the configuration file will be configured. -This is purely a configuration aid to help identify and -configure multiple jails. -The names specified in this list will be used to -identify settings common to an instance of a jail, -and should contain alphanumeric characters only. -The literal jail name of -.Dq Li 0 -.Pq zero -is not allowed. +instances defined in the configuration file are started. +The names specified in this list control the jail startup order. +.Xr jail 8 +instances missing from +.Va jail_list +must be started manually. +.It Va jail_reverse_stop +.Pq Vt bool +When set to +.Dq Li YES , +all configured jails in +.Va jail_list +are stopped in reverse order. .It Va jail_* variables Note that older releases supported per-jail configuration via .Xr rc.conf 5 ___ 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: r298851 - head/usr.bin/sdiff
Author: bapt Date: Sat Apr 30 14:48:30 2016 New Revision: 298851 URL: https://svnweb.freebsd.org/changeset/base/298851 Log: When checking for binary file, check if ch is not EOF only ch actually got a value assigned Reported by: pfg Modified: head/usr.bin/sdiff/sdiff.c Modified: head/usr.bin/sdiff/sdiff.c == --- head/usr.bin/sdiff/sdiff.c Sat Apr 30 14:47:45 2016(r298850) +++ head/usr.bin/sdiff/sdiff.c Sat Apr 30 14:48:30 2016(r298851) @@ -514,12 +514,14 @@ istextfile(FILE *f) if (f == NULL) return (1); rewind(f); - for (i = 0; i <= MAX_CHECK || ch != EOF; i++) { + for (i = 0; i <= MAX_CHECK; i++) { ch = fgetc(f); if (ch == '\0') { rewind(f); return (0); } + if (ch == EOF) + break; } rewind(f); 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: r298850 - stable/10/usr.sbin/pw
Author: wblock (doc committer) Date: Sat Apr 30 14:47:45 2016 New Revision: 298850 URL: https://svnweb.freebsd.org/changeset/base/298850 Log: MFC r298525: Add a single example of adding a user that roughly corresponds with the adduser example in the Handbook. Modified: stable/10/usr.sbin/pw/pw.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw.8 == --- stable/10/usr.sbin/pw/pw.8 Sat Apr 30 14:43:42 2016(r298849) +++ stable/10/usr.sbin/pw/pw.8 Sat Apr 30 14:47:45 2016(r298850) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2016 +.Dd April 23, 2016 .Dt PW 8 .Os .Sh NAME @@ -954,6 +954,18 @@ Pw default options file .It Pa /var/log/userlog User/group modification logfile .El +.Sh EXAMPLES +Add new user Glurmo Smith (gsmith). +A gsmith login group is created if not already present. +The login shell is set to +.Xr csh 1 . +A new home directory at +.Pa /home/gsmith +is created if it does not already exist. +Finally, a random password is generated and displayed: +.Bd -literal -offset indent +pw useradd -n gsmith -c "Glurmo Smith" -s /bin/csh -m -w random +.Ed .Sh EXIT STATUS The .Nm ___ 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: r298849 - in head/include: arpa rpcsvc
Author: pfg Date: Sat Apr 30 14:43:42 2016 New Revision: 298849 URL: https://svnweb.freebsd.org/changeset/base/298849 Log: include: minor spelling fixes. No functional change. Modified: head/include/arpa/nameser.h head/include/rpcsvc/klm_prot.x Modified: head/include/arpa/nameser.h == --- head/include/arpa/nameser.h Sat Apr 30 14:41:18 2016(r298848) +++ head/include/arpa/nameser.h Sat Apr 30 14:43:42 2016(r298849) @@ -106,7 +106,7 @@ typedef enum __ns_sect { } ns_sect; /*% - * Network name (compressed or not) type. Equivilent to a pointer when used + * Network name (compressed or not) type. Equivalent to a pointer when used * in a function prototype. Can be const'd. */ typedef u_char ns_nname[NS_MAXNNAME]; Modified: head/include/rpcsvc/klm_prot.x == --- head/include/rpcsvc/klm_prot.x Sat Apr 30 14:41:18 2016 (r298848) +++ head/include/rpcsvc/klm_prot.x Sat Apr 30 14:43:42 2016 (r298849) @@ -34,7 +34,7 @@ * Copyright (C) 1986 Sun Microsystems, Inc. * * protocol used between the UNIX kernel (the "client") and the - * local lock manager. The local lock manager is a deamon running + * local lock manager. The local lock manager is a daemon running * above the kernel. */ ___ 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: r298848 - in head/sys: arm/at91 ddb dev/acpi_support dev/cxgbe dev/fb dev/iwn dev/kbd dev/syscons dev/vt dev/vt/hw/vga dev/wpi fs/nandfs geom/virstor libkern mips/atheros rpc
Author: pfg Date: Sat Apr 30 14:41:18 2016 New Revision: 298848 URL: https://svnweb.freebsd.org/changeset/base/298848 Log: sys: Make use of our rounddown() macro when sys/param.h is available. No functional change. Modified: head/sys/arm/at91/at91_pmc.c head/sys/ddb/db_output.c head/sys/dev/acpi_support/acpi_hp.c head/sys/dev/cxgbe/t4_netmap.c head/sys/dev/fb/fb.c head/sys/dev/fb/vesa.c head/sys/dev/fb/vga.c head/sys/dev/iwn/if_iwn.c head/sys/dev/kbd/kbd.c head/sys/dev/syscons/scmouse.c head/sys/dev/syscons/scvgarndr.c head/sys/dev/vt/hw/vga/vt_vga.c head/sys/dev/vt/vt_core.c head/sys/dev/wpi/if_wpi.c head/sys/fs/nandfs/nandfs_vfsops.c head/sys/geom/virstor/g_virstor.c head/sys/libkern/crc32.c head/sys/mips/atheros/ar934x_chip.c head/sys/mips/atheros/qca953x_chip.c head/sys/mips/atheros/qca955x_chip.c head/sys/rpc/clnt_dg.c Modified: head/sys/arm/at91/at91_pmc.c == --- head/sys/arm/at91/at91_pmc.cSat Apr 30 14:25:00 2016 (r298847) +++ head/sys/arm/at91/at91_pmc.cSat Apr 30 14:41:18 2016 (r298848) @@ -506,7 +506,7 @@ at91_pmc_sense_main_clock(void) * AT91C_MAIN_CLOCK in the kernel config file. */ if (ckgr_val >= 2100) - return ((ckgr_val + 250) / 500 * 500); + return (rounddown(ckgr_val + 250, 500)); /* * Try to find the standard frequency that match best. Modified: head/sys/ddb/db_output.c == --- head/sys/ddb/db_output.cSat Apr 30 14:25:00 2016(r298847) +++ head/sys/ddb/db_output.cSat Apr 30 14:41:18 2016(r298848) @@ -71,8 +71,7 @@ struct dbputchar_arg { static int db_output_position = 0; /* output column */ static int db_last_non_space = 0; /* last non-space character */ db_expr_t db_tab_stop_width = 8; /* how wide are tab stops? */ -#defineNEXT_TAB(i) \ - i) + db_tab_stop_width) / db_tab_stop_width) * db_tab_stop_width) +#defineNEXT_TAB(i) rounddown((i) + db_tab_stop_width, db_tab_stop_width) db_expr_t db_max_width = 79; /* output line width */ db_expr_t db_lines_per_page = 20; /* lines per page */ volatile int db_pager_quit; /* user requested quit */ Modified: head/sys/dev/acpi_support/acpi_hp.c == --- head/sys/dev/acpi_support/acpi_hp.c Sat Apr 30 14:25:00 2016 (r298847) +++ head/sys/dev/acpi_support/acpi_hp.c Sat Apr 30 14:41:18 2016 (r298848) @@ -1033,7 +1033,8 @@ acpi_hp_hex_decode(char* buffer) UINT8 *uin; UINT8 uout; - if (((int)length/2)*2 == length || length < 10) return; + if (rounddown((int)length, 2) == length || length < 10) + return; for (i = 0; iqsize_rxq / 8) * 8; + na.num_rx_desc = rounddown(vi->qsize_rxq, 8); na.nm_txsync = cxgbe_netmap_txsync; na.nm_rxsync = cxgbe_netmap_rxsync; na.nm_register = cxgbe_netmap_reg; Modified: head/sys/dev/fb/fb.c == --- head/sys/dev/fb/fb.cSat Apr 30 14:25:00 2016(r298847) +++ head/sys/dev/fb/fb.cSat Apr 30 14:41:18 2016(r298848) @@ -86,7 +86,7 @@ vid_realloc_array(void) return ENOMEM; s = spltty(); - newsize = ((adapters + ARRAY_DELTA)/ARRAY_DELTA)*ARRAY_DELTA; + newsize = rounddown(adapters + ARRAY_DELTA, ARRAY_DELTA); new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_WAITOK | M_ZERO); new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF, M_WAITOK | M_ZERO); Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.c Sat Apr 30 14:25:00 2016(r298847) +++ head/sys/dev/fb/vesa.c Sat Apr 30 14:41:18 2016(r298848) @@ -1581,7 +1581,7 @@ vesa_set_origin(video_adapter_t *adp, of regs.R_DX = offset / adp->va_window_gran; x86bios_intr(, 0x10); - adp->va_window_orig = (offset/adp->va_window_gran)*adp->va_window_gran; + adp->va_window_orig =
svn commit: r298847 - head/sys/netinet
Author: tuexen Date: Sat Apr 30 14:25:00 2016 New Revision: 298847 URL: https://svnweb.freebsd.org/changeset/base/298847 Log: Add the UDP encaps port as a parameter to sctp_add_remote_addr(). This is currently only a code change without any functional change. But this allows to set the remote encapsulation port in a more detailed way, which will be provided in a follow-up commit. MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_asconf.c == --- head/sys/netinet/sctp_asconf.c Sat Apr 30 12:44:03 2016 (r298846) +++ head/sys/netinet/sctp_asconf.c Sat Apr 30 14:25:00 2016 (r298847) @@ -244,7 +244,8 @@ sctp_process_asconf_add_ip(struct sockad m_reply = sctp_asconf_error_response(aph->correlation_id, SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, aparam_length); - } else if (sctp_add_remote_addr(stcb, sa, , SCTP_DONOT_SETSCOPE, + } else if (sctp_add_remote_addr(stcb, sa, , stcb->asoc.port, + SCTP_DONOT_SETSCOPE, SCTP_ADDR_DYNAMIC_ADDED) != 0) { SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_add_ip: error adding address\n"); Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Sat Apr 30 12:44:03 2016 (r298846) +++ head/sys/netinet/sctp_input.c Sat Apr 30 14:25:00 2016 (r298847) @@ -2718,7 +2718,8 @@ sctp_handle_cookie_echo(struct mbuf *m, */ if (netl == NULL) { /* TSNH! Huh, why do I need to add this address here? */ - if (sctp_add_remote_addr(*stcb, to, NULL, SCTP_DONOT_SETSCOPE, SCTP_IN_COOKIE_PROC)) { + if (sctp_add_remote_addr(*stcb, to, NULL, (*stcb)->asoc.port, + SCTP_DONOT_SETSCOPE, SCTP_IN_COOKIE_PROC)) { return (NULL); } netl = sctp_findnet(*stcb, to); Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Sat Apr 30 12:44:03 2016 (r298846) +++ head/sys/netinet/sctp_output.c Sat Apr 30 14:25:00 2016 (r298847) @@ -3677,7 +3677,7 @@ sctp_process_cmsgs_for_init(struct sctp_ *error = EINVAL; return (1); } - if (sctp_add_remote_addr(stcb, (struct sockaddr *), NULL, + if (sctp_add_remote_addr(stcb, (struct sockaddr *), NULL, stcb->asoc.port, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { *error = ENOBUFS; return (1); @@ -3709,14 +3709,14 @@ sctp_process_cmsgs_for_init(struct sctp_ *error = EINVAL; return (1); } - if (sctp_add_remote_addr(stcb, (struct sockaddr *), NULL, + if (sctp_add_remote_addr(stcb, (struct sockaddr *), NULL, stcb->asoc.port, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { *error = ENOBUFS; return (1); } } else #endif - if (sctp_add_remote_addr(stcb, (struct sockaddr *), NULL, + if (sctp_add_remote_addr(stcb, (struct sockaddr *), NULL, stcb->asoc.port, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { *error = ENOBUFS; return (1); Modified: head/sys/netinet/sctp_pcb.c == --- head/sys/netinet/sctp_pcb.c Sat Apr 30 12:44:03 2016(r298846) +++ head/sys/netinet/sctp_pcb.c Sat Apr 30 14:25:00 2016(r298847) @@ -3766,7 +3766,7 @@ sctp_is_address_on_local_host(struct soc */ int sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr, -struct sctp_nets **netp, int set_scope, int from) +struct sctp_nets **netp, uint16_t port, int set_scope, int from) { /* * The following is redundant to the same lines in the @@ -3944,7 +3944,7 @@
svn commit: r298846 - head/sys/fs/fdescfs
Author: emaste Date: Sat Apr 30 12:44:03 2016 New Revision: 298846 URL: https://svnweb.freebsd.org/changeset/base/298846 Log: ANSIfy fdescfs(5) Modified: head/sys/fs/fdescfs/fdesc_vfsops.c head/sys/fs/fdescfs/fdesc_vnops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c == --- head/sys/fs/fdescfs/fdesc_vfsops.c Sat Apr 30 10:35:42 2016 (r298845) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Sat Apr 30 12:44:03 2016 (r298846) @@ -119,9 +119,7 @@ fdesc_mount(struct mount *mp) } static int -fdesc_unmount(mp, mntflags) - struct mount *mp; - int mntflags; +fdesc_unmount(struct mount *mp, int mntflags) { struct fdescmount *fmp; caddr_t data; @@ -162,10 +160,7 @@ fdesc_unmount(mp, mntflags) } static int -fdesc_root(mp, flags, vpp) - struct mount *mp; - int flags; - struct vnode **vpp; +fdesc_root(struct mount *mp, int flags, struct vnode **vpp) { struct vnode *vp; @@ -179,9 +174,7 @@ fdesc_root(mp, flags, vpp) } static int -fdesc_statfs(mp, sbp) - struct mount *mp; - struct statfs *sbp; +fdesc_statfs(struct mount *mp, struct statfs *sbp) { struct thread *td; struct filedesc *fdp; Modified: head/sys/fs/fdescfs/fdesc_vnops.c == --- head/sys/fs/fdescfs/fdesc_vnops.c Sat Apr 30 10:35:42 2016 (r298845) +++ head/sys/fs/fdescfs/fdesc_vnops.c Sat Apr 30 12:44:03 2016 (r298846) @@ -92,8 +92,7 @@ static void fdesc_remove_entry(struct fd * Initialise cache headers */ int -fdesc_init(vfsp) - struct vfsconf *vfsp; +fdesc_init(struct vfsconf *vfsp) { mtx_init(_hashmtx, "fdescfs_hash", NULL, MTX_DEF); @@ -105,8 +104,7 @@ fdesc_init(vfsp) * Uninit ready for unload. */ int -fdesc_uninit(vfsp) - struct vfsconf *vfsp; +fdesc_uninit(struct vfsconf *vfsp) { hashdestroy(fdhashtbl, M_CACHE, fdhash); @@ -146,12 +144,8 @@ fdesc_remove_entry(struct fdescnode *fd) } int -fdesc_allocvp(ftype, fd_fd, ix, mp, vpp) - fdntype ftype; - unsigned fd_fd; - int ix; - struct mount *mp; - struct vnode **vpp; +fdesc_allocvp(fdntype ftype, unsigned fd_fd, int ix, struct mount *mp, +struct vnode **vpp) { struct fdescmount *fmp; struct fdhashhead *fc; @@ -274,12 +268,7 @@ fdesc_get_ino_alloc(struct mount *mp, vo * ndp is the name to locate in that directory... */ static int -fdesc_lookup(ap) - struct vop_lookup_args /* { - struct vnode * a_dvp; - struct vnode ** a_vpp; - struct componentname * a_cnp; - } */ *ap; +fdesc_lookup(struct vop_lookup_args *ap) { struct vnode **vpp = ap->a_vpp; struct vnode *dvp = ap->a_dvp; @@ -381,13 +370,7 @@ bad: } static int -fdesc_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +fdesc_open(struct vop_open_args *ap) { struct vnode *vp = ap->a_vp; @@ -407,12 +390,7 @@ fdesc_open(ap) } static int -fdesc_getattr(ap) - struct vop_getattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - } */ *ap; +fdesc_getattr(struct vop_getattr_args *ap) { struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; @@ -456,12 +434,7 @@ fdesc_getattr(ap) } static int -fdesc_setattr(ap) - struct vop_setattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - } */ *ap; +fdesc_setattr(struct vop_setattr_args *ap) { struct vattr *vap = ap->a_vap; struct vnode *vp; @@ -513,15 +486,7 @@ fdesc_setattr(ap) #define UIO_MX 16 static int -fdesc_readdir(ap) - struct vop_readdir_args /* { - struct vnode *a_vp; - struct uio *a_uio; - struct ucred *a_cred; - int *a_eofflag; - u_long *a_cookies; - int a_ncookies; - } */ *ap; +fdesc_readdir(struct vop_readdir_args *ap) { struct uio *uio = ap->a_uio; struct filedesc *fdp; @@ -588,10 +553,7 @@ done: } static int -fdesc_reclaim(ap) - struct vop_reclaim_args /* { - struct vnode *a_vp; - } */ *ap; +fdesc_reclaim(struct vop_reclaim_args *ap) { struct vnode *vp; struct fdescnode *fd; ___ 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: r298845 - in head: contrib/subversion contrib/subversion/subversion/include contrib/subversion/subversion/libsvn_client contrib/subversion/subversion/libsvn_diff contrib/subversion/subv...
Author: dim Date: Sat Apr 30 10:35:42 2016 New Revision: 298845 URL: https://svnweb.freebsd.org/changeset/base/298845 Log: Update from subversion 1.9.2 to 1.9.4. This contains only bug fixes, no new features. The repository format is also unchanged from 1.9.2. Full list of changes between 1.9.4 and earlier versions: https://svn.apache.org/repos/asf/subversion/tags/1.9.4/CHANGES Note that the two security issues fixed in 1.9.4 (CVE-2016-2167 and CVE-2016-2168) do not affect the version of Subversion in the FreeBSD base system, since neither SASL nor Apache modules are enabled. Relnotes: yes MFC after:2 weeks Modified: head/contrib/subversion/CHANGES head/contrib/subversion/INSTALL head/contrib/subversion/Makefile.in head/contrib/subversion/NOTICE head/contrib/subversion/build-outputs.mk head/contrib/subversion/configure head/contrib/subversion/subversion/include/svn_client.h head/contrib/subversion/subversion/include/svn_config.h head/contrib/subversion/subversion/include/svn_fs.h head/contrib/subversion/subversion/include/svn_version.h head/contrib/subversion/subversion/libsvn_client/externals.c head/contrib/subversion/subversion/libsvn_client/merge.c head/contrib/subversion/subversion/libsvn_client/patch.c head/contrib/subversion/subversion/libsvn_diff/binary_diff.c head/contrib/subversion/subversion/libsvn_fs_base/dag.c head/contrib/subversion/subversion/libsvn_fs_base/fs.h head/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c head/contrib/subversion/subversion/libsvn_fs_fs/dag.c head/contrib/subversion/subversion/libsvn_fs_fs/fs.h head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.h head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h head/contrib/subversion/subversion/libsvn_fs_fs/transaction.c head/contrib/subversion/subversion/libsvn_fs_fs/tree.c head/contrib/subversion/subversion/libsvn_fs_x/rep-cache-db.h head/contrib/subversion/subversion/libsvn_ra_local/ra_plugin.c head/contrib/subversion/subversion/libsvn_ra_serf/commit.c head/contrib/subversion/subversion/libsvn_ra_serf/inherited_props.c head/contrib/subversion/subversion/libsvn_ra_serf/merge.c head/contrib/subversion/subversion/libsvn_ra_serf/multistatus.c head/contrib/subversion/subversion/libsvn_ra_serf/ra_serf.h head/contrib/subversion/subversion/libsvn_ra_serf/replay.c head/contrib/subversion/subversion/libsvn_ra_serf/serf.c head/contrib/subversion/subversion/libsvn_ra_serf/util.c head/contrib/subversion/subversion/libsvn_ra_svn/client.c head/contrib/subversion/subversion/libsvn_ra_svn/deprecated.c head/contrib/subversion/subversion/libsvn_ra_svn/marshal.c head/contrib/subversion/subversion/libsvn_repos/dump.c head/contrib/subversion/subversion/libsvn_repos/log.c head/contrib/subversion/subversion/libsvn_repos/repos.c head/contrib/subversion/subversion/libsvn_subr/auth.c head/contrib/subversion/subversion/libsvn_subr/cache-membuffer.c head/contrib/subversion/subversion/libsvn_subr/eol.c head/contrib/subversion/subversion/libsvn_subr/gpg_agent.c head/contrib/subversion/subversion/libsvn_subr/internal_statements.h head/contrib/subversion/subversion/libsvn_subr/prompt.c head/contrib/subversion/subversion/libsvn_subr/sqlite.c head/contrib/subversion/subversion/libsvn_subr/string.c head/contrib/subversion/subversion/libsvn_subr/utf_validate.c head/contrib/subversion/subversion/libsvn_subr/version.c head/contrib/subversion/subversion/libsvn_wc/deprecated.c head/contrib/subversion/subversion/libsvn_wc/wc-checks.h head/contrib/subversion/subversion/libsvn_wc/wc-metadata.h head/contrib/subversion/subversion/libsvn_wc/wc-queries.h head/contrib/subversion/subversion/libsvn_wc/wc-queries.sql head/contrib/subversion/subversion/libsvn_wc/wc_db_pristine.c head/contrib/subversion/subversion/svn/conflict-callbacks.c head/contrib/subversion/subversion/svn/diff-cmd.c head/contrib/subversion/subversion/svn/lock-cmd.c head/contrib/subversion/subversion/svn/unlock-cmd.c head/contrib/subversion/subversion/svnlook/svnlook.c head/contrib/subversion/subversion/svnserve/cyrus_auth.c head/contrib/subversion/win-tests.py head/usr.bin/svn/Makefile.inc head/usr.bin/svn/svn_private_config.h Directory Properties: head/contrib/subversion/ (props changed) Modified: head/contrib/subversion/CHANGES == --- head/contrib/subversion/CHANGES Sat Apr 30 09:50:08 2016 (r298844) +++ head/contrib/subversion/CHANGES Sat Apr 30 10:35:42 2016 (r298845) @@ -1,3 +1,91 @@ +Version 1.9.4 +(28 Apr 2016, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.4 + + User-visible changes: + - Client-side bugfixes: +* diff: support '--summarize --ignore-properties' (part of issue #4567) +* checkout: fix performance
svn commit: r298844 - head/etc/rc.d
Author: ngie Date: Sat Apr 30 09:50:08 2016 New Revision: 298844 URL: https://svnweb.freebsd.org/changeset/base/298844 Log: Make SERVERS REQUIRE clean when MK_KERBEROS==no Make kdc run BEFORE SERVERS instead of being REQUIREd by SERVERS, so systems that pedantically check REQUIREs function after r270782 MFC after: 1 week X-MFC with: r270782 Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/SERVERS head/etc/rc.d/kdc Modified: head/etc/rc.d/SERVERS == --- head/etc/rc.d/SERVERS Sat Apr 30 09:43:01 2016(r298843) +++ head/etc/rc.d/SERVERS Sat Apr 30 09:50:08 2016(r298844) @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig savecore watchdogd kdc +# REQUIRE: mountcritremote abi ldconfig savecore watchdogd # This is a dummy dependency, for early-start servers relying on # some basic configuration. Modified: head/etc/rc.d/kdc == --- head/etc/rc.d/kdc Sat Apr 30 09:43:01 2016(r298843) +++ head/etc/rc.d/kdc Sat Apr 30 09:50:08 2016(r298844) @@ -5,6 +5,7 @@ # PROVIDE: kdc # REQUIRE: NETWORKING +# BEFORE: SERVERS # KEYWORD: shutdown . /etc/rc.subr ___ 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: r298843 - stable/9/sbin/ping6
Author: ngie Date: Sat Apr 30 09:43:01 2016 New Revision: 298843 URL: https://svnweb.freebsd.org/changeset/base/298843 Log: MFstable/10 r272871: r272871 (by hrs): MFC r271909: Revert changes in r269180. It could cause -c N option to enter an infinite loop if no reply packet is received. Modified: stable/9/sbin/ping6/ping6.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/ping6/ (props changed) Modified: stable/9/sbin/ping6/ping6.c == --- stable/9/sbin/ping6/ping6.c Sat Apr 30 09:32:19 2016(r298842) +++ stable/9/sbin/ping6/ping6.c Sat Apr 30 09:43:01 2016(r298843) @@ -1088,14 +1088,8 @@ main(int argc, char *argv[]) /* signal handling */ if (seenalrm) { /* last packet sent, timeout reached? */ - if (npackets && ntransmitted >= npackets) { - struct timeval zerotime = {0, 0}; - itimer.it_value = zerotime; - itimer.it_interval = zerotime; - (void)setitimer(ITIMER_REAL, , NULL); - seenalrm = 0; /* clear flag */ - continue; - } + if (npackets && ntransmitted >= npackets) + break; retransmit(); seenalrm = 0; continue; ___ 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: r298842 - head/lib/libkvm
Author: ngie Date: Sat Apr 30 09:32:19 2016 New Revision: 298842 URL: https://svnweb.freebsd.org/changeset/base/298842 Log: Don't leak PML4 in _amd64_initvtop(..) if kvm_read2(..) fails MFC after: 1 week Reported by: Coverity CID: 1341474 Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libkvm/kvm_amd64.c Modified: head/lib/libkvm/kvm_amd64.c == --- head/lib/libkvm/kvm_amd64.c Sat Apr 30 09:31:01 2016(r298841) +++ head/lib/libkvm/kvm_amd64.c Sat Apr 30 09:32:19 2016(r298842) @@ -159,6 +159,7 @@ _amd64_initvtop(kvm_t *kd) } if (kvm_read2(kd, pa, PML4, AMD64_PAGE_SIZE) != AMD64_PAGE_SIZE) { _kvm_err(kd, kd->program, "cannot read KPML4phys"); + free(PML4); return (-1); } kd->vmst->PML4 = PML4; ___ 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: r298841 - head/lib/libkvm
Author: ngie Date: Sat Apr 30 09:31:01 2016 New Revision: 298841 URL: https://svnweb.freebsd.org/changeset/base/298841 Log: Remove a -Wunused-but-set-variable variable -- `pa` Reported by: gcc 5.x Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libkvm/kvm_sparc64.c Modified: head/lib/libkvm/kvm_sparc64.c == --- head/lib/libkvm/kvm_sparc64.c Sat Apr 30 09:21:13 2016 (r298840) +++ head/lib/libkvm/kvm_sparc64.c Sat Apr 30 09:31:01 2016 (r298841) @@ -134,7 +134,6 @@ _sparc64_initvtop(kvm_t *kd) struct sparc64_dump_reg *regs; struct vmstate *vm; size_t regsz; - uint64_t pa; int i; vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm)); @@ -151,7 +150,6 @@ _sparc64_initvtop(kvm_t *kd) hdr.dh_tsb_size = be64toh(hdr.dh_tsb_size); hdr.dh_tsb_mask = be64toh(hdr.dh_tsb_mask); hdr.dh_nregions = be32toh(hdr.dh_nregions); - pa = hdr.dh_tsb_pa; regsz = hdr.dh_nregions * sizeof(*regs); regs = _kvm_malloc(kd, regsz); ___ 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: r298840 - in head: . lib/libkvm
Author: ngie Date: Sat Apr 30 09:21:13 2016 New Revision: 298840 URL: https://svnweb.freebsd.org/changeset/base/298840 Log: Remove kvm_getfiles(3) This libcall has been broken since (at least) r174989/8.0-RELEASE. Bump SHLIB_MAJOR for the change Differential Revision: https://reviews.freebsd.org/D6052 Relnotes: yes Reviewed by: jhb, markj Sponsored by: EMC / Isilon Storage Division Deleted: head/lib/libkvm/kvm_file.c head/lib/libkvm/kvm_getfiles.3 Modified: head/ObsoleteFiles.inc head/lib/libkvm/Makefile head/lib/libkvm/kvm.3 head/lib/libkvm/kvm.h Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sat Apr 30 09:13:26 2016(r298839) +++ head/ObsoleteFiles.inc Sat Apr 30 09:21:13 2016(r298840) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20160430: kvm_getfiles(3) removed from kvm(3) +OLD_LIBS+=usr/lib/libkvm.so.6 +OLD_FILES+=usr/share/man/man3/kvm_getfiles.3.gz # 20160423: remove mroute6d OLD_FILES+=etc/rc.d/mroute6d # 20160419: rename units.lib -> definitions.units Modified: head/lib/libkvm/Makefile == --- head/lib/libkvm/MakefileSat Apr 30 09:13:26 2016(r298839) +++ head/lib/libkvm/MakefileSat Apr 30 09:21:13 2016(r298840) @@ -5,12 +5,12 @@ PACKAGE=lib${LIB} LIB= kvm SHLIBDIR?= /lib -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 7 CFLAGS+=-DLIBC_SCCS -I${.CURDIR} WARNS?=3 -SRCS= kvm.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \ +SRCS= kvm.c kvm_cptime.c kvm_getloadavg.c \ kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c \ kvm_minidump_aarch64.c \ kvm_amd64.c kvm_minidump_amd64.c \ @@ -23,7 +23,7 @@ INCS= kvm.h LIBADD=elf -MAN= kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 \ +MAN= kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getloadavg.3 \ kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_native.3 \ kvm_nlist.3 kvm_open.3 kvm_read.3 Modified: head/lib/libkvm/kvm.3 == --- head/lib/libkvm/kvm.3 Sat Apr 30 09:13:26 2016(r298839) +++ head/lib/libkvm/kvm.3 Sat Apr 30 09:21:13 2016(r298840) @@ -32,7 +32,7 @@ .\" @(#)kvm.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 27, 2015 +.Dd April 30, 2016 .Dt KVM 3 .Os .Sh NAME @@ -144,7 +144,6 @@ and .Xr kvm_getargv 3 , .Xr kvm_getenvv 3 , .Xr kvm_geterr 3 , -.Xr kvm_getfiles 3 , .Xr kvm_getloadavg 3 , .Xr kvm_getprocs 3 , .Xr kvm_getswapinfo 3 , Modified: head/lib/libkvm/kvm.h == --- head/lib/libkvm/kvm.h Sat Apr 30 09:13:26 2016(r298839) +++ head/lib/libkvm/kvm.h Sat Apr 30 09:21:13 2016(r298840) @@ -82,7 +82,6 @@ char **kvm_getargv(kvm_t *, const struct int kvm_getcptime(kvm_t *, long *); char **kvm_getenvv(kvm_t *, const struct kinfo_proc *, int); char*kvm_geterr(kvm_t *); -char*kvm_getfiles(kvm_t *, int, int, int *); int kvm_getloadavg(kvm_t *, double [], int); int kvm_getmaxcpu(kvm_t *); int kvm_getncpus(kvm_t *); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r298839 - head/lib/libkvm
Author: ngie Date: Sat Apr 30 09:13:26 2016 New Revision: 298839 URL: https://svnweb.freebsd.org/changeset/base/298839 Log: Fix memory allocation edgecases in kvm_argv(..) - Don't leak nbufp on realloc failure in kvm_argv - Catch malloc errors with bufp - Set buflen last in the "buflen == 0" case to ensure that bufp/nbufp is properly reallocated on the next go around Differential Revision: https://reviews.freebsd.org/D6051 MFC after: 1 week Reviewed by: jhb, markj Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libkvm/kvm_proc.c Modified: head/lib/libkvm/kvm_proc.c == --- head/lib/libkvm/kvm_proc.c Sat Apr 30 06:48:48 2016(r298838) +++ head/lib/libkvm/kvm_proc.c Sat Apr 30 09:13:26 2016(r298839) @@ -666,6 +666,7 @@ kvm_argv(kvm_t *kd, const struct kinfo_p static char *buf, *p; static char **bufp; static int argc; + char **nbufp; if (!ISALIVE(kd)) { _kvm_err(kd, kd->program, @@ -681,9 +682,15 @@ kvm_argv(kvm_t *kd, const struct kinfo_p _kvm_err(kd, kd->program, "cannot allocate memory"); return (NULL); } - buflen = nchr; argc = 32; bufp = malloc(sizeof(char *) * argc); + if (bufp == NULL) { + free(buf); + buf = NULL; + _kvm_err(kd, kd->program, "cannot allocate memory"); + return (NULL); + } + buflen = nchr; } else if (nchr > buflen) { p = realloc(buf, nchr); if (p != NULL) { @@ -716,8 +723,10 @@ kvm_argv(kvm_t *kd, const struct kinfo_p p += strlen(p) + 1; if (i >= argc) { argc += argc; - bufp = realloc(bufp, - sizeof(char *) * argc); + nbufp = realloc(bufp, sizeof(char *) * argc); + if (nbufp == NULL) + return (NULL); + bufp = nbufp; } } while (p < buf + bufsz); bufp[i++] = 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: r298838 - head/sys/contrib/dev/acpica/components/hardware
Author: jkim Date: Sat Apr 30 06:48:48 2016 New Revision: 298838 URL: https://svnweb.freebsd.org/changeset/base/298838 Log: Revert AccessWidth/BitOffset support for AcpiHwWrite() and AcpiHwRead() for now. The following upstream commits are reverted from hwregs.c: https://github.com/acpica/acpica/commit/96ece05 https://github.com/acpica/acpica/commit/3d8583a https://github.com/acpica/acpica/commit/48eea5e https://github.com/acpica/acpica/commit/0a212c3 https://github.com/acpica/acpica/commit/41f6aef https://github.com/acpica/acpica/commit/26434b9 https://github.com/acpica/acpica/commit/c23034a https://github.com/acpica/acpica/commit/c49a751 Note this commit will be reverted when the upstream fixes the code properly. Modified: head/sys/contrib/dev/acpica/components/hardware/hwregs.c Modified: head/sys/contrib/dev/acpica/components/hardware/hwregs.c == --- head/sys/contrib/dev/acpica/components/hardware/hwregs.cSat Apr 30 06:37:32 2016(r298837) +++ head/sys/contrib/dev/acpica/components/hardware/hwregs.cSat Apr 30 06:48:48 2016(r298838) @@ -54,11 +54,6 @@ /* Local Prototypes */ -static UINT8 -AcpiHwGetAccessBitWidth ( -ACPI_GENERIC_ADDRESS*Reg, -UINT8 MaxBitWidth); - static ACPI_STATUS AcpiHwReadMultiple ( UINT32 *Value, @@ -76,43 +71,6 @@ AcpiHwWriteMultiple ( /** * - * FUNCTION:AcpiHwGetAccessBitWidth - * - * PARAMETERS: Reg - GAS register structure - * MaxBitWidth - Max BitWidth supported (32 or 64) - * - * RETURN: Status - * - * DESCRIPTION: Obtain optimal access bit width - * - **/ - -static UINT8 -AcpiHwGetAccessBitWidth ( -ACPI_GENERIC_ADDRESS*Reg, -UINT8 MaxBitWidth) -{ - -if (!Reg->AccessWidth) -{ -if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_IO) -{ -return (32); -} -else -{ -return (MaxBitWidth); -} -} -else -{ -return (1 << (Reg->AccessWidth + 2)); -} -} - - -/** - * * FUNCTION:AcpiHwValidateRegister * * PARAMETERS: Reg - GAS register structure @@ -134,6 +92,7 @@ AcpiHwValidateRegister ( UINT64 *Address) { UINT8 BitWidth; +UINT8 BitEnd; UINT8 AccessWidth; @@ -176,8 +135,11 @@ AcpiHwValidateRegister ( /* Validate the BitWidth, convert AccessWidth into number of bits */ -AccessWidth = AcpiHwGetAccessBitWidth (Reg, MaxBitWidth); -BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth); +BitEnd = Reg->BitOffset + Reg->BitWidth; +AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1; +AccessWidth = 1 << (AccessWidth + 2); +BitWidth = ACPI_ROUND_UP (BitEnd, AccessWidth) - +ACPI_ROUND_DOWN (Reg->BitOffset, AccessWidth); if (MaxBitWidth < BitWidth) { ACPI_WARNING ((AE_INFO, @@ -204,7 +166,10 @@ AcpiHwValidateRegister ( * 64-bit values is not needed. * * LIMITATIONS: + * BitWidth must be exactly 8, 16, or 32. * SpaceID must be SystemMemory or SystemIO. + * BitOffset and AccessWidth are currently ignored, as there has + * not been a need to implement these. * **/ @@ -214,12 +179,7 @@ AcpiHwRead ( ACPI_GENERIC_ADDRESS*Reg) { UINT64 Address; -UINT8 AccessWidth; -UINT32 BitWidth; -UINT8 BitOffset; UINT64 Value64; -UINT32 Value32; -UINT8 Index; ACPI_STATUS Status; @@ -234,64 +194,30 @@ AcpiHwRead ( return (Status); } -/* - * Initialize entire 32-bit return value to zero, convert AccessWidth - * into number of bits based - */ +/* Initialize entire 32-bit return value to zero */ + *Value = 0; -AccessWidth = AcpiHwGetAccessBitWidth (Reg, 32); -BitWidth = Reg->BitOffset + Reg->BitWidth; -BitOffset = Reg->BitOffset; /* * Two address spaces supported: Memory or IO. PCI_Config is * not supported here because the GAS structure is insufficient */ -Index = 0; -while (BitWidth) +if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY) { -if (BitOffset > AccessWidth) -{ -Value32 = 0; -BitOffset -= AccessWidth; -} -else -{ -if (Reg->SpaceId ==
svn commit: r298837 - head/etc/mtree
Author: bapt Date: Sat Apr 30 06:37:32 2016 New Revision: 298837 URL: https://svnweb.freebsd.org/changeset/base/298837 Log: Add sdiff test directory to the tests mtree Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Sat Apr 30 06:35:20 2016 (r298836) +++ head/etc/mtree/BSD.tests.dist Sat Apr 30 06:37:32 2016 (r298837) @@ -608,6 +608,8 @@ .. printf .. +sdiff +.. sed regress.multitest.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: r298836 - stable/10/sys/dev/sfxge
Author: arybchik Date: Sat Apr 30 06:35:20 2016 New Revision: 298836 URL: https://svnweb.freebsd.org/changeset/base/298836 Log: MFC r298735 sfxge(4): do not use RxQ index as label Labels are limitted by 32 on EF10. It is not sufficient on powerful hosts. Since only one RxQ is running over each EvQ, zero label may be used. Reviewed by:gnn Sponsored by: Solarflare Communications, Inc. PR: 208267 Differential Revision: https://reviews.freebsd.org/D6121 Modified: stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Sat Apr 30 04:02:32 2016 (r298835) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Sat Apr 30 06:35:20 2016 (r298836) @@ -79,6 +79,21 @@ sfxge_ev_qcomplete(struct sfxge_evq *evq sfxge_rx_qcomplete(rxq, eop); } +static struct sfxge_rxq * +sfxge_get_rxq_by_label(struct sfxge_evq *evq, uint32_t label) +{ + struct sfxge_rxq *rxq; + + KASSERT(label == 0, ("unexpected rxq label != 0")); + + rxq = evq->sc->rxq[evq->index]; + + KASSERT(rxq != NULL, ("rxq == NULL")); + KASSERT(evq->index == rxq->index, ("evq->index != rxq->index")); + + return (rxq); +} + static boolean_t sfxge_ev_rx(void *arg, uint32_t label, uint32_t id, uint32_t size, uint16_t flags) @@ -98,11 +113,7 @@ sfxge_ev_rx(void *arg, uint32_t label, u if (evq->exception) goto done; - rxq = sc->rxq[label]; - KASSERT(rxq != NULL, ("rxq == NULL")); - KASSERT(evq->index == rxq->index, - ("evq->index != rxq->index")); - + rxq = sfxge_get_rxq_by_label(evq, label); if (__predict_false(rxq->init_state != SFXGE_RXQ_STARTED)) goto done; @@ -211,7 +222,7 @@ sfxge_ev_rxq_flush_done(void *arg, uint3 evq = sc->evq[index]; - label = rxq_index; + label = 0; KASSERT((label & SFXGE_MAGIC_DMAQ_LABEL_MASK) == label, ("(label & SFXGE_MAGIC_DMAQ_LABEL_MASK) != level")); magic = SFXGE_MAGIC_RX_QFLUSH_DONE | label; @@ -245,7 +256,7 @@ sfxge_ev_rxq_flush_failed(void *arg, uin index = rxq->index; evq = sc->evq[index]; - label = rxq_index; + label = 0; KASSERT((label & SFXGE_MAGIC_DMAQ_LABEL_MASK) == label, ("(label & SFXGE_MAGIC_DMAQ_LABEL_MASK) != label")); magic = SFXGE_MAGIC_RX_QFLUSH_FAILED | label; @@ -364,36 +375,18 @@ sfxge_ev_software(void *arg, uint16_t ma magic &= ~SFXGE_MAGIC_DMAQ_LABEL_MASK; switch (magic) { - case SFXGE_MAGIC_RX_QFLUSH_DONE: { - struct sfxge_rxq *rxq = sc->rxq[label]; - - KASSERT(rxq != NULL, ("rxq == NULL")); - KASSERT(evq->index == rxq->index, - ("evq->index != rxq->index")); - - sfxge_rx_qflush_done(rxq); + case SFXGE_MAGIC_RX_QFLUSH_DONE: + sfxge_rx_qflush_done(sfxge_get_rxq_by_label(evq, label)); break; - } - case SFXGE_MAGIC_RX_QFLUSH_FAILED: { - struct sfxge_rxq *rxq = sc->rxq[label]; - KASSERT(rxq != NULL, ("rxq == NULL")); - KASSERT(evq->index == rxq->index, - ("evq->index != rxq->index")); - - sfxge_rx_qflush_failed(rxq); + case SFXGE_MAGIC_RX_QFLUSH_FAILED: + sfxge_rx_qflush_failed(sfxge_get_rxq_by_label(evq, label)); break; - } - case SFXGE_MAGIC_RX_QREFILL: { - struct sfxge_rxq *rxq = sc->rxq[label]; - - KASSERT(rxq != NULL, ("rxq == NULL")); - KASSERT(evq->index == rxq->index, - ("evq->index != rxq->index")); - sfxge_rx_qrefill(rxq); + case SFXGE_MAGIC_RX_QREFILL: + sfxge_rx_qrefill(sfxge_get_rxq_by_label(evq, label)); break; - } + case SFXGE_MAGIC_TX_QFLUSH_DONE: { struct sfxge_txq *txq = sfxge_get_txq_by_label(evq, label); Modified: stable/10/sys/dev/sfxge/sfxge_rx.c == --- stable/10/sys/dev/sfxge/sfxge_rx.c Sat Apr 30 04:02:32 2016 (r298835) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Sat Apr 30 06:35:20 2016 (r298836) @@ -1034,7 +1034,7 @@ sfxge_rx_qstart(struct sfxge_softc *sc, return (rc); /* Create the common code receive queue. */ - if ((rc = efx_rx_qcreate(sc->enp, index, index, EFX_RXQ_TYPE_DEFAULT, + if ((rc = efx_rx_qcreate(sc->enp, index, 0, EFX_RXQ_TYPE_DEFAULT, esmp, sc->rxq_entries, rxq->buf_base_id, evq->common, >common)) != 0) goto fail; ___