svn commit: r321606 - head/sys/cam/ata
Author: mav Date: Thu Jul 27 07:28:29 2017 New Revision: 321606 URL: https://svnweb.freebsd.org/changeset/base/321606 Log: adaasync(): Set ADA_STATE_WCACHE based on ADA_FLAG_CAN_WCACHE The attached patch lets adaasync() set ADA_STATE_WCACHE based on ADA_FLAG_CAN_WCACHE instead of ADA_FLAG_CAN_RAHEAD. This fixes a regression introduced in r300207 which changed the flag names. PR: 220948 Submitted by: Fabian Keil Obtained from:ElectroBSD MFC after:1 week Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c == --- head/sys/cam/ata/ata_da.c Thu Jul 27 06:26:15 2017(r321605) +++ head/sys/cam/ata/ata_da.c Thu Jul 27 07:28:29 2017(r321606) @@ -1320,7 +1320,7 @@ adaasync(void *callback_arg, u_int32_t code, xpt_action((union ccb *)&cgd); if (ADA_RA >= 0 && softc->flags & ADA_FLAG_CAN_RAHEAD) softc->state = ADA_STATE_RAHEAD; - else if (ADA_WC >= 0 && softc->flags & ADA_FLAG_CAN_RAHEAD) + else if (ADA_WC >= 0 && softc->flags & ADA_FLAG_CAN_WCACHE) softc->state = ADA_STATE_WCACHE; else if ((softc->flags & ADA_FLAG_CAN_LOG) && (softc->zone_mode != ADA_ZONE_NONE)) ___ 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: r321607 - head/libexec/rtld-elf
Author: kib Date: Thu Jul 27 08:33:31 2017 New Revision: 321607 URL: https://svnweb.freebsd.org/changeset/base/321607 Log: Allow to specify targets by absolute paths in libmap.conf. Submitted by: Tatu Kilappa PR: 221032 MFC after:2 weeks Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cThu Jul 27 07:28:29 2017 (r321606) +++ head/libexec/rtld-elf/rtld.cThu Jul 27 08:33:31 2017 (r321607) @@ -1590,19 +1590,20 @@ find_library(const char *xname, const Obj_Entry *refob bool nodeflib, objgiven; objgiven = refobj != NULL; -if (strchr(xname, '/') != NULL) { /* Hard coded pathname */ - if (xname[0] != '/' && !trust) { + +if (libmap_disable || !objgiven || + (name = lm_find(refobj->path, xname)) == NULL) + name = (char *)xname; + +if (strchr(name, '/') != NULL) { /* Hard coded pathname */ + if (name[0] != '/' && !trust) { _rtld_error("Absolute pathname required for shared object \"%s\"", - xname); - return NULL; + name); + return (NULL); } return (origin_subst(__DECONST(Obj_Entry *, refobj), - __DECONST(char *, xname))); + __DECONST(char *, name))); } - -if (libmap_disable || !objgiven || - (name = lm_find(refobj->path, xname)) == NULL) - name = (char *)xname; dbg(" Searching for \"%s\"", name); ___ 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: r321608 - head/lib/libc/x86/sys
Author: kib Date: Thu Jul 27 08:37:07 2017 New Revision: 321608 URL: https://svnweb.freebsd.org/changeset/base/321608 Log: Use MFENCE to serialize RDTSC on non-Intel CPUs. Kernel already used the stronger barrier instruction for AMDs, correct the userspace fast gettimeofday() implementation as well. Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D11728 Modified: head/lib/libc/x86/sys/__vdso_gettc.c Modified: head/lib/libc/x86/sys/__vdso_gettc.c == --- head/lib/libc/x86/sys/__vdso_gettc.cThu Jul 27 08:33:31 2017 (r321607) +++ head/lib/libc/x86/sys/__vdso_gettc.cThu Jul 27 08:37:07 2017 (r321608) @@ -52,57 +52,108 @@ __FBSDID("$FreeBSD$"); #endif #include "libc_private.h" +static enum LMB { + LMB_UNKNOWN, + LMB_NONE, + LMB_MFENCE, + LMB_LFENCE +} lfence_works = LMB_UNKNOWN; + static void -lfence_mb(void) +cpuidp(u_int leaf, u_int p[4]) { + + __asm __volatile( #if defined(__i386__) - static int lfence_works = -1; + " pushl %%ebx\n" +#endif + " cpuid\n" +#if defined(__i386__) + " movl%%ebx,%1\n" + " popl%%ebx" +#endif + : "=a" (p[0]), +#if defined(__i386__) + "=r" (p[1]), +#elif defined(__amd64__) + "=b" (p[1]), +#else +#error "Arch" +#endif + "=c" (p[2]), "=d" (p[3]) + : "0" (leaf)); +} + +static enum LMB +select_lmb(void) +{ + u_int p[4]; + static const char intel_id[] = "GenuntelineI"; + + cpuidp(0, p); + return (memcmp(p + 1, intel_id, sizeof(intel_id) - 1) == 0 ? + LMB_LFENCE : LMB_MFENCE); +} + +static void +init_fence(void) +{ +#if defined(__i386__) u_int cpuid_supported, p[4]; - if (lfence_works == -1) { - __asm __volatile( - " pushfl\n" - " popl%%eax\n" - " movl%%eax,%%ecx\n" - " xorl$0x20,%%eax\n" - " pushl %%eax\n" - " popfl\n" - " pushfl\n" - " popl%%eax\n" - " xorl%%eax,%%ecx\n" - " je 1f\n" - " movl$1,%0\n" - " jmp 2f\n" - "1: movl$0,%0\n" - "2:\n" - : "=r" (cpuid_supported) : : "eax", "ecx", "cc"); - if (cpuid_supported) { - __asm __volatile( - " pushl %%ebx\n" - " cpuid\n" - " movl%%ebx,%1\n" - " popl%%ebx\n" - : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), "=d" (p[3]) - : "0" (0x1)); - lfence_works = (p[3] & CPUID_SSE2) != 0; - } else - lfence_works = 0; - } - if (lfence_works == 1) - lfence(); + __asm __volatile( + " pushfl\n" + " popl%%eax\n" + " movl%%eax,%%ecx\n" + " xorl$0x20,%%eax\n" + " pushl %%eax\n" + " popfl\n" + " pushfl\n" + " popl%%eax\n" + " xorl%%eax,%%ecx\n" + " je 1f\n" + " movl$1,%0\n" + " jmp 2f\n" + "1: movl$0,%0\n" + "2:\n" + : "=r" (cpuid_supported) : : "eax", "ecx", "cc"); + if (cpuid_supported) { + cpuidp(0x1, p); + if ((p[3] & CPUID_SSE2) != 0) + lfence_works = select_lmb(); + } else + lfence_works = LMB_NONE; #elif defined(__amd64__) - lfence(); + lfence_works = select_lmb(); #else -#error "arch" +#error "Arch" #endif } +static void +rdtsc_mb(void) +{ + +again: + if (__predict_true(lfence_works == LMB_LFENCE)) { + lfence(); + return; + } else if (lfence_works == LMB_MFENCE) { + mfence(); + return; + } else if (lfence_works == LMB_NONE) { + return; + } + init_fence(); + goto again; +} + static u_int __vdso_gettc_rdtsc_low(const struct vdso_timehands *th) { u_int rv; - lfence_mb(); + rdtsc_mb(); __asm __volatile("rdtsc; shrd %%cl, %%edx, %0" : "=a" (rv) : "c" (th->th_x86_shift) : "edx"); return (rv); @@ -112,7 +163,7 @@ static u_int __vdso_rdtsc32(void) { - lfence_mb(); + rdtsc_mb(); return (rdtsc32()); } @@ -212,7 +263,7 @@ __vdso_hyperv_tsc(struct hyperv_reftsc *tsc_ref, u_int scale = tsc_ref->tsc_scale; ofs = tsc_ref->t
svn commit: r321609 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: mav Date: Thu Jul 27 10:19:13 2017 New Revision: 321609 URL: https://svnweb.freebsd.org/changeset/base/321609 Log: MFC r320153: revert r315852 which introduced zio_buf_alloc_nowait for use in vdev_queue_aggregate I think that the change is still good, but reconciling it with a planned merge of the ARC buf data scatter-ization is a bit more tedious than I can handle. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Thu Jul 27 08:37:07 2017(r321608) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Thu Jul 27 10:19:13 2017(r321609) @@ -554,7 +554,6 @@ extern zio_t *zio_unique_parent(zio_t *cio); extern void zio_add_child(zio_t *pio, zio_t *cio); extern void *zio_buf_alloc(size_t size); -extern void *zio_buf_alloc_nowait(size_t size); extern void zio_buf_free(void *buf, size_t size); extern void *zio_data_buf_alloc(size_t size); extern void zio_data_buf_free(void *buf, size_t size); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Thu Jul 27 08:37:07 2017(r321608) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Thu Jul 27 10:19:13 2017(r321609) @@ -647,7 +647,6 @@ static zio_t * vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) { zio_t *first, *last, *aio, *dio, *mandatory, *nio; - void *abuf; uint64_t maxgap = 0; uint64_t size; boolean_t stretch; @@ -766,12 +765,8 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) size = IO_SPAN(first, last); ASSERT3U(size, <=, SPA_MAXBLOCKSIZE); - abuf = zio_buf_alloc_nowait(size); - if (abuf == NULL) - return (NULL); - aio = zio_vdev_delegated_io(first->io_vd, first->io_offset, - abuf, size, first->io_type, zio->io_priority, + zio_buf_alloc(size), size, first->io_type, zio->io_priority, flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE, vdev_queue_agg_io_done, NULL); aio->io_timestamp = first->io_timestamp; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Jul 27 08:37:07 2017(r321608) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Jul 27 10:19:13 2017(r321609) @@ -272,33 +272,18 @@ zio_fini(void) * useful to inspect ZFS metadata, but if possible, we should avoid keeping * excess / transient data in-core during a crashdump. */ -static void * -zio_buf_alloc_impl(size_t size, boolean_t canwait) +void * +zio_buf_alloc(size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; int flags = zio_exclude_metadata ? KM_NODEBUG : 0; VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); - if (zio_use_uma) { - return (kmem_cache_alloc(zio_buf_cache[c], - canwait ? KM_PUSHPAGE : KM_NOSLEEP)); - } else { - return (kmem_alloc(size, - (canwait ? KM_SLEEP : KM_NOSLEEP) | flags)); - } -} - -void * -zio_buf_alloc(size_t size) -{ - return (zio_buf_alloc_impl(size, B_TRUE)); -} - -void * -zio_buf_alloc_nowait(size_t size) -{ - return (zio_buf_alloc_impl(size, B_FALSE)); + if (zio_use_uma) + return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE)); + else + return (kmem_alloc(size, KM_SLEEP|flags)); } /* ___ 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: r321610 - in stable/11: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/c...
Author: mav Date: Thu Jul 27 10:25:18 2017 New Revision: 321610 URL: https://svnweb.freebsd.org/changeset/base/321610 Log: MFC r320156, r320185, r320186, r320262, r320452, r32: MFV r318946: 8021 ARC buf data scatter-ization illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383 https://github.com/illumos/illumos-gate/commit/770499e185d15678ccb0be57ebc626ad1 8d93383 https://www.illumos.org/issues/8021 The ARC buf data project (known simply as "ABD" since its genesis in the ZoL community) changes the way the ARC allocates `b_pdata` memory from using linea r `void *` buffers to using scatter/gather lists of fixed-size 1KB chunks. This improves ZFS's performance by helping to defragment the address space occupied by the ARC, in particular for cases where compressed ARC is enabled. It could also ease future work to allocate pages directly from `segkpm` for minimal- overhead memory allocations, bypassing the `kmem` subsystem. This is essentially the same change as the one which recently landed in ZFS on Linux, although they made some platform-specific changes while adapting this work to their codebase: 1. Implemented the equivalent of the `segkpm` suggestion for future work mentioned above to bypass issues that they've had with the Linux kernel memory allocator. 2. Changed the internal representation of the ABD's scatter/gather list so it could be used to pass I/O directly into Linux block device drivers. (This feature is not available in the illumos block device interface yet.) FreeBSD notes: - the actual (default) chunk size is 4KB (despite the text above saying 1KB) - we can try to reimplement ABDs, so that they are not permanently mapped into the KVA unless explicitly requested, especially on platforms with scarce KVA - we can try to use unmapped I/O and avoid intermediate allocation of a linear, virtual memory mapped buffer - we can try to avoid extra data copying by referring to chunks / pages in the original ABD Reviewed by: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: John Kennedy Reviewed by: Prakash Surya Reviewed by: Prashanth Sreenivasa Reviewed by: Pavel Zakharov Reviewed by: Chris Williamson Approved by: Richard Lowe Author: Dan Kimmel Added: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c - copied unchanged from r320156, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h - copied unchanged from r320156, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c stable/11/sys
svn commit: r321611 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: mav Date: Thu Jul 27 10:26:58 2017 New Revision: 321611 URL: https://svnweb.freebsd.org/changeset/base/321611 Log: MFC r320237: MFV r318947: 7578 Fix/improve some aspects of ZIL writing. FreeBSD note: this commit removes small differences between what mav committed to FreeBSD in r308782 and what ended up committed to illumos after addressing all review comments. illumos/illumos-gate@c5ee46810f82e8a53d2cc5a487568a573f449039 https://github.com/illumos/illumos-gate/commit/c5ee46810f82e8a53d2cc5a487568a573f449039 https://www.illumos.org/issues/7578 After some ZIL changes 6 years ago zil_slog_limit got partially broken due to zl_itx_list_sz not updated when async itx'es upgraded to sync. Actually because of other changes about that time zl_itx_list_sz is not really required to implement the functionality, so this patch removes some unneeded broken code and variables. Original idea of zil_slog_limit was to reduce chance of SLOG abuse by single heavy logger, that increased latency for other (more latency critical) loggers, by pushing heavy log out into the main pool instead of SLOG. Beside huge latency increase for heavy writers, this implementation caused double write of all data, since the log records were explicitly prepared for SLOG. Since we now have I/O scheduler, I've found it can be much more efficient to reduce priority of heavy logger SLOG writes from ZIO_PRIORITY_SYNC_WRITE to ZIO_PRIORITY_ASYNC_WRITE, while still leave them on SLOG. Existing ZIL implementation had problem with space efficiency when it has to write large chunks of data into log blocks of limited size. In some cases efficiency stopped to almost as low as 50%. In case of ZIL stored on spinning rust, that also reduced log write speed in half, since head had to uselessly fly over allocated but not written areas. This change improves the situation by offloading problematic operations from z*_log_write() to zil_lwb_commit(), which knows real situation of log blocks allocation and can split large requests into pieces much more efficiently. Also as side effect it removes one of two data copy operations done by ZIL code WR_COPIED case. While there, untangle and unify code of z*_log_write() functions. Also zfs_log_write() alike to zvol_log_write() can now handle writes crossing block boundary, that may also improve efficiency if ZPL is made to do that. Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Reviewed by: Andriy Gapon Reviewed by: Steven Hartland Reviewed by: Brad Lewis Reviewed by: Richard Elling Approved by: Robert Mustacchi Author: Alexander Motin Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Thu Jul 27 10:25:18 2017(r321610) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Thu Jul 27 10:26:58 2017(r321611) @@ -139,10 +139,27 @@ typedef struct zil_bp_node { avl_node_t zn_node; } zil_bp_node_t; +/* + * Maximum amount of write data that can be put into single log block. + */ #defineZIL_MAX_LOG_DATA (SPA_OLD_MAXBLOCKSIZE - sizeof (zil_chain_t) - \ sizeof (lr_write_t)) #defineZIL_MAX_COPIED_DATA \ ((SPA_OLD_MAXBLOCKSIZE - sizeof (zil_chain_t)) / 2 - sizeof (lr_write_t)) + +/* + * Maximum amount of log space we agree to waste to reduce number of + * WR_NEED_COPY chunks to reduce zl_get_data() overhead (~12%). + */ +#defineZIL_MAX_WASTE_SPACE (ZIL_MAX_LOG_DATA / 8) + +/* + * Maximum amount of write data for WR_COPIED. Fall back to WR_NEED_COPY + * as more space efficient if we can't fit at least two log records into + * maximum sized log block. + */ +#defineZIL_MAX_COPIED_DATA ((SPA_OLD_MAXBLOCKSIZE - \ +sizeof (zil_chain_t)) / 2 - sizeof (lr_write_t)) #ifdef __cplusplus } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Jul 27 10:25:18 2017(r321610) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Jul 27 10:26:58 2017(r321611) @@ -90,12 +90,12 @@ SYSCTL_INT(_vfs_zfs_trim, OID_AUTO, enabled, CTLFLAG_R /* * Limit SLOG write size per commit executed with synchronous priority. - * Any writes above that executed with lower (asynchronous) priority to - * limit potential SLOG device abuse by single active ZIL writer. + * Any writes above that
svn commit: r321612 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Thu Jul 27 10:28:07 2017 New Revision: 321612 URL: https://svnweb.freebsd.org/changeset/base/321612 Log: MFC r320238: MFV r319742: 8056 zfs send size estimate is inaccurate for some zvols illumos/illumos-gate@0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16 https://github.com/illumos/illumos-gate/commit/0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16 https://www.illumos.org/issues/8056 The send size estimate for a zvol can be too low, if the size of the record headers (dmu_replay_record_t's) is a significant portion of the size. This is typically the case when the data is highly compressible, especially with embedded blocks. The problem is that dmu_adjust_send_estimate_for_indirects() assumes that blocks are the size of the "recordsize" property (128KB). However, for zvols, the blocks are the size of the "volblocksize" property (8KB). Therefore, we estimate that there will be 16x less record headers than there really will be. Reviewed by: Matthew Ahrens Reviewed by: Pavel Zakharov Approved by: Robert Mustacchi Author: Paul Dagnelie Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Jul 27 10:26:58 2017(r321611) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Jul 27 10:28:07 2017(r321612) @@ -1140,10 +1140,17 @@ dmu_adjust_send_estimate_for_indirects(dsl_dataset_t * */ uint64_t recordsize; uint64_t record_count; + objset_t *os; + VERIFY0(dmu_objset_from_ds(ds, &os)); /* Assume all (uncompressed) blocks are recordsize. */ - err = dsl_prop_get_int_ds(ds, zfs_prop_to_name(ZFS_PROP_RECORDSIZE), - &recordsize); + if (os->os_phys->os_type == DMU_OST_ZVOL) { + err = dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), &recordsize); + } else { + err = dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_RECORDSIZE), &recordsize); + } if (err != 0) return (err); record_count = uncompressed / recordsize; @@ -1212,6 +1219,10 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl_dataset_t *fr err = dmu_adjust_send_estimate_for_indirects(ds, uncomp, comp, stream_compressed, sizep); + /* +* Add the size of the BEGIN and END records to the estimate. +*/ + *sizep += 2 * sizeof (dmu_replay_record_t); return (err); } ___ 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: r321613 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Thu Jul 27 10:29:29 2017 New Revision: 321613 URL: https://svnweb.freebsd.org/changeset/base/321613 Log: MFC r320239: MFV r319950: 5220 L2ARC does not support devices that do not provide 512B access FreeBSD note: the actual change has been in FreeBSD since r297848. This commit accounts for integration of that change with subsequent changes, especially r320156 (MFV of r318946) and r314274. illumos/illumos-gate@403a8da73c64ff9dfb6230ba045c765a242213fb https://github.com/illumos/illumos-gate/commit/403a8da73c64ff9dfb6230ba045c765a242213fb https://www.illumos.org/issues/5220 There are disk devices that have logical sector size larger than 512B, for example 4KB. That is, their physical sector size is larger than 512B and they do not provide emulation for 512B sector sizes. For such devices both a data offset and a data size must be properly aligned. L2ARC should arrange that because it uses physical I/O. zio_vdev_io_start() performs a necessary transformation if io_size is not aligned to vdev_ashift, but that is done only for logical I/O. Something similar should be done in L2ARC code. * a temporary write buffer should be allocated if the original buffer is not going to be compressed and its size is not aligned * size of a temporary compression buffer should be ashift aligned * for the reads, if a size of a target buffer is not sufficiently large and it is not aligned then a temporary read buffer should be allocated Reviewed by: George Wilson Reviewed by: Dan Kimmel Reviewed by: Saso Kiselkov Approved by: Dan McDonald Author: Andriy Gapon Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jul 27 10:28:07 2017(r321612) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jul 27 10:29:29 2017(r321613) @@ -1343,7 +1343,7 @@ typedef struct l2arc_read_callback { blkptr_tl2rcb_bp; /* original blkptr */ zbookmark_phys_tl2rcb_zb; /* original bookmark */ int l2rcb_flags;/* original flags */ - void*l2rcb_abd; /* temporary buffer */ + abd_t *l2rcb_abd; /* temporary buffer */ } l2arc_read_callback_t; typedef struct l2arc_write_callback { @@ -7485,8 +7485,13 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint * Normally the L2ARC can use the hdr's data, but if * we're sharing data between the hdr and one of its * bufs, L2ARC needs its own copy of the data so that -* the ZIO below can't race with the buf consumer. To -* ensure that this copy will be available for the +* the ZIO below can't race with the buf consumer. +* Another case where we need to create a copy of the +* data is when the buffer size is not device-aligned +* and we need to pad the block to make it such. +* That also keeps the clock hand suitably aligned. +* +* To ensure that the copy will be available for the * lifetime of the ZIO and be cleaned up afterwards, we * add it to the l2arc_free_on_write queue. */ ___ 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: r321614 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: mav Date: Thu Jul 27 10:30:55 2017 New Revision: 321614 URL: https://svnweb.freebsd.org/changeset/base/321614 Log: MFC r320352: zfs: port vdev_file part of illumos change 3306 3306 zdb should be able to issue reads in parallel illumos/illumos-gate/31d7e8fa33fae995f558673adb22641b5aa8b6e1 https://www.illumos.org/issues/3306 The upstream change was made before we started to import upstream commits individually. It was imported into the illumos vendor area as r242733. That commit was MFV-ed in r260138, but as the commit message says vdev_file.c was left intact. This commit actually implements the parallel I/O for vdev_file using a taskqueue with multiple thread. This implementation does not depend on the illumos or FreeBSD bio interface at all, but uses zio_t to pass around all the relevent data. So, the code looks a bit different from the upstream. This commit also incorporates ZoL commit zfsonlinux/zfs/bc25c9325b0e5ced897b9820dad239539d561ec9 that fixed https://github.com/zfsonlinux/zfs/issues/2270 We need to use a dedicated taskqueue for exactly the same reason as ZoL as we do not implement TASKQ_DYNAMIC. Obtained from: illumos, ZFS on Linux Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Jul 27 10:29:29 2017(r321613) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Jul 27 10:30:55 2017(r321614) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -2024,6 +2025,7 @@ spa_init(int mode) dmu_init(); zil_init(); vdev_cache_stat_init(); + vdev_file_init(); zfs_prop_init(); zpool_prop_init(); zpool_feature_init(); @@ -2043,6 +2045,7 @@ spa_fini(void) spa_evict_all(); + vdev_file_fini(); vdev_cache_stat_fini(); zil_fini(); dmu_fini(); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h Thu Jul 27 10:29:29 2017(r321613) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h Thu Jul 27 10:30:55 2017(r321614) @@ -39,6 +39,9 @@ typedef struct vdev_file { vnode_t *vf_vnode; } vdev_file_t; +extern void vdev_file_init(void); +extern void vdev_file_fini(void); + #ifdef __cplusplus } #endif Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Thu Jul 27 10:29:29 2017(r321613) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Thu Jul 27 10:30:55 2017(r321614) @@ -36,6 +36,21 @@ * Virtual device vector for files. */ +static taskq_t *vdev_file_taskq; + +void +vdev_file_init(void) +{ + vdev_file_taskq = taskq_create("z_vdev_file", MAX(max_ncpus, 16), + minclsyspri, max_ncpus, INT_MAX, 0); +} + +void +vdev_file_fini(void) +{ + taskq_destroy(vdev_file_taskq); +} + static void vdev_file_hold(vdev_t *vd) { @@ -157,41 +172,32 @@ vdev_file_close(vdev_t *vd) vd->vdev_tsd = NULL; } +/* + * Implements the interrupt side for file vdev types. This routine will be + * called when the I/O completes allowing us to transfer the I/O to the + * interrupt taskqs. For consistency, the code structure mimics disk vdev + * types. + */ static void -vdev_file_io_start(zio_t *zio) +vdev_file_io_intr(zio_t *zio) { + zio_delay_interrupt(zio); +} + +static void +vdev_file_io_strategy(void *arg) +{ + zio_t *zio = arg; vdev_t *vd = zio->io_vd; vdev_file_t *vf; vnode_t *vp; void *addr; ssize_t resid; - if (!vdev_readable(vd)) { - zio->io_error = SET_ERROR(ENXIO); - zio_interrupt(zio); - return; - } - vf = vd->vdev_tsd; vp = vf->vf_vnode; - if (zio->io_type == ZIO_TYPE_IOCTL) { - switch (zio->io_cmd) { - case DKIOCFLUSHWRITECACHE: - zio->io_error = VOP_FSYNC(vp, FSYNC | FDSYNC, - kcred, NULL); - break; - default: - zio->io_error = SET_ERROR(ENOTSUP); - }
svn commit: r321615 - stable/11/usr.sbin/fstyp
Author: mav Date: Thu Jul 27 10:52:36 2017 New Revision: 321615 URL: https://svnweb.freebsd.org/changeset/base/321615 Log: MFC r320152 (by avg): fstyp: move sys/ include path after zfs include paths The reason is that FreeBSD refcount.h shadows ZFS refcount.h and that will lead to a build error after a planned import of the ARC buf data scatter-ization. It's possible that some day we will have an opposite problem where a ZFS header would shadow an essential FreeBSD header. So, we need to think about a better long term solution. Modified: stable/11/usr.sbin/fstyp/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/fstyp/Makefile == --- stable/11/usr.sbin/fstyp/Makefile Thu Jul 27 10:30:55 2017 (r321614) +++ stable/11/usr.sbin/fstyp/Makefile Thu Jul 27 10:52:36 2017 (r321615) @@ -18,8 +18,6 @@ WARNS?= 2 SUBDIR+= tests .endif -CFLAGS+=-I${SRCTOP}/sys - .if ${MK_ZFS} != "no" IGNORE_PRAGMA= YES @@ -34,6 +32,8 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/ CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head .endif + +CFLAGS+=-I${SRCTOP}/sys LIBADD=geom md ___ 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: r321616 - head
Author: emaste Date: Thu Jul 27 12:29:31 2017 New Revision: 321616 URL: https://svnweb.freebsd.org/changeset/base/321616 Log: genericize target exclusion for missing external toolchain Previously we excluded riscv from make universe / tinderbox if the required xtoolchain package was not installed. Make that logic generic so that we can loop over multiple architectures, in preparation to test patches to have other architectures rely on external toolchain. Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D11652 Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Thu Jul 27 10:52:36 2017(r321615) +++ head/Makefile Thu Jul 27 12:29:31 2017(r321616) @@ -441,14 +441,22 @@ TARGET_ARCHES_${target}?= ${target} MAKE_PARAMS_riscv?=CROSS_TOOLCHAIN=riscv64-gcc -# XXX Remove riscv from universe if the required toolchain package is missing. -.if !exists(/usr/local/share/toolchains/riscv64-gcc.mk) && ${TARGETS:Mriscv} -_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:Nriscv} -universe: universe_riscv_skip .PHONY -universe_epilogue: universe_riscv_skip .PHONY -universe_riscv_skip: universe_prologue .PHONY - @echo ">> riscv skipped - install riscv64-xtoolchain-gcc port or package to build" +# XXX Remove architectures only supported by external toolchain from universe +# if required toolchain packages are missing. +TOOLCHAINS_riscv= riscv64 +.for target in riscv +.if ${_UNIVERSE_TARGETS:M${target}} +.for toolchain in ${TOOLCHAINS_${target}} +.if !exists(/usr/local/share/toolchains/${toolchain}-gcc.mk) +_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:N${target}} +universe: universe_${toolchain}_skip .PHONY +universe_epilogue: universe_${toolchain}_skip .PHONY +universe_${toolchain}_skip: universe_prologue .PHONY + @echo ">> ${target} skipped - install ${toolchain}-xtoolchain-gcc port or package to build" .endif +.endfor +.endif +.endfor .if defined(UNIVERSE_TARGET) MAKE_JUST_WORLDS= YES ___ 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: r321617 - stable/11/usr.sbin/acpi/acpidump
Author: emaste Date: Thu Jul 27 12:37:18 2017 New Revision: 321617 URL: https://svnweb.freebsd.org/changeset/base/321617 Log: revert r321601, it depends on an ACPICA update not yet merged Modified: stable/11/usr.sbin/acpi/acpidump/acpi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/acpi/acpidump/acpi.c == --- stable/11/usr.sbin/acpi/acpidump/acpi.c Thu Jul 27 12:29:31 2017 (r321616) +++ stable/11/usr.sbin/acpi/acpidump/acpi.c Thu Jul 27 12:37:18 2017 (r321617) @@ -1085,8 +1085,7 @@ static const char *srat_types[] = { [ACPI_SRAT_TYPE_CPU_AFFINITY] = "CPU", [ACPI_SRAT_TYPE_MEMORY_AFFINITY] = "Memory", [ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY] = "X2APIC", -[ACPI_SRAT_TYPE_GICC_AFFINITY] = "GICC", -[ACPI_SRAT_TYPE_GIC_ITS_AFFINITY] = "GIC ITS", +[ACPI_SRAT_TYPE_GICC_AFFINITY] = "GICC" }; 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: r321618 - in head: sys/conf sys/net sys/netinet sys/netinet6 usr.bin/netstat
Author: bz Date: Thu Jul 27 13:03:36 2017 New Revision: 321618 URL: https://svnweb.freebsd.org/changeset/base/321618 Log: After inpcb route caching was put back in place there is no need for flowtable anymore (as flowtable was never considered to be useful in the forwarding path). Reviewed by: np Differential Revision:https://reviews.freebsd.org/D11448 Deleted: head/sys/net/flowtable.c head/sys/net/flowtable.h head/usr.bin/netstat/flowtable.c Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/net/route.c head/sys/netinet/ip_output.c head/sys/netinet6/ip6_output.c head/usr.bin/netstat/Makefile head/usr.bin/netstat/main.c head/usr.bin/netstat/netstat.h Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Thu Jul 27 12:37:18 2017(r321617) +++ head/sys/conf/NOTES Thu Jul 27 13:03:36 2017(r321618) @@ -646,9 +646,6 @@ options LIBMCHAIN # libalias library, performing NAT optionsLIBALIAS -# flowtable cache -optionsFLOWTABLE - # # SCTP is a NEW transport protocol defined by # RFC2960 updated by RFC3309 and RFC3758.. and Modified: head/sys/conf/options == --- head/sys/conf/options Thu Jul 27 12:37:18 2017(r321617) +++ head/sys/conf/options Thu Jul 27 13:03:36 2017(r321618) @@ -454,8 +454,6 @@ TCP_RFC7413_MAX_KEYSopt_inet.h TCP_SIGNATURE opt_ipsec.h VLAN_ARRAY opt_vlan.h XBONEHACK -FLOWTABLE opt_route.h -FLOWTABLE_HASH_ALL opt_route.h # # SCTP Modified: head/sys/net/route.c == --- head/sys/net/route.cThu Jul 27 12:37:18 2017(r321617) +++ head/sys/net/route.cThu Jul 27 13:03:36 2017(r321618) @@ -59,7 +59,6 @@ #include #include #include -#include #ifdef RADIX_MPATH #include @@ -1504,79 +1503,12 @@ rt_mpath_unlink(struct rib_head *rnh, struct rt_addrin } #endif -#ifdef FLOWTABLE -static struct rtentry * -rt_flowtable_check_route(struct rib_head *rnh, struct rt_addrinfo *info) -{ -#if defined(INET6) || defined(INET) - struct radix_node *rn; -#endif - struct rtentry *rt0; - - rt0 = NULL; - /* "flow-table" only supports IPv6 and IPv4 at the moment. */ - switch (dst->sa_family) { -#ifdef INET6 - case AF_INET6: -#endif -#ifdef INET - case AF_INET: -#endif -#if defined(INET6) || defined(INET) - rn = rnh->rnh_matchaddr(dst, &rnh->head); - if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { - struct sockaddr *mask; - u_char *m, *n; - int len; - - /* -* compare mask to see if the new route is -* more specific than the existing one -*/ - rt0 = RNTORT(rn); - RT_LOCK(rt0); - RT_ADDREF(rt0); - RT_UNLOCK(rt0); - /* -* A host route is already present, so -* leave the flow-table entries as is. -*/ - if (rt0->rt_flags & RTF_HOST) { - RTFREE(rt0); - rt0 = NULL; - } else if (!(flags & RTF_HOST) && netmask) { - mask = rt_mask(rt0); - len = mask->sa_len; - m = (u_char *)mask; - n = (u_char *)netmask; - while (len-- > 0) { - if (*n != *m) - break; - n++; - m++; - } - if (len == 0 || (*n < *m)) { - RTFREE(rt0); - rt0 = NULL; - } - } - } -#endif/* INET6 || INET */ - } - - return (rt0); -} -#endif - int rtrequest1_fib(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt, u_int fibnum) { int error = 0; struct rtentry *rt, *rt_old; -#ifdef FLOWTABLE - struct rtentry *rt0; -#endif struct radix_node *rn; struct rib_head *rnh; struct ifaddr *ifa; @@ -1710,10 +1642,6 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru } #endif -#ifdef FLOWTABLE - rt0 = rt_flowtable_check_route(rnh, info); -#endif /* FLOWTABLE */ - /* XXX mtu manipulat
svn commit: r321619 - head/release/arm
Author: gjb Date: Thu Jul 27 13:37:21 2017 New Revision: 321619 URL: https://svnweb.freebsd.org/changeset/base/321619 Log: Bump the image size for BANANAPI and CUBIEBOARD2 to 1.5G, as 1G is no longer large enough. Reported by: manu Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BANANAPI.conf head/release/arm/CUBIEBOARD2.conf Modified: head/release/arm/BANANAPI.conf == --- head/release/arm/BANANAPI.conf Thu Jul 27 13:03:36 2017 (r321618) +++ head/release/arm/BANANAPI.conf Thu Jul 27 13:37:21 2017 (r321619) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-bananapi" KERNEL="GENERIC" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x4200" -IMAGE_SIZE="1G" +IMAGE_SIZE="1536M" PART_SCHEME="MBR" FAT_SIZE="32m -b 1m" FAT_TYPE="16" Modified: head/release/arm/CUBIEBOARD2.conf == --- head/release/arm/CUBIEBOARD2.conf Thu Jul 27 13:03:36 2017 (r321618) +++ head/release/arm/CUBIEBOARD2.conf Thu Jul 27 13:37:21 2017 (r321619) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-cubieboard2" KERNEL="GENERIC" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x4200" -IMAGE_SIZE="1G" +IMAGE_SIZE="1536M" PART_SCHEME="MBR" FAT_SIZE="32m -b 1m" FAT_TYPE="16" ___ 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: r321620 - head/usr.bin/w
Author: mav Date: Thu Jul 27 14:34:57 2017 New Revision: 321620 URL: https://svnweb.freebsd.org/changeset/base/321620 Log: Fix singular/plural "users" output. It was broken during libxo'fication. PR: 221039 Submitted by: timur@ MFC after:1 week Modified: head/usr.bin/w/w.c Modified: head/usr.bin/w/w.c == --- head/usr.bin/w/w.c Thu Jul 27 13:37:21 2017(r321619) +++ head/usr.bin/w/w.c Thu Jul 27 14:34:57 2017(r321620) @@ -511,7 +511,7 @@ pr_header(time_t *nowp, int nusers) } /* Print number of users logged in to system */ - xo_emit(" {:users/%d} {N:user%s}", nusers, nusers == 1 ? "" : "s"); + xo_emit(" {:users/%d} {Np:user,users}", nusers); /* * Print 1, 5, and 15 minute load averages. ___ 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: r321621 - head/sys/boot/efi/libefi
Author: andrew Date: Thu Jul 27 15:06:34 2017 New Revision: 321621 URL: https://svnweb.freebsd.org/changeset/base/321621 Log: Always set the receive mask in loader.efi. Some UEFI implementations set this to be too restrictive. We need to have both broadcast and unicast enabled for loader to work. Set them in all cases to ensure this is true. This allows the Cavium ThunderX 2s in the netperf cluster to netboot using a USB NIC. PR: 221001 Reviewed by: emaste, tsoome Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D11732 Modified: head/sys/boot/efi/libefi/efinet.c Modified: head/sys/boot/efi/libefi/efinet.c == --- head/sys/boot/efi/libefi/efinet.c Thu Jul 27 14:34:57 2017 (r321620) +++ head/sys/boot/efi/libefi/efinet.c Thu Jul 27 15:06:34 2017 (r321621) @@ -187,6 +187,7 @@ efinet_init(struct iodesc *desc, void *machdep_hint) EFI_SIMPLE_NETWORK *net; EFI_HANDLE h; EFI_STATUS status; + UINT32 mask; if (nif->nif_driver->netif_ifs[nif->nif_unit].dif_unit < 0) { printf("Invalid network interface %d\n", nif->nif_unit); @@ -220,16 +221,14 @@ efinet_init(struct iodesc *desc, void *machdep_hint) } } - if (net->Mode->ReceiveFilterSetting == 0) { - UINT32 mask = EFI_SIMPLE_NETWORK_RECEIVE_UNICAST | - EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST; + mask = EFI_SIMPLE_NETWORK_RECEIVE_UNICAST | + EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST; - status = net->ReceiveFilters(net, mask, 0, FALSE, 0, NULL); - if (status != EFI_SUCCESS) { - printf("net%d: cannot set rx. filters (status=%lu)\n", - nif->nif_unit, EFI_ERROR_CODE(status)); - return; - } + status = net->ReceiveFilters(net, mask, 0, FALSE, 0, NULL); + if (status != EFI_SUCCESS) { + printf("net%d: cannot set rx. filters (status=%lu)\n", + nif->nif_unit, EFI_ERROR_CODE(status)); + return; } #ifdef EFINET_DEBUG ___ 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: r321622 - head/sys/dev/isp
Author: ken Date: Thu Jul 27 15:33:57 2017 New Revision: 321622 URL: https://svnweb.freebsd.org/changeset/base/321622 Log: Fix probing FC targets with hard addressing turned on. This largely reverts FreeBSD SVN change 289937 from October 25th, 2015. The intent of that change was to keep loop IDs persistent across chip reinits. The problem is that the change turned on the PREVLOOP / PREV_ADDRESS bit (bit 7 in Firmware Options 2), which tells the Qlogic chip to not participate in the loop if it can't get the requested loop address. It also turned off soft addressing on 2400 (4Gb) and newer controllers. The isp(4) driver defaults to loop address 0, and the tape drives I have tested default to loop address 0 if hard addressing is turned on. So when hard loop addressing is turned on on the drive, the isp(4) driver just refuses to participate in the loop. The solution is to largely revert that change. I left some elements in place that are related to virtual ports, since they were new. This does work with IBM tape drives with hard and soft addressing turned on. I have tested it with 4Gb, 8Gb, and 16Gb controllers. sys/dev/isp.c: Largely revert FreeBSD SVN change 289937. I left the ispmbox.h changes in place. Don't use the PREV_ADDRESS bit on initialization. It tells the chip to not participate if it can't get the requested loop ID. Do use soft addressing on 2400 and newer chips. Use hard addressing when the user has requested a specific initiator ID. (hint.isp.X.iid=N in /boot/loader.conf) Leave some of the virtual port options from that change in place, but don't turn on the PREV_ADDRESS bit. Reviewed by: mav MFC after:3 days Sponsored by: Spectra Logic Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Thu Jul 27 15:06:34 2017(r321621) +++ head/sys/dev/isp/isp.c Thu Jul 27 15:33:57 2017(r321622) @@ -1631,6 +1631,7 @@ isp_fibre_init(ispsoftc_t *isp) fcparam *fcp; isp_icb_t local, *icbp = &local; mbreg_t mbs; + int ownloopid; /* * We only support one channel on non-24XX cards @@ -1709,15 +1710,22 @@ isp_fibre_init(ispsoftc_t *isp) } icbp->icb_retry_delay = fcp->isp_retry_delay; icbp->icb_retry_count = fcp->isp_retry_count; - if (fcp->isp_loopid < LOCAL_LOOP_LIM) { - icbp->icb_hardaddr = fcp->isp_loopid; - if (isp->isp_confopts & ISP_CFG_OWNLOOPID) - icbp->icb_fwoptions |= ICBOPT_HARD_ADDRESS; - else - icbp->icb_fwoptions |= ICBOPT_PREV_ADDRESS; + icbp->icb_hardaddr = fcp->isp_loopid; + ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; + if (icbp->icb_hardaddr >= LOCAL_LOOP_LIM) { + icbp->icb_hardaddr = 0; + ownloopid = 0; } /* +* Our life seems so much better with 2200s and later with +* the latest f/w if we set Hard Address. +*/ + if (ownloopid || ISP_FW_NEWER_THAN(isp, 2, 2, 5)) { + icbp->icb_fwoptions |= ICBOPT_HARD_ADDRESS; + } + + /* * Right now we just set extended options to prefer point-to-point * over loop based upon some soft config options. * @@ -1951,6 +1959,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) isp_icb_2400_t local, *icbp = &local; mbreg_t mbs; int chan; + int ownloopid = 0; /* * Check to see whether all channels have *some* kind of role @@ -2023,14 +2032,18 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_xchgcnt >>= 1; } - if (fcp->isp_loopid < LOCAL_LOOP_LIM) { - icbp->icb_hardaddr = fcp->isp_loopid; - if (isp->isp_confopts & ISP_CFG_OWNLOOPID) - icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS; - else - icbp->icb_fwoptions1 |= ICB2400_OPT1_PREV_ADDRESS; + + ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; + icbp->icb_hardaddr = fcp->isp_loopid; + if (icbp->icb_hardaddr >= LOCAL_LOOP_LIM) { + icbp->icb_hardaddr = 0; + ownloopid = 0; } + if (ownloopid) + icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS; + + icbp->icb_fwoptions2 = fcp->isp_xfwoptions; if (isp->isp_confopts & ISP_CFG_NOFCTAPE) { icbp->icb_fwoptions2 &= ~ICB2400_OPT2_FCTAPE; } @@ -2093,6 +2106,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_fwoptions2 |= ICB2400_OPT2_ENA_IHA; } + icbp->icb_fwoptions3 = fcp->isp_zfwoptions; if ((icbp->icb_fwoptions3 & ICB2400_OPT
svn commit: r321623 - head/sys/dev/isp
Author: ken Date: Thu Jul 27 15:51:56 2017 New Revision: 321623 URL: https://svnweb.freebsd.org/changeset/base/321623 Log: Remove duplicate assignments from r321622. Submitted by: mav MFC after:3 days Sponsored by: Spectra Logic Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Thu Jul 27 15:33:57 2017(r321622) +++ head/sys/dev/isp/isp.c Thu Jul 27 15:51:56 2017(r321623) @@ -2043,7 +2043,6 @@ isp_fibre_init_2400(ispsoftc_t *isp) if (ownloopid) icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS; - icbp->icb_fwoptions2 = fcp->isp_xfwoptions; if (isp->isp_confopts & ISP_CFG_NOFCTAPE) { icbp->icb_fwoptions2 &= ~ICB2400_OPT2_FCTAPE; } @@ -2106,7 +2105,6 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_fwoptions2 |= ICB2400_OPT2_ENA_IHA; } - icbp->icb_fwoptions3 = fcp->isp_zfwoptions; if ((icbp->icb_fwoptions3 & ICB2400_OPT3_RSPSZ_MASK) == 0) { icbp->icb_fwoptions3 |= ICB2400_OPT3_RSPSZ_24; } ___ 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: r321624 - stable/11/release/doc/en_US.ISO8859-1/errata
Author: gjb Date: Thu Jul 27 15:59:36 2017 New Revision: 321624 URL: https://svnweb.freebsd.org/changeset/base/321624 Log: Add an errata entry to reflect an incorrect attribution for r315330. Reported by: Jim Thompson Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xmlThu Jul 27 15:51:56 2017(r321623) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xmlThu Jul 27 15:59:36 2017(r321624) @@ -179,6 +179,13 @@ boot Systems being upgraded from 11.1-RC1 and earlier and 11.1-RC3 to 11.1-RELEASE should be unaffected. + + + [2017-07-27] The release notes erroneously state + revision r315330 was sponsored by Rubicon + Communications, LLC (Netgate), when in fact this work was + done by Hiroki Mori independently. + ___ 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: r321594 - stable/11
On Wednesday, July 26, 2017 11:18:14 PM Ed Maste wrote: > Author: emaste > Date: Wed Jul 26 23:18:14 2017 > New Revision: 321594 > URL: https://svnweb.freebsd.org/changeset/base/321594 > > Log: > MFC r312857: Use cross-NM (XNM) in compat32 build > > An attempt to build mips64 using external toolchain failed as it tried > to use the host amd64 nm. Note that none of the mips bits for lib32 have been merged to 11. -- John Baldwin ___ 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: r321625 - in head/sys: kern sys
Author: kib Date: Thu Jul 27 16:40:14 2017 New Revision: 321625 URL: https://svnweb.freebsd.org/changeset/base/321625 Log: Make the number of children for pctrie node available outside subr_pctrie.c. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after:1 week X-Differential revision: https://reviews.freebsd.org/D11435 Modified: head/sys/kern/subr_pctrie.c head/sys/sys/pctrie.h Modified: head/sys/kern/subr_pctrie.c == --- head/sys/kern/subr_pctrie.c Thu Jul 27 15:59:36 2017(r321624) +++ head/sys/kern/subr_pctrie.c Thu Jul 27 16:40:14 2017(r321625) @@ -58,18 +58,6 @@ __FBSDID("$FreeBSD$"); #include #endif -/* - * These widths should allow the pointers to a node's children to fit within - * a single cache line. The extra levels from a narrow width should not be - * a problem thanks to path compression. - */ -#ifdef __LP64__ -#definePCTRIE_WIDTH4 -#else -#definePCTRIE_WIDTH3 -#endif - -#definePCTRIE_COUNT(1 << PCTRIE_WIDTH) #definePCTRIE_MASK (PCTRIE_COUNT - 1) #definePCTRIE_LIMIT(howmany(sizeof(uint64_t) * NBBY, PCTRIE_WIDTH) - 1) Modified: head/sys/sys/pctrie.h == --- head/sys/sys/pctrie.h Thu Jul 27 15:59:36 2017(r321624) +++ head/sys/sys/pctrie.h Thu Jul 27 16:40:14 2017(r321625) @@ -133,5 +133,18 @@ pctrie_is_empty(struct pctrie *ptree) return (ptree->pt_root == 0); } +/* + * These widths should allow the pointers to a node's children to fit within + * a single cache line. The extra levels from a narrow width should not be + * a problem thanks to path compression. + */ +#ifdef __LP64__ +#definePCTRIE_WIDTH4 +#else +#definePCTRIE_WIDTH3 +#endif + +#definePCTRIE_COUNT(1 << PCTRIE_WIDTH) + #endif /* _KERNEL */ #endif /* !_SYS_PCTRIE_H_ */ ___ 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: r321626 - head/sys/arm/allwinner/clkng
Author: manu Date: Thu Jul 27 17:51:51 2017 New Revision: 321626 URL: https://svnweb.freebsd.org/changeset/base/321626 Log: Allwinner A64: fix typo 'pll_ddr0' is the dram parent, not 'pll_ddr' Modified: head/sys/arm/allwinner/clkng/ccu_a64.c Modified: head/sys/arm/allwinner/clkng/ccu_a64.c == --- head/sys/arm/allwinner/clkng/ccu_a64.c Thu Jul 27 16:40:14 2017 (r321625) +++ head/sys/arm/allwinner/clkng/ccu_a64.c Thu Jul 27 17:51:51 2017 (r321626) @@ -712,7 +712,7 @@ static struct clk_fixed_def *fixed_factor_clks[] = { static struct aw_clk_init init_clks[] = { {"ahb1", "pll_periph0", 0, false}, {"ahb2", "pll_periph0", 0, false}, - {"dram", "pll_ddr", 0, false}, + {"dram", "pll_ddr0", 0, false}, }; 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: r321627 - head/sys/kern
Author: kib Date: Thu Jul 27 20:45:41 2017 New Revision: 321627 URL: https://svnweb.freebsd.org/changeset/base/321627 Log: Make it possible to request nosys logging to console. New kern.lognosys values are 1 - log to ctty 2 - log to console 3 - log to both. Inspired by: eugen Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c == --- head/sys/kern/kern_sig.cThu Jul 27 17:51:51 2017(r321626) +++ head/sys/kern/kern_sig.cThu Jul 27 20:45:41 2017(r321627) @@ -3579,9 +3579,14 @@ nosys(struct thread *td, struct nosys_args *args) PROC_LOCK(p); tdsignal(td, SIGSYS); PROC_UNLOCK(p); - if (kern_lognosys) + if (kern_lognosys == 1 || kern_lognosys == 3) { uprintf("pid %d comm %s: nosys %d\n", p->p_pid, p->p_comm, td->td_sa.code); + } + if (kern_lognosys == 2 || kern_lognosys == 3) { + printf("pid %d comm %s: nosys %d\n", p->p_pid, p->p_comm, + td->td_sa.code); + } return (ENOSYS); } ___ 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: r321628 - in head/sys/fs: nfs nfsclient
Author: rmacklem Date: Thu Jul 27 20:55:31 2017 New Revision: 321628 URL: https://svnweb.freebsd.org/changeset/base/321628 Log: Replace the checks for MNTK_UNMOUNTF with a macro that does the same thing. This patch defines a macro that checks for MNTK_UNMOUNTF and replaces explicit checks with this macro. It has no effect on semantics, but prepares the code for a future patch where there will also be a NFS specific flag for "forced dismount about to occur". Suggested by: kib MFC after:2 weeks Modified: head/sys/fs/nfs/nfs_commonkrpc.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfscl.h head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c == --- head/sys/fs/nfs/nfs_commonkrpc.cThu Jul 27 20:45:41 2017 (r321627) +++ head/sys/fs/nfs/nfs_commonkrpc.cThu Jul 27 20:55:31 2017 (r321628) @@ -511,7 +511,7 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmo if (xidp != NULL) *xidp = 0; /* Reject requests while attempting a forced unmount. */ - if (nmp != NULL && (nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF)) { + if (nmp != NULL && NFSCL_FORCEDISM(nmp->nm_mountp)) { m_freem(nd->nd_mreq); return (ESTALE); } @@ -1231,7 +1231,7 @@ newnfs_sigintr(struct nfsmount *nmp, struct thread *td sigset_t tmpset; /* Terminate all requests while attempting a forced unmount. */ - if (nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) + if (NFSCL_FORCEDISM(nmp->nm_mountp)) return (EIO); if (!(nmp->nm_flag & NFSMNT_INT)) return (0); Modified: head/sys/fs/nfs/nfs_commonsubs.c == --- head/sys/fs/nfs/nfs_commonsubs.cThu Jul 27 20:45:41 2017 (r321627) +++ head/sys/fs/nfs/nfs_commonsubs.cThu Jul 27 20:55:31 2017 (r321628) @@ -1839,7 +1839,7 @@ nfsv4_lock(struct nfsv4lock *lp, int iwantlock, int *i lp->nfslock_lock |= NFSV4LOCK_LOCKWANTED; } while (lp->nfslock_lock & (NFSV4LOCK_LOCK | NFSV4LOCK_LOCKWANTED)) { - if (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) { + if (mp != NULL && NFSCL_FORCEDISM(mp)) { lp->nfslock_lock &= ~NFSV4LOCK_LOCKWANTED; return (0); } @@ -1893,7 +1893,7 @@ nfsv4_relref(struct nfsv4lock *lp) * not wait for threads that want the exclusive lock. If priority needs * to be given to threads that need the exclusive lock, a call to nfsv4_lock() * with the 2nd argument == 0 should be done before calling nfsv4_getref(). - * If the mp argument is not NULL, check for MNTK_UNMOUNTF being set and + * If the mp argument is not NULL, check for NFSCL_FORCEDISM() being set and * return without getting a refcnt for that case. */ APPLESTATIC void @@ -1908,7 +1908,7 @@ nfsv4_getref(struct nfsv4lock *lp, int *isleptp, void * Wait for a lock held. */ while (lp->nfslock_lock & NFSV4LOCK_LOCK) { - if (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) + if (mp != NULL && NFSCL_FORCEDISM(mp)) return; lp->nfslock_lock |= NFSV4LOCK_WANTED; if (isleptp) @@ -1916,7 +1916,7 @@ nfsv4_getref(struct nfsv4lock *lp, int *isleptp, void (void) nfsmsleep(&lp->nfslock_lock, mutex, PZERO - 1, "nfsv4gr", NULL); } - if (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) + if (mp != NULL && NFSCL_FORCEDISM(mp)) return; lp->nfslock_usecnt++; @@ -4197,9 +4197,7 @@ nfsv4_sequencelookup(struct nfsmount *nmp, struct nfsc * This RPC attempt will fail when it calls * newnfs_request(). */ - if (nmp != NULL && - (nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) - != 0) { + if (nmp != NULL && NFSCL_FORCEDISM(nmp->nm_mountp)) { mtx_unlock(&sep->nfsess_mtx); return (ESTALE); } Modified: head/sys/fs/nfs/nfscl.h == --- head/sys/fs/nfs/nfscl.h Thu Jul 27 20:45:41 2017(r321627) +++ head/sys/fs/nfs/nfscl.h Thu Jul 27 20:55:31 2017(r321628) @@ -59,6 +59,9 @@ struct nfsv4node { #defineNFSCL_RENEW(l) (((l) < 2) ? 1 : ((l) / 2)) #defineNFSCL_LEASE(r) ((r) * 2) +/* This macro checks to see if a forc
svn commit: r321629 - in head/sys: dev/bnxt net
Author: sbruno Date: Thu Jul 27 21:21:43 2017 New Revision: 321629 URL: https://svnweb.freebsd.org/changeset/base/321629 Log: Deprecate unused int isc_max_txqsets and int isc_max_rxqsets as they were redundant and not being used to set anything up. Submitted by: Matt Macy Reported by: Jeb Cramer Sponsored by: Limelight Networks Modified: head/sys/dev/bnxt/if_bnxt.c head/sys/net/iflib.h Modified: head/sys/dev/bnxt/if_bnxt.c == --- head/sys/dev/bnxt/if_bnxt.c Thu Jul 27 20:55:31 2017(r321628) +++ head/sys/dev/bnxt/if_bnxt.c Thu Jul 27 21:21:43 2017(r321629) @@ -761,12 +761,12 @@ bnxt_attach_pre(if_ctx_t ctx) scctx->isc_nrxd[1]; scctx->isc_rxqsizes[2] = sizeof(struct rx_prod_pkt_bd) * scctx->isc_nrxd[2]; - scctx->isc_max_rxqsets = min(pci_msix_count(softc->dev)-1, + scctx->isc_nrxqsets_max = min(pci_msix_count(softc->dev)-1, softc->func.max_cp_rings - 1); - scctx->isc_max_rxqsets = min(scctx->isc_max_rxqsets, + scctx->isc_nrxqsets_max = min(scctx->isc_nrxqsets_max, softc->func.max_rx_rings); - scctx->isc_max_txqsets = min(softc->func.max_rx_rings, - softc->func.max_cp_rings - scctx->isc_max_rxqsets - 1); + scctx->isc_ntxqsets_max = min(softc->func.max_rx_rings, + softc->func.max_cp_rings - scctx->isc_nrxqsets_max - 1); scctx->isc_rss_table_size = HW_HASH_INDEX_SIZE; scctx->isc_rss_table_mask = scctx->isc_rss_table_size - 1; Modified: head/sys/net/iflib.h == --- head/sys/net/iflib.hThu Jul 27 20:55:31 2017(r321628) +++ head/sys/net/iflib.hThu Jul 27 21:21:43 2017(r321629) @@ -200,8 +200,6 @@ typedef struct if_softc_ctx { uint8_t isc_txd_size[8]; uint8_t isc_rxd_size[8]; - int isc_max_txqsets; - int isc_max_rxqsets; int isc_tx_tso_segments_max; int isc_tx_tso_size_max; int isc_tx_tso_segsize_max; ___ 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: r321630 - head/sys/net
Author: sbruno Date: Thu Jul 27 22:53:47 2017 New Revision: 321630 URL: https://svnweb.freebsd.org/changeset/base/321630 Log: Slight restructure of iflib_busdma_load_mbuf_sg() to fix accounting when m_collapse() fails. Submitted by: krzystof.gala...@intel.com Reviewed by: Jeb Cramer Sponsored by: Intel Corporation Differential Revision:https://reviews.freebsd.org/D11476 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cThu Jul 27 21:21:43 2017(r321629) +++ head/sys/net/iflib.cThu Jul 27 22:53:47 2017(r321630) @@ -2975,6 +2975,8 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag #endif ifsd_m[next] = m; while (buflen > 0) { + if (i >= max_segs) + goto err; max_sgsize = MIN(buflen, maxsegsz); curaddr = pmap_kextract(vaddr); sgsize = PAGE_SIZE - (curaddr & PAGE_MASK); @@ -2984,8 +2986,6 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag vaddr += sgsize; buflen -= sgsize; i++; - if (i >= max_segs) - goto err; } count++; tmp = m; ___ 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: r321631 - head/sys/dev/ixl
Author: sbruno Date: Thu Jul 27 23:01:07 2017 New Revision: 321631 URL: https://svnweb.freebsd.org/changeset/base/321631 Log: Drop IXL RX lock during TCP_LRO, fixes LOR mahem while holding the RX queue lock when the uppoer stack is called inside TCP_LRO Submitted by: Kevin Bowling Reviewed by: erj Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D11724 Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Thu Jul 27 22:53:47 2017(r321630) +++ head/sys/dev/ixl/ixl_txrx.c Thu Jul 27 23:01:07 2017(r321631) @@ -1400,9 +1400,7 @@ ixl_rx_input(struct rx_ring *rxr, struct ifnet *ifp, s return; } #endif - IXL_RX_UNLOCK(rxr); (*ifp->if_input)(ifp, m); - IXL_RX_LOCK(rxr); } @@ -1730,7 +1728,9 @@ next_desc: /* Now send to the stack or do LRO */ if (sendmp != NULL) { rxr->next_check = i; + IXL_RX_UNLOCK(rxr); ixl_rx_input(rxr, ifp, sendmp, ptype); + IXL_RX_LOCK(rxr); i = rxr->next_check; } @@ -1747,6 +1747,8 @@ next_desc: rxr->next_check = i; + IXL_RX_UNLOCK(rxr); + #if defined(INET6) || defined(INET) /* * Flush any outstanding LRO work @@ -1762,7 +1764,6 @@ next_desc: #endif #endif /* defined(INET6) || defined(INET) */ - IXL_RX_UNLOCK(rxr); return (FALSE); } ___ 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: r321632 - stable/11/sys/fs/nfsclient
Author: rmacklem Date: Thu Jul 27 23:09:12 2017 New Revision: 321632 URL: https://svnweb.freebsd.org/changeset/base/321632 Log: MFC: r321314 r320062 introduced a bug when doing NFSv4.1 mounts against some non-FreeBSD servers. r320062 used nm_rsize, nm_wsize to set the maximum request/response sizes for the NFSv4.1 session. If rsize,wsize are not specified as options, the value of nm_rsize, nm_wsize is 0 at session creation, resulting in values for request/response that are too small. This patch fixes the problem. A workaround is to specify rsize=N,wsize=N mount options explicitly, so they are set before session creation. This bug only affects NFSv4.1 mounts against some non-FreeBSD servers. Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c == --- stable/11/sys/fs/nfsclient/nfs_clrpcops.c Thu Jul 27 23:01:07 2017 (r321631) +++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c Thu Jul 27 23:09:12 2017 (r321632) @@ -4664,6 +4664,11 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc struct nfsrv_descript *nd = &nfsd; int error, irdcnt; + /* Make sure nm_rsize, nm_wsize is set. */ + if (nmp->nm_rsize > NFS_MAXBSIZE || nmp->nm_rsize == 0) + nmp->nm_rsize = NFS_MAXBSIZE; + if (nmp->nm_wsize > NFS_MAXBSIZE || nmp->nm_wsize == 0) + nmp->nm_wsize = NFS_MAXBSIZE; nfscl_reqstart(nd, NFSPROC_CREATESESSION, nmp, NULL, 0, NULL, NULL); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); *tl++ = sep->nfsess_clientid.lval[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: r321633 - in head/sys/arm: arm include
Author: zbb Date: Thu Jul 27 23:14:17 2017 New Revision: 321633 URL: https://svnweb.freebsd.org/changeset/base/321633 Log: Fix TEX index acquisition using L2 attributes The TEX index is selected using (TEX0 C B) bits from the L2 descriptor. Use correct index by masking and shifting those bits accordingly. Differential Revision:https://reviews.freebsd.org/D11703 Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/include/pte-v6.h Modified: head/sys/arm/arm/pmap-v6.c == --- head/sys/arm/arm/pmap-v6.c Thu Jul 27 23:09:12 2017(r321632) +++ head/sys/arm/arm/pmap-v6.c Thu Jul 27 23:14:17 2017(r321633) @@ -525,8 +525,8 @@ pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t int old_idx, new_idx; /* Map VM memattrs to indexes to tex_class table. */ - old_idx = pte2_attr_tab[(int)old_attr]; - new_idx = pte2_attr_tab[(int)new_attr]; + old_idx = PTE2_ATTR2IDX(pte2_attr_tab[(int)old_attr]); + new_idx = PTE2_ATTR2IDX(pte2_attr_tab[(int)new_attr]); /* Replace TEX attribute and apply it. */ tex_class[old_idx] = tex_class[new_idx]; Modified: head/sys/arm/include/pte-v6.h == --- head/sys/arm/include/pte-v6.h Thu Jul 27 23:09:12 2017 (r321632) +++ head/sys/arm/include/pte-v6.h Thu Jul 27 23:14:17 2017 (r321633) @@ -149,10 +149,12 @@ #defineL2_NX 0x0001 /* Not executable */ #defineL2_B0x0004 /* Bufferable page */ #defineL2_C0x0008 /* Cacheable page */ +#defineL2_CB_SHIFT 2 /* C,B bit field shift */ #defineL2_AP(x)((x) << 4) #defineL2_AP0 0x0010 /* access permissions bit 0*/ #defineL2_AP1 0x0020 /* access permissions bit 1*/ -#defineL2_TEX(x) ((x) << 6) /* type extension */ +#defineL2_TEX_SHIFT6 /* type extension field shift */ +#defineL2_TEX(x) ((x) << L2_TEX_SHIFT) /* type extension */ #defineL2_TEX0 0x0040 /* type extension bit 0 */ #defineL2_TEX1 0x0080 /* type extension bit 1 */ #defineL2_TEX2 0x0100 /* type extension bit 2 */ @@ -271,6 +273,10 @@ #definePTE2_FRAME L2_S_FRAME #definePTE2_ATTR_MASK (L2_TEX0 | L2_C | L2_B) +/* PTE2 attributes to TEX class index: (TEX0 C B) */ +#definePTE2_ATTR2IDX(attr) \ +attr) & (L2_C | L2_B)) >> L2_CB_SHIFT) | \ +(((attr) & L2_TEX0) >> (L2_TEX_SHIFT - L2_CB_SHIFT))) #definePTE2_AP_KR (PTE2_RO | PTE2_NM) #definePTE2_AP_KRW 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: r321634 - stable/10/sys/fs/nfsclient
Author: rmacklem Date: Thu Jul 27 23:15:24 2017 New Revision: 321634 URL: https://svnweb.freebsd.org/changeset/base/321634 Log: MFC: r321314 r320062 introduced a bug when doing NFSv4.1 mounts against some non-FreeBSD servers. r320062 used nm_rsize, nm_wsize to set the maximum request/response sizes for the NFSv4.1 session. If rsize,wsize are not specified as options, the value of nm_rsize, nm_wsize is 0 at session creation, resulting in values for request/response that are too small. This patch fixes the problem. A workaround is to specify rsize=N,wsize=N mount options explicitly, so they are set before session creation. This bug only affects NFSv4.1 mounts against some non-FreeBSD servers. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c == --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Thu Jul 27 23:14:17 2017 (r321633) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Thu Jul 27 23:15:24 2017 (r321634) @@ -4616,6 +4616,11 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc struct nfsrv_descript *nd = &nfsd; int error, irdcnt; + /* Make sure nm_rsize, nm_wsize is set. */ + if (nmp->nm_rsize > NFS_MAXBSIZE || nmp->nm_rsize == 0) + nmp->nm_rsize = NFS_MAXBSIZE; + if (nmp->nm_wsize > NFS_MAXBSIZE || nmp->nm_wsize == 0) + nmp->nm_wsize = NFS_MAXBSIZE; nfscl_reqstart(nd, NFSPROC_CREATESESSION, nmp, NULL, 0, NULL, NULL); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); *tl++ = sep->nfsess_clientid.lval[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: r321635 - head/sys/mips/conf
Author: adrian Date: Fri Jul 28 01:17:38 2017 New Revision: 321635 URL: https://svnweb.freebsd.org/changeset/base/321635 Log: [ar71xx] get rid of ath_pci - it's built as a module now. Modified: head/sys/mips/conf/TL-WDR4300 Modified: head/sys/mips/conf/TL-WDR4300 == --- head/sys/mips/conf/TL-WDR4300 Thu Jul 27 23:15:24 2017 (r321634) +++ head/sys/mips/conf/TL-WDR4300 Fri Jul 28 01:17:38 2017 (r321635) @@ -45,8 +45,7 @@ options GEOM_UZIP # Used for the static uboot partition map device geom_map -# yes, this board has a PCI connected atheros device -device ath_pci +# Yes, this board has a PCI connected atheros device optionsAR71XX_ATH_EEPROM device firmware# Used by the above optionsATH_EEPROM_FIRMWARE ___ 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: r321636 - head/tools/tools/nanobsd
Author: imp Date: Fri Jul 28 01:59:53 2017 New Revision: 321636 URL: https://svnweb.freebsd.org/changeset/base/321636 Log: Properly expand shell glob characters in NANO_PACKAGE_LIST. The defualt NANO_PACKAGE_LIST is *, which fails to work properly. Expand glob characters and make sure that we install the special pkg package first. Sponsored by: Netflix Submitted by: wout at canodus dot be PR: 219405 MFC After: 3 days Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh == --- head/tools/tools/nanobsd/defaults.shFri Jul 28 01:17:38 2017 (r321635) +++ head/tools/tools/nanobsd/defaults.shFri Jul 28 01:59:53 2017 (r321636) @@ -780,7 +780,6 @@ cust_pkgng ( ) ( echo "FAILED: need a pkg/ package for bootstrapping" exit 2 fi - NANO_PACKAGE_LIST="${_NANO_PKG_PACKAGE} ${NANO_PACKAGE_LIST}" # Mount packages into chroot mkdir -p ${NANO_WORLDDIR}/_.p @@ -788,14 +787,25 @@ cust_pkgng ( ) ( trap "umount ${NANO_WORLDDIR}/_.p ; rm -rf ${NANO_WORLDDIR}/_.p" 1 2 15 EXIT - # Install packages - todo="$(echo "${NANO_PACKAGE_LIST}" | awk '{ print NF }')" - echo "=== TODO: $todo" - echo "${NANO_PACKAGE_LIST}" - echo "===" - for _PKG in ${NANO_PACKAGE_LIST}; do - CR "${PKGCMD} add /_.p/${_PKG}" - done + # Install pkg-* package + CR "${PKGCMD} add /_.p/${_NANO_PKG_PACKAGE}" + + ( + # Expand any glob characters in pacakge list + cd "${NANO_PACKAGE_DIR}" + _PKGS=`find ${NANO_PACKAGE_LIST} -not -name "${_NANO_PKG_PACKAGE}" -print | sort | uniq` + + # Show todo + todo=`echo "$_PKGS" | wc -l` + echo "=== TODO: $todo" + echo "$_PKGS" + echo "===" + + # Install packages + for _PKG in $_PKGS; do + CR "${PKGCMD} add /_.p/${_PKG}" + done + ) CR0 "${PKGCMD} info" ___ 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: r321637 - head/tools/tools/nanobsd
Author: imp Date: Fri Jul 28 01:59:58 2017 New Revision: 321637 URL: https://svnweb.freebsd.org/changeset/base/321637 Log: Ensure that ordinary files that happen to start with .git, .hg and .cvs into the image. This makes .gitignore files in the working tree appear in the final tree... PR: 192178 Submitted by: Jason Unovitch Sponsored by: Netflix MFC After: 3 days Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh == --- head/tools/tools/nanobsd/defaults.shFri Jul 28 01:59:53 2017 (r321636) +++ head/tools/tools/nanobsd/defaults.shFri Jul 28 01:59:58 2017 (r321637) @@ -634,7 +634,7 @@ populate_slice ( ) ( if [ -n "${dir}" -a -d "${dir}" ]; then echo "Populating ${lbl} from ${dir}" cd "${dir}" - find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -dumpv ${mnt} + find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio -dumpv ${mnt} fi df -i ${mnt} nano_umount ${mnt} @@ -742,7 +742,7 @@ cust_allow_ssh_root ( ) ( cust_install_files ( ) ( cd "${NANO_TOOLS}/Files" - find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -Ldumpv ${NANO_WORLDDIR} + find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio -Ldumpv ${NANO_WORLDDIR} if [ -n "${NANO_CUST_FILES_MTREE}" -a -f ${NANO_CUST_FILES_MTREE} ]; then CR "mtree -eiU -p /" <${NANO_CUST_FILES_MTREE} ___ 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: r321638 - head/tools/tools/nanobsd
Author: imp Date: Fri Jul 28 02:00:03 2017 New Revision: 321638 URL: https://svnweb.freebsd.org/changeset/base/321638 Log: Allow _.disk.image to be specified. Submitted by: ask at develooper dot com (reworked to new structure) PR: 199191 Sponsored by: Netflix MFC After: 3 days Modified: head/tools/tools/nanobsd/defaults.sh head/tools/tools/nanobsd/legacy.sh Modified: head/tools/tools/nanobsd/defaults.sh == --- head/tools/tools/nanobsd/defaults.shFri Jul 28 01:59:58 2017 (r321637) +++ head/tools/tools/nanobsd/defaults.shFri Jul 28 02:00:03 2017 (r321638) @@ -71,6 +71,7 @@ NANO_PMAKE="make -j 3" # The default name for any image we create. NANO_IMGNAME="_.disk.full" +NANO_IMG1NAME="_.disk.image" # Options to put in make.conf during buildworld only CONF_BUILD=' ' @@ -652,7 +653,7 @@ last_orders ( ) ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished # image to a more convenient place: - # cp ${NANO_DISKIMGDIR}/_.disk.image /home/ftp/pub/nanobsd.disk + # cp ${NANO_DISKIMGDIR}/${NANO_IMG1NAME} /home/ftp/pub/nanobsd.disk true ) @@ -919,6 +920,7 @@ set_defaults_and_export ( ) { export_var NANO_HEADS export_var NANO_IMAGES export_var NANO_IMGNAME + export_var NANO_IMG1NAME export_var NANO_MAKE export_var NANO_MAKE_CONF_BUILD export_var NANO_MAKE_CONF_INSTALL Modified: head/tools/tools/nanobsd/legacy.sh == --- head/tools/tools/nanobsd/legacy.sh Fri Jul 28 01:59:58 2017 (r321637) +++ head/tools/tools/nanobsd/legacy.sh Fri Jul 28 02:00:03 2017 (r321638) @@ -191,8 +191,9 @@ create_diskimage ( ) ( fi if ${do_copyout_partition} ; then - echo "Writing out _.disk.image..." - dd conv=sparse if=/dev/${MD}${NANO_SLICE_ROOT} of=${NANO_DISKIMGDIR}/_.disk.image bs=64k + echo "Writing out ${NANO_IMG1NAME}..." + dd conv=sparse if=/dev/${MD}${NANO_SLICE_ROOT} \ + of=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} bs=64k fi mdconfig -d -u $MD ___ 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: r321639 - head/sys/dev/ksyms
Author: markj Date: Fri Jul 28 03:14:31 2017 New Revision: 321639 URL: https://svnweb.freebsd.org/changeset/base/321639 Log: Restrict permissions on /dev/ksyms to 0400. The ksyms(4) device was added specifically for use by lockstat(1), which as a DTrace consumer must run as root. Discussed with: emaste MFC after:3 days Modified: head/sys/dev/ksyms/ksyms.c Modified: head/sys/dev/ksyms/ksyms.c == --- head/sys/dev/ksyms/ksyms.c Fri Jul 28 02:00:03 2017(r321638) +++ head/sys/dev/ksyms/ksyms.c Fri Jul 28 03:14:31 2017(r321639) @@ -592,7 +592,7 @@ ksyms_modevent(module_t mod __unused, int type, void * case MOD_LOAD: mtx_init(&ksyms_mtx, "KSyms mtx", NULL, MTX_DEF); ksyms_dev = make_dev(&ksyms_cdevsw, 0, UID_ROOT, GID_WHEEL, - 0444, KSYMS_DNAME); + 0400, KSYMS_DNAME); break; case MOD_UNLOAD: ___ 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: r321640 - head/sys/dev/ksyms
Author: markj Date: Fri Jul 28 03:18:18 2017 New Revision: 321640 URL: https://svnweb.freebsd.org/changeset/base/321640 Log: Fix style bugs in ksyms.c. No functional change intended. MFC after:3 days Modified: head/sys/dev/ksyms/ksyms.c Modified: head/sys/dev/ksyms/ksyms.c == --- head/sys/dev/ksyms/ksyms.c Fri Jul 28 03:14:31 2017(r321639) +++ head/sys/dev/ksyms/ksyms.c Fri Jul 28 03:18:18 2017(r321640) @@ -62,41 +62,40 @@ #define STR_SYMTAB ".symtab" #define STR_STRTAB ".strtab" -#define STR_SHSTRTAB ".shstrtab" +#define STR_SHSTRTAB ".shstrtab" #define KSYMS_DNAME"ksyms" -static d_open_tksyms_open; -static d_read_tksyms_read; -static d_close_t ksyms_close; -static d_ioctl_t ksyms_ioctl; -static d_mmap_tksyms_mmap; +static d_open_t ksyms_open; +static d_read_t ksyms_read; +static d_close_t ksyms_close; +static d_ioctl_t ksyms_ioctl; +static d_mmap_t ksyms_mmap; static struct cdevsw ksyms_cdevsw = { -.d_version = D_VERSION, -.d_flags = D_TRACKCLOSE, -.d_open= ksyms_open, -.d_close = ksyms_close, -.d_read= ksyms_read, -.d_ioctl = ksyms_ioctl, -.d_mmap= ksyms_mmap, -.d_name= KSYMS_DNAME + .d_version =D_VERSION, + .d_flags = D_TRACKCLOSE, + .d_open = ksyms_open, + .d_close = ksyms_close, + .d_read = ksyms_read, + .d_ioctl = ksyms_ioctl, + .d_mmap = ksyms_mmap, + .d_name = KSYMS_DNAME }; struct ksyms_softc { LIST_ENTRY(ksyms_softc) sc_list; - vm_offset_t sc_uaddr; - size_t sc_usize; + vm_offset_t sc_uaddr; + size_t sc_usize; pmap_t sc_pmap; struct proc*sc_proc; }; -static struct mtx ksyms_mtx; -static struct cdev *ksyms_dev; -static LIST_HEAD(, ksyms_softc) ksyms_list = - LIST_HEAD_INITIALIZER(ksyms_list); +static struct mtx ksyms_mtx; +static struct cdev *ksyms_dev; +static LIST_HEAD(, ksyms_softc) ksyms_list = LIST_HEAD_INITIALIZER(ksyms_list); -static const char ksyms_shstrtab[] = +static const char ksyms_shstrtab[] = "\0" STR_SYMTAB "\0" STR_STRTAB "\0" STR_SHSTRTAB "\0"; struct ksyms_hdr { @@ -106,7 +105,7 @@ struct ksyms_hdr { Elf_Shdrkh_shdr[SHDR_NUM]; charkh_shstrtab[sizeof(ksyms_shstrtab)]; }; - + struct tsizes { size_t ts_symsz; size_t ts_strsz; @@ -123,7 +122,7 @@ static MALLOC_DEFINE(M_KSYMS, "KSYMS", "Kernel Symbol /* * Get the symbol and string table sizes for a kernel module. Add it to the - * running total. + * running total. */ static int ksyms_size_permod(linker_file_t lf, void *arg) @@ -132,35 +131,36 @@ ksyms_size_permod(linker_file_t lf, void *arg) const Elf_Sym *symtab; caddr_t strtab; long syms; - + ts = arg; - + syms = LINKER_SYMTAB_GET(lf, &symtab); ts->ts_symsz += syms * sizeof(Elf_Sym); ts->ts_strsz += LINKER_STRTAB_GET(lf, &strtab); - + return (0); } /* * For kernel module get the symbol and string table sizes, returning the - * totals in *ts. + * totals in *ts. */ -static void +static void ksyms_size_calc(struct tsizes *ts) { + ts->ts_symsz = 0; ts->ts_strsz = 0; - - (void) linker_file_foreach(ksyms_size_permod, ts); + + (void)linker_file_foreach(ksyms_size_permod, ts); } -#define KSYMS_EMIT(src, des, sz) do { \ - copyout(src, (void *)des, sz); \ - des += sz; \ - } while (0) +#define KSYMS_EMIT(src, des, sz) do { \ + copyout(src, (void *)des, sz); \ + des += sz; \ +} while (0) -#define SYMBLKSZ 256 * sizeof (Elf_Sym) +#define SYMBLKSZ (256 * sizeof(Elf_Sym)) /* * For a kernel module, add the symbol and string tables into the @@ -169,6 +169,7 @@ ksyms_size_calc(struct tsizes *ts) static int ksyms_add(linker_file_t lf, void *arg) { + char *buf; struct toffsets *to; const Elf_Sym *symtab; Elf_Sym *symp; @@ -176,43 +177,42 @@ ksyms_add(linker_file_t lf, void *arg) long symsz; size_t strsz, numsyms; linker_symval_t symval; - char *buf; int i, nsyms, len; - + to = arg; - + MOD_SLOCK; numsyms = LINKER_SYMTAB_GET(lf, &symtab); strsz = LINKER_STRTAB_GET(lf, &strtab); symsz = numsyms * sizeof(Elf_Sym); - + buf = malloc(SYM
svn commit: r321641 - stable/10/tests/sys/vfs
Author: ngie Date: Fri Jul 28 03:24:57 2017 New Revision: 321641 URL: https://svnweb.freebsd.org/changeset/base/321641 Log: MFC r320445: Don't hardcode path to file in /tmp; this violates the kyua sandbox Modified: stable/10/tests/sys/vfs/trailing_slash.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/vfs/trailing_slash.sh == --- stable/10/tests/sys/vfs/trailing_slash.sh Fri Jul 28 03:18:18 2017 (r321640) +++ stable/10/tests/sys/vfs/trailing_slash.sh Fri Jul 28 03:24:57 2017 (r321641) @@ -6,8 +6,9 @@ # point to files. See kern/21768 for details. Fixed in r193028. # -testfile="/tmp/testfile-$$" -testlink="/tmp/testlink-$$" +: ${TMPDIR=/tmp} +testfile="$TMPDIR/testfile-$$" +testlink="$TMPDIR/testlink-$$" tests=" $testfile:$testlink:$testfile: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: r321642 - stable/11/tests/sys/vfs
Author: ngie Date: Fri Jul 28 03:25:01 2017 New Revision: 321642 URL: https://svnweb.freebsd.org/changeset/base/321642 Log: MFC r320445: Don't hardcode path to file in /tmp; this violates the kyua sandbox Modified: stable/11/tests/sys/vfs/trailing_slash.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/vfs/trailing_slash.sh == --- stable/11/tests/sys/vfs/trailing_slash.sh Fri Jul 28 03:24:57 2017 (r321641) +++ stable/11/tests/sys/vfs/trailing_slash.sh Fri Jul 28 03:25:01 2017 (r321642) @@ -6,8 +6,9 @@ # point to files. See kern/21768 for details. Fixed in r193028. # -testfile="/tmp/testfile-$$" -testlink="/tmp/testlink-$$" +: ${TMPDIR=/tmp} +testfile="$TMPDIR/testfile-$$" +testlink="$TMPDIR/testlink-$$" tests=" $testfile:$testlink:$testfile: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: r321643 - stable/11/tests/sys/vfs
Author: ngie Date: Fri Jul 28 03:25:58 2017 New Revision: 321643 URL: https://svnweb.freebsd.org/changeset/base/321643 Log: MFC r320446: trailing_slash is a TAP-compliant testcase; mark it as such, instead of calling is a plain testcase. Modified: stable/11/tests/sys/vfs/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/vfs/Makefile == --- stable/11/tests/sys/vfs/MakefileFri Jul 28 03:25:01 2017 (r321642) +++ stable/11/tests/sys/vfs/MakefileFri Jul 28 03:25:58 2017 (r321643) @@ -4,6 +4,6 @@ PACKAGE=tests TESTSDIR= ${TESTSBASE}/sys/vfs -PLAIN_TESTS_SH+= trailing_slash +TAP_TESTS_SH+= trailing_slash .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321644 - stable/10/tests/sys/vfs
Author: ngie Date: Fri Jul 28 03:26:05 2017 New Revision: 321644 URL: https://svnweb.freebsd.org/changeset/base/321644 Log: MFC r320446: trailing_slash is a TAP-compliant testcase; mark it as such, instead of calling is a plain testcase. Modified: stable/10/tests/sys/vfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/vfs/Makefile == --- stable/10/tests/sys/vfs/MakefileFri Jul 28 03:25:58 2017 (r321643) +++ stable/10/tests/sys/vfs/MakefileFri Jul 28 03:26:05 2017 (r321644) @@ -2,6 +2,6 @@ TESTSDIR= ${TESTSBASE}/sys/vfs -PLAIN_TESTS_SH+= trailing_slash +TAP_TESTS_SH+= trailing_slash .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321645 - in stable/11: etc/mtree share/examples/tests/tests share/examples/tests/tests/tap
Author: ngie Date: Fri Jul 28 03:27:41 2017 New Revision: 321645 URL: https://svnweb.freebsd.org/changeset/base/321645 Log: MFC r320443,r320444: r320443: Add kyua TAP test integration examples The examples are patterned loosely after the ATF examples, similar to the plain test examples. r320444: Commit the corresponding mtree file change for the TAP test examples MFC with: r320443 Added: stable/11/share/examples/tests/tests/tap/ - copied from r320443, head/share/examples/tests/tests/tap/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/share/examples/tests/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist == --- stable/11/etc/mtree/BSD.tests.dist Fri Jul 28 03:26:05 2017 (r321644) +++ stable/11/etc/mtree/BSD.tests.dist Fri Jul 28 03:27:41 2017 (r321645) @@ -384,6 +384,8 @@ .. plain .. +tap +.. .. .. .. Modified: stable/11/share/examples/tests/tests/Makefile == --- stable/11/share/examples/tests/tests/Makefile Fri Jul 28 03:26:05 2017(r321644) +++ stable/11/share/examples/tests/tests/Makefile Fri Jul 28 03:27:41 2017(r321645) @@ -17,6 +17,7 @@ TESTSDIR= ${TESTSBASE}/share/examples/tests # of the system. We use TESTS_SUBDIRS instead of SUBDIR because we want # the auto-generated Kyuafile to recurse into these directories. TESTS_SUBDIRS= atf plain +TESTS_SUBDIRS+=tap # We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile # for us based on the contents of the TESTS_SUBDIRS line above. The ___ 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: r321646 - in stable/10: etc/mtree share/examples/tests/tests share/examples/tests/tests/tap
Author: ngie Date: Fri Jul 28 03:30:46 2017 New Revision: 321646 URL: https://svnweb.freebsd.org/changeset/base/321646 Log: MFC r320443,r320444: r320443: Add kyua TAP test integration examples The examples are patterned loosely after the ATF examples, similar to the plain test examples. r320444: Commit the corresponding mtree file change for the TAP test examples MFC with: r320443 Added: stable/10/share/examples/tests/tests/tap/ - copied from r320443, head/share/examples/tests/tests/tap/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/share/examples/tests/tests/Makefile stable/10/share/examples/tests/tests/tap/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist == --- stable/10/etc/mtree/BSD.tests.dist Fri Jul 28 03:27:41 2017 (r321645) +++ stable/10/etc/mtree/BSD.tests.dist Fri Jul 28 03:30:46 2017 (r321646) @@ -370,6 +370,8 @@ .. plain .. +tap +.. .. .. .. Modified: stable/10/share/examples/tests/tests/Makefile == --- stable/10/share/examples/tests/tests/Makefile Fri Jul 28 03:27:41 2017(r321645) +++ stable/10/share/examples/tests/tests/Makefile Fri Jul 28 03:30:46 2017(r321646) @@ -17,6 +17,7 @@ TESTSDIR= ${TESTSBASE}/share/examples/tests # of the system. We use TESTS_SUBDIRS instead of SUBDIR because we want # the auto-generated Kyuafile to recurse into these directories. TESTS_SUBDIRS= atf plain +TESTS_SUBDIRS+=tap # We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile # for us based on the contents of the TESTS_SUBDIRS line above. The Modified: stable/10/share/examples/tests/tests/tap/Makefile == --- head/share/examples/tests/tests/tap/MakefileWed Jun 28 08:22:04 2017(r320443) +++ stable/10/share/examples/tests/tests/tap/Makefile Fri Jul 28 03:30:46 2017(r321646) @@ -1,11 +1,5 @@ # $FreeBSD$ -# The release package to use for the tests contained within the directory -# -# This applies to components which rely on ^/projects/release-pkg support -# (see UPDATING X / svn revision r298107). -PACKAGE= tests - # Directory into which the Kyuafile provided by this directory will be # installed. # @@ -31,17 +25,10 @@ TAP_TESTS_SH= cp_test # definitions from above. KYUAFILE= yes -# Install file1 and file2 as files via bsd.prog.mk. Please note the intentional -# ${PACKAGE} namespace of files. -# -# The basic semantics of this are the same as FILES in bsd.prog.mk, e.g. the -# installation of the files can be manipulated via ${PACKAGE}FILESDIR, -# ${PACKAGE}FILESMODE, etc. -# -# Please see comment above about ${PACKAGE}. Feel free to omit the ${PACKAGE} -# namespace if release package support isn't needed. -${PACKAGE}FILES+= file1 -CLEANFILES+= file1 +# Install file1 and file2 as files via bsd.prog.mk. +FILES+=file1 +FILESDIR= ${TESTSDIR} +CLEANFILES+= file1 file1: @echo "File 1" > ${.TARGET} ___ 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: r321647 - in stable/11/share/examples/tests/tests: . atf plain
Author: ngie Date: Fri Jul 28 03:32:36 2017 New Revision: 321647 URL: https://svnweb.freebsd.org/changeset/base/321647 Log: MFC r320441,r320442: r320441: share/examples/tests/Makefile: clean up example snippets/documentation - TESTSDIR doesn't need to be specified after r289158. - Including bsd.own.mk isn't required since no MK_ knobs are being manipulated. - TESTS_SUBDIRS should be written out in an append format, one entry per line, to provide a better, more conflict resistant example. r320442: share/examples/tests/{atf,plain}/Makefile: tweak example Makefile snippets - Including bsd.own.mk isn't required since no MK_ knobs are being manipulated. - Update documentation to note that ${FILES} is installed via bsd.progs.mk, not bsd.prog.mk. Modified: stable/11/share/examples/tests/tests/Makefile stable/11/share/examples/tests/tests/atf/Makefile stable/11/share/examples/tests/tests/plain/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/examples/tests/tests/Makefile == --- stable/11/share/examples/tests/tests/Makefile Fri Jul 28 03:30:46 2017(r321646) +++ stable/11/share/examples/tests/tests/Makefile Fri Jul 28 03:32:36 2017(r321647) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - # Directory into which the Kyuafile provided by this directory will be # installed. # @@ -11,12 +9,16 @@ # # For example: if this Makefile were in src/bin/cp/tests/, its TESTSDIR # would point at ${TESTSBASE}/bin/cp/. -TESTSDIR= ${TESTSBASE}/share/examples/tests +# +# The default path specified by bsd.test.mk is `${TESTSBASE}/${RELDIR:H}`, +# which happens to be the same as `${TESTSBASE}/share/examples/tests`. +#TESTSDIR= ${TESTSBASE}/share/examples/tests # List of subdirectories into which we want to recurse during the build # of the system. We use TESTS_SUBDIRS instead of SUBDIR because we want # the auto-generated Kyuafile to recurse into these directories. -TESTS_SUBDIRS= atf plain +TESTS_SUBDIRS+=atf +TESTS_SUBDIRS+=plain TESTS_SUBDIRS+=tap # We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile Modified: stable/11/share/examples/tests/tests/atf/Makefile == --- stable/11/share/examples/tests/tests/atf/Makefile Fri Jul 28 03:30:46 2017(r321646) +++ stable/11/share/examples/tests/tests/atf/Makefile Fri Jul 28 03:32:36 2017(r321647) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - # The release package to use for the tests contained within the directory # # This applies to components which rely on ^/projects/release-pkg support @@ -33,10 +31,10 @@ ATF_TESTS_SH= cp_test # definitions from above. KYUAFILE= yes -# Install file1 and file2 as files via bsd.prog.mk. Please note the intentional +# Install file1 and file2 as files via bsd.progs.mk. Please note the intentional # ${PACKAGE} namespace of files. # -# The basic semantics of this are the same as FILES in bsd.prog.mk, e.g. the +# The basic semantics of this are the same as FILES in bsd.progs.mk, e.g. the # installation of the files can be manipulated via ${PACKAGE}FILESDIR, # ${PACKAGE}FILESMODE, etc. # Modified: stable/11/share/examples/tests/tests/plain/Makefile == --- stable/11/share/examples/tests/tests/plain/Makefile Fri Jul 28 03:30:46 2017(r321646) +++ stable/11/share/examples/tests/tests/plain/Makefile Fri Jul 28 03:32:36 2017(r321647) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - # The release package to use for the tests contained within the directory # # This applies to components which rely on ^/projects/release-pkg support @@ -33,10 +31,10 @@ PLAIN_TESTS_SH= cp_test # definitions from above. KYUAFILE= yes -# Install file1 and file2 as files via bsd.prog.mk. Please note the intentional +# Install file1 and file2 as files via bsd.progs.mk. Please note the intentional # ${PACKAGE} namespace of files. # -# The basic semantics of this are the same as FILES in bsd.prog.mk, e.g. the +# The basic semantics of this are the same as FILES in bsd.progs.mk, e.g. the # installation of the files can be manipulated via ${PACKAGE}FILESDIR, # ${PACKAGE}FILESMODE, etc. # ___ 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: r321648 - stable/10/share/examples/tests/tests
Author: ngie Date: Fri Jul 28 03:33:09 2017 New Revision: 321648 URL: https://svnweb.freebsd.org/changeset/base/321648 Log: MFC r320441: share/examples/tests/Makefile: clean up example snippets/documentation - TESTSDIR doesn't need to be specified after r289158. - Including bsd.own.mk isn't required since no MK_ knobs are being manipulated. - TESTS_SUBDIRS should be written out in an append format, one entry per line, to provide a better, more conflict resistant example. Modified: stable/10/share/examples/tests/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/tests/tests/Makefile == --- stable/10/share/examples/tests/tests/Makefile Fri Jul 28 03:32:36 2017(r321647) +++ stable/10/share/examples/tests/tests/Makefile Fri Jul 28 03:33:09 2017(r321648) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - # Directory into which the Kyuafile provided by this directory will be # installed. # @@ -11,12 +9,16 @@ # # For example: if this Makefile were in src/bin/cp/tests/, its TESTSDIR # would point at ${TESTSBASE}/bin/cp/. -TESTSDIR= ${TESTSBASE}/share/examples/tests +# +# The default path specified by bsd.test.mk is `${TESTSBASE}/${RELDIR:H}`, +# which happens to be the same as `${TESTSBASE}/share/examples/tests`. +#TESTSDIR= ${TESTSBASE}/share/examples/tests # List of subdirectories into which we want to recurse during the build # of the system. We use TESTS_SUBDIRS instead of SUBDIR because we want # the auto-generated Kyuafile to recurse into these directories. -TESTS_SUBDIRS= atf plain +TESTS_SUBDIRS+=atf +TESTS_SUBDIRS+=plain TESTS_SUBDIRS+=tap # We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile ___ 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: r321649 - head/sys/net
Author: loos Date: Fri Jul 28 04:41:57 2017 New Revision: 321649 URL: https://svnweb.freebsd.org/changeset/base/321649 Log: Remove the unused mutex since r273220. MFC after:1 week Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/net/if_stf.c Modified: head/sys/net/if_stf.c == --- head/sys/net/if_stf.c Fri Jul 28 03:33:09 2017(r321648) +++ head/sys/net/if_stf.c Fri Jul 28 04:41:57 2017(r321649) @@ -139,7 +139,6 @@ SYSCTL_INT(_net_link_stf, OID_AUTO, permit_rfc1918, CT struct stf_softc { struct ifnet*sc_ifp; - struct mtx sc_ro_mtx; u_int sc_fibnum; const struct encaptab *encap_cookie; }; @@ -147,10 +146,6 @@ struct stf_softc { static const char stfname[] = "stf"; -/* - * Note that mutable fields in the softc are not currently locked. - * We do lock sc_ro in stf_output though. - */ static MALLOC_DEFINE(M_STF, stfname, "6to4 Tunnel Interface"); static const int ip_stf_ttl = 40; @@ -253,7 +248,6 @@ stf_clone_create(struct if_clone *ifc, char *name, siz ifp->if_dname = stfname; ifp->if_dunit = IF_DUNIT_NONE; - mtx_init(&(sc)->sc_ro_mtx, "stf ro", NULL, MTX_DEF); sc->encap_cookie = encap_attach_func(AF_INET, IPPROTO_IPV6, stf_encapcheck, &in_stf_protosw, sc); if (sc->encap_cookie == NULL) { @@ -280,7 +274,6 @@ stf_clone_destroy(struct if_clone *ifc, struct ifnet * err = encap_detach(sc->encap_cookie); KASSERT(err == 0, ("Unexpected error detaching encap_cookie")); - mtx_destroy(&(sc)->sc_ro_mtx); bpfdetach(ifp); if_detach(ifp); if_free(ifp); ___ 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"