From owner-svn-src-all@freebsd.org Sun May 21 00:06:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CA85D6B02A; Sun, 21 May 2017 00:06:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0711D907; Sun, 21 May 2017 00:06:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4L06bUj092895; Sun, 21 May 2017 00:06:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4L06bGq092894; Sun, 21 May 2017 00:06:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705210006.v4L06bGq092894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 21 May 2017 00:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318590 - head/sys/compat/linuxkpi/common/include/asm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 00:06:38 -0000 Author: markj Date: Sun May 21 00:06:36 2017 New Revision: 318590 URL: https://svnweb.freebsd.org/changeset/base/318590 Log: Add get_cpu() and put_cpu(). MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/asm/smp.h Modified: head/sys/compat/linuxkpi/common/include/asm/smp.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/smp.h Sat May 20 23:25:07 2017 (r318589) +++ head/sys/compat/linuxkpi/common/include/asm/smp.h Sun May 21 00:06:36 2017 (r318590) @@ -37,4 +37,12 @@ int linux_wbinvd_on_all_cpus(void); #endif +#define get_cpu() ({ \ + sched_pin(); \ + PCPU_GET(cpuid); \ +}) + +#define put_cpu() \ + sched_unpin() + #endif /* _ASM_SMP_H_ */ From owner-svn-src-all@freebsd.org Sun May 21 14:05:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA67FD77794; Sun, 21 May 2017 14:05:34 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D6281CCD; Sun, 21 May 2017 14:05:34 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LE5Xf9039150; Sun, 21 May 2017 14:05:33 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LE5XtD039146; Sun, 21 May 2017 14:05:33 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705211405.v4LE5XtD039146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 21 May 2017 14:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318591 - in head: etc/mtree usr.bin/compress usr.bin/compress/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 14:05:34 -0000 Author: jilles Date: Sun May 21 14:05:32 2017 New Revision: 318591 URL: https://svnweb.freebsd.org/changeset/base/318591 Log: compress: Add basic tests. Added: head/usr.bin/compress/tests/ head/usr.bin/compress/tests/Makefile (contents, props changed) head/usr.bin/compress/tests/compress_test.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/compress/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun May 21 00:06:36 2017 (r318590) +++ head/etc/mtree/BSD.tests.dist Sun May 21 14:05:32 2017 (r318591) @@ -606,6 +606,8 @@ .. cmp .. + compress + .. cpio .. col Modified: head/usr.bin/compress/Makefile ============================================================================== --- head/usr.bin/compress/Makefile Sun May 21 00:06:36 2017 (r318590) +++ head/usr.bin/compress/Makefile Sun May 21 14:05:32 2017 (r318591) @@ -1,6 +1,8 @@ # @(#)Makefile 8.2 (Berkeley) 4/17/94 # $FreeBSD$ +.include + PROG= compress SRCS= compress.c zopen.c LINKS= ${BINDIR}/compress ${BINDIR}/uncompress @@ -9,4 +11,8 @@ MLINKS= compress.1 uncompress.1 # XXX zopen is not part of libc # MAN=zopen.3 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/usr.bin/compress/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/compress/tests/Makefile Sun May 21 14:05:32 2017 (r318591) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= compress_test + +.include Added: head/usr.bin/compress/tests/compress_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/compress/tests/compress_test.sh Sun May 21 14:05:32 2017 (r318591) @@ -0,0 +1,174 @@ +# Copyright (c) 2017 Jilles Tjoelker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case uncompress_file_1 +uncompress_file_1_head() +{ + atf_set "descr" \ + "Test uncompress without options, filename with .Z" +} +uncompress_file_1_body() +{ + printf '%01000d\n' 7 >expectfile1 + printf "\ +\037\235\220\060\002\012\034\110\260\240\301\203\010\023\052\134\ +\310\260\241\303\207\020\043\112\234\110\261\242\305\213\030\063\ +\152\334\310\261\243\307\217\040\103\212\034\111\262\244\311\223\ +\050\123\252\134\211\360\206\002" >file1.Z + atf_check uncompress file1.Z + atf_check cmp file1 expectfile1 + atf_check test ! -e file1.Z +} + +atf_test_case uncompress_file_2 +uncompress_file_2_head() +{ + atf_set "descr" \ + "Test uncompress without options, filename without .Z" +} +uncompress_file_2_body() +{ + printf '%01000d\n' 7 >expectfile1 + printf "\ +\037\235\220\060\002\012\034\110\260\240\301\203\010\023\052\134\ +\310\260\241\303\207\020\043\112\234\110\261\242\305\213\030\063\ +\152\334\310\261\243\307\217\040\103\212\034\111\262\244\311\223\ +\050\123\252\134\211\360\206\002" >file1.Z + atf_check uncompress file1 + atf_check cmp file1 expectfile1 + atf_check test ! -e file1.Z +} + +atf_test_case uncompress_stdio_1 +uncompress_stdio_1_head() +{ + atf_set "descr" \ + "Test uncompress without parameters" +} +uncompress_stdio_1_body() +{ + printf '%01000d\n' 7 >expectfile1 + printf "\ +\037\235\220\060\002\012\034\110\260\240\301\203\010\023\052\134\ +\310\260\241\303\207\020\043\112\234\110\261\242\305\213\030\063\ +\152\334\310\261\243\307\217\040\103\212\034\111\262\244\311\223\ +\050\123\252\134\211\360\206\002" >file1.Z + atf_check -o file:expectfile1 -x 'uncompress expectfile1 + printf "\ +\037\235\220\060\002\012\034\110\260\240\301\203\010\023\052\134\ +\310\260\241\303\207\020\043\112\234\110\261\242\305\213\030\063\ +\152\334\310\261\243\307\217\040\103\212\034\111\262\244\311\223\ +\050\123\252\134\211\360\206\002" >file1.Z + atf_check -o file:expectfile1 uncompress -c file1.Z + atf_check test -e file1.Z + atf_check test ! -e file1 +} + +atf_test_case compress_uncompress_stdio_1 +compress_uncompress_stdio_1_head() +{ + atf_set "descr" \ + "Test compressing and uncompressing some data, using stdio" +} +compress_uncompress_stdio_1_body() +{ + printf '%01000d\n' 7 8 >expectfile1 + atf_check -x 'compress file1.Z' + atf_check -o file:expectfile1 uncompress -c file1.Z +} + +atf_test_case compress_uncompress_minusc_1 +compress_uncompress_minusc_1_head() +{ + atf_set "descr" \ + "Test compressing and uncompressing some data, using -c" +} +compress_uncompress_minusc_1_body() +{ + printf '%01000d\n' 7 8 >expectfile1 + atf_check -x 'compress -c expectfile1 >file1.Z' + atf_check -o file:expectfile1 uncompress -c file1.Z +} + +atf_test_case compress_uncompress_file_1 +compress_uncompress_file_1_head() +{ + atf_set "descr" \ + "Test compressing and uncompressing some data, passing one filename" +} +compress_uncompress_file_1_body() +{ + printf '%01000d\n' 7 8 >expectfile1 + cp expectfile1 file1 + atf_check compress file1 + atf_check -s exit:1 cmp -s file1.Z expectfile1 + atf_check uncompress file1.Z + atf_check cmp file1 expectfile1 +} + +atf_test_case compress_uncompress_file_2 +compress_uncompress_file_2_head() +{ + atf_set "descr" \ + "Test compressing and uncompressing some data, passing two filenames" +} +compress_uncompress_file_2_body() +{ + printf '%01000d\n' 7 8 >expectfile1 + printf '%01000d\n' 8 7 >expectfile2 + cp expectfile1 file1 + cp expectfile2 file2 + atf_check compress file1 file2 + atf_check -s exit:1 cmp -s file1.Z expectfile1 + atf_check -s exit:1 cmp -s file2.Z expectfile2 + atf_check -s exit:1 cmp -s file1.Z file2.Z + atf_check uncompress file1.Z file2.Z + atf_check cmp file1 expectfile1 + atf_check cmp file2 expectfile2 +} + +atf_init_test_cases() +{ + atf_add_test_case uncompress_file_1 + atf_add_test_case uncompress_file_2 + atf_add_test_case uncompress_stdio_1 + atf_add_test_case uncompress_minusc_1 + atf_add_test_case compress_uncompress_stdio_1 + atf_add_test_case compress_uncompress_minusc_1 + atf_add_test_case compress_uncompress_file_1 + atf_add_test_case compress_uncompress_file_2 +} From owner-svn-src-all@freebsd.org Sun May 21 14:35:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E39FD77FA8; Sun, 21 May 2017 14:35:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F6C7F59; Sun, 21 May 2017 14:35:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LEZG5E052332; Sun, 21 May 2017 14:35:16 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LEZG53052330; Sun, 21 May 2017 14:35:16 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705211435.v4LEZG53052330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 21 May 2017 14:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318592 - in head/usr.bin/compress: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 14:35:17 -0000 Author: jilles Date: Sun May 21 14:35:16 2017 New Revision: 318592 URL: https://svnweb.freebsd.org/changeset/base/318592 Log: compress: Allow uncompress -c with multiple pathnames, as required by POSIX. Per POSIX, allow passing multiple pathnames to uncompress -c, concatenating the uncompressed data. Passing multiple pathnames to compress -c remains disallowed, since the result cannot be decompressed. PR: 219387 Reported by: Jörg Schilling Modified: head/usr.bin/compress/compress.c head/usr.bin/compress/tests/compress_test.sh Modified: head/usr.bin/compress/compress.c ============================================================================== --- head/usr.bin/compress/compress.c Sun May 21 14:05:32 2017 (r318591) +++ head/usr.bin/compress/compress.c Sun May 21 14:35:16 2017 (r318592) @@ -129,7 +129,7 @@ main(int argc, char *argv[]) exit (eval); } - if (cat == 1 && argc > 1) + if (cat == 1 && style == COMPRESS && argc > 1) errx(1, "the -c option permits only a single file argument"); for (; *argv; ++argv) Modified: head/usr.bin/compress/tests/compress_test.sh ============================================================================== --- head/usr.bin/compress/tests/compress_test.sh Sun May 21 14:05:32 2017 (r318591) +++ head/usr.bin/compress/tests/compress_test.sh Sun May 21 14:35:16 2017 (r318592) @@ -161,6 +161,27 @@ compress_uncompress_file_2_body() atf_check cmp file2 expectfile2 } +atf_test_case compress_uncompress_file_minusc_1 +compress_uncompress_file_minusc_1_head() +{ + atf_set "descr" \ + "Test compressing and uncompressing some data, passing two filenames to uncompress -c" +} +compress_uncompress_file_minusc_1_body() +{ + printf '%01000d\n' 7 8 >expectfile1 + printf '%01000d\n' 8 7 >expectfile2 + cp expectfile1 file1 + cp expectfile2 file2 + atf_check compress file1 file2 + atf_check -s exit:1 cmp -s file1.Z expectfile1 + atf_check -s exit:1 cmp -s file2.Z expectfile2 + atf_check -s exit:1 cmp -s file1.Z file2.Z + atf_check -x 'uncompress -c file1.Z file2.Z >all' + atf_check -x 'cat expectfile1 expectfile2 >expectall' + atf_check cmp all expectall +} + atf_init_test_cases() { atf_add_test_case uncompress_file_1 @@ -171,4 +192,5 @@ atf_init_test_cases() atf_add_test_case compress_uncompress_minusc_1 atf_add_test_case compress_uncompress_file_1 atf_add_test_case compress_uncompress_file_2 + atf_add_test_case compress_uncompress_file_minusc_1 } From owner-svn-src-all@freebsd.org Sun May 21 15:37:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 625B7D771A2; Sun, 21 May 2017 15:37:10 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D45E154F; Sun, 21 May 2017 15:37:10 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LFb9Xx078497; Sun, 21 May 2017 15:37:09 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LFb9Z5078495; Sun, 21 May 2017 15:37:09 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705211537.v4LFb9Z5078495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 21 May 2017 15:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318593 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 15:37:10 -0000 Author: asomers Date: Sun May 21 15:37:08 2017 New Revision: 318593 URL: https://svnweb.freebsd.org/changeset/base/318593 Log: Fix build of AIO tests with -DDEBUG Also, redefine some constants for clarity. No functional change. MFC after: 1 week Modified: head/tests/sys/aio/aio_kqueue_test.c head/tests/sys/aio/lio_kqueue_test.c Modified: head/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/aio_kqueue_test.c Sun May 21 14:35:16 2017 (r318592) +++ head/tests/sys/aio/aio_kqueue_test.c Sun May 21 15:37:08 2017 (r318593) @@ -163,7 +163,8 @@ main (int argc, char *argv[]) printf("kevent %d %d errno %d return.ident %p " "return.data %p return.udata %p %p\n", i, result, error, - kq_returned.ident, kq_returned.data, + (void*)kq_returned.ident, + (void*)kq_returned.data, kq_returned.udata, kq_iocb); #endif @@ -171,7 +172,7 @@ main (int argc, char *argv[]) if (kq_iocb) break; #ifdef DEBUG - printf("Try again left %d out of %d %d\n", + printf("Try again left %d out of %lu %d\n", pending, nitems(iocb), cancel); #endif } Modified: head/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/lio_kqueue_test.c Sun May 21 14:35:16 2017 (r318592) +++ head/tests/sys/aio/lio_kqueue_test.c Sun May 21 15:37:08 2017 (r318593) @@ -55,7 +55,8 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" #define LIO_MAX 5 -#define MAX_IOCBS LIO_MAX * 16 +#define IOCBS_PER_LIO 16 +#define MAX_IOCBS (LIO_MAX * IOCBS_PER_LIO) #define MAX_RUNS 300 int @@ -103,9 +104,9 @@ main(int argc, char *argv[]) #endif for (j = 0; j < LIO_MAX; j++) { lio[j] = - malloc(sizeof(struct aiocb *) * MAX_IOCBS/LIO_MAX); - for (i = 0; i < MAX_IOCBS / LIO_MAX; i++) { - k = (MAX_IOCBS / LIO_MAX * j) + i; + malloc(sizeof(struct aiocb *) * IOCBS_PER_LIO); + for (i = 0; i < IOCBS_PER_LIO; i++) { + k = (IOCBS_PER_LIO * j) + i; lio[j][i] = iocb[k] = calloc(1, sizeof(struct aiocb)); iocb[k]->aio_nbytes = sizeof(buffer); @@ -115,7 +116,7 @@ main(int argc, char *argv[]) = iocb[k]->aio_nbytes * k * (run + 1); #ifdef DEBUG - printf("hello iocb[k] %d\n", + printf("hello iocb[k] %ld\n", iocb[k]->aio_offset); #endif iocb[k]->aio_lio_opcode = LIO_WRITE; @@ -125,11 +126,11 @@ main(int argc, char *argv[]) sig.sigev_notify = SIGEV_KEVENT; time(&time1); result = lio_listio(LIO_NOWAIT, lio[j], - MAX_IOCBS / LIO_MAX, &sig); + IOCBS_PER_LIO, &sig); error = errno; time(&time2); #ifdef DEBUG - printf("Time %d %d %d result -> %d\n", + printf("Time %ld %ld %ld result -> %d\n", time1, time2, time2-time1, result); #endif if (result != 0) { @@ -169,7 +170,8 @@ main(int argc, char *argv[]) printf("kevent %d %d errno %d return.ident %p " "return.data %p return.udata %p %p\n", i, result, error, - kq_returned.ident, kq_returned.data, + (void*)kq_returned.ident, + (void*)kq_returned.data, kq_returned.udata, lio[j]); #endif From owner-svn-src-all@freebsd.org Sun May 21 17:07:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11E2CD77EE2; Sun, 21 May 2017 17:07:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD98B68F; Sun, 21 May 2017 17:07:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LH7CAo016262; Sun, 21 May 2017 17:07:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LH7CbN016259; Sun, 21 May 2017 17:07:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705211707.v4LH7CbN016259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 21 May 2017 17:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318594 - in head: lib lib/libc++experimental tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 17:07:14 -0000 Author: dim Date: Sun May 21 17:07:12 2017 New Revision: 318594 URL: https://svnweb.freebsd.org/changeset/base/318594 Log: Add libc++experimental.a for std::experimental support This adds a separate library for supporting std::experimental features. It is purposefully static, and must be explicitly linked into programs using -lc++experimental. PLEASE NOTE: there is NO WARRANTY as to any stability or continuing existence of the features in the std::experimental parts of the C++ library! Reviewed by: ed Differential Revision: https://reviews.freebsd.org/D10840 Added: head/lib/libc++experimental/ head/lib/libc++experimental/Makefile (contents, props changed) Modified: head/lib/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sun May 21 15:37:08 2017 (r318593) +++ head/lib/Makefile Sun May 21 17:07:12 2017 (r318594) @@ -156,7 +156,7 @@ _libclang_rt= libclang_rt .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt -_libcplusplus= libc++ +_libcplusplus= libc++ libc++experimental .endif SUBDIR.${MK_EFI}+= libefivar Added: head/lib/libc++experimental/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc++experimental/Makefile Sun May 21 17:07:12 2017 (r318594) @@ -0,0 +1,29 @@ +# $FreeBSD$ + +.include + +PACKAGE= clibs +SRCDIR= ${SRCTOP}/contrib/libc++ + +LIB= c++experimental +NO_PIC= +MK_PROFILE= no + +.PATH: ${SRCDIR}/src/experimental + +SRCS+= filesystem/directory_iterator.cpp +SRCS+= filesystem/operations.cpp +SRCS+= filesystem/path.cpp +SRCS+= memory_resource.cpp + +WARNS?= 0 +CXXFLAGS+= -isystem ${SRCDIR}/include +CXXFLAGS+= -nostdinc++ +CXXFLAGS+= -nostdlib +CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY +CXXFLAGS+= -DLIBCXXRT +.if empty(CXXFLAGS:M-std=*) +CXXFLAGS+= -std=c++14 +.endif + +.include Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun May 21 15:37:08 2017 (r318593) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun May 21 17:07:12 2017 (r318594) @@ -4512,6 +4512,7 @@ OLD_LIBS+=${DEBUG_LIB32_LIBS} OLD_LIBS+=lib/libcxxrt.so.1 OLD_FILES+=usr/lib/libc++.a OLD_FILES+=usr/lib/libc++_p.a +OLD_FILES+=usr/lib/libc++experimental.a OLD_FILES+=usr/lib/libc++.so OLD_LIBS+=usr/lib/libc++.so.1 OLD_FILES+=usr/lib/libcxxrt.a From owner-svn-src-all@freebsd.org Sun May 21 18:00:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2915D76B81; Sun, 21 May 2017 18:00:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 317FD1A25; Sun, 21 May 2017 18:00:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4LI0g6d091838 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 21 May 2017 21:00:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4LI0g6d091838 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4LI0gGL091837; Sun, 21 May 2017 21:00:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 21 May 2017 21:00:42 +0300 From: Konstantin Belousov To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318594 - in head: lib lib/libc++experimental tools/build/mk Message-ID: <20170521180042.GK1622@kib.kiev.ua> References: <201705211707.v4LH7CbN016259@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705211707.v4LH7CbN016259@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 18:00:48 -0000 On Sun, May 21, 2017 at 05:07:12PM +0000, Dimitry Andric wrote: > Author: dim > Date: Sun May 21 17:07:12 2017 > New Revision: 318594 > URL: https://svnweb.freebsd.org/changeset/base/318594 > > Log: > Add libc++experimental.a for std::experimental support > > This adds a separate library for supporting std::experimental features. > It is purposefully static, and must be explicitly linked into programs > using -lc++experimental. > > PLEASE NOTE: there is NO WARRANTY as to any stability or continuing > existence of the features in the std::experimental parts of the C++ > library! > > Reviewed by: ed > Differential Revision: https://reviews.freebsd.org/D10840 > > Added: > head/lib/libc++experimental/ > head/lib/libc++experimental/Makefile (contents, props changed) > Modified: > head/lib/Makefile > head/tools/build/mk/OptionalObsoleteFiles.inc > > Modified: head/lib/Makefile > ============================================================================== > --- head/lib/Makefile Sun May 21 15:37:08 2017 (r318593) > +++ head/lib/Makefile Sun May 21 17:07:12 2017 (r318594) > @@ -156,7 +156,7 @@ _libclang_rt= libclang_rt > > .if ${MK_LIBCPLUSPLUS} != "no" > _libcxxrt= libcxxrt > -_libcplusplus= libc++ > +_libcplusplus= libc++ libc++experimental > .endif > > SUBDIR.${MK_EFI}+= libefivar > > Added: head/lib/libc++experimental/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libc++experimental/Makefile Sun May 21 17:07:12 2017 (r318594) > @@ -0,0 +1,29 @@ > +# $FreeBSD$ > + > +.include > + > +PACKAGE= clibs > +SRCDIR= ${SRCTOP}/contrib/libc++ > + > +LIB= c++experimental > +NO_PIC= I suspect for this case it is almost required to provide libc++experimental_pic.a, otherwise linking the lib to dso would cause textrel. From owner-svn-src-all@freebsd.org Sun May 21 18:34:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77219D779A8; Sun, 21 May 2017 18:34:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D815DB3; Sun, 21 May 2017 18:34:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::e0f5:766f:bd10:a778] (unknown [IPv6:2001:470:7a58:0:e0f5:766f:bd10:a778]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1DC7932832; Sun, 21 May 2017 20:34:42 +0200 (CEST) From: Dimitry Andric Message-Id: <55649C56-DA8E-41C5-91B4-E72FB6A07CBC@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_03C65E7D-FA3B-40D1-A3BA-01E65777B791"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318594 - in head: lib lib/libc++experimental tools/build/mk Date: Sun, 21 May 2017 20:34:31 +0200 In-Reply-To: <20170521180042.GK1622@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Konstantin Belousov References: <201705211707.v4LH7CbN016259@repo.freebsd.org> <20170521180042.GK1622@kib.kiev.ua> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 18:34:53 -0000 --Apple-Mail=_03C65E7D-FA3B-40D1-A3BA-01E65777B791 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 21 May 2017, at 20:00, Konstantin Belousov = wrote: >=20 > On Sun, May 21, 2017 at 05:07:12PM +0000, Dimitry Andric wrote: >> Author: dim >> Date: Sun May 21 17:07:12 2017 >> New Revision: 318594 >> URL: https://svnweb.freebsd.org/changeset/base/318594 >>=20 >> Log: >> Add libc++experimental.a for std::experimental support >>=20 >> This adds a separate library for supporting std::experimental = features. >> It is purposefully static, and must be explicitly linked into = programs >> using -lc++experimental. >>=20 >> PLEASE NOTE: there is NO WARRANTY as to any stability or continuing >> existence of the features in the std::experimental parts of the C++ >> library! >>=20 >> Reviewed by: ed >> Differential Revision: https://reviews.freebsd.org/D10840 >>=20 >> Added: >> head/lib/libc++experimental/ >> head/lib/libc++experimental/Makefile (contents, props changed) >> Modified: >> head/lib/Makefile >> head/tools/build/mk/OptionalObsoleteFiles.inc >>=20 >> Modified: head/lib/Makefile >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/Makefile Sun May 21 15:37:08 2017 = (r318593) >> +++ head/lib/Makefile Sun May 21 17:07:12 2017 = (r318594) >> @@ -156,7 +156,7 @@ _libclang_rt=3D libclang_rt >>=20 >> .if ${MK_LIBCPLUSPLUS} !=3D "no" >> _libcxxrt=3D libcxxrt >> -_libcplusplus=3D libc++ >> +_libcplusplus=3D libc++ libc++experimental >> .endif >>=20 >> SUBDIR.${MK_EFI}+=3D libefivar >>=20 >> Added: head/lib/libc++experimental/Makefile >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- /dev/null 00:00:00 1970 (empty, because file is newly = added) >> +++ head/lib/libc++experimental/Makefile Sun May 21 17:07:12 2017 = (r318594) >> @@ -0,0 +1,29 @@ >> +# $FreeBSD$ >> + >> +.include >> + >> +PACKAGE=3D clibs >> +SRCDIR=3D ${SRCTOP}/contrib/libc++ >> + >> +LIB=3D c++experimental >> +NO_PIC=3D > I suspect for this case it is almost required to provide > libc++experimental_pic.a, otherwise linking the lib to dso would > cause textrel. Hmm, I don't know how to tell the build system otherwise that I don't want any shared library. It looks like NO_PIC is needed in bsd.lib.mk to force no .so to be built, though. Maybe it is easier to just build the .a file with -fPIC always? There is really no need for two .a files. -Dimitry --Apple-Mail=_03C65E7D-FA3B-40D1-A3BA-01E65777B791 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlkh3cEACgkQsF6jCi4glqO19gCbBa7FodF+0tf/Kx2IAm2XWEEX hhoAn0li8bAoxt9nWmRLQN55pSGISXd4 =JCBu -----END PGP SIGNATURE----- --Apple-Mail=_03C65E7D-FA3B-40D1-A3BA-01E65777B791-- From owner-svn-src-all@freebsd.org Sun May 21 18:47:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9272BD77E2B; Sun, 21 May 2017 18:47:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 387351432; Sun, 21 May 2017 18:47:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4LIlNtT002130 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 21 May 2017 21:47:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4LIlNtT002130 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4LIlNFk002129; Sun, 21 May 2017 21:47:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 21 May 2017 21:47:23 +0300 From: Konstantin Belousov To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318594 - in head: lib lib/libc++experimental tools/build/mk Message-ID: <20170521184723.GL1622@kib.kiev.ua> References: <201705211707.v4LH7CbN016259@repo.freebsd.org> <20170521180042.GK1622@kib.kiev.ua> <55649C56-DA8E-41C5-91B4-E72FB6A07CBC@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55649C56-DA8E-41C5-91B4-E72FB6A07CBC@FreeBSD.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 18:47:29 -0000 On Sun, May 21, 2017 at 08:34:31PM +0200, Dimitry Andric wrote: > On 21 May 2017, at 20:00, Konstantin Belousov wrote: > > > > On Sun, May 21, 2017 at 05:07:12PM +0000, Dimitry Andric wrote: > >> Author: dim > >> Date: Sun May 21 17:07:12 2017 > >> New Revision: 318594 > >> URL: https://svnweb.freebsd.org/changeset/base/318594 > >> > >> Log: > >> Add libc++experimental.a for std::experimental support > >> > >> This adds a separate library for supporting std::experimental features. > >> It is purposefully static, and must be explicitly linked into programs > >> using -lc++experimental. > >> > >> PLEASE NOTE: there is NO WARRANTY as to any stability or continuing > >> existence of the features in the std::experimental parts of the C++ > >> library! > >> > >> Reviewed by: ed > >> Differential Revision: https://reviews.freebsd.org/D10840 > >> > >> Added: > >> head/lib/libc++experimental/ > >> head/lib/libc++experimental/Makefile (contents, props changed) > >> Modified: > >> head/lib/Makefile > >> head/tools/build/mk/OptionalObsoleteFiles.inc > >> > >> Modified: head/lib/Makefile > >> ============================================================================== > >> --- head/lib/Makefile Sun May 21 15:37:08 2017 (r318593) > >> +++ head/lib/Makefile Sun May 21 17:07:12 2017 (r318594) > >> @@ -156,7 +156,7 @@ _libclang_rt= libclang_rt > >> > >> .if ${MK_LIBCPLUSPLUS} != "no" > >> _libcxxrt= libcxxrt > >> -_libcplusplus= libc++ > >> +_libcplusplus= libc++ libc++experimental > >> .endif > >> > >> SUBDIR.${MK_EFI}+= libefivar > >> > >> Added: head/lib/libc++experimental/Makefile > >> ============================================================================== > >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) > >> +++ head/lib/libc++experimental/Makefile Sun May 21 17:07:12 2017 (r318594) > >> @@ -0,0 +1,29 @@ > >> +# $FreeBSD$ > >> + > >> +.include > >> + > >> +PACKAGE= clibs > >> +SRCDIR= ${SRCTOP}/contrib/libc++ > >> + > >> +LIB= c++experimental > >> +NO_PIC= > > I suspect for this case it is almost required to provide > > libc++experimental_pic.a, otherwise linking the lib to dso would > > cause textrel. > > Hmm, I don't know how to tell the build system otherwise that I don't > want any shared library. It looks like NO_PIC is needed in bsd.lib.mk > to force no .so to be built, though. > > Maybe it is easier to just build the .a file with -fPIC always? There > is really no need for two .a files. May be, indeed. From owner-svn-src-all@freebsd.org Sun May 21 19:29:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A4EAD77096; Sun, 21 May 2017 19:29:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A255E6C; Sun, 21 May 2017 19:29:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LJTTOd073074; Sun, 21 May 2017 19:29:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LJTSP0073067; Sun, 21 May 2017 19:29:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705211929.v4LJTSP0073067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 21 May 2017 19:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318595 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 19:29:30 -0000 Author: emaste Date: Sun May 21 19:29:28 2017 New Revision: 318595 URL: https://svnweb.freebsd.org/changeset/base/318595 Log: msdosfs: capitalize FAT appropriately Diff reduction with NetBSD, including some nearby minor whitespace or style fixes. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/msdosfs/denode.h head/sys/fs/msdosfs/fat.h head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/msdosfs/msdosfsmount.h Modified: head/sys/fs/msdosfs/denode.h ============================================================================== --- head/sys/fs/msdosfs/denode.h Sun May 21 17:07:12 2017 (r318594) +++ head/sys/fs/msdosfs/denode.h Sun May 21 19:29:28 2017 (r318595) @@ -98,7 +98,7 @@ #define MSDOSFSROOT_OFS 0x1fffffff /* - * The fat cache structure. fc_fsrcn is the filesystem relative cluster + * The FAT cache structure. fc_fsrcn is the filesystem relative cluster * number that corresponds to the file relative cluster number in this * structure (fc_frcn). */ @@ -108,11 +108,11 @@ struct fatcache { }; /* - * The fat entry cache as it stands helps make extending files a "quick" - * operation by avoiding having to scan the fat to discover the last + * The FAT entry cache as it stands helps make extending files a "quick" + * operation by avoiding having to scan the FAT to discover the last * cluster of the file. The cache also helps sequential reads by * remembering the last cluster read from the file. This also prevents us - * from having to rescan the fat to find the next cluster to read. This + * from having to rescan the FAT to find the next cluster to read. This * cache is probably pretty worthless if a file is opened by multiple * processes. */ @@ -126,7 +126,7 @@ struct fatcache { #define FCE_EMPTY 0xffffffff /* doesn't represent an actual cluster # */ /* - * Set a slot in the fat cache. + * Set a slot in the FAT cache. */ #define fc_setcache(dep, slot, frcn, fsrcn) \ (dep)->de_fc[(slot)].fc_frcn = (frcn); \ @@ -156,7 +156,7 @@ struct denode { u_short de_MDate; /* modification date */ u_long de_StartCluster; /* starting cluster of file */ u_long de_FileSize; /* size of file in bytes */ - struct fatcache de_fc[FC_SIZE]; /* fat cache */ + struct fatcache de_fc[FC_SIZE]; /* FAT cache */ u_quad_t de_modrev; /* Revision level for lease. */ uint64_t de_inode; /* Inode number (really byte offset of direntry) */ }; Modified: head/sys/fs/msdosfs/fat.h ============================================================================== --- head/sys/fs/msdosfs/fat.h Sun May 21 17:07:12 2017 (r318594) +++ head/sys/fs/msdosfs/fat.h Sun May 21 19:29:28 2017 (r318595) @@ -66,10 +66,10 @@ /* * MSDOSFS: - * Return true if filesystem uses 12 bit fats. Microsoft Programmer's + * Return true if filesystem uses 12 bit FATs. Microsoft Programmer's * Reference says if the maximum cluster number in a filesystem is greater * than 4078 ((CLUST_RSRVS - CLUST_FIRST) & FAT12_MASK) then we've got a - * 16 bit fat filesystem. While mounting, the result of this test is stored + * 16 bit FAT filesystem. While mounting, the result of this test is stored * in pm_fatentrysize. */ #define FAT12(pmp) (pmp->pm_fatmask == FAT12_MASK) @@ -83,8 +83,8 @@ * These are the values for the function argument to the function * fatentry(). */ -#define FAT_GET 0x0001 /* get a fat entry */ -#define FAT_SET 0x0002 /* set a fat entry */ +#define FAT_GET 0x0001 /* get a FAT entry */ +#define FAT_SET 0x0002 /* set a FAT entry */ #define FAT_GET_AND_SET (FAT_GET | FAT_SET) /* Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Sun May 21 17:07:12 2017 (r318594) +++ head/sys/fs/msdosfs/msdosfs_denode.c Sun May 21 19:29:28 2017 (r318595) @@ -160,7 +160,7 @@ deget(struct msdosfsmount *pmp, u_long d ldep->de_diroffset = diroffset; ldep->de_inode = inode; lockmgr(nvp->v_vnlock, LK_EXCLUSIVE, NULL); - fc_purge(ldep, 0); /* init the fat cache for this denode */ + fc_purge(ldep, 0); /* init the FAT cache for this denode */ error = insmntque(nvp, mntp); if (error != 0) { free(ldep, M_MSDOSFSNODE); Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Sun May 21 17:07:12 2017 (r318594) +++ head/sys/fs/msdosfs/msdosfs_fat.c Sun May 21 19:29:28 2017 (r318595) @@ -176,8 +176,8 @@ pcbmap(struct denode *dep, u_long findcn *sp = pmp->pm_bpcluster; /* - * Rummage around in the fat cache, maybe we can avoid tromping - * through every fat entry for the file. And, keep track of how far + * Rummage around in the FAT cache, maybe we can avoid tromping + * through every FAT entry for the file. And, keep track of how far * off the cache was from where we wanted to be. */ i = 0; @@ -244,13 +244,13 @@ hiteof:; *cnp = i; if (bp) brelse(bp); - /* update last file cluster entry in the fat cache */ + /* update last file cluster entry in the FAT cache */ fc_setcache(dep, FC_LASTFC, i - 1, prevcn); return (E2BIG); } /* - * Find the closest entry in the fat cache to the cluster we are looking + * Find the closest entry in the FAT cache to the cluster we are looking * for. */ static void @@ -276,7 +276,7 @@ fc_lookup(struct denode *dep, u_long fin } /* - * Purge the fat cache in denode dep of all entries relating to file + * Purge the FAT cache in denode dep of all entries relating to file * relative cluster frcn and beyond. */ void @@ -295,13 +295,13 @@ fc_purge(struct denode *dep, u_int frcn) } /* - * Update the fat. - * If mirroring the fat, update all copies, with the first copy as last. - * Else update only the current fat (ignoring the others). + * Update the FAT. + * If mirroring the FAT, update all copies, with the first copy as last. + * Else update only the current FAT (ignoring the others). * * pmp - msdosfsmount structure for filesystem to update - * bp - addr of modified fat block - * fatbn - block number relative to begin of filesystem of the modified fat block. + * bp - addr of modified FAT block + * fatbn - block number relative to begin of filesystem of the modified FAT block. */ static void updatefats(struct msdosfsmount *pmp, struct buf *bp, u_long fatbn) @@ -315,12 +315,12 @@ updatefats(struct msdosfsmount *pmp, str if (pmp->pm_flags & MSDOSFS_FATMIRROR) { /* - * Now copy the block(s) of the modified fat to the other copies of - * the fat and write them out. This is faster than reading in the - * other fats and then writing them back out. This could tie up - * the fat for quite a while. Preventing others from accessing it. - * To prevent us from going after the fat quite so much we use - * delayed writes, unless they specfied "synchronous" when the + * Now copy the block(s) of the modified FAT to the other copies of + * the FAT and write them out. This is faster than reading in the + * other FATs and then writing them back out. This could tie up + * the FAT for quite a while. Preventing others from accessing it. + * To prevent us from going after the FAT quite so much we use + * delayed writes, unless they specified "synchronous" when the * filesystem was mounted. If synch is asked for then use * bwrite()'s and really slow things down. */ @@ -349,7 +349,7 @@ updatefats(struct msdosfsmount *pmp, str } /* - * Write out the first (or current) fat last. + * Write out the first (or current) FAT last. */ if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS) bwrite(bp); @@ -358,7 +358,7 @@ updatefats(struct msdosfsmount *pmp, str } /* - * Updating entries in 12 bit fats is a pain in the butt. + * Updating entries in 12 bit FATs is a pain in the butt. * * The following picture shows where nibbles go when moving from a 12 bit * cluster number into the appropriate bytes in the FAT. @@ -436,21 +436,21 @@ clusterfree(struct msdosfsmount *pmp, u_ } /* - * Get or Set or 'Get and Set' the cluster'th entry in the fat. + * Get or Set or 'Get and Set' the cluster'th entry in the FAT. * - * function - whether to get or set a fat entry + * function - whether to get or set a FAT entry * pmp - address of the msdosfsmount structure for the filesystem - * whose fat is to be manipulated. + * whose FAT is to be manipulated. * cn - which cluster is of interest * oldcontents - address of a word that is to receive the contents of the * cluster'th entry if this is a get function * newcontents - the new value to be written into the cluster'th element of - * the fat if this is a set function. + * the FAT if this is a set function. * - * This function can also be used to free a cluster by setting the fat entry + * This function can also be used to free a cluster by setting the FAT entry * for a cluster to 0. * - * All copies of the fat are updated if this is a set function. NOTE: If + * All copies of the FAT are updated if this is a set function. NOTE: If * fatentry() marks a cluster as free it does not update the inusemap in * the msdosfsmount structure. This is left to the caller. */ @@ -513,7 +513,7 @@ fatentry(int function, struct msdosfsmou if (FAT12(pmp) & (cn & 1)) readcn >>= 4; readcn &= pmp->pm_fatmask; - /* map reserved fat entries to same values for all fats */ + /* map reserved FAT entries to same values for all FATs */ if ((readcn | ~pmp->pm_fatmask) >= CLUST_RSRVD) readcn |= ~pmp->pm_fatmask; *oldcontents = readcn; @@ -537,7 +537,7 @@ fatentry(int function, struct msdosfsmou case FAT32_MASK: /* * According to spec we have to retain the - * high order bits of the fat entry. + * high order bits of the FAT entry. */ readcn = getulong(&bp->b_data[bo]); readcn &= ~FAT32_MASK; @@ -560,7 +560,7 @@ fatentry(int function, struct msdosfsmou * pmp - mount point * start - first cluster of chain * count - number of clusters in chain - * fillwith - what to write into fat entry of last cluster + * fillwith - what to write into FAT entry of last cluster */ static int fatchain(struct msdosfsmount *pmp, u_long start, u_long count, u_long fillwith) @@ -685,7 +685,7 @@ chainlength(struct msdosfsmount *pmp, u_ * pmp - mount point. * start - start of cluster chain. * count - number of clusters to allocate. - * fillwith - put this value into the fat entry for the + * fillwith - put this value into the FAT entry for the * last allocated cluster. * retcluster - put the first allocated cluster's number here. * got - how many clusters were actually allocated. @@ -730,7 +730,7 @@ chainalloc(struct msdosfsmount *pmp, u_l * pmp - mount point. * start - preferred start of cluster chain. * count - number of clusters requested. - * fillwith - put this value into the fat entry for the + * fillwith - put this value into the FAT entry for the * last allocated cluster. * retcluster - put the first allocated cluster's number here. * got - how many clusters were actually allocated. @@ -882,7 +882,7 @@ freeclusterchain(struct msdosfsmount *pm } /* - * Read in fat blocks looking for free clusters. For every free cluster + * Read in FAT blocks looking for free clusters. For every free cluster * found turn off its corresponding bit in the pm_inusemap. */ int @@ -896,7 +896,7 @@ fillinusemap(struct msdosfsmount *pmp) MSDOSFS_ASSERT_MP_LOCKED(pmp); /* - * Mark all clusters in use, we mark the free ones in the fat scan + * Mark all clusters in use, we mark the free ones in the FAT scan * loop further down. */ for (cn = 0; cn < (pmp->pm_maxcluster + N_INUSEBITS) / N_INUSEBITS; cn++) @@ -904,7 +904,7 @@ fillinusemap(struct msdosfsmount *pmp) /* * Figure how many free clusters are in the filesystem by ripping - * through the fat counting the number of entries whose content is + * through the FAT counting the number of entries whose content is * zero. These represent free clusters. */ pmp->pm_freeclustercount = 0; @@ -1042,8 +1042,8 @@ extendfile(struct denode *dep, u_long co } /* - * Update the "last cluster of the file" entry in the denode's fat - * cache. + * Update the "last cluster of the file" entry in the + * denode's FAT cache. */ fc_setcache(dep, FC_LASTFC, frcn + got - 1, cn + got - 1); Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sun May 21 17:07:12 2017 (r318594) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun May 21 19:29:28 2017 (r318595) @@ -604,7 +604,7 @@ mountmsdosfs(struct vnode *devvp, struct <= ((CLUST_RSRVD - CLUST_FIRST) & FAT12_MASK)) { /* * This will usually be a floppy disk. This size makes - * sure that one fat entry will not be split across + * sure that one FAT entry will not be split across * multiple blocks. */ pmp->pm_fatmask = FAT12_MASK; @@ -717,9 +717,9 @@ mountmsdosfs(struct vnode *devvp, struct goto error_exit; /* - * If they want fat updates to be synchronous then let them suffer + * If they want FAT updates to be synchronous then let them suffer * the performance degradation in exchange for the on disk copy of - * the fat being correct just about all the time. I suppose this + * the FAT being correct just about all the time. I suppose this * would be a good thing to turn on if the kernel is still flakey. */ if (mp->mnt_flag & MNT_SYNCHRONOUS) @@ -925,14 +925,14 @@ msdosfs_sync(struct mount *mp, int waitf td = curthread; /* - * If we ever switch to not updating all of the fats all the time, + * If we ever switch to not updating all of the FATs all the time, * this would be the place to update them from the first one. */ if (pmp->pm_fmod != 0) { if (pmp->pm_flags & MSDOSFSMNT_RONLY) panic("msdosfs_sync: rofs mod"); else { - /* update fats here */ + /* update FATs here */ } } /* Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Sun May 21 17:07:12 2017 (r318594) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Sun May 21 19:29:28 2017 (r318595) @@ -736,7 +736,7 @@ msdosfs_write(struct vop_write_args *ap) vfs_bio_clrbuf(bp); /* * Do the bmap now, since pcbmap needs buffers - * for the fat table. (see msdosfs_strategy) + * for the FAT table. (see msdosfs_strategy) */ if (bp->b_blkno == bp->b_lblkno) { error = pcbmap(dep, bp->b_lblkno, &bn, 0, 0); Modified: head/sys/fs/msdosfs/msdosfsmount.h ============================================================================== --- head/sys/fs/msdosfs/msdosfsmount.h Sun May 21 17:07:12 2017 (r318594) +++ head/sys/fs/msdosfs/msdosfsmount.h Sun May 21 19:29:28 2017 (r318595) @@ -65,7 +65,7 @@ MALLOC_DECLARE(M_MSDOSFSMNT); struct msdosfs_fileno; /* - * Layout of the mount control block for a msdos filesystem. + * Layout of the mount control block for a MSDOSFS filesystem. */ struct msdosfsmount { struct mount *pm_mountp;/* vfs mount struct for this fs */ @@ -73,7 +73,7 @@ struct msdosfsmount { struct bufobj *pm_bo; uid_t pm_uid; /* uid to set as owner of the files */ gid_t pm_gid; /* gid to set as owner of the files */ - mode_t pm_mask; /* mask to and with file protection bits + mode_t pm_mask; /* mask to and with file protection bits for files */ mode_t pm_dirmask; /* mask to and with file protection bits for directories */ @@ -81,7 +81,7 @@ struct msdosfsmount { struct cdev *pm_dev; /* character device mounted */ struct bpb50 pm_bpb; /* BIOS parameter blk for this fs */ u_long pm_BlkPerSec; /* How many DEV_BSIZE blocks fit inside a physical sector */ - u_long pm_FATsecs; /* actual number of fat sectors */ + u_long pm_FATsecs; /* actual number of FAT sectors */ u_long pm_fatblk; /* block # of first FAT */ u_long pm_rootdirblk; /* block # (cluster # for FAT32) of root directory number */ u_long pm_rootdirsize; /* size in blocks (not clusters) */ @@ -93,15 +93,15 @@ struct msdosfsmount { u_long pm_bnshift; /* shift file offset right this amount to get a block number */ u_long pm_bpcluster; /* bytes per cluster */ u_long pm_fmod; /* ~0 if fs is modified, this can rollover to 0 */ - u_long pm_fatblocksize; /* size of fat blocks in bytes */ - u_long pm_fatblocksec; /* size of fat blocks in sectors */ - u_long pm_fatsize; /* size of fat in bytes */ - uint32_t pm_fatmask; /* mask to use for fat numbers */ + u_long pm_fatblocksize; /* size of FAT blocks in bytes */ + u_long pm_fatblocksec; /* size of FAT blocks in sectors */ + u_long pm_fatsize; /* size of FAT in bytes */ + uint32_t pm_fatmask; /* mask to use for FAT numbers */ u_long pm_fsinfo; /* fsinfo block number */ u_long pm_nxtfree; /* next place to search for a free cluster */ - u_int pm_fatmult; /* these 2 values are used in fat */ + u_int pm_fatmult; /* these 2 values are used in FAT */ u_int pm_fatdiv; /* offset computation */ - u_int pm_curfat; /* current fat for FAT32 (0 otherwise) */ + u_int pm_curfat; /* current FAT for FAT32 (0 otherwise) */ u_int *pm_inusemap; /* ptr to bitmap of in-use clusters */ uint64_t pm_flags; /* see below */ void *pm_u2w; /* Local->Unicode iconv handle */ From owner-svn-src-all@freebsd.org Sun May 21 19:48:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 155DCD776BF; Sun, 21 May 2017 19:48:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB81F19CE; Sun, 21 May 2017 19:48:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LJmGwA081558; Sun, 21 May 2017 19:48:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LJmGhq081557; Sun, 21 May 2017 19:48:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705211948.v4LJmGhq081557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 21 May 2017 19:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318596 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 19:48:18 -0000 Author: emaste Date: Sun May 21 19:48:16 2017 New Revision: 318596 URL: https://svnweb.freebsd.org/changeset/base/318596 Log: msdosfs: correct constant and typo in comment Revisions: fat.h 1.5 1.6 Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/msdosfs/fat.h Modified: head/sys/fs/msdosfs/fat.h ============================================================================== --- head/sys/fs/msdosfs/fat.h Sun May 21 19:29:28 2017 (r318595) +++ head/sys/fs/msdosfs/fat.h Sun May 21 19:48:16 2017 (r318596) @@ -68,7 +68,7 @@ * MSDOSFS: * Return true if filesystem uses 12 bit FATs. Microsoft Programmer's * Reference says if the maximum cluster number in a filesystem is greater - * than 4078 ((CLUST_RSRVS - CLUST_FIRST) & FAT12_MASK) then we've got a + * than 4084 ((CLUST_RSRVD - CLUST_FIRST) & FAT12_MASK) then we've got a * 16 bit FAT filesystem. While mounting, the result of this test is stored * in pm_fatentrysize. */ From owner-svn-src-all@freebsd.org Sun May 21 20:00:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97732D77924; Sun, 21 May 2017 20:00:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 648201E89; Sun, 21 May 2017 20:00:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LK0neo085888; Sun, 21 May 2017 20:00:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LK0nkm085887; Sun, 21 May 2017 20:00:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705212000.v4LK0nkm085887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 21 May 2017 20:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318597 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 20:00:50 -0000 Author: emaste Date: Sun May 21 20:00:49 2017 New Revision: 318597 URL: https://svnweb.freebsd.org/changeset/base/318597 Log: msdosfs: constify Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/msdosfs/msdosfs_conv.c Modified: head/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_conv.c Sun May 21 19:48:16 2017 (r318596) +++ head/sys/fs/msdosfs/msdosfs_conv.c Sun May 21 20:00:49 2017 (r318597) @@ -73,7 +73,7 @@ static uint16_t unix2winchr(const u_char * 2 - character ('.' and ' ') should be skipped in DOS file name, * and generation number inserted. */ -static u_char +static const u_char unix2dos[256] = { /* iso8859-1 -> cp850 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 00-07 */ @@ -110,7 +110,7 @@ unix2dos[256] = { 0x9d, 0xeb, 0xe9, 0xea, 0x9a, 0xed, 0xe8, 0x98, /* f8-ff */ }; -static u_char +static const u_char dos2unix[256] = { /* cp850 -> iso8859-1 */ 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, /* 00-07 */ @@ -147,7 +147,7 @@ dos2unix[256] = { 0xb0, 0xa8, 0xb7, 0xb9, 0xb3, 0xb2, 0x3f, 0x3f, /* f8-ff */ }; -static u_char +static const u_char u2l[256] = { /* tolower */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 00-07 */ @@ -184,7 +184,7 @@ u2l[256] = { 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* f8-ff */ }; -static u_char +static const u_char l2u[256] = { /* toupper */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 00-07 */ From owner-svn-src-all@freebsd.org Sun May 21 20:48:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F222D77A2D; Sun, 21 May 2017 20:48:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F40B318EB; Sun, 21 May 2017 20:48:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id n23so15383010pfb.3; Sun, 21 May 2017 13:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=X3UAsNbpndKI3JcUUilxQqrGmPSmP64FUAt8umygvyU=; b=P5Iw6ByTzr71xJTFjm9KlUMistBKg48paoL4NdEYvhe682GtdekIptiNHIkE1TxFS4 opHgoh0buGEemNqMXaZ4y6wKK7Tagis62zLBgR7FFsy5u7peDbJAgwBDf8K3wKdQJ3t1 etb7I3QGTZgTx5FvN9vFlpQr1Z8r04d2GeQsD5u+cQYfULlxOC8X0qu2/D0FTos1FbnX Kssi83EeDunSm0y70MAVdGYHuhvXu+icqxIf7befp8taVoviJvlRTReNkS1ddxZ37xES 3pcgUS0V0VnJoJDwk4iwBYT4phVq6hJr+h/ieoQwx82DeoPiPpOOhHZDh2irc4KEHL91 3R+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=X3UAsNbpndKI3JcUUilxQqrGmPSmP64FUAt8umygvyU=; b=TQvmSiBKUBl6sEApM6+5g/3d/3gKOw3Zp66JYMwwIpoXUxwb+gzHP632TmVPdCGbtT pmtPJFeU20q3qxPsrk0BhmAzNbycZMkOHXU8Dgq429ImDIaLV4XoJMohp+oXXF8ygRvS 9CwYxm34m5GEIrPmHpwYe2LrBIdmD7Q8si1d2l0gLDCV+TF/pEsBKA/EI6NEZNh+J0y0 OO9Fix7yUJ1/t2uGtlOKRrp2wzoT73WgTYZOpMRx4Xk0D5dyfXBYPmAx6hwE0YXEUtY9 /CQEdEcOrQ/V/GXY1k9W1QXJyJ6ZqAiOY4DFIbstby+HCI2dLqj4Yrm2F0dmBmhHC0n+ XWIw== X-Gm-Message-State: AODbwcBbXgFb9idIPos7G+vF3ZSHtyfb1rP3C01LXnRlwCGGJG1x0W1Y TUO0auNodQDYEw== X-Received: by 10.98.89.201 with SMTP id k70mr21505415pfj.196.1495399721366; Sun, 21 May 2017 13:48:41 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id r68sm26612251pfd.91.2017.05.21.13.48.40 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 21 May 2017 13:48:40 -0700 (PDT) Subject: Re: svn commit: r318594 - in head: lib lib/libc++experimental tools/build/mk Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_2A8F8C6D-32BF-4A87-9897-D1E286972088"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <55649C56-DA8E-41C5-91B4-E72FB6A07CBC@FreeBSD.org> Date: Sun, 21 May 2017 13:48:39 -0700 Cc: Konstantin Belousov , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <4A7031DC-30A0-415E-AD45-6FDC1925C868@gmail.com> References: <201705211707.v4LH7CbN016259@repo.freebsd.org> <20170521180042.GK1622@kib.kiev.ua> <55649C56-DA8E-41C5-91B4-E72FB6A07CBC@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 20:48:42 -0000 --Apple-Mail=_2A8F8C6D-32BF-4A87-9897-D1E286972088 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 21, 2017, at 11:34, Dimitry Andric wrote: =E2=80=A6 > Hmm, I don't know how to tell the build system otherwise that I don't > want any shared library. It looks like NO_PIC is needed in bsd.lib.mk > to force no .so to be built, though. NO_PIC is the way to do this. -Ngie --Apple-Mail=_2A8F8C6D-32BF-4A87-9897-D1E286972088 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZIf0nAAoJEPWDqSZpMIYVnl4QAIah8GXNvmj2ZYsbotXCKFTe rW+LipjtC1LIRRmSuKThituY8I6MEmPD5H2UmqwzEKHCJ124uMeNJPPwrJhEjhHn xXhnmRffBYOGM+xu4ar7azqHxCXYlt+s/m4MQ2UVzENv5w76dbJuLeAvJLKssR2h 2/+HKLKuksg53e7uILgDjn1jEkJ6Y+tfzCjgnsbj9ev1GReK2Jv8t4WEeaC6318g c/6xj/QiclHJnSu0R5anXBcj0kQZZpOtIl5l3D/hcbIVPc+3yYTEwkYz+Zs0w3DD 9p6lWfeI7yer6+KBA7o0ktsu7ADqa106PeAah8AGlh6WBAsu0PGo0TlSDLaniuhF GGXHLmJj0SpCRrXUvL5Y4azVkRjSFSgo2kBY9O0q/b7sPyDEEZ9xKkUH65CtDr8h BsUeKIDMm3b0I3t1ti0QRSZLRj9pbcDIo5TG3JZxysK7nj539H8O62mPPSKkLNsK 0qZM89U2e+P2akLTLCmIgFGl4NkxZFUceAg0L/ijK8JXlF42fnGtacVwhGTEz7EF oMQ9f60H5qalFa5d6OLHsCQsJUoot22SwEZ73nd6h0vTnKK2Kijz6XYFziwd/jRp ksAyF+XzQBYmf6vLgd8SrxKzfCrPjcX1YW5aBexnq7992zfjKmmHNzJ63GP6HpAv SgJeUxZBa4dXycnGns8w =gH1N -----END PGP SIGNATURE----- --Apple-Mail=_2A8F8C6D-32BF-4A87-9897-D1E286972088-- From owner-svn-src-all@freebsd.org Sun May 21 21:33:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A55FD7811C; Sun, 21 May 2017 21:33:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AC101DF1; Sun, 21 May 2017 21:33:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LLXGLF026307; Sun, 21 May 2017 21:33:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LLXG1e026306; Sun, 21 May 2017 21:33:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705212133.v4LLXG1e026306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 21 May 2017 21:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318598 - head/lib/libc++experimental X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 21:33:17 -0000 Author: dim Date: Sun May 21 21:33:15 2017 New Revision: 318598 URL: https://svnweb.freebsd.org/changeset/base/318598 Log: Add PICFLAG to build libc++experimental.a, so it can be used in all situations. Noticed by: kib Modified: head/lib/libc++experimental/Makefile Modified: head/lib/libc++experimental/Makefile ============================================================================== --- head/lib/libc++experimental/Makefile Sun May 21 20:00:49 2017 (r318597) +++ head/lib/libc++experimental/Makefile Sun May 21 21:33:15 2017 (r318598) @@ -17,6 +17,7 @@ SRCS+= filesystem/path.cpp SRCS+= memory_resource.cpp WARNS?= 0 +CXXFLAGS+= ${PICFLAG} CXXFLAGS+= -isystem ${SRCDIR}/include CXXFLAGS+= -nostdinc++ CXXFLAGS+= -nostdlib From owner-svn-src-all@freebsd.org Sun May 21 22:10:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A069D78A40; Sun, 21 May 2017 22:10:10 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A3E7F15; Sun, 21 May 2017 22:10:10 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LMA9ef039612; Sun, 21 May 2017 22:10:09 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LMA9i0039611; Sun, 21 May 2017 22:10:09 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201705212210.v4LMA9i0039611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Sun, 21 May 2017 22:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318599 - head/usr.sbin/efivar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 22:10:10 -0000 Author: bjk (doc committer) Date: Sun May 21 22:10:08 2017 New Revision: 318599 URL: https://svnweb.freebsd.org/changeset/base/318599 Log: Updates for efivar.8 Fix spelling [1], appease igor and mandoc -Tlint, and adopt the language style to be more consistent with our corpus. PR: 219434 [1] Submitted by: olgeni [1] Modified: head/usr.sbin/efivar/efivar.8 Modified: head/usr.sbin/efivar/efivar.8 ============================================================================== --- head/usr.sbin/efivar/efivar.8 Sun May 21 21:33:15 2017 (r318598) +++ head/usr.sbin/efivar/efivar.8 Sun May 21 22:10:08 2017 (r318599) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2017 +.Dd May 21, 2017 .Dt EFIVAR 8 .Os .Sh NAME .Nm efivar -.Nd UEFI environemnt variable interaction +.Nd UEFI environment variable interaction .Sh SYNOPSIS .Nm .Op Fl abdDHlLNpRtw @@ -58,7 +58,7 @@ This program manages .Pq UEFI environment variables. UEFI variables have three part: A namespace, a name and a value. -The namespace is a GUID that's self assigned by the group defining the +The namespace is a GUID that is self assigned by the group defining the variables. The name is a Unicode name for the variable. The value is binary data. @@ -70,7 +70,7 @@ The following options are available: Specify the name of the variable to operate on. The .Ar name -argument is the GUID of variable, followed by a dash, followed by the +argument is the GUID of the variable, followed by a dash, followed by the UEFI variable name. The GUID may be in numeric format, or may be one of the well known symbolic name (see @@ -86,19 +86,19 @@ This flag implies unless the .Fl -append flag is given. -This is not well understood and currently unimplemented. +This behavior is not well understood and is currently unimplemented. .It Fl a Fl -append Append the specified value to the UEFI variable rather than replacing -it.p +it. .It Fl t Ar attr Fl -attributes Ar attr -Specify, in user hostile hexidecimal, the attributes for this +Specify, in hexadecimal, the attributes for this variable. See section 7.2 (GetVariable subsection, Related Definitions) of the UEFI Specification for hex values to use. .It Fl A Fl -ascii Display the variable data as modified ascii: All printable characters are printed, while unprintable characters are rendered as a two-digit -hexadecimal number preceeded by a % character. +hexadecimal number preceded by a % character. .It Fl b Fl -binary Display the variable data as binary data. Usually will be used with the @@ -155,29 +155,27 @@ can be used to specify simple strings. Display the .Ar name environment variable. +.El .Sh COMPATIBILITY The .Nm -program is intended to be compatible (strict superset) with a progam -of the same name included in the Red Hat libefivar package. -.Pp -Except the +program is intended to be compatible (strict superset) with a program +of the same name included in the Red Hat libefivar package, +but the .Fl d and .Fl -print-decimal -flags are not implmenented and never will be. +flags are not implemented and never will be. +.Pp The .Fl d -flag is a short-hand for +flag is short for .Fl -device-path . .Sh SEE ALSO Appendix A of the UEFI specification has the format for GUIDs. All GUIDs .Dq Globally Unique Identifiers have the format described in RFC 4122. -.El -.Pp -.Xr efivar 8 .Sh HISTORY The .Nm From owner-svn-src-all@freebsd.org Sun May 21 22:28:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B91BCD78E47; Sun, 21 May 2017 22:28:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B7661795; Sun, 21 May 2017 22:28:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LMSS2N047767; Sun, 21 May 2017 22:28:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LMSSJV047765; Sun, 21 May 2017 22:28:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705212228.v4LMSSJV047765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 21 May 2017 22:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318600 - head/usr.bin/catman X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 22:28:29 -0000 Author: bapt Date: Sun May 21 22:28:28 2017 New Revision: 318600 URL: https://svnweb.freebsd.org/changeset/base/318600 Log: Make catman(1) use mandoc(1) by default catman(1) checks if mandoc(1) do support the manpage before trying to generate the catpage and falls back on nroff, using the same mechanism as man(1). Modified: head/usr.bin/catman/catman.1 head/usr.bin/catman/catman.c Modified: head/usr.bin/catman/catman.1 ============================================================================== --- head/usr.bin/catman/catman.1 Sun May 21 22:10:08 2017 (r318599) +++ head/usr.bin/catman/catman.1 Sun May 21 22:28:28 2017 (r318600) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 3, 2005 +.Dd May 22, 2017 .Dt CATMAN 1 .Os .Sh NAME @@ -40,6 +40,8 @@ The utility preformats all the man pages in .Ar directories using the +.Nm mandoc +command when supported, falling back on the .Nm nroff Fl man command. Directories may be separated by colons instead of spaces. @@ -99,6 +101,7 @@ environment variable is not set. .Sh SEE ALSO .Xr makewhatis 1 , .Xr man 1 , +.Xr mandoc 1 , .Xr nroff 1 .Sh HISTORY A previous version of the Modified: head/usr.bin/catman/catman.c ============================================================================== --- head/usr.bin/catman/catman.c Sun May 21 22:10:08 2017 (r318599) +++ head/usr.bin/catman/catman.c Sun May 21 22:28:28 2017 (r318600) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -70,6 +71,8 @@ static char *lang_locale; /* short form static const char *machine, *machine_arch; static int exit_code; /* exit code to use when finished */ +extern char **environ; + /* * -T argument for nroff */ @@ -93,6 +96,7 @@ static const char *locale_device[] = { #define GZCAT_CMD "z" enum Ziptype {NONE, BZIP, GZIP}; +static bool mandoc_locales = false; static uid_t uid; static int starting_dir; static char tmp_file[MAXPATHLEN]; @@ -438,11 +442,24 @@ process_page(char *mandir, char *src, ch } snprintf(tmp_file, sizeof tmp_file, "%s.tmp", cat); snprintf(cmd, sizeof cmd, - "%scat %s | tbl | nroff -c -T%s -man | %s > %s.tmp", + "%scat %s | mandoc -Tlint -Wunsupp 2>/dev/null", zipped == BZIP ? BZ2CAT_CMD : zipped == GZIP ? GZCAT_CMD : "", - src, nroff_device, - zipped == BZIP ? BZ2_CMD : zipped == GZIP ? GZ_CMD : "cat", - cat); + src); + if (system(cmd) == 0) { + snprintf(cmd, sizeof cmd, + "%scat %s | mandoc -T%s | %s > %s.tmp", + zipped == BZIP ? BZ2CAT_CMD : zipped == GZIP ? GZCAT_CMD : "", + src, mandoc_locales ? "locale" : "ascii", + zipped == BZIP ? BZ2_CMD : zipped == GZIP ? GZ_CMD : "cat", + cat); + } else { + snprintf(cmd, sizeof cmd, + "%scat %s | tbl | nroff -c -T%s -man | %s > %s.tmp", + zipped == BZIP ? BZ2CAT_CMD : zipped == GZIP ? GZCAT_CMD : "", + src, nroff_device, + zipped == BZIP ? BZ2_CMD : zipped == GZIP ? GZ_CMD : "cat", + cat); + } if (system(cmd) != 0) err(1, "formatting pipeline"); if (rename(tmp_file, cat) < 0) @@ -771,6 +788,7 @@ main(int argc, char **argv) break; case 'L': determine_locale(); + mandoc_locales = true; break; case 'n': pretend++; From owner-svn-src-all@freebsd.org Sun May 21 23:15:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A01FD78163; Sun, 21 May 2017 23:15:34 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 355E01193; Sun, 21 May 2017 23:15:34 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LNFX9a067722; Sun, 21 May 2017 23:15:33 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LNFWQw067717; Sun, 21 May 2017 23:15:32 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705212315.v4LNFWQw067717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 21 May 2017 23:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318601 - in head: contrib/compiler-rt/lib/builtins lib/libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 23:15:34 -0000 Author: adrian Date: Sun May 21 23:15:32 2017 New Revision: 318601 URL: https://svnweb.freebsd.org/changeset/base/318601 Log: [libcompiler-rt] add bswapdi2/bswapsi2 This is required for mips gcc 6.3 userland to build/run. Reviewed by: emaste, dim Approved by: emaste Differential Revision: https://reviews.freebsd.org/D10838 Added: head/contrib/compiler-rt/lib/builtins/bswapdi2.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/bswapsi2.c (contents, props changed) Modified: head/contrib/compiler-rt/lib/builtins/README.txt head/lib/libcompiler_rt/Makefile.inc Modified: head/contrib/compiler-rt/lib/builtins/README.txt ============================================================================== --- head/contrib/compiler-rt/lib/builtins/README.txt Sun May 21 22:28:28 2017 (r318600) +++ head/contrib/compiler-rt/lib/builtins/README.txt Sun May 21 23:15:32 2017 (r318601) @@ -57,8 +57,8 @@ si_int __popcountsi2(si_int a); // bit si_int __popcountdi2(di_int a); // bit population si_int __popcountti2(ti_int a); // bit population -uint32_t __bswapsi2(uint32_t a); // a byteswapped, arm only -uint64_t __bswapdi2(uint64_t a); // a byteswapped, arm only +uint32_t __bswapsi2(uint32_t a); // a byteswapped, arm/mips only +uint64_t __bswapdi2(uint64_t a); // a byteswapped, arm/mips only // Integral arithmetic Added: head/contrib/compiler-rt/lib/builtins/bswapdi2.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/builtins/bswapdi2.c Sun May 21 23:15:32 2017 (r318601) @@ -0,0 +1,28 @@ +/* ===-- bswapdi2.c - Implement __bswapdi2 ---------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + * + * This file implements __bswapdi2 for the compiler_rt library. + * + * ===----------------------------------------------------------------------=== + */ + +#include "int_lib.h" + +COMPILER_RT_ABI uint64_t +__bswapdi2 (uint64_t u) +{ + return ((((u) & 0xff00000000000000ULL) >> 56) + | (((u) & 0x00ff000000000000ULL) >> 40) + | (((u) & 0x0000ff0000000000ULL) >> 24) + | (((u) & 0x000000ff00000000ULL) >> 8) + | (((u) & 0x00000000ff000000ULL) << 8) + | (((u) & 0x0000000000ff0000ULL) << 24) + | (((u) & 0x000000000000ff00ULL) << 40) + | (((u) & 0x00000000000000ffULL) << 56)); +} Added: head/contrib/compiler-rt/lib/builtins/bswapsi2.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/builtins/bswapsi2.c Sun May 21 23:15:32 2017 (r318601) @@ -0,0 +1,25 @@ +/* ===-- bswapsi2.c - Implement __bswapsi2 ---------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + * + * This file implements __bswapsi2 for the compiler_rt library. + * + * ===----------------------------------------------------------------------=== + */ + +#include "int_lib.h" + +COMPILER_RT_ABI uint32_t +__bswapsi2 (uint32_t u) +{ + + return ((((u) & 0xff000000) >> 24) + | (((u) & 0x00ff0000) >> 8) + | (((u) & 0x0000ff00) << 8) + | (((u) & 0x000000ff) << 24)); +} Modified: head/lib/libcompiler_rt/Makefile.inc ============================================================================== --- head/lib/libcompiler_rt/Makefile.inc Sun May 21 22:28:28 2017 (r318600) +++ head/lib/libcompiler_rt/Makefile.inc Sun May 21 23:15:32 2017 (r318601) @@ -224,3 +224,10 @@ SRCS+= switch8.S SRCS+= switchu8.S SRCS+= sync_synchronize.S .endif + +# GCC-6.3 on mips32 requires bswap32 built-in. +.if ${MACHINE_CPUARCH} == "mips" +SRCS+= bswapdi2.c +SRCS+= bswapsi2.c +.endif + From owner-svn-src-all@freebsd.org Sun May 21 23:56:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 359AFD7885C; Sun, 21 May 2017 23:56:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07AC9146E; Sun, 21 May 2017 23:55:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4LNtxHu084104; Sun, 21 May 2017 23:55:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4LNtxtI084103; Sun, 21 May 2017 23:55:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705212355.v4LNtxtI084103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 21 May 2017 23:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318602 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 23:56:00 -0000 Author: adrian Date: Sun May 21 23:55:58 2017 New Revision: 318602 URL: https://svnweb.freebsd.org/changeset/base/318602 Log: [ar71xx] fix up dump space a la what jhb@ did elsewhere a while ago. Modified: head/sys/mips/atheros/ar71xx_machdep.c Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Sun May 21 23:15:32 2017 (r318601) +++ head/sys/mips/atheros/ar71xx_machdep.c Sun May 21 23:55:58 2017 (r318602) @@ -383,8 +383,8 @@ platform_start(__register_t a0 __unused, phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end); phys_avail[1] = ctob(realmem); - dump_avail[0] = phys_avail[0]; - dump_avail[1] = phys_avail[1] - phys_avail[0]; + dump_avail[0] = 0; + dump_avail[1] = phys_avail[1]; physmem = realmem; From owner-svn-src-all@freebsd.org Mon May 22 01:10:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC2D7D7706B; Mon, 22 May 2017 01:10:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE4011170; Mon, 22 May 2017 01:10:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M1ACkq012616; Mon, 22 May 2017 01:10:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M1ACGw012615; Mon, 22 May 2017 01:10:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705220110.v4M1ACGw012615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 22 May 2017 01:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318603 - head/contrib/elftoolchain/nm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 01:10:14 -0000 Author: emaste Date: Mon May 22 01:10:12 2017 New Revision: 318603 URL: https://svnweb.freebsd.org/changeset/base/318603 Log: nm: document 'r' symbol type PR: 219245 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/nm/nm.1 Modified: head/contrib/elftoolchain/nm/nm.1 ============================================================================== --- head/contrib/elftoolchain/nm/nm.1 Sun May 21 23:55:58 2017 (r318602) +++ head/contrib/elftoolchain/nm/nm.1 Mon May 22 01:10:12 2017 (r318603) @@ -24,7 +24,7 @@ .\" .\" $Id: nm.1 3195 2015-05-12 17:22:19Z emaste $ .\" -.Dd February 15, 2015 +.Dd May 21, 2017 .Os .Dt NM 1 .Sh NAME @@ -304,6 +304,8 @@ A local (uninitialized data) symbol. .It d A local data symbol. +.It r +A local read-only data symbol. .It t A local text symbol. .It v From owner-svn-src-all@freebsd.org Mon May 22 02:09:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CD76D78475; Mon, 22 May 2017 02:09:29 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E72F1A43; Mon, 22 May 2017 02:09:29 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M29SI5036453; Mon, 22 May 2017 02:09:28 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M29SAG036452; Mon, 22 May 2017 02:09:28 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705220209.v4M29SAG036452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 22 May 2017 02:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318604 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 02:09:29 -0000 Author: sephe Date: Mon May 22 02:09:27 2017 New Revision: 318604 URL: https://svnweb.freebsd.org/changeset/base/318604 Log: MFC 318512 net/vlan: Revert 305177 Miss read the parentheses. Reported by: oleg@ Reviewed by: hps@ Sponsored by: Microsoft Modified: stable/11/sys/net/ethernet.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ethernet.h ============================================================================== --- stable/11/sys/net/ethernet.h Mon May 22 01:10:12 2017 (r318603) +++ stable/11/sys/net/ethernet.h Mon May 22 02:09:27 2017 (r318604) @@ -89,7 +89,7 @@ struct ether_vlan_header { #define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7) #define EVL_CFIOFTAG(tag) (((tag) >> 12) & 1) #define EVL_MAKETAG(vlid, pri, cfi) \ - ((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) + ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) /* * NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields. From owner-svn-src-all@freebsd.org Mon May 22 02:30:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 527E5D78F90; Mon, 22 May 2017 02:30:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA3B1596; Mon, 22 May 2017 02:30:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M2UGLJ044790; Mon, 22 May 2017 02:30:16 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M2UGPN044789; Mon, 22 May 2017 02:30:16 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705220230.v4M2UGPN044789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 22 May 2017 02:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318605 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 02:30:17 -0000 Author: sephe Date: Mon May 22 02:30:15 2017 New Revision: 318605 URL: https://svnweb.freebsd.org/changeset/base/318605 Log: MFC 318512 net/vlan: Revert 305177 Miss read the parentheses. Reported by: oleg@ Reviewed by: hps@ Sponsored by: Microsoft Modified: stable/10/sys/net/if_vlan_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_vlan_var.h ============================================================================== --- stable/10/sys/net/if_vlan_var.h Mon May 22 02:09:27 2017 (r318604) +++ stable/10/sys/net/if_vlan_var.h Mon May 22 02:30:15 2017 (r318605) @@ -46,7 +46,7 @@ struct ether_vlan_header { #define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7) #define EVL_CFIOFTAG(tag) (((tag) >> 12) & 1) #define EVL_MAKETAG(vlid, pri, cfi) \ - ((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) + ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) /* Set the VLAN ID in an mbuf packet header non-destructively. */ #define EVL_APPLY_VLID(m, vlid) \ From owner-svn-src-all@freebsd.org Mon May 22 03:01:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFAFFD77733; Mon, 22 May 2017 03:01:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9021F12D2; Mon, 22 May 2017 03:01:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M31ZTk059140; Mon, 22 May 2017 03:01:35 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M31ZiU059139; Mon, 22 May 2017 03:01:35 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705220301.v4M31ZiU059139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 22 May 2017 03:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318606 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 03:01:36 -0000 Author: cy Date: Mon May 22 03:01:35 2017 New Revision: 318606 URL: https://svnweb.freebsd.org/changeset/base/318606 Log: Refactor & compact struct i6addr_t #ifdef: remove redundant structure definintion when USE_INET6 is false. MFC after: 1 week Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil.h Mon May 22 02:30:15 2017 (r318605) +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Mon May 22 03:01:35 2017 (r318606) @@ -143,11 +143,12 @@ typedef int (* lookupfunc_t) __P((struct * i6addr is used as a container for both IPv4 and IPv6 addresses, as well * as other types of objects, depending on its qualifier. */ -#ifdef USE_INET6 typedef union i6addr { u_32_t i6[4]; struct in_addr in4; +#ifdef USE_INET6 struct in6_addr in6; +#endif void *vptr[2]; lookupfunc_t lptr[2]; struct { @@ -156,19 +157,6 @@ typedef union i6addr { int name; } i6un; } i6addr_t; -#else -typedef union i6addr { - u_32_t i6[4]; - struct in_addr in4; - void *vptr[2]; - lookupfunc_t lptr[2]; - struct { - u_short type; - u_short subtype; - int name; - } i6un; -} i6addr_t; -#endif #define in4_addr in4.s_addr #define iplookupnum i6[1] From owner-svn-src-all@freebsd.org Mon May 22 06:03:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F02CD78334; Mon, 22 May 2017 06:03:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 507E71E44; Mon, 22 May 2017 06:03:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M63pDU034067; Mon, 22 May 2017 06:03:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M63pIr034066; Mon, 22 May 2017 06:03:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220603.v4M63pIr034066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318607 - stable/11/usr.sbin/rpcbind X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:03:52 -0000 Author: ngie Date: Mon May 22 06:03:51 2017 New Revision: 318607 URL: https://svnweb.freebsd.org/changeset/base/318607 Log: MFC r317154: Print out the signal number on exit in terminate(..) if WARMSTART is compiled into rpcbind. The signal number can provide helpful diagnostic info. Obtained from: Isilon OneFS Modified: stable/11/usr.sbin/rpcbind/rpcbind.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- stable/11/usr.sbin/rpcbind/rpcbind.c Mon May 22 03:01:35 2017 (r318606) +++ stable/11/usr.sbin/rpcbind/rpcbind.c Mon May 22 06:03:51 2017 (r318607) @@ -757,12 +757,13 @@ rbllist_add(rpcprog_t prog, rpcvers_t ve * Catch the signal and die */ static void -terminate(int dummy __unused) +terminate(int signum __unused) { close(rpcbindlockfd); #ifdef WARMSTART syslog(LOG_ERR, - "rpcbind terminating on signal. Restart with \"rpcbind -w\""); + "rpcbind terminating on signal %d. Restart with \"rpcbind -w\"", + signum); write_warmstart(); /* Dump yourself */ #endif exit(2); From owner-svn-src-all@freebsd.org Mon May 22 06:04:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8503BD7838A; Mon, 22 May 2017 06:04:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54EA41F82; Mon, 22 May 2017 06:04:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M64KGf034134; Mon, 22 May 2017 06:04:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M64KBH034133; Mon, 22 May 2017 06:04:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220604.v4M64KBH034133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318608 - stable/10/usr.sbin/rpcbind X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:04:21 -0000 Author: ngie Date: Mon May 22 06:04:20 2017 New Revision: 318608 URL: https://svnweb.freebsd.org/changeset/base/318608 Log: MFC r317154: Print out the signal number on exit in terminate(..) if WARMSTART is compiled into rpcbind. The signal number can provide helpful diagnostic info. Obtained from: Isilon OneFS Modified: stable/10/usr.sbin/rpcbind/rpcbind.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- stable/10/usr.sbin/rpcbind/rpcbind.c Mon May 22 06:03:51 2017 (r318607) +++ stable/10/usr.sbin/rpcbind/rpcbind.c Mon May 22 06:04:20 2017 (r318608) @@ -755,12 +755,13 @@ rbllist_add(rpcprog_t prog, rpcvers_t ve * Catch the signal and die */ static void -terminate(int dummy __unused) +terminate(int signum __unused) { close(rpcbindlockfd); #ifdef WARMSTART syslog(LOG_ERR, - "rpcbind terminating on signal. Restart with \"rpcbind -w\""); + "rpcbind terminating on signal %d. Restart with \"rpcbind -w\"", + signum); write_warmstart(); /* Dump yourself */ #endif exit(2); From owner-svn-src-all@freebsd.org Mon May 22 06:05:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F4C7D78461; Mon, 22 May 2017 06:05:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF42B10FB; Mon, 22 May 2017 06:05:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M65Er3034253; Mon, 22 May 2017 06:05:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M65Ebd034252; Mon, 22 May 2017 06:05:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220605.v4M65Ebd034252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318609 - stable/10/usr.bin/which X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:05:16 -0000 Author: ngie Date: Mon May 22 06:05:14 2017 New Revision: 318609 URL: https://svnweb.freebsd.org/changeset/base/318609 Log: MFC r317160: Clean up trailing whitespace No functional changes Modified: stable/10/usr.bin/which/which.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/which/which.c ============================================================================== --- stable/10/usr.bin/which/which.c Mon May 22 06:04:20 2017 (r318608) +++ stable/10/usr.bin/which/which.c Mon May 22 06:05:14 2017 (r318609) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); static void usage(void); static int print_matches(char *, char *); - + static int silent; static int allpaths; @@ -81,7 +81,7 @@ main(int argc, char **argv) while (argc > 0) { memcpy(path, p, pathlen); - + if (strlen(*argv) >= FILENAME_MAX || print_matches(path, *argv) == -1) status = EXIT_FAILURE; From owner-svn-src-all@freebsd.org Mon May 22 06:05:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B937DD784E7; Mon, 22 May 2017 06:05:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 871491292; Mon, 22 May 2017 06:05:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M65ZVZ034311; Mon, 22 May 2017 06:05:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M65ZwQ034310; Mon, 22 May 2017 06:05:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220605.v4M65ZwQ034310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318610 - stable/11/usr.bin/which X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:05:36 -0000 Author: ngie Date: Mon May 22 06:05:35 2017 New Revision: 318610 URL: https://svnweb.freebsd.org/changeset/base/318610 Log: MFC r317160: Clean up trailing whitespace No functional changes Modified: stable/11/usr.bin/which/which.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/which/which.c ============================================================================== --- stable/11/usr.bin/which/which.c Mon May 22 06:05:14 2017 (r318609) +++ stable/11/usr.bin/which/which.c Mon May 22 06:05:35 2017 (r318610) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); static void usage(void); static int print_matches(char *, char *); - + static int silent; static int allpaths; @@ -81,7 +81,7 @@ main(int argc, char **argv) while (argc > 0) { memcpy(path, p, pathlen); - + if (strlen(*argv) >= FILENAME_MAX || print_matches(path, *argv) == -1) status = EXIT_FAILURE; From owner-svn-src-all@freebsd.org Mon May 22 06:06:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F27D1D785B3; Mon, 22 May 2017 06:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF40E141A; Mon, 22 May 2017 06:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M66mdH034436; Mon, 22 May 2017 06:06:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M66mVH034435; Mon, 22 May 2017 06:06:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220606.v4M66mVH034435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318611 - stable/10/share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:06:50 -0000 Author: ngie Date: Mon May 22 06:06:48 2017 New Revision: 318611 URL: https://svnweb.freebsd.org/changeset/base/318611 Log: MFC r315793: intro(3): fix markup - Use `Em` with `.It` macro when referring to other libraries, instead of `Xr`. - Use `.Em` instead of `.Xr` when referring to libraries. - Remove commented out lines. Modified: stable/10/share/man/man3/intro.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man3/intro.3 ============================================================================== --- stable/10/share/man/man3/intro.3 Mon May 22 06:05:35 2017 (r318610) +++ stable/10/share/man/man3/intro.3 Mon May 22 06:06:48 2017 (r318611) @@ -32,7 +32,7 @@ .\" @(#)intro.3 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd March 22, 2017 .Dt INTRO 3 .Os .Sh NAME @@ -44,26 +44,16 @@ library functions, their error returns a common definitions and concepts. Most of these functions are available from the C library, .Em libc . -.\" (see -.\" .Xr libc 3 ) . Other libraries, such as the math library, .Em libm , must be indicated at compile time with the .Fl l option of the compiler. -.\" .Pp -.\" A subset of the -.\" .Xr libc functions -.\" are available from Fortran; -.\" they are described separately in -.\" .Xr intro 3f . .Pp The various libraries (followed by the loader flag): .Bl -tag -width "libc (-lc)" -.It Xr libc Pq Fl l Ns Ar c +.It Em libc Pq Fl l Ns Ar c Standard C library functions. -.\" (See -.\" .Xr libc 3 . ) When using the C compiler .Xr cc 1 , it is not necessary @@ -71,8 +61,8 @@ to supply the loader flag .Fl l Ns Ar c for these functions. There are several `libraries' or groups of functions included inside of -.Xr libc : -the standard +.Em libc +: the standard .Tn I/O routines, database routines, @@ -81,12 +71,12 @@ string operators, character tests and character operators, des encryption routines, storage allocation, time functions, signal handling and more. -.It Xr libcurses Pq Fl l Ns Ar curses Fl l Ns Ar termcap +.It Em libcurses Pq Fl l Ns Ar curses Fl l Ns Ar termcap Terminal independent screen management routines for two dimensional non-bitmap display terminals. (See .Xr ncurses 3 . ) -.It Xr libcompat Pq Fl l Ns Ar compat +.It Em libcompat Pq Fl l Ns Ar compat Functions which are obsolete but are available for compatibility with .Bx 4.3 . In particular, @@ -96,45 +86,30 @@ have been included for source code compa Use of these routines should, for the most part, be avoided. The manual page entry for each compatibility routine indicates the proper interface to use. -.It Xr libkvm Pq Fl l Ns Ar kvm +.It Em libkvm Pq Fl l Ns Ar kvm Functions used to access kernel memory are in this library. They can be used against both a running system and a crash dump. (See .Xr kvm 3 . ) -.It Xr libl Pq Fl l Ns Ar l +.It Em libl Pq Fl l Ns Ar l The library for .Xr lex 1 . -.\" .It Xr libln -.It Xr libm Pq Fl l Ns Ar m +.It Em libm Pq Fl l Ns Ar m The math library, .Em libm . The math library is loaded as needed by the Pascal compiler, -.\" .Xr pc 1 , but not by the C compiler which requires the .Fl l Ns Ar m flag. (See .Xr math 3 . ) -.It Xr libmp Pq Fl l Ns Ar mp -.\" .It Xr libom -.\" Old math library. -.\" .It Xr libplot Pq Fl l Ns Ar plot -.\" Device independent plotting functions. -.\" (See -.\" .Xr plot 3 . ) -.\" .It Xr libplotf77 Pq Fl l Ns Ar plotf77 -.\" The device independent plotting functions for fortran. -.\" (See -.\" .Xr plot 3 . ) -.\" .It Xr libresolv Pq Fl l Ns Ar resolv -.\" Routines for network address resolution. -.It Xr libtermcap Pq Fl l Ns Ar termcap +.It Em libmp Pq Fl l Ns Ar mp +.It Em libtermcap Pq Fl l Ns Ar termcap The terminal independent operation library package. (See .Xr termcap 3 . ) -.\" .It libvt0.a -.It Xr liby Pq Fl l Ns Ar y +.It Em liby Pq Fl l Ns Ar y The library for .Xr yacc 1 . .El @@ -150,17 +125,12 @@ the math library the math library compiled for profiling .El .Sh SEE ALSO -.\" .Xr libc 3 , .Xr cc 1 , .Xr ld 1 , .Xr nm 1 , .Xr intro 2 , .Xr math 3 , .Xr stdio 3 -.\" .Sh LIST OF FUNCTIONS -.\" .Bl -column "strncasecmpxxx" "system" -.\" .Sy Name Description -.\" .El .Sh HISTORY An .Nm From owner-svn-src-all@freebsd.org Mon May 22 06:07:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2983D7861E; Mon, 22 May 2017 06:07:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9949F14F3; Mon, 22 May 2017 06:07:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M67AZ7034495; Mon, 22 May 2017 06:07:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M67ANc034494; Mon, 22 May 2017 06:07:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220607.v4M67ANc034494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318612 - stable/11/share/man/man3 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:07:13 -0000 Author: ngie Date: Mon May 22 06:07:09 2017 New Revision: 318612 URL: https://svnweb.freebsd.org/changeset/base/318612 Log: MFC r315793: intro(3): fix markup - Use `Em` with `.It` macro when referring to other libraries, instead of `Xr`. - Use `.Em` instead of `.Xr` when referring to libraries. - Remove commented out lines. Modified: stable/11/share/man/man3/intro.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man3/intro.3 ============================================================================== --- stable/11/share/man/man3/intro.3 Mon May 22 06:06:48 2017 (r318611) +++ stable/11/share/man/man3/intro.3 Mon May 22 06:07:09 2017 (r318612) @@ -28,7 +28,7 @@ .\" @(#)intro.3 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd March 22, 2017 .Dt INTRO 3 .Os .Sh NAME @@ -40,26 +40,16 @@ library functions, their error returns a common definitions and concepts. Most of these functions are available from the C library, .Em libc . -.\" (see -.\" .Xr libc 3 ) . Other libraries, such as the math library, .Em libm , must be indicated at compile time with the .Fl l option of the compiler. -.\" .Pp -.\" A subset of the -.\" .Xr libc functions -.\" are available from Fortran; -.\" they are described separately in -.\" .Xr intro 3f . .Pp The various libraries (followed by the loader flag): .Bl -tag -width "libc (-lc)" -.It Xr libc Pq Fl l Ns Ar c +.It Em libc Pq Fl l Ns Ar c Standard C library functions. -.\" (See -.\" .Xr libc 3 . ) When using the C compiler .Xr cc 1 , it is not necessary @@ -67,8 +57,8 @@ to supply the loader flag .Fl l Ns Ar c for these functions. There are several `libraries' or groups of functions included inside of -.Xr libc : -the standard +.Em libc +: the standard .Tn I/O routines, database routines, @@ -77,12 +67,12 @@ string operators, character tests and character operators, des encryption routines, storage allocation, time functions, signal handling and more. -.It Xr libcurses Pq Fl l Ns Ar curses Fl l Ns Ar termcap +.It Em libcurses Pq Fl l Ns Ar curses Fl l Ns Ar termcap Terminal independent screen management routines for two dimensional non-bitmap display terminals. (See .Xr ncurses 3 . ) -.It Xr libcompat Pq Fl l Ns Ar compat +.It Em libcompat Pq Fl l Ns Ar compat Functions which are obsolete but are available for compatibility with .Bx 4.3 . In particular, @@ -92,45 +82,30 @@ have been included for source code compa Use of these routines should, for the most part, be avoided. The manual page entry for each compatibility routine indicates the proper interface to use. -.It Xr libkvm Pq Fl l Ns Ar kvm +.It Em libkvm Pq Fl l Ns Ar kvm Functions used to access kernel memory are in this library. They can be used against both a running system and a crash dump. (See .Xr kvm 3 . ) -.It Xr libl Pq Fl l Ns Ar l +.It Em libl Pq Fl l Ns Ar l The library for .Xr lex 1 . -.\" .It Xr libln -.It Xr libm Pq Fl l Ns Ar m +.It Em libm Pq Fl l Ns Ar m The math library, .Em libm . The math library is loaded as needed by the Pascal compiler, -.\" .Xr pc 1 , but not by the C compiler which requires the .Fl l Ns Ar m flag. (See .Xr math 3 . ) -.It Xr libmp Pq Fl l Ns Ar mp -.\" .It Xr libom -.\" Old math library. -.\" .It Xr libplot Pq Fl l Ns Ar plot -.\" Device independent plotting functions. -.\" (See -.\" .Xr plot 3 . ) -.\" .It Xr libplotf77 Pq Fl l Ns Ar plotf77 -.\" The device independent plotting functions for fortran. -.\" (See -.\" .Xr plot 3 . ) -.\" .It Xr libresolv Pq Fl l Ns Ar resolv -.\" Routines for network address resolution. -.It Xr libtermcap Pq Fl l Ns Ar termcap +.It Em libmp Pq Fl l Ns Ar mp +.It Em libtermcap Pq Fl l Ns Ar termcap The terminal independent operation library package. (See .Xr termcap 3 . ) -.\" .It libvt0.a -.It Xr liby Pq Fl l Ns Ar y +.It Em liby Pq Fl l Ns Ar y The library for .Xr yacc 1 . .El @@ -146,17 +121,12 @@ the math library the math library compiled for profiling .El .Sh SEE ALSO -.\" .Xr libc 3 , .Xr cc 1 , .Xr ld 1 , .Xr nm 1 , .Xr intro 2 , .Xr math 3 , .Xr stdio 3 -.\" .Sh LIST OF FUNCTIONS -.\" .Bl -column "strncasecmpxxx" "system" -.\" .Sy Name Description -.\" .El .Sh HISTORY An .Nm From owner-svn-src-all@freebsd.org Mon May 22 06:08:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CA89D786CA; Mon, 22 May 2017 06:08:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 683911717; Mon, 22 May 2017 06:08:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M68Jcl034645; Mon, 22 May 2017 06:08:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M68JNv034644; Mon, 22 May 2017 06:08:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220608.v4M68JNv034644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318613 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:08:20 -0000 Author: ngie Date: Mon May 22 06:08:19 2017 New Revision: 318613 URL: https://svnweb.freebsd.org/changeset/base/318613 Log: MFC r315766,r315768: r315766: Note that tools/build/options/makeman automatically generated src.conf(5) This (as a bonus) fixes mdoc warnings with src.conf(5) :).. r315768: Remove the .Pa portion I added to the .An macro in AUTHORS section That doesn't work (mandoc complains about the macro being empty). That's what I get for being clever and not verifying before committing things again *sigh*. Partyhat to: ngie Modified: stable/11/tools/build/options/makeman Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/makeman ============================================================================== --- stable/11/tools/build/options/makeman Mon May 22 06:07:09 2017 (r318612) +++ stable/11/tools/build/options/makeman Mon May 22 06:08:19 2017 (r318613) @@ -341,7 +341,8 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . EOF } From owner-svn-src-all@freebsd.org Mon May 22 06:08:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BC0BD786D1; Mon, 22 May 2017 06:08:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBAA31719; Mon, 22 May 2017 06:08:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M68K7x034691; Mon, 22 May 2017 06:08:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M68Keu034690; Mon, 22 May 2017 06:08:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220608.v4M68Keu034690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318614 - stable/10/tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:08:22 -0000 Author: ngie Date: Mon May 22 06:08:20 2017 New Revision: 318614 URL: https://svnweb.freebsd.org/changeset/base/318614 Log: MFC r315766,r315768: r315766: Note that tools/build/options/makeman automatically generated src.conf(5) This (as a bonus) fixes mdoc warnings with src.conf(5) :).. r315768: Remove the .Pa portion I added to the .An macro in AUTHORS section That doesn't work (mandoc complains about the macro being empty). That's what I get for being clever and not verifying before committing things again *sigh*. Partyhat to: ngie Modified: stable/10/tools/build/options/makeman Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/options/makeman ============================================================================== --- stable/10/tools/build/options/makeman Mon May 22 06:08:19 2017 (r318613) +++ stable/10/tools/build/options/makeman Mon May 22 06:08:20 2017 (r318614) @@ -299,7 +299,8 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . EOF } From owner-svn-src-all@freebsd.org Mon May 22 06:09:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8AEED787F9; Mon, 22 May 2017 06:09:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FA3119E8; Mon, 22 May 2017 06:09:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M69mQl034785; Mon, 22 May 2017 06:09:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M69mKQ034784; Mon, 22 May 2017 06:09:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220609.v4M69mKQ034784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318615 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:09:49 -0000 Author: ngie Date: Mon May 22 06:09:47 2017 New Revision: 318615 URL: https://svnweb.freebsd.org/changeset/base/318615 Log: MFC r315766,r315768: r315766: Note that tools/build/options/makeman automatically generated src.conf(5) This (as a bonus) fixes mdoc warnings with src.conf(5) :).. r315768: Remove the .Pa portion I added to the .An macro in AUTHORS section That doesn't work (mandoc complains about the macro being empty). That's what I get for being clever and not verifying before committing things again *sigh*. Partyhat to: ngie Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Mon May 22 06:08:20 2017 (r318614) +++ stable/10/share/man/man5/src.conf.5 Mon May 22 06:09:47 2017 (r318615) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 291805 2015-12-04 18:32:39Z bdrewery +.\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 06:08:20Z ngie .\" $FreeBSD$ -.Dd January 6, 2017 +.Dd May 21, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1201,4 +1201,5 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . From owner-svn-src-all@freebsd.org Mon May 22 06:10:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1548AD78884; Mon, 22 May 2017 06:10:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA56C1B6F; Mon, 22 May 2017 06:10:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6AkhL035631; Mon, 22 May 2017 06:10:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6Akbv035630; Mon, 22 May 2017 06:10:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220610.v4M6Akbv035630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318616 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:10:48 -0000 Author: ngie Date: Mon May 22 06:10:46 2017 New Revision: 318616 URL: https://svnweb.freebsd.org/changeset/base/318616 Log: Revert r318615 to correct commit message Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Mon May 22 06:09:47 2017 (r318615) +++ stable/10/share/man/man5/src.conf.5 Mon May 22 06:10:46 2017 (r318616) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 06:08:20Z ngie +.\" from FreeBSD: stable/10/tools/build/options/makeman 291805 2015-12-04 18:32:39Z bdrewery .\" $FreeBSD$ -.Dd May 21, 2017 +.Dd January 6, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1201,5 +1201,4 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated by -.An tools/build/options/makeman . +This manual page was autogenerated. From owner-svn-src-all@freebsd.org Mon May 22 06:12:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61BE1D78AE1; Mon, 22 May 2017 06:12:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CCD31F5F; Mon, 22 May 2017 06:12:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6CV6m038562; Mon, 22 May 2017 06:12:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6CVjx038561; Mon, 22 May 2017 06:12:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220612.v4M6CVjx038561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318617 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:12:32 -0000 Author: ngie Date: Mon May 22 06:12:30 2017 New Revision: 318617 URL: https://svnweb.freebsd.org/changeset/base/318617 Log: Regenerate src.conf(5) per r318614 Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Mon May 22 06:10:46 2017 (r318616) +++ stable/10/share/man/man5/src.conf.5 Mon May 22 06:12:30 2017 (r318617) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 291805 2015-12-04 18:32:39Z bdrewery +.\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 06:08:20Z ngie .\" $FreeBSD$ -.Dd January 6, 2017 +.Dd May 21, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1201,4 +1201,5 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . From owner-svn-src-all@freebsd.org Mon May 22 06:15:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1CA1D78C0D; Mon, 22 May 2017 06:15:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B02501113; Mon, 22 May 2017 06:15:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6FoIW038776; Mon, 22 May 2017 06:15:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6Foko038774; Mon, 22 May 2017 06:15:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220615.v4M6Foko038774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318618 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:15:52 -0000 Author: ngie Date: Mon May 22 06:15:50 2017 New Revision: 318618 URL: https://svnweb.freebsd.org/changeset/base/318618 Log: MFC r311135: Add documentation for MK_EFI added in r307243 Added: stable/11/tools/build/options/WITHOUT_EFI - copied unchanged from r311135, head/tools/build/options/WITHOUT_EFI stable/11/tools/build/options/WITH_EFI - copied unchanged from r311135, head/tools/build/options/WITH_EFI Modified: Directory Properties: stable/11/ (props changed) Copied: stable/11/tools/build/options/WITHOUT_EFI (from r311135, head/tools/build/options/WITHOUT_EFI) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITHOUT_EFI Mon May 22 06:15:50 2017 (r318618, copy of r311135, head/tools/build/options/WITHOUT_EFI) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set not to build +.Xr efivar 3 +and +.Xr efivar 8 . Copied: stable/11/tools/build/options/WITH_EFI (from r311135, head/tools/build/options/WITH_EFI) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITH_EFI Mon May 22 06:15:50 2017 (r318618, copy of r311135, head/tools/build/options/WITH_EFI) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to build +.Xr efivar 3 +and +.Xr efivar 8 . From owner-svn-src-all@freebsd.org Mon May 22 06:17:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08295D78D23; Mon, 22 May 2017 06:17:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD2171360; Mon, 22 May 2017 06:17:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6HE8u038872; Mon, 22 May 2017 06:17:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6HEpi038871; Mon, 22 May 2017 06:17:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220617.v4M6HEpi038871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318619 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:17:16 -0000 Author: ngie Date: Mon May 22 06:17:14 2017 New Revision: 318619 URL: https://svnweb.freebsd.org/changeset/base/318619 Log: MFC r311135: Add documentation for MK_EFI added in r307243 Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Mon May 22 06:15:50 2017 (r318618) +++ stable/11/share/man/man5/src.conf.5 Mon May 22 06:17:14 2017 (r318619) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 18, 2017 +.Dd May 21, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -557,6 +557,22 @@ Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. +.It Va WITHOUT_EFI +Set not to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_EFI +Set to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_EISA Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY @@ -1476,4 +1492,5 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . From owner-svn-src-all@freebsd.org Mon May 22 06:18:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13F42D78E2D; Mon, 22 May 2017 06:18:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 211AD154D; Mon, 22 May 2017 06:18:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6IF0r038964; Mon, 22 May 2017 06:18:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6IFPd038963; Mon, 22 May 2017 06:18:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220618.v4M6IFPd038963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318620 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:18:18 -0000 Author: ngie Date: Mon May 22 06:18:15 2017 New Revision: 318620 URL: https://svnweb.freebsd.org/changeset/base/318620 Log: Revert commit again to correct it Obviously my brain's on autopilot tonight Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Mon May 22 06:17:14 2017 (r318619) +++ stable/11/share/man/man5/src.conf.5 Mon May 22 06:18:15 2017 (r318620) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 21, 2017 +.Dd May 18, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -557,22 +557,6 @@ Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. -.It Va WITHOUT_EFI -Set not to build -.Xr efivar 3 -and -.Xr efivar 8 . -.Pp -It is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_EFI -Set to build -.Xr efivar 3 -and -.Xr efivar 8 . -.Pp -It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_EISA Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY @@ -1492,5 +1476,4 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated by -.An tools/build/options/makeman . +This manual page was autogenerated. From owner-svn-src-all@freebsd.org Mon May 22 06:19:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D02CD78F71; Mon, 22 May 2017 06:19:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BCB417CC; Mon, 22 May 2017 06:19:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6JRQQ039064; Mon, 22 May 2017 06:19:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6JRAV039063; Mon, 22 May 2017 06:19:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220619.v4M6JRAV039063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318621 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:19:28 -0000 Author: ngie Date: Mon May 22 06:19:27 2017 New Revision: 318621 URL: https://svnweb.freebsd.org/changeset/base/318621 Log: Regenerate src.conf(5) Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Mon May 22 06:18:15 2017 (r318620) +++ stable/11/share/man/man5/src.conf.5 Mon May 22 06:19:27 2017 (r318621) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 18, 2017 +.Dd May 21, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -557,6 +557,22 @@ Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. +.It Va WITHOUT_EFI +Set not to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_EFI +Set to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_EISA Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY @@ -1476,4 +1492,5 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . From owner-svn-src-all@freebsd.org Mon May 22 06:20:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97D66D78044; Mon, 22 May 2017 06:20:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BB601952; Mon, 22 May 2017 06:20:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6KNai039209; Mon, 22 May 2017 06:20:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6KNiN039205; Mon, 22 May 2017 06:20:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220620.v4M6KNiN039205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318622 - in stable/11: sbin/mount sbin/mount_cd9660 share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:20:24 -0000 Author: ngie Date: Mon May 22 06:20:22 2017 New Revision: 318622 URL: https://svnweb.freebsd.org/changeset/base/318622 Log: MFC r315775: Add a post-humous manpage for cd9660(5), the ISO-9660 file system Describe (briefly) how to compile the filesystem into the kernel and load as a module. Reference cd9660(5) in mount(8) and mount_cd9660(8). Added: stable/11/share/man/man5/cd9660.5 - copied unchanged from r315775, head/share/man/man5/cd9660.5 Modified: stable/11/sbin/mount/mount.8 stable/11/sbin/mount_cd9660/mount_cd9660.8 stable/11/share/man/man5/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mount/mount.8 ============================================================================== --- stable/11/sbin/mount/mount.8 Mon May 22 06:19:27 2017 (r318621) +++ stable/11/sbin/mount/mount.8 Mon May 22 06:20:22 2017 (r318622) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd October 13, 2015 +.Dd March 22, 2017 .Dt MOUNT 8 .Os .Sh NAME @@ -543,6 +543,7 @@ support for a particular file system mig .Xr nmount 2 , .Xr acl 3 , .Xr mac 4 , +.Xr cd9660 5 , .Xr devfs 5 , .Xr ext2fs 5 , .Xr fstab 5 , Modified: stable/11/sbin/mount_cd9660/mount_cd9660.8 ============================================================================== --- stable/11/sbin/mount_cd9660/mount_cd9660.8 Mon May 22 06:19:27 2017 (r318621) +++ stable/11/sbin/mount_cd9660/mount_cd9660.8 Mon May 22 06:20:22 2017 (r318622) @@ -32,7 +32,7 @@ .\" @(#)mount_cd9660.8 8.3 (Berkeley) 3/27/94 .\" $FreeBSD$ .\" -.Dd March 5, 2013 +.Dd March 22, 2017 .Dt MOUNT_CD9660 8 .Os .Sh NAME @@ -138,6 +138,7 @@ The following command can be used to mou .Xr cdcontrol 1 , .Xr mount 2 , .Xr unmount 2 , +.Xr cd9660 5 , .Xr fstab 5 , .Xr mount 8 .Sh HISTORY Modified: stable/11/share/man/man5/Makefile ============================================================================== --- stable/11/share/man/man5/Makefile Mon May 22 06:19:27 2017 (r318621) +++ stable/11/share/man/man5/Makefile Mon May 22 06:20:22 2017 (r318622) @@ -10,6 +10,7 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ ${_boot.config.5} \ + cd9660.5 \ core.5 \ devfs.5 \ devfs.conf.5 \ Copied: stable/11/share/man/man5/cd9660.5 (from r315775, head/share/man/man5/cd9660.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man5/cd9660.5 Mon May 22 06:20:22 2017 (r318622, copy of r315775, head/share/man/man5/cd9660.5) @@ -0,0 +1,82 @@ +.\" +.\" Copyright (c) 2017 Ngie Cooper +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission +.\" +.\" THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 22, 2017 +.Dt CD9660 5 +.Os +.Sh NAME +.Nm cd9660 +.Nd "ISO-9660 file system" +.Sh SYNOPSIS +To link into the kernel: +.Bd -ragged -offset indent +.Cd "options CD9660" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +cd9660_load="YES" +.Sh DESCRIPTION +The +.Nm +driver will permit the +.Fx +kernel to access the +.Tn cd9660 +file system. +.Sh EXAMPLES +To mount a +.Nm +volume located on +.Pa /dev/cd0 : +.Pp +.Dl "mount -t cd9660 /dev/cd0 /mnt" +.Sh SEE ALSO +.Xr nmount 2 , +.Xr unmount 2 , +.Xr fstab 5 , +.Xr mount 8 , +.Xr mount_cd9660 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 4.4 Lite +.Sh AUTHORS +.An -nosplit +The +.Nm +kernel implementation was originally written by +.An Pace Willisson Aq Mt pace@blitz.com +and +.An Atsushi Murai Aq Mt amurai@spec.co.jp . +.Pp +This manual page was written by +.An Ngie Cooper Aq Mt ngie@FreeBSD.org . From owner-svn-src-all@freebsd.org Mon May 22 06:21:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60E8CD780B3; Mon, 22 May 2017 06:21:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2119F1AE5; Mon, 22 May 2017 06:21:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6KxaT042150; Mon, 22 May 2017 06:20:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6KwLR042144; Mon, 22 May 2017 06:20:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220620.v4M6KwLR042144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318623 - in stable/10: sbin/mount sbin/mount_cd9660 share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:21:00 -0000 Author: ngie Date: Mon May 22 06:20:58 2017 New Revision: 318623 URL: https://svnweb.freebsd.org/changeset/base/318623 Log: MFC r315775: Add a post-humous manpage for cd9660(5), the ISO-9660 file system Describe (briefly) how to compile the filesystem into the kernel and load as a module. Reference cd9660(5) in mount(8) and mount_cd9660(8). Added: stable/10/share/man/man5/cd9660.5 - copied unchanged from r315775, head/share/man/man5/cd9660.5 Modified: stable/10/sbin/mount/mount.8 stable/10/sbin/mount_cd9660/mount_cd9660.8 stable/10/share/man/man5/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount/mount.8 ============================================================================== --- stable/10/sbin/mount/mount.8 Mon May 22 06:20:22 2017 (r318622) +++ stable/10/sbin/mount/mount.8 Mon May 22 06:20:58 2017 (r318623) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd November 1, 2015 +.Dd March 22, 2017 .Dt MOUNT 8 .Os .Sh NAME @@ -544,6 +544,7 @@ support for a particular file system mig .Xr nmount 2 , .Xr acl 3 , .Xr mac 4 , +.Xr cd9660 5 , .Xr devfs 5 , .Xr ext2fs 5 , .Xr fstab 5 , Modified: stable/10/sbin/mount_cd9660/mount_cd9660.8 ============================================================================== --- stable/10/sbin/mount_cd9660/mount_cd9660.8 Mon May 22 06:20:22 2017 (r318622) +++ stable/10/sbin/mount_cd9660/mount_cd9660.8 Mon May 22 06:20:58 2017 (r318623) @@ -32,7 +32,7 @@ .\" @(#)mount_cd9660.8 8.3 (Berkeley) 3/27/94 .\" $FreeBSD$ .\" -.Dd March 5, 2013 +.Dd March 22, 2017 .Dt MOUNT_CD9660 8 .Os .Sh NAME @@ -138,6 +138,7 @@ The following command can be used to mou .Xr cdcontrol 1 , .Xr mount 2 , .Xr unmount 2 , +.Xr cd9660 5 , .Xr fstab 5 , .Xr mount 8 .Sh HISTORY Modified: stable/10/share/man/man5/Makefile ============================================================================== --- stable/10/share/man/man5/Makefile Mon May 22 06:20:22 2017 (r318622) +++ stable/10/share/man/man5/Makefile Mon May 22 06:20:58 2017 (r318623) @@ -8,6 +8,7 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ ${_boot.config.5} \ + cd9660.5 \ core.5 \ devfs.5 \ devfs.conf.5 \ Copied: stable/10/share/man/man5/cd9660.5 (from r315775, head/share/man/man5/cd9660.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man5/cd9660.5 Mon May 22 06:20:58 2017 (r318623, copy of r315775, head/share/man/man5/cd9660.5) @@ -0,0 +1,82 @@ +.\" +.\" Copyright (c) 2017 Ngie Cooper +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission +.\" +.\" THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 22, 2017 +.Dt CD9660 5 +.Os +.Sh NAME +.Nm cd9660 +.Nd "ISO-9660 file system" +.Sh SYNOPSIS +To link into the kernel: +.Bd -ragged -offset indent +.Cd "options CD9660" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +cd9660_load="YES" +.Sh DESCRIPTION +The +.Nm +driver will permit the +.Fx +kernel to access the +.Tn cd9660 +file system. +.Sh EXAMPLES +To mount a +.Nm +volume located on +.Pa /dev/cd0 : +.Pp +.Dl "mount -t cd9660 /dev/cd0 /mnt" +.Sh SEE ALSO +.Xr nmount 2 , +.Xr unmount 2 , +.Xr fstab 5 , +.Xr mount 8 , +.Xr mount_cd9660 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 4.4 Lite +.Sh AUTHORS +.An -nosplit +The +.Nm +kernel implementation was originally written by +.An Pace Willisson Aq Mt pace@blitz.com +and +.An Atsushi Murai Aq Mt amurai@spec.co.jp . +.Pp +This manual page was written by +.An Ngie Cooper Aq Mt ngie@FreeBSD.org . From owner-svn-src-all@freebsd.org Mon May 22 06:24:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4AF5D78373; Mon, 22 May 2017 06:24:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F34A101E; Mon, 22 May 2017 06:24:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6OhP5043129; Mon, 22 May 2017 06:24:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6OhF4043128; Mon, 22 May 2017 06:24:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220624.v4M6OhF4043128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318624 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:24:44 -0000 Author: ngie Date: Mon May 22 06:24:43 2017 New Revision: 318624 URL: https://svnweb.freebsd.org/changeset/base/318624 Log: MFC r317594: usb(4): manpage cleanup 1. Wrap at <80 columns for readability when editing. Rewrap some lines prematurely wrapped to better fit in <80 columns and not waste vertical space. 2. Fix SEE ALSO sorting (sort by section first, then manpage name). 3. Tweak the compound device description slightly by adding soft stops via commas. Sponsored by Dell EMC Isilon Modified: stable/11/share/man/man4/usb.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/usb.4 ============================================================================== --- stable/11/share/man/man4/usb.4 Mon May 22 06:20:58 2017 (r318623) +++ stable/11/share/man/man4/usb.4 Mon May 22 06:24:43 2017 (r318624) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2013 +.Dd April 29, 2017 .Dt USB 4 .Os .Sh NAME @@ -78,8 +78,7 @@ bus. .Pp The .Nm uhub -device will always be present as it is needed for the -root hub. +device will always be present as it is needed for the root hub. .Sh INTRODUCTION TO USB The .Tn USB @@ -94,38 +93,34 @@ The most common USB speeds are: Each .Tn USB has a USB controller that is the master of the bus. -The physical communication is simplex which means the host controller only communicates with one USB device at a time. +The physical communication is simplex which means the host controller only +communicates with one USB device at a time. .Pp There can be up to 127 devices connected to an USB HUB tree. -The addresses are assigned -dynamically by the host when each device is attached to the bus. +The addresses are assigned dynamically by the host when each device is +attached to the bus. .Pp Within each device there can be up to 16 endpoints. -Each endpoint -is individually addressed and the addresses are static. +Each endpoint is individually addressed and the addresses are static. Each of these endpoints will communicate in one of four different modes: .Em control , isochronous , bulk , or .Em interrupt . A device always has at least one endpoint. -This endpoint has address 0 and is a control -endpoint and is used to give commands to and extract basic data, -such as descriptors, from the device. +This endpoint has address 0 and is a control endpoint and is used to give +commands to and extract basic data, such as descriptors, from the device. Each endpoint, except the control endpoint, is unidirectional. .Pp The endpoints in a device are grouped into interfaces. -An interface is a logical unit within a device; e.g.\& -a compound device with both a keyboard and a trackball would present -one interface for each. -An interface can sometimes be set into different modes, -called alternate settings, which affects how it operates. -Different alternate settings can have different endpoints -within it. +An interface is a logical unit within a device, e.g., a compound device with +both a keyboard and a trackball, would present one interface for each. +An interface can sometimes be set into different modes, called alternate +settings, which affects how it operates. +Different alternate settings can have different endpoints within it. .Pp A device may operate in different configurations. -Depending on the -configuration, the device may present different sets of endpoints -and interfaces. +Depending on the configuration, the device may present different sets of +endpoints and interfaces. .Pp The bus enumeration of the .Tn USB @@ -144,7 +139,6 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr axge 4 , @@ -166,8 +160,9 @@ specifications can be found at: .Xr uplcom 4 , .Xr urio 4 , .Xr uvscom 4 , -.Xr usbconfig 8 , .Xr xhci 4 +.Xr usbconfig 8 , +.Xr usbdi 9 , .Sh STANDARDS The .Nm From owner-svn-src-all@freebsd.org Mon May 22 06:26:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3967D7842A; Mon, 22 May 2017 06:26:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83850119E; Mon, 22 May 2017 06:26:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6QMBI043264; Mon, 22 May 2017 06:26:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6QMbZ043261; Mon, 22 May 2017 06:26:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220626.v4M6QMbZ043261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318625 - stable/11/sys/boot/efi/boot1 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:26:23 -0000 Author: ngie Date: Mon May 22 06:26:22 2017 New Revision: 318625 URL: https://svnweb.freebsd.org/changeset/base/318625 Log: MFC r316103: Remove redundant declarations They're already defined in libstand.h Modified: stable/11/sys/boot/efi/boot1/boot1.c stable/11/sys/boot/efi/boot1/boot_module.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/efi/boot1/boot1.c ============================================================================== --- stable/11/sys/boot/efi/boot1/boot1.c Mon May 22 06:24:43 2017 (r318624) +++ stable/11/sys/boot/efi/boot1/boot1.c Mon May 22 06:26:22 2017 (r318625) @@ -47,7 +47,6 @@ static const boot_module_t *boot_modules /* The initial number of handles used to query EFI for partitions. */ #define NUM_HANDLES_INIT 24 -void putchar(int c); EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab); EFI_SYSTEM_TABLE *systab; Modified: stable/11/sys/boot/efi/boot1/boot_module.h ============================================================================== --- stable/11/sys/boot/efi/boot1/boot_module.h Mon May 22 06:24:43 2017 (r318624) +++ stable/11/sys/boot/efi/boot1/boot_module.h Mon May 22 06:26:22 2017 (r318625) @@ -105,8 +105,6 @@ extern const boot_module_t zfs_module; /* Functions available to modules. */ extern void add_device(dev_info_t **devinfop, dev_info_t *devinfo); -extern void panic(const char *fmt, ...) __dead2; -extern int printf(const char *fmt, ...); extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); extern EFI_SYSTEM_TABLE *systab; From owner-svn-src-all@freebsd.org Mon May 22 06:29:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD9C3D7857A; Mon, 22 May 2017 06:29:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D958144D; Mon, 22 May 2017 06:29:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6TKmI043451; Mon, 22 May 2017 06:29:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6TK5O043449; Mon, 22 May 2017 06:29:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220629.v4M6TK5O043449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318626 - stable/10/sys/boot/efi/boot1 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:29:21 -0000 Author: ngie Date: Mon May 22 06:29:20 2017 New Revision: 318626 URL: https://svnweb.freebsd.org/changeset/base/318626 Log: MFC r316103: Remove redundant declarations They're already defined in libstand.h Modified: stable/10/sys/boot/efi/boot1/boot1.c stable/10/sys/boot/efi/boot1/boot_module.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/efi/boot1/boot1.c ============================================================================== --- stable/10/sys/boot/efi/boot1/boot1.c Mon May 22 06:26:22 2017 (r318625) +++ stable/10/sys/boot/efi/boot1/boot1.c Mon May 22 06:29:20 2017 (r318626) @@ -47,7 +47,6 @@ static const boot_module_t *boot_modules /* The initial number of handles used to query EFI for partitions. */ #define NUM_HANDLES_INIT 24 -void putchar(int c); EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab); EFI_SYSTEM_TABLE *systab; Modified: stable/10/sys/boot/efi/boot1/boot_module.h ============================================================================== --- stable/10/sys/boot/efi/boot1/boot_module.h Mon May 22 06:26:22 2017 (r318625) +++ stable/10/sys/boot/efi/boot1/boot_module.h Mon May 22 06:29:20 2017 (r318626) @@ -105,8 +105,6 @@ extern const boot_module_t zfs_module; /* Functions available to modules. */ extern void add_device(dev_info_t **devinfop, dev_info_t *devinfo); -extern void panic(const char *fmt, ...) __dead2; -extern int printf(const char *fmt, ...); extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); extern EFI_SYSTEM_TABLE *systab; From owner-svn-src-all@freebsd.org Mon May 22 08:17:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19D9DD78499; Mon, 22 May 2017 08:17:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D11C4180E; Mon, 22 May 2017 08:17:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M8H7BP088086; Mon, 22 May 2017 08:17:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M8H72i088084; Mon, 22 May 2017 08:17:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705220817.v4M8H72i088084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 22 May 2017 08:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318627 - stable/11/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 08:17:09 -0000 Author: hselasky Date: Mon May 22 08:17:07 2017 New Revision: 318627 URL: https://svnweb.freebsd.org/changeset/base/318627 Log: MFC r318531: mlx4: Use the CQ quota for SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the firmware). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the firmware total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c stable/11/sys/ofed/drivers/net/mlx4/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 06:29:20 2017 (r318626) +++ stable/11/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:17:07 2017 (r318627) @@ -1169,8 +1169,7 @@ int mlx4_init_eq_table(struct mlx4_dev * } for (i = 0; i < dev->caps.num_comp_vectors; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); @@ -1190,8 +1189,7 @@ int mlx4_init_eq_table(struct mlx4_dev * for (i = dev->caps.num_comp_vectors + 1; i < dev->caps.num_comp_vectors + dev->caps.comp_pool + 1; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); Modified: stable/11/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/main.c Mon May 22 06:29:20 2017 (r318626) +++ stable/11/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:17:07 2017 (r318627) @@ -3446,6 +3446,8 @@ slave_start: goto err_free_eq; } + mlx4_init_quotas(dev); + err = mlx4_setup_hca(dev); if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && !mlx4_is_mfunc(dev)) { @@ -3459,7 +3461,6 @@ slave_start: if (err) goto err_steer; - mlx4_init_quotas(dev); mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { From owner-svn-src-all@freebsd.org Mon May 22 08:19:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F951D7857E; Mon, 22 May 2017 08:19:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E44E919A9; Mon, 22 May 2017 08:19:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M8J8KL088215; Mon, 22 May 2017 08:19:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M8J87s088213; Mon, 22 May 2017 08:19:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705220819.v4M8J87s088213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 22 May 2017 08:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318628 - stable/10/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 08:19:10 -0000 Author: hselasky Date: Mon May 22 08:19:08 2017 New Revision: 318628 URL: https://svnweb.freebsd.org/changeset/base/318628 Log: MFC r318531: mlx4: Use the CQ quota for SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the firmware). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the firmware total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c stable/10/sys/ofed/drivers/net/mlx4/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:17:07 2017 (r318627) +++ stable/10/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:19:08 2017 (r318628) @@ -1169,8 +1169,7 @@ int mlx4_init_eq_table(struct mlx4_dev * } for (i = 0; i < dev->caps.num_comp_vectors; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); @@ -1190,8 +1189,7 @@ int mlx4_init_eq_table(struct mlx4_dev * for (i = dev->caps.num_comp_vectors + 1; i < dev->caps.num_comp_vectors + dev->caps.comp_pool + 1; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:17:07 2017 (r318627) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:19:08 2017 (r318628) @@ -3448,6 +3448,8 @@ slave_start: goto err_free_eq; } + mlx4_init_quotas(dev); + err = mlx4_setup_hca(dev); if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && !mlx4_is_mfunc(dev)) { @@ -3461,7 +3463,6 @@ slave_start: if (err) goto err_steer; - mlx4_init_quotas(dev); mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { From owner-svn-src-all@freebsd.org Mon May 22 08:20:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40A4CD7861D; Mon, 22 May 2017 08:20:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 024151B2E; Mon, 22 May 2017 08:20:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M8Kppu088350; Mon, 22 May 2017 08:20:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M8Koxe088348; Mon, 22 May 2017 08:20:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705220820.v4M8Koxe088348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 22 May 2017 08:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318629 - stable/9/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 08:20:52 -0000 Author: hselasky Date: Mon May 22 08:20:50 2017 New Revision: 318629 URL: https://svnweb.freebsd.org/changeset/base/318629 Log: MFC r318531: mlx4: Use the CQ quota for SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the firmware). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the firmware total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/eq.c stable/9/sys/ofed/drivers/net/mlx4/main.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:19:08 2017 (r318628) +++ stable/9/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:20:50 2017 (r318629) @@ -1169,8 +1169,7 @@ int mlx4_init_eq_table(struct mlx4_dev * } for (i = 0; i < dev->caps.num_comp_vectors; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); @@ -1190,8 +1189,7 @@ int mlx4_init_eq_table(struct mlx4_dev * for (i = dev->caps.num_comp_vectors + 1; i < dev->caps.num_comp_vectors + dev->caps.comp_pool + 1; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:19:08 2017 (r318628) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:20:50 2017 (r318629) @@ -3448,6 +3448,8 @@ slave_start: goto err_free_eq; } + mlx4_init_quotas(dev); + err = mlx4_setup_hca(dev); if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && !mlx4_is_mfunc(dev)) { @@ -3461,7 +3463,6 @@ slave_start: if (err) goto err_steer; - mlx4_init_quotas(dev); mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { From owner-svn-src-all@freebsd.org Mon May 22 10:28:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C17FCD77995; Mon, 22 May 2017 10:28:18 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82144165B; Mon, 22 May 2017 10:28:18 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MASHv5041438; Mon, 22 May 2017 10:28:17 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MASHNe041436; Mon, 22 May 2017 10:28:17 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705221028.v4MASHNe041436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Mon, 22 May 2017 10:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318630 - stable/11/sbin/dhclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 10:28:18 -0000 Author: n_hibma Date: Mon May 22 10:28:17 2017 New Revision: 318630 URL: https://svnweb.freebsd.org/changeset/base/318630 Log: MFC: ------------------------------------------------------------------------ r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines Fix the output of very large rebind, renew and lease time options in lease file. Some routers set very large values for rebind time (Netgear) and these are erroneously reported as negative in the leasefile. This was due to a wrong printf format specification of %ld for an unsigned long on 32-bit platforms. ------------------------------------------------------------------------ r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines Fix handling of large DHCP expiry values. They would overflow a signed 32-bit time_t on 32 bit architectures. This was taken care of, but a compiler optimisation makes this behave erratically. This could be resolved by adding a -fwrapv flag, but instead we can check the value before adding the current timestamp to it. In the lease file values are still wrong though: option dhcp-rebinding-time -644245096; PR: 218980 Modified: stable/11/sbin/dhclient/dhclient.c stable/11/sbin/dhclient/options.c Modified: stable/11/sbin/dhclient/dhclient.c ============================================================================== --- stable/11/sbin/dhclient/dhclient.c Mon May 22 08:20:50 2017 (r318629) +++ stable/11/sbin/dhclient/dhclient.c Mon May 22 10:28:17 2017 (r318630) @@ -107,7 +107,11 @@ struct pidfh *pidfile; */ #define ASSERT_STATE(state_is, state_shouldbe) {} -#define TIME_MAX 2147483647 +/* + * We need to check that the expiry, renewal and rebind times are not beyond + * the end of time (~2038 when a 32-bit time_t is being used). + */ +#define TIME_MAX ((((time_t) 1 << (sizeof(time_t) * CHAR_BIT - 2)) - 1) * 2 + 1) int log_priority; int no_daemon; @@ -762,15 +766,17 @@ dhcpack(struct packet *packet) else ip->client->new->expiry = default_lease_time; /* A number that looks negative here is really just very large, - because the lease expiry offset is unsigned. */ - if (ip->client->new->expiry < 0) - ip->client->new->expiry = TIME_MAX; + because the lease expiry offset is unsigned. Also make sure that + the addition of cur_time below does not overflow (a 32 bit) time_t. */ + if (ip->client->new->expiry < 0 || + ip->client->new->expiry > TIME_MAX - cur_time) + ip->client->new->expiry = TIME_MAX - cur_time; /* XXX should be fixed by resetting the client state */ if (ip->client->new->expiry < 60) ip->client->new->expiry = 60; /* Unless overridden in the config, take the server-provided renewal - * time if there is one; otherwise figure it out according to the spec. + * time if there is one. Otherwise figure it out according to the spec. * Also make sure the renewal time does not exceed the expiry time. */ if (ip->client->config->default_actions[DHO_DHCP_RENEWAL_TIME] == @@ -782,7 +788,8 @@ dhcpack(struct packet *packet) ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data); else ip->client->new->renewal = ip->client->new->expiry / 2; - if (ip->client->new->renewal > ip->client->new->expiry / 2) + if (ip->client->new->renewal < 0 || + ip->client->new->renewal > ip->client->new->expiry / 2) ip->client->new->renewal = ip->client->new->expiry / 2; /* Same deal with the rebind time. */ @@ -794,20 +801,15 @@ dhcpack(struct packet *packet) ip->client->new->rebind = getULong( ip->client->new->options[DHO_DHCP_REBINDING_TIME].data); else - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - if (ip->client->new->rebind > ip->client->new->renewal * 7 / 4) - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - - ip->client->new->expiry += cur_time; - /* Lease lengths can never be negative. */ - if (ip->client->new->expiry < cur_time) - ip->client->new->expiry = TIME_MAX; - ip->client->new->renewal += cur_time; - if (ip->client->new->renewal < cur_time) - ip->client->new->renewal = TIME_MAX; - ip->client->new->rebind += cur_time; - if (ip->client->new->rebind < cur_time) - ip->client->new->rebind = TIME_MAX; + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + if (ip->client->new->rebind < 0 || + ip->client->new->rebind > ip->client->new->renewal / 4 * 7) + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + + /* Convert the time offsets into seconds-since-the-epoch */ + ip->client->new->expiry += cur_time; + ip->client->new->renewal += cur_time; + ip->client->new->rebind += cur_time; bind_lease(ip); } Modified: stable/11/sbin/dhclient/options.c ============================================================================== --- stable/11/sbin/dhclient/options.c Mon May 22 08:20:50 2017 (r318629) +++ stable/11/sbin/dhclient/options.c Mon May 22 10:28:17 2017 (r318630) @@ -783,7 +783,7 @@ pretty_print_option(unsigned int code, u dp += 4; break; case 'L': - opcount = snprintf(op, opleft, "%ld", + opcount = snprintf(op, opleft, "%lu", (unsigned long)getULong(dp)); if (opcount >= opleft || opcount == -1) goto toobig; @@ -799,7 +799,7 @@ pretty_print_option(unsigned int code, u dp += 2; break; case 'S': - opcount = snprintf(op, opleft, "%d", + opcount = snprintf(op, opleft, "%u", getUShort(dp)); if (opcount >= opleft || opcount == -1) goto toobig; From owner-svn-src-all@freebsd.org Mon May 22 11:33:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA1F4D78E32; Mon, 22 May 2017 11:33:45 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC12B1799; Mon, 22 May 2017 11:33:45 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MBXixJ069927; Mon, 22 May 2017 11:33:44 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MBXieZ069926; Mon, 22 May 2017 11:33:44 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705221133.v4MBXieZ069926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Mon, 22 May 2017 11:33:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318631 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 11:33:46 -0000 Author: royger Date: Mon May 22 11:33:44 2017 New Revision: 318631 URL: https://svnweb.freebsd.org/changeset/base/318631 Log: xen/netfront: don't drop the RX lock in xn_rxeof Since netfront uses different locks for the RX and TX paths there's no need to drop the RX lock before calling if_input. Suggested by: jhb Tested by: cperciva Sponsored by: Citrix Systems R&D MFC with: r318523 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon May 22 10:28:17 2017 (r318630) +++ head/sys/dev/xen/netfront/netfront.c Mon May 22 11:33:44 2017 (r318631) @@ -1224,7 +1224,6 @@ xn_rxeof(struct netfront_rxq *rxq) RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); } while (work_to_do); - XN_RX_UNLOCK(rxq); mbufq_drain(&mbufq_errq); /* * Process all the mbufs after the remapping is complete. @@ -1253,7 +1252,6 @@ xn_rxeof(struct netfront_rxq *rxq) */ tcp_lro_flush_all(lro); #endif - XN_RX_LOCK(rxq); } static void From owner-svn-src-all@freebsd.org Mon May 22 11:38:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D8C1D78F36; Mon, 22 May 2017 11:38:41 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E92711A69; Mon, 22 May 2017 11:38:40 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MBcet8070250; Mon, 22 May 2017 11:38:40 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MBcdgw070249; Mon, 22 May 2017 11:38:39 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705221138.v4MBcdgw070249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Mon, 22 May 2017 11:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318632 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 11:38:41 -0000 Author: royger Date: Mon May 22 11:38:39 2017 New Revision: 318632 URL: https://svnweb.freebsd.org/changeset/base/318632 Log: bsdinstall: mount is not needed for the ZFS install case Because the datasets are already mounted by zfsboot, and the mount script doesn't know anything about ZFS. Also do not execute the "umount" script for ZFS for the same reasons. Reviewed by: dteske, tsoome Sponsored by: Citrix Systems R&D MFC after: 1 week Differential revision: https://reviews.freebsd.org/D10738 Modified: head/usr.sbin/bsdinstall/scripts/script Modified: head/usr.sbin/bsdinstall/scripts/script ============================================================================== --- head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:33:44 2017 (r318631) +++ head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:38:39 2017 (r318632) @@ -42,6 +42,11 @@ f_include $BSDCFG_SHARE/variable.subr # DISTRIBUTIONS # BSDINSTALL_DISTDIR +# +# Default name of the ZFS boot-pool +# +: ${ZFSBOOT_POOL_NAME:=zroot} + ############################################################ GLOBALS # @@ -53,8 +58,6 @@ msg_installation_error="Installation Err error() { - [ -f "$PATH_FSTAB" ] && bsdinstall umount - local file f_getvar "$VAR_DEBUG_FILE#+" file if [ "$file" ]; then @@ -63,6 +66,13 @@ error() # No need to restore title, pining for the fjords fi + [ -f "$PATH_FSTAB" ] || exit + if [ "$ZFSBOOT_DISKS" ]; then + zpool export $ZFSBOOT_POOL_NAME + else + bsdinstall umount + fi + exit 1 } @@ -99,8 +109,8 @@ if [ "$ZFSBOOT_DISKS" ]; then bsdinstall zfsboot else bsdinstall scriptedpart "$PARTITIONS" + bsdinstall mount fi -bsdinstall mount # Unpack distributions bsdinstall checksum @@ -125,7 +135,11 @@ if [ -f /tmp/bsdinstall-installscript-ab fi bsdinstall entropy -bsdinstall umount +if [ "$ZFSBOOT_DISKS" ]; then + zpool export $ZFSBOOT_POOL_NAME +else + bsdinstall umount +fi f_dprintf "Installation Completed at %s" "$( date )" From owner-svn-src-all@freebsd.org Mon May 22 11:41:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C601D78FFE; Mon, 22 May 2017 11:41:19 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18F731D92; Mon, 22 May 2017 11:41:19 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MBfI4o072509; Mon, 22 May 2017 11:41:18 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MBfISm072508; Mon, 22 May 2017 11:41:18 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705221141.v4MBfISm072508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Mon, 22 May 2017 11:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318633 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 11:41:19 -0000 Author: royger Date: Mon May 22 11:41:17 2017 New Revision: 318633 URL: https://svnweb.freebsd.org/changeset/base/318633 Log: bsdinstall: do not use distextract in scripted mode It requires a tty, which might not be available in scripted installs. Instead extract the sets manually using tar. Reviewed by: tsoome Sponsored by: Citrix Systems R&D MFC after: 1 week Differential revision: https://reviews.freebsd.org/D10736 Modified: head/usr.sbin/bsdinstall/scripts/script Modified: head/usr.sbin/bsdinstall/scripts/script ============================================================================== --- head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:38:39 2017 (r318632) +++ head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:41:17 2017 (r318633) @@ -114,7 +114,10 @@ fi # Unpack distributions bsdinstall checksum -bsdinstall distextract +for set in $DISTRIBUTIONS; do + f_dprintf "Extracting $BSDINSTALL_DISTDIR/$set" + tar -xf "$BSDINSTALL_DISTDIR/$set" -C $BSDINSTALL_CHROOT +done # Finalize install bsdinstall config From owner-svn-src-all@freebsd.org Mon May 22 11:43:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6F2BD7622D; Mon, 22 May 2017 11:43:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9718210D1; Mon, 22 May 2017 11:43:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MBhJx1074142; Mon, 22 May 2017 11:43:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MBhJer074140; Mon, 22 May 2017 11:43:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705221143.v4MBhJer074140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 22 May 2017 11:43:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318634 - in head/sys: compat/freebsd32 kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 11:43:20 -0000 Author: emaste Date: Mon May 22 11:43:19 2017 New Revision: 318634 URL: https://svnweb.freebsd.org/changeset/base/318634 Log: disallow open(2) in capability mode Previously open(2) was allowed in capability mode, with a comment that suggested this was likely the case to facilitate debugging. The system call would still fail later on, but it's better to disallow the syscall altogether. We now have the kern.trap_enotcap sysctl or PROC_TRAPCAP_CTL proccontrol to aid in debugging. In any case libc has translated open() to the openat syscall since r277032. Reviewed by: kib, rwatson Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10850 Modified: head/sys/compat/freebsd32/capabilities.conf head/sys/kern/capabilities.conf Modified: head/sys/compat/freebsd32/capabilities.conf ============================================================================== --- head/sys/compat/freebsd32/capabilities.conf Mon May 22 11:41:17 2017 (r318633) +++ head/sys/compat/freebsd32/capabilities.conf Mon May 22 11:43:19 2017 (r318634) @@ -188,7 +188,6 @@ renameat symlinkat unlinkat freebsd32_utimensat -open pdfork pdgetpid pdkill Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Mon May 22 11:41:17 2017 (r318633) +++ head/sys/kern/capabilities.conf Mon May 22 11:43:19 2017 (r318634) @@ -460,14 +460,6 @@ unlinkat utimensat ## -## Allow entry into open(2). This system call will fail, since access to the -## global file namespace has been disallowed, but allowing entry into the -## syscall means that an audit trail will be generated (which is also very -## useful for debugging). -## -open - -## ## Process descriptor-related system calls are allowed. ## pdfork From owner-svn-src-all@freebsd.org Mon May 22 11:45:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF26AD762EF; Mon, 22 May 2017 11:45:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B5C12BE; Mon, 22 May 2017 11:45:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MBjj2s074317; Mon, 22 May 2017 11:45:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MBjjjc074315; Mon, 22 May 2017 11:45:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705221145.v4MBjjjc074315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 22 May 2017 11:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318635 - in head/sys: compat/freebsd32 kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 11:45:46 -0000 Author: emaste Date: Mon May 22 11:45:45 2017 New Revision: 318635 URL: https://svnweb.freebsd.org/changeset/base/318635 Log: Regen sysent after r318634, no open(2) in capability mode Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Mon May 22 11:43:19 2017 (r318634) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Mon May 22 11:45:45 2017 (r318635) @@ -57,7 +57,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)sys_fork, AUE_FORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 2 = fork */ { AS(read_args), (sy_call_t *)sys_read, AUE_READ, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 3 = read */ { AS(write_args), (sy_call_t *)sys_write, AUE_WRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = write */ - { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 5 = open */ + { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 5 = open */ { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 6 = close */ { AS(freebsd32_wait4_args), (sy_call_t *)freebsd32_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = freebsd32_wait4 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 8 = obsolete old creat */ Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Mon May 22 11:43:19 2017 (r318634) +++ head/sys/kern/init_sysent.c Mon May 22 11:45:45 2017 (r318635) @@ -50,7 +50,7 @@ struct sysent sysent[] = { { 0, (sy_call_t *)sys_fork, AUE_FORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 2 = fork */ { AS(read_args), (sy_call_t *)sys_read, AUE_READ, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 3 = read */ { AS(write_args), (sy_call_t *)sys_write, AUE_WRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = write */ - { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 5 = open */ + { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 5 = open */ { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 6 = close */ { AS(wait4_args), (sy_call_t *)sys_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = wait4 */ { compat(AS(ocreat_args),creat), AUE_CREAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 8 = old creat */ From owner-svn-src-all@freebsd.org Mon May 22 12:28:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4C2AD78435; Mon, 22 May 2017 12:28:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABB8D16C4; Mon, 22 May 2017 12:28:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MCSKBU091334; Mon, 22 May 2017 12:28:20 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MCSK6t091333; Mon, 22 May 2017 12:28:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221228.v4MCSK6t091333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 12:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318636 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 12:28:22 -0000 Author: gjb Date: Mon May 22 12:28:20 2017 New Revision: 318636 URL: https://svnweb.freebsd.org/changeset/base/318636 Log: Fix typo and grammar. Submitted by: pfg Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 11:45:45 2017 (r318635) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 12:28:20 2017 (r318636) @@ -384,8 +384,8 @@ clock and choose between absolute and relative mode. The clang - nullability qualifier has been added to the - C library headers. + nullability qualifiers have been added to + the C library headers. Uses of the GNU __nonnull__ attribute have been replaced From owner-svn-src-all@freebsd.org Mon May 22 12:35:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDD11D78634; Mon, 22 May 2017 12:35:32 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D64B1BD6; Mon, 22 May 2017 12:35:32 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MCZV6q095335; Mon, 22 May 2017 12:35:31 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MCZVNK095334; Mon, 22 May 2017 12:35:31 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705221235.v4MCZVNK095334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 22 May 2017 12:35:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318637 - stable/11/sys/arm/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 12:35:32 -0000 Author: mmel Date: Mon May 22 12:35:31 2017 New Revision: 318637 URL: https://svnweb.freebsd.org/changeset/base/318637 Log: MFC r318530: Increase maximum text segment size. LLVM binaries are huge... Modified: stable/11/sys/arm/include/vmparam.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/include/vmparam.h ============================================================================== --- stable/11/sys/arm/include/vmparam.h Mon May 22 12:28:20 2017 (r318636) +++ stable/11/sys/arm/include/vmparam.h Mon May 22 12:35:31 2017 (r318637) @@ -42,7 +42,7 @@ * Virtual memory related constants, all in bytes */ #ifndef MAXTSIZ -#define MAXTSIZ (64UL*1024*1024) /* max text size */ +#define MAXTSIZ (256UL*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ #define DFLDSIZ (128UL*1024*1024) /* initial data size limit */ From owner-svn-src-all@freebsd.org Mon May 22 13:00:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EC41D78A5E; Mon, 22 May 2017 13:00:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58DC5162B; Mon, 22 May 2017 13:00:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MD0AJs003864; Mon, 22 May 2017 13:00:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MD0Af3003863; Mon, 22 May 2017 13:00:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221300.v4MD0Af3003863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318638 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:00:11 -0000 Author: gjb Date: Mon May 22 13:00:10 2017 New Revision: 318638 URL: https://svnweb.freebsd.org/changeset/base/318638 Log: Document r318472, LDD enabled by default on arm64. Submitted by: andrew Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 12:35:31 2017 (r318637) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:10 2017 (r318638) @@ -174,6 +174,11 @@ WITH_LLD_AS_LD build knob has been added, which installs LLD as /usr/bin/ld if set. + + + LDD has been enabled by default and + installed as /usr/bin/ld on + &os;/&arch.arm64;. From owner-svn-src-all@freebsd.org Mon May 22 13:00:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80793D78A64; Mon, 22 May 2017 13:00:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39D001634; Mon, 22 May 2017 13:00:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MD0BtS003909; Mon, 22 May 2017 13:00:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MD0BiP003907; Mon, 22 May 2017 13:00:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221300.v4MD0BiP003907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318639 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:00:12 -0000 Author: gjb Date: Mon May 22 13:00:11 2017 New Revision: 318639 URL: https://svnweb.freebsd.org/changeset/base/318639 Log: Document r309312, PCI passthrough enabled on Hyper-V VMs. Document r314091, hv_netvsc(4) SR-IOV/VF support. Document r316272, Hyper-V Gen 2 support. Document r317119, Hyper-V synthetic keyboard support. Submitted by: sephe Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:10 2017 (r318638) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:11 2017 (r318639) @@ -646,6 +646,25 @@ sponsor="&chelsio;">PCI passthrough with &man.bhyve.4; resets functions via FLR when a virtual machine is started and stopped. + + PCI passthrough support has + been enabled on &os; virtual machines running on + Microsoft® Hyper-V™. + + The + &man.hv.netvsc.4; driver SR-IOV + implementation has been updated to support Virtual Function + (VF) devices, such as the Mellanox® + Connect-X3™ network card. + + Support + for Microsoft® Hyper-V™ Generation 2 virtual + machines has been added. + + Support + for synthetic keyboards has been added for virtual machines + running on Microsoft® Hyper-V™. From owner-svn-src-all@freebsd.org Mon May 22 13:16:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 726DED781F1; Mon, 22 May 2017 13:16:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43E9B1172; Mon, 22 May 2017 13:16:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MDFx1M011645; Mon, 22 May 2017 13:15:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MDFxJR011644; Mon, 22 May 2017 13:15:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221315.v4MDFxJR011644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318640 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:16:00 -0000 Author: gjb Date: Mon May 22 13:15:59 2017 New Revision: 318640 URL: https://svnweb.freebsd.org/changeset/base/318640 Log: Fix typo: s/LDD/LLD/ Spotted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:11 2017 (r318639) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:15:59 2017 (r318640) @@ -176,7 +176,7 @@ /usr/bin/ld if set. - LDD has been enabled by default and + LLD has been enabled by default and installed as /usr/bin/ld on &os;/&arch.arm64;. From owner-svn-src-all@freebsd.org Mon May 22 13:21:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CD0BD785CA; Mon, 22 May 2017 13:21:29 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F03C1702; Mon, 22 May 2017 13:21:29 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MDLS8h016087; Mon, 22 May 2017 13:21:28 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MDLSmr016086; Mon, 22 May 2017 13:21:28 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705221321.v4MDLSmr016086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 22 May 2017 13:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318641 - head/lib/libthr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:21:29 -0000 Author: vangyzen Date: Mon May 22 13:21:28 2017 New Revision: 318641 URL: https://svnweb.freebsd.org/changeset/base/318641 Log: Revert r318583 (libthr: use default WARNS level of 6) Revert this while I fix RISC-V, SPARC, and probably all architectures that use GCC. Reported by: kib Pointy hat to: vangyzen Sponsored by: Dell EMC Modified: head/lib/libthr/Makefile Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Mon May 22 13:15:59 2017 (r318640) +++ head/lib/libthr/Makefile Mon May 22 13:21:28 2017 (r318641) @@ -16,6 +16,7 @@ MK_SSP= no LIB=thr SHLIB_MAJOR= 3 +WARNS?= 3 NO_WTHREAD_SAFETY=1 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ From owner-svn-src-all@freebsd.org Mon May 22 13:27:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E5FBD7870C; Mon, 22 May 2017 13:27:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DE201B0E; Mon, 22 May 2017 13:27:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MDRW0G016373; Mon, 22 May 2017 13:27:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MDRWMU016372; Mon, 22 May 2017 13:27:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221327.v4MDRWMU016372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318642 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:27:33 -0000 Author: gjb Date: Mon May 22 13:27:31 2017 New Revision: 318642 URL: https://svnweb.freebsd.org/changeset/base/318642 Log: Document r315514, if_ipsec(4) addition. Submitted by: ae Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:21:28 2017 (r318641) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:27:31 2017 (r318642) @@ -602,6 +602,12 @@ sponsor="&netgate;">The &man.etherswitch.4; driver has been updated to support RTL8366RB and RTL8366SR cards. + The + &man.if.ipsec.4; virtual tunneling interface has been added, + implementing route-based VPNs protected + with Encapsulating Security Payload + (ESP). + The &man.qlnxe.4; driver has been added, providing support for Cavium® Qlogic™ 45000 Series adapters. From owner-svn-src-all@freebsd.org Mon May 22 13:56:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31FF9D78EDD; Mon, 22 May 2017 13:56:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 027AA1DAD; Mon, 22 May 2017 13:56:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MDu0LR029260; Mon, 22 May 2017 13:56:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MDu0t1029256; Mon, 22 May 2017 13:56:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221356.v4MDu0t1029256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318643 - head/usr.sbin/efivar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:56:01 -0000 Author: gjb Date: Mon May 22 13:55:59 2017 New Revision: 318643 URL: https://svnweb.freebsd.org/changeset/base/318643 Log: Correct the "first appeared in" version for efivar(8). MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/efivar/efivar.8 Modified: head/usr.sbin/efivar/efivar.8 ============================================================================== --- head/usr.sbin/efivar/efivar.8 Mon May 22 13:27:31 2017 (r318642) +++ head/usr.sbin/efivar/efivar.8 Mon May 22 13:55:59 2017 (r318643) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 21, 2017 +.Dd May 22, 2017 .Dt EFIVAR 8 .Os .Sh NAME @@ -180,4 +180,4 @@ have the format described in RFC 4122. The .Nm utility first appeared in -.Fx 12.0 . +.Fx 11.1 . From owner-svn-src-all@freebsd.org Mon May 22 13:56:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F048D78F41; Mon, 22 May 2017 13:56:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2FC11EFE; Mon, 22 May 2017 13:56:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MDuYF1029322; Mon, 22 May 2017 13:56:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MDuYHp029321; Mon, 22 May 2017 13:56:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221356.v4MDuYHp029321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:56:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318644 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:56:36 -0000 Author: gjb Date: Mon May 22 13:56:34 2017 New Revision: 318644 URL: https://svnweb.freebsd.org/changeset/base/318644 Log: Document r318576, efivar(8) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:55:59 2017 (r318643) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:56:34 2017 (r318644) @@ -230,6 +230,10 @@ The &man.daemon.8; utility has been updated to allow redirecting &man.stdout.4; and &man.stderr.4; output to &man.syslog.3; or to a file. + + The + &man.efivar.8; utility has been added, providing an interface + to manage UEFI variables. From owner-svn-src-all@freebsd.org Mon May 22 14:21:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96BB6D78ACE; Mon, 22 May 2017 14:21:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6651B13C8; Mon, 22 May 2017 14:21:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MEL7s9040037; Mon, 22 May 2017 14:21:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MEL7tY040036; Mon, 22 May 2017 14:21:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221421.v4MEL7tY040036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 14:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318645 - head/gnu/usr.bin/groff/tmac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 14:21:08 -0000 Author: gjb Date: Mon May 22 14:21:07 2017 New Revision: 318645 URL: https://svnweb.freebsd.org/changeset/base/318645 Log: Add 11.1 to the mdoc(7) mdoc.local.in. Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/groff/tmac/mdoc.local.in Modified: head/gnu/usr.bin/groff/tmac/mdoc.local.in ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local.in Mon May 22 13:56:34 2017 (r318644) +++ head/gnu/usr.bin/groff/tmac/mdoc.local.in Mon May 22 14:21:07 2017 (r318645) @@ -65,6 +65,7 @@ .ds doc-operating-system-FreeBSD-10.2 10.2 .ds doc-operating-system-FreeBSD-10.3 10.3 .ds doc-operating-system-FreeBSD-11.0 11.0 +.ds doc-operating-system-FreeBSD-11.1 11.1 .ds doc-operating-system-FreeBSD-12.0 12.0 . .\" Definitions for other *BSDs not (yet) in doc-common From owner-svn-src-all@freebsd.org Mon May 22 14:21:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EA73D78C56; Mon, 22 May 2017 14:21:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA08D1611; Mon, 22 May 2017 14:21:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MELjN7040836; Mon, 22 May 2017 14:21:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MELj1f040835; Mon, 22 May 2017 14:21:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221421.v4MELj1f040835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 14:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318646 - in head/release: . scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 14:21:47 -0000 Author: gjb Date: Mon May 22 14:21:45 2017 New Revision: 318646 URL: https://svnweb.freebsd.org/changeset/base/318646 Log: Allow PORTSDIR to be overridden in the pkg-stage target. Submitted by: Johannes Jost Meixner (original) PR: 218393 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile head/release/scripts/pkg-stage.sh Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Mon May 22 14:21:07 2017 (r318645) +++ head/release/Makefile Mon May 22 14:21:45 2017 (r318646) @@ -270,7 +270,7 @@ packagesystem: base.txz kernel.txz ${EXT pkg-stage: .if !defined(NOPKG) - env REPOS_DIR=${.CURDIR}/pkg_repos/ \ + env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ sh ${.CURDIR}/scripts/pkg-stage.sh mkdir -p ${.OBJDIR}/dvd/packages/repos/ cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Mon May 22 14:21:07 2017 (r318645) +++ head/release/scripts/pkg-stage.sh Mon May 22 14:21:45 2017 (r318646) @@ -10,6 +10,7 @@ export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" +export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES="archivers/unzip devel/subversion @@ -33,8 +34,8 @@ x11/kde4 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). -if [ ! -f /usr/ports/Makefile ]; then - echo "*** /usr/ports is missing! ***" +if [ ! -f ${PORTSDIR}/Makefile ]; then + echo "*** ${PORTSDIR} is missing! ***" echo "*** Skipping pkg-stage.sh ***" echo "*** Unset NOPORTS to fix this ***" exit 0 @@ -42,7 +43,7 @@ fi if [ ! -x /usr/local/sbin/pkg ]; then /etc/rc.d/ldconfig restart - /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean + /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean fi export DVD_DIR="dvd/packages" @@ -58,7 +59,7 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "/usr/ports/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else echo "*** Skipping nonexistent port: ${_P}" From owner-svn-src-all@freebsd.org Mon May 22 14:28:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B261D78DEF; Mon, 22 May 2017 14:28:53 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E38061A7E; Mon, 22 May 2017 14:28:52 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x22e.google.com with SMTP id b204so163391492oii.1; Mon, 22 May 2017 07:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AfGjVFEs5w6pOjWDIMU1pVZ8xpPUO0YYnmQaoH0LaOw=; b=ZGea64jZ0EQWvILn8uxAcUolMGIVNuCgOvrgdndOYlx/F2BVAezz7iPyWdo9KDjy4C ga/6ql0KE0BO1LwFhNuj3REvB5UclwLmN42PgNetNjFGQiy9K9f6TmCYsMc4edkC0nAU 781uMpqk6UwFFHlt6uaIBhAypbhGj7+KDsODhdPKn6mE/J4EIuRVXSyuvtneNEMA2djU nfZX2C6Vw14K5I80+le1BY9vUqTc+nEguaHjJR+bL6fquOQCQ2k0RaatBF3eQ36IVNWd hNKbpI7EXD6x2EFH51OCPN0JwemgpTpaaUuV/S0fAr3cBEtU80UzCiQrnkzMRPKJm+gv NTjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AfGjVFEs5w6pOjWDIMU1pVZ8xpPUO0YYnmQaoH0LaOw=; b=VtfQU+5KT8RPpDRbuQnY9sxYtJei3jVknYqMVa4Sosb0mDzZVLmYFK64j9Ro9XN0Rk PBSBnqZ7nt5ddtJa3EoB31VIVOO+3G4HFY6xZB52WEBvui5lII/sxO4CQmHyZ+Cbfa/i tL1f+W64K+ba69WI4gWCkqsSs01PxN8nNw8SszMmbbX9LJjnU51x8woa7Xksc3QHX6z7 0IjsQ9yYWmbfdf1/2rGm2SFzFLfYS7cJ6Z8OJjDBt/kRSlrRVMX4Psx7H2uikAOkugkR wqk9c4vv12rd/67hYb0pptgpfyy1yU7W/iVAR0W8LJkAkxWJLhTxvPENsjQR6yQB+BFd Zubg== X-Gm-Message-State: AODbwcCZrs6DgFZQbya0vSupPvoJbiFzyqWdHE8BZ0rdh2aSQnwCJOag HCeA+Da/fp3mxEVHmCVNOTcPz8VTBg== X-Received: by 10.202.230.8 with SMTP id d8mr12029212oih.206.1495463331961; Mon, 22 May 2017 07:28:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.20.163 with HTTP; Mon, 22 May 2017 07:28:51 -0700 (PDT) In-Reply-To: <201705221356.v4MDu0t1029256@repo.freebsd.org> References: <201705221356.v4MDu0t1029256@repo.freebsd.org> From: Benjamin Kaduk Date: Mon, 22 May 2017 09:28:51 -0500 Message-ID: Subject: Re: svn commit: r318643 - head/usr.sbin/efivar To: Glen Barber Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 14:28:53 -0000 On Mon, May 22, 2017 at 8:56 AM, Glen Barber wrote: > Author: gjb > Date: Mon May 22 13:55:59 2017 > New Revision: 318643 > URL: https://svnweb.freebsd.org/changeset/base/318643 > > Log: > Correct the "first appeared in" version for efivar(8). > Hmm, I guess I should have put an MFC note for r318599, then. -Ben From owner-svn-src-all@freebsd.org Mon May 22 14:46:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5107AD782F8; Mon, 22 May 2017 14:46:15 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 195D91533; Mon, 22 May 2017 14:46:15 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MEkEFX050137; Mon, 22 May 2017 14:46:14 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MEkDJF050133; Mon, 22 May 2017 14:46:13 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705221446.v4MEkDJF050133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Mon, 22 May 2017 14:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318647 - in head: share/man/man4 sys/conf sys/dev/ena sys/modules sys/modules/ena X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 14:46:15 -0000 Author: zbb Date: Mon May 22 14:46:13 2017 New Revision: 318647 URL: https://svnweb.freebsd.org/changeset/base/318647 Log: Add support for Amazon Elastic Network Adapter (ENA) NIC ENA is a networking interface designed to make good use of modern CPU features and system architectures. The ENA device exposes a lightweight management interface with a minimal set of memory mapped registers and extendable command set through an Admin Queue. The driver supports a range of ENA devices, is link-speed independent (i.e., the same driver is used for 10GbE, 25GbE, 40GbE, etc.), and has a negotiated and extendable feature set. Some ENA devices support SR-IOV. This driver is used for both the SR-IOV Physical Function (PF) and Virtual Function (VF) devices. ENA devices enable high speed and low overhead network traffic processing by providing multiple Tx/Rx queue pairs (the maximum number is advertised by the device via the Admin Queue), a dedicated MSI-X interrupt vector per Tx/Rx queue pair, and CPU cacheline optimized data placement. The ENA driver supports industry standard TCP/IP offload features such as checksum offload and TCP transmit segmentation offload (TSO). Receive-side scaling (RSS) is supported for multi-core scaling. The ENA driver and its corresponding devices implement health monitoring mechanisms such as watchdog, enabling the device and driver to recover in a manner transparent to the application, as well as debug logs. Some of the ENA devices support a working mode called Low-latency Queue (LLQ), which saves several more microseconds. This feature will be implemented for driver in future releases. Submitted by: Michal Krawczyk Jakub Palider Jan Medala Obtained from: Semihalf Sponsored by: Amazon.com Inc. Differential revision: https://reviews.freebsd.org/D10427 Added: head/share/man/man4/ena.4 (contents, props changed) head/sys/dev/ena/ head/sys/dev/ena/ena.c (contents, props changed) head/sys/dev/ena/ena.h (contents, props changed) head/sys/dev/ena/ena_sysctl.c (contents, props changed) head/sys/dev/ena/ena_sysctl.h (contents, props changed) head/sys/modules/ena/ head/sys/modules/ena/Makefile (contents, props changed) Modified: head/sys/conf/files head/sys/modules/Makefile Added: head/share/man/man4/ena.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ena.4 Mon May 22 14:46:13 2017 (r318647) @@ -0,0 +1,255 @@ +.\" Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 04, 2017 +.Dt ENA 4 +.Os +.Sh NAME +.Nm ena +.Nd "FreeBSD kernel driver for Elastic Network Adapter (ENA) family" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ena" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ena_load="YES" +.Ed +.Sh DESCRIPTION +The ENA is a networking interface designed to make good use of modern CPU +features and system architectures. +.Pp +The ENA device exposes a lightweight management interface with a +minimal set of memory mapped registers and extendable command set +through an Admin Queue. +.Pp +The driver supports a range of ENA devices, is link-speed independent +(i.e., the same driver is used for 10GbE, 25GbE, 40GbE, etc.), and has +a negotiated and extendable feature set. +.Pp +Some ENA devices support SR-IOV. This driver is used for both the +SR-IOV Physical Function (PF) and Virtual Function (VF) devices. +.Pp +The ENA devices enable high speed and low overhead network traffic +processing by providing multiple Tx/Rx queue pairs (the maximum number +is advertised by the device via the Admin Queue), a dedicated MSI-X +interrupt vector per Tx/Rx queue pair, and CPU cacheline optimized +data placement. +.Pp +The +.Nm +driver supports industry standard TCP/IP offload features such +as checksum offload and TCP transmit segmentation offload (TSO). +Receive-side scaling (RSS) is supported for multi-core scaling. +.Pp +The +.Nm +driver and its corresponding devices implement health +monitoring mechanisms such as watchdog, enabling the device and driver +to recover in a manner transparent to the application, as well as +debug logs. +.Pp +Some of the ENA devices support a working mode called Low-latency +Queue (LLQ), which saves several more microseconds. This feature will +be implemented for driver in future releases. +.Sh HARDWARE +Supported PCI vendor ID/device IDs: +.Pp +.Bl -bullet -compact +.It +1d0f:0ec2 - ENA PF +.It +1d0f:1ec2 - ENA PF with LLQ support +.It +1d0f:ec20 - ENA VF +.It +1d0f:ec21 - ENA VF with LLQ support +.El +.Sh DIAGNOSTICS +.Ss Device initialization phase: +.Bl -diag +.It ena%d: failed to init mmio read less +.Pp +Error occured during initialization of the mmio register read request. +.It ena%d: Can not reset device +.Pp +Device could not be reset; device may not be responding or is already +during reset. +.It ena%d: device version is too low +.Pp +Version of the controller is too low and it is not supported by the driver. +.It ena%d: Invalid dma width value %d +.Pp +The controller is able to request dma transcation width. Device stopped +responding or it demanded invalid value. +.It ena%d: Can not initialize ena admin queue with device +.Pp +Initialization of the Admin Queue failed; device may not be responding or there +was a problem with initialization of the resources. +.It ena%d: Cannot get attribute for ena device rc: %d +.Pp +Failed to get attributes of the device from the controller. +.It ena%d: Cannot configure aenq groups rc: %d +.Pp +Errors occured when trying to configure AENQ groups. +.El +.Ss Driver initialisation/shutdown phase: +.Bl -diag +.It ena%d: PCI resource allocation failed! +.It ena%d: allocating ena_dev failed +.It ena%d: failed to pmap registers bar +.It ena%d: Error while setting up bufring +.It ena%d: Error with initialization of IO rings +.It ena%d: can not allocate ifnet structure +.It ena%d: Error with network interface setup +.It ena%d: Failed to enable and set the admin interrupts +.It ena%d: Failed to allocate %d, vectors %d +.It ena%d: Failed to enable MSIX, vectors %d rc %d +.It ena%d: Error with MSI-X enablement +.It ena%d: could not allocate irq vector: %d +.It ena%d: Unable to allocate bus resource: registers +.Pp +Resource allocation failed when initializing the device; driver will not +be attached. +.It ena%d: ENA device init failed (err: %d) +.Pp +Device initialization failed; driver will not be attached. +.It ena%d: could not activate irq vector: %d +.Pp +Error occured when trying to activate interrupt vectors for Admin Queue. +.It ena%d: failed to register interrupt handler for irq %ju: %d +.Pp +Error occured when trying to register Admin Queue interrupt handler. +.It ena%d: Cannot setup mgmnt queue intr +.Pp +Error occured during configuration of the Admin Queue interrupts. +.It ena%d: Enable MSI-X failed +.Pp +Configuration of the MSI-X for Admin Queue failed; there could be lack +of resources or interrupts could not have been configured; driver will +not be attached. +.It ena%d: VLAN is in use, detach first +.Pp +VLANs are being used when trying to detach the driver; VLANs should be detached +first and then detach routine should be called again. +.It ena%d: Unmapped RX DMA tag associations +.It ena%d: Unmapped TX DMA tag associations +.Pp +Error occured when trying to destroy RX/TX DMA tag. +.It ena%d: Cannot init RSS +.It ena%d: Cannot fill indirect table +.It ena%d: Cannot fill indirect table +.It ena%d: Cannot fill hash function +.It ena%d: Cannot fill hash control +.It ena%d: WARNING: RSS was not properly initialized, it will affect bandwidth +.Pp +Error occured during initialization of one of RSS resources; device is still +going to work but it will affect performance because all RX packets will be +passed to queue 0 and there will be no hash information. +.It ena%d: failed to tear down irq: %d +.It ena%d: dev has no parent while releasing res for irq: %d +Release of the interrupts failed. +.El +.Ss Additional diagnostic: +.Bl -diag +.It ena%d: Cannot get attribute for ena device +.Pp +This message appears when trying to change MTU and driver is unable to get +attributes from the device. +.It ena%d: Invalid MTU setting. new_mtu: %d +.Pp +Requested MTU value is not supported and will not be set. +.It ena%d: keep alive watchdog timeout +.Pp +Device stopped responding and will be reset. +.It ena%d: Found a Tx that wasn't completed on time, qid %d, index %d. +.Pp +Packet was pushed to the NIC but not sent within given time limit; it may +be caused by hang of the IO queue. +.It ena%d: The number of lost tx completion is aboce the threshold (%d > %d). Reset the device +.Pp +If too many Tx wasn't completed on time the device is going to be reset; it may +be caused by hanged queue or device. +.It ena%d: trigger reset is on +.Pp +Device will be reset; reset is triggered either by watchdog or if too many TX +packets were not completed on time. +.It ena%d: invalid value recvd +.Pp +Link status received from the device in the AENQ handler is invalid. +.It ena%d: Allocation for Tx Queue %u failed +.It ena%d: Allocation for Rx Queue %u failed +.It ena%d: Unable to create Rx DMA map for buffer %d +.It ena%d: Failed to create io TX queue #%d rc: %d +.It ena%d: Failed to get TX queue handlers. TX queue num %d rc: %d +.It ena%d: Failed to create io RX queue[%d] rc: %d +.It ena%d: Failed to get RX queue handlers. RX queue num %d rc: %d +.It ena%d: failed to request irq +.It ena%d: could not allocate irq vector: %d +.It ena%d: failed to register interrupt handler for irq %ju: %d +.Pp +IO resources initialization failed. Interface will not be brought up. +.It ena%d: LRO[%d] Initialization failed! +.Pp +Initialization of the LRO for the RX ring failed. +.It ena%d: failed to alloc buffer for rx queue +.It ena%d: failed to add buffer for rx queue %d +.It ena%d: refilled rx queue %d with %d pages only +.Pp +Allocation of resources used on RX path failed; if happened during +initialization of the IO queue, the interface will not be brought up. +.It ena%d: ioctl promisc/allmulti +.Pp +IOCTL request for the device to work in promiscuous/allmulti mode; see +.Xr ifconfig 8 +for more details. +.It ena%d: too many fragments. Last fragment: %d! +.Pp +Packet with unsupported number of segments was queued for sending to the +device; packet will be dropped. +.Sh SUPPORT +If an issue is identified with the released source code with a supported adapter +email the specific information related to the issue to +.Aq Mt mk@semihalf.com +and +.Aq Mt mw@semihalf.com . +.Sh SEE ALSO +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh AUTHORS +The +.Nm +driver was written by +.An Semihalf. Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon May 22 14:21:45 2017 (r318646) +++ head/sys/conf/files Mon May 22 14:46:13 2017 (r318647) @@ -1584,6 +1584,12 @@ dev/e1000/e1000_mbx.c optional em \ dev/e1000/e1000_osdep.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/et/if_et.c optional et +dev/ena/ena.c optional ena \ + compile-with "${NORMAL_C} -I$S/contrib" +dev/ena/ena_sysctl.c optional ena \ + compile-with "${NORMAL_C} -I$S/contrib" +contrib/ena-com/ena_com.c optional ena +contrib/ena-com/ena_eth_com.c optional ena dev/ep/if_ep.c optional ep dev/ep/if_ep_isa.c optional ep isa dev/ep/if_ep_pccard.c optional ep pccard Added: head/sys/dev/ena/ena.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ena/ena.c Mon May 22 14:46:13 2017 (r318647) @@ -0,0 +1,3769 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "ena.h" +#include "ena_sysctl.h" + +/********************************************************* + * Function prototypes + *********************************************************/ +static int ena_probe(device_t); +static void ena_intr_msix_mgmnt(void *); +static int ena_allocate_pci_resources(struct ena_adapter*); +static void ena_free_pci_resources(struct ena_adapter *); +static int ena_change_mtu(if_t, int); +static inline void ena_alloc_counters(counter_u64_t *, int); +static inline void ena_free_counters(counter_u64_t *, int); +static inline void ena_reset_counters(counter_u64_t *, int); +static void ena_init_io_rings_common(struct ena_adapter *, + struct ena_ring *, uint16_t); +static int ena_init_io_rings(struct ena_adapter *); +static void ena_free_io_ring_resources(struct ena_adapter *, unsigned int); +static void ena_free_all_io_rings_resources(struct ena_adapter *); +static int ena_setup_tx_dma_tag(struct ena_adapter *); +static int ena_free_tx_dma_tag(struct ena_adapter *); +static int ena_setup_rx_dma_tag(struct ena_adapter *); +static int ena_free_rx_dma_tag(struct ena_adapter *); +static int ena_setup_tx_resources(struct ena_adapter *, int); +static void ena_free_tx_resources(struct ena_adapter *, int); +static int ena_setup_all_tx_resources(struct ena_adapter *); +static void ena_free_all_tx_resources(struct ena_adapter *); +static int ena_setup_rx_resources(struct ena_adapter *, unsigned int); +static void ena_free_rx_resources(struct ena_adapter *, unsigned int); +static int ena_setup_all_rx_resources(struct ena_adapter *); +static void ena_free_all_rx_resources(struct ena_adapter *); +static inline int ena_alloc_rx_mbuf(struct ena_adapter *, struct ena_ring *, + struct ena_rx_buffer *); +static void ena_free_rx_mbuf(struct ena_adapter *, struct ena_ring *, + struct ena_rx_buffer *); +static int ena_refill_rx_bufs(struct ena_ring *, uint32_t); +static void ena_free_rx_bufs(struct ena_adapter *, unsigned int); +static void ena_refill_all_rx_bufs(struct ena_adapter *); +static void ena_free_all_rx_bufs(struct ena_adapter *); +static void ena_free_tx_bufs(struct ena_adapter *, unsigned int); +static void ena_free_all_tx_bufs(struct ena_adapter *); +static void ena_destroy_all_tx_queues(struct ena_adapter *); +static void ena_destroy_all_rx_queues(struct ena_adapter *); +static void ena_destroy_all_io_queues(struct ena_adapter *); +static int ena_create_io_queues(struct ena_adapter *); +static int ena_tx_cleanup(struct ena_ring *); +static int ena_rx_cleanup(struct ena_ring *); +static int validate_tx_req_id(struct ena_ring *, uint16_t); +static void ena_rx_hash_mbuf(struct ena_ring *, struct ena_com_rx_ctx *, + struct mbuf *); +static struct mbuf* ena_rx_mbuf(struct ena_ring *, struct ena_com_rx_buf_info *, + struct ena_com_rx_ctx *, uint16_t *); +static inline void ena_rx_checksum(struct ena_ring *, struct ena_com_rx_ctx *, + struct mbuf *); +static void ena_handle_msix(void *); +static int ena_enable_msix(struct ena_adapter *); +static void ena_setup_mgmnt_intr(struct ena_adapter *); +static void ena_setup_io_intr(struct ena_adapter *); +static int ena_request_mgmnt_irq(struct ena_adapter *); +static int ena_request_io_irq(struct ena_adapter *); +static void ena_free_mgmnt_irq(struct ena_adapter *); +static void ena_free_io_irq(struct ena_adapter *); +static void ena_free_irqs(struct ena_adapter*); +static void ena_disable_msix(struct ena_adapter *); +static void ena_unmask_all_io_irqs(struct ena_adapter *); +static int ena_rss_configure(struct ena_adapter *); +static int ena_up_complete(struct ena_adapter *); +static int ena_up(struct ena_adapter *); +static void ena_down(struct ena_adapter *); +static uint64_t ena_get_counter(if_t, ift_counter); +static int ena_media_change(if_t); +static void ena_media_status(if_t, struct ifmediareq *); +static void ena_init(void *); +static int ena_ioctl(if_t, u_long, caddr_t); +static int ena_get_dev_offloads(struct ena_com_dev_get_features_ctx *); +static void ena_update_host_info(struct ena_admin_host_info *, if_t); +static void ena_update_hwassist(struct ena_adapter *); +static int ena_setup_ifnet(device_t, struct ena_adapter *, + struct ena_com_dev_get_features_ctx *); +static void ena_tx_csum(struct ena_com_tx_ctx *, struct mbuf *); +static int ena_xmit_mbuf(struct ena_ring *, struct mbuf *); +static void ena_start_xmit(struct ena_ring *); +static int ena_mq_start(if_t, struct mbuf *); +static void ena_deferred_mq_start(void *, int); +static void ena_qflush(if_t); +static int ena_calc_io_queue_num(struct ena_adapter *, + struct ena_com_dev_get_features_ctx *); +static int ena_calc_queue_size(struct ena_adapter *, uint16_t *, + uint16_t *, struct ena_com_dev_get_features_ctx *); +static int ena_rss_init_default(struct ena_adapter *); +static void ena_rss_init_default_deferred(void *); +static void ena_config_host_info(struct ena_com_dev *); +static int ena_attach(device_t); +static int ena_detach(device_t); +static int ena_device_init(struct ena_adapter *, device_t, + struct ena_com_dev_get_features_ctx *, int *); +static int ena_enable_msix_and_set_admin_interrupts(struct ena_adapter *, + int); +static void ena_update_on_link_change(void *, struct ena_admin_aenq_entry *); +static void unimplemented_aenq_handler(void *, + struct ena_admin_aenq_entry *); +static void ena_timer_service(void *); + +static char ena_version[] = DEVICE_NAME DRV_MODULE_NAME " v" DRV_MODULE_VERSION; + +static SYSCTL_NODE(_hw, OID_AUTO, ena, CTLFLAG_RD, 0, "ENA driver parameters"); + +/* + * Tuneable number of buffers in the buf-ring (drbr) + */ +static int ena_buf_ring_size = 4096; +SYSCTL_INT(_hw_ena, OID_AUTO, buf_ring_size, CTLFLAG_RWTUN, + &ena_buf_ring_size, 0, "Size of the bufring"); + + +static ena_vendor_info_t ena_vendor_info_array[] = { + { PCI_VENDOR_ID_AMAZON, PCI_DEV_ID_ENA_PF, 0}, + { PCI_VENDOR_ID_AMAZON, PCI_DEV_ID_ENA_LLQ_PF, 0}, + { PCI_VENDOR_ID_AMAZON, PCI_DEV_ID_ENA_VF, 0}, + { PCI_VENDOR_ID_AMAZON, PCI_DEV_ID_ENA_LLQ_VF, 0}, + /* Last entry */ + { 0, 0, 0 } +}; + +/* + * Contains pointers to event handlers, e.g. link state chage. + */ +static struct ena_aenq_handlers aenq_handlers; + +void +ena_dmamap_callback(void *arg, bus_dma_segment_t *segs, int nseg, int error) +{ + if (error) + return; + *(bus_addr_t *) arg = segs[0].ds_addr; + return; +} + +int +ena_dma_alloc(device_t dmadev, bus_size_t size, + ena_mem_handle_t *dma , int mapflags) +{ + struct ena_adapter* adapter = device_get_softc(dmadev); + uint32_t maxsize = ((size - 1)/PAGE_SIZE + 1) * PAGE_SIZE; + uint64_t dma_space_addr = ENA_DMA_BIT_MASK(adapter->dma_width); + int error; + + if (dma_space_addr == 0) + dma_space_addr = BUS_SPACE_MAXADDR; + error = bus_dma_tag_create(bus_get_dma_tag(dmadev), /* parent */ + 8, 0, /* alignment, bounds */ + dma_space_addr, /* lowaddr */ + dma_space_addr, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + maxsize, /* maxsize */ + 1, /* nsegments */ + maxsize, /* maxsegsize */ + BUS_DMA_ALLOCNOW, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockarg */ + &dma->tag); + if (error) { + device_printf(dmadev, + "%s: bus_dma_tag_create failed: %d\n", + __func__, error); + goto fail_tag; + } + + error = bus_dmamem_alloc(dma->tag, (void**) &dma->vaddr, + BUS_DMA_COHERENT | BUS_DMA_ZERO, &dma->map); + if (error) { + device_printf(dmadev, + "%s: bus_dmamem_alloc(%ju) failed: %d\n", + __func__, (uintmax_t)size, error); + goto fail_map_create; + } + + dma->paddr = 0; + error = bus_dmamap_load(dma->tag, dma->map, dma->vaddr, + size, ena_dmamap_callback, &dma->paddr, mapflags); + if (error || dma->paddr == 0) { + device_printf(dmadev, + "%s: bus_dmamap_load failed: %d\n", + __func__, error); + goto fail_map_load; + } + + return (0); + +fail_map_load: + bus_dmamap_unload(dma->tag, dma->map); +fail_map_create: + bus_dmamem_free(dma->tag, dma->vaddr, dma->map); + bus_dma_tag_destroy(dma->tag); +fail_tag: + dma->tag = NULL; + + return (error); +} + +static int +ena_allocate_pci_resources(struct ena_adapter* adapter) +{ + device_t pdev = adapter->pdev; + int rid; + + rid = PCIR_BAR(ENA_REG_BAR); + adapter->memory = NULL; + adapter->registers = bus_alloc_resource_any(pdev, SYS_RES_MEMORY, + &rid, RF_ACTIVE); + if (adapter->registers == NULL) { + device_printf(pdev, "Unable to allocate bus resource: " + "registers\n"); + return (ENXIO); + } + + return (0); +} + +static void +ena_free_pci_resources(struct ena_adapter *adapter) +{ + device_t pdev = adapter->pdev; + + if (adapter->memory != NULL) { + bus_release_resource(pdev, SYS_RES_MEMORY, + PCIR_BAR(ENA_MEM_BAR), adapter->memory); + } + + if (adapter->registers != NULL) { + bus_release_resource(pdev, SYS_RES_MEMORY, + PCIR_BAR(ENA_REG_BAR), adapter->registers); + } + + return; +} + +static int +ena_probe(device_t dev) +{ + ena_vendor_info_t *ent; + char adapter_name[60]; + uint16_t pci_vendor_id = 0; + uint16_t pci_device_id = 0; + + pci_vendor_id = pci_get_vendor(dev); + pci_device_id = pci_get_device(dev); + + ent = ena_vendor_info_array; + while (ent->vendor_id != 0) { + if ((pci_vendor_id == ent->vendor_id) && + (pci_device_id == ent->device_id)) { + ena_trace(ENA_DBG, "vendor=%x device=%x ", + pci_vendor_id, pci_device_id); + + sprintf(adapter_name, DEVICE_DESC); + device_set_desc_copy(dev, adapter_name); + return (BUS_PROBE_DEFAULT); + } + + ent++; + + } + + return (ENXIO); +} + +static int +ena_change_mtu(if_t ifp, int new_mtu) +{ + struct ena_adapter *adapter = if_getsoftc(ifp); + struct ena_com_dev_get_features_ctx get_feat_ctx; + int rc, old_mtu, max_frame; + + rc = ena_com_get_dev_attr_feat(adapter->ena_dev, &get_feat_ctx); + if (rc) { + device_printf(adapter->pdev, + "Cannot get attribute for ena device\n"); + return (ENXIO); + } + + /* Save old MTU in case of fail */ + old_mtu = if_getmtu(ifp); + + /* Change MTU and calculate max frame */ + if_setmtu(ifp, new_mtu); + max_frame = ETHER_MAX_FRAME(ifp, ETHERTYPE_VLAN, 1); + + if ((new_mtu < ENA_MIN_FRAME_LEN) || + (new_mtu > get_feat_ctx.dev_attr.max_mtu) || + (max_frame > ENA_MAX_FRAME_LEN)) { + device_printf(adapter->pdev, "Invalid MTU setting. " + "new_mtu: %d\n", new_mtu); + goto error; + } + + rc = ena_com_set_dev_mtu(adapter->ena_dev, new_mtu); + if (rc != 0) + goto error; + + return (0); +error: + if_setmtu(ifp, old_mtu); + return (EINVAL); +} + +static inline void +ena_alloc_counters(counter_u64_t *begin, int size) +{ + counter_u64_t *end = (counter_u64_t *)((char *)begin + size); + + for (; begin < end; ++begin) + *begin = counter_u64_alloc(M_WAITOK); +} + +static inline void +ena_free_counters(counter_u64_t *begin, int size) +{ + counter_u64_t *end = (counter_u64_t *)((char *)begin + size); + + for (; begin < end; ++begin) + counter_u64_free(*begin); +} + +static inline void +ena_reset_counters(counter_u64_t *begin, int size) +{ + counter_u64_t *end = (counter_u64_t *)((char *)begin + size); + + for (; begin < end; ++begin) + counter_u64_zero(*begin); +} + +static void +ena_init_io_rings_common(struct ena_adapter *adapter, struct ena_ring *ring, + uint16_t qid) +{ + + ring->qid = qid; + ring->adapter = adapter; + ring->ena_dev = adapter->ena_dev; +} + +static int +ena_init_io_rings(struct ena_adapter *adapter) +{ + struct ena_com_dev *ena_dev; + struct ena_ring *txr, *rxr; + struct ena_que *que; + int i; + int rc; + + ena_dev = adapter->ena_dev; + + for (i = 0; i < adapter->num_queues; i++) { + txr = &adapter->tx_ring[i]; + rxr = &adapter->rx_ring[i]; + + /* TX/RX common ring state */ + ena_init_io_rings_common(adapter, txr, i); + ena_init_io_rings_common(adapter, rxr, i); + + /* TX specific ring state */ + txr->ring_size = adapter->tx_ring_size; + txr->tx_max_header_size = ena_dev->tx_max_header_size; + txr->tx_mem_queue_type = ena_dev->tx_mem_queue_type; + txr->smoothed_interval = + ena_com_get_nonadaptive_moderation_interval_tx(ena_dev); + + /* Allocate a buf ring */ + txr->br = buf_ring_alloc(ena_buf_ring_size, M_DEVBUF, + M_WAITOK, &txr->ring_mtx); + if (txr->br == NULL) { + device_printf(adapter->pdev, + "Error while setting up bufring\n"); + rc = ENOMEM; + goto err_bufr_free; + } + + /* Alloc TX statistics. */ + ena_alloc_counters((counter_u64_t *)&txr->tx_stats, + sizeof(txr->tx_stats)); + + /* RX specific ring state */ + rxr->ring_size = adapter->rx_ring_size; + rxr->rx_small_copy_len = adapter->small_copy_len; + rxr->smoothed_interval = + ena_com_get_nonadaptive_moderation_interval_rx(ena_dev); + + /* Alloc RX statistics. */ + ena_alloc_counters((counter_u64_t *)&rxr->rx_stats, + sizeof(rxr->rx_stats)); + + /* Initialize locks */ + snprintf(txr->mtx_name, nitems(txr->mtx_name), "%s:tx(%d)", + device_get_nameunit(adapter->pdev), i); + snprintf(rxr->mtx_name, nitems(rxr->mtx_name), "%s:rx(%d)", + device_get_nameunit(adapter->pdev), i); + + mtx_init(&txr->ring_mtx, txr->mtx_name, NULL, MTX_DEF); + mtx_init(&rxr->ring_mtx, rxr->mtx_name, NULL, MTX_DEF); + + que = &adapter->que[i]; + que->adapter = adapter; + que->id = i; + que->tx_ring = txr; + que->rx_ring = rxr; + + txr->que = que; + rxr->que = que; + } + + return 0; + +err_bufr_free: + while (i--) + ena_free_io_ring_resources(adapter, i); + + return (rc); +} + +static void +ena_free_io_ring_resources(struct ena_adapter *adapter, unsigned int qid) +{ + struct ena_ring *txr = &adapter->tx_ring[qid]; + struct ena_ring *rxr = &adapter->rx_ring[qid]; + + ena_free_counters((counter_u64_t *)&txr->tx_stats, + sizeof(txr->tx_stats)); + ena_free_counters((counter_u64_t *)&rxr->rx_stats, + sizeof(rxr->rx_stats)); + + mtx_destroy(&txr->ring_mtx); + mtx_destroy(&rxr->ring_mtx); + + drbr_free(txr->br, M_DEVBUF); + +} + +static void +ena_free_all_io_rings_resources(struct ena_adapter *adapter) +{ + int i; + + for (i = 0; i < adapter->num_queues; i++) + ena_free_io_ring_resources(adapter, i); + +} + +static int +ena_setup_tx_dma_tag(struct ena_adapter *adapter) +{ + int ret; + + /* Create DMA tag for Tx buffers */ + ret = bus_dma_tag_create(bus_get_dma_tag(adapter->pdev), + 1, 0, /* alignment, bounds */ + ENA_DMA_BIT_MASK(adapter->dma_width), /* lowaddr */ + ENA_DMA_BIT_MASK(adapter->dma_width), /* highaddr */ + NULL, NULL, /* filter, filterarg */ + ENA_TSO_MAXSIZE, /* maxsize */ + adapter->max_tx_sgl_size, /* nsegments */ + ENA_TSO_MAXSIZE, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockfuncarg */ + &adapter->tx_buf_tag); + + if (ret != 0) + device_printf(adapter->pdev, "Unable to create Tx DMA tag\n"); + + return (ret); +} + +static int +ena_free_tx_dma_tag(struct ena_adapter *adapter) +{ + int ret; + + ret = bus_dma_tag_destroy(adapter->tx_buf_tag); + + if (ret == 0) + adapter->tx_buf_tag = NULL; + + return (ret); +} + +static int +ena_setup_rx_dma_tag(struct ena_adapter *adapter) +{ + int ret; + + /* Create DMA tag for Rx buffers*/ + ret = bus_dma_tag_create(bus_get_dma_tag(adapter->pdev), /* parent */ + 1, 0, /* alignment, bounds */ + ENA_DMA_BIT_MASK(adapter->dma_width), /* lowaddr */ + ENA_DMA_BIT_MASK(adapter->dma_width), /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MJUM16BYTES, /* maxsize */ + 1, /* nsegments */ + MJUM16BYTES, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockarg */ + &adapter->rx_buf_tag); + + if (ret != 0) + device_printf(adapter->pdev, "Unable to create Rx DMA tag\n"); + + return (ret); +} + +static int +ena_free_rx_dma_tag(struct ena_adapter *adapter) +{ + int ret; + + ret = bus_dma_tag_destroy(adapter->rx_buf_tag); + + if (ret == 0) + adapter->rx_buf_tag = NULL; + + return (ret); +} + + +/** + * ena_setup_tx_resources - allocate Tx resources (Descriptors) + * @adapter: network interface device structure + * @qid: queue index + * + * Returns 0 on success, otherwise on failure. + **/ +static int +ena_setup_tx_resources(struct ena_adapter *adapter, int qid) +{ + struct ena_que *que = &adapter->que[qid]; + struct ena_ring *tx_ring = que->tx_ring; + int size, i, err; +#ifdef RSS + cpuset_t cpu_mask; +#endif + + size = sizeof(struct ena_tx_buffer) * tx_ring->ring_size; + + tx_ring->tx_buffer_info = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO); + if (!tx_ring->tx_buffer_info) + goto err_tx_buffer_info; + + size = sizeof(uint16_t) * tx_ring->ring_size; + tx_ring->free_tx_ids = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO); + if (!tx_ring->free_tx_ids) + goto err_tx_reqs; + + /* Req id stack for TX OOO completions */ + for (i = 0; i < tx_ring->ring_size; i++) + tx_ring->free_tx_ids[i] = i; + + /* Reset TX statistics. */ + ena_reset_counters((counter_u64_t *)&tx_ring->tx_stats, + sizeof(tx_ring->tx_stats)); + + tx_ring->next_to_use = 0; + tx_ring->next_to_clean = 0; + + /* Make sure that drbr is empty */ + drbr_flush(adapter->ifp, tx_ring->br); + + /* ... and create the buffer DMA maps */ + for (i = 0; i < tx_ring->ring_size; i++) { + err = bus_dmamap_create(adapter->tx_buf_tag, 0, + &tx_ring->tx_buffer_info[i].map); + if (err != 0) { + device_printf(adapter->pdev, + "Unable to create Tx DMA map for buffer %d\n", i); + goto err_tx_map; + } + } + + /* Allocate taskqueues */ + TASK_INIT(&tx_ring->enqueue_task, 0, ena_deferred_mq_start, tx_ring); + tx_ring->enqueue_tq = taskqueue_create_fast("ena_tx_enque", M_NOWAIT, + taskqueue_thread_enqueue, &tx_ring->enqueue_tq); + if (tx_ring->enqueue_tq == NULL) { + device_printf(adapter->pdev, + "Unable to create taskqueue for enqueue task\n"); + i = tx_ring->ring_size; + goto err_tx_map; + } + + /* RSS set cpu for thread */ +#ifdef RSS + CPU_SETOF(que->cpu, &cpu_mask); + taskqueue_start_threads_cpuset(&tx_ring->enqueue_tq, 1, PI_NET, + &cpu_mask, "%s tx_ring enq (bucket %d)", + device_get_nameunit(adapter->pdev), que->cpu); +#else /* RSS */ + taskqueue_start_threads(&tx_ring->enqueue_tq, 1, PI_NET, + "%s txeq %d", device_get_nameunit(adapter->pdev), que->cpu); +#endif /* RSS */ + + return (0); + +err_tx_map: + while (i--) { + bus_dmamap_destroy(adapter->tx_buf_tag, + tx_ring->tx_buffer_info[i].map); + } + ENA_MEM_FREE(adapter->ena_dev->dmadev, tx_ring->free_tx_ids); +err_tx_reqs: + ENA_MEM_FREE(adapter->ena_dev->dmadev, tx_ring->tx_buffer_info); +err_tx_buffer_info: + return (ENOMEM); +} + +/** + * ena_free_tx_resources - Free Tx Resources per Queue + * @adapter: network interface device structure + * @qid: queue index + * + * Free all transmit software resources + **/ +static void +ena_free_tx_resources(struct ena_adapter *adapter, int qid) +{ + struct ena_ring *tx_ring = &adapter->tx_ring[qid]; + + while (taskqueue_cancel(tx_ring->enqueue_tq, &tx_ring->enqueue_task, + NULL)) + taskqueue_drain(tx_ring->enqueue_tq, &tx_ring->enqueue_task); + + taskqueue_free(tx_ring->enqueue_tq); + + /* Flush buffer ring, */ + drbr_flush(adapter->ifp, tx_ring->br); + + /* Free buffer DMA maps, */ + for (int i = 0; i < tx_ring->ring_size; i++) { + m_freem(tx_ring->tx_buffer_info[i].mbuf); + tx_ring->tx_buffer_info[i].mbuf = NULL; + bus_dmamap_unload(adapter->tx_buf_tag, + tx_ring->tx_buffer_info[i].map); + bus_dmamap_destroy(adapter->tx_buf_tag, + tx_ring->tx_buffer_info[i].map); + } + + /* And free allocated memory. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 22 14:57:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82C08D78800; Mon, 22 May 2017 14:57:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 002701E51; Mon, 22 May 2017 14:57:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4MEvJ9q067730 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 May 2017 17:57:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4MEvJ9q067730 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4MEvJOR067729; Mon, 22 May 2017 17:57:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 22 May 2017 17:57:19 +0300 From: Konstantin Belousov To: Stephen McConnell Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi Message-ID: <20170522145719.GS1622@kib.kiev.ua> References: <201705172133.v4HLXbi6044710@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705172133.v4HLXbi6044710@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 14:57:25 -0000 On Wed, May 17, 2017 at 09:33:37PM +0000, Stephen McConnell wrote: > Author: slm > Date: Wed May 17 21:33:37 2017 > New Revision: 318427 > URL: https://svnweb.freebsd.org/changeset/base/318427 > > Log: > Add tri-mode support (SAS/SATA/PCIe). > > This includes NVMe device support and adds support for the following adapters: > SAS 3408 > SAS 3416 > SAS 3508 > SAS 3516 > SAS 3616 > SAS 3708 > SAS 3716 > > Reviewed by: ken, scottl, asomers, mav > Approved by: ken, scottl, mav > MFC after: 2 weeks > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D10095 It seems that this commit causes the following compilation issue: cc1: warnings being treated as errors /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c: In function 'mprsas_build_nvme_unm ap': /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c:1839: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] --- mpr_sas.o --- *** [mpr_sas.o] Error code 1 at least on powerpc. From owner-svn-src-all@freebsd.org Mon May 22 15:12:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EE40D78C40; Mon, 22 May 2017 15:12:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03C87183C; Mon, 22 May 2017 15:12:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MFCojF062475; Mon, 22 May 2017 15:12:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MFCodE062474; Mon, 22 May 2017 15:12:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705221512.v4MFCodE062474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 22 May 2017 15:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318648 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 15:12:51 -0000 Author: asomers Date: Mon May 22 15:12:49 2017 New Revision: 318648 URL: https://svnweb.freebsd.org/changeset/base/318648 Log: MFC r318189: vdev_geom may associate multiple vdevs per g_consumer vdev_geom.c currently uses the g_consumer's private field to point to a vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For example, when you remove a disk, the vdev's status will change to REMOVED. However, vdev_geom will sometimes attach multiple vdevs to the same GEOM consumer. If this happens, then geom events will only be propagated to one of the vdevs. Fix this by storing a linked list of vdevs in g_consumer's private field. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c * g_consumer.private now stores a linked list of vdev pointers associated with the consumer instead of just a single vdev pointer. * Change vdev_geom_set_physpath's signature to more closely match vdev_geom_set_rotation_rate * Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed that we've already accessed the consumer by the time we get here. * Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it in vdev_geom_open, after we know that the open has succeeded. PR: 218634 Reviewed by: gibbs Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10391 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon May 22 14:46:13 2017 (r318647) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon May 22 15:12:49 2017 (r318648) @@ -49,6 +49,16 @@ struct g_class zfs_vdev_class = { .attrchanged = vdev_geom_attrchanged, }; +struct consumer_vdev_elem { + SLIST_ENTRY(consumer_vdev_elem) elems; + vdev_t *vd; +}; + +SLIST_HEAD(consumer_priv_t, consumer_vdev_elem); +_Static_assert(sizeof(((struct g_consumer*)NULL)->private) + == sizeof(struct consumer_priv_t*), + "consumer_priv_t* can't be stored in g_consumer.private"); + DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev); SYSCTL_DECL(_vfs_zfs_vdev); @@ -85,21 +95,16 @@ vdev_geom_set_rotation_rate(vdev_t *vd, } static void -vdev_geom_set_physpath(struct g_consumer *cp, boolean_t do_null_update) +vdev_geom_set_physpath(vdev_t *vd, struct g_consumer *cp, + boolean_t do_null_update) { boolean_t needs_update = B_FALSE; - vdev_t *vd; char *physpath; int error, physpath_len; - if (g_access(cp, 1, 0, 0) != 0) - return; - - vd = cp->private; physpath_len = MAXPATHLEN; physpath = g_malloc(physpath_len, M_WAITOK|M_ZERO); error = g_io_getattr("GEOM::physpath", cp, &physpath_len, physpath); - g_access(cp, -1, 0, 0); if (error == 0) { char *old_physpath; @@ -130,37 +135,40 @@ vdev_geom_set_physpath(struct g_consumer static void vdev_geom_attrchanged(struct g_consumer *cp, const char *attr) { - vdev_t *vd; char *old_physpath; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; int error; - vd = cp->private; - if (vd == NULL) + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) return; - if (strcmp(attr, "GEOM::rotation_rate") == 0) { - vdev_geom_set_rotation_rate(vd, cp); - return; - } - - if (strcmp(attr, "GEOM::physpath") == 0) { - vdev_geom_set_physpath(cp, /*do_null_update*/B_TRUE); - return; + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + if (strcmp(attr, "GEOM::rotation_rate") == 0) { + vdev_geom_set_rotation_rate(vd, cp); + return; + } + if (strcmp(attr, "GEOM::physpath") == 0) { + vdev_geom_set_physpath(vd, cp, /*null_update*/B_TRUE); + return; + } } } static void vdev_geom_orphan(struct g_consumer *cp) { - vdev_t *vd; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; g_topology_assert(); - vd = cp->private; - if (vd == NULL) { + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) /* Vdev close in progress. Ignore the event. */ return; - } /* * Orphan callbacks occur from the GEOM event thread. @@ -176,8 +184,12 @@ vdev_geom_orphan(struct g_consumer *cp) * async removal support to invoke a close on this * vdev once it is safe to do so. */ - vd->vdev_remove_wanted = B_TRUE; - spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + + vd->vdev_remove_wanted = B_TRUE; + spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + } } static struct g_consumer * @@ -265,21 +277,8 @@ vdev_geom_attach(struct g_provider *pp, } } - /* - * BUG: cp may already belong to a vdev. This could happen if: - * 1) That vdev is a shared spare, or - * 2) We are trying to reopen a missing vdev and we are scanning by - * guid. In that case, we'll ultimately fail to open this consumer, - * but not until after setting the private field. - * The solution is to: - * 1) Don't set the private field until after the open succeeds, and - * 2) Set it to a linked list of vdevs, not just a single vdev - */ - cp->private = vd; - if (vd != NULL) { + if (vd != NULL) vd->vdev_tsd = cp; - vdev_geom_set_physpath(cp, /*do_null_update*/B_FALSE); - } cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; return (cp); @@ -289,16 +288,12 @@ static void vdev_geom_detach(struct g_consumer *cp, boolean_t open_for_read) { struct g_geom *gp; - vdev_t *vd; g_topology_assert(); ZFS_LOG(1, "Detaching from %s.", cp->provider && cp->provider->name ? cp->provider->name : "NULL"); - vd = cp->private; - cp->private = NULL; - gp = cp->geom; if (open_for_read) g_access(cp, -1, 0, -1); @@ -324,16 +319,26 @@ static void vdev_geom_close_locked(vdev_t *vd) { struct g_consumer *cp; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem, *elem_temp; g_topology_assert(); cp = vd->vdev_tsd; - vd->vdev_tsd = NULL; vd->vdev_delayed_close = B_FALSE; if (cp == NULL) return; ZFS_LOG(1, "Closing access to %s.", cp->provider->name); + KASSERT(cp->private != NULL, ("%s: cp->private is NULL", __func__)); + priv = (struct consumer_priv_t*)&cp->private; + vd->vdev_tsd = NULL; + SLIST_FOREACH_SAFE(elem, priv, elems, elem_temp) { + if (elem->vd == vd) { + SLIST_REMOVE(priv, elem, consumer_vdev_elem, elems); + g_free(elem); + } + } vdev_geom_detach(cp, B_TRUE); } @@ -870,11 +875,27 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi cp = NULL; } } + if (cp != NULL) { + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; + + priv = (struct consumer_priv_t*)&cp->private; + if (cp->private == NULL) + SLIST_INIT(priv); + elem = g_malloc(sizeof(*elem), M_WAITOK|M_ZERO); + elem->vd = vd; + SLIST_INSERT_HEAD(priv, elem, elems); + } /* Fetch initial physical path information for this device. */ - if (cp != NULL) + if (cp != NULL) { vdev_geom_attrchanged(cp, "GEOM::physpath"); + /* Set other GEOM characteristics */ + vdev_geom_set_physpath(vd, cp, /*do_null_update*/B_FALSE); + vdev_geom_set_rotation_rate(vd, cp); + } + g_topology_unlock(); PICKUP_GIANT(); if (cp == NULL) { @@ -905,11 +926,6 @@ skip_open: */ vd->vdev_nowritecache = B_FALSE; - /* - * Determine the device's rotation rate. - */ - vdev_geom_set_rotation_rate(vd, cp); - return (0); } From owner-svn-src-all@freebsd.org Mon May 22 15:29:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D57AD78215; Mon, 22 May 2017 15:29:12 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 150081F8E; Mon, 22 May 2017 15:29:12 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MFTBbv066797; Mon, 22 May 2017 15:29:11 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MFTAm2066795; Mon, 22 May 2017 15:29:10 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201705221529.v4MFTAm2066795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 22 May 2017 15:29:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318649 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 15:29:12 -0000 Author: tuexen Date: Mon May 22 15:29:10 2017 New Revision: 318649 URL: https://svnweb.freebsd.org/changeset/base/318649 Log: The connect() system call should return -1 and set errno to EAFNOSUPPORT if it is called on a TCP socket * with an IPv6 address and the socket is bound to an IPv4-mapped IPv6 address. * with an IPv4-mapped IPv6 address and the socket is bound to an IPv6 address. Thanks to Jonathan T. Leighton for reporting this issue. Reviewed by: bz gnn MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9163 Modified: head/sys/netinet/tcp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Mon May 22 15:12:49 2017 (r318648) +++ head/sys/netinet/tcp_usrreq.c Mon May 22 15:29:10 2017 (r318649) @@ -597,6 +597,10 @@ tcp6_usr_connect(struct socket *so, stru error = EINVAL; goto out; } + if ((inp->inp_vflag & INP_IPV4) == 0) { + error = EAFNOSUPPORT; + goto out; + } in6_sin6_2_sin(&sin, sin6p); inp->inp_vflag |= INP_IPV4; @@ -614,6 +618,11 @@ tcp6_usr_connect(struct socket *so, stru #endif error = tp->t_fb->tfb_tcp_output(tp); goto out; + } else { + if ((inp->inp_vflag & INP_IPV6) == 0) { + error = EAFNOSUPPORT; + goto out; + } } #endif inp->inp_vflag &= ~INP_IPV4; Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Mon May 22 15:12:49 2017 (r318648) +++ head/sys/netinet6/udp6_usrreq.c Mon May 22 15:29:10 2017 (r318649) @@ -1119,6 +1119,10 @@ udp6_connect(struct socket *so, struct s error = EINVAL; goto out; } + if ((inp->inp_vflag & INP_IPV4) == 0) { + error = EAFNOSUPPORT; + goto out; + } if (inp->inp_faddr.s_addr != INADDR_ANY) { error = EISCONN; goto out; @@ -1136,6 +1140,11 @@ udp6_connect(struct socket *so, struct s if (error == 0) soisconnected(so); goto out; + } else { + if ((inp->inp_vflag & INP_IPV6) == 0) { + error = EAFNOSUPPORT; + goto out; + } } #endif if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { From owner-svn-src-all@freebsd.org Mon May 22 15:51:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83317D78B44; Mon, 22 May 2017 15:51:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54AA21F87; Mon, 22 May 2017 15:51:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MFpHZ7075526; Mon, 22 May 2017 15:51:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MFpHRA075525; Mon, 22 May 2017 15:51:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221551.v4MFpHRA075525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 15:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318650 - in stable: 10/usr.bin/grep 11/usr.bin/grep X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 15:51:18 -0000 Author: gjb Date: Mon May 22 15:51:17 2017 New Revision: 318650 URL: https://svnweb.freebsd.org/changeset/base/318650 Log: MFC r313955 (emaste): bsdgrep: document ignored option -u MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if running on an UNIX system." The option has no effect on systems that do not use CRLF line endings. PR: 171200 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/grep/grep.1 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/grep/grep.1 Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.bin/grep/grep.1 ============================================================================== --- stable/10/usr.bin/grep/grep.1 Mon May 22 15:29:10 2017 (r318649) +++ stable/10/usr.bin/grep/grep.1 Mon May 22 15:51:17 2017 (r318650) @@ -352,6 +352,8 @@ Nonexistent and unreadable files are ign (i.e. their error messages are suppressed). .It Fl U , Fl Fl binary Search binary files, but do not attempt to print them. +.It Fl u +This option has no effect and is provided only for compatibility with GNU grep. .It Fl V , Fl Fl version Display version information and exit. .It Fl v , Fl Fl invert-match From owner-svn-src-all@freebsd.org Mon May 22 15:51:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C338ED78B4A; Mon, 22 May 2017 15:51:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 932481F88; Mon, 22 May 2017 15:51:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MFpHTF075532; Mon, 22 May 2017 15:51:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MFpHAh075531; Mon, 22 May 2017 15:51:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221551.v4MFpHAh075531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 15:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318650 - in stable: 10/usr.bin/grep 11/usr.bin/grep X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 15:51:18 -0000 Author: gjb Date: Mon May 22 15:51:17 2017 New Revision: 318650 URL: https://svnweb.freebsd.org/changeset/base/318650 Log: MFC r313955 (emaste): bsdgrep: document ignored option -u MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if running on an UNIX system." The option has no effect on systems that do not use CRLF line endings. PR: 171200 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.bin/grep/grep.1 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/grep/grep.1 Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.bin/grep/grep.1 ============================================================================== --- stable/11/usr.bin/grep/grep.1 Mon May 22 15:29:10 2017 (r318649) +++ stable/11/usr.bin/grep/grep.1 Mon May 22 15:51:17 2017 (r318650) @@ -352,6 +352,8 @@ Nonexistent and unreadable files are ign (i.e. their error messages are suppressed). .It Fl U , Fl Fl binary Search binary files, but do not attempt to print them. +.It Fl u +This option has no effect and is provided only for compatibility with GNU grep. .It Fl V , Fl Fl version Display version information and exit. .It Fl v , Fl Fl invert-match From owner-svn-src-all@freebsd.org Mon May 22 15:53:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 639EFD78C50; Mon, 22 May 2017 15:53:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 337B21375; Mon, 22 May 2017 15:53:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MFrUmr079169; Mon, 22 May 2017 15:53:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MFrU8s079168; Mon, 22 May 2017 15:53:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705221553.v4MFrU8s079168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 15:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318651 - head/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 15:53:31 -0000 Author: ngie Date: Mon May 22 15:53:30 2017 New Revision: 318651 URL: https://svnweb.freebsd.org/changeset/base/318651 Log: Remove glimpse make target added in r181432 The textproc/glimpse port expired over 3 years ago because there weren't any more publicly available distfiles, and because it lacked a maintainer. Remove the target as it's no longer executable on FreeBSD. Differential Revision: D10764 MFC after: 1 month Reviewed by: imp Sponsored by: Dell EMC Isilon Modified: head/sys/Makefile Modified: head/sys/Makefile ============================================================================== --- head/sys/Makefile Mon May 22 15:51:17 2017 (r318650) +++ head/sys/Makefile Mon May 22 15:53:30 2017 (r318651) @@ -59,19 +59,7 @@ TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope. rm -f ${.CURDIR}/TAGS cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files -# You need the textproc/glimpse ports for this. -glimpse: -.if !exists(${.CURDIR}/.glimpse_exclude) - echo .svn > ${.CURDIR}/.glimpse_exclude - echo /compile/ >> ${.CURDIR}/.glimpse_exclude -.endif - cd ${.CURDIR}; glimpseindex -H . -B -f -o . - -glimpse-clean: - cd ${.CURDIR}; rm -f .glimpse_* - -.if !(make(cscope) || make(cscope-clean) || make(cscope-hook) || make(TAGS) || \ - make(glimpse) || make(glimpse-clean)) +.if !(make(cscope) || make(cscope-clean) || make(cscope-hook) || make(TAGS)) .include # The boot loader From owner-svn-src-all@freebsd.org Mon May 22 15:53:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08769D78C8C for ; Mon, 22 May 2017 15:53:38 +0000 (UTC) (envelope-from stephen.mcconnell@broadcom.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1C3213C3 for ; Mon, 22 May 2017 15:53:37 +0000 (UTC) (envelope-from stephen.mcconnell@broadcom.com) Received: by mail-io0-x234.google.com with SMTP id p24so84120375ioi.0 for ; Mon, 22 May 2017 08:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:references:in-reply-to:mime-version:thread-index:date :message-id:subject:to:cc; bh=XmVrJ/uykKBFhuLNtRLWv6zlyX+dgAC+clAxGBBlH/A=; b=BKUEOStPvmto0mnklLAQV+qq4wcxiyVrybLITz17m2KoFfygXaFDHBuNJlrXRs7ARo LvRBeUhOG3MkGQcaolMeQS/W8gIv96zKps2WOnOKSlAco8zR3Y3sYEOAdbufc1SN9j93 HY6Y8n2iKuRkYd0dRCSHTmIYXsnFdfv14CwXk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc; bh=XmVrJ/uykKBFhuLNtRLWv6zlyX+dgAC+clAxGBBlH/A=; b=s8BegznQprcn3HXRgcmEyN7rKjgRhs5RwUBC2ihQ4DisTliowdva8CKhA7AiJQuGel SFIhZ0g49Ckaok2gbsC3ppt3Qk9le5mtBuKU5ZXd5SvwZ1nOB39ajwt7RNm+lNCfOEq+ cn+LuzMal/zmMFv1DwDlBftfaCI79uGjy8dRLZIsV4nhbWeM/GUMXs9fPh3OmII5/R5g sI2FNT3JAUJYwrL091Cxz8KdNigvi1+31Js0yEi9MnVcjvnhUkNPTBIp0JAag3dLJc4Y wQ8KHgwc4H4KSNg0YcgPBtehPfvVHM/4EUS9gilTVfzVcEPp/OjzoeRHjrdH93d2uLbI m7mw== X-Gm-Message-State: AODbwcDcA6U8WWLB2xBon59aLgKNtFxm97EJHBWuTFanXXOH7BUZ1/R0 9C4NOhHCN6be5tPD9Il2l7qgfg1mzl1B X-Received: by 10.107.135.20 with SMTP id j20mr23232128iod.56.1495468416918; Mon, 22 May 2017 08:53:36 -0700 (PDT) From: Stephen Mcconnell References: <201705172133.v4HLXbi6044710@repo.freebsd.org> <20170522145719.GS1622@kib.kiev.ua> In-Reply-To: <20170522145719.GS1622@kib.kiev.ua> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIMtlBOfE3fpeKohkny3vGsD68sXQDlJpdooYWRLyA= Date: Mon, 22 May 2017 09:53:35 -0600 Message-ID: Subject: RE: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi To: Konstantin Belousov , Stephen McConnell Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 15:53:38 -0000 > -----Original Message----- > From: Konstantin Belousov [mailto:kostikbel@gmail.com] > Sent: Monday, May 22, 2017 8:57 AM > To: Stephen McConnell > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr > sys/dev/mpr/mpi > > On Wed, May 17, 2017 at 09:33:37PM +0000, Stephen McConnell wrote: > > Author: slm > > Date: Wed May 17 21:33:37 2017 > > New Revision: 318427 > > URL: https://svnweb.freebsd.org/changeset/base/318427 > > > > Log: > > Add tri-mode support (SAS/SATA/PCIe). > > > > This includes NVMe device support and adds support for the following > adapters: > > SAS 3408 > > SAS 3416 > > SAS 3508 > > SAS 3516 > > SAS 3616 > > SAS 3708 > > SAS 3716 > > > > Reviewed by: ken, scottl, asomers, mav > > Approved by: ken, scottl, mav > > MFC after: 2 weeks > > Relnotes: yes > > Differential Revision: https://reviews.freebsd.org/D10095 > > It seems that this commit causes the following compilation issue: > > cc1: warnings being treated as errors > /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c: In function > 'mprsas_build_nvme_unm > ap': > /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c:1839: warning: cast to pointer > from integer of different size [-Wint-to-pointer-cast] > --- mpr_sas.o --- > *** [mpr_sas.o] Error code 1 > > at least on powerpc. Thanks. I'll take a look. From owner-svn-src-all@freebsd.org Mon May 22 16:07:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDC76D78FA7; Mon, 22 May 2017 16:07:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD1C21D0C; Mon, 22 May 2017 16:07:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MG7Hoh084083; Mon, 22 May 2017 16:07:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MG7HnY084082; Mon, 22 May 2017 16:07:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221607.v4MG7HnY084082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 16:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318652 - stable/11/etc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 16:07:19 -0000 Author: gjb Date: Mon May 22 16:07:17 2017 New Revision: 318652 URL: https://svnweb.freebsd.org/changeset/base/318652 Log: MFC r307469 (imp): Allow root_rw_mount to be both lower and upper case. Before, if it was upper case, you'd wind up with a read-only filesystem when you should sometimes. PR: 213549 Sponsored by: The FreeBSD Foundation Modified: stable/11/etc/rc Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc ============================================================================== --- stable/11/etc/rc Mon May 22 15:53:30 2017 (r318651) +++ stable/11/etc/rc Mon May 22 16:07:17 2017 (r318652) @@ -135,16 +135,16 @@ done # Note: this assumes firstboot_sentinel is on / when we have # a read-only /, or that it is on media that's writable. if [ -e ${firstboot_sentinel} ]; then - [ ${root_rw_mount} = "yes" ] || mount -uw / + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -uw / chflags -R 0 ${firstboot_sentinel} rm -rf ${firstboot_sentinel} if [ -e ${firstboot_sentinel}-reboot ]; then chflags -R 0 ${firstboot_sentinel}-reboot rm -rf ${firstboot_sentinel}-reboot - [ ${root_rw_mount} = "yes" ] || mount -ur / + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur / kill -INT 1 fi - [ ${root_rw_mount} = "yes" ] || mount -ur / + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur / fi echo '' From owner-svn-src-all@freebsd.org Mon May 22 16:11:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF3E9D78198; Mon, 22 May 2017 16:11:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F3651185; Mon, 22 May 2017 16:11:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MGBkxg088082; Mon, 22 May 2017 16:11:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MGBkVK088081; Mon, 22 May 2017 16:11:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221611.v4MGBkVK088081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 16:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318653 - in stable: 10/usr.bin/sort 11/usr.bin/sort X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 16:11:47 -0000 Author: gjb Date: Mon May 22 16:11:46 2017 New Revision: 318653 URL: https://svnweb.freebsd.org/changeset/base/318653 Log: MFC r305613 (gabor): Fix typo. PR: 211245 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/sort/sort.1.in Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/sort/sort.1.in Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.bin/sort/sort.1.in ============================================================================== --- stable/10/usr.bin/sort/sort.1.in Mon May 22 16:07:17 2017 (r318652) +++ stable/10/usr.bin/sort/sort.1.in Mon May 22 16:11:46 2017 (r318653) @@ -133,7 +133,7 @@ also checks that there are no lines with .It Fl s Stable sort. This option maintains the original record order of records that have -and equal key. +an equal key. This is a non-standard feature, but it is widely accepted and used. .It Fl Fl version Print the version and silently exits. From owner-svn-src-all@freebsd.org Mon May 22 16:11:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AEC7D7819C; Mon, 22 May 2017 16:11:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0C331187; Mon, 22 May 2017 16:11:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MGBkQt088088; Mon, 22 May 2017 16:11:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MGBkwZ088087; Mon, 22 May 2017 16:11:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221611.v4MGBkwZ088087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 16:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318653 - in stable: 10/usr.bin/sort 11/usr.bin/sort X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 16:11:48 -0000 Author: gjb Date: Mon May 22 16:11:46 2017 New Revision: 318653 URL: https://svnweb.freebsd.org/changeset/base/318653 Log: MFC r305613 (gabor): Fix typo. PR: 211245 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.bin/sort/sort.1.in Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/sort/sort.1.in Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.bin/sort/sort.1.in ============================================================================== --- stable/11/usr.bin/sort/sort.1.in Mon May 22 16:07:17 2017 (r318652) +++ stable/11/usr.bin/sort/sort.1.in Mon May 22 16:11:46 2017 (r318653) @@ -133,7 +133,7 @@ also checks that there are no lines with .It Fl s Stable sort. This option maintains the original record order of records that have -and equal key. +an equal key. This is a non-standard feature, but it is widely accepted and used. .It Fl Fl version Print the version and silently exits. From owner-svn-src-all@freebsd.org Mon May 22 16:13:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CA31D78556; Mon, 22 May 2017 16:13:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 651451883; Mon, 22 May 2017 16:13:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MGDUl0088311; Mon, 22 May 2017 16:13:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MGDUlN088310; Mon, 22 May 2017 16:13:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221613.v4MGDUlN088310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 16:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318654 - head/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 16:13:31 -0000 Author: dim Date: Mon May 22 16:13:30 2017 New Revision: 318654 URL: https://svnweb.freebsd.org/changeset/base/318654 Log: For now, disable building libc++experimental for arm, since there are a number of static assertion failures in the time_t related parts. Reported by: mmel, kib Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon May 22 16:11:46 2017 (r318653) +++ head/lib/Makefile Mon May 22 16:13:30 2017 (r318654) @@ -156,7 +156,10 @@ _libclang_rt= libclang_rt .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt -_libcplusplus= libc++ libc++experimental +_libcplusplus= libc++ +.if ${MACHINE_CPUARCH} != "arm" +_libcplusplus+= libc++experimental +.endif .endif SUBDIR.${MK_EFI}+= libefivar From owner-svn-src-all@freebsd.org Mon May 22 16:16:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71980D78718; Mon, 22 May 2017 16:16:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3BE1C6C; Mon, 22 May 2017 16:16:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MGGnMN088486; Mon, 22 May 2017 16:16:49 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MGGnGw088483; Mon, 22 May 2017 16:16:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221616.v4MGGnGw088483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 16:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318655 - in head/contrib/llvm: include/llvm/MC lib/MC lib/Target/ARM/MCTargetDesc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 16:16:50 -0000 Author: dim Date: Mon May 22 16:16:48 2017 New Revision: 318655 URL: https://svnweb.freebsd.org/changeset/base/318655 Log: Pull in r302416 from upstream llvm trunk (by Martin Storsjö): [ARM] Clear the constant pool cache on explicit .ltorg directives Multiple ldr pseudoinstructions with the same constant value will reuse the same constant pool entry. However, if the constant pool is explicitly flushed with a .ltorg directive, we should not try to reference constants in the previous pool any longer, since they may be out of range. This fixes assembling hand-written assembler source which repeatedly loads the same constant value, across a binary size larger than the pc-relative fixup range for ldr instructions (4096 bytes). Such assembler source already uses explicit .ltorg instructions to emit constant pools with regular intervals. However if we try to reuse constants emitted in earlier pools, they end up out of range. This makes the output of the testcase match what binutils gas does (prior to this patch, it would fail to assemble). Differential Revision: https://reviews.llvm.org/D32847 This should fix "out of range pc-relative fixup value" errors, when compiling certain ARM inline assembly for www/webkit-gtk[23]. Reported by: mmel MFC after: 3 days Modified: head/contrib/llvm/include/llvm/MC/ConstantPools.h head/contrib/llvm/lib/MC/ConstantPools.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Modified: head/contrib/llvm/include/llvm/MC/ConstantPools.h ============================================================================== --- head/contrib/llvm/include/llvm/MC/ConstantPools.h Mon May 22 16:13:30 2017 (r318654) +++ head/contrib/llvm/include/llvm/MC/ConstantPools.h Mon May 22 16:16:48 2017 (r318655) @@ -60,6 +60,8 @@ public: // Return true if the constant pool is empty bool empty(); + + void clearCache(); }; class AssemblerConstantPools { @@ -83,6 +85,7 @@ class AssemblerConstantPools { public: void emitAll(MCStreamer &Streamer); void emitForCurrentSection(MCStreamer &Streamer); + void clearCacheForCurrentSection(MCStreamer &Streamer); const MCExpr *addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc); Modified: head/contrib/llvm/lib/MC/ConstantPools.cpp ============================================================================== --- head/contrib/llvm/lib/MC/ConstantPools.cpp Mon May 22 16:13:30 2017 (r318654) +++ head/contrib/llvm/lib/MC/ConstantPools.cpp Mon May 22 16:16:48 2017 (r318655) @@ -54,6 +54,10 @@ const MCExpr *ConstantPool::addEntry(con bool ConstantPool::empty() { return Entries.empty(); } +void ConstantPool::clearCache() { + CachedEntries.clear(); +} + // // AssemblerConstantPools implementation // @@ -95,6 +99,13 @@ void AssemblerConstantPools::emitForCurr } } +void AssemblerConstantPools::clearCacheForCurrentSection(MCStreamer &Streamer) { + MCSection *Section = Streamer.getCurrentSectionOnly(); + if (ConstantPool *CP = getConstantPool(Section)) { + CP->clearCache(); + } +} + const MCExpr *AssemblerConstantPools::addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc) { Modified: head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp ============================================================================== --- head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Mon May 22 16:13:30 2017 (r318654) +++ head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Mon May 22 16:16:48 2017 (r318655) @@ -33,6 +33,7 @@ const MCExpr *ARMTargetStreamer::addCons void ARMTargetStreamer::emitCurrentConstantPool() { ConstantPools->emitForCurrentSection(Streamer); + ConstantPools->clearCacheForCurrentSection(Streamer); } // finish() - write out any non-empty assembler constant pools. From owner-svn-src-all@freebsd.org Mon May 22 19:22:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBD56D79F27; Mon, 22 May 2017 19:22:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A574A1260; Mon, 22 May 2017 19:22:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJM6C3067103; Mon, 22 May 2017 19:22:06 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJM6tp067099; Mon, 22 May 2017 19:22:06 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705221922.v4MJM6tp067099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 22 May 2017 19:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318657 - in stable/11/sys: dev/qlnx/qlnxe modules/qlnx/qlnxe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:22:08 -0000 Author: davidcs Date: Mon May 22 19:22:06 2017 New Revision: 318657 URL: https://svnweb.freebsd.org/changeset/base/318657 Log: MFC r318382 1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for processing interrupts drops to around 1% for 100G and under 1% for other speeds. 2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN 3. remove unused mtx tx_lock 4. bind taskqueue kernel thread to the appropriate cpu core 5. when tx_ring is full, stop further transmits till at least 1/16th of the Tx Ring is empty. In our case 1K entries. Also if there are rx_pkts to process, put the taskqueue thread to sleep for 100ms, before enabling interrupts. 6. Use rx_pkt_threshold of 128. Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c stable/11/sys/dev/qlnx/qlnxe/qlnx_os.h stable/11/sys/modules/qlnx/qlnxe/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:22:06 2017 (r318657) @@ -191,6 +191,7 @@ struct qlnx_fastpath { struct mtx tx_mtx; char tx_mtx_name[32]; struct buf_ring *tx_br; + uint32_t tx_ring_full; struct task fp_task; struct taskqueue *fp_taskqueue; @@ -364,6 +365,8 @@ struct qlnx_host { /* debug */ uint32_t dbg_level; + uint32_t dbg_trace_lro_cnt; + uint32_t dbg_trace_tso_pkt_len; uint32_t dp_level; uint32_t dp_module; @@ -386,7 +389,6 @@ struct qlnx_host { /* tx related */ struct callout tx_callout; - struct mtx tx_lock; uint32_t txr_idx; /* rx related */ Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:22:06 2017 (r318657) @@ -382,16 +382,77 @@ qlnx_fp_taskqueue(void *context, int pen struct ifnet *ifp; struct mbuf *mp; int ret; + int lro_enable, tc; + int rx_int = 0, total_rx_count = 0; + struct thread *cthread; fp = context; if (fp == NULL) return; + cthread = curthread; + + thread_lock(cthread); + + if (!sched_is_bound(cthread)) + sched_bind(cthread, fp->rss_id); + + thread_unlock(cthread); + ha = (qlnx_host_t *)fp->edev; ifp = ha->ifp; + lro_enable = ha->ifp->if_capenable & IFCAP_LRO; + + rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, lro_enable); + + if (rx_int) { + fp->rx_pkts += rx_int; + total_rx_count += rx_int; + } + +#ifdef QLNX_SOFT_LRO + { + struct lro_ctrl *lro; + + lro = &fp->rxq->lro; + + if (lro_enable && total_rx_count) { + +#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) + + if (ha->dbg_trace_lro_cnt) { + if (lro->lro_mbuf_count & ~1023) + fp->lro_cnt_1024++; + else if (lro->lro_mbuf_count & ~511) + fp->lro_cnt_512++; + else if (lro->lro_mbuf_count & ~255) + fp->lro_cnt_256++; + else if (lro->lro_mbuf_count & ~127) + fp->lro_cnt_128++; + else if (lro->lro_mbuf_count & ~63) + fp->lro_cnt_64++; + } + tcp_lro_flush_all(lro); + +#else + struct lro_entry *queued; + + while ((!SLIST_EMPTY(&lro->lro_active))) { + queued = SLIST_FIRST(&lro->lro_active); + SLIST_REMOVE_HEAD(&lro->lro_active, next); + tcp_lro_flush(lro, queued); + } +#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ + } + } +#endif /* #ifdef QLNX_SOFT_LRO */ + + ecore_sb_update_sb_idx(fp->sb_info); + rmb(); + mtx_lock(&fp->tx_mtx); if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != @@ -401,13 +462,19 @@ qlnx_fp_taskqueue(void *context, int pen goto qlnx_fp_taskqueue_exit; } - (void)qlnx_tx_int(ha, fp, fp->txq[0]); + for (tc = 0; tc < ha->num_tc; tc++) { + (void)qlnx_tx_int(ha, fp, fp->txq[tc]); + } mp = drbr_peek(ifp, fp->tx_br); while (mp != NULL) { - ret = qlnx_send(ha, fp, &mp); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = qlnx_send(ha, fp, &mp); + } else { + ret = -1; + } if (ret) { @@ -428,14 +495,28 @@ qlnx_fp_taskqueue(void *context, int pen fp->tx_pkts_processed++; } + if (fp->tx_ring_full) + break; + mp = drbr_peek(ifp, fp->tx_br); } - (void)qlnx_tx_int(ha, fp, fp->txq[0]); + for (tc = 0; tc < ha->num_tc; tc++) { + (void)qlnx_tx_int(ha, fp, fp->txq[tc]); + } mtx_unlock(&fp->tx_mtx); qlnx_fp_taskqueue_exit: + if (rx_int) { + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + } else { + if (fp->tx_ring_full) { + qlnx_mdelay(__func__, 100); + } + ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); + } QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); return; @@ -504,7 +585,9 @@ qlnx_drain_fp_taskqueues(qlnx_host_t *ha fp = &ha->fp_array[i]; if (fp->fp_taskqueue != NULL) { + QLNX_UNLOCK(ha); taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + QLNX_LOCK(ha); } } return; @@ -540,7 +623,6 @@ qlnx_pci_attach(device_t dev) ha->pci_dev = dev; mtx_init(&ha->hw_lock, "qlnx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF); - mtx_init(&ha->tx_lock, "qlnx_tx_lock", MTX_NETWORK_LOCK, MTX_DEF); ha->flags.lock_init = 1; @@ -944,7 +1026,6 @@ qlnx_release(qlnx_host_t *ha) pci_release_msi(dev); if (ha->flags.lock_init) { - mtx_destroy(&ha->tx_lock); mtx_destroy(&ha->hw_lock); } @@ -1226,7 +1307,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h CTLFLAG_RD, &ha->fp_array[i].err_tx_cons_idx_conflict, "err_tx_cons_idx_conflict"); -#ifdef QLNX_TRACE_LRO_CNT SYSCTL_ADD_QUAD(ctx, node_children, OID_AUTO, "lro_cnt_64", CTLFLAG_RD, &ha->fp_array[i].lro_cnt_64, @@ -1251,7 +1331,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h OID_AUTO, "lro_cnt_1024", CTLFLAG_RD, &ha->fp_array[i].lro_cnt_1024, "lro_cnt_1024"); -#endif /* #ifdef QLNX_TRACE_LRO_CNT */ /* Rx Related */ @@ -1710,6 +1789,18 @@ qlnx_add_sysctls(qlnx_host_t *ha) OID_AUTO, "dp_level", CTLFLAG_RW, &ha->dp_level, ha->dp_level, "DP Level"); + ha->dbg_trace_lro_cnt = 0; + SYSCTL_ADD_UINT(ctx, children, + OID_AUTO, "dbg_trace_lro_cnt", CTLFLAG_RW, + &ha->dbg_trace_lro_cnt, ha->dbg_trace_lro_cnt, + "Trace LRO Counts"); + + ha->dbg_trace_tso_pkt_len = 0; + SYSCTL_ADD_UINT(ctx, children, + OID_AUTO, "dbg_trace_tso_pkt_len", CTLFLAG_RW, + &ha->dbg_trace_tso_pkt_len, ha->dbg_trace_tso_pkt_len, + "Trace TSO packet lengths"); + ha->dp_module = 0; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dp_module", CTLFLAG_RW, @@ -1755,7 +1846,7 @@ qlnx_add_sysctls(qlnx_host_t *ha) &ha->tx_coalesce_usecs, ha->tx_coalesce_usecs, "tx_coalesce_usecs"); - ha->rx_pkt_threshold = 32; + ha->rx_pkt_threshold = 128; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_pkt_threshold", CTLFLAG_RW, &ha->rx_pkt_threshold, ha->rx_pkt_threshold, @@ -2162,7 +2253,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd ifp->if_mtu = ifr->ifr_mtu; ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { qlnx_init_locked(ha); } @@ -2178,7 +2269,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd QLNX_LOCK(ha); if (ifp->if_flags & IFF_UP) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if ((ifp->if_flags ^ ha->if_flags) & IFF_PROMISC) { ret = qlnx_set_promisc(ha); @@ -2712,6 +2803,16 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f tx_data_bd = NULL; txq = fp->txq[0]; + + if (fp->tx_ring_full) { + elem_left = ecore_chain_get_elem_left(&txq->tx_pbl); + + if (elem_left < (TX_RING_SIZE >> 4)) + return (-1); + else + fp->tx_ring_full = 0; + } + idx = txq->sw_tx_prod; map = txq->sw_tx_ring[idx].map; @@ -2720,20 +2821,18 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (!fp->tx_tso_min_pkt_len) { - fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - } else { - if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len) + if (ha->dbg_trace_tso_pkt_len) { + if (!fp->tx_tso_min_pkt_len) { fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len) - fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len; + fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; + } else { + if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len) + fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; + if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len) + fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len; + } } -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ - if (m_head->m_pkthdr.csum_flags & CSUM_TSO) offset = qlnx_tcp_offset(ha, m_head); @@ -2815,14 +2914,12 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f QL_ASSERT(ha, (nsegs != 0), ("qlnx_send: empty packet")); -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (nsegs < QLNX_FP_MAX_SEGS) - fp->tx_pkts[(nsegs - 1)]++; - else - fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; - -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ + if (ha->dbg_trace_tso_pkt_len) { + if (nsegs < QLNX_FP_MAX_SEGS) + fp->tx_pkts[(nsegs - 1)]++; + else + fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; + } if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { @@ -2843,6 +2940,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f __func__, nsegs, elem_left, fp->rss_id)); fp->err_tx_nsegs_gt_elem_left++; + fp->tx_ring_full = 1; ha->storm_stats_enable = 1; return (ENOBUFS); } @@ -3051,15 +3149,13 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f first_bd->data.nbds = nbd; -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (fp->tx_tso_max_nsegs < nsegs) - fp->tx_tso_max_nsegs = nsegs; - - if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs)) - fp->tx_tso_min_nsegs = nsegs; + if (ha->dbg_trace_tso_pkt_len) { + if (fp->tx_tso_max_nsegs < nsegs) + fp->tx_tso_max_nsegs = nsegs; -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ + if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs)) + fp->tx_tso_min_nsegs = nsegs; + } txq->sw_tx_ring[idx].nsegs = nsegs; txq->sw_tx_prod = (txq->sw_tx_prod + 1) & (TX_RING_SIZE - 1); @@ -4188,11 +4284,9 @@ qlnx_fp_isr(void *arg) qlnx_ivec_t *ivec = arg; qlnx_host_t *ha; struct qlnx_fastpath *fp = NULL; - int idx, lro_enable, tc; - int rx_int = 0, total_rx_count = 0; + int idx; ha = ivec->ha; - lro_enable = ha->ifp->if_capenable & IFCAP_LRO; if (ha->state != QLNX_STATE_OPEN) { return; @@ -4214,73 +4308,8 @@ qlnx_fp_isr(void *arg) ha->err_fp_null++; } else { ecore_sb_ack(fp->sb_info, IGU_INT_DISABLE, 0); - - do { - for (tc = 0; tc < ha->num_tc; tc++) { - if (mtx_trylock(&fp->tx_mtx)) { - qlnx_tx_int(ha, fp, fp->txq[tc]); - mtx_unlock(&fp->tx_mtx); - } - } - - rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, - lro_enable); - - if (rx_int) { - fp->rx_pkts += rx_int; - total_rx_count += rx_int; - } - - } while (rx_int); - - -#ifdef QLNX_SOFT_LRO - { - struct lro_ctrl *lro; - - lro = &fp->rxq->lro; - - if (lro_enable && total_rx_count) { - -#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) - -#ifdef QLNX_TRACE_LRO_CNT - if (lro->lro_mbuf_count & ~1023) - fp->lro_cnt_1024++; - else if (lro->lro_mbuf_count & ~511) - fp->lro_cnt_512++; - else if (lro->lro_mbuf_count & ~255) - fp->lro_cnt_256++; - else if (lro->lro_mbuf_count & ~127) - fp->lro_cnt_128++; - else if (lro->lro_mbuf_count & ~63) - fp->lro_cnt_64++; -#endif /* #ifdef QLNX_TRACE_LRO_CNT */ - - tcp_lro_flush_all(lro); - -#else - struct lro_entry *queued; - - while ((!SLIST_EMPTY(&lro->lro_active))) { - queued = SLIST_FIRST(&lro->lro_active); - SLIST_REMOVE_HEAD(&lro->lro_active, \ - next); - tcp_lro_flush(lro, queued); - } -#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ - } - } -#endif /* #ifdef QLNX_SOFT_LRO */ - - if (fp->fp_taskqueue != NULL) - taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); - - ecore_sb_update_sb_idx(fp->sb_info); - rmb(); - ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); - - return; + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); } return; @@ -5150,6 +5179,8 @@ qlnx_init_fp(qlnx_host_t *ha) snprintf(fp->name, sizeof(fp->name), "%s-fp-%d", qlnx_name_str, rss_id); + fp->tx_ring_full = 0; + /* reset all the statistics counters */ fp->tx_pkts_processed = 0; Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_os.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_os.h Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_os.h Mon May 22 19:22:06 2017 (r318657) @@ -92,6 +92,7 @@ #include #include #include +#include static __inline int qlnx_ms_to_hz(int ms) { @@ -138,10 +139,6 @@ MALLOC_DECLARE(M_QLNXBUF); #define QLNX_LOCK(ha) mtx_lock(&ha->hw_lock) #define QLNX_UNLOCK(ha) mtx_unlock(&ha->hw_lock) - -#define QLNX_TX_LOCK(ha) mtx_lock(&ha->tx_lock); -#define QLNX_TX_UNLOCK(ha) mtx_unlock(&ha->tx_lock); - /* * structure encapsulating a DMA buffer */ Modified: stable/11/sys/modules/qlnx/qlnxe/Makefile ============================================================================== --- stable/11/sys/modules/qlnx/qlnxe/Makefile Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/modules/qlnx/qlnxe/Makefile Mon May 22 19:22:06 2017 (r318657) @@ -63,8 +63,6 @@ CFLAGS += -DECORE_CONFIG_DIRECT_HWFN #CFLAGS += -DQLNX_SOFT_LRO #CFLAGS += -DQLNX_QSORT_LRO #CFLAGS += -DQLNX_MAX_COALESCE -#CFLAGS += -DQLNX_TRACE_LRO_CNT -#CFLAGS += -DQLNX_TRACE_TSO_PKT_LEN .include From owner-svn-src-all@freebsd.org Mon May 22 19:28:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30EA6D7810D; Mon, 22 May 2017 19:28:40 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE90D176A; Mon, 22 May 2017 19:28:39 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJSdHb068320; Mon, 22 May 2017 19:28:39 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJScfL068317; Mon, 22 May 2017 19:28:38 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705221928.v4MJScfL068317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 22 May 2017 19:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318659 - stable/11/sys/dev/qlnx/qlnxe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:28:40 -0000 Author: davidcs Date: Mon May 22 19:28:38 2017 New Revision: 318659 URL: https://svnweb.freebsd.org/changeset/base/318659 Log: MFC r318383 QL_DPRINT macro modfied to handle multiple args; print line#. Submitted by:Shminderjit.Singh@cavium.com Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:28:24 2017 (r318658) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:28:38 2017 (r318659) @@ -483,35 +483,141 @@ typedef struct qlnx_host qlnx_host_t; #ifdef QLNX_DEBUG -#define QL_DPRINT1(ha, x) if (ha->dbg_level & 0x0001) device_printf x -#define QL_DPRINT2(ha, x) if (ha->dbg_level & 0x0002) device_printf x -#define QL_DPRINT3(ha, x) if (ha->dbg_level & 0x0004) device_printf x -#define QL_DPRINT4(ha, x) if (ha->dbg_level & 0x0008) device_printf x -#define QL_DPRINT5(ha, x) if (ha->dbg_level & 0x0010) device_printf x -#define QL_DPRINT6(ha, x) if (ha->dbg_level & 0x0020) device_printf x -#define QL_DPRINT7(ha, x) if (ha->dbg_level & 0x0040) device_printf x -#define QL_DPRINT8(ha, x) if (ha->dbg_level & 0x0080) device_printf x -#define QL_DPRINT9(ha, x) if (ha->dbg_level & 0x0100) device_printf x -#define QL_DPRINT11(ha, x) if (ha->dbg_level & 0x0400) device_printf x -#define QL_DPRINT12(ha, x) if (ha->dbg_level & 0x0800) device_printf x -#define QL_DPRINT13(ha, x) if (ha->dbg_level & 0x1000) device_printf x -#define QL_DPRINT14(ha, x) if (ha->dbg_level & 0x2000) device_printf x +#define QL_DPRINT1(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0001) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT2(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0002) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT3(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0004) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT4(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0008) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT5(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0010) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT6(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0020) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT7(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0040) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT8(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0080) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT9(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0100) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT11(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0400) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT12(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0800) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT13(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x1000) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + #else -#define QL_DPRINT1(ha, x) -#define QL_DPRINT2(ha, x) -#define QL_DPRINT3(ha, x) -#define QL_DPRINT4(ha, x) -#define QL_DPRINT5(ha, x) -#define QL_DPRINT6(ha, x) -#define QL_DPRINT7(ha, x) -#define QL_DPRINT8(ha, x) -#define QL_DPRINT9(ha, x) -#define QL_DPRINT11(ha, x) -#define QL_DPRINT12(ha, x) -#define QL_DPRINT13(ha, x) -#define QL_DPRINT14(ha, x) +#define QL_DPRINT1(ha, x, ...) +#define QL_DPRINT2(ha, x, ...) +#define QL_DPRINT3(ha, x, ...) +#define QL_DPRINT4(ha, x, ...) +#define QL_DPRINT5(ha, x, ...) +#define QL_DPRINT6(ha, x, ...) +#define QL_DPRINT7(ha, x, ...) +#define QL_DPRINT8(ha, x, ...) +#define QL_DPRINT9(ha, x, ...) +#define QL_DPRINT11(ha, x, ...) +#define QL_DPRINT12(ha, x, ...) +#define QL_DPRINT13(ha, x, ...) #endif /* #ifdef QLNX_DEBUG */ Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Mon May 22 19:28:24 2017 (r318658) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Mon May 22 19:28:38 2017 (r318659) @@ -121,8 +121,7 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : ecore_ptt_acquire failed\n", - __func__)); + QL_DPRINT1(ha,"ecore_ptt_acquire failed\n"); return (rval); } @@ -133,9 +132,8 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t rval = 0; ha->grcdump_taken = 1; } else - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_dbg_grc_dump failed [%d, 0x%x]\n", - __func__, hwfn_index, rval)); + QL_DPRINT1(ha,"ecore_dbg_grc_dump failed [%d, 0x%x]\n", + hwfn_index, rval); ecore_ptt_release(p_hwfn, p_ptt); @@ -177,8 +175,7 @@ qlnx_get_grc_dump(qlnx_host_t *ha, qlnx_ grcdump->grcdump_dwords[i] = dwords; - QL_DPRINT1(ha, (ha->pci_dev, "%s: grcdump_dwords[%d] = 0x%x\n", - __func__, i, dwords)); + QL_DPRINT1(ha,"grcdump_dwords[%d] = 0x%x\n", i, dwords); rval = copyout(ha->grcdump[i], grcdump->grcdump[i], ha->grcdump_size[i]); @@ -213,8 +210,7 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_ptt_acquire failed\n", __func__)); + QL_DPRINT1(ha,"ecore_ptt_acquire failed\n"); return (rval); } @@ -225,9 +221,8 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t rval = 0; ha->idle_chk_taken = 1; } else - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n", - __func__, hwfn_index, rval)); + QL_DPRINT1(ha,"ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n", + hwfn_index, rval); ecore_ptt_release(p_hwfn, p_ptt); @@ -271,8 +266,7 @@ qlnx_get_idle_chk(qlnx_host_t *ha, qlnx_ idle_chk->idle_chk_dwords[i] = dwords; - QL_DPRINT1(ha, (ha->pci_dev, "%s: idle_chk_dwords[%d] = 0x%x\n", - __func__, i, dwords)); + QL_DPRINT1(ha,"idle_chk_dwords[%d] = 0x%x\n", i, dwords); rval = copyout(ha->idle_chk[i], idle_chk->idle_chk[i], ha->idle_chk_size[i]); @@ -299,9 +293,8 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha, p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: ecore_ptt_acquire [%d, 0x%x]failed\n", - __func__, hwfn_index, cmd)); + QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n", + hwfn_index, cmd); return (0); } @@ -334,8 +327,7 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha, } if (rval != DBG_STATUS_OK) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n", - __func__, cmd, rval)); + QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", cmd, rval); num_dwords = 0; } @@ -369,9 +361,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn buffer = qlnx_zalloc(trace->size[hwfn_index]); if (buffer == NULL) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: qlnx_zalloc [%d, 0x%x]failed\n", - __func__, hwfn_index, trace->cmd)); + QL_DPRINT1(ha,"qlnx_zalloc [%d, 0x%x]failed\n", + hwfn_index, trace->cmd); return (ENXIO); } ecore_dbg_set_app_ver(ecore_dbg_get_fw_func_ver()); @@ -380,9 +371,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: ecore_ptt_acquire [%d, 0x%x]failed\n", - __func__, hwfn_index, trace->cmd)); + QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n", + hwfn_index, trace->cmd); return (ENXIO); } @@ -420,8 +410,7 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn } if (rval != DBG_STATUS_OK) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n", - __func__, trace->cmd, rval)); + QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", trace->cmd, rval); num_dwords = 0; } @@ -609,21 +598,18 @@ qlnx_write_nvram(qlnx_host_t *ha, qlnx_n ret = copyin(nvram->data, buf, nvram->data_len); - QL_DPRINT9(ha, - (ha->pci_dev, "%s: issue cmd = 0x%x data = %p " - " data_len = 0x%x ret = 0x%x exit\n", __func__, - cmd, nvram->data, nvram->data_len, ret)); + QL_DPRINT9(ha, "issue cmd = 0x%x data = %p \ + data_len = 0x%x ret = 0x%x exit\n", + cmd, nvram->data, nvram->data_len, ret); if (ret == 0) { ret = ecore_mcp_nvm_write(&ha->cdev, cmd, nvram->offset, buf, nvram->data_len); } - QL_DPRINT9(ha, - (ha->pci_dev, "%s: cmd = 0x%x data = %p " - " data_len = 0x%x resp = 0x%x ret = 0x%x exit\n", - __func__, cmd, nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "cmd = 0x%x data = %p \ + data_len = 0x%x resp = 0x%x ret = 0x%x exit\n", + cmd, nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); free(buf, M_QLNXBUF); @@ -644,10 +630,9 @@ qlnx_read_nvram(qlnx_host_t *ha, qlnx_nv ret = ecore_mcp_nvm_read(&ha->cdev, nvram->offset, buf, nvram->data_len); - QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x " - " resp = 0x%x ret = 0x%x exit\n", __func__, - nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, " data = %p data_len = 0x%x \ + resp = 0x%x ret = 0x%x exit\n", + nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); if (ret == 0) { ret = copyout(buf, nvram->data, nvram->data_len); @@ -672,10 +657,9 @@ qlnx_get_nvram_resp(qlnx_host_t *ha, qln ret = ecore_mcp_nvm_resp(&ha->cdev, buf); - QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x " - " resp = 0x%x ret = 0x%x exit\n", __func__, - nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "data = %p data_len = 0x%x \ + resp = 0x%x ret = 0x%x exit\n", + nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); if (ret == 0) { ret = copyout(buf, nvram->data, nvram->data_len); @@ -708,28 +692,25 @@ qlnx_nvram(qlnx_host_t *ha, qlnx_nvram_t case QLNX_NVRAM_CMD_SET_SECURE_MODE: ret = ecore_mcp_nvm_set_secure_mode(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_SET_SECURE_MODE " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_SET_SECURE_MODE \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_DEL_FILE: ret = ecore_mcp_nvm_del_file(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_DEL_FILE " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_DEL_FILE \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_PUT_FILE_BEGIN: ret = ecore_mcp_nvm_put_file_begin(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_PUT_FILE_BEGIN " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_PUT_FILE_BEGIN \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_GET_NVRAM_RESP: Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:28:24 2017 (r318658) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:28:38 2017 (r318659) @@ -303,7 +303,7 @@ qlnx_sp_intr(void *arg) ha = (qlnx_host_t *)p_hwfn->p_dev; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < ha->cdev.num_hwfns; i++) { if (&ha->cdev.hwfns[i] == p_hwfn) { @@ -311,7 +311,7 @@ qlnx_sp_intr(void *arg) break; } } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -353,8 +353,7 @@ qlnx_create_sp_taskqueues(qlnx_host_t *h taskqueue_start_threads(&ha->sp_taskqueue[i], 1, PI_NET, "%s", tq_name); - QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, - ha->sp_taskqueue[i])); + QL_DPRINT1(ha, "%p\n", ha->sp_taskqueue[i]); } return (0); @@ -518,7 +517,7 @@ qlnx_fp_taskqueue_exit: ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + QL_DPRINT2(ha, "exit ret = %d\n", ret); return; } @@ -548,8 +547,7 @@ qlnx_create_fp_taskqueues(qlnx_host_t *h taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s", tq_name); - QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, - fp->fp_taskqueue)); + QL_DPRINT1(ha, "%p\n",fp->fp_taskqueue); } return (0); @@ -711,15 +709,14 @@ qlnx_pci_attach(device_t dev) else ha->num_rss = ha->msix_count - ha->cdev.num_hwfns; - QL_DPRINT1(ha, (dev, "%s:\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]" + QL_DPRINT1(ha, "\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]" "\n\t\t\tdbells [%p, 0x%08x 0x%08x]" "\n\t\t\tmsix [%p, 0x%08x 0x%08x 0x%x 0x%x]" "\n\t\t\t[ncpus = %d][num_rss = 0x%x] [num_tc = 0x%x]\n", - __func__, ha->pci_reg, rsrc_len_reg, + ha->pci_reg, rsrc_len_reg, ha->reg_rid, ha->pci_dbells, rsrc_len_dbells, ha->dbells_rid, ha->msix_bar, rsrc_len_msix, ha->msix_rid, pci_msix_count(dev), - ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc)); - + ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc); if (pci_alloc_msix(dev, &ha->msix_count)) { device_printf(dev, "%s: pci_alloc_msix[%d] failed\n", __func__, ha->msix_count); @@ -755,9 +752,9 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; } - QL_DPRINT1(ha, (dev, "%s: p_hwfn [%p] sp_irq_rid %d" - " sp_irq %p sp_handle %p\n", __func__, p_hwfn, - ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i])); + QL_DPRINT1(ha, "p_hwfn [%p] sp_irq_rid %d" + " sp_irq %p sp_handle %p\n", p_hwfn, + ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i]); } @@ -800,8 +797,8 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; ha->grcdump_size[i] = ha->grcdump_size[i] << 2; - QL_DPRINT1(ha, (dev, "grcdump_size[%d] = 0x%08x\n", - i, ha->grcdump_size[i])); + QL_DPRINT1(ha, "grcdump_size[%d] = 0x%08x\n", + i, ha->grcdump_size[i]); ha->grcdump[i] = qlnx_zalloc(ha->grcdump_size[i]); if (ha->grcdump[i] == NULL) { @@ -815,8 +812,8 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; ha->idle_chk_size[i] = ha->idle_chk_size[i] << 2; - QL_DPRINT1(ha, (dev, "idle_chk_size[%d] = 0x%08x\n", - i, ha->idle_chk_size[i])); + QL_DPRINT1(ha, "idle_chk_size[%d] = 0x%08x\n", + i, ha->idle_chk_size[i]); ha->idle_chk[i] = qlnx_zalloc(ha->idle_chk_size[i]); @@ -855,8 +852,8 @@ qlnx_pci_attach(device_t dev) FW_MAJOR_VERSION, FW_MINOR_VERSION, FW_REVISION_VERSION, FW_ENGINEERING_VERSION); - QL_DPRINT1(ha, (dev, "%s: STORM_FW version %s MFW version %s\n", - __func__, ha->stormfw_ver, ha->mfw_ver)); + QL_DPRINT1(ha, "STORM_FW version %s MFW version %s\n", + ha->stormfw_ver, ha->mfw_ver); qlnx_init_ifnet(dev, ha); @@ -874,7 +871,7 @@ qlnx_pci_attach_err0: goto qlnx_pci_attach_err; } - QL_DPRINT2(ha, (dev, "%s: success\n", __func__)); + QL_DPRINT2(ha, "success\n"); return (0); @@ -958,7 +955,7 @@ qlnx_release(qlnx_host_t *ha) dev = ha->pci_dev; - QL_DPRINT2(ha, (dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < QLNX_MAX_HW_FUNCS; i++) { if (ha->idle_chk[i] != NULL) { @@ -1041,7 +1038,7 @@ qlnx_release(qlnx_host_t *ha) (void) bus_release_resource(dev, SYS_RES_MEMORY, ha->msix_rid, ha->msix_bar); - QL_DPRINT2(ha, (dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -1053,14 +1050,14 @@ qlnx_trigger_dump(qlnx_host_t *ha) if (ha->ifp != NULL) ha->ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QL_DPRINT2(ha, (ha->pci_dev, "%s: start\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < ha->cdev.num_hwfns; i++) { qlnx_grc_dump(ha, &ha->grcdump_dwords[i], i); qlnx_idle_chk(ha, &ha->idle_chk_dwords[i], i); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: end\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -1779,12 +1776,11 @@ qlnx_add_sysctls(qlnx_host_t *ha) "\tpersonality = 6 => Default in Shared Memory\n"); ha->dbg_level = 0; - SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "debug", CTLFLAG_RW, &ha->dbg_level, ha->dbg_level, "Debug Level"); - ha->dp_level = 0; + ha->dp_level = 0x01; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dp_level", CTLFLAG_RW, &ha->dp_level, ha->dp_level, "DP Level"); @@ -1999,7 +1995,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_ ifmedia_set(&ha->media, (IFM_ETHER | IFM_AUTO)); - QL_DPRINT2(ha, (dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2009,6 +2005,8 @@ qlnx_init_locked(qlnx_host_t *ha) { struct ifnet *ifp = ha->ifp; + QL_DPRINT1(ha, "Driver Initialization start \n"); + qlnx_stop(ha); if (qlnx_load(ha) == 0) { @@ -2026,13 +2024,13 @@ qlnx_init(void *arg) ha = (qlnx_host_t *)arg; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); QLNX_LOCK(ha); qlnx_init_locked(ha); QLNX_UNLOCK(ha); - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2221,8 +2219,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd switch (cmd) { case SIOCSIFADDR: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFADDR (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd); if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; @@ -2231,10 +2228,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd qlnx_init_locked(ha); QLNX_UNLOCK(ha); } - QL_DPRINT4(ha, (ha->pci_dev, - "%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", - __func__, cmd, - ntohl(IA_SIN(ifa)->sin_addr.s_addr))); + QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", + cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); arp_ifinit(ifp, ifa); } else { @@ -2243,8 +2238,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFMTU: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFMTU (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFMTU (0x%lx)\n", cmd); if (ifr->ifr_mtu > QLNX_MAX_MTU) { ret = EINVAL; @@ -2263,8 +2257,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFFLAGS: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFFLAGS (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFFLAGS (0x%lx)\n", cmd); QLNX_LOCK(ha); @@ -2292,8 +2285,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCADDMULTI: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); + QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCADDMULTI", cmd); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if (qlnx_set_multi(ha, 1)) @@ -2302,8 +2294,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCDELMULTI: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); + QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCDELMULTI", cmd); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if (qlnx_set_multi(ha, 0)) @@ -2313,9 +2304,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd case SIOCSIFMEDIA: case SIOCGIFMEDIA: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", cmd); + ret = ifmedia_ioctl(ifp, ifr, &ha->media, cmd); break; @@ -2323,8 +2313,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd mask = ifr->ifr_reqcap ^ ifp->if_capenable; - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFCAP (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFCAP (0x%lx)\n", cmd); if (mask & IFCAP_HWCSUM) ifp->if_capenable ^= IFCAP_HWCSUM; @@ -2367,8 +2356,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, "%s :" - " ecore_ptt_acquire failed\n", __func__)); + QL_DPRINT1(ha, "ecore_ptt_acquire failed\n"); ret = -1; break; } @@ -2386,20 +2374,19 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd ret = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); - QL_DPRINT8(ha, (ha->pci_dev, "SIOCGI2C copyout ret = %d" - " len = %d addr = 0x%02x offset = 0x%04x" - " data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x" - " 0x%02x 0x%02x 0x%02x\n", + QL_DPRINT8(ha, "SIOCGI2C copyout ret = %d \ + len = %d addr = 0x%02x offset = 0x%04x \ + data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x \ + 0x%02x 0x%02x 0x%02x\n", ret, i2c.len, i2c.dev_addr, i2c.offset, i2c.data[0], i2c.data[1], i2c.data[2], i2c.data[3], - i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7])); + i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7]); break; } #endif /* #if (__FreeBSD_version >= 1100101) */ default: - QL_DPRINT4(ha, (ha->pci_dev, "%s: default (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "default (0x%lx)\n", cmd); ret = ether_ioctl(ifp, cmd, data); break; } @@ -2416,14 +2403,14 @@ qlnx_media_change(struct ifnet *ifp) ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); ifm = &ha->media; if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) ret = EINVAL; - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return (ret); } @@ -2435,7 +2422,7 @@ qlnx_media_status(struct ifnet *ifp, str ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -2451,8 +2438,7 @@ qlnx_media_status(struct ifnet *ifp, str (IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit (%s)\n", __func__, - (ha->link_up ? "link_up" : "link_down"))); + QL_DPRINT2(ha, "exit (%s)\n", (ha->link_up ? "link_up" : "link_down")); return; } @@ -2478,20 +2464,19 @@ qlnx_free_tx_pkt(qlnx_host_t *ha, struct QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_MBUF_NULL); - QL_DPRINT1(ha, (ha->pci_dev, "%s: (mp == NULL) " + QL_DPRINT1(ha, "(mp == NULL) " " tx_idx = 0x%x" " ecore_prod_idx = 0x%x" " ecore_cons_idx = 0x%x" " hw_bd_cons = 0x%x" " txq_db_last = 0x%x" " elem_left = 0x%x\n", - __func__, fp->rss_id, ecore_chain_get_prod_idx(&txq->tx_pbl), ecore_chain_get_cons_idx(&txq->tx_pbl), le16toh(*txq->hw_cons_ptr), txq->tx_db.raw, - ecore_chain_get_elem_left(&txq->tx_pbl))); + ecore_chain_get_elem_left(&txq->tx_pbl)); fp->err_tx_free_pkt_null++; @@ -2552,20 +2537,20 @@ qlnx_tx_int(qlnx_host_t *ha, struct qlnx QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_DIFF); - QL_DPRINT1(ha, (ha->pci_dev, "%s: (diff = 0x%x) " + QL_DPRINT1(ha, "(diff = 0x%x) " " tx_idx = 0x%x" " ecore_prod_idx = 0x%x" " ecore_cons_idx = 0x%x" " hw_bd_cons = 0x%x" " txq_db_last = 0x%x" " elem_left = 0x%x\n", - __func__, diff, + diff, fp->rss_id, ecore_chain_get_prod_idx(&txq->tx_pbl), ecore_chain_get_cons_idx(&txq->tx_pbl), le16toh(*txq->hw_cons_ptr), txq->tx_db.raw, - ecore_chain_get_elem_left(&txq->tx_pbl))); + ecore_chain_get_elem_left(&txq->tx_pbl)); fp->err_tx_cons_idx_conflict++; @@ -2587,7 +2572,7 @@ qlnx_transmit(struct ifnet *ifp, struct struct qlnx_fastpath *fp; int rss_id = 0, ret = 0; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); #if __FreeBSD_version >= 1100000 if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) @@ -2615,7 +2600,7 @@ qlnx_transmit(struct ifnet *ifp, struct qlnx_transmit_exit: - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + QL_DPRINT2(ha, "exit ret = %d\n", ret); return ret; } @@ -2629,7 +2614,7 @@ qlnx_qflush(struct ifnet *ifp) ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (rss_id = 0; rss_id < ha->num_rss; rss_id++) { @@ -2648,7 +2633,7 @@ qlnx_qflush(struct ifnet *ifp) mtx_unlock(&fp->tx_mtx); } } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2792,7 +2777,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f uint32_t nbds_in_hdr = 0; uint32_t offset = 0; - QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT8(ha, "enter\n"); if (!ha->link_up) return (-1); @@ -2844,8 +2829,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f struct mbuf *m; - QL_DPRINT8(ha, (ha->pci_dev, "%s: EFBIG [%d]\n", __func__, - m_head->m_pkthdr.len)); + QL_DPRINT8(ha, "EFBIG [%d]\n", m_head->m_pkthdr.len); fp->tx_defrag++; @@ -2855,9 +2839,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->tx_pkts_freed++; m_freem(m_head); *m_headp = NULL; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: m_defrag() = NULL [%d]\n", - __func__, ret)); + QL_DPRINT1(ha, "m_defrag() = NULL [%d]\n", ret); return (ENOBUFS); } @@ -2869,9 +2851,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_defrag_dmamap_load++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: bus_dmamap_load_mbuf_sg failed0[%d, %d]\n", - __func__, ret, m_head->m_pkthdr.len)); + QL_DPRINT1(ha, + "bus_dmamap_load_mbuf_sg failed0 [%d, %d]\n", + ret, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); @@ -2885,9 +2867,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_non_tso_max_seg++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: (%d) nsegs too many for non-TSO[%d, %d]\n", - __func__, ret, nsegs, m_head->m_pkthdr.len)); + QL_DPRINT1(ha, + "(%d) nsegs too many for non-TSO [%d, %d]\n", + ret, nsegs, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); @@ -2902,10 +2884,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_dmamap_load++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: bus_dmamap_load_mbuf_sg failed1[%d, %d]\n", - __func__, ret, m_head->m_pkthdr.len)); - + QL_DPRINT1(ha, "bus_dmamap_load_mbuf_sg failed1 [%d, %d]\n", + ret, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); *m_headp = NULL; @@ -2924,9 +2904,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { - QL_DPRINT1(ha, (ha->pci_dev, "%s: (%d, 0x%x) insuffient BDs" - "in chain[%d] trying to free packets\n", - __func__, nsegs, elem_left, fp->rss_id)); + QL_DPRINT1(ha, "(%d, 0x%x) insuffient BDs" + " in chain[%d] trying to free packets\n", + nsegs, elem_left, fp->rss_id); fp->tx_nsegs_gt_elem_left++; @@ -2935,9 +2915,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: (%d, 0x%x) insuffient BDs in chain[%d]\n", - __func__, nsegs, elem_left, fp->rss_id)); + QL_DPRINT1(ha, + "(%d, 0x%x) insuffient BDs in chain[%d]\n", + nsegs, elem_left, fp->rss_id); fp->err_tx_nsegs_gt_elem_left++; fp->tx_ring_full = 1; @@ -3165,7 +3145,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f qlnx_txq_doorbell_wr32(ha, txq->doorbell_addr, txq->tx_db.raw); - QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT8(ha, "exit\n"); return (0); } @@ -3185,6 +3165,8 @@ qlnx_stop(qlnx_host_t *ha) * propagate the if_drv_flags * state to each tx thread */ + QL_DPRINT1(ha, "QLNX STATE = %d\n",ha->state); + if (ha->state == QLNX_STATE_OPEN) { for (i = 0; i < ha->num_rss; i++) { struct qlnx_fastpath *fp = &ha->fp_array[i]; @@ -3277,8 +3259,7 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str mp = sw_rx_data->data; if (mp == NULL) { - QL_DPRINT1(ha, (ha->pci_dev, "%s: mp = NULL\n", - __func__)); + QL_DPRINT1(ha, "mp = NULL\n"); fp->err_rx_mp_null++; rxq->sw_rx_cons = (rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1); @@ -3293,10 +3274,8 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str if (qlnx_alloc_rx_buffer(ha, rxq) != 0) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: New buffer allocation failed, dropping" - " incoming packet and reusing its buffer\n", - __func__)); + QL_DPRINT1(ha, "New buffer allocation failed, dropping" + " incoming packet and reusing its buffer\n"); qlnx_reuse_rx_data(rxq); fp->err_rx_alloc_errors++; @@ -3356,29 +3335,29 @@ qlnx_tpa_start(qlnx_host_t *ha, dev = ha->pci_dev; agg_index = cqe->tpa_agg_index; - QL_DPRINT7(ha, (dev, "%s[%d]: enter\n " - "\t type = 0x%x\n" - "\t bitfields = 0x%x\n" - "\t seg_len = 0x%x\n" - "\t pars_flags = 0x%x\n" - "\t vlan_tag = 0x%x\n" - "\t rss_hash = 0x%x\n" - "\t len_on_first_bd = 0x%x\n" - "\t placement_offset = 0x%x\n" - "\t tpa_agg_index = 0x%x\n" - "\t header_len = 0x%x\n" - "\t ext_bd_len_list[0] = 0x%x\n" - "\t ext_bd_len_list[1] = 0x%x\n" - "\t ext_bd_len_list[2] = 0x%x\n" - "\t ext_bd_len_list[3] = 0x%x\n" - "\t ext_bd_len_list[4] = 0x%x\n", - __func__, fp->rss_id, cqe->type, cqe->bitfields, cqe->seg_len, + QL_DPRINT7(ha, "[rss_id = %d]: enter\n \ + \t type = 0x%x\n \ + \t bitfields = 0x%x\n \ + \t seg_len = 0x%x\n \ + \t pars_flags = 0x%x\n \ + \t vlan_tag = 0x%x\n \ + \t rss_hash = 0x%x\n \ + \t len_on_first_bd = 0x%x\n \ + \t placement_offset = 0x%x\n \ + \t tpa_agg_index = 0x%x\n \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 22 19:34:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C424D784DC; Mon, 22 May 2017 19:34:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4957D1EE3; Mon, 22 May 2017 19:34:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJYbgO072317; Mon, 22 May 2017 19:34:37 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJYbqG072316; Mon, 22 May 2017 19:34:37 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705221934.v4MJYbqG072316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 19:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318660 - stable/11/sys/rpc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:34:38 -0000 Author: rmacklem Date: Mon May 22 19:34:37 2017 New Revision: 318660 URL: https://svnweb.freebsd.org/changeset/base/318660 Log: MFC: r317906 Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). When sosend() replies ERESTART in the client side krpc, it indicates that the RPC message hasn't yet been sent and that the send queue is full or locked while a signal is posted for the process. Without this patch, this would result in a RPC_CANTSEND reply from clnt_vc_call(), which would cause clnt_reconnect_call() to create a new TCP transport connection. For most NFS servers, this wasn't a serious problem, although it did imply retries of outstanding RPCs, which could possibly have missed the DRC. For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since AmazonEFS often didn't retain the NFSv4.1 session and would reply with NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which requires open/lock state recovery. Three options were considered to fix this: - Return the ERESTART all the way up to the system call boundary and then have the system call redone. This is fraught with risk, due to convoluted code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it is still a work in prgress and may not be feasible. - Set SB_NOINTR for the socket buffer. This fixes the problem, but makes the sosend() completely non interruptible, which kib@ considered inappropriate. It also would break forced dismount when a thread was blocked in sosend(). - Modify the retry loop in clnt_vc_call(), so that it loops for this case for up to 15sec. Testing showed that the sosend() usually succeeded by the 2nd retry. The extreme case observed was 111 loop iterations, or about 100msec of delay. This third alternative is what is implemented in this patch, since the change is: - localized - straightforward - forced dismount is not broken by it. This patch has been tested by cperciva@ extensively against AmazonEFS. Modified: stable/11/sys/rpc/clnt_vc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/rpc/clnt_vc.c ============================================================================== --- stable/11/sys/rpc/clnt_vc.c Mon May 22 19:28:38 2017 (r318659) +++ stable/11/sys/rpc/clnt_vc.c Mon May 22 19:34:37 2017 (r318660) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,6 +108,8 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); +static int fake_wchan; + /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. @@ -298,7 +301,7 @@ clnt_vc_call( uint32_t xid; struct mbuf *mreq = NULL, *results; struct ct_request *cr; - int error; + int error, trycnt; cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); @@ -328,8 +331,20 @@ clnt_vc_call( timeout = ct->ct_wait; /* use default timeout */ } + /* + * After 15sec of looping, allow it to return RPC_CANTSEND, which will + * cause the clnt_reconnect layer to create a new TCP connection. + */ + trycnt = 15 * hz; call_again: mtx_assert(&ct->ct_lock, MA_OWNED); + if (ct->ct_closing || ct->ct_closed) { + ct->ct_threads--; + wakeup(ct); + mtx_unlock(&ct->ct_lock); + free(cr, M_RPC); + return (RPC_CANTSEND); + } ct->ct_xid++; xid = ct->ct_xid; @@ -397,13 +412,16 @@ call_again: */ error = sosend(ct->ct_socket, NULL, NULL, mreq, NULL, 0, curthread); mreq = NULL; - if (error == EMSGSIZE) { + if (error == EMSGSIZE || (error == ERESTART && + (ct->ct_waitflag & PCATCH) == 0 && trycnt-- > 0)) { SOCKBUF_LOCK(&ct->ct_socket->so_snd); sbwait(&ct->ct_socket->so_snd); SOCKBUF_UNLOCK(&ct->ct_socket->so_snd); AUTH_VALIDATE(auth, xid, NULL, NULL); mtx_lock(&ct->ct_lock); TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); + /* Sleep for 1 clock tick before trying the sosend() again. */ + msleep(&fake_wchan, &ct->ct_lock, 0, "rpclpsnd", 1); goto call_again; } From owner-svn-src-all@freebsd.org Mon May 22 19:36:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 319D6D785D3; Mon, 22 May 2017 19:36:28 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA9871160; Mon, 22 May 2017 19:36:27 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJaRwo072453; Mon, 22 May 2017 19:36:27 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJaQkj072448; Mon, 22 May 2017 19:36:26 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705221936.v4MJaQkj072448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 22 May 2017 19:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318661 - in stable/10/sys: dev/qlnx/qlnxe modules/qlnx/qlnxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:36:28 -0000 Author: davidcs Date: Mon May 22 19:36:26 2017 New Revision: 318661 URL: https://svnweb.freebsd.org/changeset/base/318661 Log: MFC r318382 1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for processing interrupts drops to around 1% for 100G and under 1% for other speeds. 2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN 3. remove unused mtx tx_lock 4. bind taskqueue kernel thread to the appropriate cpu core 5. when tx_ring is full, stop further transmits till at least 1/16th of the Tx Ring is empty. In our case 1K entries. Also if there are rx_pkts to process, put the taskqueue thread to sleep for 100ms, before enabling interrupts. 6. Use rx_pkt_threshold of 128. Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c stable/10/sys/dev/qlnx/qlnxe/qlnx_os.h stable/10/sys/modules/qlnx/qlnxe/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:36:26 2017 (r318661) @@ -191,6 +191,7 @@ struct qlnx_fastpath { struct mtx tx_mtx; char tx_mtx_name[32]; struct buf_ring *tx_br; + uint32_t tx_ring_full; struct task fp_task; struct taskqueue *fp_taskqueue; @@ -364,6 +365,8 @@ struct qlnx_host { /* debug */ uint32_t dbg_level; + uint32_t dbg_trace_lro_cnt; + uint32_t dbg_trace_tso_pkt_len; uint32_t dp_level; uint32_t dp_module; @@ -386,7 +389,6 @@ struct qlnx_host { /* tx related */ struct callout tx_callout; - struct mtx tx_lock; uint32_t txr_idx; /* rx related */ Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:36:26 2017 (r318661) @@ -382,16 +382,77 @@ qlnx_fp_taskqueue(void *context, int pen struct ifnet *ifp; struct mbuf *mp; int ret; + int lro_enable, tc; + int rx_int = 0, total_rx_count = 0; + struct thread *cthread; fp = context; if (fp == NULL) return; + cthread = curthread; + + thread_lock(cthread); + + if (!sched_is_bound(cthread)) + sched_bind(cthread, fp->rss_id); + + thread_unlock(cthread); + ha = (qlnx_host_t *)fp->edev; ifp = ha->ifp; + lro_enable = ha->ifp->if_capenable & IFCAP_LRO; + + rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, lro_enable); + + if (rx_int) { + fp->rx_pkts += rx_int; + total_rx_count += rx_int; + } + +#ifdef QLNX_SOFT_LRO + { + struct lro_ctrl *lro; + + lro = &fp->rxq->lro; + + if (lro_enable && total_rx_count) { + +#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) + + if (ha->dbg_trace_lro_cnt) { + if (lro->lro_mbuf_count & ~1023) + fp->lro_cnt_1024++; + else if (lro->lro_mbuf_count & ~511) + fp->lro_cnt_512++; + else if (lro->lro_mbuf_count & ~255) + fp->lro_cnt_256++; + else if (lro->lro_mbuf_count & ~127) + fp->lro_cnt_128++; + else if (lro->lro_mbuf_count & ~63) + fp->lro_cnt_64++; + } + tcp_lro_flush_all(lro); + +#else + struct lro_entry *queued; + + while ((!SLIST_EMPTY(&lro->lro_active))) { + queued = SLIST_FIRST(&lro->lro_active); + SLIST_REMOVE_HEAD(&lro->lro_active, next); + tcp_lro_flush(lro, queued); + } +#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ + } + } +#endif /* #ifdef QLNX_SOFT_LRO */ + + ecore_sb_update_sb_idx(fp->sb_info); + rmb(); + mtx_lock(&fp->tx_mtx); if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != @@ -401,13 +462,19 @@ qlnx_fp_taskqueue(void *context, int pen goto qlnx_fp_taskqueue_exit; } - (void)qlnx_tx_int(ha, fp, fp->txq[0]); + for (tc = 0; tc < ha->num_tc; tc++) { + (void)qlnx_tx_int(ha, fp, fp->txq[tc]); + } mp = drbr_peek(ifp, fp->tx_br); while (mp != NULL) { - ret = qlnx_send(ha, fp, &mp); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = qlnx_send(ha, fp, &mp); + } else { + ret = -1; + } if (ret) { @@ -428,14 +495,28 @@ qlnx_fp_taskqueue(void *context, int pen fp->tx_pkts_processed++; } + if (fp->tx_ring_full) + break; + mp = drbr_peek(ifp, fp->tx_br); } - (void)qlnx_tx_int(ha, fp, fp->txq[0]); + for (tc = 0; tc < ha->num_tc; tc++) { + (void)qlnx_tx_int(ha, fp, fp->txq[tc]); + } mtx_unlock(&fp->tx_mtx); qlnx_fp_taskqueue_exit: + if (rx_int) { + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + } else { + if (fp->tx_ring_full) { + qlnx_mdelay(__func__, 100); + } + ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); + } QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); return; @@ -504,7 +585,9 @@ qlnx_drain_fp_taskqueues(qlnx_host_t *ha fp = &ha->fp_array[i]; if (fp->fp_taskqueue != NULL) { + QLNX_UNLOCK(ha); taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + QLNX_LOCK(ha); } } return; @@ -540,7 +623,6 @@ qlnx_pci_attach(device_t dev) ha->pci_dev = dev; mtx_init(&ha->hw_lock, "qlnx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF); - mtx_init(&ha->tx_lock, "qlnx_tx_lock", MTX_NETWORK_LOCK, MTX_DEF); ha->flags.lock_init = 1; @@ -944,7 +1026,6 @@ qlnx_release(qlnx_host_t *ha) pci_release_msi(dev); if (ha->flags.lock_init) { - mtx_destroy(&ha->tx_lock); mtx_destroy(&ha->hw_lock); } @@ -1226,7 +1307,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h CTLFLAG_RD, &ha->fp_array[i].err_tx_cons_idx_conflict, "err_tx_cons_idx_conflict"); -#ifdef QLNX_TRACE_LRO_CNT SYSCTL_ADD_QUAD(ctx, node_children, OID_AUTO, "lro_cnt_64", CTLFLAG_RD, &ha->fp_array[i].lro_cnt_64, @@ -1251,7 +1331,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h OID_AUTO, "lro_cnt_1024", CTLFLAG_RD, &ha->fp_array[i].lro_cnt_1024, "lro_cnt_1024"); -#endif /* #ifdef QLNX_TRACE_LRO_CNT */ /* Rx Related */ @@ -1710,6 +1789,18 @@ qlnx_add_sysctls(qlnx_host_t *ha) OID_AUTO, "dp_level", CTLFLAG_RW, &ha->dp_level, ha->dp_level, "DP Level"); + ha->dbg_trace_lro_cnt = 0; + SYSCTL_ADD_UINT(ctx, children, + OID_AUTO, "dbg_trace_lro_cnt", CTLFLAG_RW, + &ha->dbg_trace_lro_cnt, ha->dbg_trace_lro_cnt, + "Trace LRO Counts"); + + ha->dbg_trace_tso_pkt_len = 0; + SYSCTL_ADD_UINT(ctx, children, + OID_AUTO, "dbg_trace_tso_pkt_len", CTLFLAG_RW, + &ha->dbg_trace_tso_pkt_len, ha->dbg_trace_tso_pkt_len, + "Trace TSO packet lengths"); + ha->dp_module = 0; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dp_module", CTLFLAG_RW, @@ -1755,7 +1846,7 @@ qlnx_add_sysctls(qlnx_host_t *ha) &ha->tx_coalesce_usecs, ha->tx_coalesce_usecs, "tx_coalesce_usecs"); - ha->rx_pkt_threshold = 32; + ha->rx_pkt_threshold = 128; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_pkt_threshold", CTLFLAG_RW, &ha->rx_pkt_threshold, ha->rx_pkt_threshold, @@ -2162,7 +2253,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd ifp->if_mtu = ifr->ifr_mtu; ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { qlnx_init_locked(ha); } @@ -2178,7 +2269,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd QLNX_LOCK(ha); if (ifp->if_flags & IFF_UP) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if ((ifp->if_flags ^ ha->if_flags) & IFF_PROMISC) { ret = qlnx_set_promisc(ha); @@ -2712,6 +2803,16 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f tx_data_bd = NULL; txq = fp->txq[0]; + + if (fp->tx_ring_full) { + elem_left = ecore_chain_get_elem_left(&txq->tx_pbl); + + if (elem_left < (TX_RING_SIZE >> 4)) + return (-1); + else + fp->tx_ring_full = 0; + } + idx = txq->sw_tx_prod; map = txq->sw_tx_ring[idx].map; @@ -2720,20 +2821,18 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (!fp->tx_tso_min_pkt_len) { - fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - } else { - if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len) + if (ha->dbg_trace_tso_pkt_len) { + if (!fp->tx_tso_min_pkt_len) { fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len) - fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len; + fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; + } else { + if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len) + fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; + if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len) + fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len; + } } -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ - if (m_head->m_pkthdr.csum_flags & CSUM_TSO) offset = qlnx_tcp_offset(ha, m_head); @@ -2815,14 +2914,12 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f QL_ASSERT(ha, (nsegs != 0), ("qlnx_send: empty packet")); -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (nsegs < QLNX_FP_MAX_SEGS) - fp->tx_pkts[(nsegs - 1)]++; - else - fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; - -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ + if (ha->dbg_trace_tso_pkt_len) { + if (nsegs < QLNX_FP_MAX_SEGS) + fp->tx_pkts[(nsegs - 1)]++; + else + fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; + } if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { @@ -2843,6 +2940,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f __func__, nsegs, elem_left, fp->rss_id)); fp->err_tx_nsegs_gt_elem_left++; + fp->tx_ring_full = 1; ha->storm_stats_enable = 1; return (ENOBUFS); } @@ -3051,15 +3149,13 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f first_bd->data.nbds = nbd; -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (fp->tx_tso_max_nsegs < nsegs) - fp->tx_tso_max_nsegs = nsegs; - - if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs)) - fp->tx_tso_min_nsegs = nsegs; + if (ha->dbg_trace_tso_pkt_len) { + if (fp->tx_tso_max_nsegs < nsegs) + fp->tx_tso_max_nsegs = nsegs; -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ + if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs)) + fp->tx_tso_min_nsegs = nsegs; + } txq->sw_tx_ring[idx].nsegs = nsegs; txq->sw_tx_prod = (txq->sw_tx_prod + 1) & (TX_RING_SIZE - 1); @@ -4188,11 +4284,9 @@ qlnx_fp_isr(void *arg) qlnx_ivec_t *ivec = arg; qlnx_host_t *ha; struct qlnx_fastpath *fp = NULL; - int idx, lro_enable, tc; - int rx_int = 0, total_rx_count = 0; + int idx; ha = ivec->ha; - lro_enable = ha->ifp->if_capenable & IFCAP_LRO; if (ha->state != QLNX_STATE_OPEN) { return; @@ -4214,73 +4308,8 @@ qlnx_fp_isr(void *arg) ha->err_fp_null++; } else { ecore_sb_ack(fp->sb_info, IGU_INT_DISABLE, 0); - - do { - for (tc = 0; tc < ha->num_tc; tc++) { - if (mtx_trylock(&fp->tx_mtx)) { - qlnx_tx_int(ha, fp, fp->txq[tc]); - mtx_unlock(&fp->tx_mtx); - } - } - - rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, - lro_enable); - - if (rx_int) { - fp->rx_pkts += rx_int; - total_rx_count += rx_int; - } - - } while (rx_int); - - -#ifdef QLNX_SOFT_LRO - { - struct lro_ctrl *lro; - - lro = &fp->rxq->lro; - - if (lro_enable && total_rx_count) { - -#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) - -#ifdef QLNX_TRACE_LRO_CNT - if (lro->lro_mbuf_count & ~1023) - fp->lro_cnt_1024++; - else if (lro->lro_mbuf_count & ~511) - fp->lro_cnt_512++; - else if (lro->lro_mbuf_count & ~255) - fp->lro_cnt_256++; - else if (lro->lro_mbuf_count & ~127) - fp->lro_cnt_128++; - else if (lro->lro_mbuf_count & ~63) - fp->lro_cnt_64++; -#endif /* #ifdef QLNX_TRACE_LRO_CNT */ - - tcp_lro_flush_all(lro); - -#else - struct lro_entry *queued; - - while ((!SLIST_EMPTY(&lro->lro_active))) { - queued = SLIST_FIRST(&lro->lro_active); - SLIST_REMOVE_HEAD(&lro->lro_active, \ - next); - tcp_lro_flush(lro, queued); - } -#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ - } - } -#endif /* #ifdef QLNX_SOFT_LRO */ - - if (fp->fp_taskqueue != NULL) - taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); - - ecore_sb_update_sb_idx(fp->sb_info); - rmb(); - ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); - - return; + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); } return; @@ -5150,6 +5179,8 @@ qlnx_init_fp(qlnx_host_t *ha) snprintf(fp->name, sizeof(fp->name), "%s-fp-%d", qlnx_name_str, rss_id); + fp->tx_ring_full = 0; + /* reset all the statistics counters */ fp->tx_pkts_processed = 0; Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_os.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_os.h Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_os.h Mon May 22 19:36:26 2017 (r318661) @@ -92,6 +92,7 @@ #include #include #include +#include static __inline int qlnx_ms_to_hz(int ms) { @@ -138,10 +139,6 @@ MALLOC_DECLARE(M_QLNXBUF); #define QLNX_LOCK(ha) mtx_lock(&ha->hw_lock) #define QLNX_UNLOCK(ha) mtx_unlock(&ha->hw_lock) - -#define QLNX_TX_LOCK(ha) mtx_lock(&ha->tx_lock); -#define QLNX_TX_UNLOCK(ha) mtx_unlock(&ha->tx_lock); - /* * structure encapsulating a DMA buffer */ Modified: stable/10/sys/modules/qlnx/qlnxe/Makefile ============================================================================== --- stable/10/sys/modules/qlnx/qlnxe/Makefile Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/modules/qlnx/qlnxe/Makefile Mon May 22 19:36:26 2017 (r318661) @@ -63,8 +63,6 @@ CFLAGS += -DECORE_CONFIG_DIRECT_HWFN #CFLAGS += -DQLNX_SOFT_LRO #CFLAGS += -DQLNX_QSORT_LRO #CFLAGS += -DQLNX_MAX_COALESCE -#CFLAGS += -DQLNX_TRACE_LRO_CNT -#CFLAGS += -DQLNX_TRACE_TSO_PKT_LEN .include From owner-svn-src-all@freebsd.org Mon May 22 19:40:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CECCD78770; Mon, 22 May 2017 19:40:58 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA6EB144B; Mon, 22 May 2017 19:40:57 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJevWT072777; Mon, 22 May 2017 19:40:57 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJeus5072774; Mon, 22 May 2017 19:40:56 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705221940.v4MJeus5072774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 22 May 2017 19:40:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318662 - stable/10/sys/dev/qlnx/qlnxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:40:58 -0000 Author: davidcs Date: Mon May 22 19:40:56 2017 New Revision: 318662 URL: https://svnweb.freebsd.org/changeset/base/318662 Log: MFC r318383 QL_DPRINT macro modfied to handle multiple args; print line#. Submitted by:Shminderjit.Singh@cavium.com Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:36:26 2017 (r318661) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:40:56 2017 (r318662) @@ -483,35 +483,141 @@ typedef struct qlnx_host qlnx_host_t; #ifdef QLNX_DEBUG -#define QL_DPRINT1(ha, x) if (ha->dbg_level & 0x0001) device_printf x -#define QL_DPRINT2(ha, x) if (ha->dbg_level & 0x0002) device_printf x -#define QL_DPRINT3(ha, x) if (ha->dbg_level & 0x0004) device_printf x -#define QL_DPRINT4(ha, x) if (ha->dbg_level & 0x0008) device_printf x -#define QL_DPRINT5(ha, x) if (ha->dbg_level & 0x0010) device_printf x -#define QL_DPRINT6(ha, x) if (ha->dbg_level & 0x0020) device_printf x -#define QL_DPRINT7(ha, x) if (ha->dbg_level & 0x0040) device_printf x -#define QL_DPRINT8(ha, x) if (ha->dbg_level & 0x0080) device_printf x -#define QL_DPRINT9(ha, x) if (ha->dbg_level & 0x0100) device_printf x -#define QL_DPRINT11(ha, x) if (ha->dbg_level & 0x0400) device_printf x -#define QL_DPRINT12(ha, x) if (ha->dbg_level & 0x0800) device_printf x -#define QL_DPRINT13(ha, x) if (ha->dbg_level & 0x1000) device_printf x -#define QL_DPRINT14(ha, x) if (ha->dbg_level & 0x2000) device_printf x +#define QL_DPRINT1(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0001) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT2(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0002) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT3(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0004) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT4(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0008) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT5(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0010) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT6(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0020) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT7(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0040) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT8(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0080) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT9(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0100) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT11(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0400) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT12(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0800) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT13(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x1000) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + #else -#define QL_DPRINT1(ha, x) -#define QL_DPRINT2(ha, x) -#define QL_DPRINT3(ha, x) -#define QL_DPRINT4(ha, x) -#define QL_DPRINT5(ha, x) -#define QL_DPRINT6(ha, x) -#define QL_DPRINT7(ha, x) -#define QL_DPRINT8(ha, x) -#define QL_DPRINT9(ha, x) -#define QL_DPRINT11(ha, x) -#define QL_DPRINT12(ha, x) -#define QL_DPRINT13(ha, x) -#define QL_DPRINT14(ha, x) +#define QL_DPRINT1(ha, x, ...) +#define QL_DPRINT2(ha, x, ...) +#define QL_DPRINT3(ha, x, ...) +#define QL_DPRINT4(ha, x, ...) +#define QL_DPRINT5(ha, x, ...) +#define QL_DPRINT6(ha, x, ...) +#define QL_DPRINT7(ha, x, ...) +#define QL_DPRINT8(ha, x, ...) +#define QL_DPRINT9(ha, x, ...) +#define QL_DPRINT11(ha, x, ...) +#define QL_DPRINT12(ha, x, ...) +#define QL_DPRINT13(ha, x, ...) #endif /* #ifdef QLNX_DEBUG */ Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Mon May 22 19:36:26 2017 (r318661) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Mon May 22 19:40:56 2017 (r318662) @@ -121,8 +121,7 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : ecore_ptt_acquire failed\n", - __func__)); + QL_DPRINT1(ha,"ecore_ptt_acquire failed\n"); return (rval); } @@ -133,9 +132,8 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t rval = 0; ha->grcdump_taken = 1; } else - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_dbg_grc_dump failed [%d, 0x%x]\n", - __func__, hwfn_index, rval)); + QL_DPRINT1(ha,"ecore_dbg_grc_dump failed [%d, 0x%x]\n", + hwfn_index, rval); ecore_ptt_release(p_hwfn, p_ptt); @@ -177,8 +175,7 @@ qlnx_get_grc_dump(qlnx_host_t *ha, qlnx_ grcdump->grcdump_dwords[i] = dwords; - QL_DPRINT1(ha, (ha->pci_dev, "%s: grcdump_dwords[%d] = 0x%x\n", - __func__, i, dwords)); + QL_DPRINT1(ha,"grcdump_dwords[%d] = 0x%x\n", i, dwords); rval = copyout(ha->grcdump[i], grcdump->grcdump[i], ha->grcdump_size[i]); @@ -213,8 +210,7 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_ptt_acquire failed\n", __func__)); + QL_DPRINT1(ha,"ecore_ptt_acquire failed\n"); return (rval); } @@ -225,9 +221,8 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t rval = 0; ha->idle_chk_taken = 1; } else - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n", - __func__, hwfn_index, rval)); + QL_DPRINT1(ha,"ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n", + hwfn_index, rval); ecore_ptt_release(p_hwfn, p_ptt); @@ -271,8 +266,7 @@ qlnx_get_idle_chk(qlnx_host_t *ha, qlnx_ idle_chk->idle_chk_dwords[i] = dwords; - QL_DPRINT1(ha, (ha->pci_dev, "%s: idle_chk_dwords[%d] = 0x%x\n", - __func__, i, dwords)); + QL_DPRINT1(ha,"idle_chk_dwords[%d] = 0x%x\n", i, dwords); rval = copyout(ha->idle_chk[i], idle_chk->idle_chk[i], ha->idle_chk_size[i]); @@ -299,9 +293,8 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha, p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: ecore_ptt_acquire [%d, 0x%x]failed\n", - __func__, hwfn_index, cmd)); + QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n", + hwfn_index, cmd); return (0); } @@ -334,8 +327,7 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha, } if (rval != DBG_STATUS_OK) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n", - __func__, cmd, rval)); + QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", cmd, rval); num_dwords = 0; } @@ -369,9 +361,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn buffer = qlnx_zalloc(trace->size[hwfn_index]); if (buffer == NULL) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: qlnx_zalloc [%d, 0x%x]failed\n", - __func__, hwfn_index, trace->cmd)); + QL_DPRINT1(ha,"qlnx_zalloc [%d, 0x%x]failed\n", + hwfn_index, trace->cmd); return (ENXIO); } ecore_dbg_set_app_ver(ecore_dbg_get_fw_func_ver()); @@ -380,9 +371,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: ecore_ptt_acquire [%d, 0x%x]failed\n", - __func__, hwfn_index, trace->cmd)); + QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n", + hwfn_index, trace->cmd); return (ENXIO); } @@ -420,8 +410,7 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn } if (rval != DBG_STATUS_OK) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n", - __func__, trace->cmd, rval)); + QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", trace->cmd, rval); num_dwords = 0; } @@ -609,21 +598,18 @@ qlnx_write_nvram(qlnx_host_t *ha, qlnx_n ret = copyin(nvram->data, buf, nvram->data_len); - QL_DPRINT9(ha, - (ha->pci_dev, "%s: issue cmd = 0x%x data = %p " - " data_len = 0x%x ret = 0x%x exit\n", __func__, - cmd, nvram->data, nvram->data_len, ret)); + QL_DPRINT9(ha, "issue cmd = 0x%x data = %p \ + data_len = 0x%x ret = 0x%x exit\n", + cmd, nvram->data, nvram->data_len, ret); if (ret == 0) { ret = ecore_mcp_nvm_write(&ha->cdev, cmd, nvram->offset, buf, nvram->data_len); } - QL_DPRINT9(ha, - (ha->pci_dev, "%s: cmd = 0x%x data = %p " - " data_len = 0x%x resp = 0x%x ret = 0x%x exit\n", - __func__, cmd, nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "cmd = 0x%x data = %p \ + data_len = 0x%x resp = 0x%x ret = 0x%x exit\n", + cmd, nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); free(buf, M_QLNXBUF); @@ -644,10 +630,9 @@ qlnx_read_nvram(qlnx_host_t *ha, qlnx_nv ret = ecore_mcp_nvm_read(&ha->cdev, nvram->offset, buf, nvram->data_len); - QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x " - " resp = 0x%x ret = 0x%x exit\n", __func__, - nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, " data = %p data_len = 0x%x \ + resp = 0x%x ret = 0x%x exit\n", + nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); if (ret == 0) { ret = copyout(buf, nvram->data, nvram->data_len); @@ -672,10 +657,9 @@ qlnx_get_nvram_resp(qlnx_host_t *ha, qln ret = ecore_mcp_nvm_resp(&ha->cdev, buf); - QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x " - " resp = 0x%x ret = 0x%x exit\n", __func__, - nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "data = %p data_len = 0x%x \ + resp = 0x%x ret = 0x%x exit\n", + nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); if (ret == 0) { ret = copyout(buf, nvram->data, nvram->data_len); @@ -708,28 +692,25 @@ qlnx_nvram(qlnx_host_t *ha, qlnx_nvram_t case QLNX_NVRAM_CMD_SET_SECURE_MODE: ret = ecore_mcp_nvm_set_secure_mode(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_SET_SECURE_MODE " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_SET_SECURE_MODE \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_DEL_FILE: ret = ecore_mcp_nvm_del_file(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_DEL_FILE " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_DEL_FILE \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_PUT_FILE_BEGIN: ret = ecore_mcp_nvm_put_file_begin(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_PUT_FILE_BEGIN " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_PUT_FILE_BEGIN \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_GET_NVRAM_RESP: Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:36:26 2017 (r318661) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:40:56 2017 (r318662) @@ -303,7 +303,7 @@ qlnx_sp_intr(void *arg) ha = (qlnx_host_t *)p_hwfn->p_dev; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < ha->cdev.num_hwfns; i++) { if (&ha->cdev.hwfns[i] == p_hwfn) { @@ -311,7 +311,7 @@ qlnx_sp_intr(void *arg) break; } } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -353,8 +353,7 @@ qlnx_create_sp_taskqueues(qlnx_host_t *h taskqueue_start_threads(&ha->sp_taskqueue[i], 1, PI_NET, "%s", tq_name); - QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, - ha->sp_taskqueue[i])); + QL_DPRINT1(ha, "%p\n", ha->sp_taskqueue[i]); } return (0); @@ -518,7 +517,7 @@ qlnx_fp_taskqueue_exit: ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + QL_DPRINT2(ha, "exit ret = %d\n", ret); return; } @@ -548,8 +547,7 @@ qlnx_create_fp_taskqueues(qlnx_host_t *h taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s", tq_name); - QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, - fp->fp_taskqueue)); + QL_DPRINT1(ha, "%p\n",fp->fp_taskqueue); } return (0); @@ -711,15 +709,14 @@ qlnx_pci_attach(device_t dev) else ha->num_rss = ha->msix_count - ha->cdev.num_hwfns; - QL_DPRINT1(ha, (dev, "%s:\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]" + QL_DPRINT1(ha, "\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]" "\n\t\t\tdbells [%p, 0x%08x 0x%08x]" "\n\t\t\tmsix [%p, 0x%08x 0x%08x 0x%x 0x%x]" "\n\t\t\t[ncpus = %d][num_rss = 0x%x] [num_tc = 0x%x]\n", - __func__, ha->pci_reg, rsrc_len_reg, + ha->pci_reg, rsrc_len_reg, ha->reg_rid, ha->pci_dbells, rsrc_len_dbells, ha->dbells_rid, ha->msix_bar, rsrc_len_msix, ha->msix_rid, pci_msix_count(dev), - ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc)); - + ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc); if (pci_alloc_msix(dev, &ha->msix_count)) { device_printf(dev, "%s: pci_alloc_msix[%d] failed\n", __func__, ha->msix_count); @@ -755,9 +752,9 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; } - QL_DPRINT1(ha, (dev, "%s: p_hwfn [%p] sp_irq_rid %d" - " sp_irq %p sp_handle %p\n", __func__, p_hwfn, - ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i])); + QL_DPRINT1(ha, "p_hwfn [%p] sp_irq_rid %d" + " sp_irq %p sp_handle %p\n", p_hwfn, + ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i]); } @@ -800,8 +797,8 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; ha->grcdump_size[i] = ha->grcdump_size[i] << 2; - QL_DPRINT1(ha, (dev, "grcdump_size[%d] = 0x%08x\n", - i, ha->grcdump_size[i])); + QL_DPRINT1(ha, "grcdump_size[%d] = 0x%08x\n", + i, ha->grcdump_size[i]); ha->grcdump[i] = qlnx_zalloc(ha->grcdump_size[i]); if (ha->grcdump[i] == NULL) { @@ -815,8 +812,8 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; ha->idle_chk_size[i] = ha->idle_chk_size[i] << 2; - QL_DPRINT1(ha, (dev, "idle_chk_size[%d] = 0x%08x\n", - i, ha->idle_chk_size[i])); + QL_DPRINT1(ha, "idle_chk_size[%d] = 0x%08x\n", + i, ha->idle_chk_size[i]); ha->idle_chk[i] = qlnx_zalloc(ha->idle_chk_size[i]); @@ -855,8 +852,8 @@ qlnx_pci_attach(device_t dev) FW_MAJOR_VERSION, FW_MINOR_VERSION, FW_REVISION_VERSION, FW_ENGINEERING_VERSION); - QL_DPRINT1(ha, (dev, "%s: STORM_FW version %s MFW version %s\n", - __func__, ha->stormfw_ver, ha->mfw_ver)); + QL_DPRINT1(ha, "STORM_FW version %s MFW version %s\n", + ha->stormfw_ver, ha->mfw_ver); qlnx_init_ifnet(dev, ha); @@ -874,7 +871,7 @@ qlnx_pci_attach_err0: goto qlnx_pci_attach_err; } - QL_DPRINT2(ha, (dev, "%s: success\n", __func__)); + QL_DPRINT2(ha, "success\n"); return (0); @@ -958,7 +955,7 @@ qlnx_release(qlnx_host_t *ha) dev = ha->pci_dev; - QL_DPRINT2(ha, (dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < QLNX_MAX_HW_FUNCS; i++) { if (ha->idle_chk[i] != NULL) { @@ -1041,7 +1038,7 @@ qlnx_release(qlnx_host_t *ha) (void) bus_release_resource(dev, SYS_RES_MEMORY, ha->msix_rid, ha->msix_bar); - QL_DPRINT2(ha, (dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -1053,14 +1050,14 @@ qlnx_trigger_dump(qlnx_host_t *ha) if (ha->ifp != NULL) ha->ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QL_DPRINT2(ha, (ha->pci_dev, "%s: start\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < ha->cdev.num_hwfns; i++) { qlnx_grc_dump(ha, &ha->grcdump_dwords[i], i); qlnx_idle_chk(ha, &ha->idle_chk_dwords[i], i); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: end\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -1779,12 +1776,11 @@ qlnx_add_sysctls(qlnx_host_t *ha) "\tpersonality = 6 => Default in Shared Memory\n"); ha->dbg_level = 0; - SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "debug", CTLFLAG_RW, &ha->dbg_level, ha->dbg_level, "Debug Level"); - ha->dp_level = 0; + ha->dp_level = 0x01; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dp_level", CTLFLAG_RW, &ha->dp_level, ha->dp_level, "DP Level"); @@ -1999,7 +1995,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_ ifmedia_set(&ha->media, (IFM_ETHER | IFM_AUTO)); - QL_DPRINT2(ha, (dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2009,6 +2005,8 @@ qlnx_init_locked(qlnx_host_t *ha) { struct ifnet *ifp = ha->ifp; + QL_DPRINT1(ha, "Driver Initialization start \n"); + qlnx_stop(ha); if (qlnx_load(ha) == 0) { @@ -2026,13 +2024,13 @@ qlnx_init(void *arg) ha = (qlnx_host_t *)arg; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); QLNX_LOCK(ha); qlnx_init_locked(ha); QLNX_UNLOCK(ha); - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2221,8 +2219,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd switch (cmd) { case SIOCSIFADDR: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFADDR (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd); if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; @@ -2231,10 +2228,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd qlnx_init_locked(ha); QLNX_UNLOCK(ha); } - QL_DPRINT4(ha, (ha->pci_dev, - "%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", - __func__, cmd, - ntohl(IA_SIN(ifa)->sin_addr.s_addr))); + QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", + cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); arp_ifinit(ifp, ifa); } else { @@ -2243,8 +2238,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFMTU: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFMTU (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFMTU (0x%lx)\n", cmd); if (ifr->ifr_mtu > QLNX_MAX_MTU) { ret = EINVAL; @@ -2263,8 +2257,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFFLAGS: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFFLAGS (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFFLAGS (0x%lx)\n", cmd); QLNX_LOCK(ha); @@ -2292,8 +2285,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCADDMULTI: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); + QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCADDMULTI", cmd); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if (qlnx_set_multi(ha, 1)) @@ -2302,8 +2294,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCDELMULTI: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); + QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCDELMULTI", cmd); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if (qlnx_set_multi(ha, 0)) @@ -2313,9 +2304,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd case SIOCSIFMEDIA: case SIOCGIFMEDIA: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", cmd); + ret = ifmedia_ioctl(ifp, ifr, &ha->media, cmd); break; @@ -2323,8 +2313,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd mask = ifr->ifr_reqcap ^ ifp->if_capenable; - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFCAP (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFCAP (0x%lx)\n", cmd); if (mask & IFCAP_HWCSUM) ifp->if_capenable ^= IFCAP_HWCSUM; @@ -2367,8 +2356,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, "%s :" - " ecore_ptt_acquire failed\n", __func__)); + QL_DPRINT1(ha, "ecore_ptt_acquire failed\n"); ret = -1; break; } @@ -2386,20 +2374,19 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd ret = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); - QL_DPRINT8(ha, (ha->pci_dev, "SIOCGI2C copyout ret = %d" - " len = %d addr = 0x%02x offset = 0x%04x" - " data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x" - " 0x%02x 0x%02x 0x%02x\n", + QL_DPRINT8(ha, "SIOCGI2C copyout ret = %d \ + len = %d addr = 0x%02x offset = 0x%04x \ + data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x \ + 0x%02x 0x%02x 0x%02x\n", ret, i2c.len, i2c.dev_addr, i2c.offset, i2c.data[0], i2c.data[1], i2c.data[2], i2c.data[3], - i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7])); + i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7]); break; } #endif /* #if (__FreeBSD_version >= 1100101) */ default: - QL_DPRINT4(ha, (ha->pci_dev, "%s: default (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "default (0x%lx)\n", cmd); ret = ether_ioctl(ifp, cmd, data); break; } @@ -2416,14 +2403,14 @@ qlnx_media_change(struct ifnet *ifp) ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); ifm = &ha->media; if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) ret = EINVAL; - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return (ret); } @@ -2435,7 +2422,7 @@ qlnx_media_status(struct ifnet *ifp, str ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -2451,8 +2438,7 @@ qlnx_media_status(struct ifnet *ifp, str (IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit (%s)\n", __func__, - (ha->link_up ? "link_up" : "link_down"))); + QL_DPRINT2(ha, "exit (%s)\n", (ha->link_up ? "link_up" : "link_down")); return; } @@ -2478,20 +2464,19 @@ qlnx_free_tx_pkt(qlnx_host_t *ha, struct QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_MBUF_NULL); - QL_DPRINT1(ha, (ha->pci_dev, "%s: (mp == NULL) " + QL_DPRINT1(ha, "(mp == NULL) " " tx_idx = 0x%x" " ecore_prod_idx = 0x%x" " ecore_cons_idx = 0x%x" " hw_bd_cons = 0x%x" " txq_db_last = 0x%x" " elem_left = 0x%x\n", - __func__, fp->rss_id, ecore_chain_get_prod_idx(&txq->tx_pbl), ecore_chain_get_cons_idx(&txq->tx_pbl), le16toh(*txq->hw_cons_ptr), txq->tx_db.raw, - ecore_chain_get_elem_left(&txq->tx_pbl))); + ecore_chain_get_elem_left(&txq->tx_pbl)); fp->err_tx_free_pkt_null++; @@ -2552,20 +2537,20 @@ qlnx_tx_int(qlnx_host_t *ha, struct qlnx QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_DIFF); - QL_DPRINT1(ha, (ha->pci_dev, "%s: (diff = 0x%x) " + QL_DPRINT1(ha, "(diff = 0x%x) " " tx_idx = 0x%x" " ecore_prod_idx = 0x%x" " ecore_cons_idx = 0x%x" " hw_bd_cons = 0x%x" " txq_db_last = 0x%x" " elem_left = 0x%x\n", - __func__, diff, + diff, fp->rss_id, ecore_chain_get_prod_idx(&txq->tx_pbl), ecore_chain_get_cons_idx(&txq->tx_pbl), le16toh(*txq->hw_cons_ptr), txq->tx_db.raw, - ecore_chain_get_elem_left(&txq->tx_pbl))); + ecore_chain_get_elem_left(&txq->tx_pbl)); fp->err_tx_cons_idx_conflict++; @@ -2587,7 +2572,7 @@ qlnx_transmit(struct ifnet *ifp, struct struct qlnx_fastpath *fp; int rss_id = 0, ret = 0; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); #if __FreeBSD_version >= 1100000 if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) @@ -2615,7 +2600,7 @@ qlnx_transmit(struct ifnet *ifp, struct qlnx_transmit_exit: - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + QL_DPRINT2(ha, "exit ret = %d\n", ret); return ret; } @@ -2629,7 +2614,7 @@ qlnx_qflush(struct ifnet *ifp) ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (rss_id = 0; rss_id < ha->num_rss; rss_id++) { @@ -2648,7 +2633,7 @@ qlnx_qflush(struct ifnet *ifp) mtx_unlock(&fp->tx_mtx); } } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2792,7 +2777,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f uint32_t nbds_in_hdr = 0; uint32_t offset = 0; - QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT8(ha, "enter\n"); if (!ha->link_up) return (-1); @@ -2844,8 +2829,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f struct mbuf *m; - QL_DPRINT8(ha, (ha->pci_dev, "%s: EFBIG [%d]\n", __func__, - m_head->m_pkthdr.len)); + QL_DPRINT8(ha, "EFBIG [%d]\n", m_head->m_pkthdr.len); fp->tx_defrag++; @@ -2855,9 +2839,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->tx_pkts_freed++; m_freem(m_head); *m_headp = NULL; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: m_defrag() = NULL [%d]\n", - __func__, ret)); + QL_DPRINT1(ha, "m_defrag() = NULL [%d]\n", ret); return (ENOBUFS); } @@ -2869,9 +2851,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_defrag_dmamap_load++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: bus_dmamap_load_mbuf_sg failed0[%d, %d]\n", - __func__, ret, m_head->m_pkthdr.len)); + QL_DPRINT1(ha, + "bus_dmamap_load_mbuf_sg failed0 [%d, %d]\n", + ret, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); @@ -2885,9 +2867,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_non_tso_max_seg++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: (%d) nsegs too many for non-TSO[%d, %d]\n", - __func__, ret, nsegs, m_head->m_pkthdr.len)); + QL_DPRINT1(ha, + "(%d) nsegs too many for non-TSO [%d, %d]\n", + ret, nsegs, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); @@ -2902,10 +2884,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_dmamap_load++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: bus_dmamap_load_mbuf_sg failed1[%d, %d]\n", - __func__, ret, m_head->m_pkthdr.len)); - + QL_DPRINT1(ha, "bus_dmamap_load_mbuf_sg failed1 [%d, %d]\n", + ret, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); *m_headp = NULL; @@ -2924,9 +2904,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { - QL_DPRINT1(ha, (ha->pci_dev, "%s: (%d, 0x%x) insuffient BDs" - "in chain[%d] trying to free packets\n", - __func__, nsegs, elem_left, fp->rss_id)); + QL_DPRINT1(ha, "(%d, 0x%x) insuffient BDs" + " in chain[%d] trying to free packets\n", + nsegs, elem_left, fp->rss_id); fp->tx_nsegs_gt_elem_left++; @@ -2935,9 +2915,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: (%d, 0x%x) insuffient BDs in chain[%d]\n", - __func__, nsegs, elem_left, fp->rss_id)); + QL_DPRINT1(ha, + "(%d, 0x%x) insuffient BDs in chain[%d]\n", + nsegs, elem_left, fp->rss_id); fp->err_tx_nsegs_gt_elem_left++; fp->tx_ring_full = 1; @@ -3165,7 +3145,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f qlnx_txq_doorbell_wr32(ha, txq->doorbell_addr, txq->tx_db.raw); - QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT8(ha, "exit\n"); return (0); } @@ -3185,6 +3165,8 @@ qlnx_stop(qlnx_host_t *ha) * propagate the if_drv_flags * state to each tx thread */ + QL_DPRINT1(ha, "QLNX STATE = %d\n",ha->state); + if (ha->state == QLNX_STATE_OPEN) { for (i = 0; i < ha->num_rss; i++) { struct qlnx_fastpath *fp = &ha->fp_array[i]; @@ -3277,8 +3259,7 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str mp = sw_rx_data->data; if (mp == NULL) { - QL_DPRINT1(ha, (ha->pci_dev, "%s: mp = NULL\n", - __func__)); + QL_DPRINT1(ha, "mp = NULL\n"); fp->err_rx_mp_null++; rxq->sw_rx_cons = (rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1); @@ -3293,10 +3274,8 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str if (qlnx_alloc_rx_buffer(ha, rxq) != 0) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: New buffer allocation failed, dropping" - " incoming packet and reusing its buffer\n", - __func__)); + QL_DPRINT1(ha, "New buffer allocation failed, dropping" + " incoming packet and reusing its buffer\n"); qlnx_reuse_rx_data(rxq); fp->err_rx_alloc_errors++; @@ -3356,29 +3335,29 @@ qlnx_tpa_start(qlnx_host_t *ha, dev = ha->pci_dev; agg_index = cqe->tpa_agg_index; - QL_DPRINT7(ha, (dev, "%s[%d]: enter\n " - "\t type = 0x%x\n" - "\t bitfields = 0x%x\n" - "\t seg_len = 0x%x\n" - "\t pars_flags = 0x%x\n" - "\t vlan_tag = 0x%x\n" - "\t rss_hash = 0x%x\n" - "\t len_on_first_bd = 0x%x\n" - "\t placement_offset = 0x%x\n" - "\t tpa_agg_index = 0x%x\n" - "\t header_len = 0x%x\n" - "\t ext_bd_len_list[0] = 0x%x\n" - "\t ext_bd_len_list[1] = 0x%x\n" - "\t ext_bd_len_list[2] = 0x%x\n" - "\t ext_bd_len_list[3] = 0x%x\n" - "\t ext_bd_len_list[4] = 0x%x\n", - __func__, fp->rss_id, cqe->type, cqe->bitfields, cqe->seg_len, + QL_DPRINT7(ha, "[rss_id = %d]: enter\n \ + \t type = 0x%x\n \ + \t bitfields = 0x%x\n \ + \t seg_len = 0x%x\n \ + \t pars_flags = 0x%x\n \ + \t vlan_tag = 0x%x\n \ + \t rss_hash = 0x%x\n \ + \t len_on_first_bd = 0x%x\n \ + \t placement_offset = 0x%x\n \ + \t tpa_agg_index = 0x%x\n \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 22 19:43:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53D19D7895D; Mon, 22 May 2017 19:43:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C29621866; Mon, 22 May 2017 19:43:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJhUpp076449; Mon, 22 May 2017 19:43:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJhTrW076434; Mon, 22 May 2017 19:43:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221943.v4MJhTrW076434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318663 - in vendor/llvm/dist: docs include/llvm include/llvm/ADT include/llvm/Analysis include/llvm/CodeGen include/llvm/DebugInfo/CodeView include/llvm/DebugInfo/DWARF include/llvm/De... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:43:32 -0000 Author: dim Date: Mon May 22 19:43:28 2017 New Revision: 318663 URL: https://svnweb.freebsd.org/changeset/base/318663 Log: Vendor import of llvm trunk r303571: https://llvm.org/svn/llvm-project/llvm/trunk@303571 Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeCollection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeTableCollection.h (contents, props changed) vendor/llvm/dist/include/llvm/IR/DerivedUser.h (contents, props changed) vendor/llvm/dist/include/llvm/Object/COFFModuleDefinition.h (contents, props changed) vendor/llvm/dist/include/llvm/Object/WindowsResource.h (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeIndex.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeTableCollection.cpp (contents, props changed) vendor/llvm/dist/lib/Object/COFFImportFile.cpp (contents, props changed) vendor/llvm/dist/lib/Object/COFFModuleDefinition.cpp (contents, props changed) vendor/llvm/dist/lib/Object/WindowsResource.cpp (contents, props changed) vendor/llvm/dist/lib/Support/BinaryStreamRef.cpp (contents, props changed) vendor/llvm/dist/test/CodeGen/AMDGPU/frame-index-elimination.ll vendor/llvm/dist/test/CodeGen/AMDGPU/function-args.ll vendor/llvm/dist/test/CodeGen/AMDGPU/function-returns.ll vendor/llvm/dist/test/CodeGen/AMDGPU/lshl64-to-32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/regcoalesce-prune.mir vendor/llvm/dist/test/CodeGen/Generic/opt-codegen-no-target-machine.ll vendor/llvm/dist/test/CodeGen/Mips/dins.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-attr.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/add-vec.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-sub-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-sub-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-sub-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/sub-vec.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-setcc-128.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-setcc-256.ll vendor/llvm/dist/test/CodeGen/X86/fmsubadd-combine.ll vendor/llvm/dist/test/CodeGen/X86/leaFixup32.mir vendor/llvm/dist/test/CodeGen/X86/leaFixup64.mir vendor/llvm/dist/test/CodeGen/X86/subcarry.ll vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-addr-object-relocation.dwo (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-addr-object-relocation.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-multiple-cu.dwo (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-multiple-cu.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge1.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge2.yaml vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergetypes.test vendor/llvm/dist/test/LTO/X86/Inputs/strip-debug-info-bar.ll vendor/llvm/dist/test/MC/Disassembler/AMDGPU/exp_vi.txt (contents, props changed) vendor/llvm/dist/test/ThinLTO/X86/Inputs/merge-triple.ll vendor/llvm/dist/test/ThinLTO/X86/merge-triple.ll vendor/llvm/dist/test/Transforms/InstCombine/AMDGPU/amdgcn-demanded-vector-elts.ll vendor/llvm/dist/test/Transforms/InstCombine/NVPTX/ vendor/llvm/dist/test/Transforms/InstCombine/NVPTX/lit.local.cfg vendor/llvm/dist/test/Transforms/InstCombine/NVPTX/nvvm-intrins.ll vendor/llvm/dist/test/Transforms/InstCombine/wcslen-1.ll vendor/llvm/dist/test/Transforms/InstCombine/wcslen-2.ll vendor/llvm/dist/test/Transforms/InstCombine/wcslen-3.ll vendor/llvm/dist/test/Transforms/InstSimplify/icmp-bool-constant.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/canonical-2.ll vendor/llvm/dist/test/Transforms/NewGVN/completeness.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32838.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32845.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32897.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32945.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33014.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33086.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33116.ll vendor/llvm/dist/test/tools/llvm-cvtres/Inputs/ vendor/llvm/dist/test/tools/llvm-cvtres/Inputs/cursor_small.bmp (contents, props changed) vendor/llvm/dist/test/tools/llvm-cvtres/Inputs/okay_small.bmp (contents, props changed) vendor/llvm/dist/test/tools/llvm-cvtres/Inputs/test_resource.rc vendor/llvm/dist/test/tools/llvm-cvtres/Inputs/test_resource.res (contents, props changed) vendor/llvm/dist/test/tools/llvm-cvtres/resource.test Deleted: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVTypeDumper.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/RandomAccessTypeVisitor.h vendor/llvm/dist/lib/CodeGen/LiveRangeShrink.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeDumper.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/RandomAccessTypeVisitor.cpp vendor/llvm/dist/test/CodeGen/X86/avx512-mask-bugfix.ll vendor/llvm/dist/test/CodeGen/X86/lrshrink.ll vendor/llvm/dist/test/LTO/X86/Inputs/strip-debug-info.bc vendor/llvm/dist/test/Transforms/InstCombine/2008-09-29-FoldingOr.ll vendor/llvm/dist/test/Transforms/InstCombine/amdgcn-demanded-vector-elts.ll vendor/llvm/dist/test/Transforms/InstCombine/nvvm-intrins.ll Modified: vendor/llvm/dist/docs/CMake.rst vendor/llvm/dist/docs/GetElementPtr.rst vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h vendor/llvm/dist/include/llvm/ADT/Statistic.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.h vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineValueType.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/StackProtector.h vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.td vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDumper.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDumpVisitor.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeIndex.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeStreamMerger.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBTypeServerHandler.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h vendor/llvm/dist/include/llvm/IR/Argument.h vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/Constant.h vendor/llvm/dist/include/llvm/IR/Constants.h vendor/llvm/dist/include/llvm/IR/Function.h vendor/llvm/dist/include/llvm/IR/GlobalValue.h vendor/llvm/dist/include/llvm/IR/GlobalVariable.h vendor/llvm/dist/include/llvm/IR/InlineAsm.h vendor/llvm/dist/include/llvm/IR/InstrTypes.h vendor/llvm/dist/include/llvm/IR/Instruction.def vendor/llvm/dist/include/llvm/IR/Instruction.h vendor/llvm/dist/include/llvm/IR/Instructions.h vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/include/llvm/IR/OperandTraits.h vendor/llvm/dist/include/llvm/IR/Operator.h vendor/llvm/dist/include/llvm/IR/PatternMatch.h vendor/llvm/dist/include/llvm/IR/User.h vendor/llvm/dist/include/llvm/IR/Value.def vendor/llvm/dist/include/llvm/IR/Value.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/Object/Binary.h vendor/llvm/dist/include/llvm/Object/COFFImportFile.h vendor/llvm/dist/include/llvm/Object/Decompressor.h vendor/llvm/dist/include/llvm/Object/ELF.h vendor/llvm/dist/include/llvm/Object/RelocVisitor.h vendor/llvm/dist/include/llvm/PassInfo.h vendor/llvm/dist/include/llvm/PassSupport.h vendor/llvm/dist/include/llvm/Support/BinaryStreamReader.h vendor/llvm/dist/include/llvm/Support/BinaryStreamRef.h vendor/llvm/dist/include/llvm/Support/BinaryStreamWriter.h vendor/llvm/dist/include/llvm/Support/FileSystem.h vendor/llvm/dist/include/llvm/Target/GlobalISel/SelectionDAGCompat.td vendor/llvm/dist/include/llvm/Transforms/IPO/FunctionImport.h vendor/llvm/dist/include/llvm/Transforms/Scalar/GVNExpression.h vendor/llvm/dist/include/llvm/Transforms/Utils/SimplifyLibCalls.h vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/BranchProbabilityInfo.cpp vendor/llvm/dist/lib/Analysis/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/MemorySSA.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/TargetLibraryInfo.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/ValueList.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp vendor/llvm/dist/lib/CodeGen/AtomicExpandPass.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CodeGen.cpp vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/IRTranslator.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/InstructionSelector.cpp vendor/llvm/dist/lib/CodeGen/InterleavedAccessPass.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LowerEmuTLS.cpp vendor/llvm/dist/lib/CodeGen/MachineBlockPlacement.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp vendor/llvm/dist/lib/CodeGen/SafeStack.cpp vendor/llvm/dist/lib/CodeGen/SafeStackColoring.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/StatepointLowering.cpp vendor/llvm/dist/lib/CodeGen/StackProtector.cpp vendor/llvm/dist/lib/CodeGen/TargetPassConfig.cpp vendor/llvm/dist/lib/CodeGen/WinEHPrepare.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolDumper.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabase.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeSerializer.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeStreamMerger.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnit.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBTypeServerHandler.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/TpiStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp vendor/llvm/dist/lib/Demangle/ItaniumDemangle.cpp vendor/llvm/dist/lib/IR/Attributes.cpp vendor/llvm/dist/lib/IR/AutoUpgrade.cpp vendor/llvm/dist/lib/IR/Constants.cpp vendor/llvm/dist/lib/IR/ConstantsContext.h vendor/llvm/dist/lib/IR/DataLayout.cpp vendor/llvm/dist/lib/IR/Function.cpp vendor/llvm/dist/lib/IR/IRBuilder.cpp vendor/llvm/dist/lib/IR/InlineAsm.cpp vendor/llvm/dist/lib/IR/Instruction.cpp vendor/llvm/dist/lib/IR/Instructions.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.cpp vendor/llvm/dist/lib/IR/PassRegistry.cpp vendor/llvm/dist/lib/IR/User.cpp vendor/llvm/dist/lib/IR/Value.cpp vendor/llvm/dist/lib/IR/ValueTypes.cpp vendor/llvm/dist/lib/IR/Verifier.cpp vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp vendor/llvm/dist/lib/Linker/IRMover.cpp vendor/llvm/dist/lib/Object/Binary.cpp vendor/llvm/dist/lib/Object/CMakeLists.txt vendor/llvm/dist/lib/Object/Decompressor.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/BinaryStreamReader.cpp vendor/llvm/dist/lib/Support/BinaryStreamWriter.cpp vendor/llvm/dist/lib/Support/CMakeLists.txt vendor/llvm/dist/lib/Support/FormattedStream.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUCallLowering.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUCallingConv.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPURegisterInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPURegisterInfo.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist/lib/Target/AMDGPU/BUFInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h vendor/llvm/dist/lib/Target/AMDGPU/GCNRegPressure.cpp vendor/llvm/dist/lib/Target/AMDGPU/GCNRegPressure.h vendor/llvm/dist/lib/Target/AMDGPU/R600ClauseMergePass.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600Packetizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600RegisterInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600RegisterInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.h vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/SIInstrFormats.td vendor/llvm/dist/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIPeepholeSDWA.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SOPInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/Mips.h vendor/llvm/dist/lib/Target/Mips/Mips16HardFloat.cpp vendor/llvm/dist/lib/Target/Mips/MipsDelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsLongBranch.cpp vendor/llvm/dist/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsOptimizePICCall.cpp vendor/llvm/dist/lib/Target/Mips/MipsOs16.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrAltivec.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/Sparc/DelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Sparc/LeonPasses.cpp vendor/llvm/dist/lib/Target/Sparc/LeonPasses.h vendor/llvm/dist/lib/Target/Sparc/Sparc.h vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86CallingConv.td vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FixupLEAs.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrTSX.td vendor/llvm/dist/lib/Target/X86/X86InstructionSelector.cpp vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.cpp vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/Scalar/EarlyCSE.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoadCombine.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIdiomRecognize.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopPredication.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/test/Analysis/BranchProbabilityInfo/basic.ll vendor/llvm/dist/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll vendor/llvm/dist/test/Analysis/BranchProbabilityInfo/noreturn.ll vendor/llvm/dist/test/Analysis/CostModel/X86/ctlz.ll vendor/llvm/dist/test/Analysis/CostModel/X86/ctpop.ll vendor/llvm/dist/test/Analysis/CostModel/X86/cttz.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count-pow2.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-ccmp.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-misched-multimmo.ll vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/amdgpu-irtranslator.ll vendor/llvm/dist/test/CodeGen/AMDGPU/add.i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/add.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bfe-patterns.ll vendor/llvm/dist/test/CodeGen/AMDGPU/coalescer_distribute.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ctlz.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ctlz_zero_undef.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ds_write2.ll vendor/llvm/dist/test/CodeGen/AMDGPU/endcf-loop-header.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmed3.ll vendor/llvm/dist/test/CodeGen/AMDGPU/hsa-func.ll vendor/llvm/dist/test/CodeGen/AMDGPU/i1-copy-phi.ll vendor/llvm/dist/test/CodeGen/AMDGPU/inline-asm.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.atomic.dec.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.atomic.inc.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.barrier.ll vendor/llvm/dist/test/CodeGen/AMDGPU/packed-op-sel.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-peephole.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shift-and-i64-ubfe.ll vendor/llvm/dist/test/CodeGen/AMDGPU/srl.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sub.i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/subreg_interference.mir vendor/llvm/dist/test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot-compute.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt-branch-weight-bug.ll vendor/llvm/dist/test/CodeGen/Mips/mips64-f128.ll vendor/llvm/dist/test/CodeGen/NVPTX/sched1.ll vendor/llvm/dist/test/CodeGen/NVPTX/sched2.ll vendor/llvm/dist/test/CodeGen/NVPTX/vec8.ll vendor/llvm/dist/test/CodeGen/PowerPC/opt-cmp-inst-cr0-live.ll vendor/llvm/dist/test/CodeGen/PowerPC/shift128.ll vendor/llvm/dist/test/CodeGen/SPARC/LeonItinerariesUT.ll vendor/llvm/dist/test/CodeGen/X86/2007-01-08-InstrSched.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/add-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/binop.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/br.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/callingconv.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/cmp.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/constant.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/ext-x86-64.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/ext.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/frameIndex.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/gep.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-vec.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/mul-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/mul-vec.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX2.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-br.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-cmp.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-constant.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-ext-x86-64.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-ext.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-frameIndex.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-gep.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-trunc.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/trunc.ll vendor/llvm/dist/test/CodeGen/X86/O0-pipeline.ll vendor/llvm/dist/test/CodeGen/X86/addcarry.ll vendor/llvm/dist/test/CodeGen/X86/avg.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/avx.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cmp-kor-sequence.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cmp.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cvt.ll vendor/llvm/dist/test/CodeGen/X86/avx512-ext.ll vendor/llvm/dist/test/CodeGen/X86/avx512-fsel.ll vendor/llvm/dist/test/CodeGen/X86/avx512-gather-scatter-intrin.ll vendor/llvm/dist/test/CodeGen/X86/avx512-i1test.ll vendor/llvm/dist/test/CodeGen/X86/avx512-insert-extract.ll vendor/llvm/dist/test/CodeGen/X86/avx512-insert-extract_i1.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512-load-store.ll vendor/llvm/dist/test/CodeGen/X86/avx512-mask-op.ll vendor/llvm/dist/test/CodeGen/X86/avx512-mask-spills.ll vendor/llvm/dist/test/CodeGen/X86/avx512-memfold.ll vendor/llvm/dist/test/CodeGen/X86/avx512-regcall-NoMask.ll vendor/llvm/dist/test/CodeGen/X86/avx512-scalar_mask.ll vendor/llvm/dist/test/CodeGen/X86/avx512-select.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512cdvl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512cdvl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512dq-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512dq-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512dqvl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512dqvl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512er-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512ifma-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512ifmavl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/bswap_tree2.ll vendor/llvm/dist/test/CodeGen/X86/constant-combines.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-load-i1.ll vendor/llvm/dist/test/CodeGen/X86/fma-fneg-combine.ll vendor/llvm/dist/test/CodeGen/X86/fold-tied-op.ll vendor/llvm/dist/test/CodeGen/X86/fp128-i128.ll vendor/llvm/dist/test/CodeGen/X86/haddsub-2.ll vendor/llvm/dist/test/CodeGen/X86/madd.ll vendor/llvm/dist/test/CodeGen/X86/masked_gather_scatter.ll vendor/llvm/dist/test/CodeGen/X86/merge-consecutive-loads-128.ll vendor/llvm/dist/test/CodeGen/X86/misched-matrix.ll vendor/llvm/dist/test/CodeGen/X86/mul-i1024.ll vendor/llvm/dist/test/CodeGen/X86/mul-i256.ll vendor/llvm/dist/test/CodeGen/X86/mul-i512.ll vendor/llvm/dist/test/CodeGen/X86/oddshuffles.ll vendor/llvm/dist/test/CodeGen/X86/overflow.ll vendor/llvm/dist/test/CodeGen/X86/pmul.ll vendor/llvm/dist/test/CodeGen/X86/pr27591.ll vendor/llvm/dist/test/CodeGen/X86/pr28173.ll vendor/llvm/dist/test/CodeGen/X86/pr29112.ll vendor/llvm/dist/test/CodeGen/X86/pr31088.ll vendor/llvm/dist/test/CodeGen/X86/pr32241.ll vendor/llvm/dist/test/CodeGen/X86/pr32256.ll vendor/llvm/dist/test/CodeGen/X86/pr32284.ll vendor/llvm/dist/test/CodeGen/X86/pr32451.ll vendor/llvm/dist/test/CodeGen/X86/rotate.ll vendor/llvm/dist/test/CodeGen/X86/rtm.ll vendor/llvm/dist/test/CodeGen/X86/sad.ll vendor/llvm/dist/test/CodeGen/X86/select.ll vendor/llvm/dist/test/CodeGen/X86/setcc-wide-types.ll vendor/llvm/dist/test/CodeGen/X86/shrink_vmul_sse.ll vendor/llvm/dist/test/CodeGen/X86/sse-intrinsics-fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/sse-scalar-fp-arith.ll vendor/llvm/dist/test/CodeGen/X86/sse1.ll vendor/llvm/dist/test/CodeGen/X86/sse3-avx-addsub-2.ll vendor/llvm/dist/test/CodeGen/X86/sse41.ll vendor/llvm/dist/test/CodeGen/X86/vec_int_to_fp.ll vendor/llvm/dist/test/CodeGen/X86/vector-bitreverse.ll vendor/llvm/dist/test/CodeGen/X86/vector-blend.ll vendor/llvm/dist/test/CodeGen/X86/vector-sqrt.ll vendor/llvm/dist/test/CodeGen/X86/x86-interleaved-access.ll vendor/llvm/dist/test/CodeGen/X86/xmulo.ll vendor/llvm/dist/test/CodeGen/X86/xor-select-i1-combine.ll vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-headers.test vendor/llvm/dist/test/DebugInfo/llvm-symbolizer.test vendor/llvm/dist/test/Instrumentation/MemorySanitizer/csr.ll vendor/llvm/dist/test/LTO/X86/strip-debug-info.ll vendor/llvm/dist/test/MC/AMDGPU/exp.s vendor/llvm/dist/test/MC/Disassembler/AMDGPU/sopc_vi.txt vendor/llvm/dist/test/TableGen/GlobalISelEmitter.td vendor/llvm/dist/test/TableGen/intrinsic-varargs.td vendor/llvm/dist/test/Transforms/InstCombine/cast.ll vendor/llvm/dist/test/Transforms/InstCombine/lshr.ll vendor/llvm/dist/test/Transforms/InstCombine/memchr.ll vendor/llvm/dist/test/Transforms/InstCombine/set.ll vendor/llvm/dist/test/Transforms/InstSimplify/AndOrXor.ll vendor/llvm/dist/test/Transforms/JumpThreading/assume.ll vendor/llvm/dist/test/Transforms/JumpThreading/fold-not-thread.ll vendor/llvm/dist/test/Transforms/JumpThreading/guards.ll vendor/llvm/dist/test/Transforms/NewGVN/storeoverstore.ll vendor/llvm/dist/test/Transforms/SafeStack/X86/coloring-ssp.ll vendor/llvm/dist/test/Transforms/SafeStack/X86/coloring.ll vendor/llvm/dist/test/Transforms/SafeStack/X86/coloring2.ll vendor/llvm/dist/test/Transforms/SafeStack/X86/layout-frag.ll vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-cvtres/CMakeLists.txt vendor/llvm/dist/tools/llvm-cvtres/llvm-cvtres.cpp vendor/llvm/dist/tools/llvm-cvtres/llvm-cvtres.h vendor/llvm/dist/tools/llvm-dwp/llvm-dwp.cpp vendor/llvm/dist/tools/llvm-lto/llvm-lto.cpp vendor/llvm/dist/tools/llvm-pdbdump/Analyze.cpp vendor/llvm/dist/tools/llvm-pdbdump/CompactTypeDumpVisitor.cpp vendor/llvm/dist/tools/llvm-pdbdump/CompactTypeDumpVisitor.h vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.h vendor/llvm/dist/tools/llvm-pdbdump/PdbYaml.cpp vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.h vendor/llvm/dist/tools/llvm-pdbdump/YamlTypeDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.cpp vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/APIntTest.cpp vendor/llvm/dist/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp vendor/llvm/dist/unittests/IR/AttributesTest.cpp vendor/llvm/dist/unittests/IR/ConstantsTest.cpp vendor/llvm/dist/unittests/IR/DominatorTreeTest.cpp vendor/llvm/dist/unittests/IR/InstructionsTest.cpp vendor/llvm/dist/unittests/IR/MetadataTest.cpp vendor/llvm/dist/unittests/Support/BinaryStreamTest.cpp vendor/llvm/dist/unittests/Support/CrashRecoveryTest.cpp vendor/llvm/dist/unittests/Support/ScaledNumberTest.cpp vendor/llvm/dist/unittests/Target/AArch64/InstSizes.cpp vendor/llvm/dist/unittests/Transforms/Utils/Cloning.cpp vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/GlobalISelEmitter.cpp vendor/llvm/dist/utils/git-svn/git-llvm vendor/llvm/dist/utils/lit/lit/TestRunner.py Modified: vendor/llvm/dist/docs/CMake.rst ============================================================================== --- vendor/llvm/dist/docs/CMake.rst Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/docs/CMake.rst Mon May 22 19:43:28 2017 (r318663) @@ -186,8 +186,8 @@ CMake manual, or execute ``cmake --help- Sets the build type for ``make``-based generators. Possible values are Release, Debug, RelWithDebInfo and MinSizeRel. If you are using an IDE such as Visual Studio, you should use the IDE settings to set the build type. - Be aware that Release and RelWithDebInfo are not using the same optimization - level on most platform. + Be aware that Release and RelWithDebInfo use different optimization levels on + most platforms. **CMAKE_INSTALL_PREFIX**:PATH Path where LLVM will be installed if "make install" is invoked or the Modified: vendor/llvm/dist/docs/GetElementPtr.rst ============================================================================== --- vendor/llvm/dist/docs/GetElementPtr.rst Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/docs/GetElementPtr.rst Mon May 22 19:43:28 2017 (r318663) @@ -9,10 +9,11 @@ Introduction ============ This document seeks to dispel the mystery and confusion surrounding LLVM's -`GetElementPtr `_ (GEP) instruction. Questions -about the wily GEP instruction are probably the most frequently occurring -questions once a developer gets down to coding with LLVM. Here we lay out the -sources of confusion and show that the GEP instruction is really quite simple. +`GetElementPtr `_ (GEP) instruction. +Questions about the wily GEP instruction are probably the most frequently +occurring questions once a developer gets down to coding with LLVM. Here we lay +out the sources of confusion and show that the GEP instruction is really quite +simple. Address Computation =================== @@ -429,7 +430,8 @@ because LLVM has no restrictions on mixi LLVM's type-based alias analysis pass uses metadata to describe a different type system (such as the C type system), and performs type-based aliasing on top of -that. Further details are in the `language reference `_. +that. Further details are in the +`language reference `_. What happens if a GEP computation overflows? -------------------------------------------- Modified: vendor/llvm/dist/docs/LangRef.rst ============================================================================== --- vendor/llvm/dist/docs/LangRef.rst Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/docs/LangRef.rst Mon May 22 19:43:28 2017 (r318663) @@ -161,7 +161,7 @@ symbol table entries. Here is an example ; Definition of main function define i32 @main() { ; i32()* - ; Convert [13 x i8]* to i8 *... + ; Convert [13 x i8]* to i8*... %cast210 = getelementptr [13 x i8], [13 x i8]* @.str, i64 0, i64 0 ; Call puts function to write out the string to stdout. @@ -9548,7 +9548,7 @@ Syntax: :: - declare i8 *@llvm.returnaddress(i32 ) + declare i8* @llvm.returnaddress(i32 ) Overview: """"""""" @@ -9586,7 +9586,7 @@ Syntax: :: - declare i8 *@llvm.addressofreturnaddress() + declare i8* @llvm.addressofreturnaddress() Overview: """"""""" Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APInt.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/ADT/APInt.h Mon May 22 19:43:28 2017 (r318663) @@ -182,8 +182,9 @@ private: /// provides a more convenient form of divide for internal use since KnuthDiv /// has specific constraints on its inputs. If those constraints are not met /// then it provides a simpler form of divide. - static void divide(const APInt &LHS, unsigned lhsWords, const APInt &RHS, - unsigned rhsWords, APInt *Quotient, APInt *Remainder); + static void divide(const WordType *LHS, unsigned lhsWords, + const WordType *RHS, unsigned rhsWords, WordType *Quotient, + WordType *Remainder); /// out-of-line slow case for inline constructor void initSlowCase(uint64_t val, bool isSigned); @@ -1016,11 +1017,13 @@ public: /// /// \returns a new APInt value containing the division result APInt udiv(const APInt &RHS) const; + APInt udiv(uint64_t RHS) const; /// \brief Signed division function for APInt. /// /// Signed divide this APInt by APInt RHS. APInt sdiv(const APInt &RHS) const; + APInt sdiv(int64_t RHS) const; /// \brief Unsigned remainder operation. /// @@ -1032,11 +1035,13 @@ public: /// /// \returns a new APInt value containing the remainder result APInt urem(const APInt &RHS) const; + uint64_t urem(uint64_t RHS) const; /// \brief Function for signed remainder operation. /// /// Signed remainder operation on APInt. APInt srem(const APInt &RHS) const; + int64_t srem(int64_t RHS) const; /// \brief Dual division/remainder interface. /// @@ -1047,9 +1052,13 @@ public: /// udivrem(X, Y, X, Y), for example. static void udivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, APInt &Remainder); + static void udivrem(const APInt &LHS, uint64_t RHS, APInt &Quotient, + uint64_t &Remainder); static void sdivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, APInt &Remainder); + static void sdivrem(const APInt &LHS, int64_t RHS, APInt &Quotient, + int64_t &Remainder); // Operations that return overflow indicators. APInt sadd_ov(const APInt &RHS, bool &Overflow) const; @@ -2015,7 +2024,7 @@ inline APInt operator-(APInt a, const AP } inline APInt operator-(const APInt &a, APInt &&b) { - b = -std::move(b); + b.negate(); b += a; return std::move(b); } @@ -2026,7 +2035,7 @@ inline APInt operator-(APInt a, uint64_t } inline APInt operator-(uint64_t LHS, APInt b) { - b = -std::move(b); + b.negate(); b += LHS; return b; } Modified: vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h Mon May 22 19:43:28 2017 (r318663) @@ -365,6 +365,8 @@ protected: public: using iterator = SmallPtrSetIterator; using const_iterator = SmallPtrSetIterator; + using key_type = ConstPtrType; + using value_type = PtrType; SmallPtrSetImpl(const SmallPtrSetImpl &) = delete; Modified: vendor/llvm/dist/include/llvm/ADT/Statistic.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/Statistic.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/ADT/Statistic.h Mon May 22 19:43:28 2017 (r318663) @@ -101,6 +101,16 @@ public: return init(); } + void updateMax(unsigned V) { + unsigned PrevMax = Value.load(std::memory_order_relaxed); + // Keep trying to update max until we succeed or another thread produces + // a bigger max than us. + while (V > PrevMax && !Value.compare_exchange_weak( + PrevMax, V, std::memory_order_relaxed)) { + } + init(); + } + #else // Statistics are disabled in release builds. const Statistic &operator=(unsigned Val) { @@ -131,6 +141,8 @@ public: return *this; } + void updateMax(unsigned V) {} + #endif // !defined(NDEBUG) || defined(LLVM_ENABLE_STATS) protected: Modified: vendor/llvm/dist/include/llvm/ADT/Triple.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/Triple.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/ADT/Triple.h Mon May 22 19:43:28 2017 (r318663) @@ -252,6 +252,10 @@ public: ObjectFormat == Other.ObjectFormat; } + bool operator!=(const Triple &Other) const { + return !(*this == Other); + } + /// @} /// @name Normalization /// @{ @@ -722,6 +726,12 @@ public: /// \returns true if the triple is little endian, false otherwise. bool isLittleEndian() const; + /// Test whether target triples are compatible. + bool isCompatibleWith(const Triple &Other) const; + + /// Merge target triples. + std::string merge(const Triple &Other) const; + /// @} /// @name Static helpers for IDs. /// @{ Modified: vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h Mon May 22 19:43:28 2017 (r318663) @@ -84,6 +84,7 @@ #include "llvm/Analysis/MemoryLocation.h" #include "llvm/Analysis/PHITransAddr.h" #include "llvm/IR/BasicBlock.h" +#include "llvm/IR/DerivedUser.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Module.h" #include "llvm/IR/OperandTraits.h" @@ -127,7 +128,7 @@ using const_memoryaccess_def_iterator = // \brief The base for all memory accesses. All memory accesses in a block are // linked together using an intrusive list. class MemoryAccess - : public User, + : public DerivedUser, public ilist_node>, public ilist_node> { public: @@ -145,15 +146,14 @@ public: MemoryAccess(const MemoryAccess &) = delete; MemoryAccess &operator=(const MemoryAccess &) = delete; - ~MemoryAccess() override; void *operator new(size_t, unsigned) = delete; void *operator new(size_t) = delete; BasicBlock *getBlock() const { return Block; } - virtual void print(raw_ostream &OS) const = 0; - virtual void dump() const; + void print(raw_ostream &OS) const; + void dump() const; /// \brief The user iterators for a memory access typedef user_iterator iterator; @@ -207,11 +207,12 @@ protected: /// \brief Used for debugging and tracking things about MemoryAccesses. /// Guaranteed unique among MemoryAccesses, no guarantees otherwise. - virtual unsigned getID() const = 0; + inline unsigned getID() const; - MemoryAccess(LLVMContext &C, unsigned Vty, BasicBlock *BB, - unsigned NumOperands) - : User(Type::getVoidTy(C), Vty, nullptr, NumOperands), Block(BB) {} + MemoryAccess(LLVMContext &C, unsigned Vty, DeleteValueTy DeleteValue, + BasicBlock *BB, unsigned NumOperands) + : DerivedUser(Type::getVoidTy(C), Vty, nullptr, NumOperands, DeleteValue), + Block(BB) {} private: BasicBlock *Block; @@ -248,21 +249,21 @@ public: // Sadly, these have to be public because they are needed in some of the // iterators. - virtual bool isOptimized() const = 0; - virtual MemoryAccess *getOptimized() const = 0; - virtual void setOptimized(MemoryAccess *) = 0; + inline bool isOptimized() const; + inline MemoryAccess *getOptimized() const; + inline void setOptimized(MemoryAccess *); /// \brief Reset the ID of what this MemoryUse was optimized to, causing it to /// be rewalked by the walker if necessary. /// This really should only be called by tests. - virtual void resetOptimized() = 0; + inline void resetOptimized(); protected: friend class MemorySSA; friend class MemorySSAUpdater; MemoryUseOrDef(LLVMContext &C, MemoryAccess *DMA, unsigned Vty, - Instruction *MI, BasicBlock *BB) - : MemoryAccess(C, Vty, BB, 1), MemoryInst(MI) { + DeleteValueTy DeleteValue, Instruction *MI, BasicBlock *BB) + : MemoryAccess(C, Vty, DeleteValue, BB, 1), MemoryInst(MI) { setDefiningAccess(DMA); } void setDefiningAccess(MemoryAccess *DMA, bool Optimized = false) { @@ -292,7 +293,8 @@ public: DECLARE_TRANSPARENT_OPERAND_ACCESSORS(MemoryAccess); MemoryUse(LLVMContext &C, MemoryAccess *DMA, Instruction *MI, BasicBlock *BB) - : MemoryUseOrDef(C, DMA, MemoryUseVal, MI, BB), OptimizedID(0) {} + : MemoryUseOrDef(C, DMA, MemoryUseVal, deleteMe, MI, BB), + OptimizedID(0) {} // allocate space for exactly one operand void *operator new(size_t s) { return User::operator new(s, 1); } @@ -302,32 +304,30 @@ public: return MA->getValueID() == MemoryUseVal; } - void print(raw_ostream &OS) const override; + void print(raw_ostream &OS) const; - virtual void setOptimized(MemoryAccess *DMA) override { + void setOptimized(MemoryAccess *DMA) { OptimizedID = DMA->getID(); setOperand(0, DMA); } - virtual bool isOptimized() const override { + bool isOptimized() const { return getDefiningAccess() && OptimizedID == getDefiningAccess()->getID(); } - virtual MemoryAccess *getOptimized() const override { + MemoryAccess *getOptimized() const { return getDefiningAccess(); } - virtual void resetOptimized() override { + void resetOptimized() { OptimizedID = INVALID_MEMORYACCESS_ID; } protected: friend class MemorySSA; - unsigned getID() const override { - llvm_unreachable("MemoryUses do not have IDs"); - } - private: + static void deleteMe(DerivedUser *Self); + unsigned int OptimizedID; }; @@ -350,8 +350,8 @@ public: MemoryDef(LLVMContext &C, MemoryAccess *DMA, Instruction *MI, BasicBlock *BB, unsigned Ver) - : MemoryUseOrDef(C, DMA, MemoryDefVal, MI, BB), ID(Ver), - Optimized(nullptr), OptimizedID(INVALID_MEMORYACCESS_ID) {} + : MemoryUseOrDef(C, DMA, MemoryDefVal, deleteMe, MI, BB), + ID(Ver), Optimized(nullptr), OptimizedID(INVALID_MEMORYACCESS_ID) {} // allocate space for exactly one operand void *operator new(size_t s) { return User::operator new(s, 1); } @@ -361,27 +361,28 @@ public: return MA->getValueID() == MemoryDefVal; } - virtual void setOptimized(MemoryAccess *MA) override { + void setOptimized(MemoryAccess *MA) { Optimized = MA; OptimizedID = getDefiningAccess()->getID(); } - virtual MemoryAccess *getOptimized() const override { return Optimized; } - virtual bool isOptimized() const override { + MemoryAccess *getOptimized() const { return Optimized; } + bool isOptimized() const { return getOptimized() && getDefiningAccess() && OptimizedID == getDefiningAccess()->getID(); } - virtual void resetOptimized() override { + void resetOptimized() { OptimizedID = INVALID_MEMORYACCESS_ID; } - void print(raw_ostream &OS) const override; + void print(raw_ostream &OS) const; -protected: friend class MemorySSA; - unsigned getID() const override { return ID; } + unsigned getID() const { return ID; } private: + static void deleteMe(DerivedUser *Self); + const unsigned ID; MemoryAccess *Optimized; unsigned int OptimizedID; @@ -432,7 +433,8 @@ public: DECLARE_TRANSPARENT_OPERAND_ACCESSORS(MemoryAccess); MemoryPhi(LLVMContext &C, BasicBlock *BB, unsigned Ver, unsigned NumPreds = 0) - : MemoryAccess(C, MemoryPhiVal, BB, 0), ID(Ver), ReservedSpace(NumPreds) { + : MemoryAccess(C, MemoryPhiVal, deleteMe, BB, 0), ID(Ver), + ReservedSpace(NumPreds) { allocHungoffUses(ReservedSpace); } @@ -534,7 +536,9 @@ public: return V->getValueID() == MemoryPhiVal; } - void print(raw_ostream &OS) const override; + void print(raw_ostream &OS) const; + + unsigned getID() const { return ID; } protected: friend class MemorySSA; @@ -546,8 +550,6 @@ protected: User::allocHungoffUses(N, /* IsPhi */ true); } - unsigned getID() const final { return ID; } - private: // For debugging only const unsigned ID; @@ -561,8 +563,45 @@ private: ReservedSpace = std::max(E + E / 2, 2u); growHungoffUses(ReservedSpace, /* IsPhi */ true); } + + static void deleteMe(DerivedUser *Self); }; +inline unsigned MemoryAccess::getID() const { + assert((isa(this) || isa(this)) && + "only memory defs and phis have ids"); + if (const auto *MD = dyn_cast(this)) + return MD->getID(); + return cast(this)->getID(); +} + +inline bool MemoryUseOrDef::isOptimized() const { + if (const auto *MD = dyn_cast(this)) + return MD->isOptimized(); + return cast(this)->isOptimized(); +} + +inline MemoryAccess *MemoryUseOrDef::getOptimized() const { + if (const auto *MD = dyn_cast(this)) + return MD->getOptimized(); + return cast(this)->getOptimized(); +} + +inline void MemoryUseOrDef::setOptimized(MemoryAccess *MA) { + if (auto *MD = dyn_cast(this)) + MD->setOptimized(MA); + else + cast(this)->setOptimized(MA); +} + +inline void MemoryUseOrDef::resetOptimized() { + if (auto *MD = dyn_cast(this)) + MD->resetOptimized(); + else + cast(this)->resetOptimized(); +} + + template <> struct OperandTraits : public HungoffOperandTraits<2> {}; DEFINE_TRANSPARENT_OPERAND_ACCESSORS(MemoryPhi, MemoryAccess) Modified: vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Mon May 22 19:43:28 2017 (r318663) @@ -656,10 +656,12 @@ private: /// Test whether this BackedgeTakenInfo contains complete information. bool hasFullInfo() const { return isComplete(); } - /// Return an expression indicating the exact backedge-taken count of the - /// loop if it is known or SCEVCouldNotCompute otherwise. This is the - /// number of times the loop header can be guaranteed to execute, minus - /// one. + /// Return an expression indicating the exact *backedge-taken* + /// count of the loop if it is known or SCEVCouldNotCompute + /// otherwise. If execution makes it to the backedge on every + /// iteration (i.e. there are no abnormal exists like exception + /// throws and thread exits) then this is the number of times the + /// loop header will execute minus one. /// /// If the SCEV predicate associated with the answer can be different /// from AlwaysTrue, we must add a (non null) Predicates argument. @@ -1398,11 +1400,11 @@ public: const SCEV *getExitCount(const Loop *L, BasicBlock *ExitingBlock); /// If the specified loop has a predictable backedge-taken count, return it, - /// otherwise return a SCEVCouldNotCompute object. The backedge-taken count - /// is the number of times the loop header will be branched to from within - /// the loop. This is one less than the trip count of the loop, since it - /// doesn't count the first iteration, when the header is branched to from - /// outside the loop. + /// otherwise return a SCEVCouldNotCompute object. The backedge-taken count is + /// the number of times the loop header will be branched to from within the + /// loop, assuming there are no abnormal exists like exception throws. This is + /// one less than the trip count of the loop, since it doesn't count the first + /// iteration, when the header is branched to from outside the loop. /// /// Note that it is not valid to call this method on a loop without a /// loop-invariant backedge-taken count (see @@ -1417,8 +1419,10 @@ public: const SCEV *getPredicatedBackedgeTakenCount(const Loop *L, SCEVUnionPredicate &Predicates); - /// Similar to getBackedgeTakenCount, except return the least SCEV value - /// that is known never to be less than the actual backedge taken count. + /// When successful, this returns a SCEVConstant that is greater than or equal + /// to (i.e. a "conservative over-approximation") of the value returend by + /// getBackedgeTakenCount. If such a value cannot be computed, it returns the + /// SCEVCouldNotCompute object. const SCEV *getMaxBackedgeTakenCount(const Loop *L); /// Return true if the backedge taken count is either the value returned by Modified: vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.h Mon May 22 19:43:28 2017 (r318663) @@ -191,6 +191,14 @@ public: void setShouldSignExtI32Param(bool Val) { ShouldSignExtI32Param = Val; } + + /// Returns the size of the wchar_t type in bytes. + unsigned getWCharSize(const Module &M) const; + + /// Returns size of the default wchar_t type on target \p T. This is mostly + /// intended to verify that the size in the frontend matches LLVM. All other + /// queries should use getWCharSize() instead. + static unsigned getTargetWCharSize(const Triple &T); }; /// Provides information about what library functions are available for @@ -307,6 +315,11 @@ public: return Attribute::None; } + /// \copydoc TargetLibraryInfoImpl::getWCharSize() + unsigned getWCharSize(const Module &M) const { + return Impl->getWCharSize(M); + } + /// Handle invalidation from the pass manager. /// /// If we try to invalidate this info, just return false. It cannot become Modified: vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h Mon May 22 19:43:28 2017 (r318663) @@ -218,9 +218,38 @@ template class ArrayRef; DL); } - /// Returns true if the GEP is based on a pointer to a string (array of i8), - /// and is indexing into this string. - bool isGEPBasedOnPointerToString(const GEPOperator *GEP); + /// Returns true if the GEP is based on a pointer to a string (array of + // \p CharSize integers) and is indexing into this string. + bool isGEPBasedOnPointerToString(const GEPOperator *GEP, + unsigned CharSize = 8); + + /// Represents offset+length into a ConstantDataArray. + struct ConstantDataArraySlice { + /// ConstantDataArray pointer. nullptr indicates a zeroinitializer (a valid + /// initializer, it just doesn't fit the ConstantDataArray interface). + const ConstantDataArray *Array; + /// Slice starts at this Offset. + uint64_t Offset; + /// Length of the slice. + uint64_t Length; + + /// Moves the Offset and adjusts Length accordingly. + void move(uint64_t Delta) { + assert(Delta < Length); + Offset += Delta; + Length -= Delta; + } + /// Convenience accessor for elements in the slice. + uint64_t operator[](unsigned I) const { + return Array==nullptr ? 0 : Array->getElementAsInteger(I + Offset); + } + }; + + /// Returns true if the value \p V is a pointer into a ContantDataArray. + /// If successfull \p Index will point to a ConstantDataArray info object + /// with an apropriate offset. + bool getConstantDataArrayInfo(const Value *V, ConstantDataArraySlice &Slice, + unsigned ElementSize, uint64_t Offset = 0); /// This function computes the length of a null-terminated C string pointed to /// by V. If successful, it returns true and returns the string in Str. If @@ -233,7 +262,7 @@ template class ArrayRef; /// If we can compute the length of the string pointed to by the specified /// pointer, return 'len+1'. If we can't, return 0. - uint64_t GetStringLength(const Value *V); + uint64_t GetStringLength(const Value *V, unsigned CharSize = 8); /// This method strips off any GEP address adjustments and pointer casts from /// the specified value, returning the original object being addressed. Note Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Mon May 22 19:43:28 2017 (r318663) @@ -189,7 +189,7 @@ extern cl::opt UseSegmentSetForPhy void pruneValue(LiveRange &LR, SlotIndex Kill, SmallVectorImpl *EndPoints); - /// This function should be used. Its intend is to tell you that + /// This function should not be used. Its intend is to tell you that /// you are doing something wrong if you call pruveValue directly on a /// LiveInterval. Indeed, you are supposed to call pruneValue on the main /// LiveRange and all the LiveRange of the subranges if any. Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineValueType.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineValueType.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineValueType.h Mon May 22 19:43:28 2017 (r318663) @@ -56,117 +56,119 @@ class MVT { FIRST_FP_VALUETYPE = f16, LAST_FP_VALUETYPE = ppcf128, - v2i1 = 14, // 2 x i1 - v4i1 = 15, // 4 x i1 - v8i1 = 16, // 8 x i1 - v16i1 = 17, // 16 x i1 - v32i1 = 18, // 32 x i1 - v64i1 = 19, // 64 x i1 - v512i1 = 20, // 512 x i1 - v1024i1 = 21, // 1024 x i1 - - v1i8 = 22, // 1 x i8 - v2i8 = 23, // 2 x i8 - v4i8 = 24, // 4 x i8 - v8i8 = 25, // 8 x i8 - v16i8 = 26, // 16 x i8 - v32i8 = 27, // 32 x i8 - v64i8 = 28, // 64 x i8 - v128i8 = 29, //128 x i8 - v256i8 = 30, //256 x i8 - - v1i16 = 31, // 1 x i16 - v2i16 = 32, // 2 x i16 - v4i16 = 33, // 4 x i16 - v8i16 = 34, // 8 x i16 - v16i16 = 35, // 16 x i16 - v32i16 = 36, // 32 x i16 - v64i16 = 37, // 64 x i16 - v128i16 = 38, //128 x i16 - - v1i32 = 39, // 1 x i32 - v2i32 = 40, // 2 x i32 - v4i32 = 41, // 4 x i32 - v8i32 = 42, // 8 x i32 - v16i32 = 43, // 16 x i32 - v32i32 = 44, // 32 x i32 - v64i32 = 45, // 64 x i32 - - v1i64 = 46, // 1 x i64 - v2i64 = 47, // 2 x i64 - v4i64 = 48, // 4 x i64 - v8i64 = 49, // 8 x i64 - v16i64 = 50, // 16 x i64 - v32i64 = 51, // 32 x i64 + v1i1 = 14, // 1 x i1 + v2i1 = 15, // 2 x i1 + v4i1 = 16, // 4 x i1 + v8i1 = 17, // 8 x i1 + v16i1 = 18, // 16 x i1 + v32i1 = 19, // 32 x i1 + v64i1 = 20, // 64 x i1 + v512i1 = 21, // 512 x i1 + v1024i1 = 22, // 1024 x i1 + + v1i8 = 23, // 1 x i8 + v2i8 = 24, // 2 x i8 + v4i8 = 25, // 4 x i8 + v8i8 = 26, // 8 x i8 + v16i8 = 27, // 16 x i8 + v32i8 = 28, // 32 x i8 + v64i8 = 29, // 64 x i8 + v128i8 = 30, //128 x i8 + v256i8 = 31, //256 x i8 + + v1i16 = 32, // 1 x i16 + v2i16 = 33, // 2 x i16 + v4i16 = 34, // 4 x i16 + v8i16 = 35, // 8 x i16 + v16i16 = 36, // 16 x i16 + v32i16 = 37, // 32 x i16 + v64i16 = 38, // 64 x i16 + v128i16 = 39, //128 x i16 + + v1i32 = 40, // 1 x i32 + v2i32 = 41, // 2 x i32 + v4i32 = 42, // 4 x i32 + v8i32 = 43, // 8 x i32 + v16i32 = 44, // 16 x i32 + v32i32 = 45, // 32 x i32 + v64i32 = 46, // 64 x i32 + + v1i64 = 47, // 1 x i64 + v2i64 = 48, // 2 x i64 + v4i64 = 49, // 4 x i64 + v8i64 = 50, // 8 x i64 + v16i64 = 51, // 16 x i64 + v32i64 = 52, // 32 x i64 - v1i128 = 52, // 1 x i128 + v1i128 = 53, // 1 x i128 // Scalable integer types - nxv2i1 = 53, // n x 2 x i1 - nxv4i1 = 54, // n x 4 x i1 - nxv8i1 = 55, // n x 8 x i1 - nxv16i1 = 56, // n x 16 x i1 - nxv32i1 = 57, // n x 32 x i1 - - nxv1i8 = 58, // n x 1 x i8 - nxv2i8 = 59, // n x 2 x i8 - nxv4i8 = 60, // n x 4 x i8 - nxv8i8 = 61, // n x 8 x i8 - nxv16i8 = 62, // n x 16 x i8 - nxv32i8 = 63, // n x 32 x i8 - - nxv1i16 = 64, // n x 1 x i16 - nxv2i16 = 65, // n x 2 x i16 - nxv4i16 = 66, // n x 4 x i16 - nxv8i16 = 67, // n x 8 x i16 - nxv16i16 = 68, // n x 16 x i16 - nxv32i16 = 69, // n x 32 x i16 - - nxv1i32 = 70, // n x 1 x i32 - nxv2i32 = 71, // n x 2 x i32 - nxv4i32 = 72, // n x 4 x i32 - nxv8i32 = 73, // n x 8 x i32 - nxv16i32 = 74, // n x 16 x i32 - nxv32i32 = 75, // n x 32 x i32 - - nxv1i64 = 76, // n x 1 x i64 - nxv2i64 = 77, // n x 2 x i64 - nxv4i64 = 78, // n x 4 x i64 - nxv8i64 = 79, // n x 8 x i64 - nxv16i64 = 80, // n x 16 x i64 - nxv32i64 = 81, // n x 32 x i64 + nxv1i1 = 54, // n x 1 x i1 + nxv2i1 = 55, // n x 2 x i1 + nxv4i1 = 56, // n x 4 x i1 + nxv8i1 = 57, // n x 8 x i1 + nxv16i1 = 58, // n x 16 x i1 + nxv32i1 = 59, // n x 32 x i1 + + nxv1i8 = 60, // n x 1 x i8 + nxv2i8 = 61, // n x 2 x i8 + nxv4i8 = 62, // n x 4 x i8 + nxv8i8 = 63, // n x 8 x i8 + nxv16i8 = 64, // n x 16 x i8 + nxv32i8 = 65, // n x 32 x i8 + + nxv1i16 = 66, // n x 1 x i16 + nxv2i16 = 67, // n x 2 x i16 + nxv4i16 = 68, // n x 4 x i16 + nxv8i16 = 69, // n x 8 x i16 + nxv16i16 = 70, // n x 16 x i16 + nxv32i16 = 71, // n x 32 x i16 + + nxv1i32 = 72, // n x 1 x i32 + nxv2i32 = 73, // n x 2 x i32 + nxv4i32 = 74, // n x 4 x i32 + nxv8i32 = 75, // n x 8 x i32 + nxv16i32 = 76, // n x 16 x i32 + nxv32i32 = 77, // n x 32 x i32 + + nxv1i64 = 78, // n x 1 x i64 + nxv2i64 = 79, // n x 2 x i64 + nxv4i64 = 80, // n x 4 x i64 + nxv8i64 = 81, // n x 8 x i64 + nxv16i64 = 82, // n x 16 x i64 + nxv32i64 = 83, // n x 32 x i64 - FIRST_INTEGER_VECTOR_VALUETYPE = v2i1, + FIRST_INTEGER_VECTOR_VALUETYPE = v1i1, LAST_INTEGER_VECTOR_VALUETYPE = nxv32i64, - FIRST_INTEGER_SCALABLE_VALUETYPE = nxv2i1, + FIRST_INTEGER_SCALABLE_VALUETYPE = nxv1i1, LAST_INTEGER_SCALABLE_VALUETYPE = nxv32i64, - v2f16 = 82, // 2 x f16 - v4f16 = 83, // 4 x f16 - v8f16 = 84, // 8 x f16 - v1f32 = 85, // 1 x f32 - v2f32 = 86, // 2 x f32 - v4f32 = 87, // 4 x f32 - v8f32 = 88, // 8 x f32 - v16f32 = 89, // 16 x f32 - v1f64 = 90, // 1 x f64 - v2f64 = 91, // 2 x f64 - v4f64 = 92, // 4 x f64 - v8f64 = 93, // 8 x f64 - - nxv2f16 = 94, // n x 2 x f16 - nxv4f16 = 95, // n x 4 x f16 - nxv8f16 = 96, // n x 8 x f16 - nxv1f32 = 97, // n x 1 x f32 - nxv2f32 = 98, // n x 2 x f32 - nxv4f32 = 99, // n x 4 x f32 - nxv8f32 = 100, // n x 8 x f32 - nxv16f32 = 101, // n x 16 x f32 - nxv1f64 = 102, // n x 1 x f64 - nxv2f64 = 103, // n x 2 x f64 - nxv4f64 = 104, // n x 4 x f64 - nxv8f64 = 105, // n x 8 x f64 + v2f16 = 84, // 2 x f16 + v4f16 = 85, // 4 x f16 + v8f16 = 86, // 8 x f16 + v1f32 = 87, // 1 x f32 + v2f32 = 88, // 2 x f32 + v4f32 = 89, // 4 x f32 + v8f32 = 90, // 8 x f32 + v16f32 = 91, // 16 x f32 + v1f64 = 92, // 1 x f64 + v2f64 = 93, // 2 x f64 + v4f64 = 94, // 4 x f64 + v8f64 = 95, // 8 x f64 + + nxv2f16 = 96, // n x 2 x f16 + nxv4f16 = 97, // n x 4 x f16 + nxv8f16 = 98, // n x 8 x f16 + nxv1f32 = 99, // n x 1 x f32 + nxv2f32 = 100, // n x 2 x f32 + nxv4f32 = 101, // n x 4 x f32 + nxv8f32 = 102, // n x 8 x f32 + nxv16f32 = 103, // n x 16 x f32 + nxv1f64 = 104, // n x 1 x f64 + nxv2f64 = 105, // n x 2 x f64 + nxv4f64 = 106, // n x 4 x f64 + nxv8f64 = 107, // n x 8 x f64 FIRST_FP_VECTOR_VALUETYPE = v2f16, LAST_FP_VECTOR_VALUETYPE = nxv8f64, @@ -174,21 +176,21 @@ class MVT { FIRST_FP_SCALABLE_VALUETYPE = nxv2f16, LAST_FP_SCALABLE_VALUETYPE = nxv8f64, - FIRST_VECTOR_VALUETYPE = v2i1, + FIRST_VECTOR_VALUETYPE = v1i1, LAST_VECTOR_VALUETYPE = nxv8f64, - x86mmx = 106, // This is an X86 MMX value + x86mmx = 108, // This is an X86 MMX value - Glue = 107, // This glues nodes together during pre-RA sched + Glue = 109, // This glues nodes together during pre-RA sched - isVoid = 108, // This has no value + isVoid = 110, // This has no value - Untyped = 109, // This value takes a register, but has + Untyped = 111, // This value takes a register, but has // unspecified type. The register class // will be determined by the opcode. FIRST_VALUETYPE = 1, // This is always the beginning of the list. - LAST_VALUETYPE = 110, // This always remains at the end of the list. + LAST_VALUETYPE = 112, // This always remains at the end of the list. // This is the current maximum for LAST_VALUETYPE. // MVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors @@ -411,6 +413,7 @@ class MVT { switch (SimpleTy) { default: llvm_unreachable("Not a vector MVT!"); + case v1i1: case v2i1: case v4i1: case v8i1: @@ -419,6 +422,7 @@ class MVT { case v64i1: case v512i1: case v1024i1: + case nxv1i1: case nxv2i1: case nxv4i1: case nxv8i1: @@ -589,6 +593,7 @@ class MVT { case nxv2f16: case nxv2f32: case nxv2f64: return 2; + case v1i1: case v1i8: case v1i16: case v1i32: @@ -596,6 +601,7 @@ class MVT { case v1i128: case v1f32: case v1f64: + case nxv1i1: case nxv1i8: case nxv1i16: case nxv1i32: @@ -628,7 +634,9 @@ class MVT { "in codegen and has no size"); case Metadata: llvm_unreachable("Value type is metadata."); - case i1 : return 1; + case i1: + case v1i1: + case nxv1i1: return 1; case v2i1: case nxv2i1: return 2; case v4i1: @@ -814,6 +822,7 @@ class MVT { default: break; case MVT::i1: + if (NumElements == 1) return MVT::v1i1; if (NumElements == 2) return MVT::v2i1; if (NumElements == 4) return MVT::v4i1; if (NumElements == 8) return MVT::v8i1; @@ -891,6 +900,7 @@ class MVT { default: break; case MVT::i1: + if (NumElements == 1) return MVT::nxv1i1; if (NumElements == 2) return MVT::nxv2i1; if (NumElements == 4) return MVT::nxv4i1; if (NumElements == 8) return MVT::nxv8i1; Modified: vendor/llvm/dist/include/llvm/CodeGen/Passes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/Passes.h Mon May 22 19:40:56 2017 (r318662) +++ vendor/llvm/dist/include/llvm/CodeGen/Passes.h Mon May 22 19:43:28 2017 (r318663) @@ -33,7 +33,7 @@ class raw_ostream; /// List of target independent CodeGen pass IDs. namespace llvm { - FunctionPass *createAtomicExpandPass(const TargetMachine *TM); + FunctionPass *createAtomicExpandPass(); /// createUnreachableBlockEliminationPass - The LLVM code generator does not /// work well with unreachable basic blocks (what live ranges make sense for a @@ -66,7 +66,7 @@ namespace llvm { /// createCodeGenPreparePass - Transform the code to expose more pattern /// matching during instruction selection. - FunctionPass *createCodeGenPreparePass(const TargetMachine *TM = nullptr); + FunctionPass *createCodeGenPreparePass(); /// createScalarizeMaskedMemIntrinPass - Replace masked load, store, gather /// and scatter intrinsics with scalar code when target doesn't support them. @@ -133,10 +133,6 @@ namespace llvm { // instruction and update the MachineFunctionInfo with that information. extern char &ShrinkWrapID; - /// LiveRangeShrink pass. Move instruction close to its definition to shrink - /// the definition's live range. - extern char &LiveRangeShrinkID; - /// Greedy register allocator. extern char &RAGreedyID; @@ -177,7 +173,7 @@ namespace llvm { /// PrologEpilogCodeInserter - This pass inserts prolog and epilog code, /// and eliminates abstract frame references. extern char &PrologEpilogCodeInserterID; - MachineFunctionPass *createPrologEpilogInserterPass(const TargetMachine *TM); + MachineFunctionPass *createPrologEpilogInserterPass(); /// ExpandPostRAPseudos - This pass expands pseudo instructions after /// register allocation. @@ -305,7 +301,7 @@ namespace llvm { /// createStackProtectorPass - This pass adds stack protectors to functions. /// - FunctionPass *createStackProtectorPass(const TargetMachine *TM); + FunctionPass *createStackProtectorPass(); /// createMachineVerifierPass - This pass verifies cenerated machine code /// instructions for correctness. @@ -314,11 +310,11 @@ namespace llvm { /// createDwarfEHPass - This pass mulches exception handling code into a form /// adapted to code generation. Required if using dwarf exception handling. - FunctionPass *createDwarfEHPass(const TargetMachine *TM); + FunctionPass *createDwarfEHPass(); /// createWinEHPass - Prepares personality functions used by MSVC on Windows, /// in addition to the Itanium LSDA based personalities. - FunctionPass *createWinEHPass(const TargetMachine *TM); + FunctionPass *createWinEHPass(); /// createSjLjEHPreparePass - This pass adapts exception handling code to use /// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow. @@ -362,12 +358,12 @@ namespace llvm { /// InterleavedAccess Pass - This pass identifies and matches interleaved /// memory accesses to target specific intrinsics. /// - FunctionPass *createInterleavedAccessPass(const TargetMachine *TM); + FunctionPass *createInterleavedAccessPass(); /// LowerEmuTLS - This pass generates __emutls_[vt].xyz variables for all /// TLS variables for the emulated TLS model. /// - ModulePass *createLowerEmuTLSPass(const TargetMachine *TM); + ModulePass *createLowerEmuTLSPass(); /// This pass lowers the @llvm.load.relative intrinsic to instructions. /// This is unsafe to do earlier because a pass may combine the constant @@ -384,7 +380,7 @@ namespace llvm { /// This pass splits the stack into a safe stack and an unsafe stack to /// protect against stack-based overflow vulnerabilities. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 22 19:43:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 034CFD78962; Mon, 22 May 2017 19:43:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE0AF1869; Mon, 22 May 2017 19:43:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJhZWP076500; Mon, 22 May 2017 19:43:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJhZfM076499; Mon, 22 May 2017 19:43:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221943.v4MJhZfM076499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318664 - vendor/llvm/llvm-trunk-r303571 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:43:37 -0000 Author: dim Date: Mon May 22 19:43:35 2017 New Revision: 318664 URL: https://svnweb.freebsd.org/changeset/base/318664 Log: Tag llvm trunk r303571. Added: vendor/llvm/llvm-trunk-r303571/ - copied from r318663, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Mon May 22 19:43:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CB84D789EE; Mon, 22 May 2017 19:43:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8CD21963; Mon, 22 May 2017 19:43:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJhmjO076593; Mon, 22 May 2017 19:43:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJhjdW076562; Mon, 22 May 2017 19:43:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221943.v4MJhjdW076562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318665 - in vendor/clang/dist: include/clang/AST include/clang/Basic include/clang/Format include/clang/Lex include/clang/Parse include/clang/Sema include/clang/Serialization lib/AST l... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:43:50 -0000 Author: dim Date: Mon May 22 19:43:45 2017 New Revision: 318665 URL: https://svnweb.freebsd.org/changeset/base/318665 Log: Vendor import of clang trunk r303571: https://llvm.org/svn/llvm-project/cfe/trunk@303571 Added: vendor/clang/dist/test/CodeGen/micromips-attr.c (contents, props changed) vendor/clang/dist/test/CodeGen/wchar-size.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/amdgcn-automatic-variable.cpp (contents, props changed) vendor/clang/dist/test/CodeGenOpenCL/amdgcn-automatic-variable.cl vendor/clang/dist/test/Modules/extern_cxx.cpp (contents, props changed) vendor/clang/dist/test/Modules/macro-redefinition.cpp (contents, props changed) vendor/clang/dist/test/Sema/attr-micromips.c (contents, props changed) vendor/clang/dist/test/SemaCXX/Inputs/nullability-completeness.h (contents, props changed) Modified: vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/CXXInheritance.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/Basic/AddressSpaces.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Format/Format.h vendor/clang/dist/include/clang/Lex/ModuleMap.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/DeclSpec.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/Serialization/ASTWriter.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/CXXInheritance.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGAtomic.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CGValue.h vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypeCache.h vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.h vendor/clang/dist/lib/Format/BreakableToken.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/Format.cpp vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/UnwrappedLineFormatter.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Index/IndexBody.cpp vendor/clang/dist/lib/Index/IndexDecl.cpp vendor/clang/dist/lib/Index/IndexSymbol.cpp vendor/clang/dist/lib/Index/USRGeneration.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseOpenMP.cpp vendor/clang/dist/lib/Parse/ParsePragma.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporter.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp vendor/clang/dist/test/CodeGen/address-space.c vendor/clang/dist/test/CodeGenCUDA/flush-denormals.cu vendor/clang/dist/test/CodeGenCXX/strict-vtable-pointers.cpp vendor/clang/dist/test/CodeGenOpenCL/amdgpu-alignment.cl vendor/clang/dist/test/CodeGenOpenCL/amdgpu-debug-info-pointer-address-space.cl vendor/clang/dist/test/CodeGenOpenCL/amdgpu-debug-info-variable-expression.cl vendor/clang/dist/test/CodeGenOpenCL/amdgpu-nullptr.cl vendor/clang/dist/test/CodeGenOpenCL/builtins-amdgcn.cl vendor/clang/dist/test/CodeGenOpenCL/byval.cl vendor/clang/dist/test/CodeGenOpenCL/size_t.cl vendor/clang/dist/test/Index/Core/external-source-symbol-attr.m vendor/clang/dist/test/Index/Core/index-dependent-source.cpp vendor/clang/dist/test/Index/Core/index-source.cpp vendor/clang/dist/test/Index/Core/index-source.m vendor/clang/dist/test/Misc/pragma-attribute-supported-attributes-list.test vendor/clang/dist/test/Modules/preprocess-module.cpp vendor/clang/dist/test/Parser/cxx-template-argument.cpp vendor/clang/dist/test/Parser/cxx0x-ambig.cpp vendor/clang/dist/test/Parser/cxx0x-decl.cpp vendor/clang/dist/test/Sema/block-args.c vendor/clang/dist/test/Sema/integer-overflow.c vendor/clang/dist/test/Sema/sizeof-struct-non-zero-as-member.cl vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp vendor/clang/dist/test/SemaCXX/local-classes.cpp vendor/clang/dist/test/SemaCXX/modules-ts.cppm vendor/clang/dist/test/SemaCXX/nullability.cpp vendor/clang/dist/test/SemaCXX/warn-shadow.cpp vendor/clang/dist/test/SemaObjC/unguarded-availability.m vendor/clang/dist/test/SemaOpenCL/storageclass-cl20.cl vendor/clang/dist/test/SemaOpenCL/storageclass.cl vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/unittests/Format/FormatTestComments.cpp vendor/clang/dist/unittests/Format/FormatTestJS.cpp vendor/clang/dist/unittests/Format/FormatTestSelective.cpp Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Mon May 22 19:43:45 2017 (r318665) @@ -935,7 +935,7 @@ public: /// \brief Get the additional modules in which the definition \p Def has /// been merged. - ArrayRef getModulesWithMergedDefinition(NamedDecl *Def) { + ArrayRef getModulesWithMergedDefinition(const NamedDecl *Def) { auto MergedIt = MergedDefModules.find(Def); if (MergedIt == MergedDefModules.end()) return None; @@ -2324,8 +2324,7 @@ public: uint64_t getTargetNullPointerValue(QualType QT) const; bool addressSpaceMapManglingFor(unsigned AS) const { - return AddrSpaceMapMangling || - AS >= LangAS::Count; + return AddrSpaceMapMangling || AS >= LangAS::FirstTargetAddressSpace; } private: Modified: vendor/clang/dist/include/clang/AST/CXXInheritance.h ============================================================================== --- vendor/clang/dist/include/clang/AST/CXXInheritance.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/AST/CXXInheritance.h Mon May 22 19:43:45 2017 (r318665) @@ -127,7 +127,11 @@ class CXXBasePaths { /// class subobjects for that class type. The key of the map is /// the cv-unqualified canonical type of the base class subobject. llvm::SmallDenseMap, 8> ClassSubobjects; - + + /// VisitedDependentRecords - Records the dependent records that have been + /// already visited. + llvm::SmallDenseSet VisitedDependentRecords; + /// FindAmbiguities - Whether Sema::IsDerivedFrom should try find /// ambiguous paths while it is looking for a path from a derived /// type to a base type. Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Mon May 22 19:43:45 2017 (r318665) @@ -34,6 +34,7 @@ class DeclarationName; class DependentDiagnostic; class EnumDecl; class ExportDecl; +class ExternalSourceSymbolAttr; class FunctionDecl; class FunctionType; enum Linkage : unsigned char; @@ -332,15 +333,15 @@ private: bool AccessDeclContextSanity() const; protected: - Decl(Kind DK, DeclContext *DC, SourceLocation L) - : NextInContextAndBits(), DeclCtx(DC), - Loc(L), DeclKind(DK), InvalidDecl(0), - HasAttrs(false), Implicit(false), Used(false), Referenced(false), - Access(AS_none), FromASTFile(0), Hidden(DC && cast(DC)->Hidden), - IdentifierNamespace(getIdentifierNamespaceForKind(DK)), - CacheValidAndLinkage(0) - { + : NextInContextAndBits(), DeclCtx(DC), Loc(L), DeclKind(DK), + InvalidDecl(0), HasAttrs(false), Implicit(false), Used(false), + Referenced(false), Access(AS_none), FromASTFile(0), + Hidden(DC && cast(DC)->Hidden && + (!cast(DC)->isFromASTFile() || + hasLocalOwningModuleStorage())), + IdentifierNamespace(getIdentifierNamespaceForKind(DK)), + CacheValidAndLinkage(0) { if (StatisticsEnabled) add(DK); } @@ -562,6 +563,10 @@ public: NextInContextAndBits.setInt(Bits); } + /// \brief Looks on this and related declarations for an applicable + /// external source symbol attribute. + ExternalSourceSymbolAttr *getExternalSourceSymbolAttr() const; + /// \brief Whether this declaration was marked as being private to the /// module in which it was defined. bool isModulePrivate() const { @@ -698,6 +703,9 @@ public: Module *getLocalOwningModule() const { if (isFromASTFile() || !Hidden) return nullptr; + + assert(hasLocalOwningModuleStorage() && + "hidden local decl but no local module storage"); return reinterpret_cast(this)[-1]; } void setLocalOwningModule(Module *M) { Modified: vendor/clang/dist/include/clang/AST/Type.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Type.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/AST/Type.h Mon May 22 19:43:45 2017 (r318665) @@ -333,15 +333,18 @@ public: bool hasAddressSpace() const { return Mask & AddressSpaceMask; } unsigned getAddressSpace() const { return Mask >> AddressSpaceShift; } + bool hasTargetSpecificAddressSpace() const { + return getAddressSpace() >= LangAS::FirstTargetAddressSpace; + } /// Get the address space attribute value to be printed by diagnostics. unsigned getAddressSpaceAttributePrintValue() const { auto Addr = getAddressSpace(); // This function is not supposed to be used with language specific // address spaces. If that happens, the diagnostic message should consider // printing the QualType instead of the address space value. - assert(Addr == 0 || Addr >= LangAS::Count); + assert(Addr == 0 || hasTargetSpecificAddressSpace()); if (Addr) - return Addr - LangAS::Count; + return Addr - LangAS::FirstTargetAddressSpace; // TODO: The diagnostic messages where Addr may be 0 should be fixed // since it cannot differentiate the situation where 0 denotes the default // address space or user specified __attribute__((address_space(0))). @@ -2008,10 +2011,11 @@ public: Optional getNullability(const ASTContext &context) const; /// Determine whether the given type can have a nullability - /// specifier applied to it, i.e., if it is any kind of pointer type - /// or a dependent type that could instantiate to any kind of - /// pointer type. - bool canHaveNullability() const; + /// specifier applied to it, i.e., if it is any kind of pointer type. + /// + /// \param ResultIfUnknown The value to return if we don't yet know whether + /// this type can have nullability because it is dependent. + bool canHaveNullability(bool ResultIfUnknown = true) const; /// Retrieve the set of substitutions required when accessing a member /// of the Objective-C receiver type that is declared in the given context. Modified: vendor/clang/dist/include/clang/Basic/AddressSpaces.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/AddressSpaces.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Basic/AddressSpaces.h Mon May 22 19:43:45 2017 (r318665) @@ -45,13 +45,12 @@ enum ID { // This denotes the count of language-specific address spaces and also // the offset added to the target-specific address spaces, which are usually // specified by address space attributes __attribute__(address_space(n))). - Count + FirstTargetAddressSpace }; /// The type of a lookup table which maps from language-specific address spaces /// to target-specific ones. -typedef unsigned Map[Count]; - +typedef unsigned Map[FirstTargetAddressSpace]; } } Modified: vendor/clang/dist/include/clang/Basic/Attr.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/Attr.td Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Basic/Attr.td Mon May 22 19:43:45 2017 (r318665) @@ -1179,6 +1179,12 @@ def MipsInterrupt : InheritableAttr, Tar let Documentation = [MipsInterruptDocs]; } +def MicroMips : InheritableAttr, TargetSpecificAttr { + let Spellings = [GCC<"micromips">]; + let Subjects = SubjectList<[Function], ErrorDiag>; + let Documentation = [MicroMipsDocs]; +} + def Mode : Attr { let Spellings = [GCC<"mode">]; let Subjects = SubjectList<[Var, Enum, TypedefName, Field], ErrorDiag, @@ -1261,6 +1267,12 @@ def NoMips16 : InheritableAttr, TargetSp let Documentation = [Undocumented]; } +def NoMicroMips : InheritableAttr, TargetSpecificAttr { + let Spellings = [GCC<"nomicromips">]; + let Subjects = SubjectList<[Function], ErrorDiag>; + let Documentation = [MicroMipsDocs]; +} + // This is not a TargetSpecificAttr so that is silently accepted and // ignored on other targets as encouraged by the OpenCL spec. // Modified: vendor/clang/dist/include/clang/Basic/AttrDocs.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/AttrDocs.td Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Basic/AttrDocs.td Mon May 22 19:43:45 2017 (r318665) @@ -1269,6 +1269,19 @@ The semantics are as follows: }]; } +def MicroMipsDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +Clang supports the GNU style ``__attribute__((micromips))`` and +``__attribute__((nomicromips))`` attributes on MIPS targets. These attributes +may be attached to a function definition and instructs the backend to generate +or not to generate microMIPS code for that function. + +These attributes override the `-mmicromips` and `-mno-micromips` options +on the command line. + }]; +} + def AVRInterruptDocs : Documentation { let Category = DocCatFunction; let Content = [{ Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Mon May 22 19:43:45 2017 (r318665) @@ -2490,7 +2490,7 @@ def err_attribute_address_multiple_quali def err_attribute_address_function_type : Error< "function type may not be qualified with an address space">; def err_as_qualified_auto_decl : Error< - "automatic variable qualified with an address space">; + "automatic variable qualified with an%select{| invalid}0 address space">; def err_arg_with_address_space : Error< "parameter may not be qualified with an address space">; def err_field_with_address_space : Error< Modified: vendor/clang/dist/include/clang/Basic/LangOptions.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/LangOptions.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Basic/LangOptions.h Mon May 22 19:43:45 2017 (r318665) @@ -168,7 +168,7 @@ public: /// Do we need to track the owning module for a local declaration? bool trackLocalOwningModule() const { - return ModulesLocalVisibility; + return isCompilingModule() || ModulesLocalVisibility || ModulesTS; } bool isSignedOverflowDefined() const { Modified: vendor/clang/dist/include/clang/Format/Format.h ============================================================================== --- vendor/clang/dist/include/clang/Format/Format.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Format/Format.h Mon May 22 19:43:45 2017 (r318665) @@ -1133,6 +1133,9 @@ struct FormatStyle { /// ``Foo `` instead of ``Foo``. bool ObjCSpaceBeforeProtocolList; + /// \brief The penalty for breaking around an assignment operator. + unsigned PenaltyBreakAssignment; + /// \brief The penalty for breaking a function call after ``call(``. unsigned PenaltyBreakBeforeFirstCallParameter; @@ -1420,6 +1423,8 @@ struct FormatStyle { ObjCBlockIndentWidth == R.ObjCBlockIndentWidth && ObjCSpaceAfterProperty == R.ObjCSpaceAfterProperty && ObjCSpaceBeforeProtocolList == R.ObjCSpaceBeforeProtocolList && + PenaltyBreakAssignment == + R.PenaltyBreakAssignment && PenaltyBreakBeforeFirstCallParameter == R.PenaltyBreakBeforeFirstCallParameter && PenaltyBreakComment == R.PenaltyBreakComment && Modified: vendor/clang/dist/include/clang/Lex/ModuleMap.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/ModuleMap.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Lex/ModuleMap.h Mon May 22 19:43:45 2017 (r318665) @@ -507,16 +507,6 @@ public: /// false otherwise. bool resolveConflicts(Module *Mod, bool Complain); - /// \brief Infers the (sub)module based on the given source location and - /// source manager. - /// - /// \param Loc The location within the source that we are querying, along - /// with its source manager. - /// - /// \returns The module that owns this source location, or null if no - /// module owns this source location. - Module *inferModuleFromLocation(FullSourceLoc Loc); - /// \brief Sets the umbrella header of the given module to the given /// header. void setUmbrellaHeader(Module *Mod, const FileEntry *UmbrellaHeader, Modified: vendor/clang/dist/include/clang/Lex/Preprocessor.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/Preprocessor.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Lex/Preprocessor.h Mon May 22 19:43:45 2017 (r318665) @@ -1917,14 +1917,11 @@ public: /// into a module, or is outside any module, returns nullptr. Module *getModuleForLocation(SourceLocation Loc); - /// \brief Find the module that contains the specified location, either - /// directly or indirectly. - Module *getModuleContainingLocation(SourceLocation Loc); - /// \brief We want to produce a diagnostic at location IncLoc concerning a /// missing module import. /// /// \param IncLoc The location at which the missing import was detected. + /// \param M The desired module. /// \param MLoc A location within the desired module at which some desired /// effect occurred (eg, where a desired entity was declared). /// @@ -1932,6 +1929,7 @@ public: /// Null if no such file could be determined or if a #include is not /// appropriate. const FileEntry *getModuleHeaderToIncludeForDiagnostics(SourceLocation IncLoc, + Module *M, SourceLocation MLoc); private: Modified: vendor/clang/dist/include/clang/Parse/Parser.h ============================================================================== --- vendor/clang/dist/include/clang/Parse/Parser.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Parse/Parser.h Mon May 22 19:43:45 2017 (r318665) @@ -304,8 +304,9 @@ public: } /// ConsumeToken - Consume the current 'peek token' and lex the next one. - /// This does not work with special tokens: string literals, code completion - /// and balanced tokens must be handled using the specific consume methods. + /// This does not work with special tokens: string literals, code completion, + /// annotation tokens and balanced tokens must be handled using the specific + /// consume methods. /// Returns the location of the consumed token. SourceLocation ConsumeToken() { assert(!isTokenSpecial() && @@ -366,7 +367,7 @@ private: /// isTokenSpecial - True if this token requires special consumption methods. bool isTokenSpecial() const { return isTokenStringLiteral() || isTokenParen() || isTokenBracket() || - isTokenBrace() || Tok.is(tok::code_completion); + isTokenBrace() || Tok.is(tok::code_completion) || Tok.isAnnotation(); } /// \brief Returns true if the current token is '=' or is a type of '='. @@ -397,9 +398,19 @@ private: if (Tok.is(tok::code_completion)) return ConsumeCodeCompletionTok ? ConsumeCodeCompletionToken() : handleUnexpectedCodeCompletionToken(); + if (Tok.isAnnotation()) + return ConsumeAnnotationToken(); return ConsumeToken(); } + SourceLocation ConsumeAnnotationToken() { + assert(Tok.isAnnotation() && "wrong consume method"); + SourceLocation Loc = Tok.getLocation(); + PrevTokLocation = Tok.getAnnotationEndLoc(); + PP.Lex(Tok); + return Loc; + } + /// ConsumeParen - This consume method keeps the paren count up-to-date. /// SourceLocation ConsumeParen() { @@ -1449,6 +1460,7 @@ public: }; ExprResult ParseExpression(TypeCastState isTypeCast = NotTypeCast); + ExprResult ParseConstantExpressionInExprEvalContext(TypeCastState isTypeCast); ExprResult ParseConstantExpression(TypeCastState isTypeCast = NotTypeCast); ExprResult ParseConstraintExpression(); // Expr that doesn't include commas. Modified: vendor/clang/dist/include/clang/Sema/DeclSpec.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/DeclSpec.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Sema/DeclSpec.h Mon May 22 19:43:45 2017 (r318665) @@ -1999,41 +1999,6 @@ public: llvm_unreachable("unknown context kind!"); } - /// diagnoseIdentifier - Return true if the identifier is prohibited and - /// should be diagnosed (because it cannot be anything else). - bool diagnoseIdentifier() const { - switch (Context) { - case FileContext: - case KNRTypeListContext: - case MemberContext: - case BlockContext: - case ForContext: - case InitStmtContext: - case ConditionContext: - case PrototypeContext: - case LambdaExprParameterContext: - case TemplateParamContext: - case CXXCatchContext: - case ObjCCatchContext: - case TypeNameContext: - case FunctionalCastContext: - case ConversionIdContext: - case ObjCParameterContext: - case ObjCResultContext: - case BlockLiteralContext: - case CXXNewContext: - case LambdaExprContext: - return false; - - case AliasDeclContext: - case AliasTemplateContext: - case TemplateTypeArgContext: - case TrailingReturnContext: - return true; - } - llvm_unreachable("unknown context kind!"); - } - /// Return true if the context permits a C++17 decomposition declarator. bool mayHaveDecompositionDeclarator() const { switch (Context) { Modified: vendor/clang/dist/include/clang/Sema/Sema.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Sema.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Sema/Sema.h Mon May 22 19:43:45 2017 (r318665) @@ -1507,6 +1507,12 @@ public: hasVisibleDefaultArgument(const NamedDecl *D, llvm::SmallVectorImpl *Modules = nullptr); + /// Determine if there is a visible declaration of \p D that is an explicit + /// specialization declaration for a specialization of a template. (For a + /// member specialization, use hasVisibleMemberSpecialization.) + bool hasVisibleExplicitSpecialization( + const NamedDecl *D, llvm::SmallVectorImpl *Modules = nullptr); + /// Determine if there is a visible declaration of \p D that is a member /// specialization declaration (as opposed to an instantiated declaration). bool hasVisibleMemberSpecialization( @@ -2360,7 +2366,7 @@ public: void MergeVarDeclTypes(VarDecl *New, VarDecl *Old, bool MergeTypeWithOld); void MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old); bool checkVarDeclRedefinition(VarDecl *OldDefn, VarDecl *NewDefn); - void notePreviousDefinition(SourceLocation Old, SourceLocation New); + void notePreviousDefinition(const NamedDecl *Old, SourceLocation New); bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S); // AssignmentAction - This is used by all the assignment diagnostic functions @@ -7377,9 +7383,9 @@ public: /// but have not yet been performed. std::deque PendingInstantiations; - class SavePendingInstantiationsAndVTableUsesRAII { + class GlobalEagerInstantiationScope { public: - SavePendingInstantiationsAndVTableUsesRAII(Sema &S, bool Enabled) + GlobalEagerInstantiationScope(Sema &S, bool Enabled) : S(S), Enabled(Enabled) { if (!Enabled) return; @@ -7387,7 +7393,14 @@ public: SavedVTableUses.swap(S.VTableUses); } - ~SavePendingInstantiationsAndVTableUsesRAII() { + void perform() { + if (Enabled) { + S.DefineUsedVTables(); + S.PerformPendingInstantiations(); + } + } + + ~GlobalEagerInstantiationScope() { if (!Enabled) return; // Restore the set of pending vtables. @@ -7417,14 +7430,16 @@ public: /// types, static variables, enumerators, etc. std::deque PendingLocalImplicitInstantiations; - class SavePendingLocalImplicitInstantiationsRAII { + class LocalEagerInstantiationScope { public: - SavePendingLocalImplicitInstantiationsRAII(Sema &S): S(S) { + LocalEagerInstantiationScope(Sema &S) : S(S) { SavedPendingLocalImplicitInstantiations.swap( S.PendingLocalImplicitInstantiations); } - ~SavePendingLocalImplicitInstantiationsRAII() { + void perform() { S.PerformPendingInstantiations(/*LocalOnly=*/true); } + + ~LocalEagerInstantiationScope() { assert(S.PendingLocalImplicitInstantiations.empty() && "there shouldn't be any pending local implicit instantiations"); SavedPendingLocalImplicitInstantiations.swap( @@ -7434,7 +7449,7 @@ public: private: Sema &S; std::deque - SavedPendingLocalImplicitInstantiations; + SavedPendingLocalImplicitInstantiations; }; /// A helper class for building up ExtParameterInfos. Modified: vendor/clang/dist/include/clang/Serialization/ASTReader.h ============================================================================== --- vendor/clang/dist/include/clang/Serialization/ASTReader.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Serialization/ASTReader.h Mon May 22 19:43:45 2017 (r318665) @@ -478,10 +478,18 @@ private: /// in the chain. DeclUpdateOffsetsMap DeclUpdateOffsets; + struct PendingUpdateRecord { + Decl *D; + serialization::GlobalDeclID ID; + // Whether the declaration was just deserialized. + bool JustLoaded; + PendingUpdateRecord(serialization::GlobalDeclID ID, Decl *D, + bool JustLoaded) + : D(D), ID(ID), JustLoaded(JustLoaded) {} + }; /// \brief Declaration updates for already-loaded declarations that we need /// to apply once we finish processing an import. - llvm::SmallVector, 16> - PendingUpdateRecords; + llvm::SmallVector PendingUpdateRecords; enum class PendingFakeDefinitionKind { NotFake, Fake, FakeLoaded }; @@ -1279,7 +1287,7 @@ private: RecordLocation DeclCursorForID(serialization::DeclID ID, SourceLocation &Location); - void loadDeclUpdateRecords(serialization::DeclID ID, Decl *D); + void loadDeclUpdateRecords(PendingUpdateRecord &Record); void loadPendingDeclChain(Decl *D, uint64_t LocalOffset); void loadObjCCategories(serialization::GlobalDeclID ID, ObjCInterfaceDecl *D, unsigned PreviousGeneration = 0); Modified: vendor/clang/dist/include/clang/Serialization/ASTWriter.h ============================================================================== --- vendor/clang/dist/include/clang/Serialization/ASTWriter.h Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/include/clang/Serialization/ASTWriter.h Mon May 22 19:43:45 2017 (r318665) @@ -627,10 +627,6 @@ public: /// \brief Add a version tuple to the given record void AddVersionTuple(const VersionTuple &Version, RecordDataImpl &Record); - /// \brief Infer the submodule ID that contains an entity at the given - /// source location. - serialization::SubmoduleID inferSubmoduleIDFromLocation(SourceLocation Loc); - /// \brief Retrieve or create a submodule ID for this module, or return 0 if /// the submodule is neither local (a submodle of the currently-written module) /// nor from an imported module. Modified: vendor/clang/dist/lib/AST/ASTContext.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTContext.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/AST/ASTContext.cpp Mon May 22 19:43:45 2017 (r318665) @@ -8730,8 +8730,8 @@ static QualType DecodeTypeFromStr(const char *End; unsigned AddrSpace = strtoul(Str, &End, 10); if (End != Str && AddrSpace != 0) { - Type = Context.getAddrSpaceQualType(Type, AddrSpace + - LangAS::Count); + Type = Context.getAddrSpaceQualType( + Type, AddrSpace + LangAS::FirstTargetAddressSpace); Str = End; } if (c == '*') @@ -9546,13 +9546,8 @@ uint64_t ASTContext::getTargetNullPointe } unsigned ASTContext::getTargetAddressSpace(unsigned AS) const { - // For OpenCL, only function local variables are not explicitly marked with - // an address space in the AST, and these need to be the address space of - // alloca. - if (!AS && LangOpts.OpenCL) - return getTargetInfo().getDataLayout().getAllocaAddrSpace(); - if (AS >= LangAS::Count) - return AS - LangAS::Count; + if (AS >= LangAS::FirstTargetAddressSpace) + return AS - LangAS::FirstTargetAddressSpace; else return (*AddrSpaceMap)[AS]; } Modified: vendor/clang/dist/lib/AST/CXXInheritance.cpp ============================================================================== --- vendor/clang/dist/lib/AST/CXXInheritance.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/AST/CXXInheritance.cpp Mon May 22 19:43:45 2017 (r318665) @@ -57,6 +57,7 @@ bool CXXBasePaths::isAmbiguous(CanQualTy void CXXBasePaths::clear() { Paths.clear(); ClassSubobjects.clear(); + VisitedDependentRecords.clear(); ScratchPath.clear(); DetectedVirtual = nullptr; } @@ -67,6 +68,7 @@ void CXXBasePaths::swap(CXXBasePaths &Ot std::swap(Origin, Other.Origin); Paths.swap(Other.Paths); ClassSubobjects.swap(Other.ClassSubobjects); + VisitedDependentRecords.swap(Other.VisitedDependentRecords); std::swap(FindAmbiguities, Other.FindAmbiguities); std::swap(RecordPaths, Other.RecordPaths); std::swap(DetectVirtual, Other.DetectVirtual); @@ -278,8 +280,14 @@ bool CXXBasePaths::lookupInBases(ASTCont dyn_cast_or_null(TN.getAsTemplateDecl())) BaseRecord = TD->getTemplatedDecl(); } - if (BaseRecord && !BaseRecord->hasDefinition()) - BaseRecord = nullptr; + if (BaseRecord) { + if (!BaseRecord->hasDefinition() || + VisitedDependentRecords.count(BaseRecord)) { + BaseRecord = nullptr; + } else { + VisitedDependentRecords.insert(BaseRecord); + } + } } else { BaseRecord = cast( BaseSpec.getType()->castAs()->getDecl()); Modified: vendor/clang/dist/lib/AST/DeclBase.cpp ============================================================================== --- vendor/clang/dist/lib/AST/DeclBase.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/AST/DeclBase.cpp Mon May 22 19:43:45 2017 (r318665) @@ -407,6 +407,27 @@ bool Decl::isExported() const { return false; } +ExternalSourceSymbolAttr *Decl::getExternalSourceSymbolAttr() const { + const Decl *Definition = nullptr; + if (auto ID = dyn_cast(this)) { + Definition = ID->getDefinition(); + } else if (auto PD = dyn_cast(this)) { + Definition = PD->getDefinition(); + } else if (auto TD = dyn_cast(this)) { + Definition = TD->getDefinition(); + } + if (!Definition) + Definition = this; + + if (auto *attr = Definition->getAttr()) + return attr; + if (auto *dcd = dyn_cast(getDeclContext())) { + return dcd->getAttr(); + } + + return nullptr; +} + bool Decl::hasDefiningAttr() const { return hasAttr() || hasAttr(); } Modified: vendor/clang/dist/lib/AST/ExprConstant.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ExprConstant.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/AST/ExprConstant.cpp Mon May 22 19:43:45 2017 (r318665) @@ -4579,7 +4579,7 @@ public: } bool handleCallExpr(const CallExpr *E, APValue &Result, - const LValue *ResultSlot) { + const LValue *ResultSlot) { const Expr *Callee = E->getCallee()->IgnoreParens(); QualType CalleeType = Callee->getType(); @@ -4588,6 +4588,23 @@ public: auto Args = llvm::makeArrayRef(E->getArgs(), E->getNumArgs()); bool HasQualifier = false; + struct EvaluateIgnoredRAII { + public: + EvaluateIgnoredRAII(EvalInfo &Info, llvm::ArrayRef ToEval) + : Info(Info), ToEval(ToEval) {} + ~EvaluateIgnoredRAII() { + if (Info.noteFailure()) { + for (auto E : ToEval) + EvaluateIgnoredValue(Info, E); + } + } + void cancel() { ToEval = {}; } + void drop_front() { ToEval = ToEval.drop_front(); } + private: + EvalInfo &Info; + llvm::ArrayRef ToEval; + } EvalArguments(Info, Args); + // Extract function decl and 'this' pointer from the callee. if (CalleeType->isSpecificBuiltinType(BuiltinType::BoundMember)) { const ValueDecl *Member = nullptr; @@ -4637,10 +4654,12 @@ public: if (Args.empty()) return Error(E); - if (!EvaluateObjectArgument(Info, Args[0], ThisVal)) + const Expr *FirstArg = Args[0]; + Args = Args.drop_front(); + EvalArguments.drop_front(); + if (!EvaluateObjectArgument(Info, FirstArg, ThisVal)) return false; This = &ThisVal; - Args = Args.slice(1); } else if (MD && MD->isLambdaStaticInvoker()) { // Map the static invoker for the lambda back to the call operator. // Conveniently, we don't have to slice out the 'this' argument (as is @@ -4692,8 +4711,12 @@ public: const FunctionDecl *Definition = nullptr; Stmt *Body = FD->getBody(Definition); - if (!CheckConstexprFunction(Info, E->getExprLoc(), FD, Definition, Body) || - !HandleFunctionCall(E->getExprLoc(), Definition, This, Args, Body, Info, + if (!CheckConstexprFunction(Info, E->getExprLoc(), FD, Definition, Body)) + return false; + + EvalArguments.cancel(); + + if (!HandleFunctionCall(E->getExprLoc(), Definition, This, Args, Body, Info, Result, ResultSlot)) return false; Modified: vendor/clang/dist/lib/AST/Type.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Type.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/AST/Type.cpp Mon May 22 19:43:45 2017 (r318665) @@ -3531,7 +3531,7 @@ Optional Type::getNulla } while (true); } -bool Type::canHaveNullability() const { +bool Type::canHaveNullability(bool ResultIfUnknown) const { QualType type = getCanonicalTypeInternal(); switch (type->getTypeClass()) { @@ -3559,7 +3559,8 @@ bool Type::canHaveNullability() const { case Type::SubstTemplateTypeParmPack: case Type::DependentName: case Type::DependentTemplateSpecialization: - return true; + case Type::Auto: + return ResultIfUnknown; // Dependent template specializations can instantiate to pointer // types unless they're known to be specializations of a class @@ -3571,12 +3572,7 @@ bool Type::canHaveNullability() const { if (isa(templateDecl)) return false; } - return true; - - // auto is considered dependent when it isn't deduced. - case Type::Auto: - case Type::DeducedTemplateSpecialization: - return !cast(type.getTypePtr())->isDeduced(); + return ResultIfUnknown; case Type::Builtin: switch (cast(type.getTypePtr())->getKind()) { @@ -3595,7 +3591,7 @@ bool Type::canHaveNullability() const { case BuiltinType::PseudoObject: case BuiltinType::UnknownAny: case BuiltinType::ARCUnbridgedCast: - return true; + return ResultIfUnknown; case BuiltinType::Void: case BuiltinType::ObjCId: @@ -3614,6 +3610,7 @@ bool Type::canHaveNullability() const { case BuiltinType::OMPArraySection: return false; } + llvm_unreachable("unknown builtin type"); // Non-pointer types. case Type::Complex: @@ -3629,6 +3626,7 @@ bool Type::canHaveNullability() const { case Type::FunctionProto: case Type::FunctionNoProto: case Type::Record: + case Type::DeducedTemplateSpecialization: case Type::Enum: case Type::InjectedClassName: case Type::PackExpansion: Modified: vendor/clang/dist/lib/AST/TypePrinter.cpp ============================================================================== --- vendor/clang/dist/lib/AST/TypePrinter.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/AST/TypePrinter.cpp Mon May 22 19:43:45 2017 (r318665) @@ -1668,9 +1668,9 @@ void Qualifiers::print(raw_ostream &OS, OS << "__shared"; break; default: - assert(addrspace >= LangAS::Count); + assert(addrspace >= LangAS::FirstTargetAddressSpace); OS << "__attribute__((address_space("; - OS << addrspace - LangAS::Count; + OS << addrspace - LangAS::FirstTargetAddressSpace; OS << ")))"; } } Modified: vendor/clang/dist/lib/Basic/Targets.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Targets.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/Basic/Targets.cpp Mon May 22 19:43:45 2017 (r318665) @@ -2034,25 +2034,45 @@ ArrayRef NVPTXTargetInfo:: return llvm::makeArrayRef(GCCRegNames); } -static const LangAS::Map AMDGPUPrivateIsZeroMap = { - 4, // Default - 1, // opencl_global - 3, // opencl_local - 2, // opencl_constant - 4, // opencl_generic - 1, // cuda_device - 2, // cuda_constant - 3 // cuda_shared -}; -static const LangAS::Map AMDGPUGenericIsZeroMap = { - 0, // Default - 1, // opencl_global - 3, // opencl_local - 2, // opencl_constant - 0, // opencl_generic - 1, // cuda_device - 2, // cuda_constant - 3 // cuda_shared +static const LangAS::Map AMDGPUNonOpenCLPrivateIsZeroMap = { + 4, // Default + 1, // opencl_global + 3, // opencl_local + 2, // opencl_constant + 4, // opencl_generic + 1, // cuda_device + 2, // cuda_constant + 3 // cuda_shared +}; +static const LangAS::Map AMDGPUNonOpenCLGenericIsZeroMap = { + 0, // Default + 1, // opencl_global + 3, // opencl_local + 2, // opencl_constant + 0, // opencl_generic + 1, // cuda_device + 2, // cuda_constant + 3 // cuda_shared +}; +static const LangAS::Map AMDGPUOpenCLPrivateIsZeroMap = { + 0, // Default + 1, // opencl_global + 3, // opencl_local + 2, // opencl_constant + 4, // opencl_generic + 1, // cuda_device + 2, // cuda_constant + 3 // cuda_shared +}; +static const LangAS::Map AMDGPUOpenCLGenericIsZeroMap = { + 5, // Default + 1, // opencl_global + 3, // opencl_local + 2, // opencl_constant + 0, // opencl_generic + 1, // cuda_device + 2, // cuda_constant + 3 // cuda_shared }; // If you edit the description strings, make sure you update @@ -2149,8 +2169,12 @@ public: : DataLayoutStringR600); assert(DataLayout->getAllocaAddrSpace() == AS.Private); - AddrSpaceMap = IsGenericZero ? &AMDGPUGenericIsZeroMap : - &AMDGPUPrivateIsZeroMap; + AddrSpaceMap = + llvm::StringSwitch(Triple.getEnvironmentName()) + .Case("opencl", &AMDGPUOpenCLPrivateIsZeroMap) + .Case("amdgiz", &AMDGPUNonOpenCLGenericIsZeroMap) + .Case("amdgizcl", &AMDGPUOpenCLGenericIsZeroMap) + .Default(&AMDGPUNonOpenCLPrivateIsZeroMap); UseAddrSpaceMapMangling = true; } Modified: vendor/clang/dist/lib/CodeGen/CGAtomic.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGAtomic.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/CodeGen/CGAtomic.cpp Mon May 22 19:43:45 2017 (r318665) @@ -95,7 +95,7 @@ namespace { BFI.StorageOffset += OffsetInChars; LVal = LValue::MakeBitfield(Address(Addr, lvalue.getAlignment()), BFI, lvalue.getType(), - lvalue.getAlignmentSource()); + lvalue.getBaseInfo()); LVal.setTBAAInfo(lvalue.getTBAAInfo()); AtomicTy = C.getIntTypeForBitwidth(AtomicSizeInBits, OrigBFI.IsSigned); if (AtomicTy.isNull()) { @@ -203,7 +203,7 @@ namespace { addr = CGF.Builder.CreateStructGEP(addr, 0, CharUnits()); return LValue::MakeAddr(addr, getValueType(), CGF.getContext(), - LVal.getAlignmentSource(), LVal.getTBAAInfo()); + LVal.getBaseInfo(), LVal.getTBAAInfo()); } /// \brief Emits atomic load. @@ -1181,15 +1181,15 @@ RValue AtomicInfo::convertAtomicTempToRV if (LVal.isBitField()) return CGF.EmitLoadOfBitfieldLValue( LValue::MakeBitfield(addr, LVal.getBitFieldInfo(), LVal.getType(), - LVal.getAlignmentSource()), loc); + LVal.getBaseInfo()), loc); if (LVal.isVectorElt()) return CGF.EmitLoadOfLValue( LValue::MakeVectorElt(addr, LVal.getVectorIdx(), LVal.getType(), - LVal.getAlignmentSource()), loc); + LVal.getBaseInfo()), loc); assert(LVal.isExtVectorElt()); return CGF.EmitLoadOfExtVectorElementLValue(LValue::MakeExtVectorElt( addr, LVal.getExtVectorElts(), LVal.getType(), - LVal.getAlignmentSource())); + LVal.getBaseInfo())); } RValue AtomicInfo::ConvertIntToValueOrAtomic(llvm::Value *IntVal, @@ -1506,26 +1506,26 @@ EmitAtomicUpdateValue(CodeGenFunction &C UpdateLVal = LValue::MakeBitfield(Ptr, AtomicLVal.getBitFieldInfo(), AtomicLVal.getType(), - AtomicLVal.getAlignmentSource()); + AtomicLVal.getBaseInfo()); DesiredLVal = LValue::MakeBitfield(DesiredAddr, AtomicLVal.getBitFieldInfo(), AtomicLVal.getType(), - AtomicLVal.getAlignmentSource()); + AtomicLVal.getBaseInfo()); } else if (AtomicLVal.isVectorElt()) { UpdateLVal = LValue::MakeVectorElt(Ptr, AtomicLVal.getVectorIdx(), AtomicLVal.getType(), - AtomicLVal.getAlignmentSource()); + AtomicLVal.getBaseInfo()); DesiredLVal = LValue::MakeVectorElt( DesiredAddr, AtomicLVal.getVectorIdx(), AtomicLVal.getType(), - AtomicLVal.getAlignmentSource()); + AtomicLVal.getBaseInfo()); } else { assert(AtomicLVal.isExtVectorElt()); UpdateLVal = LValue::MakeExtVectorElt(Ptr, AtomicLVal.getExtVectorElts(), AtomicLVal.getType(), - AtomicLVal.getAlignmentSource()); + AtomicLVal.getBaseInfo()); DesiredLVal = LValue::MakeExtVectorElt( DesiredAddr, AtomicLVal.getExtVectorElts(), AtomicLVal.getType(), - AtomicLVal.getAlignmentSource()); + AtomicLVal.getBaseInfo()); } UpdateLVal.setTBAAInfo(AtomicLVal.getTBAAInfo()); DesiredLVal.setTBAAInfo(AtomicLVal.getTBAAInfo()); @@ -1612,17 +1612,17 @@ static void EmitAtomicUpdateValue(CodeGe DesiredLVal = LValue::MakeBitfield(DesiredAddr, AtomicLVal.getBitFieldInfo(), AtomicLVal.getType(), - AtomicLVal.getAlignmentSource()); + AtomicLVal.getBaseInfo()); } else if (AtomicLVal.isVectorElt()) { DesiredLVal = LValue::MakeVectorElt(DesiredAddr, AtomicLVal.getVectorIdx(), AtomicLVal.getType(), - AtomicLVal.getAlignmentSource()); + AtomicLVal.getBaseInfo()); } else { assert(AtomicLVal.isExtVectorElt()); DesiredLVal = LValue::MakeExtVectorElt( DesiredAddr, AtomicLVal.getExtVectorElts(), AtomicLVal.getType(), - AtomicLVal.getAlignmentSource()); + AtomicLVal.getBaseInfo()); } DesiredLVal.setTBAAInfo(AtomicLVal.getTBAAInfo()); // Store new value in the corresponding memory area Modified: vendor/clang/dist/lib/CodeGen/CGBlocks.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGBlocks.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/CodeGen/CGBlocks.cpp Mon May 22 19:43:45 2017 (r318665) @@ -918,8 +918,9 @@ llvm::Value *CodeGenFunction::EmitBlockL // FIXME: Pass a specific location for the expr init so that the store is // attributed to a reasonable location - otherwise it may be attributed to // locations of subexpressions in the initialization. + LValueBaseInfo BaseInfo(AlignmentSource::Decl, false); EmitExprAsInit(&l2r, &blockFieldPseudoVar, - MakeAddrLValue(blockField, type, AlignmentSource::Decl), + MakeAddrLValue(blockField, type, BaseInfo), /*captured by init*/ false); } Modified: vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp Mon May 22 19:43:45 2017 (r318665) @@ -8842,9 +8842,8 @@ Value *CodeGenFunction::EmitNVPTXBuiltin const CallExpr *E) { auto MakeLdg = [&](unsigned IntrinsicID) { Value *Ptr = EmitScalarExpr(E->getArg(0)); - AlignmentSource AlignSource; clang::CharUnits Align = - getNaturalPointeeTypeAlignment(E->getArg(0)->getType(), &AlignSource); + getNaturalPointeeTypeAlignment(E->getArg(0)->getType()); return Builder.CreateCall( CGM.getIntrinsic(IntrinsicID, {Ptr->getType()->getPointerElementType(), Ptr->getType()}), Modified: vendor/clang/dist/lib/CodeGen/CGClass.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGClass.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/CodeGen/CGClass.cpp Mon May 22 19:43:45 2017 (r318665) @@ -129,14 +129,14 @@ Address CodeGenFunction::EmitCXXMemberDataPointerAddress(const Expr *E, Address base, llvm::Value *memberPtr, const MemberPointerType *memberPtrType, - AlignmentSource *alignSource) { + LValueBaseInfo *BaseInfo) { // Ask the ABI to compute the actual address. llvm::Value *ptr = CGM.getCXXABI().EmitMemberDataPointerAddress(*this, E, base, memberPtr, memberPtrType); QualType memberType = memberPtrType->getPointeeType(); - CharUnits memberAlign = getNaturalTypeAlignment(memberType, alignSource); + CharUnits memberAlign = getNaturalTypeAlignment(memberType, BaseInfo); memberAlign = CGM.getDynamicOffsetAlignment(base.getAlignment(), memberPtrType->getClass()->getAsCXXRecordDecl(), Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Mon May 22 19:43:45 2017 (r318665) @@ -2613,7 +2613,7 @@ llvm::DIModule *CGDebugInfo::getParentMo // best to make this behavior a command line or debugger tuning // option. FullSourceLoc Loc(D->getLocation(), CGM.getContext().getSourceManager()); - if (Module *M = ClangModuleMap->inferModuleFromLocation(Loc)) { + if (Module *M = D->getOwningModule()) { // This is a (sub-)module. auto Info = ExternalASTSource::ASTSourceDescriptor(*M); return getOrCreateModuleRef(Info, /*SkeletonCU=*/false); Modified: vendor/clang/dist/lib/CodeGen/CGDecl.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDecl.cpp Mon May 22 19:43:35 2017 (r318664) +++ vendor/clang/dist/lib/CodeGen/CGDecl.cpp Mon May 22 19:43:45 2017 (r318665) @@ -11,14 +11,15 @@ // //===----------------------------------------------------------------------===// -#include "CodeGenFunction.h" #include "CGBlocks.h" #include "CGCXXABI.h" #include "CGCleanup.h" #include "CGDebugInfo.h" #include "CGOpenCLRuntime.h" #include "CGOpenMPRuntime.h" +#include "CodeGenFunction.h" #include "CodeGenModule.h" +#include "TargetInfo.h" #include "clang/AST/ASTContext.h" #include "clang/AST/CharUnits.h" #include "clang/AST/Decl.h" @@ -1105,6 +1106,21 @@ CodeGenFunction::EmitAutoVarAlloca(const address = Address(vla, alignment); } + // Alloca always returns a pointer in alloca address space, which may + // be different from the type defined by the language. For example, + // in C++ the auto variables are in the default address space. Therefore + // cast alloca to the expected address space when necessary. + auto T = D.getType(); + assert(T.getAddressSpace() == LangAS::Default); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 22 19:43:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B53AD78A20; Mon, 22 May 2017 19:43:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8BC019CE; Mon, 22 May 2017 19:43:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJhrr6076640; Mon, 22 May 2017 19:43:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJhrCp076639; Mon, 22 May 2017 19:43:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221943.v4MJhrCp076639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:43:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318666 - vendor/clang/clang-trunk-r303571 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:43:55 -0000 Author: dim Date: Mon May 22 19:43:53 2017 New Revision: 318666 URL: https://svnweb.freebsd.org/changeset/base/318666 Log: Tag clang trunk r303571. Added: vendor/clang/clang-trunk-r303571/ - copied from r318665, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Mon May 22 19:44:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60ADBD78AA0; Mon, 22 May 2017 19:44:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A3ED1AC9; Mon, 22 May 2017 19:44:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJi3gw076786; Mon, 22 May 2017 19:44:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJi3uE076785; Mon, 22 May 2017 19:44:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221944.v4MJi3uE076785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318668 - vendor/compiler-rt/compiler-rt-trunk-r303571 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:44:04 -0000 Author: dim Date: Mon May 22 19:44:02 2017 New Revision: 318668 URL: https://svnweb.freebsd.org/changeset/base/318668 Log: Tag compiler-rt trunk r303571. Added: vendor/compiler-rt/compiler-rt-trunk-r303571/ - copied from r318667, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Mon May 22 19:44:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87B04D78A7E; Mon, 22 May 2017 19:44:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 500D91A5D; Mon, 22 May 2017 19:44:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJhxtO076715; Mon, 22 May 2017 19:43:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJhu8L076688; Mon, 22 May 2017 19:43:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221943.v4MJhu8L076688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318667 - in vendor/compiler-rt/dist: include/xray lib/asan lib/asan/tests lib/lsan lib/msan lib/msan/tests lib/sanitizer_common lib/sanitizer_common/tests lib/scudo lib/xray test/asan/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:44:00 -0000 Author: dim Date: Mon May 22 19:43:56 2017 New Revision: 318667 URL: https://svnweb.freebsd.org/changeset/base/318667 Log: Vendor import of compiler-rt trunk r303571: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303571 Deleted: vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test.cc vendor/compiler-rt/dist/test/msan/strndup.cc Modified: vendor/compiler-rt/dist/include/xray/xray_interface.h vendor/compiler-rt/dist/lib/asan/asan_flags.cc vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h vendor/compiler-rt/dist/lib/scudo/scudo_flags.cpp vendor/compiler-rt/dist/lib/xray/xray_interface.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-sigbus.cpp vendor/compiler-rt/dist/test/xray/TestCases/Linux/custom-event-logging.cc vendor/compiler-rt/dist/test/xray/TestCases/Linux/func-id-utils.cc Modified: vendor/compiler-rt/dist/include/xray/xray_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/xray/xray_interface.h Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/include/xray/xray_interface.h Mon May 22 19:43:56 2017 (r318667) @@ -69,6 +69,10 @@ extern int __xray_remove_handler_arg1(); /// Provide a function to invoke when XRay encounters a custom event. extern int __xray_set_customevent_handler(void (*entry)(void*, std::size_t)); +/// This removes whatever the currently provided custom event handler is. +/// Returns 1 on success, 0 on error. +extern int __xray_remove_customevent_handler(); + enum XRayPatchingStatus { NOT_INITIALIZED = 0, SUCCESS = 1, Modified: vendor/compiler-rt/dist/lib/asan/asan_flags.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_flags.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/asan/asan_flags.cc Mon May 22 19:43:56 2017 (r318667) @@ -194,10 +194,6 @@ void InitializeFlags() { Report("WARNING: strchr* interceptors are enabled even though " "replace_str=0. Use intercept_strchr=0 to disable them."); } - if (!f->replace_str && common_flags()->intercept_strndup) { - Report("WARNING: strndup* interceptors are enabled even though " - "replace_str=0. Use intercept_strndup=0 to disable them."); - } } } // namespace __asan Modified: vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc Mon May 22 19:43:56 2017 (r318667) @@ -154,27 +154,6 @@ TEST(AddressSanitizer, MAYBE_StrDupOOBTe free(str); } -#if SANITIZER_TEST_HAS_STRNDUP -TEST(AddressSanitizer, MAYBE_StrNDupOOBTest) { - size_t size = Ident(42); - char *str = MallocAndMemsetString(size); - char *new_str; - // Normal strndup calls. - str[size - 1] = '\0'; - new_str = strndup(str, size - 13); - free(new_str); - new_str = strndup(str + size - 1, 13); - free(new_str); - // Argument points to not allocated memory. - EXPECT_DEATH(Ident(strndup(str - 1, 13)), LeftOOBReadMessage(1)); - EXPECT_DEATH(Ident(strndup(str + size, 13)), RightOOBReadMessage(0)); - // Overwrite the terminating '\0' and hit unallocated memory. - str[size - 1] = 'z'; - EXPECT_DEATH(Ident(strndup(str, size + 13)), RightOOBReadMessage(0)); - free(str); -} -#endif // SANITIZER_TEST_HAS_STRNDUP - TEST(AddressSanitizer, StrCpyOOBTest) { size_t to_size = Ident(30); size_t from_size = Ident(6); // less than to_size Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc Mon May 22 19:43:56 2017 (r318667) @@ -110,7 +110,8 @@ void ProcessGlobalRegions(Frontier *fron for (const __sanitizer::LoadedModule::AddressRange &range : modules[i].ranges()) { - if (range.executable || !range.readable) continue; + // Sections storing global variables are writable and non-executable + if (range.executable || !range.writable) continue; ScanGlobalRange(range.beg, range.end, frontier); } Modified: vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc Mon May 22 19:43:56 2017 (r318667) @@ -341,6 +341,33 @@ INTERCEPTOR(char *, __strdup, char *src) #define MSAN_MAYBE_INTERCEPT___STRDUP #endif +INTERCEPTOR(char *, strndup, char *src, SIZE_T n) { + ENSURE_MSAN_INITED(); + GET_STORE_STACK_TRACE; + // On FreeBSD strndup() leverages strnlen(). + InterceptorScope interceptor_scope; + SIZE_T copy_size = REAL(strnlen)(src, n); + char *res = REAL(strndup)(src, n); + CopyShadowAndOrigin(res, src, copy_size, &stack); + __msan_unpoison(res + copy_size, 1); // \0 + return res; +} + +#if !SANITIZER_FREEBSD +INTERCEPTOR(char *, __strndup, char *src, SIZE_T n) { + ENSURE_MSAN_INITED(); + GET_STORE_STACK_TRACE; + SIZE_T copy_size = REAL(strnlen)(src, n); + char *res = REAL(__strndup)(src, n); + CopyShadowAndOrigin(res, src, copy_size, &stack); + __msan_unpoison(res + copy_size, 1); // \0 + return res; +} +#define MSAN_MAYBE_INTERCEPT___STRNDUP INTERCEPT_FUNCTION(__strndup) +#else +#define MSAN_MAYBE_INTERCEPT___STRNDUP +#endif + INTERCEPTOR(char *, gcvt, double number, SIZE_T ndigit, char *buf) { ENSURE_MSAN_INITED(); char *res = REAL(gcvt)(number, ndigit, buf); @@ -1344,13 +1371,6 @@ int OnExit() { return __msan_memcpy(to, from, size); \ } -#define COMMON_INTERCEPTOR_COPY_STRING(ctx, to, from, size) \ - do { \ - GET_STORE_STACK_TRACE; \ - CopyShadowAndOrigin(to, from, size, &stack); \ - __msan_unpoison(to + size, 1); \ - } while (false) - #include "sanitizer_common/sanitizer_platform_interceptors.h" #include "sanitizer_common/sanitizer_common_interceptors.inc" @@ -1518,6 +1538,8 @@ void InitializeInterceptors() { INTERCEPT_FUNCTION(stpcpy); // NOLINT INTERCEPT_FUNCTION(strdup); MSAN_MAYBE_INTERCEPT___STRDUP; + INTERCEPT_FUNCTION(strndup); + MSAN_MAYBE_INTERCEPT___STRNDUP; INTERCEPT_FUNCTION(strncpy); // NOLINT INTERCEPT_FUNCTION(gcvt); INTERCEPT_FUNCTION(strcat); // NOLINT Modified: vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Mon May 22 19:43:56 2017 (r318667) @@ -1581,8 +1581,7 @@ TEST(MemorySanitizer, strdup) { TEST(MemorySanitizer, strndup) { char buf[4] = "abc"; __msan_poison(buf + 2, sizeof(*buf)); - char *x; - EXPECT_UMR(x = strndup(buf, 3)); + char *x = strndup(buf, 3); EXPECT_NOT_POISONED(x[0]); EXPECT_NOT_POISONED(x[1]); EXPECT_POISONED(x[2]); @@ -1594,8 +1593,7 @@ TEST(MemorySanitizer, strndup_short) { char buf[4] = "abc"; __msan_poison(buf + 1, sizeof(*buf)); __msan_poison(buf + 2, sizeof(*buf)); - char *x; - EXPECT_UMR(x = strndup(buf, 2)); + char *x = strndup(buf, 2); EXPECT_NOT_POISONED(x[0]); EXPECT_POISONED(x[1]); EXPECT_NOT_POISONED(x[2]); Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc Mon May 22 19:43:56 2017 (r318667) @@ -285,9 +285,9 @@ void LoadedModule::clear() { } void LoadedModule::addAddressRange(uptr beg, uptr end, bool executable, - bool readable) { + bool writable) { void *mem = InternalAlloc(sizeof(AddressRange)); - AddressRange *r = new(mem) AddressRange(beg, end, executable, readable); + AddressRange *r = new(mem) AddressRange(beg, end, executable, writable); ranges_.push_back(r); if (executable && end > max_executable_address_) max_executable_address_ = end; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h Mon May 22 19:43:56 2017 (r318667) @@ -717,7 +717,7 @@ class LoadedModule { void set(const char *module_name, uptr base_address, ModuleArch arch, u8 uuid[kModuleUUIDSize], bool instrumented); void clear(); - void addAddressRange(uptr beg, uptr end, bool executable, bool readable); + void addAddressRange(uptr beg, uptr end, bool executable, bool writable); bool containsAddress(uptr address) const; const char *full_name() const { return full_name_; } @@ -732,14 +732,14 @@ class LoadedModule { uptr beg; uptr end; bool executable; - bool readable; + bool writable; - AddressRange(uptr beg, uptr end, bool executable, bool readable) + AddressRange(uptr beg, uptr end, bool executable, bool writable) : next(nullptr), beg(beg), end(end), executable(executable), - readable(readable) {} + writable(writable) {} }; const IntrusiveList &ranges() const { return ranges_; } Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc Mon May 22 19:43:56 2017 (r318667) @@ -34,8 +34,6 @@ // COMMON_INTERCEPTOR_MEMSET_IMPL // COMMON_INTERCEPTOR_MEMMOVE_IMPL // COMMON_INTERCEPTOR_MEMCPY_IMPL -// COMMON_INTERCEPTOR_COPY_STRING -// COMMON_INTERCEPTOR_STRNDUP_IMPL //===----------------------------------------------------------------------===// #include "interception/interception.h" @@ -219,25 +217,6 @@ bool PlatformHasDifferentMemcpyAndMemmov } #endif -#ifndef COMMON_INTERCEPTOR_COPY_STRING -#define COMMON_INTERCEPTOR_COPY_STRING(ctx, to, from, size) {} -#endif - -#ifndef COMMON_INTERCEPTOR_STRNDUP_IMPL -#define COMMON_INTERCEPTOR_STRNDUP_IMPL(ctx, s, size) \ - COMMON_INTERCEPTOR_ENTER(ctx, strndup, s, size); \ - uptr from_length = internal_strnlen(s, size); \ - uptr copy_length = Min(size, from_length); \ - char *new_mem = (char *)WRAP(malloc)(copy_length + 1); \ - if (common_flags()->intercept_strndup) { \ - COMMON_INTERCEPTOR_READ_RANGE(ctx, s, copy_length + 1); \ - } \ - COMMON_INTERCEPTOR_COPY_STRING(ctx, new_mem, s, copy_length); \ - internal_memcpy(new_mem, s, copy_length); \ - new_mem[copy_length] = '\0'; \ - return new_mem; -#endif - struct FileMetadata { // For open_memstream(). char **addr; @@ -321,26 +300,6 @@ INTERCEPTOR(SIZE_T, strnlen, const char #define INIT_STRNLEN #endif -#if SANITIZER_INTERCEPT_STRNDUP -INTERCEPTOR(char*, strndup, const char *s, uptr size) { - void *ctx; - COMMON_INTERCEPTOR_STRNDUP_IMPL(ctx, s, size); -} -#define INIT_STRNDUP COMMON_INTERCEPT_FUNCTION(strndup) -#else -#define INIT_STRNDUP -#endif // SANITIZER_INTERCEPT_STRNDUP - -#if SANITIZER_INTERCEPT___STRNDUP -INTERCEPTOR(char*, __strndup, const char *s, uptr size) { - void *ctx; - COMMON_INTERCEPTOR_STRNDUP_IMPL(ctx, s, size); -} -#define INIT___STRNDUP COMMON_INTERCEPT_FUNCTION(__strndup) -#else -#define INIT___STRNDUP -#endif // SANITIZER_INTERCEPT___STRNDUP - #if SANITIZER_INTERCEPT_TEXTDOMAIN INTERCEPTOR(char*, textdomain, const char *domainname) { void *ctx; @@ -6204,8 +6163,6 @@ static void InitializeCommonInterceptors INIT_TEXTDOMAIN; INIT_STRLEN; INIT_STRNLEN; - INIT_STRNDUP; - INIT___STRNDUP; INIT_STRCMP; INIT_STRNCMP; INIT_STRCASECMP; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h Mon May 22 19:43:56 2017 (r318667) @@ -34,25 +34,41 @@ class FlagHandler : public FlagHandlerBa bool Parse(const char *value) final; }; -template <> -inline bool FlagHandler::Parse(const char *value) { +inline bool ParseBool(const char *value, bool *b) { if (internal_strcmp(value, "0") == 0 || internal_strcmp(value, "no") == 0 || internal_strcmp(value, "false") == 0) { - *t_ = false; + *b = false; return true; } if (internal_strcmp(value, "1") == 0 || internal_strcmp(value, "yes") == 0 || internal_strcmp(value, "true") == 0) { - *t_ = true; + *b = true; return true; } + return false; +} + +template <> +inline bool FlagHandler::Parse(const char *value) { + if (ParseBool(value, t_)) return true; Printf("ERROR: Invalid value for bool option: '%s'\n", value); return false; } template <> +inline bool FlagHandler::Parse(const char *value) { + bool b; + if (ParseBool(value, &b)) { + *t_ = b ? kHandleSignalYes : kHandleSignalNo; + return true; + } + Printf("ERROR: Invalid value for signal handler option: '%s'\n", value); + return false; +} + +template <> inline bool FlagHandler::Parse(const char *value) { *t_ = internal_strdup(value); return true; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.h Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.h Mon May 22 19:43:56 2017 (r318667) @@ -18,6 +18,11 @@ namespace __sanitizer { +enum HandleSignalMode { + kHandleSignalNo, + kHandleSignalYes, +}; + struct CommonFlags { #define COMMON_FLAG(Type, Name, DefaultValue, Description) Type Name; #include "sanitizer_flags.inc" Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc Mon May 22 19:43:56 2017 (r318667) @@ -78,16 +78,20 @@ COMMON_FLAG(int, print_module_map, 0, "OS X only. 0 = don't print, 1 = print only once before process " "exits, 2 = print after each report.") COMMON_FLAG(bool, check_printf, true, "Check printf arguments.") -COMMON_FLAG(bool, handle_segv, true, - "If set, registers the tool's custom SIGSEGV handler.") -COMMON_FLAG(bool, handle_sigbus, true, - "If set, registers the tool's custom SIGBUS handler.") -COMMON_FLAG(bool, handle_abort, false, - "If set, registers the tool's custom SIGABRT handler.") -COMMON_FLAG(bool, handle_sigill, false, - "If set, registers the tool's custom SIGILL handler.") -COMMON_FLAG(bool, handle_sigfpe, true, - "If set, registers the tool's custom SIGFPE handler.") +#define COMMON_FLAG_HANDLE_SIGNAL_HELP(signal) \ + "Controls custom tool's " #signal " handler (0 - do not registers the " \ + "handler, 1 - register the handler). " +COMMON_FLAG(HandleSignalMode, handle_segv, kHandleSignalYes, + COMMON_FLAG_HANDLE_SIGNAL_HELP(SIGSEGV)) +COMMON_FLAG(HandleSignalMode, handle_sigbus, kHandleSignalYes, + COMMON_FLAG_HANDLE_SIGNAL_HELP(SIGBUS)) +COMMON_FLAG(HandleSignalMode, handle_abort, kHandleSignalNo, + COMMON_FLAG_HANDLE_SIGNAL_HELP(SIGABRT)) +COMMON_FLAG(HandleSignalMode, handle_sigill, kHandleSignalNo, + COMMON_FLAG_HANDLE_SIGNAL_HELP(SIGILL)) +COMMON_FLAG(HandleSignalMode, handle_sigfpe, kHandleSignalYes, + COMMON_FLAG_HANDLE_SIGNAL_HELP(SIGFPE)) +#undef COMMON_FLAG_HANDLE_SIGNAL_HELP COMMON_FLAG(bool, allow_user_segv_handler, false, "If set, allows user to register a SEGV handler even if the tool " "registers one.") @@ -195,9 +199,6 @@ COMMON_FLAG(bool, intercept_strpbrk, tru COMMON_FLAG(bool, intercept_strlen, true, "If set, uses custom wrappers for strlen and strnlen functions " "to find more errors.") -COMMON_FLAG(bool, intercept_strndup, true, - "If set, uses custom wrappers for strndup functions " - "to find more errors.") COMMON_FLAG(bool, intercept_strchr, true, "If set, uses custom wrappers for strchr, strchrnul, and strrchr " "functions to find more errors.") Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc Mon May 22 19:43:56 2017 (r318667) @@ -1395,15 +1395,19 @@ AndroidApiLevel AndroidGetApiLevel() { #endif bool IsHandledDeadlySignal(int signum) { - if (common_flags()->handle_abort && signum == SIGABRT) - return true; - if (common_flags()->handle_sigill && signum == SIGILL) - return true; - if (common_flags()->handle_sigfpe && signum == SIGFPE) - return true; - if (common_flags()->handle_segv && signum == SIGSEGV) - return true; - return common_flags()->handle_sigbus && signum == SIGBUS; + switch (signum) { + case SIGABRT: + return common_flags()->handle_abort; + case SIGILL: + return common_flags()->handle_sigill; + case SIGFPE: + return common_flags()->handle_sigfpe; + case SIGSEGV: + return common_flags()->handle_segv; + case SIGBUS: + return common_flags()->handle_sigbus; + } + return false; } #if !SANITIZER_GO Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc Mon May 22 19:43:56 2017 (r318667) @@ -447,9 +447,9 @@ static int dl_iterate_phdr_cb(dl_phdr_in uptr cur_beg = info->dlpi_addr + phdr->p_vaddr; uptr cur_end = cur_beg + phdr->p_memsz; bool executable = phdr->p_flags & PF_X; - bool readable = phdr->p_flags & PF_R; + bool writable = phdr->p_flags & PF_W; cur_module.addAddressRange(cur_beg, cur_end, executable, - readable); + writable); } } data->modules->push_back(cur_module); Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc Mon May 22 19:43:56 2017 (r318667) @@ -394,18 +394,22 @@ void ListOfModules::init() { } bool IsHandledDeadlySignal(int signum) { + // Handling fatal signals on watchOS and tvOS devices is disallowed. if ((SANITIZER_WATCHOS || SANITIZER_TVOS) && !(SANITIZER_IOSSIM)) - // Handling fatal signals on watchOS and tvOS devices is disallowed. return false; - if (common_flags()->handle_abort && signum == SIGABRT) - return true; - if (common_flags()->handle_sigill && signum == SIGILL) - return true; - if (common_flags()->handle_sigfpe && signum == SIGFPE) - return true; - if (common_flags()->handle_segv && signum == SIGSEGV) - return true; - return common_flags()->handle_sigbus && signum == SIGBUS; + switch (signum) { + case SIGABRT: + return common_flags()->handle_abort; + case SIGILL: + return common_flags()->handle_sigill; + case SIGFPE: + return common_flags()->handle_sigfpe; + case SIGSEGV: + return common_flags()->handle_segv; + case SIGBUS: + return common_flags()->handle_sigbus; + } + return false; } MacosVersion cached_macos_version = MACOS_VERSION_UNINITIALIZED; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h Mon May 22 19:43:56 2017 (r318667) @@ -25,12 +25,6 @@ # define SI_NOT_WINDOWS 0 #endif -#if SANITIZER_POSIX -# define SI_POSIX 1 -#else -# define SI_POSIX 0 -#endif - #if SANITIZER_LINUX && !SANITIZER_ANDROID # define SI_LINUX_NOT_ANDROID 1 #else @@ -75,12 +69,6 @@ # define SI_UNIX_NOT_MAC 0 #endif -#if SANITIZER_LINUX && !SANITIZER_FREEBSD -# define SI_LINUX_NOT_FREEBSD 1 -# else -# define SI_LINUX_NOT_FREEBSD 0 -#endif - #define SANITIZER_INTERCEPT_STRLEN 1 #define SANITIZER_INTERCEPT_STRNLEN SI_NOT_MAC #define SANITIZER_INTERCEPT_STRCMP 1 @@ -98,8 +86,6 @@ #define SANITIZER_INTERCEPT_MEMMOVE 1 #define SANITIZER_INTERCEPT_MEMCPY 1 #define SANITIZER_INTERCEPT_MEMCMP 1 -#define SANITIZER_INTERCEPT_STRNDUP SI_POSIX -#define SANITIZER_INTERCEPT___STRNDUP SI_LINUX_NOT_FREEBSD #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070 # define SI_MAC_DEPLOYMENT_BELOW_10_7 1 Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_common.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_common.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_common.cc Mon May 22 19:43:56 2017 (r318667) @@ -142,7 +142,7 @@ void MemoryMappingLayout::DumpListOfModu LoadedModule cur_module; cur_module.set(cur_name, base_address); cur_module.addAddressRange(cur_beg, cur_end, prot & kProtectionExecute, - prot & kProtectionRead); + prot & kProtectionWrite); modules->push_back(cur_module); } } Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_mac.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_mac.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_mac.cc Mon May 22 19:43:56 2017 (r318667) @@ -336,7 +336,7 @@ void MemoryMappingLayout::DumpListOfModu current_instrumented_); } cur_module->addAddressRange(cur_beg, cur_end, prot & kProtectionExecute, - prot & kProtectionRead); + prot & kProtectionWrite); } } Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc Mon May 22 19:43:56 2017 (r318667) @@ -554,7 +554,7 @@ void ListOfModules::init() { cur_module.set(module_name, adjusted_base); // We add the whole module as one single address range. cur_module.addAddressRange(base_address, end_address, /*executable*/ true, - /*readable*/ true); + /*writable*/ true); modules_.push_back(cur_module); } UnmapOrDie(hmodules, modules_buffer_size); Modified: vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt Mon May 22 19:43:56 2017 (r318667) @@ -146,6 +146,15 @@ set_target_properties(SanitizerUnitTests # Adds sanitizer tests for architecture. macro(add_sanitizer_tests_for_arch arch) get_target_flags_for_arch(${arch} TARGET_FLAGS) + + # If the sanitizer library was built with _FILE_OFFSET_BITS=64 we need + # to ensure that the library and tests agree on the layout of certain + # structures such as 'struct stat'. + if( CMAKE_SIZEOF_VOID_P EQUAL 4 ) + list(APPEND TARGET_FLAGS "-D_LARGEFILE_SOURCE") + list(APPEND TARGET_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() + set(SANITIZER_TEST_SOURCES ${SANITIZER_UNITTESTS} ${COMPILER_RT_GTEST_SOURCE}) set(SANITIZER_TEST_COMPILE_DEPS ${SANITIZER_TEST_HEADERS}) Modified: vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc Mon May 22 19:43:56 2017 (r318667) @@ -59,6 +59,36 @@ TEST(SanitizerCommon, BooleanFlags) { TestFlag(true, "flag_name=0", false); TestFlag(true, "flag_name=no", false); TestFlag(true, "flag_name=false", false); + + EXPECT_DEATH(TestFlag(false, "flag_name", true), "expected '='"); + EXPECT_DEATH(TestFlag(false, "flag_name=", true), + "Invalid value for bool option: ''"); + EXPECT_DEATH(TestFlag(false, "flag_name=2", true), + "Invalid value for bool option: '2'"); + EXPECT_DEATH(TestFlag(false, "flag_name=-1", true), + "Invalid value for bool option: '-1'"); + EXPECT_DEATH(TestFlag(false, "flag_name=on", true), + "Invalid value for bool option: 'on'"); +} + +TEST(SanitizerCommon, HandleSignalMode) { + TestFlag(kHandleSignalNo, "flag_name=1", kHandleSignalYes); + TestFlag(kHandleSignalNo, "flag_name=yes", kHandleSignalYes); + TestFlag(kHandleSignalNo, "flag_name=true", kHandleSignalYes); + TestFlag(kHandleSignalYes, "flag_name=0", kHandleSignalNo); + TestFlag(kHandleSignalYes, "flag_name=no", kHandleSignalNo); + TestFlag(kHandleSignalYes, "flag_name=false", kHandleSignalNo); + + EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name", kHandleSignalNo), + "expected '='"); + EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name=", kHandleSignalNo), + "Invalid value for signal handler option: ''"); + EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name=2", kHandleSignalNo), + "Invalid value for signal handler option: '2'"); + EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name=-1", kHandleSignalNo), + "Invalid value for signal handler option: '-1'"); + EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name=on", kHandleSignalNo), + "Invalid value for signal handler option: 'on'"); } TEST(SanitizerCommon, IntFlags) { Modified: vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h Mon May 22 19:43:56 2017 (r318667) @@ -124,10 +124,4 @@ static inline uint32_t my_rand() { # define SANITIZER_TEST_HAS_PRINTF_L 0 #endif -#if !defined(_MSC_VER) -# define SANITIZER_TEST_HAS_STRNDUP 1 -#else -# define SANITIZER_TEST_HAS_STRNDUP 0 -#endif - #endif // SANITIZER_TEST_UTILS_H Modified: vendor/compiler-rt/dist/lib/scudo/scudo_flags.cpp ============================================================================== --- vendor/compiler-rt/dist/lib/scudo/scudo_flags.cpp Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/scudo/scudo_flags.cpp Mon May 22 19:43:56 2017 (r318667) @@ -68,7 +68,7 @@ void initFlags() { // Sanity checks and default settings for the Quarantine parameters. if (f->QuarantineSizeMb < 0) { - const int DefaultQuarantineSizeMb = FIRST_32_SECOND_64(16, 64); + const int DefaultQuarantineSizeMb = FIRST_32_SECOND_64(4, 16); f->QuarantineSizeMb = DefaultQuarantineSizeMb; } // We enforce an upper limit for the quarantine size of 4Gb. @@ -77,7 +77,7 @@ void initFlags() { } if (f->ThreadLocalQuarantineSizeKb < 0) { const int DefaultThreadLocalQuarantineSizeKb = - FIRST_32_SECOND_64(256, 1024); + FIRST_32_SECOND_64(64, 256); f->ThreadLocalQuarantineSizeKb = DefaultThreadLocalQuarantineSizeKb; } // And an upper limit of 128Mb for the thread quarantine cache. Modified: vendor/compiler-rt/dist/lib/xray/xray_interface.cc ============================================================================== --- vendor/compiler-rt/dist/lib/xray/xray_interface.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/lib/xray/xray_interface.cc Mon May 22 19:43:56 2017 (r318667) @@ -119,10 +119,15 @@ int __xray_set_customevent_handler(void return 0; } + int __xray_remove_handler() XRAY_NEVER_INSTRUMENT { return __xray_set_handler(nullptr); } +int __xray_remove_customevent_handler() XRAY_NEVER_INSTRUMENT { + return __xray_set_customevent_handler(nullptr); +} + __sanitizer::atomic_uint8_t XRayPatching{0}; using namespace __xray; @@ -326,7 +331,14 @@ uintptr_t __xray_function_address(int32_ __sanitizer::SpinMutexLock Guard(&XRayInstrMapMutex); if (FuncId <= 0 || static_cast(FuncId) > XRayInstrMap.Functions) return 0; - return XRayInstrMap.SledsIndex[FuncId - 1].Begin->Address; + return XRayInstrMap.SledsIndex[FuncId - 1].Begin->Address +// On PPC, function entries are always aligned to 16 bytes. The beginning of a +// sled might be a local entry, which is always +8 based on the global entry. +// Always return the global entry. +#ifdef __PPC__ + & ~0xf +#endif + ; } size_t __xray_max_function_id() XRAY_NEVER_INSTRUMENT { Modified: vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-sigbus.cpp ============================================================================== --- vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-sigbus.cpp Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-sigbus.cpp Mon May 22 19:43:56 2017 (r318667) @@ -2,7 +2,7 @@ // Defaults to true // RUN: %clangxx_asan -std=c++11 %s -o %t // RUN: not %run %t %T/file 2>&1 | FileCheck %s -check-prefix=CHECK-BUS -// RUN: %env_asan_opts=handle_sigbus=false not --crash %run %t %T/file 2>&1 | FileCheck %s +// RUN: %env_asan_opts=handle_sigbus=0 not --crash %run %t %T/file 2>&1 | FileCheck %s // UNSUPPORTED: ios Modified: vendor/compiler-rt/dist/test/xray/TestCases/Linux/custom-event-logging.cc ============================================================================== --- vendor/compiler-rt/dist/test/xray/TestCases/Linux/custom-event-logging.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/test/xray/TestCases/Linux/custom-event-logging.cc Mon May 22 19:43:56 2017 (r318667) @@ -33,7 +33,7 @@ int main() { // CHECK-NEXT: after calling the custom logging... printf("removing custom event handler...\n"); // CHECK-NEXT: removing custom event handler... - __xray_set_customevent_handler(nullptr); + __xray_remove_customevent_handler(); foo(); // CHECK-NEXT: before calling the custom logging... // CHECK-NEXT: after calling the custom logging... Modified: vendor/compiler-rt/dist/test/xray/TestCases/Linux/func-id-utils.cc ============================================================================== --- vendor/compiler-rt/dist/test/xray/TestCases/Linux/func-id-utils.cc Mon May 22 19:43:53 2017 (r318666) +++ vendor/compiler-rt/dist/test/xray/TestCases/Linux/func-id-utils.cc Mon May 22 19:43:56 2017 (r318667) @@ -31,18 +31,10 @@ "each function id must be assigned to a unique function"); std::set not_instrumented; - const auto comp = [](void *lhs, void *rhs) { -#ifdef __PPC__ - return reinterpret_cast(lhs) + 8 < - reinterpret_cast(rhs); -#else - return lhs < rhs; -#endif - }; - std::set_difference(must_be_instrumented.begin(), must_be_instrumented.end(), - all_instrumented.begin(), all_instrumented.end(), - std::inserter(not_instrumented, not_instrumented.begin()), - comp); + std::set_difference( + must_be_instrumented.begin(), must_be_instrumented.end(), + all_instrumented.begin(), all_instrumented.end(), + std::inserter(not_instrumented, not_instrumented.begin())); assert( not_instrumented.empty() && "we should see all explicitly instrumented functions with function ids"); From owner-svn-src-all@freebsd.org Mon May 22 19:44:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93D9AD78B1D; Mon, 22 May 2017 19:44:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47D131BB2; Mon, 22 May 2017 19:44:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJiAAS076887; Mon, 22 May 2017 19:44:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJiA39076886; Mon, 22 May 2017 19:44:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221944.v4MJiA39076886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318670 - vendor/libc++/libc++-trunk-r303571 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:44:11 -0000 Author: dim Date: Mon May 22 19:44:10 2017 New Revision: 318670 URL: https://svnweb.freebsd.org/changeset/base/318670 Log: Tag libc++ trunk r303571. Added: vendor/libc++/libc++-trunk-r303571/ - copied from r318669, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Mon May 22 19:44:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD303D78AD7; Mon, 22 May 2017 19:44:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F4E61B1C; Mon, 22 May 2017 19:44:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJi6AF076839; Mon, 22 May 2017 19:44:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJi5Np076832; Mon, 22 May 2017 19:44:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221944.v4MJi5Np076832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318669 - in vendor/libc++/dist: test/libcxx/selftest utils/libcxx utils/libcxx/test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:44:07 -0000 Author: dim Date: Mon May 22 19:44:05 2017 New Revision: 318669 URL: https://svnweb.freebsd.org/changeset/base/318669 Log: Vendor import of libc++ trunk r303571: https://llvm.org/svn/llvm-project/libcxx/trunk@303571 Added: vendor/libc++/dist/test/libcxx/selftest/test.arc.fail.mm vendor/libc++/dist/test/libcxx/selftest/test.arc.pass.mm vendor/libc++/dist/test/libcxx/selftest/test.fail.mm vendor/libc++/dist/test/libcxx/selftest/test.pass.mm Modified: vendor/libc++/dist/utils/libcxx/compiler.py vendor/libc++/dist/utils/libcxx/test/config.py vendor/libc++/dist/utils/libcxx/test/format.py Added: vendor/libc++/dist/test/libcxx/selftest/test.arc.fail.mm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/selftest/test.arc.fail.mm Mon May 22 19:44:05 2017 (r318669) @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#if __has_feature(objc_arc) +#error This test should not compile. +#endif Added: vendor/libc++/dist/test/libcxx/selftest/test.arc.pass.mm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/selftest/test.arc.pass.mm Mon May 22 19:44:05 2017 (r318669) @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#if __has_feature(objc_arc) == 0 +#error "arc should be enabled" +#endif + +int main() +{ +} Added: vendor/libc++/dist/test/libcxx/selftest/test.fail.mm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/selftest/test.fail.mm Mon May 22 19:44:05 2017 (r318669) @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#if __has_feature(objc_arc) == 0 +#error This test should not compile. +#endif Added: vendor/libc++/dist/test/libcxx/selftest/test.pass.mm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/selftest/test.pass.mm Mon May 22 19:44:05 2017 (r318669) @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#if __has_feature(objc_arc) +#error "arc should *not* be enabled" +#endif + +int main() +{ +} Modified: vendor/libc++/dist/utils/libcxx/compiler.py ============================================================================== --- vendor/libc++/dist/utils/libcxx/compiler.py Mon May 22 19:44:02 2017 (r318668) +++ vendor/libc++/dist/utils/libcxx/compiler.py Mon May 22 19:44:05 2017 (r318669) @@ -24,6 +24,7 @@ class CXXCompiler(object): modules_flags=None, use_modules=False, use_ccache=False, use_warnings=False, compile_env=None, cxx_type=None, cxx_version=None): + self.source_lang = 'c++' self.path = path self.flags = list(flags or []) self.compile_flags = list(compile_flags or []) @@ -108,7 +109,7 @@ class CXXCompiler(object): if out is not None: cmd += ['-o', out] if input_is_cxx: - cmd += ['-x', 'c++'] + cmd += ['-x', self.source_lang] if isinstance(source_files, list): cmd += source_files elif isinstance(source_files, str): Modified: vendor/libc++/dist/utils/libcxx/test/config.py ============================================================================== --- vendor/libc++/dist/utils/libcxx/test/config.py Mon May 22 19:44:02 2017 (r318668) +++ vendor/libc++/dist/utils/libcxx/test/config.py Mon May 22 19:44:05 2017 (r318669) @@ -466,6 +466,12 @@ class Configuration(object): self.config.available_features.add('glibc-%s' % maj_v) self.config.available_features.add('glibc-%s.%s' % (maj_v, min_v)) + # Support Objective-C++ only on MacOS and if the compiler supports it. + if self.target_info.platform() == "darwin" and \ + self.target_info.is_host_macosx() and \ + self.cxx.hasCompileFlag(["-x", "objective-c++", "-fobjc-arc"]): + self.config.available_features.add("objective-c++") + def configure_compile_flags(self): no_default_flags = self.get_lit_bool('no_default_flags', False) if not no_default_flags: Modified: vendor/libc++/dist/utils/libcxx/test/format.py ============================================================================== --- vendor/libc++/dist/utils/libcxx/test/format.py Mon May 22 19:44:02 2017 (r318668) +++ vendor/libc++/dist/utils/libcxx/test/format.py Mon May 22 19:44:05 2017 (r318669) @@ -87,14 +87,22 @@ class LibcxxTestFormat(object): name_root, name_ext = os.path.splitext(name) is_libcxx_test = test.path_in_suite[0] == 'libcxx' is_sh_test = name_root.endswith('.sh') - is_pass_test = name.endswith('.pass.cpp') - is_fail_test = name.endswith('.fail.cpp') - assert is_sh_test or name_ext == '.cpp', 'non-cpp file must be sh test' + is_pass_test = name.endswith('.pass.cpp') or name.endswith('.pass.mm') + is_fail_test = name.endswith('.fail.cpp') or name.endswith('.fail.mm') + is_objcxx_test = name.endswith('.mm') + is_objcxx_arc_test = name.endswith('.arc.pass.mm') or \ + name.endswith('.arc.fail.mm') + assert is_sh_test or name_ext == '.cpp' or name_ext == '.mm', \ + 'non-cpp file must be sh test' if test.config.unsupported: return (lit.Test.UNSUPPORTED, "A lit.local.cfg marked this unsupported") + if is_objcxx_test and not \ + 'objective-c++' in test.config.available_features: + return (lit.Test.UNSUPPORTED, "Objective-C++ is not supported") + parsers = self._make_custom_parsers() script = lit.TestRunner.parseIntegratedTestScript( test, additional_parsers=parsers, require_script=is_sh_test) @@ -133,6 +141,14 @@ class LibcxxTestFormat(object): if '#define _LIBCPP_ASSERT' in contents: test_cxx.useModules(False) + if is_objcxx_test: + test_cxx.source_lang = 'objective-c++' + if is_objcxx_arc_test: + test_cxx.compile_flags += ['-fobjc-arc'] + else: + test_cxx.compile_flags += ['-fno-objc-arc'] + test_cxx.link_flags += ['-framework', 'Foundation'] + # Dispatch the test based on its suffix. if is_sh_test: if not isinstance(self.executor, LocalExecutor): From owner-svn-src-all@freebsd.org Mon May 22 19:44:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E183AD78BC9; Mon, 22 May 2017 19:44:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93E501CBC; Mon, 22 May 2017 19:44:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJiIDe077000; Mon, 22 May 2017 19:44:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJiIHm076999; Mon, 22 May 2017 19:44:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221944.v4MJiIHm076999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318672 - vendor/lld/lld-trunk-r303571 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:44:20 -0000 Author: dim Date: Mon May 22 19:44:18 2017 New Revision: 318672 URL: https://svnweb.freebsd.org/changeset/base/318672 Log: Tag lld trunk r303571. Added: vendor/lld/lld-trunk-r303571/ - copied from r318671, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Mon May 22 19:44:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D238FD78CA2; Mon, 22 May 2017 19:44:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 878CD1D8E; Mon, 22 May 2017 19:44:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJiQJm077100; Mon, 22 May 2017 19:44:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJiQ14077099; Mon, 22 May 2017 19:44:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221944.v4MJiQ14077099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:44:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318674 - vendor/lldb/lldb-trunk-r303571 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:44:28 -0000 Author: dim Date: Mon May 22 19:44:26 2017 New Revision: 318674 URL: https://svnweb.freebsd.org/changeset/base/318674 Log: Tag lldb trunk r303571. Added: vendor/lldb/lldb-trunk-r303571/ - copied from r318673, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Mon May 22 19:44:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5096D78C02; Mon, 22 May 2017 19:44:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B237B1D01; Mon, 22 May 2017 19:44:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJiLH1077052; Mon, 22 May 2017 19:44:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJiLc4077047; Mon, 22 May 2017 19:44:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221944.v4MJiLc4077047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318673 - in vendor/lldb/dist: include/lldb/Utility packages/Python/lldbsuite/test source/Core source/Utility unittests/Utility X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:44:22 -0000 Author: dim Date: Mon May 22 19:44:21 2017 New Revision: 318673 URL: https://svnweb.freebsd.org/changeset/base/318673 Log: Vendor import of lldb trunk r303571: https://llvm.org/svn/llvm-project/lldb/trunk@303571 Modified: vendor/lldb/dist/include/lldb/Utility/Status.h vendor/lldb/dist/packages/Python/lldbsuite/test/configuration.py vendor/lldb/dist/source/Core/IOHandler.cpp vendor/lldb/dist/source/Utility/Status.cpp vendor/lldb/dist/unittests/Utility/StatusTest.cpp Modified: vendor/lldb/dist/include/lldb/Utility/Status.h ============================================================================== --- vendor/lldb/dist/include/lldb/Utility/Status.h Mon May 22 19:44:18 2017 (r318672) +++ vendor/lldb/dist/include/lldb/Utility/Status.h Mon May 22 19:44:21 2017 (r318673) @@ -1,5 +1,4 @@ -//===-- Status.h -------------------------------------------------*- C++ -//-*-===// +//===-- Status.h ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -8,22 +7,20 @@ // //===----------------------------------------------------------------------===// -#ifndef __DCError_h__ -#define __DCError_h__ -#if defined(__cplusplus) +#ifndef LLDB_UTILITY_STATUS_H +#define LLDB_UTILITY_STATUS_H #include "lldb/lldb-defines.h" #include "lldb/lldb-enumerations.h" // for ErrorType, ErrorType... #include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/Support/Error.h" #include "llvm/Support/FormatVariadic.h" - #include +#include // for uint32_t #include #include // for error_code #include // for forward -#include // for uint32_t - namespace llvm { class raw_ostream; } @@ -106,6 +103,10 @@ public: ~Status(); + // llvm::Error support + explicit Status(llvm::Error error); + llvm::Error ToError() const; + //------------------------------------------------------------------ /// Get the error string associated with the current error. // @@ -274,5 +275,4 @@ template <> struct format_providerCreateSubWindow("Threads", threads_bounds, false)); WindowSP status_window_sp( - main_window_sp->CreateSubWindow("Error", status_bounds, false)); + main_window_sp->CreateSubWindow("Status", status_bounds, false)); status_window_sp->SetCanBeActive( false); // Don't let the status bar become the active window main_window_sp->SetDelegate( Modified: vendor/lldb/dist/source/Utility/Status.cpp ============================================================================== --- vendor/lldb/dist/source/Utility/Status.cpp Mon May 22 19:44:18 2017 (r318672) +++ vendor/lldb/dist/source/Utility/Status.cpp Mon May 22 19:44:21 2017 (r318673) @@ -56,6 +56,37 @@ Status::Status(const char *format, ...) va_end(args); } +Status::Status(llvm::Error error) + : m_code(0), m_type(ErrorType::eErrorTypeGeneric) { + if (!error) + return; + + // if the error happens to be a errno error, preserve the error code + error = llvm::handleErrors( + std::move(error), [&](std::unique_ptr e) -> llvm::Error { + std::error_code ec = e->convertToErrorCode(); + if (ec.category() == std::generic_category()) { + m_code = ec.value(); + m_type = ErrorType::eErrorTypePOSIX; + return llvm::Error::success(); + } + return llvm::Error(std::move(e)); + }); + + // Otherwise, just preserve the message + if (error) + SetErrorString(llvm::toString(std::move(error))); +} + +llvm::Error Status::ToError() const { + if (Success()) + return llvm::Error::success(); + if (m_type == ErrorType::eErrorTypePOSIX) + return llvm::errorCodeToError(std::error_code(m_code, std::generic_category())); + return llvm::make_error(AsCString(), + llvm::inconvertibleErrorCode()); +} + //---------------------------------------------------------------------- // Assignment operator //---------------------------------------------------------------------- Modified: vendor/lldb/dist/unittests/Utility/StatusTest.cpp ============================================================================== --- vendor/lldb/dist/unittests/Utility/StatusTest.cpp Mon May 22 19:44:18 2017 (r318672) +++ vendor/lldb/dist/unittests/Utility/StatusTest.cpp Mon May 22 19:44:21 2017 (r318673) @@ -11,9 +11,40 @@ #include "gtest/gtest.h" using namespace lldb_private; +using namespace lldb; TEST(StatusTest, Formatv) { EXPECT_EQ("", llvm::formatv("{0}", Status()).str()); EXPECT_EQ("Hello Status", llvm::formatv("{0}", Status("Hello Status")).str()); EXPECT_EQ("Hello", llvm::formatv("{0:5}", Status("Hello Error")).str()); } + +TEST(StatusTest, ErrorConstructor) { + EXPECT_TRUE(Status(llvm::Error::success()).Success()); + + Status eagain( + llvm::errorCodeToError(std::error_code(EAGAIN, std::generic_category()))); + EXPECT_TRUE(eagain.Fail()); + EXPECT_EQ(eErrorTypePOSIX, eagain.GetType()); + EXPECT_EQ(Status::ValueType(EAGAIN), eagain.GetError()); + + Status foo(llvm::make_error( + "foo", llvm::inconvertibleErrorCode())); + EXPECT_TRUE(foo.Fail()); + EXPECT_EQ(eErrorTypeGeneric, foo.GetType()); + EXPECT_STREQ("foo", foo.AsCString()); +} + +TEST(StatusTest, ErrorConversion) { + EXPECT_FALSE(bool(Status().ToError())); + + llvm::Error eagain = Status(EAGAIN, ErrorType::eErrorTypePOSIX).ToError(); + EXPECT_TRUE(bool(eagain)); + std::error_code ec = llvm::errorToErrorCode(std::move(eagain)); + EXPECT_EQ(EAGAIN, ec.value()); + EXPECT_EQ(std::generic_category(), ec.category()); + + llvm::Error foo = Status("foo").ToError(); + EXPECT_TRUE(bool(foo)); + EXPECT_EQ("foo", llvm::toString(std::move(foo))); +} From owner-svn-src-all@freebsd.org Mon May 22 19:44:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5082D78B5E; Mon, 22 May 2017 19:44:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CFFB1C2C; Mon, 22 May 2017 19:44:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJiE01076952; Mon, 22 May 2017 19:44:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJiCi8076934; Mon, 22 May 2017 19:44:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705221944.v4MJiCi8076934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 22 May 2017 19:44:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318671 - in vendor/lld/dist: COFF ELF test/COFF test/ELF X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:44:16 -0000 Author: dim Date: Mon May 22 19:44:12 2017 New Revision: 318671 URL: https://svnweb.freebsd.org/changeset/base/318671 Log: Vendor import of lld trunk r303571: https://llvm.org/svn/llvm-project/lld/trunk@303571 Added: vendor/lld/dist/test/COFF/pdb-options.test vendor/lld/dist/test/ELF/arm-sbrel32.s (contents, props changed) Deleted: vendor/lld/dist/COFF/Librarian.cpp vendor/lld/dist/COFF/ModuleDef.cpp Modified: vendor/lld/dist/COFF/CMakeLists.txt vendor/lld/dist/COFF/Config.h vendor/lld/dist/COFF/DLL.cpp vendor/lld/dist/COFF/DLL.h vendor/lld/dist/COFF/Driver.cpp vendor/lld/dist/COFF/Driver.h vendor/lld/dist/COFF/DriverUtils.cpp vendor/lld/dist/COFF/InputFiles.cpp vendor/lld/dist/COFF/InputFiles.h vendor/lld/dist/COFF/Options.td vendor/lld/dist/COFF/PDB.cpp vendor/lld/dist/COFF/SymbolTable.h vendor/lld/dist/COFF/Writer.cpp vendor/lld/dist/ELF/InputSection.cpp vendor/lld/dist/ELF/InputSection.h vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/MapFile.cpp vendor/lld/dist/ELF/MapFile.h vendor/lld/dist/ELF/Relocations.cpp vendor/lld/dist/ELF/Relocations.h vendor/lld/dist/ELF/SyntheticSections.cpp vendor/lld/dist/ELF/SyntheticSections.h vendor/lld/dist/ELF/Target.cpp vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/test/COFF/armnt-imports.test vendor/lld/dist/test/COFF/hello32.test vendor/lld/dist/test/COFF/imports.test vendor/lld/dist/test/COFF/invalid-debug-type.test vendor/lld/dist/test/COFF/options.test vendor/lld/dist/test/COFF/pdb-none.test vendor/lld/dist/test/COFF/pdb.test Modified: vendor/lld/dist/COFF/CMakeLists.txt ============================================================================== --- vendor/lld/dist/COFF/CMakeLists.txt Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/CMakeLists.txt Mon May 22 19:44:12 2017 (r318671) @@ -14,11 +14,9 @@ add_lld_library(lldCOFF Error.cpp ICF.cpp InputFiles.cpp - Librarian.cpp LTO.cpp MapFile.cpp MarkLive.cpp - ModuleDef.cpp PDB.cpp Strings.cpp SymbolTable.cpp Modified: vendor/lld/dist/COFF/Config.h ============================================================================== --- vendor/lld/dist/COFF/Config.h Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/Config.h Mon May 22 19:44:12 2017 (r318671) @@ -155,7 +155,6 @@ struct Configuration { uint32_t MajorOSVersion = 6; uint32_t MinorOSVersion = 0; bool DynamicBase = true; - bool AllowBind = true; bool NxCompat = true; bool AllowIsolation = true; bool TerminalServerAware = true; @@ -164,7 +163,6 @@ struct Configuration { bool AppContainer = false; // This is for debugging. - bool DebugPdb = false; bool DumpPdb = false; }; Modified: vendor/lld/dist/COFF/DLL.cpp ============================================================================== --- vendor/lld/dist/COFF/DLL.cpp Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/DLL.cpp Mon May 22 19:44:12 2017 (r318671) @@ -100,13 +100,17 @@ public: void writeTo(uint8_t *Buf) const override { auto *E = (coff_import_directory_table_entry *)(Buf + OutputSectionOff); - E->ImportLookupTableRVA = LookupTab->getRVA(); E->NameRVA = DLLName->getRVA(); + + // The import descriptor table contains two pointers to + // the tables describing dllimported symbols. But the + // Windows loader actually uses only one. So we create + // only one table and set both fields to its address. + E->ImportLookupTableRVA = AddressTab->getRVA(); E->ImportAddressTableRVA = AddressTab->getRVA(); } Chunk *DLLName; - Chunk *LookupTab; Chunk *AddressTab; }; @@ -136,9 +140,9 @@ binImports(const std::vectorgetDLLName().lower()].push_back(Sym); std::vector> V; - for (auto &P : M) { + for (auto &KV : M) { // Sort symbols by name for each group. - std::vector &Syms = P.second; + std::vector &Syms = KV.second; std::sort(Syms.begin(), Syms.end(), [](DefinedImportData *A, DefinedImportData *B) { return A->getName() < B->getName(); @@ -383,21 +387,14 @@ uint64_t IdataContents::getIATSize() { // See Microsoft PE/COFF spec 5.4 for details. std::vector IdataContents::getChunks() { create(); - std::vector V; + // The loader assumes a specific order of data. // Add each type in the correct order. - for (std::unique_ptr &C : Dirs) - V.push_back(C.get()); - for (std::unique_ptr &C : Lookups) - V.push_back(C.get()); - for (std::unique_ptr &C : Addresses) - V.push_back(C.get()); - for (std::unique_ptr &C : Hints) - V.push_back(C.get()); - for (auto &P : DLLNames) { - std::unique_ptr &C = P.second; - V.push_back(C.get()); - } + std::vector V; + V.insert(V.end(), Dirs.begin(), Dirs.end()); + V.insert(V.end(), Addresses.begin(), Addresses.end()); + V.insert(V.end(), Hints.begin(), Hints.end()); + V.insert(V.end(), DLLNames.begin(), DLLNames.end()); return V; } @@ -406,65 +403,50 @@ void IdataContents::create() { // Create .idata contents for each DLL. for (std::vector &Syms : V) { - StringRef Name = Syms[0]->getDLLName(); - // Create lookup and address tables. If they have external names, // we need to create HintName chunks to store the names. // If they don't (if they are import-by-ordinals), we store only // ordinal values to the table. - size_t Base = Lookups.size(); + size_t Base = Addresses.size(); for (DefinedImportData *S : Syms) { uint16_t Ord = S->getOrdinal(); if (S->getExternalName().empty()) { - Lookups.push_back(make_unique(Ord)); - Addresses.push_back(make_unique(Ord)); + Addresses.push_back(make(Ord)); continue; } - auto C = make_unique(S->getExternalName(), Ord); - Lookups.push_back(make_unique(C.get())); - Addresses.push_back(make_unique(C.get())); - Hints.push_back(std::move(C)); + auto *C = make(S->getExternalName(), Ord); + Addresses.push_back(make(C)); + Hints.push_back(C); } // Terminate with null values. - Lookups.push_back(make_unique(ptrSize())); - Addresses.push_back(make_unique(ptrSize())); + Addresses.push_back(make(ptrSize())); for (int I = 0, E = Syms.size(); I < E; ++I) - Syms[I]->setLocation(Addresses[Base + I].get()); + Syms[I]->setLocation(Addresses[Base + I]); // Create the import table header. - if (!DLLNames.count(Name)) - DLLNames[Name] = make_unique(Name); - auto Dir = make_unique(DLLNames[Name].get()); - Dir->LookupTab = Lookups[Base].get(); - Dir->AddressTab = Addresses[Base].get(); - Dirs.push_back(std::move(Dir)); + DLLNames.push_back(make(Syms[0]->getDLLName())); + auto *Dir = make(DLLNames.back()); + Dir->AddressTab = Addresses[Base]; + Dirs.push_back(Dir); } // Add null terminator. - Dirs.push_back(make_unique(sizeof(ImportDirectoryTableEntry))); + Dirs.push_back(make(sizeof(ImportDirectoryTableEntry))); } std::vector DelayLoadContents::getChunks() { std::vector V; - for (std::unique_ptr &C : Dirs) - V.push_back(C.get()); - for (std::unique_ptr &C : Names) - V.push_back(C.get()); - for (std::unique_ptr &C : HintNames) - V.push_back(C.get()); - for (auto &P : DLLNames) { - std::unique_ptr &C = P.second; - V.push_back(C.get()); - } + V.insert(V.end(), Dirs.begin(), Dirs.end()); + V.insert(V.end(), Names.begin(), Names.end()); + V.insert(V.end(), HintNames.begin(), HintNames.end()); + V.insert(V.end(), DLLNames.begin(), DLLNames.end()); return V; } std::vector DelayLoadContents::getDataChunks() { std::vector V; - for (std::unique_ptr &C : ModuleHandles) - V.push_back(C.get()); - for (std::unique_ptr &C : Addresses) - V.push_back(C.get()); + V.insert(V.end(), ModuleHandles.begin(), ModuleHandles.end()); + V.insert(V.end(), Addresses.begin(), Addresses.end()); return V; } @@ -478,55 +460,51 @@ void DelayLoadContents::create(Defined * // Create .didat contents for each DLL. for (std::vector &Syms : V) { - StringRef Name = Syms[0]->getDLLName(); - // Create the delay import table header. - if (!DLLNames.count(Name)) - DLLNames[Name] = make_unique(Name); - auto Dir = make_unique(DLLNames[Name].get()); + DLLNames.push_back(make(Syms[0]->getDLLName())); + auto *Dir = make(DLLNames.back()); size_t Base = Addresses.size(); for (DefinedImportData *S : Syms) { - Chunk *T = newThunkChunk(S, Dir.get()); - auto A = make_unique(T); - Addresses.push_back(std::move(A)); - Thunks.push_back(std::unique_ptr(T)); + Chunk *T = newThunkChunk(S, Dir); + auto *A = make(T); + Addresses.push_back(A); + Thunks.push_back(T); StringRef ExtName = S->getExternalName(); if (ExtName.empty()) { - Names.push_back(make_unique(S->getOrdinal())); + Names.push_back(make(S->getOrdinal())); } else { - auto C = make_unique(ExtName, 0); - Names.push_back(make_unique(C.get())); - HintNames.push_back(std::move(C)); + auto *C = make(ExtName, 0); + Names.push_back(make(C)); + HintNames.push_back(C); } } // Terminate with null values. - Addresses.push_back(make_unique(8)); - Names.push_back(make_unique(8)); + Addresses.push_back(make(8)); + Names.push_back(make(8)); for (int I = 0, E = Syms.size(); I < E; ++I) - Syms[I]->setLocation(Addresses[Base + I].get()); - auto *MH = new NullChunk(8); + Syms[I]->setLocation(Addresses[Base + I]); + auto *MH = make(8); MH->setAlign(8); - ModuleHandles.push_back(std::unique_ptr(MH)); + ModuleHandles.push_back(MH); // Fill the delay import table header fields. Dir->ModuleHandle = MH; - Dir->AddressTab = Addresses[Base].get(); - Dir->NameTab = Names[Base].get(); - Dirs.push_back(std::move(Dir)); + Dir->AddressTab = Addresses[Base]; + Dir->NameTab = Names[Base]; + Dirs.push_back(Dir); } // Add null terminator. - Dirs.push_back( - make_unique(sizeof(delay_import_directory_table_entry))); + Dirs.push_back(make(sizeof(delay_import_directory_table_entry))); } Chunk *DelayLoadContents::newThunkChunk(DefinedImportData *S, Chunk *Dir) { switch (Config->Machine) { case AMD64: - return new ThunkChunkX64(S, Dir, Helper); + return make(S, Dir, Helper); case I386: - return new ThunkChunkX86(S, Dir, Helper); + return make(S, Dir, Helper); default: llvm_unreachable("unsupported machine type"); } @@ -537,34 +515,32 @@ EdataContents::EdataContents() { for (Export &E : Config->Exports) MaxOrdinal = std::max(MaxOrdinal, E.Ordinal); - auto *DLLName = new StringChunk(sys::path::filename(Config->OutputFile)); - auto *AddressTab = new AddressTableChunk(MaxOrdinal); + auto *DLLName = make(sys::path::filename(Config->OutputFile)); + auto *AddressTab = make(MaxOrdinal); std::vector Names; for (Export &E : Config->Exports) if (!E.Noname) - Names.push_back(new StringChunk(E.ExportName)); + Names.push_back(make(E.ExportName)); std::vector Forwards; for (Export &E : Config->Exports) { if (E.ForwardTo.empty()) continue; - E.ForwardChunk = new StringChunk(E.ForwardTo); + E.ForwardChunk = make(E.ForwardTo); Forwards.push_back(E.ForwardChunk); } - auto *NameTab = new NamePointersChunk(Names); - auto *OrdinalTab = new ExportOrdinalChunk(Names.size()); - auto *Dir = new ExportDirectoryChunk(MaxOrdinal, Names.size(), DLLName, - AddressTab, NameTab, OrdinalTab); - Chunks.push_back(std::unique_ptr(Dir)); - Chunks.push_back(std::unique_ptr(DLLName)); - Chunks.push_back(std::unique_ptr(AddressTab)); - Chunks.push_back(std::unique_ptr(NameTab)); - Chunks.push_back(std::unique_ptr(OrdinalTab)); - for (Chunk *C : Names) - Chunks.push_back(std::unique_ptr(C)); - for (Chunk *C : Forwards) - Chunks.push_back(std::unique_ptr(C)); + auto *NameTab = make(Names); + auto *OrdinalTab = make(Names.size()); + auto *Dir = make(MaxOrdinal, Names.size(), DLLName, + AddressTab, NameTab, OrdinalTab); + Chunks.push_back(Dir); + Chunks.push_back(DLLName); + Chunks.push_back(AddressTab); + Chunks.push_back(NameTab); + Chunks.push_back(OrdinalTab); + Chunks.insert(Chunks.end(), Names.begin(), Names.end()); + Chunks.insert(Chunks.end(), Forwards.begin(), Forwards.end()); } } // namespace coff Modified: vendor/lld/dist/COFF/DLL.h ============================================================================== --- vendor/lld/dist/COFF/DLL.h Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/DLL.h Mon May 22 19:44:12 2017 (r318671) @@ -35,11 +35,10 @@ private: void create(); std::vector Imports; - std::vector> Dirs; - std::vector> Lookups; - std::vector> Addresses; - std::vector> Hints; - std::map> DLLNames; + std::vector Dirs; + std::vector Addresses; + std::vector Hints; + std::vector DLLNames; }; // Windows-specific. @@ -51,7 +50,7 @@ public: void create(Defined *Helper); std::vector getChunks(); std::vector getDataChunks(); - std::vector> &getCodeChunks() { return Thunks; } + ArrayRef getCodeChunks() { return Thunks; } uint64_t getDirRVA() { return Dirs[0]->getRVA(); } uint64_t getDirSize(); @@ -61,13 +60,13 @@ private: Defined *Helper; std::vector Imports; - std::vector> Dirs; - std::vector> ModuleHandles; - std::vector> Addresses; - std::vector> Names; - std::vector> HintNames; - std::vector> Thunks; - std::map> DLLNames; + std::vector Dirs; + std::vector ModuleHandles; + std::vector Addresses; + std::vector Names; + std::vector HintNames; + std::vector Thunks; + std::vector DLLNames; }; // Windows-specific. @@ -75,7 +74,7 @@ private: class EdataContents { public: EdataContents(); - std::vector> Chunks; + std::vector Chunks; }; } // namespace coff Modified: vendor/lld/dist/COFF/Driver.cpp ============================================================================== --- vendor/lld/dist/COFF/Driver.cpp Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/Driver.cpp Mon May 22 19:44:12 2017 (r318671) @@ -19,6 +19,8 @@ #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Object/ArchiveWriter.h" +#include "llvm/Object/COFFImportFile.h" +#include "llvm/Object/COFFModuleDefinition.h" #include "llvm/Option/Arg.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" @@ -35,6 +37,7 @@ #include using namespace llvm; +using namespace llvm::object; using namespace llvm::COFF; using llvm::sys::Process; using llvm::sys::fs::file_magic; @@ -97,12 +100,11 @@ static std::future createFutu MemoryBufferRef LinkerDriver::takeBuffer(std::unique_ptr MB) { MemoryBufferRef MBRef = *MB; - OwningMBs.push_back(std::move(MB)); + make>(std::move(MB)); // take ownership if (Driver->Tar) Driver->Tar->append(relativeToRoot(MBRef.getBufferIdentifier()), MBRef.getBuffer()); - return MBRef; } @@ -420,6 +422,84 @@ static std::string getMapFile(const opt: return (OutFile.substr(0, OutFile.rfind('.')) + ".map").str(); } +static std::string getImplibPath() { + if (!Config->Implib.empty()) + return Config->Implib; + SmallString<128> Out = StringRef(Config->OutputFile); + sys::path::replace_extension(Out, ".lib"); + return Out.str(); +} + +std::vector createCOFFShortExportFromConfig() { + std::vector Exports; + for (Export &E1 : Config->Exports) { + COFFShortExport E2; + E2.Name = E1.Name; + E2.ExtName = E1.ExtName; + E2.Ordinal = E1.Ordinal; + E2.Noname = E1.Noname; + E2.Data = E1.Data; + E2.Private = E1.Private; + E2.Constant = E1.Constant; + Exports.push_back(E2); + } + return Exports; +} + +static void createImportLibrary() { + std::vector Exports = createCOFFShortExportFromConfig(); + std::string DLLName = sys::path::filename(Config->OutputFile); + std::string Path = getImplibPath(); + writeImportLibrary(DLLName, Path, Exports, Config->Machine); +} + +static void parseModuleDefs(StringRef Path) { + std::unique_ptr MB = check( + MemoryBuffer::getFile(Path, -1, false, true), "could not open " + Path); + MemoryBufferRef MBRef = MB->getMemBufferRef(); + + Expected Def = + parseCOFFModuleDefinition(MBRef, Config->Machine); + if (!Def) + fatal(errorToErrorCode(Def.takeError()).message()); + + COFFModuleDefinition &M = *Def; + if (Config->OutputFile.empty()) + Config->OutputFile = Saver.save(M.OutputFile); + + if (M.ImageBase) + Config->ImageBase = M.ImageBase; + if (M.StackReserve) + Config->StackReserve = M.StackReserve; + if (M.StackCommit) + Config->StackCommit = M.StackCommit; + if (M.HeapReserve) + Config->HeapReserve = M.HeapReserve; + if (M.HeapCommit) + Config->HeapCommit = M.HeapCommit; + if (M.MajorImageVersion) + Config->MajorImageVersion = M.MajorImageVersion; + if (M.MinorImageVersion) + Config->MinorImageVersion = M.MinorImageVersion; + if (M.MajorOSVersion) + Config->MajorOSVersion = M.MajorOSVersion; + if (M.MinorOSVersion) + Config->MinorOSVersion = M.MinorOSVersion; + + for (COFFShortExport E1 : M.Exports) { + Export E2; + E2.Name = Saver.save(E1.Name); + if (E1.isWeak()) + E2.ExtName = Saver.save(E1.ExtName); + E2.Ordinal = E1.Ordinal; + E2.Noname = E1.Noname; + E2.Data = E1.Data; + E2.Private = E1.Private; + E2.Constant = E1.Constant; + Config->Exports.push_back(E2); + } +} + std::vector getArchiveMembers(Archive *File) { std::vector V; Error Err = Error::success(); @@ -821,8 +901,6 @@ void LinkerDriver::link(ArrayRefManifestInput.push_back(Arg->getValue()); // Handle miscellaneous boolean flags. - if (Args.hasArg(OPT_allowbind_no)) - Config->AllowBind = false; if (Args.hasArg(OPT_allowisolation_no)) Config->AllowIsolation = false; if (Args.hasArg(OPT_dynamicbase_no)) @@ -834,7 +912,6 @@ void LinkerDriver::link(ArrayRefWriteSymtab = false; Config->DumpPdb = Args.hasArg(OPT_dumppdb); - Config->DebugPdb = Args.hasArg(OPT_debugpdb); Config->MapFile = getMapFile(Args); @@ -916,9 +993,7 @@ void LinkerDriver::link(ArrayRefgetValue()), - Twine("could not open ") + Arg->getValue()))); + parseModuleDefs(Arg->getValue()); } // Handle /delayload @@ -1038,7 +1113,7 @@ void LinkerDriver::link(ArrayRefExports.empty() || Config->DLL) { fixupExports(); - writeImportLibrary(); + createImportLibrary(); assignExportOrdinals(); } Modified: vendor/lld/dist/COFF/Driver.h ============================================================================== --- vendor/lld/dist/COFF/Driver.h Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/Driver.h Mon May 22 19:44:12 2017 (r318671) @@ -119,18 +119,11 @@ private: void enqueueTask(std::function Task); bool run(); - // Driver is the owner of all opened files. - // InputFiles have MemoryBufferRefs to them. - std::vector> OwningMBs; - std::list> TaskQueue; std::vector FilePaths; std::vector Resources; }; -void parseModuleDefs(MemoryBufferRef MB); -void writeImportLibrary(); - // Functions below this line are defined in DriverUtils.cpp. void printHelp(const char *Argv0); Modified: vendor/lld/dist/COFF/DriverUtils.cpp ============================================================================== --- vendor/lld/dist/COFF/DriverUtils.cpp Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/DriverUtils.cpp Mon May 22 19:44:12 2017 (r318671) @@ -43,7 +43,7 @@ namespace { class Executor { public: - explicit Executor(StringRef S) : Saver(Alloc), Prog(Saver.save(S)) {} + explicit Executor(StringRef S) : Prog(Saver.save(S)) {} void add(StringRef S) { Args.push_back(Saver.save(S)); } void add(std::string &S) { Args.push_back(Saver.save(S)); } void add(Twine S) { Args.push_back(Saver.save(S)); } @@ -67,8 +67,6 @@ public: } private: - BumpPtrAllocator Alloc; - StringSaver Saver; StringRef Prog; std::vector Args; }; Modified: vendor/lld/dist/COFF/InputFiles.cpp ============================================================================== --- vendor/lld/dist/COFF/InputFiles.cpp Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/InputFiles.cpp Mon May 22 19:44:12 2017 (r318671) @@ -137,13 +137,13 @@ void ObjectFile::initializeChunks() { // CodeView sections are stored to a different vector because they are // not linked in the regular manner. if (Name == ".debug" || Name.startswith(".debug$")) { - DebugChunks.push_back(new (Alloc) SectionChunk(this, Sec)); + DebugChunks.push_back(make(this, Sec)); continue; } if (Sec->Characteristics & llvm::COFF::IMAGE_SCN_LNK_REMOVE) continue; - auto *C = new (Alloc) SectionChunk(this, Sec); + auto *C = make(this, Sec); Chunks.push_back(C); SparseChunks[I] = C; } @@ -200,7 +200,7 @@ SymbolBody *ObjectFile::createDefined(CO bool IsFirst) { StringRef Name; if (Sym.isCommon()) { - auto *C = new (Alloc) CommonChunk(Sym); + auto *C = make(Sym); Chunks.push_back(C); COFFObj->getSymbolName(Sym, Name); Symbol *S = @@ -221,7 +221,7 @@ SymbolBody *ObjectFile::createDefined(CO if (Sym.isExternal()) return Symtab->addAbsolute(Name, Sym)->body(); else - return new (Alloc) DefinedAbsolute(Name, Sym); + return make(Name, Sym); } int32_t SectionNumber = Sym.getSectionNumber(); if (SectionNumber == llvm::COFF::IMAGE_SYM_DEBUG) @@ -258,8 +258,8 @@ SymbolBody *ObjectFile::createDefined(CO Symtab->addRegular(this, Name, SC->isCOMDAT(), Sym.getGeneric(), SC); B = cast(S->body()); } else - B = new (Alloc) DefinedRegular(this, /*Name*/ "", SC->isCOMDAT(), - /*IsExternal*/ false, Sym.getGeneric(), SC); + B = make(this, /*Name*/ "", SC->isCOMDAT(), + /*IsExternal*/ false, Sym.getGeneric(), SC); if (SC->isCOMDAT() && Sym.getValue() == 0 && !AuxP) SC->setSymbol(B); @@ -301,8 +301,8 @@ void ImportFile::parse() { fatal("broken import library"); // Read names and create an __imp_ symbol. - StringRef Name = StringAlloc.save(StringRef(Buf + sizeof(*Hdr))); - StringRef ImpName = StringAlloc.save("__imp_" + Name); + StringRef Name = Saver.save(StringRef(Buf + sizeof(*Hdr))); + StringRef ImpName = Saver.save("__imp_" + Name); const char *NameStart = Buf + sizeof(coff_import_header) + Name.size() + 1; DLLName = StringRef(NameStart); StringRef ExtName; Modified: vendor/lld/dist/COFF/InputFiles.h ============================================================================== --- vendor/lld/dist/COFF/InputFiles.h Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/InputFiles.h Mon May 22 19:44:12 2017 (r318671) @@ -130,7 +130,6 @@ private: SymbolBody *createUndefined(COFFSymbolRef Sym); std::unique_ptr COFFObj; - llvm::BumpPtrAllocator Alloc; const coff_section *SXData = nullptr; // List of all chunks defined by this file. This includes both section @@ -162,8 +161,7 @@ private: // for details about the format. class ImportFile : public InputFile { public: - explicit ImportFile(MemoryBufferRef M) - : InputFile(ImportKind, M), StringAlloc(StringAllocAux) {} + explicit ImportFile(MemoryBufferRef M) : InputFile(ImportKind, M) {} static bool classof(const InputFile *F) { return F->kind() == ImportKind; } DefinedImportData *ImpSym = nullptr; @@ -174,9 +172,6 @@ public: private: void parse() override; - llvm::BumpPtrAllocator StringAllocAux; - llvm::StringSaver StringAlloc; - public: StringRef ExternalName; const coff_import_header *Hdr; Modified: vendor/lld/dist/COFF/Options.td ============================================================================== --- vendor/lld/dist/COFF/Options.td Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/Options.td Mon May 22 19:44:12 2017 (r318671) @@ -102,7 +102,6 @@ def nosymtab : F<"nosymtab">; def msvclto : F<"msvclto">; // Flags for debugging -def debugpdb : F<"debugpdb">; def dumppdb : Joined<["/", "-"], "dumppdb">; def lldmap : F<"lldmap">; def lldmap_file : Joined<["/", "-"], "lldmap:">; Modified: vendor/lld/dist/COFF/PDB.cpp ============================================================================== --- vendor/lld/dist/COFF/PDB.cpp Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/PDB.cpp Mon May 22 19:44:12 2017 (r318671) @@ -14,7 +14,8 @@ #include "SymbolTable.h" #include "Symbols.h" #include "llvm/DebugInfo/CodeView/CVDebugRecord.h" -#include "llvm/DebugInfo/CodeView/CVTypeDumper.h" +#include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" +#include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" #include "llvm/DebugInfo/CodeView/SymbolDumper.h" #include "llvm/DebugInfo/CodeView/TypeDatabase.h" #include "llvm/DebugInfo/CodeView/TypeDumpVisitor.h" @@ -107,6 +108,7 @@ static void mergeDebugT(SymbolTable *Sym BinaryByteStream Stream(Data, support::little); codeview::CVTypeArray Types; BinaryStreamReader Reader(Stream); + SmallVector SourceToDest; // Follow type servers. If the same type server is encountered more than // once for this instance of `PDBTypeServerHandler` (for example if many // object files reference the same TypeServer), the types from the @@ -115,8 +117,8 @@ static void mergeDebugT(SymbolTable *Sym Handler.addSearchPath(llvm::sys::path::parent_path(File->getName())); if (auto EC = Reader.readArray(Types, Reader.getLength())) fatal(EC, "Reader::readArray failed"); - if (auto Err = - codeview::mergeTypeStreams(IDTable, TypeTable, &Handler, Types)) + if (auto Err = codeview::mergeTypeStreams(IDTable, TypeTable, SourceToDest, + &Handler, Types)) fatal(Err, "codeview::mergeTypeStreams failed"); } @@ -133,12 +135,11 @@ static void dumpDebugT(ScopedPrinter &W, if (Data.empty()) return; - TypeDatabase TDB(0); - TypeDumpVisitor TDV(TDB, &W, false); + LazyRandomTypeCollection Types(Data, 100); + TypeDumpVisitor TDV(Types, &W, false); // Use a default implementation that does not follow type servers and instead // just dumps the contents of the TypeServer2 record. - CVTypeDumper TypeDumper(TDB); - if (auto EC = TypeDumper.dump(Data, TDV)) + if (auto EC = codeview::visitTypeStream(Types, TDV)) fatal(EC, "CVTypeDumper::dump failed"); } Modified: vendor/lld/dist/COFF/SymbolTable.h ============================================================================== --- vendor/lld/dist/COFF/SymbolTable.h Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/SymbolTable.h Mon May 22 19:44:12 2017 (r318671) @@ -15,7 +15,6 @@ #include "llvm/ADT/CachedHashString.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseMapInfo.h" -#include "llvm/Support/Allocator.h" #include "llvm/Support/raw_ostream.h" namespace llvm { Modified: vendor/lld/dist/COFF/Writer.cpp ============================================================================== --- vendor/lld/dist/COFF/Writer.cpp Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/COFF/Writer.cpp Mon May 22 19:44:12 2017 (r318671) @@ -48,8 +48,7 @@ namespace { class DebugDirectoryChunk : public Chunk { public: - DebugDirectoryChunk(const std::vector> &R) - : Records(R) {} + DebugDirectoryChunk(const std::vector &R) : Records(R) {} size_t getSize() const override { return Records.size() * sizeof(debug_directory); @@ -58,7 +57,7 @@ public: void writeTo(uint8_t *B) const override { auto *D = reinterpret_cast(B + OutputSectionOff); - for (const std::unique_ptr &Record : Records) { + for (const Chunk *Record : Records) { D->Characteristics = 0; D->TimeDateStamp = 0; D->MajorVersion = 0; @@ -74,7 +73,7 @@ public: } private: - const std::vector> &Records; + const std::vector &Records; }; class CVDebugRecordChunk : public Chunk { @@ -142,10 +141,10 @@ private: IdataContents Idata; DelayLoadContents DelayIdata; EdataContents Edata; - std::unique_ptr SEHTable; + SEHTableChunk *SEHTable = nullptr; - std::unique_ptr DebugDirectory; - std::vector> DebugRecords; + Chunk *DebugDirectory = nullptr; + std::vector DebugRecords; CVDebugRecordChunk *BuildId = nullptr; ArrayRef SectionTable; @@ -153,8 +152,6 @@ private: uint32_t PointerToSymbolTable = 0; uint64_t SizeOfImage; uint64_t SizeOfHeaders; - - std::vector> Chunks; }; } // anonymous namespace @@ -258,7 +255,7 @@ void Writer::run() { sortExceptionTable(); writeBuildId(); - if (!Config->PDBPath.empty()) { + if (!Config->PDBPath.empty() && Config->Debug) { const llvm::codeview::DebugInfo *DI = nullptr; if (Config->DebugTypes & static_cast(coff::DebugType::CV)) DI = BuildId->DI; @@ -324,19 +321,19 @@ void Writer::createMiscChunks() { // Create Debug Information Chunks if (Config->Debug) { - DebugDirectory = llvm::make_unique(DebugRecords); + DebugDirectory = make(DebugRecords); // TODO(compnerd) create a coffgrp entry if DebugType::CV is not enabled if (Config->DebugTypes & static_cast(coff::DebugType::CV)) { - auto Chunk = llvm::make_unique(); + auto *Chunk = make(); - BuildId = Chunk.get(); - DebugRecords.push_back(std::move(Chunk)); + BuildId = Chunk; + DebugRecords.push_back(Chunk); } - RData->addChunk(DebugDirectory.get()); - for (const std::unique_ptr &C : DebugRecords) - RData->addChunk(C.get()); + RData->addChunk(DebugDirectory); + for (Chunk *C : DebugRecords) + RData->addChunk(C); } // Create SEH table. x86-only. @@ -352,8 +349,8 @@ void Writer::createMiscChunks() { Handlers.insert(cast(B)); } - SEHTable.reset(new SEHTableChunk(Handlers)); - RData->addChunk(SEHTable.get()); + SEHTable = make(Handlers); + RData->addChunk(SEHTable); } // Create .idata section for the DLL-imported symbol table. @@ -398,8 +395,8 @@ void Writer::createImportTables() { for (Chunk *C : DelayIdata.getDataChunks()) Sec->addChunk(C); Sec = createSection(".text"); - for (std::unique_ptr &C : DelayIdata.getCodeChunks()) - Sec->addChunk(C.get()); + for (Chunk *C : DelayIdata.getCodeChunks()) + Sec->addChunk(C); } } @@ -407,8 +404,8 @@ void Writer::createExportTable() { if (Config->Exports.empty()) return; OutputSection *Sec = createSection(".edata"); - for (std::unique_ptr &C : Edata.Chunks) - Sec->addChunk(C.get()); + for (Chunk *C : Edata.Chunks) + Sec->addChunk(C); } // The Windows loader doesn't seem to like empty sections, @@ -602,14 +599,19 @@ template void Writ PE->SizeOfStackCommit = Config->StackCommit; PE->SizeOfHeapReserve = Config->HeapReserve; PE->SizeOfHeapCommit = Config->HeapCommit; + + // Import Descriptor Tables and Import Address Tables are merged + // in our output. That's not compatible with the Binding feature + // that is sort of prelinking. Setting this flag to make it clear + // that our outputs are not for the Binding. + PE->DLLCharacteristics = IMAGE_DLL_CHARACTERISTICS_NO_BIND; + if (Config->AppContainer) PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_APPCONTAINER; if (Config->DynamicBase) PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE; if (Config->HighEntropyVA) PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA; - if (!Config->AllowBind) - PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_NO_BIND; if (Config->NxCompat) PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_NX_COMPAT; if (!Config->AllowIsolation) Modified: vendor/lld/dist/ELF/InputSection.cpp ============================================================================== --- vendor/lld/dist/ELF/InputSection.cpp Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/ELF/InputSection.cpp Mon May 22 19:44:12 2017 (r318671) @@ -390,14 +390,28 @@ static uint64_t getAArch64UndefinedRelat } } -template -static typename ELFT::uint -getRelocTargetVA(uint32_t Type, int64_t A, typename ELFT::uint P, - const SymbolBody &Body, RelExpr Expr) { +// ARM SBREL relocations are of the form S + A - B where B is the static base +// The ARM ABI defines base to be "addressing origin of the output segment +// defining the symbol S". We defined the "addressing origin"/static base to be +// the base of the PT_LOAD segment containing the Body. +// The procedure call standard only defines a Read Write Position Independent +// RWPI variant so in practice we should expect the static base to be the base +// of the RW segment. +static uint64_t getARMStaticBase(const SymbolBody &Body) { + OutputSection *OS = Body.getOutputSection(); + if (!OS || !OS->FirstInPtLoad) + fatal("SBREL relocation to " + Body.getName() + " without static base\n"); + return OS->FirstInPtLoad->Addr; +} + +static uint64_t getRelocTargetVA(uint32_t Type, int64_t A, uint64_t P, + const SymbolBody &Body, RelExpr Expr) { switch (Expr) { case R_ABS: case R_RELAX_GOT_PC_NOPIC: return Body.getVA(A); + case R_ARM_SBREL: + return Body.getVA(A) - getARMStaticBase(Body); case R_GOT: case R_RELAX_TLS_GD_TO_IE_ABS: return Body.getGotVA() + A; @@ -518,7 +532,7 @@ getRelocTargetVA(uint32_t Type, int64_t case R_NEG_TLS: return Out::TlsPhdr->p_memsz - Body.getVA(A); case R_SIZE: - return Body.getSize() + A; + return A; // Body.getSize was already folded into the addend. case R_TLSDESC: return InX::Got->getGlobalDynAddr(Body) + A; case R_TLSDESC_PAGE: @@ -566,7 +580,7 @@ void InputSection::relocateNonAlloc(uint uint64_t SymVA = 0; if (!Sym.isTls() || Out::TlsPhdr) SymVA = SignExtend64( - getRelocTargetVA(Type, Addend, AddrLoc, Sym, R_ABS)); + getRelocTargetVA(Type, Addend, AddrLoc, Sym, R_ABS)); Target->relocateOne(BufLoc, Type, SymVA); } } @@ -577,19 +591,28 @@ template elf::ObjectFile void InputSectionBase::relocate(uint8_t *Buf, uint8_t *BufEnd) { + if (Flags & SHF_ALLOC) + relocateAlloc(Buf, BufEnd); + else + relocateNonAlloc(Buf, BufEnd); +} + +template +void InputSectionBase::relocateNonAlloc(uint8_t *Buf, uint8_t *BufEnd) { // scanReloc function in Writer.cpp constructs Relocations // vector only for SHF_ALLOC'ed sections. For other sections, // we handle relocations directly here. - auto *IS = dyn_cast(this); - if (IS && !(IS->Flags & SHF_ALLOC)) { - if (IS->AreRelocsRela) - IS->relocateNonAlloc(Buf, IS->template relas()); - else - IS->relocateNonAlloc(Buf, IS->template rels()); - return; - } + auto *IS = cast(this); + assert(!(IS->Flags & SHF_ALLOC)); + if (IS->AreRelocsRela) + IS->relocateNonAlloc(Buf, IS->template relas()); + else + IS->relocateNonAlloc(Buf, IS->template rels()); +} - const unsigned Bits = sizeof(typename ELFT::uint) * 8; +void InputSectionBase::relocateAlloc(uint8_t *Buf, uint8_t *BufEnd) { + assert(Flags & SHF_ALLOC); + const unsigned Bits = Config->Wordsize * 8; for (const Relocation &Rel : Relocations) { uint64_t Offset = getOffset(Rel.Offset); uint8_t *BufLoc = Buf + Offset; @@ -597,8 +620,8 @@ void InputSectionBase::relocate(uint8_t uint64_t AddrLoc = getOutputSection()->Addr + Offset; RelExpr Expr = Rel.Expr; - uint64_t TargetVA = SignExtend64( - getRelocTargetVA(Type, Rel.Addend, AddrLoc, *Rel.Sym, Expr)); + uint64_t TargetVA = SignExtend64( + getRelocTargetVA(Type, Rel.Addend, AddrLoc, *Rel.Sym, Expr), Bits); switch (Expr) { case R_RELAX_GOT_PC: Modified: vendor/lld/dist/ELF/InputSection.h ============================================================================== --- vendor/lld/dist/ELF/InputSection.h Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/ELF/InputSection.h Mon May 22 19:44:12 2017 (r318671) @@ -167,6 +167,8 @@ public: template std::string getObjMsg(uint64_t Offset); template void relocate(uint8_t *Buf, uint8_t *BufEnd); + void relocateAlloc(uint8_t *Buf, uint8_t *BufEnd); + template void relocateNonAlloc(uint8_t *Buf, uint8_t *BufEnd); std::vector Relocations; Modified: vendor/lld/dist/ELF/LinkerScript.cpp ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.cpp Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/ELF/LinkerScript.cpp Mon May 22 19:44:12 2017 (r318671) @@ -440,9 +440,6 @@ void LinkerScript::fabricateDefaultComma // For each OutputSection that needs a VA fabricate an OutputSectionCommand // with an InputSectionDescription describing the InputSections for (OutputSection *Sec : *OutputSections) { - if (!(Sec->Flags & SHF_ALLOC)) - continue; - auto *OSCmd = make(Sec->Name); OSCmd->Sec = Sec; SecToCommand[Sec] = OSCmd; Modified: vendor/lld/dist/ELF/MapFile.cpp ============================================================================== --- vendor/lld/dist/ELF/MapFile.cpp Mon May 22 19:44:10 2017 (r318670) +++ vendor/lld/dist/ELF/MapFile.cpp Mon May 22 19:44:12 2017 (r318671) @@ -21,6 +21,8 @@ #include "MapFile.h" #include "InputFiles.h" +#include "LinkerScript.h" +#include "OutputSections.h" #include "Strings.h" #include "SymbolTable.h" #include "Threads.h" @@ -98,7 +100,7 @@ getSymbolStrings(ArrayRef -void elf::writeMapFile(ArrayRef OutputSections) { +void elf::writeMapFile(llvm::ArrayRef Script) { if (Config->MapFile.empty()) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 22 19:57:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAAF1D79122; Mon, 22 May 2017 19:57:21 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8DC81DF1; Mon, 22 May 2017 19:57:21 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJvK1g081648; Mon, 22 May 2017 19:57:20 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJvKrb081647; Mon, 22 May 2017 19:57:20 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705221957.v4MJvKrb081647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 19:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318675 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:57:22 -0000 Author: rmacklem Date: Mon May 22 19:57:20 2017 New Revision: 318675 URL: https://svnweb.freebsd.org/changeset/base/318675 Log: MFC: r317906 Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). When sosend() replies ERESTART in the client side krpc, it indicates that the RPC message hasn't yet been sent and that the send queue is full or locked while a signal is posted for the process. Without this patch, this would result in a RPC_CANTSEND reply from clnt_vc_call(), which would cause clnt_reconnect_call() to create a new TCP transport connection. For most NFS servers, this wasn't a serious problem, although it did imply retries of outstanding RPCs, which could possibly have missed the DRC. For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since AmazonEFS often didn't retain the NFSv4.1 session and would reply with NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which requires open/lock state recovery. Three options were considered to fix this: - Return the ERESTART all the way up to the system call boundary and then have the system call redone. This is fraught with risk, due to convoluted code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it is still a work in prgress and may not be feasible. - Set SB_NOINTR for the socket buffer. This fixes the problem, but makes the sosend() completely non interruptible, which kib@ considered inappropriate. It also would break forced dismount when a thread was blocked in sosend(). - Modify the retry loop in clnt_vc_call(), so that it loops for this case for up to 15sec. Testing showed that the sosend() usually succeeded by the 2nd retry. The extreme case observed was 111 loop iterations, or about 100msec of delay. This third alternative is what is implemented in this patch, since the change is: - localized - straightforward - forced dismount is not broken by it. This patch has been tested by cperciva@ extensively against AmazonEFS. Modified: stable/10/sys/rpc/clnt_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/clnt_vc.c ============================================================================== --- stable/10/sys/rpc/clnt_vc.c Mon May 22 19:44:26 2017 (r318674) +++ stable/10/sys/rpc/clnt_vc.c Mon May 22 19:57:20 2017 (r318675) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,6 +108,8 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); +static int fake_wchan; + /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. @@ -298,7 +301,7 @@ clnt_vc_call( uint32_t xid; struct mbuf *mreq = NULL, *results; struct ct_request *cr; - int error; + int error, trycnt; cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); @@ -328,8 +331,20 @@ clnt_vc_call( timeout = ct->ct_wait; /* use default timeout */ } + /* + * After 15sec of looping, allow it to return RPC_CANTSEND, which will + * cause the clnt_reconnect layer to create a new TCP connection. + */ + trycnt = 15 * hz; call_again: mtx_assert(&ct->ct_lock, MA_OWNED); + if (ct->ct_closing || ct->ct_closed) { + ct->ct_threads--; + wakeup(ct); + mtx_unlock(&ct->ct_lock); + free(cr, M_RPC); + return (RPC_CANTSEND); + } ct->ct_xid++; xid = ct->ct_xid; @@ -397,13 +412,16 @@ call_again: */ error = sosend(ct->ct_socket, NULL, NULL, mreq, NULL, 0, curthread); mreq = NULL; - if (error == EMSGSIZE) { + if (error == EMSGSIZE || (error == ERESTART && + (ct->ct_waitflag & PCATCH) == 0 && trycnt-- > 0)) { SOCKBUF_LOCK(&ct->ct_socket->so_snd); sbwait(&ct->ct_socket->so_snd); SOCKBUF_UNLOCK(&ct->ct_socket->so_snd); AUTH_VALIDATE(auth, xid, NULL, NULL); mtx_lock(&ct->ct_lock); TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); + /* Sleep for 1 clock tick before trying the sosend() again. */ + msleep(&fake_wchan, &ct->ct_lock, 0, "rpclpsnd", 1); goto call_again; } From owner-svn-src-all@freebsd.org Mon May 22 19:57:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53690D79155; Mon, 22 May 2017 19:57:30 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22D0D1E43; Mon, 22 May 2017 19:57:30 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJvTYP081700; Mon, 22 May 2017 19:57:29 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJvTJC081699; Mon, 22 May 2017 19:57:29 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705221957.v4MJvTJC081699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 22 May 2017 19:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318676 - head/sys/dev/qlnx/qlnxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:57:30 -0000 Author: davidcs Date: Mon May 22 19:57:28 2017 New Revision: 318676 URL: https://svnweb.freebsd.org/changeset/base/318676 Log: Check for IPV6 TCP/UDP CSUM offload in pkt header during transmits. Submitted by:Shminderjit.Singh@cavium.com Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- head/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:57:20 2017 (r318675) +++ head/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:57:28 2017 (r318676) @@ -2946,7 +2946,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f (1 << ETH_TX_1ST_BD_FLAGS_IP_CSUM_SHIFT); } - if (m_head->m_pkthdr.csum_flags & (CSUM_UDP | CSUM_TCP)) { + if (m_head->m_pkthdr.csum_flags & + (CSUM_UDP | CSUM_TCP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6)) { first_bd->data.bd_flags.bitfields |= (1 << ETH_TX_1ST_BD_FLAGS_L4_CSUM_SHIFT); } From owner-svn-src-all@freebsd.org Mon May 22 20:00:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B224AD79203; Mon, 22 May 2017 20:00:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72F2710B6; Mon, 22 May 2017 20:00:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MK02UH081907; Mon, 22 May 2017 20:00:02 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MK02BJ081903; Mon, 22 May 2017 20:00:02 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201705222000.v4MK02BJ081903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 22 May 2017 20:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318677 - in head/sys: compat/ndis dev/if_ndis X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 20:00:03 -0000 Author: glebius Date: Mon May 22 20:00:01 2017 New Revision: 318677 URL: https://svnweb.freebsd.org/changeset/base/318677 Log: Fix regression in ndis(4) after r286410. This adds a bunch of checks for whether this is a Ethernet or 802.11 device and does proper dereferencing. PR: 213237 Submitted by: MFC after: 2 weeks Modified: head/sys/compat/ndis/kern_ndis.c head/sys/compat/ndis/subr_ndis.c head/sys/dev/if_ndis/if_ndis.c head/sys/dev/if_ndis/if_ndisvar.h Modified: head/sys/compat/ndis/kern_ndis.c ============================================================================== --- head/sys/compat/ndis/kern_ndis.c Mon May 22 19:57:28 2017 (r318676) +++ head/sys/compat/ndis/kern_ndis.c Mon May 22 20:00:01 2017 (r318677) @@ -210,8 +210,8 @@ ndis_status_func(adapter, status, sbuf, block = adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - ifp = sc->ifp; - if (ifp->if_flags & IFF_DEBUG) + ifp = NDISUSB_GET_IFNET(sc); + if ( ifp && ifp->if_flags & IFF_DEBUG) device_printf(sc->ndis_dev, "status: %x\n", status); } @@ -225,8 +225,8 @@ ndis_statusdone_func(adapter) block = adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - ifp = sc->ifp; - if (ifp->if_flags & IFF_DEBUG) + ifp = NDISUSB_GET_IFNET(sc); + if (ifp && ifp->if_flags & IFF_DEBUG) device_printf(sc->ndis_dev, "status complete\n"); } @@ -264,9 +264,9 @@ ndis_resetdone_func(ndis_handle adapter, block = adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - ifp = sc->ifp; + ifp = NDISUSB_GET_IFNET(sc); - if (ifp->if_flags & IFF_DEBUG) + if (ifp && ifp->if_flags & IFF_DEBUG) device_printf(sc->ndis_dev, "reset done...\n"); KeSetEvent(&block->nmb_resetevent, IO_NO_INCREMENT, FALSE); } @@ -285,6 +285,9 @@ ndis_create_sysctls(arg) return (EINVAL); sc = arg; + /* + device_printf(sc->ndis_dev, "ndis_create_sysctls() sc=%p\n", sc); + */ vals = sc->ndis_regvals; TAILQ_INIT(&sc->ndis_cfglist_head); @@ -698,8 +701,8 @@ ndis_ptom(m0, p) */ eh = mtod((*m0), struct ether_header *); - ifp = ((struct ndis_softc *)p->np_softc)->ifp; - if (totlen > ETHER_MAX_FRAME(ifp, eh->ether_type, FALSE)) { + ifp = NDISUSB_GET_IFNET((struct ndis_softc *)p->np_softc); + if (ifp && totlen > ETHER_MAX_FRAME(ifp, eh->ether_type, FALSE)) { diff = totlen - ETHER_MAX_FRAME(ifp, eh->ether_type, FALSE); totlen -= diff; m->m_len -= diff; Modified: head/sys/compat/ndis/subr_ndis.c ============================================================================== --- head/sys/compat/ndis/subr_ndis.c Mon May 22 19:57:28 2017 (r318676) +++ head/sys/compat/ndis/subr_ndis.c Mon May 22 20:00:01 2017 (r318677) @@ -626,6 +626,9 @@ NdisReadConfiguration(status, parm, cfg, block = (ndis_miniport_block *)cfg; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); + /* + device_printf(sc->ndis_dev, "NdisReadConfiguration sc=%p\n", sc); + */ if (key->us_len == 0 || key->us_buf == NULL) { *status = NDIS_STATUS_FAILURE; @@ -984,7 +987,7 @@ NdisWriteErrorLogEntry(ndis_handle adapt dev = block->nmb_physdeviceobj->do_devext; drv = block->nmb_deviceobj->do_drvobj; sc = device_get_softc(dev); - ifp = sc->ifp; + ifp = NDISUSB_GET_IFNET(sc); if (ifp != NULL && ifp->if_flags & IFF_DEBUG) { error = pe_get_message((vm_offset_t)drv->dro_driverstart, @@ -1304,17 +1307,19 @@ NdisReadNetworkAddress(status, addr, add ndis_handle adapter; { struct ndis_softc *sc; + struct ifnet *ifp; ndis_miniport_block *block; uint8_t empty[] = { 0, 0, 0, 0, 0, 0 }; block = (ndis_miniport_block *)adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - if (sc->ifp == NULL) { + ifp = NDISUSB_GET_IFNET(sc); + if (ifp == NULL) { *status = NDIS_STATUS_FAILURE; return; } - if (sc->ifp->if_addr == NULL || + if (ifp->if_addr == NULL || bcmp(IF_LLADDR(sc->ifp), empty, ETHER_ADDR_LEN) == 0) *status = NDIS_STATUS_FAILURE; else { Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Mon May 22 19:57:28 2017 (r318676) +++ head/sys/dev/if_ndis/if_ndis.c Mon May 22 20:00:01 2017 (r318677) @@ -147,7 +147,7 @@ static funcptr ndis_rxeof_xfr_done_wrap; static funcptr ndis_linksts_wrap; static funcptr ndis_linksts_done_wrap; static funcptr ndis_ticktask_wrap; -static funcptr ndis_starttask_wrap; +static funcptr ndis_ifstarttask_wrap; static funcptr ndis_resettask_wrap; static funcptr ndis_inputtask_wrap; @@ -162,11 +162,11 @@ static int ndis_raw_xmit (struct ieee802 const struct ieee80211_bpf_params *); static void ndis_update_mcast (struct ieee80211com *); static void ndis_update_promisc (struct ieee80211com *); -static void ndis_start (struct ifnet *); -static void ndis_starttask (device_object *, void *); +static void ndis_ifstart (struct ifnet *); +static void ndis_ifstarttask (device_object *, void *); static void ndis_resettask (device_object *, void *); static void ndis_inputtask (device_object *, void *); -static int ndis_ioctl (struct ifnet *, u_long, caddr_t); +static int ndis_ifioctl (struct ifnet *, u_long, caddr_t); static int ndis_newstate (struct ieee80211vap *, enum ieee80211_state, int); static int ndis_nettype_chan (uint32_t); @@ -246,7 +246,7 @@ ndisdrv_modevent(mod, cmd, arg) &ndis_linksts_done_wrap, 1, WINDRV_WRAP_STDCALL); windrv_wrap((funcptr)ndis_ticktask, &ndis_ticktask_wrap, 2, WINDRV_WRAP_STDCALL); - windrv_wrap((funcptr)ndis_starttask, &ndis_starttask_wrap, + windrv_wrap((funcptr)ndis_ifstarttask, &ndis_ifstarttask_wrap, 2, WINDRV_WRAP_STDCALL); windrv_wrap((funcptr)ndis_resettask, &ndis_resettask_wrap, 2, WINDRV_WRAP_STDCALL); @@ -268,7 +268,7 @@ ndisdrv_modevent(mod, cmd, arg) windrv_unwrap(ndis_linksts_wrap); windrv_unwrap(ndis_linksts_done_wrap); windrv_unwrap(ndis_ticktask_wrap); - windrv_unwrap(ndis_starttask_wrap); + windrv_unwrap(ndis_ifstarttask_wrap); windrv_unwrap(ndis_resettask_wrap); windrv_unwrap(ndis_inputtask_wrap); break; @@ -292,11 +292,14 @@ ndis_setmulti(sc) int len, mclistsz, error; uint8_t *mclist; - ifp = sc->ifp; if (!NDIS_INITIALIZED(sc)) return; + if (sc->ndis_80211) + return; + + ifp = sc->ifp; if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { sc->ndis_filter |= NDIS_PACKET_TYPE_ALL_MULTICAST; len = sizeof(sc->ndis_filter); @@ -368,13 +371,14 @@ ndis_set_offload(sc) struct ifnet *ifp; int len, error; - ifp = sc->ifp; - if (!NDIS_INITIALIZED(sc)) return (EINVAL); + if (sc->ndis_80211) + return (EINVAL); /* See if there's anything to set. */ + ifp = sc->ifp; error = ndis_probe_offload(sc); if (error) return (error); @@ -965,8 +969,8 @@ ndis_ifattach(struct ndis_softc *sc) if_initname(ifp, device_get_name(sc->ndis_dev), device_get_unit(sc->ndis_dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_ioctl = ndis_ioctl; - ifp->if_start = ndis_start; + ifp->if_ioctl = ndis_ifioctl; + ifp->if_start = ndis_ifstart; ifp->if_init = ndis_init; ifp->if_baudrate = 10000000; IFQ_SET_MAXLEN(&ifp->if_snd, 50); @@ -1560,19 +1564,23 @@ ndis_txeof(adapter, packet, status) sc->ndis_txarray[idx] = NULL; sc->ndis_txpending++; - if (status == NDIS_STATUS_SUCCESS) - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - else - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - + if (!sc->ndis_80211) { + struct ifnet *ifp = sc->ifp; + if (status == NDIS_STATUS_SUCCESS) + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + else + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + } sc->ndis_tx_timer = 0; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; NDIS_UNLOCK(sc); - IoQueueWorkItem(sc->ndis_startitem, - (io_workitem_func)ndis_starttask_wrap, - WORKQUEUE_CRITICAL, ifp); + if (!sc->ndis_80211) + IoQueueWorkItem(sc->ndis_startitem, + (io_workitem_func)ndis_ifstarttask_wrap, + WORKQUEUE_CRITICAL, sc); + DPRINTF(("%s: ndis_ifstarttask_wrap sc=%p\n", __func__, sc)); } static void @@ -1635,9 +1643,10 @@ ndis_linksts_done(adapter) IoQueueWorkItem(sc->ndis_tickitem, (io_workitem_func)ndis_ticktask_wrap, WORKQUEUE_CRITICAL, sc); - IoQueueWorkItem(sc->ndis_startitem, - (io_workitem_func)ndis_starttask_wrap, - WORKQUEUE_CRITICAL, ifp); + if (!sc->ndis_80211) + IoQueueWorkItem(sc->ndis_startitem, + (io_workitem_func)ndis_ifstarttask_wrap, + WORKQUEUE_CRITICAL, sc); break; case NDIS_STATUS_MEDIA_DISCONNECT: if (sc->ndis_link) @@ -1672,9 +1681,10 @@ ndis_tick(xsc) IoQueueWorkItem(sc->ndis_resetitem, (io_workitem_func)ndis_resettask_wrap, WORKQUEUE_CRITICAL, sc); - IoQueueWorkItem(sc->ndis_startitem, - (io_workitem_func)ndis_starttask_wrap, - WORKQUEUE_CRITICAL, sc->ifp); + if (!sc->ndis_80211) + IoQueueWorkItem(sc->ndis_startitem, + (io_workitem_func)ndis_ifstarttask_wrap, + WORKQUEUE_CRITICAL, sc); } callout_reset(&sc->ndis_stat_callout, hz, ndis_tick, sc); @@ -1796,16 +1806,16 @@ ndis_update_promisc(struct ieee80211com } static void -ndis_starttask(d, arg) - device_object *d; - void *arg; +ndis_ifstarttask(device_object *d, void *arg) { - struct ifnet *ifp; - - ifp = arg; + struct ndis_softc *sc = arg; + DPRINTF(("%s: sc=%p, ifp=%p\n", __func__, sc, sc->ifp)); + if (sc->ndis_80211) + return; + struct ifnet *ifp = sc->ifp; if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - ndis_start(ifp); + ndis_ifstart(ifp); } /* @@ -1821,8 +1831,7 @@ ndis_starttask(d, arg) * will do the mapping themselves on a buffer by buffer basis. */ static void -ndis_start(ifp) - struct ifnet *ifp; +ndis_ifstart(struct ifnet *ifp) { struct ndis_softc *sc; struct mbuf *m = NULL; @@ -2880,7 +2889,7 @@ ndis_getstate_80211(struct ndis_softc *s } static int -ndis_ioctl(ifp, command, data) +ndis_ifioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; Modified: head/sys/dev/if_ndis/if_ndisvar.h ============================================================================== --- head/sys/dev/if_ndis/if_ndisvar.h Mon May 22 19:57:28 2017 (r318676) +++ head/sys/dev/if_ndis/if_ndisvar.h Mon May 22 20:00:01 2017 (r318677) @@ -152,6 +152,7 @@ struct ndisusb_task { }; struct ndis_softc { +#define NDISUSB_GET_IFNET(ndis_softc) ( (ndis_softc)->ndis_80211 ? NULL : (ndis_softc)->ifp ) u_int ndis_80211:1, ndis_link:1, ndis_running:1; From owner-svn-src-all@freebsd.org Mon May 22 20:11:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27237D79776; Mon, 22 May 2017 20:11:42 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED4B91A62; Mon, 22 May 2017 20:11:41 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MKBf3g087345; Mon, 22 May 2017 20:11:41 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MKBf4v087344; Mon, 22 May 2017 20:11:41 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201705222011.v4MKBf4v087344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Mon, 22 May 2017 20:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318678 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 20:11:42 -0000 Author: oshogbo Date: Mon May 22 20:11:40 2017 New Revision: 318678 URL: https://svnweb.freebsd.org/changeset/base/318678 Log: Replacing iterating over rootpath by strsep(3). Submitted by: kczekirda Reviewed by: tsoome, bapt, jhb, oshogbo MFC after: 3 weeks Sponsored by: Oktawave Differential Revision: https://reviews.freebsd.org/D10726 Modified: head/sys/boot/common/dev_net.c Modified: head/sys/boot/common/dev_net.c ============================================================================== --- head/sys/boot/common/dev_net.c Mon May 22 20:00:01 2017 (r318677) +++ head/sys/boot/common/dev_net.c Mon May 22 20:11:40 2017 (r318678) @@ -387,16 +387,14 @@ net_print(int verbose) uint32_t net_parse_rootpath() { - int i; n_long addr = INADDR_NONE; + char *ptr; - for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) - if (rootpath[i] == ':') - break; - if (i && i != FNAME_SIZE && rootpath[i] == ':') { - rootpath[i++] = '\0'; - addr = inet_addr(&rootpath[0]); - bcopy(&rootpath[i], rootpath, strlen(&rootpath[i])+1); + ptr = rootpath; + (void)strsep(&ptr, ":"); + if (ptr != NULL) { + addr = inet_addr(rootpath); + bcopy(ptr, rootpath, strlen(ptr) + 1); } return (addr); From owner-svn-src-all@freebsd.org Mon May 22 20:27:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15ED5D79BE6; Mon, 22 May 2017 20:27:31 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA9721359; Mon, 22 May 2017 20:27:30 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MKRT9X093901; Mon, 22 May 2017 20:27:29 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MKRTxn093900; Mon, 22 May 2017 20:27:29 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201705222027.v4MKRTxn093900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Mon, 22 May 2017 20:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318679 - head/sys/dev/mpr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 20:27:31 -0000 Author: slm Date: Mon May 22 20:27:29 2017 New Revision: 318679 URL: https://svnweb.freebsd.org/changeset/base/318679 Log: Fix powerpc compiler error. Approved by: ken Modified: head/sys/dev/mpr/mpr_sas.c Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Mon May 22 20:11:40 2017 (r318678) +++ head/sys/dev/mpr/mpr_sas.c Mon May 22 20:27:29 2017 (r318679) @@ -1836,8 +1836,8 @@ mprsas_build_nvme_unmap(struct mpr_softc mprsas_log_command(cm, MPR_XINFO, "%s cm %p ccb %p outstanding %u\n", __func__, cm, ccb, targ->outstanding); - mpr_build_nvme_prp(sc, cm, req, (void *)nvme_dsm_ranges_dma_handle, 0, - data_length); + mpr_build_nvme_prp(sc, cm, req, + (void *)(uintptr_t)nvme_dsm_ranges_dma_handle, 0, data_length); mpr_map_command(sc, cm); out: From owner-svn-src-all@freebsd.org Mon May 22 20:29:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44FB5D79C55 for ; Mon, 22 May 2017 20:29:27 +0000 (UTC) (envelope-from stephen.mcconnell@broadcom.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11EE31527 for ; Mon, 22 May 2017 20:29:27 +0000 (UTC) (envelope-from stephen.mcconnell@broadcom.com) Received: by mail-io0-x231.google.com with SMTP id k91so88909058ioi.1 for ; Mon, 22 May 2017 13:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:references:in-reply-to:mime-version:thread-index:date :message-id:subject:to:cc; bh=riO8lwV1mz4TISaekgdQh115eQuqZJErkBAdoxyMg8g=; b=ffQ17FPlgxDpHB72Cz5ugvbTfpSjR9XXRNC3bocbNRsedSTKeIzjNNm0ajNG5oLF3W wU9Cc0tM3TQgUvMApk1D/+aaisVr0OiUyLJlzSumA2miYdhYwXFkTzHNvJyN5MqHQxWr YCw7L32JHt37IlFV1N8iMAR++KSo06FTM0Lzs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc; bh=riO8lwV1mz4TISaekgdQh115eQuqZJErkBAdoxyMg8g=; b=OpAUm9hyBSQ6OvTkU11u1c2SpdVKYuT96MDZbpSfiS6S+4w+EVvxV4chYFQwNs9oGu Y54Gl/Q+NwjQTYmtpMLBflsDq4F3oF5EXXBSYf3A0yY7a+jrLgL6w9Q+rhQ5KqVC4Ee2 UqC1q7s/fxp1azrVyqXilerxAQfPiqErnlTvd92bO+XQIJVMqK0IrzOHAOwGGYu7BCuY Fpvcny5zSZAx4Jt5wKvGbcmX82g3XshO2oaJhA6TQIN01u0AVgNwhgXILADylI3XLrSw 1hfQExyBU6HFCEAKRsYkVAqdZGC9wVCoJ4QIMKUyzUz/NKEW/VR6yQCUQIUcnATHgzMd rV5g== X-Gm-Message-State: AODbwcB7zdvdvOLwwNvRWbND39W2SIpxhZaNsohYDFBBuMEPvwzDkuas nkjLGTNZiKe5UQ6lIwNbetVSB3xGVo/i X-Received: by 10.107.181.68 with SMTP id e65mr28425004iof.156.1495484966497; Mon, 22 May 2017 13:29:26 -0700 (PDT) From: Stephen Mcconnell References: <201705172133.v4HLXbi6044710@repo.freebsd.org> <20170522145719.GS1622@kib.kiev.ua> In-Reply-To: <20170522145719.GS1622@kib.kiev.ua> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIMtlBOfE3fpeKohkny3vGsD68sXQDlJpdooYXeRkA= Date: Mon, 22 May 2017 14:29:43 -0600 Message-ID: <3aaaee191edfb5b860fa24d247ef21fb@mail.gmail.com> Subject: RE: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi To: Konstantin Belousov , Stephen McConnell Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 20:29:27 -0000 > -----Original Message----- > From: Konstantin Belousov [mailto:kostikbel@gmail.com] > Sent: Monday, May 22, 2017 8:57 AM > To: Stephen McConnell > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr > sys/dev/mpr/mpi > > On Wed, May 17, 2017 at 09:33:37PM +0000, Stephen McConnell wrote: > > Author: slm > > Date: Wed May 17 21:33:37 2017 > > New Revision: 318427 > > URL: https://svnweb.freebsd.org/changeset/base/318427 > > > > Log: > > Add tri-mode support (SAS/SATA/PCIe). > > > > This includes NVMe device support and adds support for the following > adapters: > > SAS 3408 > > SAS 3416 > > SAS 3508 > > SAS 3516 > > SAS 3616 > > SAS 3708 > > SAS 3716 > > > > Reviewed by: ken, scottl, asomers, mav > > Approved by: ken, scottl, mav > > MFC after: 2 weeks > > Relnotes: yes > > Differential Revision: https://reviews.freebsd.org/D10095 > > It seems that this commit causes the following compilation issue: > > cc1: warnings being treated as errors > /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c: In function > 'mprsas_build_nvme_unm > ap': > /scratch/tmp/kib/ino64/sys/dev/mpr/mpr_sas.c:1839: warning: cast to pointer > from integer of different size [-Wint-to-pointer-cast] > --- mpr_sas.o --- > *** [mpr_sas.o] Error code 1 > > at least on powerpc. Fixed in r318679 From owner-svn-src-all@freebsd.org Mon May 22 20:34:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB4CED79E8F; Mon, 22 May 2017 20:34:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C85CA19C0; Mon, 22 May 2017 20:34:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MKYpmn097921; Mon, 22 May 2017 20:34:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MKYpGO097918; Mon, 22 May 2017 20:34:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705222034.v4MKYpGO097918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 22 May 2017 20:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318680 - in head/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/proc usr.sbin/dtrace/tests/common/proc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 20:34:53 -0000 Author: markj Date: Mon May 22 20:34:51 2017 New Revision: 318680 URL: https://svnweb.freebsd.org/changeset/base/318680 Log: Add a little helper program for tst.exitcore.ksh. sleep(1) is capsicumized, which means that we cannot rely on it to dump core as required by the test. MFC after: 1 week Sponsored by: Dell EMC Isilon Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c (contents, props changed) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c Mon May 22 20:34:51 2017 (r318680) @@ -0,0 +1,36 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2017 Mark Johnston + */ + +#include + +int +main(int argc, char **argv) +{ + + for (;;) + sleep(1); + + return (0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh Mon May 22 20:27:29 2017 (r318679) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh Mon May 22 20:34:51 2017 (r318680) @@ -52,7 +52,7 @@ script() /curpsinfo->pr_ppid == $child && execargs == "$longsleep" && args[0] != CLD_DUMPED/ { - printf("Child process could did dump core."); + printf("Child process could not dump core."); exit(1); } EOF @@ -62,10 +62,9 @@ sleeper() { while true; do $longsleep & - /bin/sleep 1 + /bin/sleep 1 kill -SEGV $! done - /bin/rm -f $corefile } if [ $# != 1 ]; then @@ -74,8 +73,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -longsleep="/bin/sleep 10000" -corefile=/tmp/sleep.core +longsleep="./tst.exitcore.exe" sleeper & child=$! @@ -83,10 +81,6 @@ child=$! script status=$? -#pstop $child -#pkill -P $child kill $child -#prun $child -/bin/rm -f $corefile exit $status Modified: head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Mon May 22 20:27:29 2017 (r318679) +++ head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Mon May 22 20:34:51 2017 (r318680) @@ -23,6 +23,7 @@ TESTEXES= \ CFILES= \ + tst.exitcore.c \ tst.sigwait.c \ From owner-svn-src-all@freebsd.org Mon May 22 21:41:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79CF1D785F0; Mon, 22 May 2017 21:41:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 499A31CEF; Mon, 22 May 2017 21:41:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MLfYZr025579; Mon, 22 May 2017 21:41:34 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MLfYTG025578; Mon, 22 May 2017 21:41:34 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705222141.v4MLfYTG025578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 21:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318682 - stable/11/sbin/mount_nfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 21:41:35 -0000 Author: rmacklem Date: Mon May 22 21:41:34 2017 New Revision: 318682 URL: https://svnweb.freebsd.org/changeset/base/318682 Log: MFC: r317931 Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts. The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871 modified umount so that it doesn't remove any entry created by mount_nfs. Modified: stable/11/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mount_nfs/mount_nfs.c ============================================================================== --- stable/11/sbin/mount_nfs/mount_nfs.c Mon May 22 21:17:44 2017 (r318681) +++ stable/11/sbin/mount_nfs/mount_nfs.c Mon May 22 21:41:34 2017 (r318682) @@ -651,7 +651,7 @@ getnfsargs(char *spec, struct iovec **io build_iovec(iov, iovlen, "hostname", nam, (size_t)-1); /* Add mounted file system to PATH_MOUNTTAB */ - if (!add_mtab(hostp, spec)) + if (mountmode != V4 && !add_mtab(hostp, spec)) warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec); return (1); } From owner-svn-src-all@freebsd.org Mon May 22 21:52:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A3E0D78991; Mon, 22 May 2017 21:52:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDDB1149B; Mon, 22 May 2017 21:52:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MLq6os030319; Mon, 22 May 2017 21:52:06 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MLq6hQ030318; Mon, 22 May 2017 21:52:06 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705222152.v4MLq6hQ030318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 21:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318683 - stable/10/sbin/mount_nfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 21:52:08 -0000 Author: rmacklem Date: Mon May 22 21:52:06 2017 New Revision: 318683 URL: https://svnweb.freebsd.org/changeset/base/318683 Log: MFC: r317931 Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts. The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871 modified umount so that it doesn't remove any entry created by mount_nfs. Modified: stable/10/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_nfs/mount_nfs.c ============================================================================== --- stable/10/sbin/mount_nfs/mount_nfs.c Mon May 22 21:41:34 2017 (r318682) +++ stable/10/sbin/mount_nfs/mount_nfs.c Mon May 22 21:52:06 2017 (r318683) @@ -650,7 +650,7 @@ getnfsargs(char *spec, struct iovec **io build_iovec(iov, iovlen, "hostname", nam, (size_t)-1); /* Add mounted file system to PATH_MOUNTTAB */ - if (!add_mtab(hostp, spec)) + if (mountmode != V4 && !add_mtab(hostp, spec)) warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec); return (1); } From owner-svn-src-all@freebsd.org Mon May 22 22:02:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 620D4D78A7A; Mon, 22 May 2017 22:02:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26F141A22; Mon, 22 May 2017 22:02:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MM27rx034239; Mon, 22 May 2017 22:02:07 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MM27cK034238; Mon, 22 May 2017 22:02:07 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705222202.v4MM27cK034238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 22:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318684 - stable/11/sys/fs/nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 22:02:08 -0000 Author: rmacklem Date: Mon May 22 22:02:06 2017 New Revision: 318684 URL: https://svnweb.freebsd.org/changeset/base/318684 Log: MFC: r318287 Make nfscl_mtofh() return ENXIO when *nfhpp == NULL. r317272 introduced a case where nfscl_mtofh() could return 0 when *nfhpp is NULL. This patch makes it return ENXIO for this case. Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 21:52:06 2017 (r318683) +++ stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 22:02:06 2017 (r318684) @@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, s if (*++tl != 0) { nd->nd_flag |= ND_NOMOREDATA; flag = 0; + error = ENXIO; /* Return ENXIO so *nfhpp isn't used. */ } } if (flag) { From owner-svn-src-all@freebsd.org Mon May 22 22:10:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6E5CD78D09; Mon, 22 May 2017 22:10:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A67891CAD; Mon, 22 May 2017 22:10:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MMA2rm034570; Mon, 22 May 2017 22:10:02 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MMA2xV034569; Mon, 22 May 2017 22:10:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705222210.v4MMA2xV034569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 22:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318685 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 22:10:04 -0000 Author: rmacklem Date: Mon May 22 22:10:02 2017 New Revision: 318685 URL: https://svnweb.freebsd.org/changeset/base/318685 Log: MFC: r318287 Make nfscl_mtofh() return ENXIO when *nfhpp == NULL. r317272 introduced a case where nfscl_mtofh() could return 0 when *nfhpp is NULL. This patch makes it return ENXIO for this case. Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 22:02:06 2017 (r318684) +++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 22:10:02 2017 (r318685) @@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, s if (*++tl != 0) { nd->nd_flag |= ND_NOMOREDATA; flag = 0; + error = ENXIO; /* Return ENXIO so *nfhpp isn't used. */ } } if (flag) { From owner-svn-src-all@freebsd.org Mon May 22 23:17:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDA40D79C0B; Mon, 22 May 2017 23:17:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2B9E1D0B; Mon, 22 May 2017 23:17:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MNHtr1063638; Mon, 22 May 2017 23:17:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MNHtwY063637; Mon, 22 May 2017 23:17:55 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705222317.v4MNHtwY063637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 22 May 2017 23:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318686 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 23:17:57 -0000 Author: pfg Date: Mon May 22 23:17:55 2017 New Revision: 318686 URL: https://svnweb.freebsd.org/changeset/base/318686 Log: ndbm.h: Add a comment pointing out our non-compliance with POSIX. Changing it to full conformance breaks the ABI. Reference: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/ndbm.h.html Discussion at: https://reviews.freebsd.org/D10544 Modified: head/include/ndbm.h Modified: head/include/ndbm.h ============================================================================== --- head/include/ndbm.h Mon May 22 22:10:02 2017 (r318685) +++ head/include/ndbm.h Mon May 22 23:17:55 2017 (r318686) @@ -53,7 +53,7 @@ typedef struct { void *dptr; - int dsize; + int dsize; /* XXX Should be size_t according to 1003.1-2008. */ } datum; typedef DB DBM; From owner-svn-src-all@freebsd.org Mon May 22 23:21:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAACCD79C95; Mon, 22 May 2017 23:21:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A13B1F23; Mon, 22 May 2017 23:21:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MNLOQF063811; Mon, 22 May 2017 23:21:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MNLOvm063810; Mon, 22 May 2017 23:21:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705222321.v4MNLOvm063810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 22 May 2017 23:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318687 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 23:21:25 -0000 Author: markj Date: Mon May 22 23:21:24 2017 New Revision: 318687 URL: https://svnweb.freebsd.org/changeset/base/318687 Log: Ensure that the mappings table is populated in proc_objname(). MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Mon May 22 23:17:55 2017 (r318686) +++ head/lib/libproc/proc_sym.c Mon May 22 23:21:24 2017 (r318687) @@ -339,6 +339,9 @@ proc_objname(struct proc_handle *p, uint prmap_t *map; size_t i; + if (p->nmappings == 0) + if (proc_rdagent(p) == NULL) + return (NULL); for (i = 0; i < p->nmappings; i++) { map = &p->mappings[i].map; if (addr >= map->pr_vaddr && From owner-svn-src-all@freebsd.org Mon May 22 23:31:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FF2CD79FCC; Mon, 22 May 2017 23:31:29 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 700991519; Mon, 22 May 2017 23:31:29 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MNVSQd069973; Mon, 22 May 2017 23:31:28 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MNVSsR069972; Mon, 22 May 2017 23:31:28 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705222331.v4MNVSsR069972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Mon, 22 May 2017 23:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318688 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 23:31:29 -0000 Author: rpokala Date: Mon May 22 23:31:28 2017 New Revision: 318688 URL: https://svnweb.freebsd.org/changeset/base/318688 Log: "struct ata_params" field "reserved206[2]" actually starts at offset 20*7*. MFC after: 1 week Sponsored by: Panasas Modified: head/sys/sys/ata.h Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Mon May 22 23:21:24 2017 (r318687) +++ head/sys/sys/ata.h Mon May 22 23:31:28 2017 (r318688) @@ -263,7 +263,7 @@ struct ata_params { u_int16_t reserved170[6]; /*176*/ u_int8_t media_serial[60]; /*206*/ u_int16_t sct; - u_int16_t reserved206[2]; + u_int16_t reserved207[2]; /*209*/ u_int16_t lsalign; /*210*/ u_int16_t wrv_sectors_m3_1; u_int16_t wrv_sectors_m3_2; From owner-svn-src-all@freebsd.org Tue May 23 00:13:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75C76D78CC3; Tue, 23 May 2017 00:13:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52D1E160F; Tue, 23 May 2017 00:13:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N0DRqJ087543; Tue, 23 May 2017 00:13:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N0DRuo087542; Tue, 23 May 2017 00:13:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705230013.v4N0DRuo087542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 23 May 2017 00:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318689 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 00:13:28 -0000 Author: mav Date: Tue May 23 00:13:27 2017 New Revision: 318689 URL: https://svnweb.freebsd.org/changeset/base/318689 Log: Add parent interface reference counting to if_vlan. Using plain ifunit() looks like a request for troubles. MFC after: 1 week Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Mon May 22 23:31:28 2017 (r318688) +++ head/sys/net/if_vlan.c Tue May 23 00:13:27 2017 (r318689) @@ -474,6 +474,7 @@ trunk_destroy(struct ifvlantrunk *trunk) trunk->parent->if_vlantrunk = NULL; TRUNK_UNLOCK(trunk); TRUNK_LOCK_DESTROY(trunk); + if_rele(trunk->parent); free(trunk, M_VLAN); } @@ -848,16 +849,20 @@ vlan_clone_match_ethervid(const char *na if ((cp = strchr(ifname, '.')) == NULL) return (NULL); *cp = '\0'; - if ((ifp = ifunit(ifname)) == NULL) + if ((ifp = ifunit_ref(ifname)) == NULL) return (NULL); /* Parse VID. */ - if (*++cp == '\0') + if (*++cp == '\0') { + if_rele(ifp); return (NULL); + } vid = 0; for(; *cp >= '0' && *cp <= '9'; cp++) vid = (vid * 10) + (*cp - '0'); - if (*cp != '\0') + if (*cp != '\0') { + if_rele(ifp); return (NULL); + } if (vidp != NULL) *vidp = vid; @@ -890,7 +895,6 @@ vlan_clone_create(struct if_clone *ifc, int unit; int error; int vid; - int ethertag; struct ifvlan *ifv; struct ifnet *ifp; struct ifnet *p; @@ -915,23 +919,21 @@ vlan_clone_create(struct if_clone *ifc, error = copyin(params, &vlr, sizeof(vlr)); if (error) return error; - p = ifunit(vlr.vlr_parent); + p = ifunit_ref(vlr.vlr_parent); if (p == NULL) return (ENXIO); error = ifc_name2unit(name, &unit); - if (error != 0) + if (error != 0) { + if_rele(p); return (error); - - ethertag = 1; + } vid = vlr.vlr_tag; wildcard = (unit < 0); } else if ((p = vlan_clone_match_ethervid(name, &vid)) != NULL) { - ethertag = 1; unit = -1; wildcard = 0; } else { - ethertag = 0; - + p = NULL; error = ifc_name2unit(name, &unit); if (error != 0) return (error); @@ -940,8 +942,11 @@ vlan_clone_create(struct if_clone *ifc, } error = ifc_alloc_unit(ifc, &unit); - if (error != 0) + if (error != 0) { + if (p != NULL) + if_rele(p); return (error); + } /* In the wildcard case, we need to update the name. */ if (wildcard) { @@ -957,6 +962,8 @@ vlan_clone_create(struct if_clone *ifc, if (ifp == NULL) { ifc_free_unit(ifc, unit); free(ifv, M_VLAN); + if (p != NULL) + if_rele(p); return (ENOSPC); } SLIST_INIT(&ifv->vlan_mc_listhead); @@ -990,8 +997,9 @@ vlan_clone_create(struct if_clone *ifc, sdl = (struct sockaddr_dl *)ifa->ifa_addr; sdl->sdl_type = IFT_L2VLAN; - if (ethertag) { + if (p != NULL) { error = vlan_config(ifv, p, vid); + if_rele(p); if (error != 0) { /* * Since we've partially failed, we need to back @@ -1278,6 +1286,7 @@ vlan_config(struct ifvlan *ifv, struct i TRUNK_LOCK(trunk); p->if_vlantrunk = trunk; trunk->parent = p; + if_ref(trunk->parent); } else { VLAN_LOCK(); exists: @@ -1693,8 +1702,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd VLAN_LOCK(); if (TRUNK(ifv) != NULL) { p = PARENT(ifv); + if_ref(p); VLAN_UNLOCK(); error = (*p->if_ioctl)(p, SIOCGIFMEDIA, data); + if_rele(p); /* Limit the result to the parent's current config. */ if (error == 0) { struct ifmediareq *ifmr; @@ -1756,12 +1767,13 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd vlan_unconfig(ifp); break; } - p = ifunit(vlr.vlr_parent); + p = ifunit_ref(vlr.vlr_parent); if (p == NULL) { error = ENOENT; break; } error = vlan_config(ifv, p, vlr.vlr_tag); + if_rele(p); if (error) break; From owner-svn-src-all@freebsd.org Tue May 23 03:48:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4721DD79AF9; Tue, 23 May 2017 03:48:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16BCF14EE; Tue, 23 May 2017 03:48:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N3mhCB073159; Tue, 23 May 2017 03:48:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N3mhN1073158; Tue, 23 May 2017 03:48:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705230348.v4N3mhN1073158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 23 May 2017 03:48:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318690 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 03:48:44 -0000 Author: adrian Date: Tue May 23 03:48:42 2017 New Revision: 318690 URL: https://svnweb.freebsd.org/changeset/base/318690 Log: [arswitch] add phy debugging to the internal PHY read/write functions. Modified: head/sys/dev/etherswitch/arswitch/arswitch_phy.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_phy.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_phy.c Tue May 23 00:13:27 2017 (r318689) +++ head/sys/dev/etherswitch/arswitch/arswitch_phy.c Tue May 23 03:48:42 2017 (r318690) @@ -151,10 +151,20 @@ arswitch_readphy_internal(device_t dev, data = arswitch_readreg_lsb(dev, a) & AR8X16_MDIO_CTRL_DATA_MASK; ARSWITCH_UNLOCK(sc); + + DPRINTF(sc, ARSWITCH_DBG_PHYIO, + "%s: phy=0x%08x, reg=0x%08x, ret=0x%08x\n", + __func__, phy, reg, data); + return (data); fail: ARSWITCH_UNLOCK(sc); + + DPRINTF(sc, ARSWITCH_DBG_PHYIO, + "%s: phy=0x%08x, reg=0x%08x, fail; err=%d\n", + __func__, phy, reg, err); + return (-1); } @@ -194,6 +204,11 @@ arswitch_writephy_internal(device_t dev, } if (timeout < 0) err = EIO; + + DPRINTF(sc, ARSWITCH_DBG_PHYIO, + "%s: phy=0x%08x, reg=0x%08x, data=0x%08x, err=%d\n", + __func__, phy, reg, data, err); + out: DEVERR(dev, err, "arswitch_writephy()=%d: phy=%d.%02x\n", phy, reg); ARSWITCH_UNLOCK(sc); From owner-svn-src-all@freebsd.org Tue May 23 06:04:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7418D7964A; Tue, 23 May 2017 06:04:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A7E11878; Tue, 23 May 2017 06:04:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N64cNk045624; Tue, 23 May 2017 06:04:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N64cpT045623; Tue, 23 May 2017 06:04:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230604.v4N64cpT045623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 06:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318693 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:04:39 -0000 Author: ngie Date: Tue May 23 06:04:38 2017 New Revision: 318693 URL: https://svnweb.freebsd.org/changeset/base/318693 Log: Some minor style(9) fixes - Wrap at <80 columns. - Sort by type MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/part_wizard.c Tue May 23 04:14:34 2017 (r318692) +++ head/usr.sbin/bsdinstall/partedit/part_wizard.c Tue May 23 06:04:38 2017 (r318693) @@ -47,11 +47,12 @@ static char *boot_disk(struct gmesh *mes static char *wizard_partition(struct gmesh *mesh, const char *disk); int -part_wizard(const char *fsreq) { - int error; - struct gmesh mesh; +part_wizard(const char *fsreq) +{ char *disk, *schemeroot; const char *fstype; + struct gmesh mesh; + int error; if (fsreq != NULL) fstype = fsreq; @@ -199,9 +200,9 @@ wizard_partition(struct gmesh *mesh, con struct gclass *classp; struct ggeom *gpart = NULL; struct gconfig *gc; - char message[512]; - const char *scheme = NULL; char *retval = NULL; + const char *scheme = NULL; + char message[512]; int choice; LIST_FOREACH(classp, &mesh->lg_class, lg_class) @@ -295,15 +296,17 @@ query: } int -wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, int interactive) +wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, + int interactive) { - struct gmesh submesh; struct gclass *classp; struct ggeom *gp; struct gprovider *pp; - intmax_t swapsize, available; - char swapsizestr[10], rootsizestr[10], *fsname; char *fsnames[] = {"freebsd-ufs", "freebsd-zfs"}; + char *fsname; + struct gmesh submesh; + char swapsizestr[10], rootsizestr[10]; + intmax_t swapsize, available; int retval; if (strcmp(fstype, "zfs") == 0) { @@ -362,4 +365,3 @@ wizard_makeparts(struct gmesh *mesh, con return (0); } - From owner-svn-src-all@freebsd.org Tue May 23 06:05:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 775E3D796DA; Tue, 23 May 2017 06:05:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 496BA19F8; Tue, 23 May 2017 06:05:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N65sni045715; Tue, 23 May 2017 06:05:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N65sLh045714; Tue, 23 May 2017 06:05:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230605.v4N65sLh045714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 06:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318694 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:05:55 -0000 Author: ngie Date: Tue May 23 06:05:54 2017 New Revision: 318694 URL: https://svnweb.freebsd.org/changeset/base/318694 Log: style(9): sort headers MFC after: 2 weeks MFC with: r318693 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/part_wizard.c Tue May 23 06:04:38 2017 (r318693) +++ head/usr.sbin/bsdinstall/partedit/part_wizard.c Tue May 23 06:05:54 2017 (r318694) @@ -27,11 +27,10 @@ */ #include +#include #include -#include #include - -#include +#include #include #include From owner-svn-src-all@freebsd.org Tue May 23 06:14:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 004E2D7991D; Tue, 23 May 2017 06:14:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6D231E40; Tue, 23 May 2017 06:14:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N6E2Lo049548; Tue, 23 May 2017 06:14:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N6E2Yt049547; Tue, 23 May 2017 06:14:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230614.v4N6E2Yt049547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 06:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318695 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:14:04 -0000 Author: ngie Date: Tue May 23 06:14:02 2017 New Revision: 318695 URL: https://svnweb.freebsd.org/changeset/base/318695 Log: err(3): use `NULL`, aka `(void*)0` per POSIX instead of `(FILE *)0` This is being done to aid humans and static analysis checkers. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/err.c Modified: head/lib/libc/gen/err.c ============================================================================== --- head/lib/libc/gen/err.c Tue May 23 06:05:54 2017 (r318694) +++ head/lib/libc/gen/err.c Tue May 23 06:14:02 2017 (r318695) @@ -97,7 +97,7 @@ void verrc(int eval, int code, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { vfprintf(err_file, fmt, ap); @@ -122,7 +122,7 @@ void verrx(int eval, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) vfprintf(err_file, fmt, ap); @@ -162,7 +162,7 @@ void vwarnc(int code, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { vfprintf(err_file, fmt, ap); @@ -184,7 +184,7 @@ void vwarnx(const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) vfprintf(err_file, fmt, ap); From owner-svn-src-all@freebsd.org Tue May 23 06:20:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 024ACD79B97; Tue, 23 May 2017 06:20:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA897122F; Tue, 23 May 2017 06:20:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N6K6sX049847; Tue, 23 May 2017 06:20:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N6K6hT049845; Tue, 23 May 2017 06:20:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705230620.v4N6K6hT049845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 23 May 2017 06:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318696 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:20:08 -0000 Author: adrian Date: Tue May 23 06:20:06 2017 New Revision: 318696 URL: https://svnweb.freebsd.org/changeset/base/318696 Log: [ar71xx] add a very simple early boot driver called "caldata" to commit cross-layer atrocities. The (eventually) upcoming ath(4) changes will include being able to load ath(4) devices on the AHB bus (ie the on-die wifi part of the SoC) as modules. In order for this to happen, a copy of the calibration data needs to be copied away before the SPI driver runs or the memory map access hack won't work. Now, ideally (!) there'd be some driver that can come up after the MTD pieces (eg, SPI, NAND, etc) and load into a firmware chunk the calibration data. (Or, really really nicely, would be an actual async firmware API that would lead itself to having a driver schedule a file read - or a raw device read - to get to the calibration data.) Now, until all of the above is done - I'm going to perpetuate the layer breaking atrocity here by simply doing the PCI bus fixup EEPROM/calibration data hack here. This will work for any AR71xx (and later on, AR231x/AR531x) device, as well as the handful of QCA MIPS + QCA9880v2 802.11ac boards with NOR flash. To use, this goes into the kernel config: # Enable EEPROM hacks options AR71XX_ATH_EEPROM device ar71xx_caldata device firmware # This enables the ath_ahb driver (when I commit the change!) to # pull data out of the firmware hack. options ATH_EEPROM_FIRMWARE In the hints file: # ART calibration data mapping device hint.ar71xx_caldata.0.at="nexus0" hint.ar71xx_caldata.0.order=0 # Where the ART is - last 64k in the first 8MB of flash hint.ar71xx_caldata.0.map.0.ath_fixup_addr=0x1fff0000 hint.ar71xx_caldata.0.map.0.ath_fixup_size=16384 # And now tell the ath(4) driver where to look! hint.ath.0.eeprom_firmware="ar71xx_caldata.0.map.0.eeprom_firmware" Tested: * carambola2, AR933x SoC, using a set of ath and ath_hal modules to load TODO: * unify this bit of firmware loading code, as I will definitely need to include both the PCI bus firmware version (for PCI ID fixups too!) as well as AHB/on-chip calibration data. * Commit the ath_ahb bus code * Convert .. everything over. That'll take the majority of the time. Added: head/sys/mips/atheros/ar71xx_caldata.c (contents, props changed) Modified: head/sys/mips/atheros/files.ar71xx Added: head/sys/mips/atheros/ar71xx_caldata.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/ar71xx_caldata.c Tue May 23 06:20:06 2017 (r318696) @@ -0,0 +1,176 @@ +/*- + * Copyright (c) 2017, Adrian Chadd . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_ar71xx.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +struct ar71xx_caldata_softc { + device_t sc_dev; +}; + +static int +ar71xx_caldata_probe(device_t dev) +{ + + return (BUS_PROBE_NOWILDCARD); +} + +/* XXX TODO: unify with what's in ar71xx_fixup.c */ + +/* + * Create a calibration block from memory mapped SPI data for use by + * various drivers. Right now it's just ath(4) but later board support + * will include 802.11ac NICs with calibration data in NOR flash. + * + * (Yes, there are a handful of QCA MIPS boards with QCA9880v2 802.11ac chips + * with calibration data in flash..) + */ +static void +ar71xx_platform_create_cal_data(device_t dev, int id, long int flash_addr, + int size) +{ + char buf[64]; + uint16_t *cal_data = (uint16_t *) MIPS_PHYS_TO_KSEG1(flash_addr); + void *eeprom = NULL; + const struct firmware *fw = NULL; + + device_printf(dev, "EEPROM firmware: 0x%lx @ %d bytes\n", + flash_addr, size); + + eeprom = malloc(size, M_DEVBUF, M_WAITOK | M_ZERO); + if (! eeprom) { + device_printf(dev, "%s: malloc failed for '%s', aborting EEPROM\n", + __func__, buf); + return; + } + + memcpy(eeprom, cal_data, size); + + /* + * Generate a flash EEPROM 'firmware' from the given memory + * region. Since the SPI controller will eventually + * go into port-IO mode instead of memory-mapped IO + * mode, a copy of the EEPROM contents is required. + */ + + snprintf(buf, sizeof(buf), "%s.%d.map.%d.eeprom_firmware", + device_get_name(dev), + device_get_unit(dev), + id); + + fw = firmware_register(buf, eeprom, size, 1, NULL); + if (fw == NULL) { + device_printf(dev, "%s: firmware_register (%s) failed\n", + __func__, buf); + free(eeprom, M_DEVBUF); + return; + } + device_printf(dev, "device EEPROM '%s' registered\n", buf); +} + +/* + * Iterate through a list of early-boot hints creating calibration + * data firmware chunks for AHB (ie, non-PCI) devices with calibration + * data. + */ +static int +ar71xx_platform_check_eeprom_hints(device_t dev) +{ + char buf[64]; + long int addr; + int size; + int i; + + for (i = 0; i < 8; i++) { + snprintf(buf, sizeof(buf), "map.%d.ath_fixup_addr", i); + if (resource_long_value(device_get_name(dev), + device_get_unit(dev), buf, &addr) != 0) + break; + snprintf(buf, sizeof(buf), "map.%d.ath_fixup_size", i); + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), buf, &size) != 0) + break; + device_printf(dev, "map.%d.ath_fixup_addr=0x%08x; size=%d\n", + i, (int) addr, size); + (void) ar71xx_platform_create_cal_data(dev, i, addr, size); + } + + return (0); +} + +static int +ar71xx_caldata_attach(device_t dev) +{ + + device_add_child(dev, "nexus", -1); + ar71xx_platform_check_eeprom_hints(dev); + return (bus_generic_attach(dev)); +} + +static device_method_t ar71xx_caldata_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ar71xx_caldata_probe), + DEVMETHOD(device_attach, ar71xx_caldata_attach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD_END +}; + +static driver_t ar71xx_caldata_driver = { + "ar71xx_caldata", + ar71xx_caldata_methods, + sizeof(struct ar71xx_caldata_softc), +}; + +static devclass_t ar71xx_caldata_devclass; + +DRIVER_MODULE(ar71xx_caldata, nexus, ar71xx_caldata_driver, ar71xx_caldata_devclass, 0, 0); Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Tue May 23 06:14:02 2017 (r318695) +++ head/sys/mips/atheros/files.ar71xx Tue May 23 06:20:06 2017 (r318696) @@ -1,6 +1,7 @@ # $FreeBSD$ mips/atheros/apb.c optional ar71xx_apb +mips/atheros/ar71xx_caldata.c optional ar71xx_caldata mips/atheros/ar71xx_gpio.c optional gpio mips/atheros/ar71xx_machdep.c standard mips/atheros/ar71xx_ehci.c optional ehci From owner-svn-src-all@freebsd.org Tue May 23 06:20:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 223D4D79BFB; Tue, 23 May 2017 06:20:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E62F8134A; Tue, 23 May 2017 06:20:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N6KOG5049904; Tue, 23 May 2017 06:20:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N6KOoD049903; Tue, 23 May 2017 06:20:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705230620.v4N6KOoD049903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 23 May 2017 06:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318697 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:20:26 -0000 Author: adrian Date: Tue May 23 06:20:24 2017 New Revision: 318697 URL: https://svnweb.freebsd.org/changeset/base/318697 Log: [ar71xx] remove dead code! Modified: head/sys/mips/atheros/ar71xx_fixup.c Modified: head/sys/mips/atheros/ar71xx_fixup.c ============================================================================== --- head/sys/mips/atheros/ar71xx_fixup.c Tue May 23 06:20:06 2017 (r318696) +++ head/sys/mips/atheros/ar71xx_fixup.c Tue May 23 06:20:24 2017 (r318697) @@ -110,43 +110,3 @@ ar71xx_pci_slot_create_eeprom_firmware(d } device_printf(dev, "device EEPROM '%s' registered\n", buf); } - -#if 0 -static void -ar71xx_pci_slot_fixup(device_t dev, u_int bus, u_int slot, u_int func) -{ - long int flash_addr; - char buf[64]; - int size; - - /* - * Check whether the given slot has a hint to poke. - */ - if (bootverbose) - device_printf(dev, "%s: checking dev %s, %d/%d/%d\n", - __func__, device_get_nameunit(dev), bus, slot, func); - - snprintf(buf, sizeof(buf), "bus.%d.%d.%d.ath_fixup_addr", - bus, slot, func); - - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - buf, &flash_addr) == 0) { - snprintf(buf, sizeof(buf), "bus.%d.%d.%d.ath_fixup_size", - bus, slot, func); - if (resource_int_value(device_get_name(dev), - device_get_unit(dev), buf, &size) != 0) { - device_printf(dev, - "%s: missing hint '%s', aborting EEPROM\n", - __func__, buf); - return; - } - - - device_printf(dev, "found EEPROM at 0x%lx on %d.%d.%d\n", - flash_addr, bus, slot, func); - ar71xx_pci_fixup(dev, bus, slot, func, flash_addr, size); - ar71xx_pci_slot_create_eeprom_firmware(dev, bus, slot, func, - flash_addr, size); - } -} -#endif /* 0 */ From owner-svn-src-all@freebsd.org Tue May 23 06:53:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88F53D7A91B; Tue, 23 May 2017 06:53:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B01515C7; Tue, 23 May 2017 06:53:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N6rVXw065629; Tue, 23 May 2017 06:53:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N6rVjC065628; Tue, 23 May 2017 06:53:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230653.v4N6rVjC065628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 06:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318698 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:53:32 -0000 Author: ngie Date: Tue May 23 06:53:31 2017 New Revision: 318698 URL: https://svnweb.freebsd.org/changeset/base/318698 Log: basename(3): fix section ordering IMPLEMENTATION NOTES come before RETURN VALUES MFC after: 2 weeks Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/basename.3 Modified: head/lib/libc/gen/basename.3 ============================================================================== --- head/lib/libc/gen/basename.3 Tue May 23 06:20:24 2017 (r318697) +++ head/lib/libc/gen/basename.3 Tue May 23 06:53:31 2017 (r318698) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2016 +.Dd May 22, 2017 .Dt BASENAME 3 .Os .Sh NAME @@ -34,6 +34,16 @@ function returns the last component from deleting any trailing .Sq \&/ characters. +.Sh IMPLEMENTATION NOTES +This implementation of +.Fn basename +uses the buffer provided by the caller to store the resulting pathname +component. +Other vendor implementations may return a pointer to internal storage +space instead. +The advantage of the former approach is that it ensures thread-safety, +while also placing no upper limit on the supported length of the +pathname. .Sh RETURN VALUES If .Fa path @@ -50,16 +60,6 @@ is returned. Otherwise, it returns a pointer to the last component of .Fa path . -.Sh IMPLEMENTATION NOTES -This implementation of -.Fn basename -uses the buffer provided by the caller to store the resulting pathname -component. -Other vendor implementations may return a pointer to internal storage -space instead. -The advantage of the former approach is that it ensures thread-safety, -while also placing no upper limit on the supported length of the -pathname. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , From owner-svn-src-all@freebsd.org Tue May 23 06:55:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A334D7AA40; Tue, 23 May 2017 06:55:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BCDD18A2; Tue, 23 May 2017 06:55:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N6tpDF065769; Tue, 23 May 2017 06:55:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N6tpx0065768; Tue, 23 May 2017 06:55:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230655.v4N6tpx0065768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 06:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318699 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:55:52 -0000 Author: ngie Date: Tue May 23 06:55:51 2017 New Revision: 318699 URL: https://svnweb.freebsd.org/changeset/base/318699 Log: directory(3): delete trailing whitespace and rewrite `E.g.` as `e.g.` Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/directory.3 Modified: head/lib/libc/gen/directory.3 ============================================================================== --- head/lib/libc/gen/directory.3 Tue May 23 06:53:31 2017 (r318698) +++ head/lib/libc/gen/directory.3 Tue May 23 06:55:51 2017 (r318699) @@ -28,7 +28,7 @@ .\" @(#)directory.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 31, 2016 +.Dd May 22, 2017 .Dt DIRECTORY 3 .Os .Sh NAME @@ -292,14 +292,15 @@ is likely to be wrong if there are paral and the directory is larger than one page. There is code to ensure that a .Fn seekdir -to the location given by a +to the location given by a .Fn telldir -immediately before the last +immediately before the last .Fn readdir will always set the correct location to return the same value as that last .Fn readdir performed. -This is enough for some applications which want to "push back the last entry read" E.g. Samba. +This is enough for some applications which want to +"push back the last entry read", e.g. Samba. Seeks back to any other location, other than the beginning of the directory, may result in unexpected behaviour if deletes are present. From owner-svn-src-all@freebsd.org Tue May 23 06:56:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41100D7AAE0; Tue, 23 May 2017 06:56:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1176A1A2F; Tue, 23 May 2017 06:56:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N6uw3j065849; Tue, 23 May 2017 06:56:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N6uwY8065848; Tue, 23 May 2017 06:56:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230656.v4N6uwY8065848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 06:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318700 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:56:59 -0000 Author: ngie Date: Tue May 23 06:56:57 2017 New Revision: 318700 URL: https://svnweb.freebsd.org/changeset/base/318700 Log: dirname(3): fix section ordering IMPLEMENTATION NOTES come before RETURN VALUES MFC after: 2 weeks Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/dirname.3 Modified: head/lib/libc/gen/dirname.3 ============================================================================== --- head/lib/libc/gen/dirname.3 Tue May 23 06:55:51 2017 (r318699) +++ head/lib/libc/gen/dirname.3 Tue May 23 06:56:57 2017 (r318700) @@ -37,6 +37,16 @@ Any trailing .Sq \&/ characters are not counted as part of the directory name. +.Sh IMPLEMENTATION NOTES +This implementation of +.Fn dirname +uses the buffer provided by the caller to store the resulting parent +directory. +Other vendor implementations may return a pointer to internal storage +space instead. +The advantage of the former approach is that it ensures thread-safety, +while also placing no upper limit on the supported length of the +pathname. .Sh RETURN VALUES If .Fa path @@ -50,16 +60,6 @@ signifying the current directory. Otherwise, it returns a pointer to the parent directory of .Fa path . -.Sh IMPLEMENTATION NOTES -This implementation of -.Fn dirname -uses the buffer provided by the caller to store the resulting parent -directory. -Other vendor implementations may return a pointer to internal storage -space instead. -The advantage of the former approach is that it ensures thread-safety, -while also placing no upper limit on the supported length of the -pathname. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , From owner-svn-src-all@freebsd.org Tue May 23 06:58:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BF61D7AB91; Tue, 23 May 2017 06:58:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C46B1BCF; Tue, 23 May 2017 06:58:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N6w9gp065939; Tue, 23 May 2017 06:58:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N6w9As065938; Tue, 23 May 2017 06:58:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230658.v4N6w9As065938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 06:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318701 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:58:10 -0000 Author: ngie Date: Tue May 23 06:58:08 2017 New Revision: 318701 URL: https://svnweb.freebsd.org/changeset/base/318701 Log: tcsendbreak(3): delete spurious blank line at the end of the man page MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/tcsendbreak.3 Modified: head/lib/libc/gen/tcsendbreak.3 ============================================================================== --- head/lib/libc/gen/tcsendbreak.3 Tue May 23 06:56:57 2017 (r318700) +++ head/lib/libc/gen/tcsendbreak.3 Tue May 23 06:58:08 2017 (r318701) @@ -177,4 +177,3 @@ without writing all output. The default value for .Va kern.tty_drainwait is 300 seconds. - From owner-svn-src-all@freebsd.org Tue May 23 07:00:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3576DD7AC17; Tue, 23 May 2017 07:00:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07E381D61; Tue, 23 May 2017 07:00:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N70l7H066839; Tue, 23 May 2017 07:00:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N70l7E066838; Tue, 23 May 2017 07:00:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230700.v4N70l7E066838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318702 - head/contrib/libc-vis X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:00:48 -0000 Author: ngie Date: Tue May 23 07:00:46 2017 New Revision: 318702 URL: https://svnweb.freebsd.org/changeset/base/318702 Log: vis(3): delete spurious .Pp macro MFC after: 2 weeks Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/contrib/libc-vis/vis.3 Modified: head/contrib/libc-vis/vis.3 ============================================================================== --- head/contrib/libc-vis/vis.3 Tue May 23 06:58:08 2017 (r318701) +++ head/contrib/libc-vis/vis.3 Tue May 23 07:00:46 2017 (r318702) @@ -373,7 +373,6 @@ space. .It Dv \e240 Represents Meta-space. .El -.Pp .It Dv VIS_CSTYLE Use C-style backslash sequences to represent standard non-printable characters. From owner-svn-src-all@freebsd.org Tue May 23 07:02:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8DF0D7AC84; Tue, 23 May 2017 07:02:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7615110CA; Tue, 23 May 2017 07:02:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N721aY067589; Tue, 23 May 2017 07:02:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N721hG067588; Tue, 23 May 2017 07:02:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230702.v4N721hG067588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:02:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318703 - head/lib/libc/iconv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:02:02 -0000 Author: ngie Date: Tue May 23 07:02:01 2017 New Revision: 318703 URL: https://svnweb.freebsd.org/changeset/base/318703 Log: __iconv_get_list: separate .Nm entries with commas MFC after: 2 weeks Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/lib/libc/iconv/__iconv_get_list.3 Modified: head/lib/libc/iconv/__iconv_get_list.3 ============================================================================== --- head/lib/libc/iconv/__iconv_get_list.3 Tue May 23 07:00:46 2017 (r318702) +++ head/lib/libc/iconv/__iconv_get_list.3 Tue May 23 07:02:01 2017 (r318703) @@ -38,7 +38,7 @@ .Dt __ICONV_GET_LIST 3 .Os .Sh NAME -.Nm __iconv_get_list +.Nm __iconv_get_list , .Nm __iconv_free_list .Nd retrieving a list of character encodings supported by .Xr iconv 3 From owner-svn-src-all@freebsd.org Tue May 23 07:05:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 301C2D7AE0F; Tue, 23 May 2017 07:05:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 007231311; Tue, 23 May 2017 07:05:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N75ZVh070064; Tue, 23 May 2017 07:05:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N75ZiY070063; Tue, 23 May 2017 07:05:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230705.v4N75ZiY070063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318704 - head/lib/libc/posix1e X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:05:36 -0000 Author: ngie Date: Tue May 23 07:05:34 2017 New Revision: 318704 URL: https://svnweb.freebsd.org/changeset/base/318704 Log: posix1e(3): reference using the section (3) when referencing libbsm with .Xr MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/posix1e/posix1e.3 Modified: head/lib/libc/posix1e/posix1e.3 ============================================================================== --- head/lib/libc/posix1e/posix1e.3 Tue May 23 07:02:01 2017 (r318703) +++ head/lib/libc/posix1e/posix1e.3 Tue May 23 07:05:34 2017 (r318704) @@ -63,7 +63,7 @@ flow label APIs. However, .Fx does implement the -.Xr libbsm +.Xr libbsm 3 audit API. It also provides .Xr capsicum 4 , From owner-svn-src-all@freebsd.org Tue May 23 07:08:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 483CAD7AE9A; Tue, 23 May 2017 07:08:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FF3C14F2; Tue, 23 May 2017 07:08:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N78VrJ070282; Tue, 23 May 2017 07:08:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N78Ve3070281; Tue, 23 May 2017 07:08:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230708.v4N78Ve3070281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318705 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:08:32 -0000 Author: ngie Date: Tue May 23 07:08:30 2017 New Revision: 318705 URL: https://svnweb.freebsd.org/changeset/base/318705 Log: fopen(3): make manlint fixes - Break on new lines. - Use .Dv with NULL. - Rewrap lines as necessary/when possible. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/stdio/fopen.3 Modified: head/lib/libc/stdio/fopen.3 ============================================================================== --- head/lib/libc/stdio/fopen.3 Tue May 23 07:05:34 2017 (r318704) +++ head/lib/libc/stdio/fopen.3 Tue May 23 07:08:30 2017 (r318705) @@ -230,15 +230,20 @@ argument, .Fn fmemopen allocates .Fa size -bytes of memory. This buffer is automatically freed when the -stream is closed. Buffers can be opened in text-mode (default) or binary-mode +bytes of memory. +This buffer is automatically freed when the stream is closed. +Buffers can be opened in text-mode (default) or binary-mode (if .Dq Li b is present in the second or third position of the .Fa mode -argument). Buffers opened in text-mode make sure that writes are terminated with -a NULL byte, if the last write hasn't filled up the whole buffer. Buffers -opened in binary-mode never append a NULL byte. +argument). +Buffers opened in text-mode make sure that writes are terminated with a +.Dv NULL +byte, if the last write hasn't filled up the whole buffer. +Buffers opened in binary-mode never append a +.Dv NULL +byte. .Sh RETURN VALUES Upon successful completion .Fn fopen , From owner-svn-src-all@freebsd.org Tue May 23 07:09:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 799FAD7AEF5; Tue, 23 May 2017 07:09:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BCD41685; Tue, 23 May 2017 07:09:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N79QK2070358; Tue, 23 May 2017 07:09:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N79Qjd070357; Tue, 23 May 2017 07:09:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230709.v4N79Qjd070357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318706 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:09:27 -0000 Author: ngie Date: Tue May 23 07:09:26 2017 New Revision: 318706 URL: https://svnweb.freebsd.org/changeset/base/318706 Log: localeconv(3): start sentences on new lines Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/locale/localeconv.3 Modified: head/lib/libc/locale/localeconv.3 ============================================================================== --- head/lib/libc/locale/localeconv.3 Tue May 23 07:08:30 2017 (r318705) +++ head/lib/libc/locale/localeconv.3 Tue May 23 07:09:26 2017 (r318706) @@ -202,7 +202,8 @@ result similarly denotes an unavailable .Pp The .Fn localeconv_l -function takes an explicit locale parameter. For more information, see +function takes an explicit locale parameter. +For more information, see .Xr xlocale 3 . .Sh RETURN VALUES The From owner-svn-src-all@freebsd.org Tue May 23 07:10:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C946D7AF60; Tue, 23 May 2017 07:10:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EC921811; Tue, 23 May 2017 07:10:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7AKMZ070470; Tue, 23 May 2017 07:10:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7AKFw070469; Tue, 23 May 2017 07:10:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230710.v4N7AKFw070469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:10:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318707 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:10:21 -0000 Author: ngie Date: Tue May 23 07:10:20 2017 New Revision: 318707 URL: https://svnweb.freebsd.org/changeset/base/318707 Log: sctp_send(3): start sentences on new lines Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/net/sctp_send.3 Modified: head/lib/libc/net/sctp_send.3 ============================================================================== --- head/lib/libc/net/sctp_send.3 Tue May 23 07:09:26 2017 (r318706) +++ head/lib/libc/net/sctp_send.3 Tue May 23 07:10:20 2017 (r318707) @@ -105,8 +105,8 @@ struct sctp_sndrcvinfo { The .Fa sinfo->sinfo_ppid argument is an opaque 32 bit value that is passed transparently -through the stack to the peer endpoint. It will be available on -reception of a message (see +through the stack to the peer endpoint. +It will be available on reception of a message (see .Xr sctp_recvmsg 3 ) . Note that the stack passes this value without regard to byte order. From owner-svn-src-all@freebsd.org Tue May 23 07:11:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 323ABD7AFD6; Tue, 23 May 2017 07:11:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 048791B06; Tue, 23 May 2017 07:11:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7BGYm071445; Tue, 23 May 2017 07:11:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7BGNv071444; Tue, 23 May 2017 07:11:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230711.v4N7BGNv071444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:11:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318708 - head/lib/libc/posix1e X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:11:17 -0000 Author: ngie Date: Tue May 23 07:11:15 2017 New Revision: 318708 URL: https://svnweb.freebsd.org/changeset/base/318708 Log: acl_create_entry(3): separate .Nm entries with commas in SYNOPSIS Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/posix1e/acl_create_entry.3 Modified: head/lib/libc/posix1e/acl_create_entry.3 ============================================================================== --- head/lib/libc/posix1e/acl_create_entry.3 Tue May 23 07:10:20 2017 (r318707) +++ head/lib/libc/posix1e/acl_create_entry.3 Tue May 23 07:11:15 2017 (r318708) @@ -29,7 +29,7 @@ .Dt ACL_CREATE_ENTRY 3 .Os .Sh NAME -.Nm acl_create_entry +.Nm acl_create_entry , .Nm acl_create_entry_np .Nd create a new ACL entry .Sh LIBRARY From owner-svn-src-all@freebsd.org Tue May 23 07:12:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0850D7A171; Tue, 23 May 2017 07:12:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C11341DA7; Tue, 23 May 2017 07:12:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7CVOr074468; Tue, 23 May 2017 07:12:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7CVfo074467; Tue, 23 May 2017 07:12:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230712.v4N7CVfo074467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318709 - head/lib/libc/posix1e X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:12:33 -0000 Author: ngie Date: Tue May 23 07:12:31 2017 New Revision: 318709 URL: https://svnweb.freebsd.org/changeset/base/318709 Log: acl_to_text(3): start sentences on new lines Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/posix1e/acl_to_text.3 Modified: head/lib/libc/posix1e/acl_to_text.3 ============================================================================== --- head/lib/libc/posix1e/acl_to_text.3 Tue May 23 07:11:15 2017 (r318708) +++ head/lib/libc/posix1e/acl_to_text.3 Tue May 23 07:12:31 2017 (r318709) @@ -58,8 +58,9 @@ including the NULL terminator) in the lo .Va len_p . If the ACL is POSIX.1e, the format of the text string returned by .Fn acl_to_text -shall be the POSIX.1e long ACL form. If the ACL is NFSv4, the format -of the text string shall be the compact form, unless the +shall be the POSIX.1e long ACL form. +If the ACL is NFSv4, the format of the text string shall be the compact form, unless +the .Va ACL_TEXT_VERBOSE flag is given. .Pp From owner-svn-src-all@freebsd.org Tue May 23 07:14:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22B06D7A218; Tue, 23 May 2017 07:14:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8F831F3C; Tue, 23 May 2017 07:14:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7EluD074579; Tue, 23 May 2017 07:14:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7EkRo074578; Tue, 23 May 2017 07:14:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230714.v4N7EkRo074578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318710 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:14:48 -0000 Author: ngie Date: Tue May 23 07:14:46 2017 New Revision: 318710 URL: https://svnweb.freebsd.org/changeset/base/318710 Log: quick_exit(3): delete trailing whitespace in licensing tort Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/stdlib/quick_exit.3 Modified: head/lib/libc/stdlib/quick_exit.3 ============================================================================== --- head/lib/libc/stdlib/quick_exit.3 Tue May 23 07:12:31 2017 (r318709) +++ head/lib/libc/stdlib/quick_exit.3 Tue May 23 07:14:46 2017 (r318710) @@ -1,6 +1,6 @@ .\" Copyright (c) 2011 David Chisnall .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -9,7 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -21,7 +21,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.\" +.\" .\" $FreeBSD$ .\" .Dd December 13, 2014 From owner-svn-src-all@freebsd.org Tue May 23 07:15:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A0E4D7A2A5; Tue, 23 May 2017 07:15:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB75110CC; Tue, 23 May 2017 07:15:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7FvAK074667; Tue, 23 May 2017 07:15:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7FvwW074666; Tue, 23 May 2017 07:15:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230715.v4N7FvwW074666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318711 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:15:59 -0000 Author: ngie Date: Tue May 23 07:15:57 2017 New Revision: 318711 URL: https://svnweb.freebsd.org/changeset/base/318711 Log: fopencookie(3): declare function pointers in SYNOPSIS correctly Add obligatory `*` in declarations. Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/stdio/fopencookie.3 Modified: head/lib/libc/stdio/fopencookie.3 ============================================================================== --- head/lib/libc/stdio/fopencookie.3 Tue May 23 07:14:46 2017 (r318710) +++ head/lib/libc/stdio/fopencookie.3 Tue May 23 07:15:57 2017 (r318711) @@ -35,13 +35,13 @@ .Sh SYNOPSIS .In stdio.h .Ft typedef ssize_t -.Fn (cookie_read_function_t) "void *cookie" "char *buf" "size_t size" +.Fn (*cookie_read_function_t) "void *cookie" "char *buf" "size_t size" .Ft typedef ssize_t -.Fn (cookie_write_function_t) "void *cookie" "const char *buf" "size_t size" +.Fn (*cookie_write_function_t) "void *cookie" "const char *buf" "size_t size" .Ft typedef int -.Fn (cookie_seek_function_t) "void *cookie" "off64_t *offset" "int whence" +.Fn (*cookie_seek_function_t) "void *cookie" "off64_t *offset" "int whence" .Ft typedef int -.Fn (cookie_close_function_t) "void *cookie" +.Fn (*cookie_close_function_t) "void *cookie" .Bd -literal typedef struct { cookie_read_function_t *read; From owner-svn-src-all@freebsd.org Tue May 23 07:17:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3C1DD7A344; Tue, 23 May 2017 07:17:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 911F512B9; Tue, 23 May 2017 07:17:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7Hqoh074771; Tue, 23 May 2017 07:17:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7Hqmf074770; Tue, 23 May 2017 07:17:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230717.v4N7Hqmf074770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318712 - head/lib/libc/xdr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:17:53 -0000 Author: ngie Date: Tue May 23 07:17:52 2017 New Revision: 318712 URL: https://svnweb.freebsd.org/changeset/base/318712 Log: xdr(3): add missing comma after xdr_sizeof(3) in SYNOPSIS This unbreaks the .Nm declaration Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/xdr/xdr.3 Modified: head/lib/libc/xdr/xdr.3 ============================================================================== --- head/lib/libc/xdr/xdr.3 Tue May 23 07:15:57 2017 (r318711) +++ head/lib/libc/xdr/xdr.3 Tue May 23 07:17:52 2017 (r318712) @@ -31,7 +31,7 @@ .Nm xdr_reference , .Nm xdr_setpos , .Nm xdr_short , -.Nm xdr_sizeof, +.Nm xdr_sizeof , .Nm xdrstdio_create , .Nm xdr_string , .Nm xdr_u_char , From owner-svn-src-all@freebsd.org Tue May 23 07:20:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84705D7A3E9; Tue, 23 May 2017 07:20:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51ACD14A8; Tue, 23 May 2017 07:20:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7KTl9074915; Tue, 23 May 2017 07:20:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7KTdk074914; Tue, 23 May 2017 07:20:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705230720.v4N7KTdk074914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 23 May 2017 07:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318713 - head/usr.bin/vmstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:20:30 -0000 Author: markj Date: Tue May 23 07:20:29 2017 New Revision: 318713 URL: https://svnweb.freebsd.org/changeset/base/318713 Log: Let vmstat -o recognize OBJT_MGTDEVICE objects. MFC after: 1 week Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Tue May 23 07:17:52 2017 (r318712) +++ head/usr.bin/vmstat/vmstat.c Tue May 23 07:20:29 2017 (r318713) @@ -1643,6 +1643,9 @@ display_object(struct kinfo_vmobject *kv case KVME_TYPE_SG: str = "sg"; break; + case KVME_TYPE_MGTDEVICE: + str = "md"; + break; case KVME_TYPE_UNKNOWN: default: str = "??"; From owner-svn-src-all@freebsd.org Tue May 23 07:21:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50955D7A5BE; Tue, 23 May 2017 07:21:28 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06FBC1814; Tue, 23 May 2017 07:21:27 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7LRcT077752; Tue, 23 May 2017 07:21:27 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7LQIN077749; Tue, 23 May 2017 07:21:26 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705230721.v4N7LQIN077749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 23 May 2017 07:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318714 - in stable/11/contrib/gcc: . config/arm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:21:28 -0000 Author: mmel Date: Tue May 23 07:21:26 2017 New Revision: 318714 URL: https://svnweb.freebsd.org/changeset/base/318714 Log: MFC r318024,r318025: r318024: Fix _Unwind_Backtrace symbol version for ARM. r318025: Revert accidentally changed std.armv6 in r318024. Modified: stable/11/contrib/gcc/config/arm/libgcc-bpabi.ver stable/11/contrib/gcc/config/arm/libunwind-arm.S stable/11/contrib/gcc/libgcc-std.ver Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/gcc/config/arm/libgcc-bpabi.ver ============================================================================== --- stable/11/contrib/gcc/config/arm/libgcc-bpabi.ver Tue May 23 07:20:29 2017 (r318713) +++ stable/11/contrib/gcc/config/arm/libgcc-bpabi.ver Tue May 23 07:21:26 2017 (r318714) @@ -81,3 +81,11 @@ GCC_3.5 { # GNU-specific entry point. __gnu_unwind_frame } + +%exclude { + _Unwind_Backtrace +} + +GCC_4.3.0 { + _Unwind_Backtrace +} Modified: stable/11/contrib/gcc/config/arm/libunwind-arm.S ============================================================================== --- stable/11/contrib/gcc/config/arm/libunwind-arm.S Tue May 23 07:20:29 2017 (r318713) +++ stable/11/contrib/gcc/config/arm/libunwind-arm.S Tue May 23 07:21:26 2017 (r318714) @@ -133,4 +133,22 @@ UNWIND_WRAPPER _Unwind_Resume_or_Rethrow UNWIND_WRAPPER _Unwind_ForcedUnwind 3 UNWIND_WRAPPER _Unwind_Backtrace 2 +/* + * Originally, we incorrectly export _Unwind_Backtrace symbol + * with GCC_3.3 version, but real GCC libgcc export it as GCC_4.3.0. + * To maintain backward compatibility, export it with both versions where + * GCC_4.3.0 is default one. + * + * The workaround is complicated by next two issues: + * - old GNU ld cannot handle two (or more) symbol versions + * targeting same function. + * - the .weakref crashes clang 4.0 + */ + .globl SYM(_Unwind_Backtrace33) + TYPE(_Unwind_Backtrace33) +SYM(_Unwind_Backtrace33): + b _Unwind_Backtrace + + .symver SYM(_Unwind_Backtrace33),_Unwind_Backtrace@GCC_3.3 + #endif /* ndef __symbian__ */ Modified: stable/11/contrib/gcc/libgcc-std.ver ============================================================================== --- stable/11/contrib/gcc/libgcc-std.ver Tue May 23 07:20:29 2017 (r318713) +++ stable/11/contrib/gcc/libgcc-std.ver Tue May 23 07:21:26 2017 (r318714) @@ -275,7 +275,7 @@ GCC_4.2.0 { _Unwind_GetIPInfo } -%inherit GCC_4.3 GCC_4.2.0 +%inherit GCC_4.3.0 GCC_4.2.0 GCC_4.3.0 { # byte swapping routines __bswapsi2 From owner-svn-src-all@freebsd.org Tue May 23 07:26:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6E1CD7A711; Tue, 23 May 2017 07:26:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 885451B13; Tue, 23 May 2017 07:26:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7QjbI078717; Tue, 23 May 2017 07:26:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7QjRf078716; Tue, 23 May 2017 07:26:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230726.v4N7QjRf078716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318715 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:26:46 -0000 Author: ngie Date: Tue May 23 07:26:45 2017 New Revision: 318715 URL: https://svnweb.freebsd.org/changeset/base/318715 Log: _umtx_op(2): fix minor manlint issues - Sort .Xr entries in SEE ALSO section. - Sort SEE ALSO and STANDARDS sections properly, in terms of the entire document. Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/sys/_umtx_op.2 Modified: head/lib/libc/sys/_umtx_op.2 ============================================================================== --- head/lib/libc/sys/_umtx_op.2 Tue May 23 07:21:26 2017 (r318714) +++ head/lib/libc/sys/_umtx_op.2 Tue May 23 07:26:45 2017 (r318715) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 29, 2016 +.Dd May 23, 2017 .Dt _UMTX_OP 2 .Os .Sh NAME @@ -1382,32 +1382,11 @@ Mutex lock requests without timeout spec The error is not returned to userspace code since restart is handled by usual adjustment of the instruction counter. .El -.Sh BUGS -A window between a unlocking robust mutex and resetting the pointer in the -.Dv robust_inact_offset -member of the registered -.Vt struct umtx_robust_lists_params -allows another thread to destroy the mutex, thus making the kernel inspect -freed or reused memory. -The -.Li libthr -implementation is only vulnerable to this race when operating on -a shared mutex. -A possible fix for the current implementation is to strengthen the checks -for shared mutexes before terminating them, in particular, verifying -that the mutex memory is mapped from a shared memory object allocated -by the -.Dv UMTX_OP_SHM -request. -This is not done because it is believed that the race is adequately -covered by other consistency checks, while adding the check would -prevent alternative implementations of -.Li libpthread . .Sh SEE ALSO .Xr clock_gettime 2 , .Xr mmap 2 , -.Xr shm_open 2 , .Xr setrlimit 2 , +.Xr shm_open 2 , .Xr sigaction 2 , .Xr thr_exit 2 , .Xr thr_kill 2 , @@ -1425,3 +1404,24 @@ to implement .St -p1003.1-2001 .Xr pthread 3 functionality. +.Sh BUGS +A window between a unlocking robust mutex and resetting the pointer in the +.Dv robust_inact_offset +member of the registered +.Vt struct umtx_robust_lists_params +allows another thread to destroy the mutex, thus making the kernel inspect +freed or reused memory. +The +.Li libthr +implementation is only vulnerable to this race when operating on +a shared mutex. +A possible fix for the current implementation is to strengthen the checks +for shared mutexes before terminating them, in particular, verifying +that the mutex memory is mapped from a shared memory object allocated +by the +.Dv UMTX_OP_SHM +request. +This is not done because it is believed that the race is adequately +covered by other consistency checks, while adding the check would +prevent alternative implementations of +.Li libpthread . From owner-svn-src-all@freebsd.org Tue May 23 07:27:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7552D7A779; Tue, 23 May 2017 07:27:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 553C01CC0; Tue, 23 May 2017 07:27:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7RW9j078812; Tue, 23 May 2017 07:27:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7RUYV078792; Tue, 23 May 2017 07:27:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705230727.v4N7RUYV078792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 23 May 2017 07:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318716 - in stable/11: sys/amd64/amd64 sys/arm64/arm64 sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/fs/tmpfs sys/i386/i386 sys/kern sys/sys sys/vm... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:27:33 -0000 Author: markj Date: Tue May 23 07:27:30 2017 New Revision: 318716 URL: https://svnweb.freebsd.org/changeset/base/318716 Log: MFC r308474, r308691, r309203, r309365, r309703, r309898, r310720, r308489, r308706: Add PQ_LAUNDRY and remove PG_CACHED pages. Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/arm64/arm64/pmap.c stable/11/sys/cddl/compat/opensolaris/sys/vnode.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/fs/tmpfs/tmpfs_subr.c stable/11/sys/i386/i386/pmap.c stable/11/sys/kern/kern_exec.c stable/11/sys/kern/uipc_shm.c stable/11/sys/sys/vmmeter.h stable/11/sys/vm/_vm_radix.h stable/11/sys/vm/swap_pager.c stable/11/sys/vm/vm_fault.c stable/11/sys/vm/vm_map.c stable/11/sys/vm/vm_meter.c stable/11/sys/vm/vm_mmap.c stable/11/sys/vm/vm_object.c stable/11/sys/vm/vm_object.h stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h stable/11/sys/vm/vm_pageout.c stable/11/sys/vm/vm_phys.c stable/11/sys/vm/vm_radix.c stable/11/sys/vm/vm_radix.h stable/11/sys/vm/vm_reserv.c stable/11/sys/vm/vm_reserv.h stable/11/sys/vm/vnode_pager.c stable/11/usr.bin/systat/systat.1 stable/11/usr.bin/systat/vmstat.c stable/11/usr.bin/top/machine.c stable/11/usr.bin/top/top.local.1 stable/11/usr.bin/vmstat/vmstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/amd64/amd64/pmap.c Tue May 23 07:27:30 2017 (r318716) @@ -614,7 +614,6 @@ static vm_page_t pmap_enter_quick_locked static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); -static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits, int mask); static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, struct rwlock **lockp); @@ -625,7 +624,7 @@ static int pmap_remove_pde(pmap_t pmap, struct spglist *free, struct rwlock **lockp); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva, pd_entry_t ptepde, struct spglist *free, struct rwlock **lockp); -static void pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte); +static vm_page_t pmap_remove_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_remove_page(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, struct spglist *free); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, @@ -2218,29 +2217,17 @@ pmap_insert_pt_page(pmap_t pmap, vm_page } /* - * Looks for a page table page mapping the specified virtual address in the - * specified pmap's collection of idle page table pages. Returns NULL if there - * is no page table page corresponding to the specified virtual address. + * Removes the page table page mapping the specified virtual address from the + * specified pmap's collection of idle page table pages, and returns it. + * Otherwise, returns NULL if there is no page table page corresponding to the + * specified virtual address. */ static __inline vm_page_t -pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va) +pmap_remove_pt_page(pmap_t pmap, vm_offset_t va) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); - return (vm_radix_lookup(&pmap->pm_root, pmap_pde_pindex(va))); -} - -/* - * Removes the specified page table page from the specified pmap's collection - * of idle page table pages. The specified page table page must be a member of - * the pmap's collection. - */ -static __inline void -pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte) -{ - - PMAP_LOCK_ASSERT(pmap, MA_OWNED); - vm_radix_remove(&pmap->pm_root, mpte->pindex); + return (vm_radix_remove(&pmap->pm_root, pmap_pde_pindex(va))); } /* @@ -3460,10 +3447,8 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e oldpde = *pde; KASSERT((oldpde & (PG_PS | PG_V)) == (PG_PS | PG_V), ("pmap_demote_pde: oldpde is missing PG_PS and/or PG_V")); - if ((oldpde & PG_A) != 0 && (mpte = pmap_lookup_pt_page(pmap, va)) != - NULL) - pmap_remove_pt_page(pmap, mpte); - else { + if ((oldpde & PG_A) == 0 || (mpte = pmap_remove_pt_page(pmap, va)) == + NULL) { KASSERT((oldpde & PG_W) == 0, ("pmap_demote_pde: page table page for a wired mapping" " is missing")); @@ -3577,11 +3562,10 @@ pmap_remove_kernel_pde(pmap_t pmap, pd_e KASSERT(pmap == kernel_pmap, ("pmap %p is not kernel_pmap", pmap)); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mpte = pmap_lookup_pt_page(pmap, va); + mpte = pmap_remove_pt_page(pmap, va); if (mpte == NULL) panic("pmap_remove_kernel_pde: Missing pt page."); - pmap_remove_pt_page(pmap, mpte); mptepa = VM_PAGE_TO_PHYS(mpte); newpde = mptepa | X86_PG_M | X86_PG_A | X86_PG_RW | X86_PG_V; @@ -3668,9 +3652,8 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t if (pmap == kernel_pmap) { pmap_remove_kernel_pde(pmap, pdq, sva); } else { - mpte = pmap_lookup_pt_page(pmap, sva); + mpte = pmap_remove_pt_page(pmap, sva); if (mpte != NULL) { - pmap_remove_pt_page(pmap, mpte); pmap_resident_count_dec(pmap, 1); KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pde: pte page wire count error")); @@ -5533,9 +5516,8 @@ pmap_remove_pages(pmap_t pmap) TAILQ_EMPTY(&mt->md.pv_list)) vm_page_aflag_clear(mt, PGA_WRITEABLE); } - mpte = pmap_lookup_pt_page(pmap, pv->pv_va); + mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { - pmap_remove_pt_page(pmap, mpte); pmap_resident_count_dec(pmap, 1); KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pages: pte page wire count error")); Modified: stable/11/sys/arm64/arm64/pmap.c ============================================================================== --- stable/11/sys/arm64/arm64/pmap.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/arm64/arm64/pmap.c Tue May 23 07:27:30 2017 (r318716) @@ -2514,29 +2514,17 @@ pmap_insert_pt_page(pmap_t pmap, vm_page } /* - * Looks for a page table page mapping the specified virtual address in the - * specified pmap's collection of idle page table pages. Returns NULL if there - * is no page table page corresponding to the specified virtual address. + * Removes the page table page mapping the specified virtual address from the + * specified pmap's collection of idle page table pages, and returns it. + * Otherwise, returns NULL if there is no page table page corresponding to the + * specified virtual address. */ static __inline vm_page_t -pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va) +pmap_remove_pt_page(pmap_t pmap, vm_offset_t va) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); - return (vm_radix_lookup(&pmap->pm_root, pmap_l2_pindex(va))); -} - -/* - * Removes the specified page table page from the specified pmap's collection - * of idle page table pages. The specified page table page must be a member of - * the pmap's collection. - */ -static __inline void -pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte) -{ - - PMAP_LOCK_ASSERT(pmap, MA_OWNED); - vm_radix_remove(&pmap->pm_root, mpte->pindex); + return (vm_radix_remove(&pmap->pm_root, pmap_l2_pindex(va))); } /* @@ -3605,10 +3593,9 @@ pmap_remove_pages(pmap_t pmap) TAILQ_EMPTY(&mt->md.pv_list)) vm_page_aflag_clear(mt, PGA_WRITEABLE); } - ml3 = pmap_lookup_pt_page(pmap, + ml3 = pmap_remove_pt_page(pmap, pv->pv_va); if (ml3 != NULL) { - pmap_remove_pt_page(pmap, ml3); pmap_resident_count_dec(pmap,1); KASSERT(ml3->wire_count == NL3PG, ("pmap_remove_pages: l3 page wire count error")); @@ -4381,9 +4368,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_en return (NULL); } - if ((ml3 = pmap_lookup_pt_page(pmap, va)) != NULL) { - pmap_remove_pt_page(pmap, ml3); - } else { + if ((ml3 = pmap_remove_pt_page(pmap, va)) == NULL) { ml3 = vm_page_alloc(NULL, pmap_l2_pindex(va), (VIRT_IN_DMAP(va) ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); Modified: stable/11/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- stable/11/sys/cddl/compat/opensolaris/sys/vnode.h Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/cddl/compat/opensolaris/sys/vnode.h Tue May 23 07:27:30 2017 (r318716) @@ -75,8 +75,7 @@ vn_is_readonly(vnode_t *vp) #define vn_mountedvfs(vp) ((vp)->v_mountedhere) #define vn_has_cached_data(vp) \ ((vp)->v_object != NULL && \ - ((vp)->v_object->resident_page_count > 0 || \ - !vm_object_cache_is_empty((vp)->v_object))) + (vp)->v_object->resident_page_count > 0) #define vn_exists(vp) do { } while (0) #define vn_invalid(vp) do { } while (0) #define vn_renamepath(tdvp, svp, tnm, lentnm) do { } while (0) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue May 23 07:27:30 2017 (r318716) @@ -426,10 +426,6 @@ page_busy(vnode_t *vp, int64_t start, in continue; } vm_page_sbusy(pp); - } else if (pp == NULL) { - pp = vm_page_alloc(obj, OFF_TO_IDX(start), - VM_ALLOC_SYSTEM | VM_ALLOC_IFCACHED | - VM_ALLOC_SBUSY); } else { ASSERT(pp != NULL && !pp->valid); pp = NULL; Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Tue May 23 07:27:30 2017 (r318716) @@ -1401,12 +1401,9 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(uobj); goto retry; - } else if (m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(uobj, &m, 1, - NULL, NULL); - else - /* A cached page was reactivated. */ - rv = VM_PAGER_OK; + } + rv = vm_pager_get_pages(uobj, &m, 1, NULL, + NULL); vm_page_lock(m); if (rv == VM_PAGER_OK) { vm_page_deactivate(m); Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/i386/i386/pmap.c Tue May 23 07:27:30 2017 (r318716) @@ -306,7 +306,6 @@ static boolean_t pmap_is_modified_pvh(st static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static void pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde); -static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); static boolean_t pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva, @@ -316,7 +315,7 @@ static void pmap_remove_pde(pmap_t pmap, struct spglist *free); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva, struct spglist *free); -static void pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte); +static vm_page_t pmap_remove_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_remove_page(struct pmap *pmap, vm_offset_t va, struct spglist *free); static void pmap_remove_entry(struct pmap *pmap, vm_page_t m, @@ -1727,29 +1726,17 @@ pmap_insert_pt_page(pmap_t pmap, vm_page } /* - * Looks for a page table page mapping the specified virtual address in the - * specified pmap's collection of idle page table pages. Returns NULL if there - * is no page table page corresponding to the specified virtual address. + * Removes the page table page mapping the specified virtual address from the + * specified pmap's collection of idle page table pages, and returns it. + * Otherwise, returns NULL if there is no page table page corresponding to the + * specified virtual address. */ static __inline vm_page_t -pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va) +pmap_remove_pt_page(pmap_t pmap, vm_offset_t va) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); - return (vm_radix_lookup(&pmap->pm_root, va >> PDRSHIFT)); -} - -/* - * Removes the specified page table page from the specified pmap's collection - * of idle page table pages. The specified page table page must be a member of - * the pmap's collection. - */ -static __inline void -pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte) -{ - - PMAP_LOCK_ASSERT(pmap, MA_OWNED); - vm_radix_remove(&pmap->pm_root, mpte->pindex); + return (vm_radix_remove(&pmap->pm_root, va >> PDRSHIFT)); } /* @@ -2645,10 +2632,8 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t oldpde = *pde; KASSERT((oldpde & (PG_PS | PG_V)) == (PG_PS | PG_V), ("pmap_demote_pde: oldpde is missing PG_PS and/or PG_V")); - if ((oldpde & PG_A) != 0 && (mpte = pmap_lookup_pt_page(pmap, va)) != - NULL) - pmap_remove_pt_page(pmap, mpte); - else { + if ((oldpde & PG_A) == 0 || (mpte = pmap_remove_pt_page(pmap, va)) == + NULL) { KASSERT((oldpde & PG_W) == 0, ("pmap_demote_pde: page table page for a wired mapping" " is missing")); @@ -2786,11 +2771,10 @@ pmap_remove_kernel_pde(pmap_t pmap, pd_e vm_page_t mpte; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mpte = pmap_lookup_pt_page(pmap, va); + mpte = pmap_remove_pt_page(pmap, va); if (mpte == NULL) panic("pmap_remove_kernel_pde: Missing pt page."); - pmap_remove_pt_page(pmap, mpte); mptepa = VM_PAGE_TO_PHYS(mpte); newpde = mptepa | PG_M | PG_A | PG_RW | PG_V; @@ -2872,9 +2856,8 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t if (pmap == kernel_pmap) { pmap_remove_kernel_pde(pmap, pdq, sva); } else { - mpte = pmap_lookup_pt_page(pmap, sva); + mpte = pmap_remove_pt_page(pmap, sva); if (mpte != NULL) { - pmap_remove_pt_page(pmap, mpte); pmap->pm_stats.resident_count--; KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pde: pte page wire count error")); @@ -4616,9 +4599,8 @@ pmap_remove_pages(pmap_t pmap) if (TAILQ_EMPTY(&mt->md.pv_list)) vm_page_aflag_clear(mt, PGA_WRITEABLE); } - mpte = pmap_lookup_pt_page(pmap, pv->pv_va); + mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { - pmap_remove_pt_page(pmap, mpte); pmap->pm_stats.resident_count--; KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pages: pte page wire count error")); Modified: stable/11/sys/kern/kern_exec.c ============================================================================== --- stable/11/sys/kern/kern_exec.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/kern/kern_exec.c Tue May 23 07:27:30 2017 (r318716) @@ -1006,7 +1006,7 @@ exec_map_first_page(imgp) break; } else { ma[i] = vm_page_alloc(object, i, - VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + VM_ALLOC_NORMAL); if (ma[i] == NULL) break; } Modified: stable/11/sys/kern/uipc_shm.c ============================================================================== --- stable/11/sys/kern/uipc_shm.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/kern/uipc_shm.c Tue May 23 07:27:30 2017 (r318716) @@ -455,12 +455,9 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(object); goto retry; - } else if (m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(object, &m, 1, - NULL, NULL); - else - /* A cached page was reactivated. */ - rv = VM_PAGER_OK; + } + rv = vm_pager_get_pages(object, &m, 1, NULL, + NULL); vm_page_lock(m); if (rv == VM_PAGER_OK) { vm_page_deactivate(m); Modified: stable/11/sys/sys/vmmeter.h ============================================================================== --- stable/11/sys/sys/vmmeter.h Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/sys/vmmeter.h Tue May 23 07:27:30 2017 (r318716) @@ -75,9 +75,10 @@ struct vmmeter { u_int v_vnodepgsin; /* (p) vnode_pager pages paged in */ u_int v_vnodepgsout; /* (p) vnode pager pages paged out */ u_int v_intrans; /* (p) intransit blocking page faults */ - u_int v_reactivated; /* (f) pages reactivated from free list */ + u_int v_reactivated; /* (p) pages reactivated by the pagedaemon */ u_int v_pdwakeups; /* (p) times daemon has awaken from sleep */ u_int v_pdpages; /* (p) pages analyzed by daemon */ + u_int v_pdshortfalls; /* (p) page reclamation shortfalls */ u_int v_tcached; /* (p) total pages cached */ u_int v_dfree; /* (p) pages freed by daemon */ @@ -96,6 +97,7 @@ struct vmmeter { u_int v_active_count; /* (q) pages active */ u_int v_inactive_target; /* (c) pages desired inactive */ u_int v_inactive_count; /* (q) pages inactive */ + u_int v_laundry_count; /* (q) pages eligible for laundering */ u_int v_cache_count; /* (f) pages on cache queue */ u_int v_pageout_free_min; /* (c) min pages reserved for kernel */ u_int v_interrupt_free_min; /* (c) reserved pages for int code */ @@ -111,7 +113,6 @@ struct vmmeter { u_int v_vforkpages; /* (p) VM pages affected by vfork() */ u_int v_rforkpages; /* (p) VM pages affected by rfork() */ u_int v_kthreadpages; /* (p) VM pages affected by fork() by kernel */ - u_int v_spare[2]; }; #ifdef _KERNEL @@ -184,6 +185,25 @@ vm_paging_needed(void) (u_int)vm_pageout_wakeup_thresh); } +/* + * Return the number of pages we need to launder. + * A positive number indicates that we have a shortfall of clean pages. + */ +static inline int +vm_laundry_target(void) +{ + + return (vm_paging_target()); +} + +/* + * Obtain the value of a per-CPU counter. + */ +#define VM_METER_PCPU_CNT(member) \ + vm_meter_cnt(__offsetof(struct vmmeter, member)) + +u_int vm_meter_cnt(size_t); + #endif /* systemwide totals computed every five seconds */ Modified: stable/11/sys/vm/_vm_radix.h ============================================================================== --- stable/11/sys/vm/_vm_radix.h Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/_vm_radix.h Tue May 23 07:27:30 2017 (r318716) @@ -36,12 +36,8 @@ */ struct vm_radix { uintptr_t rt_root; - uint8_t rt_flags; }; -#define RT_INSERT_INPROG 0x01 -#define RT_TRIE_MODIFIED 0x02 - #ifdef _KERNEL static __inline boolean_t Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/swap_pager.c Tue May 23 07:27:30 2017 (r318716) @@ -1126,7 +1126,7 @@ swap_pager_getpages(vm_object_t object, if (shift != 0) { for (i = 1; i <= shift; i++) { p = vm_page_alloc(object, m[0]->pindex - i, - VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + VM_ALLOC_NORMAL); if (p == NULL) { /* Shift allocated pages to the left. */ for (j = 0; j < i - 1; j++) @@ -1144,8 +1144,7 @@ swap_pager_getpages(vm_object_t object, if (rahead != NULL) { for (i = 0; i < *rahead; i++) { p = vm_page_alloc(object, - m[reqcount - 1]->pindex + i + 1, - VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + m[reqcount - 1]->pindex + i + 1, VM_ALLOC_NORMAL); if (p == NULL) break; bp->b_pages[shift + reqcount + i] = p; @@ -1549,17 +1548,18 @@ swp_pager_async_iodone(struct buf *bp) * For write success, clear the dirty * status, then finish the I/O ( which decrements the * busy count and possibly wakes waiter's up ). + * A page is only written to swap after a period of + * inactivity. Therefore, we do not expect it to be + * reused. */ KASSERT(!pmap_page_is_write_mapped(m), ("swp_pager_async_iodone: page %p is not write" " protected", m)); vm_page_undirty(m); + vm_page_lock(m); + vm_page_deactivate_noreuse(m); + vm_page_unlock(m); vm_page_sunbusy(m); - if (vm_page_count_severe()) { - vm_page_lock(m); - vm_page_try_to_cache(m); - vm_page_unlock(m); - } } } @@ -1635,12 +1635,15 @@ swap_pager_isswapped(vm_object_t object, /* * SWP_PAGER_FORCE_PAGEIN() - force a swap block to be paged in * - * This routine dissociates the page at the given index within a - * swap block from its backing store, paging it in if necessary. - * If the page is paged in, it is placed in the inactive queue, - * since it had its backing store ripped out from under it. - * We also attempt to swap in all other pages in the swap block, - * we only guarantee that the one at the specified index is + * This routine dissociates the page at the given index within an object + * from its backing store, paging it in if it does not reside in memory. + * If the page is paged in, it is marked dirty and placed in the laundry + * queue. The page is marked dirty because it no longer has backing + * store. It is placed in the laundry queue because it has not been + * accessed recently. Otherwise, it would already reside in memory. + * + * We also attempt to swap in all other pages in the swap block. + * However, we only guarantee that the one at the specified index is * paged in. * * XXX - The code to page the whole block in doesn't work, so we @@ -1669,7 +1672,7 @@ swp_pager_force_pagein(vm_object_t objec vm_object_pip_wakeup(object); vm_page_dirty(m); vm_page_lock(m); - vm_page_deactivate(m); + vm_page_launder(m); vm_page_unlock(m); vm_page_xunbusy(m); vm_pager_page_unswapped(m); Modified: stable/11/sys/vm/vm_fault.c ============================================================================== --- stable/11/sys/vm/vm_fault.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_fault.c Tue May 23 07:27:30 2017 (r318716) @@ -485,11 +485,12 @@ int vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold) { - vm_prot_t prot; - vm_object_t next_object; struct faultstate fs; struct vnode *vp; + vm_object_t next_object, retry_object; vm_offset_t e_end, e_start; + vm_pindex_t retry_pindex; + vm_prot_t prot, retry_prot; int ahead, alloc_req, behind, cluster_offset, error, era, faultcount; int locked, nera, result, rv; u_char behavior; @@ -755,8 +756,7 @@ RetryFault:; unlock_and_deallocate(&fs); VM_WAITPFAULT; goto RetryFault; - } else if (fs.m->valid == VM_PAGE_BITS_ALL) - break; + } } readrest: @@ -1143,10 +1143,6 @@ readrest: * lookup. */ if (!fs.lookup_still_valid) { - vm_object_t retry_object; - vm_pindex_t retry_pindex; - vm_prot_t retry_prot; - if (!vm_map_trylock_read(fs.map)) { release_page(&fs); unlock_and_deallocate(&fs); Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_map.c Tue May 23 07:27:30 2017 (r318716) @@ -1858,9 +1858,7 @@ vm_map_submap( * limited number of page mappings are created at the low-end of the * specified address range. (For this purpose, a superpage mapping * counts as one page mapping.) Otherwise, all resident pages within - * the specified address range are mapped. Because these mappings are - * being created speculatively, cached pages are not reactivated and - * mapped. + * the specified address range are mapped. */ static void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, Modified: stable/11/sys/vm/vm_meter.c ============================================================================== --- stable/11/sys/vm/vm_meter.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_meter.c Tue May 23 07:27:30 2017 (r318716) @@ -209,29 +209,37 @@ vmtotal(SYSCTL_HANDLER_ARGS) } /* - * vcnt() - accumulate statistics from all cpus and the global cnt - * structure. + * vm_meter_cnt() - accumulate statistics from all cpus and the global cnt + * structure. * * The vmmeter structure is now per-cpu as well as global. Those * statistics which can be kept on a per-cpu basis (to avoid cache * stalls between cpus) can be moved to the per-cpu vmmeter. Remaining * statistics, such as v_free_reserved, are left in the global * structure. - * - * (sysctl_oid *oidp, void *arg1, int arg2, struct sysctl_req *req) */ -static int -vcnt(SYSCTL_HANDLER_ARGS) +u_int +vm_meter_cnt(size_t offset) { - int count = *(int *)arg1; - int offset = (char *)arg1 - (char *)&vm_cnt; + struct pcpu *pcpu; + u_int count; int i; + count = *(u_int *)((char *)&vm_cnt + offset); CPU_FOREACH(i) { - struct pcpu *pcpu = pcpu_find(i); - count += *(int *)((char *)&pcpu->pc_cnt + offset); + pcpu = pcpu_find(i); + count += *(u_int *)((char *)&pcpu->pc_cnt + offset); } - return (SYSCTL_OUT(req, &count, sizeof(int))); + return (count); +} + +static int +cnt_sysctl(SYSCTL_HANDLER_ARGS) +{ + u_int count; + + count = vm_meter_cnt((char *)arg1 - (char *)&vm_cnt); + return (SYSCTL_OUT(req, &count, sizeof(count))); } SYSCTL_PROC(_vm, VM_TOTAL, vmtotal, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE, @@ -246,8 +254,8 @@ SYSCTL_NODE(_vm_stats, OID_AUTO, misc, C #define VM_STATS(parent, var, descr) \ SYSCTL_PROC(parent, OID_AUTO, var, \ - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, &vm_cnt.var, 0, vcnt, \ - "IU", descr) + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, &vm_cnt.var, 0, \ + cnt_sysctl, "IU", descr) #define VM_STATS_VM(var, descr) VM_STATS(_vm_stats_vm, var, descr) #define VM_STATS_SYS(var, descr) VM_STATS(_vm_stats_sys, var, descr) @@ -271,9 +279,10 @@ VM_STATS_VM(v_vnodeout, "Vnode pager pag VM_STATS_VM(v_vnodepgsin, "Vnode pages paged in"); VM_STATS_VM(v_vnodepgsout, "Vnode pages paged out"); VM_STATS_VM(v_intrans, "In transit page faults"); -VM_STATS_VM(v_reactivated, "Pages reactivated from free list"); +VM_STATS_VM(v_reactivated, "Pages reactivated by pagedaemon"); VM_STATS_VM(v_pdwakeups, "Pagedaemon wakeups"); VM_STATS_VM(v_pdpages, "Pages analyzed by pagedaemon"); +VM_STATS_VM(v_pdshortfalls, "Page reclamation shortfalls"); VM_STATS_VM(v_tcached, "Total pages cached"); VM_STATS_VM(v_dfree, "Pages freed by pagedaemon"); VM_STATS_VM(v_pfree, "Pages freed by exiting processes"); @@ -288,6 +297,7 @@ VM_STATS_VM(v_wire_count, "Wired pages") VM_STATS_VM(v_active_count, "Active pages"); VM_STATS_VM(v_inactive_target, "Desired inactive pages"); VM_STATS_VM(v_inactive_count, "Inactive pages"); +VM_STATS_VM(v_laundry_count, "Pages eligible for laundering"); VM_STATS_VM(v_cache_count, "Pages on cache queue"); VM_STATS_VM(v_pageout_free_min, "Min pages reserved for kernel"); VM_STATS_VM(v_interrupt_free_min, "Reserved pages for interrupt code"); Modified: stable/11/sys/vm/vm_mmap.c ============================================================================== --- stable/11/sys/vm/vm_mmap.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_mmap.c Tue May 23 07:27:30 2017 (r318716) @@ -849,9 +849,6 @@ RestartScan: pindex = OFF_TO_IDX(current->offset + (addr - current->start)); m = vm_page_lookup(object, pindex); - if (m == NULL && - vm_page_is_cached(object, pindex)) - mincoreinfo = MINCORE_INCORE; if (m != NULL && m->valid == 0) m = NULL; if (m != NULL) Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_object.c Tue May 23 07:27:30 2017 (r318716) @@ -178,9 +178,6 @@ vm_object_zdtor(void *mem, int size, voi ("object %p has reservations", object)); #endif - KASSERT(vm_object_cache_is_empty(object), - ("object %p has cached pages", - object)); KASSERT(object->paging_in_progress == 0, ("object %p paging_in_progress = %d", object, object->paging_in_progress)); @@ -208,12 +205,9 @@ vm_object_zinit(void *mem, int size, int object->type = OBJT_DEAD; object->ref_count = 0; object->rtree.rt_root = 0; - object->rtree.rt_flags = 0; object->paging_in_progress = 0; object->resident_page_count = 0; object->shadow_count = 0; - object->cache.rt_root = 0; - object->cache.rt_flags = 0; mtx_lock(&vm_object_list_mtx); TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); @@ -792,8 +786,6 @@ vm_object_terminate(vm_object_t object) if (__predict_false(!LIST_EMPTY(&object->rvq))) vm_reserv_break_all(object); #endif - if (__predict_false(!vm_object_cache_is_empty(object))) - vm_page_cache_free(object, 0, 0); KASSERT(object->cred == NULL || object->type == OBJT_DEFAULT || object->type == OBJT_SWAP, @@ -1135,13 +1127,6 @@ shadowlookup: } else if ((tobject->flags & OBJ_UNMANAGED) != 0) goto unlock_tobject; m = vm_page_lookup(tobject, tpindex); - if (m == NULL && advise == MADV_WILLNEED) { - /* - * If the page is cached, reactivate it. - */ - m = vm_page_alloc(tobject, tpindex, VM_ALLOC_IFCACHED | - VM_ALLOC_NOBUSY); - } if (m == NULL) { /* * There may be swap even if there is no backing page @@ -1371,7 +1356,7 @@ retry: goto retry; } - /* vm_page_rename() will handle dirty and cache. */ + /* vm_page_rename() will dirty the page. */ if (vm_page_rename(m, new_object, idx)) { VM_OBJECT_WUNLOCK(new_object); VM_OBJECT_WUNLOCK(orig_object); @@ -1406,19 +1391,6 @@ retry: swap_pager_copy(orig_object, new_object, offidxstart, 0); TAILQ_FOREACH(m, &new_object->memq, listq) vm_page_xunbusy(m); - - /* - * Transfer any cached pages from orig_object to new_object. - * If swap_pager_copy() found swapped out pages within the - * specified range of orig_object, then it changed - * new_object's type to OBJT_SWAP when it transferred those - * pages to new_object. Otherwise, new_object's type - * should still be OBJT_DEFAULT and orig_object should not - * contain any cached pages within the specified range. - */ - if (__predict_false(!vm_object_cache_is_empty(orig_object))) - vm_page_cache_transfer(orig_object, offidxstart, - new_object); } VM_OBJECT_WUNLOCK(orig_object); VM_OBJECT_WUNLOCK(new_object); @@ -1471,6 +1443,13 @@ vm_object_scan_all_shadowed(vm_object_t backing_object = object->backing_object; + /* + * Initial conditions: + * + * We do not want to have to test for the existence of swap + * pages in the backing object. XXX but with the new swapper this + * would be pretty easy to do. + */ if (backing_object->type != OBJT_DEFAULT && backing_object->type != OBJT_SWAP) return (false); @@ -1622,8 +1601,7 @@ vm_object_collapse_scan(vm_object_t obje * backing object to the main object. * * If the page was mapped to a process, it can remain mapped - * through the rename. vm_page_rename() will handle dirty and - * cache. + * through the rename. vm_page_rename() will dirty the page. */ if (vm_page_rename(p, object, new_pindex)) { next = vm_object_collapse_scan_wait(object, NULL, next, @@ -1758,13 +1736,6 @@ vm_object_collapse(vm_object_t object) backing_object, object, OFF_TO_IDX(object->backing_object_offset), TRUE); - - /* - * Free any cached pages from backing_object. - */ - if (__predict_false( - !vm_object_cache_is_empty(backing_object))) - vm_page_cache_free(backing_object, 0, 0); } /* * Object now shadows whatever backing_object did. @@ -1893,7 +1864,7 @@ vm_object_page_remove(vm_object_t object (options & (OBJPR_CLEANONLY | OBJPR_NOTMAPPED)) == OBJPR_NOTMAPPED, ("vm_object_page_remove: illegal options for object %p", object)); if (object->resident_page_count == 0) - goto skipmemq; + return; vm_object_pip_add(object, 1); again: p = vm_page_find_least(object, start); @@ -1950,9 +1921,6 @@ next: vm_page_unlock(p); } vm_object_pip_wakeup(object); -skipmemq: - if (__predict_false(!vm_object_cache_is_empty(object))) - vm_page_cache_free(object, start, end); } /* @@ -2333,9 +2301,9 @@ sysctl_vm_object_list(SYSCTL_HANDLER_ARG * sysctl is only meant to give an * approximation of the system anyway. */ - if (m->queue == PQ_ACTIVE) + if (vm_page_active(m)) kvo.kvo_active++; - else if (m->queue == PQ_INACTIVE) + else if (vm_page_inactive(m)) kvo.kvo_inactive++; } Modified: stable/11/sys/vm/vm_object.h ============================================================================== --- stable/11/sys/vm/vm_object.h Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_object.h Tue May 23 07:27:30 2017 (r318716) @@ -79,17 +79,6 @@ * * vm_object_t Virtual memory object. * - * The root of cached pages pool is protected by both the per-object lock - * and the free pages queue mutex. - * On insert in the cache radix trie, the per-object lock is expected - * to be already held and the free pages queue mutex will be - * acquired during the operation too. - * On remove and lookup from the cache radix trie, only the free - * pages queue mutex is expected to be locked. - * These rules allow for reliably checking for the presence of cached - * pages with only the per-object lock held, thereby reducing contention - * for the free pages queue mutex. - * * List of locks * (c) const until freed * (o) per-object lock @@ -118,7 +107,6 @@ struct vm_object { vm_ooffset_t backing_object_offset;/* Offset in backing object */ TAILQ_ENTRY(vm_object) pager_object_list; /* list of all objects of this pager type */ LIST_HEAD(, vm_reserv) rvq; /* list of reservations */ - struct vm_radix cache; /* (o + f) root of the cache page radix trie */ void *handle; union { /* @@ -306,13 +294,6 @@ void vm_object_pip_wakeup(vm_object_t ob void vm_object_pip_wakeupn(vm_object_t object, short i); void vm_object_pip_wait(vm_object_t object, char *waitid); -static __inline boolean_t -vm_object_cache_is_empty(vm_object_t object) -{ - - return (vm_radix_is_empty(&object->cache)); -} - void umtx_shm_object_init(vm_object_t object); void umtx_shm_object_terminated(vm_object_t object); extern int umtx_shm_vnobj_persistent; Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_page.c Tue May 23 07:27:30 2017 (r318716) @@ -155,8 +155,7 @@ static int vm_pageout_pages_needed; static uma_zone_t fakepg_zone; -static struct vnode *vm_page_alloc_init(vm_page_t m); -static void vm_page_cache_turn_free(vm_page_t m); +static void vm_page_alloc_check(vm_page_t m); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(uint8_t queue, vm_page_t m); static void vm_page_free_wakeup(void); @@ -391,6 +390,10 @@ vm_page_domain_init(struct vm_domain *vm "vm active pagequeue"; *__DECONST(u_int **, &vmd->vmd_pagequeues[PQ_ACTIVE].pq_vcnt) = &vm_cnt.v_active_count; + *__DECONST(char **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_name) = + "vm laundry pagequeue"; + *__DECONST(int **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_vcnt) = + &vm_cnt.v_laundry_count; vmd->vmd_page_count = 0; vmd->vmd_free_count = 0; vmd->vmd_segs = 0; @@ -1136,9 +1139,7 @@ void vm_page_dirty_KBI(vm_page_t m) { - /* These assertions refer to this operation by its public name. */ - KASSERT((m->flags & PG_CACHED) == 0, - ("vm_page_dirty: page in cache!")); + /* Refer to this operation by its public name. */ KASSERT(m->valid == VM_PAGE_BITS_ALL, ("vm_page_dirty: page is invalid!")); m->dirty = VM_PAGE_BITS_ALL; @@ -1262,9 +1263,8 @@ vm_page_insert_radixdone(vm_page_t m, vm /* * vm_page_remove: * - * Removes the given mem entry from the object/offset-page - * table and the object page list, but do not invalidate/terminate - * the backing store. + * Removes the specified page from its containing object, but does not + * invalidate any backing storage. * * The object must be locked. The page must be locked if it is managed. */ @@ -1272,6 +1272,7 @@ void vm_page_remove(vm_page_t m) { vm_object_t object; + vm_page_t mrem; if ((m->oflags & VPO_UNMANAGED) == 0) vm_page_assert_locked(m); @@ -1280,11 +1281,12 @@ vm_page_remove(vm_page_t m) VM_OBJECT_ASSERT_WLOCKED(object); if (vm_page_xbusied(m)) vm_page_xunbusy_maybelocked(m); + mrem = vm_radix_remove(&object->rtree, m->pindex); + KASSERT(mrem == m, ("removed page %p, expected page %p", mrem, m)); /* * Now remove from the object's list of backed pages. */ - vm_radix_remove(&object->rtree, m->pindex); TAILQ_REMOVE(&object->memq, m, listq); /* @@ -1433,9 +1435,7 @@ vm_page_replace(vm_page_t mnew, vm_objec * * Note: we *always* dirty the page. It is necessary both for the * fact that we moved it, and because we may be invalidating - * swap. If the page is on the cache, we have to deactivate it - * or vm_page_dirty() will panic. Dirty pages are not allowed - * on the cache. + * swap. * * The objects must be locked. */ @@ -1481,142 +1481,6 @@ vm_page_rename(vm_page_t m, vm_object_t } /* - * Convert all of the given object's cached pages that have a - * pindex within the given range into free pages. If the value - * zero is given for "end", then the range's upper bound is - * infinity. If the given object is backed by a vnode and it - * transitions from having one or more cached pages to none, the - * vnode's hold count is reduced. - */ -void -vm_page_cache_free(vm_object_t object, vm_pindex_t start, vm_pindex_t end) -{ - vm_page_t m; - boolean_t empty; - - mtx_lock(&vm_page_queue_free_mtx); - if (__predict_false(vm_radix_is_empty(&object->cache))) { - mtx_unlock(&vm_page_queue_free_mtx); - return; - } - while ((m = vm_radix_lookup_ge(&object->cache, start)) != NULL) { - if (end != 0 && m->pindex >= end) - break; - vm_radix_remove(&object->cache, m->pindex); - vm_page_cache_turn_free(m); - } - empty = vm_radix_is_empty(&object->cache); - mtx_unlock(&vm_page_queue_free_mtx); - if (object->type == OBJT_VNODE && empty) - vdrop(object->handle); -} - -/* - * Returns the cached page that is associated with the given - * object and offset. If, however, none exists, returns NULL. - * - * The free page queue must be locked. - */ -static inline vm_page_t -vm_page_cache_lookup(vm_object_t object, vm_pindex_t pindex) -{ - - mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - return (vm_radix_lookup(&object->cache, pindex)); -} - -/* - * Remove the given cached page from its containing object's - * collection of cached pages. - * - * The free page queue must be locked. - */ -static void -vm_page_cache_remove(vm_page_t m) -{ - - mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - KASSERT((m->flags & PG_CACHED) != 0, - ("vm_page_cache_remove: page %p is not cached", m)); - vm_radix_remove(&m->object->cache, m->pindex); - m->object = NULL; - vm_cnt.v_cache_count--; -} - -/* - * Transfer all of the cached pages with offset greater than or - * equal to 'offidxstart' from the original object's cache to the - * new object's cache. However, any cached pages with offset - * greater than or equal to the new object's size are kept in the - * original object. Initially, the new object's cache must be - * empty. Offset 'offidxstart' in the original object must - * correspond to offset zero in the new object. - * - * The new object must be locked. - */ -void -vm_page_cache_transfer(vm_object_t orig_object, vm_pindex_t offidxstart, - vm_object_t new_object) -{ - vm_page_t m; - - /* - * Insertion into an object's collection of cached pages - * requires the object to be locked. In contrast, removal does - * not. - */ - VM_OBJECT_ASSERT_WLOCKED(new_object); - KASSERT(vm_radix_is_empty(&new_object->cache), - ("vm_page_cache_transfer: object %p has cached pages", - new_object)); - mtx_lock(&vm_page_queue_free_mtx); - while ((m = vm_radix_lookup_ge(&orig_object->cache, - offidxstart)) != NULL) { - /* - * Transfer all of the pages with offset greater than or - * equal to 'offidxstart' from the original object's - * cache to the new object's cache. - */ - if ((m->pindex - offidxstart) >= new_object->size) - break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 23 07:31:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B38D7A8AE; Tue, 23 May 2017 07:31:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3ADF100C; Tue, 23 May 2017 07:31:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7V3E5078993; Tue, 23 May 2017 07:31:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7V3A9078992; Tue, 23 May 2017 07:31:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230731.v4N7V3A9078992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318717 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:31:04 -0000 Author: ngie Date: Tue May 23 07:31:03 2017 New Revision: 318717 URL: https://svnweb.freebsd.org/changeset/base/318717 Log: cap_enter(2): fix manlint issues - Sort SEE ALSO section appropriately. - Correct section for sysctl(9). Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/sys/cap_enter.2 Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Tue May 23 07:27:30 2017 (r318716) +++ head/lib/libc/sys/cap_enter.2 Tue May 23 07:31:03 2017 (r318717) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2016 +.Dd May 23, 2017 .Dt CAP_ENTER 2 .Os .Sh NAME @@ -144,11 +144,11 @@ points outside the process's allocated a .Xr cap_fcntls_limit 2 , .Xr cap_ioctls_limit 2 , .Xr cap_rights_limit 2 , -.Xr procctl 2 , -.Xr sysctl 2 , .Xr fexecve 2 , +.Xr procctl 2 , .Xr cap_sandboxed 3 , -.Xr capsicum 4 +.Xr capsicum 4 , +.Xr sysctl 9 .Sh HISTORY Support for capabilities and capabilities mode was developed as part of the .Tn TrustedBSD From owner-svn-src-all@freebsd.org Tue May 23 07:32:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0D86D7AA4F; Tue, 23 May 2017 07:32:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F6412DD; Tue, 23 May 2017 07:32:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7WvVZ082580; Tue, 23 May 2017 07:32:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7WvV3082579; Tue, 23 May 2017 07:32:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230732.v4N7WvV3082579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318718 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:32:58 -0000 Author: ngie Date: Tue May 23 07:32:57 2017 New Revision: 318718 URL: https://svnweb.freebsd.org/changeset/base/318718 Log: rctl_add_rule(2): fix manlint warnings - Fix commas (either missing or misused) after .Nm entries in SYNOPSIS Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/sys/rctl_add_rule.2 Modified: head/lib/libc/sys/rctl_add_rule.2 ============================================================================== --- head/lib/libc/sys/rctl_add_rule.2 Tue May 23 07:31:03 2017 (r318717) +++ head/lib/libc/sys/rctl_add_rule.2 Tue May 23 07:32:57 2017 (r318718) @@ -28,10 +28,10 @@ .Dt RCTL_ADD_RULE 2 .Os .Sh NAME -.Nm rctl_add_rule, -.Nm rctl_get_limits -.Nm rctl_get_racct, -.Nm rctl_get_rules, +.Nm rctl_add_rule , +.Nm rctl_get_limits , +.Nm rctl_get_racct , +.Nm rctl_get_rules , .Nm rctl_remove_rule .Nd manipulate and query the resource limits database .Sh LIBRARY From owner-svn-src-all@freebsd.org Tue May 23 07:44:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A710D7AF71; Tue, 23 May 2017 07:44:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AB3E1A54; Tue, 23 May 2017 07:44:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7iiLc086933; Tue, 23 May 2017 07:44:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7ii1S086932; Tue, 23 May 2017 07:44:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230744.v4N7ii1S086932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318719 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:44:45 -0000 Author: ngie Date: Tue May 23 07:44:43 2017 New Revision: 318719 URL: https://svnweb.freebsd.org/changeset/base/318719 Log: open(2): fix manlint warnings - Sort SEE ALSO .Xr entries. - Sort sections (HISTORY comes after STANDARDS). Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Tue May 23 07:32:57 2017 (r318718) +++ head/lib/libc/sys/open.2 Tue May 23 07:44:43 2017 (r318719) @@ -490,7 +490,6 @@ was called and the process is in capabil is an absolute path or contained "..". .El .Sh SEE ALSO -.Xr capsicum 4 , .Xr chmod 2 , .Xr close 2 , .Xr dup 2 , @@ -503,16 +502,8 @@ is an absolute path or contained "..". .Xr read 2 , .Xr umask 2 , .Xr write 2 , -.Xr fopen 3 -.Sh HISTORY -The -.Fn open -function appeared in -.At v6 . -The -.Fn openat -function was introduced in -.Fx 8.0 . +.Xr fopen 3 , +.Xr capsicum 4 .Sh STANDARDS These functions are specified by .St -p1003.1-2008 . @@ -529,6 +520,15 @@ when is set in flags and the final component of pathname is a symbolic link to distinguish it from the case of too many symbolic link traversals in one of its non-final components. +.Sh HISTORY +The +.Fn open +function appeared in +.At v6 . +The +.Fn openat +function was introduced in +.Fx 8.0 . .Sh BUGS The Open Group Extended API Set 2 specification requires that the test for whether From owner-svn-src-all@freebsd.org Tue May 23 07:45:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91ABDD7AFE0; Tue, 23 May 2017 07:45:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 621361BD2; Tue, 23 May 2017 07:45:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7jT8Q087009; Tue, 23 May 2017 07:45:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7jT33087008; Tue, 23 May 2017 07:45:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230745.v4N7jT33087008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318720 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:45:30 -0000 Author: ngie Date: Tue May 23 07:45:29 2017 New Revision: 318720 URL: https://svnweb.freebsd.org/changeset/base/318720 Log: ptrace(2): clean up trailing whitespace Reviewed by: make manlint MFC after: 2 weeks Modified: head/lib/libc/sys/ptrace.2 Modified: head/lib/libc/sys/ptrace.2 ============================================================================== --- head/lib/libc/sys/ptrace.2 Tue May 23 07:44:43 2017 (r318719) +++ head/lib/libc/sys/ptrace.2 Tue May 23 07:45:29 2017 (r318720) @@ -166,7 +166,7 @@ new child processes will execute without This event flag controls tracing of LWP .Pq kernel thread creation and destruction. -When this event is enabled, +When this event is enabled, new LWPs will stop and report an event with .Dv PL_FLAG_BORN set before executing their first instruction, @@ -215,7 +215,7 @@ or includes only .Dv PTRACE_EXEC events. -All other event flags are disabled. +All other event flags are disabled. .Pp The .Fa request From owner-svn-src-all@freebsd.org Tue May 23 07:46:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47744D7A034; Tue, 23 May 2017 07:46:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1938F1D1E; Tue, 23 May 2017 07:46:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7kBt5087076; Tue, 23 May 2017 07:46:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7kBKH087075; Tue, 23 May 2017 07:46:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230746.v4N7kBKH087075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318721 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:46:12 -0000 Author: ngie Date: Tue May 23 07:46:10 2017 New Revision: 318721 URL: https://svnweb.freebsd.org/changeset/base/318721 Log: kill(2): add missing section for sysctl(9) Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc/sys/kill.2 Modified: head/lib/libc/sys/kill.2 ============================================================================== --- head/lib/libc/sys/kill.2 Tue May 23 07:45:29 2017 (r318720) +++ head/lib/libc/sys/kill.2 Tue May 23 07:46:10 2017 (r318721) @@ -71,7 +71,7 @@ A single exception is the signal SIGCONT to any process with the same session ID as the sender. In addition, if the .Va security.bsd.conservative_signals -.Xr sysctl +.Xr sysctl 9 is set to 1, the user is not a super-user, and the receiver is set-uid, then only job control and terminal control signals may From owner-svn-src-all@freebsd.org Tue May 23 07:50:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D97FD7A12D; Tue, 23 May 2017 07:50:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A8DA1EF8; Tue, 23 May 2017 07:50:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7oh1b087352; Tue, 23 May 2017 07:50:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7ohBT087335; Tue, 23 May 2017 07:50:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230750.v4N7ohBT087335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 07:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318722 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:50:44 -0000 Author: ngie Date: Tue May 23 07:50:42 2017 New Revision: 318722 URL: https://svnweb.freebsd.org/changeset/base/318722 Log: sade(8): start new sentence on new line Reported by: make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/bsdinstall/partedit/sade.8 Modified: head/usr.sbin/bsdinstall/partedit/sade.8 ============================================================================== --- head/usr.sbin/bsdinstall/partedit/sade.8 Tue May 23 07:46:10 2017 (r318721) +++ head/usr.sbin/bsdinstall/partedit/sade.8 Tue May 23 07:50:42 2017 (r318722) @@ -59,7 +59,8 @@ first appeared in .Fx 6.3 as a utility encapsulating features from the .Xr sysinstall 8 -installer. It was replaced in +installer. +It was replaced in .Fx 10.0 with the equivalent part of .Xr bsdinstall 8 . From owner-svn-src-all@freebsd.org Tue May 23 08:01:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5A0AD7A587; Tue, 23 May 2017 08:01:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 085C014AB; Tue, 23 May 2017 08:01:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N81CEt092106; Tue, 23 May 2017 08:01:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N81CWA092090; Tue, 23 May 2017 08:01:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705230801.v4N81CWA092090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 08:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318723 - head/usr.sbin/bsdinstall X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:01:14 -0000 Author: ngie Date: Tue May 23 08:01:11 2017 New Revision: 318723 URL: https://svnweb.freebsd.org/changeset/base/318723 Log: bsdinstall(8): fix manpage issues - Start new sentences on new lines. - Separate e.g. (more of an igor thing) with commas, and rewrite some examples not to be enclosed in parentheses. Reported by: igor, make manlint MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/bsdinstall/bsdinstall.8 Modified: head/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- head/usr.sbin/bsdinstall/bsdinstall.8 Tue May 23 07:50:42 2017 (r318722) +++ head/usr.sbin/bsdinstall/bsdinstall.8 Tue May 23 08:01:11 2017 (r318723) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2014 +.Dd May 23, 2017 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -39,17 +39,18 @@ .Sh DESCRIPTION .Nm is used for installation of new systems, both for system setup from -installation media (e.g. CD-ROMs) and for use on live systems to prepare +installation media, e.g., CD-ROMs, and for use on live systems to prepare VM images and jails. .Pp Much like .Xr make 1 , Nm -takes a target and possible parameters of the target as arguments. If -invoked with no arguments, it will invoke the +takes a target and possible parameters of the target as arguments. +If invoked with no arguments, it will invoke the .Cm auto target, which provides a standard interactive installation, invoking the -others in sequence. To perform a scripted installation, these subtargets -can be invoked separately by an installation script. +others in sequence. +To perform a scripted installation, +these subtargets can be invoked separately by an installation script. .Sh OPTIONS .Nm supports the following options, global to all targets: @@ -115,7 +116,8 @@ If is set, also configures the network interfaces of the current system to match. .It Cm autopart Provides the installer's interactive guided disk partitioner for single-disk -installations. Defaults to UFS. +installations. +Defaults to UFS. .It Cm zfsboot Provides an alternative ZFS-only automatic interactive disk partitioner. Creates a single @@ -135,8 +137,8 @@ to encrypt the disk. Provides the installer's interactive manual disk partitioner with an interface identical to .Xr sade 8 . -Supports multiple disks as well as UFS, ZFS, and FAT file systems. ZFS -is set up with one pool and dataset per partition. +Supports multiple disks as well as UFS, ZFS, and FAT file systems. +ZFS is set up with one pool and dataset per partition. .It Cm scriptedpart Ar parameters Sets up disks like .Cm autopart @@ -150,14 +152,16 @@ Each disk setup is specified by a three- .Op Ar scheme .Op Ar {partitions} .Pp -Multiple disk setups are separated by semicolons. The +Multiple disk setups are separated by semicolons. +The .Ar disk argument specifies the disk on which to operate (which will be erased), while the .Ar scheme argument specifies the .Xr gpart 8 -partition scheme to apply to the disk. If +partition scheme to apply to the disk. +If .Ar scheme is unspecified, .Cm scriptedpart @@ -167,7 +171,8 @@ The argument is also optional and specifies how to partition .Ar disk . It consists of a comma-separated list of partitions to create enclosed in -curly braces. Each partition declaration takes the form +curly braces. +Each partition declaration takes the form .Pp .Ar size .Ar type @@ -178,15 +183,17 @@ specifies the partition size to create i can be appended to specify kilobytes, megabytes, and gigabytes respectively), while the .Em auto -keyword causes the partition to take all the remaining space on the disk. The +keyword causes the partition to take all the remaining space on the disk. +The .Ar type option chooses the .Xr gpart 8 -filesystem type (e.g. freebsd-ufs, freebsd-zfs, or freebsd-swap). +filesystem type, e.g., freebsd-ufs, freebsd-zfs, or freebsd-swap. The optional .Ar mount point argument sets where the created partition is to be mounted in the installed -system. As an example, a typical invocation looks like: +system. +As an example, a typical invocation looks like: .Pp bsdinstall scriptedpart ada0 { 20G freebsd-ufs /, 4G freebsd-swap, 20G freebsd-ufs /var, auto freebsd-ufs /usr } .Pp @@ -238,37 +245,43 @@ Reads a small amount of data from .Pa /dev/random and stores it in a file in the new system's root directory. .It Cm config -Installs the configuration files destined for the new system (e.g. rc.conf +Installs the configuration files destined for the new system, e.g., +.Xr rc.conf 5 fragments generated by .Cm netconfig , etc.) onto the new system. .El .Sh ENVIRONMENT VARIABLES The following environment variables control various aspects of the installation -process. Many are used internally during installation and have reasonable -default values for most installation scenarios. Others are set by various -interactive user prompts, and can be usefully overridden when making scripted -or customized installers. +process. +Many are used internally during installation and have reasonable default values +for most installation scenarios. +Others are set by various interactive user prompts, and can be usefully +overridden when making scripted or customized installers. .Bl -tag -width ".Ev BSDINSTALL_DISTSITE" .It Ev DISTRIBUTIONS -The set of distributions to install (e.g. "base kernel ports"). Default: none +The set of distributions to install, e.g., "base kernel ports". +Default: none .It Ev BSDINSTALL_DISTDIR The directory in which the distribution files can be found (or to which they -should be downloaded). Default: +should be downloaded). +Default: .Pa /usr/freebsd-dist .It Ev BSDINSTALL_DISTSITE URL from which the distribution files should be downloaded if they are not already present in the directory defined by .Ev BSDINSTALL_DISTDIR . This should be a full path to the files, including architecture and release -names. Most targets (e.g. +names. +Most targets, e.g., .Cm auto and -.Cm jail ) +.Cm jail , that prompt for a .Fx mirror will skip that step if this variable is already defined in the -environment. Example: +environment. +Example: .Pa ftp://ftp.freebsd.org/pub/FreeBSD/releases/powerpc/powerpc64/9.1-RELEASE .It Ev BSDINSTALL_CHROOT The directory into which the distribution files should be unpacked and the @@ -276,23 +289,26 @@ directory at which the root file system Default: .Pa /mnt .It Ev BSDINSTALL_LOG -Path to a log file for the installation. Default: +Path to a log file for the installation. +Default: .Pa /tmp/bsdinstall_log .It Ev BSDINSTALL_TMPETC Directory where files destined for the new system's .Pa /etc will be stored until the .Cm config -target is executed. If this directory does not already exist, it will be -created. Default: +target is executed. +If this directory does not already exist, it will be created. +Default: .Pa /tmp/bsdinstall_etc .It Ev BSDINSTALL_TMPBOOT Directory where files destined for the new system's .Pa /boot will be stored until the .Cm config -target is executed. If this directory does not already exist, it will be -created. Default: +target is executed. +If this directory does not already exist, it will be created. +Default: .Pa /tmp/bsdinstall_boot .El .Sh SCRIPTING @@ -307,8 +323,9 @@ a shell script run under .Xr chroot 8 in the newly installed system before .Nm -exits. The two parts are separated by the usual script header (#!), which -also sets the interpreter for the setup script. +exits. +The two parts are separated by the usual script header (#!), which also sets +the interpreter for the setup script. .Pp A typical bsdinstall script looks like this: .Bd -literal -offset indent @@ -326,19 +343,21 @@ On release media, such a script placed at .Pa /etc/installerconfig will be run at boot time and the system will be rebooted automatically after -the installation has completed. This can be used for unattended network -installation of new systems; see +the installation has completed. +This can be used for unattended network installation of new systems; see .Xr diskless 8 for details. .Ss PREAMBLE -The preamble consists of installer settings. These control global installation -parameters (see +The preamble consists of installer settings. +These control global installation parameters (see .Sx ENVIRONMENT VARIABLES ) -as well as disk partitioning. The preamble is interpreted as a +as well as disk partitioning. +The preamble is interpreted as a .Xr sh 1 -script run at the very beginning of the install. If more complicated behavior -than setting these variables is desired, arbitrary commands can be run here -to extend the installer. In addition to the variables in +script run at the very beginning of the install. +If more complicated behavior than setting these variables is desired, +arbitrary commands can be run here to extend the installer. +In addition to the variables in .Sx ENVIRONMENT VARIABLES , in particular .Ev DISTRIBUTIONS , @@ -358,13 +377,14 @@ instead of .Ev PARTITIONS . .Ss SETUP SCRIPT Following the preamble is an optional shell script, beginning with a #! -declaration. This script will be run at the end of the installation process -inside a +declaration. +This script will be run at the end of the installation process inside a .Xr chroot 8 environment in the newly installed system and can be used to set up -configuration files, install packages, etc. Note that newly configured -system services (e.g. networking) have not been started in the installed -system at this time and only installation host services are available. +configuration files, install packages, etc. +Note that newly configured system services, e.g., networking have not +been started in the installed system at this time and only installation +host services are available. .Sh HISTORY This version of .Nm From owner-svn-src-all@freebsd.org Tue May 23 08:01:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE439D7A5B5; Tue, 23 May 2017 08:01:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D1F6154D; Tue, 23 May 2017 08:01:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N81OEq092800; Tue, 23 May 2017 08:01:24 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N81OYI092799; Tue, 23 May 2017 08:01:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230801.v4N81OYI092799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318724 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:01:25 -0000 Author: trasz Date: Tue May 23 08:01:24 2017 New Revision: 318724 URL: https://svnweb.freebsd.org/changeset/base/318724 Log: MFC r317901: Improve error reporting in resizewin(1). Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:01:11 2017 (r318723) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:01:24 2017 (r318724) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -87,8 +88,7 @@ main(__unused int argc, __unused char ** gettimeofday(&now, NULL); timersub(&now, &then, &now); if (now.tv_sec >= 2) { - fprintf(stderr, "\n\n\nTimeout reading from terminal\n"); - fprintf(stderr, "Read %d bytes, %s\n", cnt, data); + warnx("timeout reading from terminal"); err = 1; goto out; } @@ -104,7 +104,7 @@ main(__unused int argc, __unused char ** cnt++; if (cnt == sizeof(data) - 2) { - fprintf(stderr, "Response too long\n"); + warnx("response too long"); err = 1; goto out; } @@ -113,7 +113,7 @@ main(__unused int argc, __unused char ** /* Parse */ if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) { err = 1; - fprintf(stderr, "Unable to parse response\n"); + warnx("unable to parse response"); goto out; } From owner-svn-src-all@freebsd.org Tue May 23 08:02:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14A61D7A77F; Tue, 23 May 2017 08:02:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0278197D; Tue, 23 May 2017 08:02:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N82Lvk094984; Tue, 23 May 2017 08:02:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N82Ljl094983; Tue, 23 May 2017 08:02:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230802.v4N82Ljl094983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:02:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318725 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:02:23 -0000 Author: trasz Date: Tue May 23 08:02:21 2017 New Revision: 318725 URL: https://svnweb.freebsd.org/changeset/base/318725 Log: MFC r317905: Rename a variable, hopefully fixing build after r317901. Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:01:24 2017 (r318724) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:02:21 2017 (r318725) @@ -52,11 +52,11 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, err; + int ret, fd, cnt, error; char data[20]; struct timeval then, now; - err = 0; + error = 0; if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1) exit(1); @@ -72,7 +72,7 @@ main(__unused int argc, __unused char ** exit(1); if (write(fd, query, sizeof(query)) != sizeof(query)) { - err = 1; + error = 1; goto out; } @@ -89,14 +89,14 @@ main(__unused int argc, __unused char ** timersub(&now, &then, &now); if (now.tv_sec >= 2) { warnx("timeout reading from terminal"); - err = 1; + error = 1; goto out; } usleep(20000); continue; } - err = 1; + error = 1; goto out; } if (data[cnt] == 'R') @@ -105,25 +105,25 @@ main(__unused int argc, __unused char ** cnt++; if (cnt == sizeof(data) - 2) { warnx("response too long"); - err = 1; + error = 1; goto out; } } /* Parse */ if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) { - err = 1; + error = 1; warnx("unable to parse response"); goto out; } /* Finally, what we want */ if (ioctl(fd, TIOCSWINSZ, &w) == -1) - err = 1; + error = 1; out: /* Restore echo */ tcsetattr(fd, TCSANOW, &old); close(fd); - exit(err); + exit(error); } From owner-svn-src-all@freebsd.org Tue May 23 08:04:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DD5CD7A816; Tue, 23 May 2017 08:04:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1EFD1B00; Tue, 23 May 2017 08:04:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N84aM9095113; Tue, 23 May 2017 08:04:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N84a2Y095112; Tue, 23 May 2017 08:04:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230804.v4N84a2Y095112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318726 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:04:38 -0000 Author: trasz Date: Tue May 23 08:04:36 2017 New Revision: 318726 URL: https://svnweb.freebsd.org/changeset/base/318726 Log: MFC r317909: Make resizewin(1) discard the terminal queues, to lower the chance for "unable to parse response" error which happens when youre typing too fast for the machine you're running it on. Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:02:21 2017 (r318725) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:04:36 2017 (r318726) @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, error; + int ret, fd, cnt, error, what; char data[20]; struct timeval then, now; @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** if (tcsetattr(fd, TCSANOW, &new) == -1) exit(1); + /* Discard input received so far */ + what = FREAD | FWRITE; + error = ioctl(fd, TIOCFLUSH, &what); + if (error != 0) + warn("ioctl"); + if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; goto out; From owner-svn-src-all@freebsd.org Tue May 23 08:06:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E97D7A89F; Tue, 23 May 2017 08:06:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 676C31C6E; Tue, 23 May 2017 08:06:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N860XU095233; Tue, 23 May 2017 08:06:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N860X4095232; Tue, 23 May 2017 08:06:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230806.v4N860X4095232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318727 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:06:01 -0000 Author: trasz Date: Tue May 23 08:06:00 2017 New Revision: 318727 URL: https://svnweb.freebsd.org/changeset/base/318727 Log: MFC r317933: Use tcflush(3) instead of (nonstandard) TIOCFLUSH. Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:04:36 2017 (r318726) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:06:00 2017 (r318727) @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, error, what; + int ret, fd, cnt, error; char data[20]; struct timeval then, now; @@ -72,10 +72,9 @@ main(__unused int argc, __unused char ** exit(1); /* Discard input received so far */ - what = FREAD | FWRITE; - error = ioctl(fd, TIOCFLUSH, &what); + error = tcflush(fd, TCIOFLUSH); if (error != 0) - warn("ioctl"); + warn("tcflush"); if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; From owner-svn-src-all@freebsd.org Tue May 23 08:07:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29578D7A907; Tue, 23 May 2017 08:07:41 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DECBB1DAF; Tue, 23 May 2017 08:07:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N87dAe095352; Tue, 23 May 2017 08:07:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N87d04095350; Tue, 23 May 2017 08:07:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230807.v4N87d04095350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318728 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:07:41 -0000 Author: trasz Date: Tue May 23 08:07:39 2017 New Revision: 318728 URL: https://svnweb.freebsd.org/changeset/base/318728 Log: MFC rr317934: Add resizewin -z. It makes resizewin not do anything if the terminal size is already set to something other than zero. It's supposed to be called from eg /etc/profile - it's not neccessary to query terminal size when logging in over the network, because the protocol used already takes care of this, but it's neccessary when logging over a serial line. Modified: stable/11/usr.bin/resizewin/resizewin.1 stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.1 ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:06:00 2017 (r318727) +++ stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:07:39 2017 (r318728) @@ -27,17 +27,27 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2016 +.Dd May 8, 2017 .Dt RESIZEWIN 1 .Os .Sh NAME .Nm resizewin .Nd update the kernel window size for the current TTY +.Sh SYNOPSIS +.Nm +.Op Fl z .Sh DESCRIPTION Query the terminal emulator window size with the .Dv TIOCSWINSZ ioctl and set the window size known by the kernel to the new values. The terminal is assumed to be VT100/ANSI compatible. +.Pp +The following options are available: +.Bl -tag -width ".Fl z" +.It Fl z +Do nothing unless the current kernel terminal size is zero. +.El +.Pp .Nm is functionally similar to .Xr resize 1 , Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:06:00 2017 (r318727) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:07:39 2017 (r318728) @@ -47,20 +47,50 @@ static const char query[] = "\033[999;999H" /* Move cursor */ "\033[6n" /* Get cursor position */ "\0338"; /* Restore cursor position */ + +static void +usage(void) +{ + + fprintf(stderr, "usage: resizewin [-z]\n"); + exit(1); +} + int -main(__unused int argc, __unused char **argv) +main(int argc, char **argv) { struct termios old, new; struct winsize w; - int ret, fd, cnt, error; + int ret, fd, ch, cnt, error, zflag; char data[20]; struct timeval then, now; error = 0; + zflag = 0; + while ((ch = getopt(argc, argv, "z")) != -1) { + switch (ch) { + case 'z': + zflag = 1; + break; + case '?': + default: + usage(); + } + } + argc -= optind; + if (argc != 0) + usage(); if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1) exit(1); + if (zflag) { + if (ioctl(fd, TIOCGWINSZ, &w) == -1) + exit(1); + if (w.ws_row != 0 && w.ws_col != 0) + exit(0); + } + /* Disable echo */ if (tcgetattr(fd, &old) == -1) exit(1); From owner-svn-src-all@freebsd.org Tue May 23 08:08:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F3DBD7A9AC; Tue, 23 May 2017 08:08:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E61A1F14; Tue, 23 May 2017 08:08:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N88Ndi095432; Tue, 23 May 2017 08:08:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N88NKE095431; Tue, 23 May 2017 08:08:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230808.v4N88NKE095431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:08:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318729 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:08:24 -0000 Author: trasz Date: Tue May 23 08:08:23 2017 New Revision: 318729 URL: https://svnweb.freebsd.org/changeset/base/318729 Log: MFC r317935: Sort variable declarations; no functional changes. Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:07:39 2017 (r318728) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:08:23 2017 (r318729) @@ -61,9 +61,9 @@ main(int argc, char **argv) { struct termios old, new; struct winsize w; - int ret, fd, ch, cnt, error, zflag; - char data[20]; struct timeval then, now; + char data[20]; + int ch, cnt, error, fd, ret, zflag; error = 0; zflag = 0; From owner-svn-src-all@freebsd.org Tue May 23 08:09:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DF06D7AA30; Tue, 23 May 2017 08:09:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9B351069; Tue, 23 May 2017 08:09:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N894Qn095511; Tue, 23 May 2017 08:09:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N8940P095510; Tue, 23 May 2017 08:09:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230809.v4N8940P095510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318730 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:09:06 -0000 Author: trasz Date: Tue May 23 08:09:04 2017 New Revision: 318730 URL: https://svnweb.freebsd.org/changeset/base/318730 Log: MFC r318116: Random updates to resizewin(1) man page. Modified: stable/11/usr.bin/resizewin/resizewin.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.1 ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:08:23 2017 (r318729) +++ stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:09:04 2017 (r318730) @@ -27,27 +27,38 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2017 +.Dd May 9, 2017 .Dt RESIZEWIN 1 .Os .Sh NAME .Nm resizewin -.Nd update the kernel window size for the current TTY +.Nd update terminal size .Sh SYNOPSIS .Nm .Op Fl z .Sh DESCRIPTION -Query the terminal emulator window size with the +The +.Nm +utility +queries the terminal emulator for the current window size and updates +the size known to the kernel using the .Dv TIOCSWINSZ -ioctl and set the window size known by the kernel to the new values. -The terminal is assumed to be VT100/ANSI compatible. +ioctl. .Pp The following options are available: .Bl -tag -width ".Fl z" .It Fl z Do nothing unless the current kernel terminal size is zero. +This is useful when run from user's profile (shell startup) scripts: +querying the window size is required for serial lines, but not when +logging in over the network, as protocols like TELNET or SSH already +handle the terminal size by themselves. .El .Pp +After a terminal window has been resized, running +.Nm +updates the kernel's window size to match the new size. +.Pp .Nm is functionally similar to .Xr resize 1 , @@ -56,21 +67,18 @@ which is part of the distribution. However, .Nm -only works with VT100/ANSI-compatible terminals and does -not emit commands to set environment variables. +only works with VT100/ANSI-compatible terminals and directly sets +the terminal size instead of emitting commands to set environment variables. .Pp -After a terminal window has been resized, running -.Nm -updates the kernel's window size to match the new size. -.Pp -Note that virtually all modern terninals support VT100/ANSI escape -sequences, including xterm, konsole, gnome-terminal iTerm, +The terminal is assumed to be VT100/ANSI compatible. +The VT100/ANSI escape sequences are supported by virtually all modern +terminals; this include xterm, konsole, gnome-terminal, iTerm, Terminal.app, and PuTTY. .Sh SEE ALSO -.Xr resize 1 , -.Xr stty 1 +.Xr stty 1 , +.Xr tty 4 .Sh HISTORY The .Nm command first appeared in -.Fx 11 . +.Fx 11.0 . From owner-svn-src-all@freebsd.org Tue May 23 08:09:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C330CD7AAA0; Tue, 23 May 2017 08:09:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9252711EF; Tue, 23 May 2017 08:09:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N89iUg095586; Tue, 23 May 2017 08:09:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N89inn095585; Tue, 23 May 2017 08:09:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230809.v4N89inn095585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318731 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:09:45 -0000 Author: trasz Date: Tue May 23 08:09:44 2017 New Revision: 318731 URL: https://svnweb.freebsd.org/changeset/base/318731 Log: MFC r318138: Revert to pre-r318116 wording to not give the false impression that setting the kernels' idea of terminal size is somehow an alternative to environment variables. Modified: stable/11/usr.bin/resizewin/resizewin.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.1 ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:09:04 2017 (r318730) +++ stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:09:44 2017 (r318731) @@ -67,8 +67,8 @@ which is part of the distribution. However, .Nm -only works with VT100/ANSI-compatible terminals and directly sets -the terminal size instead of emitting commands to set environment variables. +only works with VT100/ANSI-compatible terminals and does not emit +commands to set environment variables. .Pp The terminal is assumed to be VT100/ANSI compatible. The VT100/ANSI escape sequences are supported by virtually all modern From owner-svn-src-all@freebsd.org Tue May 23 08:10:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35572D7AB13; Tue, 23 May 2017 08:10:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0545E134E; Tue, 23 May 2017 08:10:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N8Aa2J095691; Tue, 23 May 2017 08:10:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N8Aah7095690; Tue, 23 May 2017 08:10:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230810.v4N8Aah7095690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318732 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:10:37 -0000 Author: trasz Date: Tue May 23 08:10:35 2017 New Revision: 318732 URL: https://svnweb.freebsd.org/changeset/base/318732 Log: MFC r318481: Language fixes. Modified: stable/11/usr.bin/resizewin/resizewin.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.1 ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:09:44 2017 (r318731) +++ stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:10:35 2017 (r318732) @@ -49,7 +49,7 @@ The following options are available: .Bl -tag -width ".Fl z" .It Fl z Do nothing unless the current kernel terminal size is zero. -This is useful when run from user's profile (shell startup) scripts: +This is useful when run from a user's profile (shell startup) scripts: querying the window size is required for serial lines, but not when logging in over the network, as protocols like TELNET or SSH already handle the terminal size by themselves. @@ -72,7 +72,7 @@ commands to set environment variables. .Pp The terminal is assumed to be VT100/ANSI compatible. The VT100/ANSI escape sequences are supported by virtually all modern -terminals; this include xterm, konsole, gnome-terminal, iTerm, +terminals, including xterm, konsole, gnome-terminal, iTerm, Terminal.app, and PuTTY. .Sh SEE ALSO .Xr stty 1 , From owner-svn-src-all@freebsd.org Tue May 23 08:11:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B407D7ACA5; Tue, 23 May 2017 08:11:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E116315FE; Tue, 23 May 2017 08:11:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N8BtCD098639; Tue, 23 May 2017 08:11:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N8BtuV098638; Tue, 23 May 2017 08:11:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230811.v4N8BtuV098638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318733 - stable/11/bin/stty X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:11:57 -0000 Author: trasz Date: Tue May 23 08:11:55 2017 New Revision: 318733 URL: https://svnweb.freebsd.org/changeset/base/318733 Log: MFC r317904: .Xr resizewin from stty(1) man page. Modified: stable/11/bin/stty/stty.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/stty/stty.1 ============================================================================== --- stable/11/bin/stty/stty.1 Tue May 23 08:10:35 2017 (r318732) +++ stable/11/bin/stty/stty.1 Tue May 23 08:11:55 2017 (r318733) @@ -588,6 +588,7 @@ Same as the control character .Sh EXIT STATUS .Ex -std .Sh SEE ALSO +.Xr resizewin 1 , .Xr termios 4 .Sh STANDARDS The From owner-svn-src-all@freebsd.org Tue May 23 08:41:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9341FD784BE; Tue, 23 May 2017 08:41:42 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26DAC13CD; Tue, 23 May 2017 08:41:42 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id g15so18010770wmc.2; Tue, 23 May 2017 01:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xuYvszDsPVBQKA7dC/HJVDM2nwYpy7dHUh7h4nIXzT0=; b=ZsVwLdFAHHEBH0DqvNPpmcmxX4phGcAL/sBbIsclbuYgigNf9yq7ogihHI3sBgCBVG 1bQcL9X81di5ACNoHMQ6FdAvDgJubGdwXIEb45vqXatwrQbKGtCsmWkFeDsmnnocXFsa tOEeDBjeUkoc9/rINCtq0ueMkIftqcjAAI9rWwBv7m8u/BMhTIx4BYiJvKk8uDln4jBb oaXHGIjxdLpojCzi3LYiTw9bYf+pOaqUK41mLXqMxUjN/vgdnzLriBT2/xVcQxMssqM2 t1cegDgbbxNBX+28s6SdU2AFyKO2IjmJRBFLe4oRbOq716yCB43g+xI2RSZLIc4lDyRQ QHPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=xuYvszDsPVBQKA7dC/HJVDM2nwYpy7dHUh7h4nIXzT0=; b=OYrIn/vn+blAleuTp6IrIGdMwYRL0NEy25lvshuoH8cSzQ/lhyiVjB+LE102qIDtld +LdkSGcDTddw3WBwtdoMOf2aZmkGLK4RqHYAasuyFebpC3B6ZnZqlqNuwuZF5rIJogY8 YcHj2qdVop9cY379FLiABK8hjEEZisLLH0JfBJ3boqCAtPsDZvWojG9Vaa+eqipwCGry OND3tHQftgj0vhPJcaI8WsVA/TVPuBo8yIKeosvwfiUPWkK71+FDmMiqVo+kVOgrVRr9 S8vI/lh5tTzcG5dWpsNuA5WWyVoMk3W8jT7IQsQA/LFcr6CYUNLIpdx/V08yXVjGjjcO +EDQ== X-Gm-Message-State: AODbwcAZUIpF4EZE86KyTy73R/lu12Z5alcl1m5Q9rPReGwKPFQ0vhmd lnkfDf5Bmo95IjC/ X-Received: by 10.80.187.68 with SMTP id y62mr20440846ede.51.1495528900290; Tue, 23 May 2017 01:41:40 -0700 (PDT) Received: from localhost (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id g29sm24993eda.43.2017.05.23.01.41.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2017 01:41:39 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Tue, 23 May 2017 09:41:36 +0100 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Nick Hibma Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r318630 - stable/11/sbin/dhclient Message-ID: <20170523084136.m4apjlyyvpaoqpwt@dhcp-3-128.uk.xensource.com> References: <201705221028.v4MASHNe041436@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705221028.v4MASHNe041436@repo.freebsd.org> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:41:42 -0000 On Mon, May 22, 2017 at 10:28:17AM +0000, Nick Hibma wrote: > Author: n_hibma > Date: Mon May 22 10:28:17 2017 > New Revision: 318630 > URL: https://svnweb.freebsd.org/changeset/base/318630 > > Log: > MFC: > > ------------------------------------------------------------------------ > r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines > > Fix the output of very large rebind, renew and lease time options in > lease file. > > Some routers set very large values for rebind time (Netgear) and these > are erroneously reported as negative in the leasefile. This was due to a > wrong printf format specification of %ld for an unsigned long on 32-bit > platforms. > > ------------------------------------------------------------------------ > r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines > > Fix handling of large DHCP expiry values. > > They would overflow a signed 32-bit time_t on 32 bit architectures. This > was taken care of, but a compiler optimisation makes this behave > erratically. This could be resolved by adding a -fwrapv flag, but > instead we can check the value before adding the current timestamp to > it. > > In the lease file values are still wrong though: > > option dhcp-rebinding-time -644245096; > > PR: 218980 > > Modified: > stable/11/sbin/dhclient/dhclient.c > stable/11/sbin/dhclient/options.c This is missing the mergeinfo in stable/11. Roger. From owner-svn-src-all@freebsd.org Tue May 23 09:01:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FDDED78EFD; Tue, 23 May 2017 09:01:50 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8EDD1046; Tue, 23 May 2017 09:01:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N91ns2016186; Tue, 23 May 2017 09:01:49 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N91mE0016182; Tue, 23 May 2017 09:01:48 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705230901.v4N91mE0016182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 23 May 2017 09:01:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318734 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 09:01:50 -0000 Author: ae Date: Tue May 23 09:01:48 2017 New Revision: 318734 URL: https://svnweb.freebsd.org/changeset/base/318734 Log: Fix possible double releasing for SA reference. There are two possible ways how crypto callback are called: directly from caller and deffered from crypto thread. For inbound packets the direct call chain is the following: IPSEC_INPUT() method -> ipsec_common_input() -> xform_input() -> -> crypto_dispatch() -> crypto_invoke() -> crypto_done() -> -> xform_input_cb() -> ipsec[46]_common_input_cb() -> netisr_queue(). The SA reference is held while crypto processing is not finished. The error handling code wrongly expected that crypto callback always called from the crypto thread context, and it did SA reference releasing in xform_input_cb(). But when the crypto callback called directly, in case of error (e.g. data authentification failed) the error handling in ipsec_common_input() also did SA reference releasing. To fix this, remove error handling from ipsec_common_input() and do it in xform_input() before crypto_dispatch(). PR: 219356 MFC after: 10 days Modified: head/sys/netipsec/ipsec_input.c head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Tue May 23 08:11:55 2017 (r318733) +++ head/sys/netipsec/ipsec_input.c Tue May 23 09:01:48 2017 (r318734) @@ -223,8 +223,6 @@ ipsec_common_input(struct mbuf *m, int s * everything else. */ error = (*sav->tdb_xform->xf_input)(m, sav, skip, protoff); - if (error != 0) - key_freesav(&sav); return (error); } Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Tue May 23 08:11:55 2017 (r318733) +++ head/sys/netipsec/xform_ah.c Tue May 23 09:01:48 2017 (r318734) @@ -566,8 +566,8 @@ ah_input(struct mbuf *m, struct secasvar if (ah == NULL) { DPRINTF(("ah_input: cannot pullup header\n")); AHSTAT_INC(ahs_hdrops); /*XXX*/ - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } /* Check replay window, if applicable. */ @@ -578,8 +578,8 @@ ah_input(struct mbuf *m, struct secasvar AHSTAT_INC(ahs_replay); DPRINTF(("%s: packet replay failure: %s\n", __func__, ipsec_sa2str(sav, buf, sizeof(buf)))); - m_freem(m); - return (EACCES); + error = EACCES; + goto bad; } cryptoid = sav->tdb_cryptoid; SECASVAR_UNLOCK(sav); @@ -595,8 +595,8 @@ ah_input(struct mbuf *m, struct secasvar ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), (u_long) ntohl(sav->spi))); AHSTAT_INC(ahs_badauthl); - m_freem(m); - return EACCES; + error = EACCES; + goto bad; } AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl); @@ -606,8 +606,8 @@ ah_input(struct mbuf *m, struct secasvar DPRINTF(("%s: failed to acquire crypto descriptor\n", __func__)); AHSTAT_INC(ahs_crypto); - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } crda = crp->crp_desc; @@ -629,8 +629,8 @@ ah_input(struct mbuf *m, struct secasvar DPRINTF(("%s: failed to allocate xform_data\n", __func__)); AHSTAT_INC(ahs_crypto); crypto_freereq(crp); - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } /* @@ -650,6 +650,7 @@ ah_input(struct mbuf *m, struct secasvar AHSTAT_INC(ahs_hdrops); free(xd, M_XDATA); crypto_freereq(crp); + key_freesav(&sav); return (error); } @@ -668,6 +669,10 @@ ah_input(struct mbuf *m, struct secasvar xd->skip = skip; xd->cryptoid = cryptoid; return (crypto_dispatch(crp)); +bad: + m_freem(m); + key_freesav(&sav); + return (error); } /* Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Tue May 23 08:11:55 2017 (r318733) +++ head/sys/netipsec/xform_esp.c Tue May 23 09:01:48 2017 (r318734) @@ -272,18 +272,18 @@ esp_input(struct mbuf *m, struct secasva struct newesp *esp; uint8_t *ivp; uint64_t cryptoid; - int plen, alen, hlen; + int alen, error, hlen, plen; IPSEC_ASSERT(sav != NULL, ("null SA")); IPSEC_ASSERT(sav->tdb_encalgxform != NULL, ("null encoding xform")); + error = EINVAL; /* Valid IP Packet length ? */ if ( (skip&3) || (m->m_pkthdr.len&3) ){ DPRINTF(("%s: misaligned packet, skip %u pkt len %u", __func__, skip, m->m_pkthdr.len)); ESPSTAT_INC(esps_badilen); - m_freem(m); - return EINVAL; + goto bad; } /* XXX don't pullup, just copy header */ IP6_EXTHDR_GET(esp, struct newesp *, m, skip, sizeof (struct newesp)); @@ -314,8 +314,7 @@ esp_input(struct mbuf *m, struct secasva ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), (u_long)ntohl(sav->spi))); ESPSTAT_INC(esps_badilen); - m_freem(m); - return EINVAL; + goto bad; } /* @@ -328,8 +327,8 @@ esp_input(struct mbuf *m, struct secasva DPRINTF(("%s: packet replay check for %s\n", __func__, ipsec_sa2str(sav, buf, sizeof(buf)))); ESPSTAT_INC(esps_replay); - m_freem(m); - return (EACCES); + error = EACCES; + goto bad; } } cryptoid = sav->tdb_cryptoid; @@ -344,8 +343,8 @@ esp_input(struct mbuf *m, struct secasva DPRINTF(("%s: failed to acquire crypto descriptors\n", __func__)); ESPSTAT_INC(esps_crypto); - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } /* Get IPsec-specific opaque pointer */ @@ -354,8 +353,8 @@ esp_input(struct mbuf *m, struct secasva DPRINTF(("%s: failed to allocate xform_data\n", __func__)); ESPSTAT_INC(esps_crypto); crypto_freereq(crp); - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } if (esph != NULL) { @@ -425,6 +424,10 @@ esp_input(struct mbuf *m, struct secasva crde->crd_alg = espx->type; return (crypto_dispatch(crp)); +bad: + m_freem(m); + key_freesav(&sav); + return (error); } /* Modified: head/sys/netipsec/xform_ipcomp.c ============================================================================== --- head/sys/netipsec/xform_ipcomp.c Tue May 23 08:11:55 2017 (r318733) +++ head/sys/netipsec/xform_ipcomp.c Tue May 23 09:01:48 2017 (r318734) @@ -194,34 +194,35 @@ ipcomp_input(struct mbuf *m, struct seca struct cryptop *crp; struct ipcomp *ipcomp; caddr_t addr; - int hlen = IPCOMP_HLENGTH; + int error, hlen = IPCOMP_HLENGTH; /* * Check that the next header of the IPComp is not IPComp again, before * doing any real work. Given it is not possible to do double * compression it means someone is playing tricks on us. */ + error = ENOBUFS; if (m->m_len < skip + hlen && (m = m_pullup(m, skip + hlen)) == NULL) { IPCOMPSTAT_INC(ipcomps_hdrops); /*XXX*/ DPRINTF(("%s: m_pullup failed\n", __func__)); - return (ENOBUFS); + key_freesav(&sav); + return (error); } addr = (caddr_t) mtod(m, struct ip *) + skip; ipcomp = (struct ipcomp *)addr; if (ipcomp->comp_nxt == IPPROTO_IPCOMP) { - m_freem(m); IPCOMPSTAT_INC(ipcomps_pdrops); /* XXX have our own stats? */ DPRINTF(("%s: recursive compression detected\n", __func__)); - return (EINVAL); + error = EINVAL; + goto bad; } /* Get crypto descriptors */ crp = crypto_getreq(1); if (crp == NULL) { - m_freem(m); DPRINTF(("%s: no crypto descriptors\n", __func__)); IPCOMPSTAT_INC(ipcomps_crypto); - return ENOBUFS; + goto bad; } /* Get IPsec-specific opaque pointer */ xd = malloc(sizeof(*xd), M_XDATA, M_NOWAIT | M_ZERO); @@ -229,8 +230,7 @@ ipcomp_input(struct mbuf *m, struct seca DPRINTF(("%s: cannot allocate xform_data\n", __func__)); IPCOMPSTAT_INC(ipcomps_crypto); crypto_freereq(crp); - m_freem(m); - return ENOBUFS; + goto bad; } crdc = crp->crp_desc; @@ -259,6 +259,10 @@ ipcomp_input(struct mbuf *m, struct seca SECASVAR_UNLOCK(sav); return crypto_dispatch(crp); +bad: + m_freem(m); + key_freesav(&sav); + return (error); } /* From owner-svn-src-all@freebsd.org Tue May 23 09:05:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5470D7901E; Tue, 23 May 2017 09:05:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE51139B; Tue, 23 May 2017 09:05:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4N95dqF010707 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 23 May 2017 12:05:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4N95dqF010707 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4N95daD010705; Tue, 23 May 2017 12:05:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 23 May 2017 12:05:39 +0300 From: Konstantin Belousov To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318721 - head/lib/libc/sys Message-ID: <20170523090539.GZ1622@kib.kiev.ua> References: <201705230746.v4N7kBKH087075@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705230746.v4N7kBKH087075@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 09:05:48 -0000 On Tue, May 23, 2017 at 07:46:11AM +0000, Ngie Cooper wrote: > Author: ngie > Date: Tue May 23 07:46:10 2017 > New Revision: 318721 > URL: https://svnweb.freebsd.org/changeset/base/318721 > > Log: > kill(2): add missing section for sysctl(9) > > Reported by: make manlint > MFC after: 2 weeks > Sponsored by: Dell EMC Isilon > > Modified: > head/lib/libc/sys/kill.2 > > Modified: head/lib/libc/sys/kill.2 > ============================================================================== > --- head/lib/libc/sys/kill.2 Tue May 23 07:45:29 2017 (r318720) > +++ head/lib/libc/sys/kill.2 Tue May 23 07:46:10 2017 (r318721) > @@ -71,7 +71,7 @@ A single exception is the signal SIGCONT > to any process with the same session ID as the sender. > In addition, if the > .Va security.bsd.conservative_signals > -.Xr sysctl > +.Xr sysctl 9 Section 9 implies that user must somehow access in-kernel interface to tweak the setting. > is set to 1, the user is not a super-user, and > the receiver is set-uid, then > only job control and terminal control signals may From owner-svn-src-all@freebsd.org Tue May 23 09:20:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5BE2D793A2; Tue, 23 May 2017 09:20:32 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F86E1ABC; Tue, 23 May 2017 09:20:32 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N9KV75024307; Tue, 23 May 2017 09:20:31 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N9KVqk024306; Tue, 23 May 2017 09:20:31 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705230920.v4N9KVqk024306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Tue, 23 May 2017 09:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318735 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 09:20:32 -0000 Author: n_hibma Date: Tue May 23 09:20:31 2017 New Revision: 318735 URL: https://svnweb.freebsd.org/changeset/base/318735 Log: Commit the mergeinfo for the commit to sbin/dhclient. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Tue May 23 09:29:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E72DD796BC; Tue, 23 May 2017 09:29:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A8721F77; Tue, 23 May 2017 09:29:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N9T7Vn028139; Tue, 23 May 2017 09:29:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N9T5g1028124; Tue, 23 May 2017 09:29:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705230929.v4N9T5g1028124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 May 2017 09:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 09:29:08 -0000 Author: kib Date: Tue May 23 09:29:05 2017 New Revision: 318736 URL: https://svnweb.freebsd.org/changeset/base/318736 Log: Commit the 64-bit inode project. Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify struct dirent layout to add d_off, increase the size of d_fileno to 64-bits, increase the size of d_namlen to 16-bits, and change the required alignment. Increase struct statfs f_mntfromname[] and f_mntonname[] array length MNAMELEN to 1024. ABI breakage is mitigated by providing compatibility using versioned symbols, ingenious use of the existing padding in structures, and by employing other tricks. Unfortunately, not everything can be fixed, especially outside the base system. For instance, third-party APIs which pass struct stat around are broken in backward and forward incompatible ways. Kinfo sysctl MIBs ABI is changed in backward-compatible way, but there is no general mechanism to handle other sysctl MIBS which return structures where the layout has changed. It was considered that the breakage is either in the management interfaces, where we usually allow ABI slip, or is not important. Struct xvnode changed layout, no compat shims are provided. For struct xtty, dev_t tty device member was reduced to uint32_t. It was decided that keeping ABI compat in this case is more useful than reporting 64-bit dev_t, for the sake of pstat. Update note: strictly follow the instructions in UPDATING. Build and install the new kernel with COMPAT_FREEBSD11 option enabled, then reboot, and only then install new world. Credits: The 64-bit inode project, also known as ino64, started life many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick (mckusick) then picked up and updated the patch, and acted as a flag-waver. Feedback, suggestions, and discussions were carried by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial ports investigation followed by an exp-run by Antoine Brodin (antoine). Essential and all-embracing testing was done by Peter Holm (pho). The heavy lifting of coordinating all these efforts and bringing the project to completion were done by Konstantin Belousov (kib). Sponsored by: The FreeBSD Foundation (emaste, kib) Differential revision: https://reviews.freebsd.org/D10439 Added: head/lib/libc/gen/devname-compat11.c (contents, props changed) head/lib/libc/gen/fts-compat11.c - copied, changed from r318735, head/lib/libc/gen/fts.c head/lib/libc/gen/fts-compat11.h - copied, changed from r318735, head/include/fts.h head/lib/libc/gen/ftw-compat11.c - copied, changed from r318735, head/lib/libc/gen/ftw.c head/lib/libc/gen/gen-compat.h (contents, props changed) head/lib/libc/gen/getmntinfo-compat11.c - copied, changed from r318735, head/lib/libc/gen/getmntinfo.c head/lib/libc/gen/glob-compat11.c - copied, changed from r318735, head/lib/libc/gen/glob.c head/lib/libc/gen/glob-compat11.h - copied, changed from r318735, head/include/glob.h head/lib/libc/gen/nftw-compat11.c - copied, changed from r318735, head/lib/libc/gen/nftw.c head/lib/libc/gen/readdir-compat11.c - copied, changed from r318735, head/lib/libc/gen/readdir.c head/lib/libc/gen/scandir-compat11.c - copied, changed from r318735, head/lib/libc/gen/scandir.c head/lib/libc/sys/getdents.c (contents, props changed) head/lib/libc/sys/lstat.c (contents, props changed) head/lib/libc/sys/mknod.c (contents, props changed) head/lib/libc/sys/stat.c (contents, props changed) head/lib/libprocstat/libprocstat_compat.c (contents, props changed) Modified: head/cddl/lib/libzfs/Makefile head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h head/contrib/openbsm/libbsm/bsm_wrappers.c head/include/dirent.h head/lib/libarchive/Makefile head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/gen/closedir.c head/lib/libc/gen/fts-compat.c head/lib/libc/gen/fts-compat.h head/lib/libc/gen/gen-private.h head/lib/libc/gen/opendir.c head/lib/libc/gen/readdir.c head/lib/libc/gen/scandir.c head/lib/libc/gen/telldir.h head/lib/libc/include/compat.h head/lib/libc/include/libc_private.h head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/lib/libc/sys/getdirentries.2 head/lib/libc/sys/statfs.2 head/lib/libkvm/kvm_proc.c head/lib/libmilter/Makefile head/lib/libprocstat/Makefile head/lib/libprocstat/Symbol.map head/lib/libprocstat/libprocstat.c head/lib/libprocstat/libprocstat.h head/lib/libufs/libufs.h head/sbin/badsect/badsect.c head/sbin/fsck_ffs/suj.c head/share/man/man5/acct.5 head/share/man/man5/dir.5 head/sys/bsm/audit.h head/sys/cddl/compat/opensolaris/sys/dirent.h head/sys/compat/freebsd32/capabilities.conf head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master head/sys/compat/linux/linux_file.c head/sys/dev/snp/snp.c head/sys/fs/devfs/devfs_devs.c head/sys/fs/devfs/devfs_vnops.c head/sys/fs/fdescfs/fdesc_vnops.c head/sys/fs/nandfs/nandfs_fs.h head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/kern/capabilities.conf head/sys/kern/kern_acct.c head/sys/kern/kern_descrip.c head/sys/kern/kern_proc.c head/sys/kern/makesyscalls.sh head/sys/kern/sys_socket.c head/sys/kern/syscalls.master head/sys/kern/tty.c head/sys/kern/tty_pts.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/nlm/nlm_advlock.c head/sys/security/audit/audit_private.h head/sys/sys/_types.h head/sys/sys/acct.h head/sys/sys/dirent.h head/sys/sys/mount.h head/sys/sys/param.h head/sys/sys/stat.h head/sys/sys/syscallsubr.h head/sys/sys/tty.h head/sys/sys/user.h head/sys/sys/vnode.h head/sys/vm/swap_pager.c head/sys/vm/vm_object.c head/sys/vm/vm_param.h head/usr.bin/kdump/kdump.c head/usr.bin/lastcomm/lastcomm.c head/usr.bin/lastcomm/readrec.c head/usr.sbin/pstat/pstat.c head/usr.sbin/sa/extern.h head/usr.sbin/sa/main.c Modified: head/cddl/lib/libzfs/Makefile ============================================================================== --- head/cddl/lib/libzfs/Makefile Tue May 23 09:20:31 2017 (r318735) +++ head/cddl/lib/libzfs/Makefile Tue May 23 09:29:05 2017 (r318736) @@ -37,6 +37,7 @@ SRCS+= libzfs_changelist.c \ zprop_common.c \ WARNS?= 0 +SHLIB_MAJOR= 3 CSTD= c99 CFLAGS+= -DZFS_NO_ACL CFLAGS+= -I${SRCTOP}/sbin/mount Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc Tue May 23 09:20:31 2017 (r318735) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc Tue May 23 09:29:05 2017 (r318736) @@ -223,7 +223,8 @@ static void kernel_stat_to_stat(struct k uptr internal_stat(const char *path, void *buf) { #if SANITIZER_FREEBSD - return internal_syscall(SYSCALL(stat), path, buf); + return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path, + (uptr)buf, 0); #elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, (uptr)buf, 0); @@ -247,7 +248,8 @@ uptr internal_stat(const char *path, voi uptr internal_lstat(const char *path, void *buf) { #if SANITIZER_FREEBSD - return internal_syscall(SYSCALL(lstat), path, buf); + return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path, + (uptr)buf, AT_SYMLINK_NOFOLLOW); #elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, (uptr)buf, AT_SYMLINK_NOFOLLOW); @@ -590,7 +592,9 @@ uptr internal_getppid() { } uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count) { -#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS +#if SANITIZER_FREEBSD + return internal_syscall(SYSCALL(getdirentries), fd, (uptr)dirp, count, NULL); +#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS return internal_syscall(SYSCALL(getdents64), fd, (uptr)dirp, count); #else return internal_syscall(SYSCALL(getdents), fd, (uptr)dirp, count); Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h Tue May 23 09:20:31 2017 (r318735) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h Tue May 23 09:29:05 2017 (r318736) @@ -489,7 +489,8 @@ namespace __sanitizer { }; #elif SANITIZER_FREEBSD struct __sanitizer_dirent { - unsigned int d_fileno; + unsigned long long d_fileno; + unsigned long long d_off; unsigned short d_reclen; // more fields that we don't care about }; Modified: head/contrib/openbsm/libbsm/bsm_wrappers.c ============================================================================== --- head/contrib/openbsm/libbsm/bsm_wrappers.c Tue May 23 09:20:31 2017 (r318735) +++ head/contrib/openbsm/libbsm/bsm_wrappers.c Tue May 23 09:29:05 2017 (r318736) @@ -264,12 +264,14 @@ audit_set_terminal_host(uint32_t *m) int audit_set_terminal_id(au_tid_t *tid) { + dev_t port; int ret; if (tid == NULL) return (kAUBadParamErr); - if ((ret = audit_set_terminal_port(&tid->port)) != kAUNoErr) + if ((ret = audit_set_terminal_port(&port)) != kAUNoErr) return (ret); + tid->port = port; return (audit_set_terminal_host(&tid->machine)); } Modified: head/include/dirent.h ============================================================================== --- head/include/dirent.h Tue May 23 09:20:31 2017 (r318735) +++ head/include/dirent.h Tue May 23 09:29:05 2017 (r318736) @@ -41,6 +41,25 @@ #include #include +#if __BSD_VISIBLE + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + +#ifndef _SSIZE_T_DECLARED +typedef __ssize_t ssize_t; +#define _SSIZE_T_DECLARED +#endif + +#ifndef _OFF_T_DECLARED +typedef __off_t off_t; +#define _OFF_T_DECLARED +#endif + +#endif /* __BSD_VISIBLE */ + #if __XSI_VISIBLE #ifndef _INO_T_DECLARED @@ -89,8 +108,8 @@ int dirfd(DIR *); #if __BSD_VISIBLE DIR *__opendir2(const char *, int); int fdclosedir(DIR *); -int getdents(int, char *, int); -int getdirentries(int, char *, int, long *); +ssize_t getdents(int, char *, size_t); +ssize_t getdirentries(int, char *, size_t, off_t *); #endif DIR *opendir(const char *); DIR *fdopendir(int); Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Tue May 23 09:20:31 2017 (r318735) +++ head/lib/libarchive/Makefile Tue May 23 09:29:05 2017 (r318736) @@ -11,7 +11,7 @@ CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. # It has no real relation to the libarchive version number. -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 7 CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" CFLAGS+= -I${.OBJDIR} Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Tue May 23 09:20:31 2017 (r318735) +++ head/lib/libc/gen/Makefile.inc Tue May 23 09:29:05 2017 (r318736) @@ -148,7 +148,15 @@ SRCS+= __getosreldate.c \ waitid.c \ wordexp.c .if ${MK_SYMVER} == yes -SRCS+= fts-compat.c \ +SRCS+= devname-compat11.c \ + fts-compat.c \ + fts-compat11.c \ + ftw-compat11.c \ + getmntinfo-compat11.c \ + glob-compat11.c \ + nftw-compat11.c \ + readdir-compat11.c \ + scandir-compat11.c \ unvis-compat.c .endif Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Tue May 23 09:20:31 2017 (r318735) +++ head/lib/libc/gen/Symbol.map Tue May 23 09:29:05 2017 (r318736) @@ -75,8 +75,6 @@ FBSD_1.0 { ctermid; ctermid_r; daemon; - devname; - devname_r; getdiskbyname; dladdr; dlclose; @@ -128,9 +126,6 @@ FBSD_1.0 { setfsent; endfsent; ftok; - ftw; - glob; - globfree; getbootfile; getbsize; cgetset; @@ -163,7 +158,6 @@ FBSD_1.0 { getloadavg; getlogin; getlogin_r; - getmntinfo; setnetgrent; getnetgrent; endnetgrent; @@ -209,7 +203,6 @@ FBSD_1.0 { lrand48; modf; mrand48; - nftw; nice; nlist; nrand48; @@ -220,13 +213,9 @@ FBSD_1.0 { pclose; psignal; raise; - readdir; - readdir_r; readpassphrase; getpass; rewinddir; - scandir; - alphasort; seed48; seekdir; user_from_uid; @@ -314,14 +303,6 @@ FBSD_1.1 { fdevname_r; fdopendir; feature_present; - fts_children; - fts_close; - fts_get_clientptr; - fts_get_stream; - fts_open; - fts_read; - fts_set; - fts_set_clientptr; posix_spawn; posix_spawn_file_actions_addclose; posix_spawn_file_actions_adddup2; @@ -408,13 +389,32 @@ FBSD_1.4 { pthread_mutex_consistent; pthread_mutexattr_getrobust; pthread_mutexattr_setrobust; - scandir_b; stravis; }; FBSD_1.5 { + alphasort; basename; + devname; + devname_r; dirname; + fts_children; + fts_close; + fts_get_clientptr; + fts_get_stream; + fts_open; + fts_read; + fts_set; + fts_set_clientptr; + ftw; + getmntinfo; + glob; + globfree; + nftw; + readdir; + readdir_r; + scandir; + scandir_b; sem_clockwait_np; }; Modified: head/lib/libc/gen/closedir.c ============================================================================== --- head/lib/libc/gen/closedir.c Tue May 23 09:20:31 2017 (r318735) +++ head/lib/libc/gen/closedir.c Tue May 23 09:29:05 2017 (r318736) @@ -59,6 +59,7 @@ fdclosedir(DIR *dirp) dirp->dd_fd = -1; dirp->dd_loc = 0; free((void *)dirp->dd_buf); + free(dirp->dd_compat_de); _reclaim_telldir(dirp); if (__isthreaded) { _pthread_mutex_unlock(&dirp->dd_lock); Added: head/lib/libc/gen/devname-compat11.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/devname-compat11.c Tue May 23 09:29:05 2017 (r318736) @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 2011 Gleb Kurtsou + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include "gen-compat.h" + +char * +freebsd11_devname(uint32_t dev, mode_t type) +{ + + return (devname(dev, type)); +} + +char * +freebsd11_devname_r(uint32_t dev, mode_t type, char *buf, int len) +{ + + return (devname_r(dev, type, buf, len)); +} + +__sym_compat(devname, freebsd11_devname, FBSD_1.0); +__sym_compat(devname_r, freebsd11_devname_r, FBSD_1.0); Modified: head/lib/libc/gen/fts-compat.c ============================================================================== --- head/lib/libc/gen/fts-compat.c Tue May 23 09:20:31 2017 (r318735) +++ head/lib/libc/gen/fts-compat.c Tue May 23 09:29:05 2017 (r318736) @@ -40,15 +40,19 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#define _WANT_FREEBSD11_STATFS #include +#define _WANT_FREEBSD11_STAT #include +#define _WANT_FREEBSD11_DIRENT #include #include #include #include #include #include +#include "gen-compat.h" #include "fts-compat.h" #include "un-namespace.h" @@ -96,8 +100,8 @@ static int fts_ufslinks(FTS *, const FT */ struct _fts_private { FTS ftsp_fts; - struct statfs ftsp_statfs; - dev_t ftsp_dev; + struct freebsd11_statfs ftsp_statfs; + uint32_t ftsp_dev; int ftsp_linksreliable; }; @@ -626,7 +630,7 @@ __fts_set_clientptr_44bsd(FTS *sp, void static FTSENT * fts_build(FTS *sp, int type) { - struct dirent *dp; + struct freebsd11_dirent *dp; FTSENT *p, *head; int nitems; FTSENT *cur, *tail; @@ -738,7 +742,8 @@ fts_build(FTS *sp, int type) /* Read the directory, attaching each entry to the `link' pointer. */ doadjust = 0; - for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) { + for (head = tail = NULL, nitems = 0; + dirp && (dp = freebsd11_readdir(dirp));) { dnamlen = dp->d_namlen; if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) continue; @@ -891,9 +896,9 @@ static u_short fts_stat(FTS *sp, FTSENT *p, int follow) { FTSENT *t; - dev_t dev; - ino_t ino; - struct stat *sbp, sb; + uint32_t dev; + uint32_t ino; + struct freebsd11_stat *sbp, sb; int saved_errno; /* If user needs stat info, stat buffer already allocated. */ @@ -916,16 +921,16 @@ fts_stat(FTS *sp, FTSENT *p, int follow) * fail, set the errno from the stat call. */ if (ISSET(FTS_LOGICAL) || follow) { - if (stat(p->fts_accpath, sbp)) { + if (freebsd11_stat(p->fts_accpath, sbp)) { saved_errno = errno; - if (!lstat(p->fts_accpath, sbp)) { + if (!freebsd11_lstat(p->fts_accpath, sbp)) { errno = 0; return (FTS_SLNONE); } p->fts_errno = saved_errno; goto err; } - } else if (lstat(p->fts_accpath, sbp)) { + } else if (freebsd11_lstat(p->fts_accpath, sbp)) { p->fts_errno = errno; err: memset(sbp, 0, sizeof(struct stat)); return (FTS_NS); @@ -1019,7 +1024,7 @@ fts_alloc(FTS *sp, char *name, int namel struct ftsent_withstat { FTSENT ent; - struct stat statbuf; + struct freebsd11_stat statbuf; }; /* @@ -1145,14 +1150,14 @@ static int fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path) { int ret, oerrno, newfd; - struct stat sb; + struct freebsd11_stat sb; newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0) return (-1); - if (_fstat(newfd, &sb)) { + if (freebsd11_fstat(newfd, &sb)) { ret = -1; goto bail; } @@ -1187,7 +1192,7 @@ fts_ufslinks(FTS *sp, const FTSENT *ent) * avoidance. */ if (priv->ftsp_dev != ent->fts_dev) { - if (statfs(ent->fts_path, &priv->ftsp_statfs) != -1) { + if (freebsd11_statfs(ent->fts_path, &priv->ftsp_statfs) != -1) { priv->ftsp_dev = ent->fts_dev; priv->ftsp_linksreliable = 0; for (cpp = ufslike_filesystems; *cpp; cpp++) { Modified: head/lib/libc/gen/fts-compat.h ============================================================================== --- head/lib/libc/gen/fts-compat.h Tue May 23 09:20:31 2017 (r318735) +++ head/lib/libc/gen/fts-compat.h Tue May 23 09:29:05 2017 (r318736) @@ -37,7 +37,7 @@ typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ struct _ftsent **fts_array; /* sort array */ - dev_t fts_dev; /* starting device # */ + uint32_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ int fts_pathlen; /* sizeof(path) */ @@ -82,9 +82,9 @@ typedef struct _ftsent { u_short fts_pathlen; /* strlen(fts_path) */ u_short fts_namelen; /* strlen(fts_name) */ - ino_t fts_ino; /* inode */ - dev_t fts_dev; /* device */ - nlink_t fts_nlink; /* link count */ + uint32_t fts_ino; /* inode */ + uint32_t fts_dev; /* device */ + uint16_t fts_nlink; /* link count */ #define FTS_ROOTPARENTLEVEL -1 #define FTS_ROOTLEVEL 0 @@ -117,7 +117,7 @@ typedef struct _ftsent { #define FTS_SKIP 4 /* discard node */ u_short fts_instr; /* fts_set() instructions */ - struct stat *fts_statp; /* stat(2) information */ + struct freebsd11_stat *fts_statp; /* stat(2) information */ char *fts_name; /* file name */ FTS *fts_fts; /* back pointer to main FTS */ } FTSENT; Copied and modified: head/lib/libc/gen/fts-compat11.c (from r318735, head/lib/libc/gen/fts.c) ============================================================================== --- head/lib/libc/gen/fts.c Tue May 23 09:20:31 2017 (r318735, copy source) +++ head/lib/libc/gen/fts-compat11.c Tue May 23 09:29:05 2017 (r318736) @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: fts.c,v 1.22 1999/10/03 19:22:22 millert Exp $ + * from: $OpenBSD: fts.c,v 1.22 1999/10/03 19:22:22 millert Exp $ */ #if 0 @@ -40,9 +40,12 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#define _WANT_FREEBSD11_STATFS #include +#define _WANT_FREEBSD11_STAT #include +#define _WANT_FREEBSD11_DIRENT #include #include #include @@ -50,21 +53,23 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include "gen-compat.h" +#include "fts-compat11.h" #include "un-namespace.h" #include "gen-private.h" -static FTSENT *fts_alloc(FTS *, char *, size_t); -static FTSENT *fts_build(FTS *, int); -static void fts_lfree(FTSENT *); -static void fts_load(FTS *, FTSENT *); +static FTSENT11 *fts_alloc(FTS11 *, char *, size_t); +static FTSENT11 *fts_build(FTS11 *, int); +static void fts_lfree(FTSENT11 *); +static void fts_load(FTS11 *, FTSENT11 *); static size_t fts_maxarglen(char * const *); -static void fts_padjust(FTS *, FTSENT *); -static int fts_palloc(FTS *, size_t); -static FTSENT *fts_sort(FTS *, FTSENT *, size_t); -static int fts_stat(FTS *, FTSENT *, int, int); -static int fts_safe_changedir(FTS *, FTSENT *, int, char *); -static int fts_ufslinks(FTS *, const FTSENT *); +static void fts_padjust(FTS11 *, FTSENT11 *); +static int fts_palloc(FTS11 *, size_t); +static FTSENT11 *fts_sort(FTS11 *, FTSENT11 *, size_t); +static int fts_stat(FTS11 *, FTSENT11 *, int, int); +static int fts_safe_changedir(FTS11 *, FTSENT11 *, int, char *); +static int fts_ufslinks(FTS11 *, const FTSENT11 *); #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) @@ -84,10 +89,10 @@ static int fts_ufslinks(FTS *, const FT * details. The FTS returned from fts_open points to this structure's * ftsp_fts member (and can be cast to an _fts_private as required) */ -struct _fts_private { - FTS ftsp_fts; - struct statfs ftsp_statfs; - dev_t ftsp_dev; +struct _fts_private11 { + FTS11 ftsp_fts; + struct freebsd11_statfs ftsp_statfs; + uint32_t ftsp_dev; int ftsp_linksreliable; }; @@ -108,14 +113,14 @@ static const char *ufslike_filesystems[] 0 }; -FTS * -fts_open(char * const *argv, int options, - int (*compar)(const FTSENT * const *, const FTSENT * const *)) +FTS11 * +freebsd11_fts_open(char * const *argv, int options, + int (*compar)(const FTSENT11 * const *, const FTSENT11 * const *)) { - struct _fts_private *priv; - FTS *sp; - FTSENT *p, *root; - FTSENT *parent, *tmp; + struct _fts_private11 *priv; + FTS11 *sp; + FTSENT11 *p, *root; + FTSENT11 *parent, *tmp; size_t len, nitems; /* Options check. */ @@ -221,7 +226,7 @@ mem1: free(sp); } static void -fts_load(FTS *sp, FTSENT *p) +fts_load(FTS11 *sp, FTSENT11 *p) { size_t len; char *cp; @@ -245,9 +250,9 @@ fts_load(FTS *sp, FTSENT *p) } int -fts_close(FTS *sp) +freebsd11_fts_close(FTS11 *sp) { - FTSENT *freep, *p; + FTSENT11 *freep, *p; int saved_errno; /* @@ -298,10 +303,10 @@ fts_close(FTS *sp) (p->fts_path[p->fts_pathlen - 1] == '/' \ ? p->fts_pathlen - 1 : p->fts_pathlen) -FTSENT * -fts_read(FTS *sp) +FTSENT11 * +freebsd11_fts_read(FTS11 *sp) { - FTSENT *p, *tmp; + FTSENT11 *p, *tmp; int instr; char *t; int saved_errno; @@ -497,7 +502,7 @@ name: t = sp->fts_path + NAPPEND(p->fts */ /* ARGSUSED */ int -fts_set(FTS *sp, FTSENT *p, int instr) +freebsd11_fts_set(FTS11 *sp, FTSENT11 *p, int instr) { if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && instr != FTS_NOINSTR && instr != FTS_SKIP) { @@ -508,10 +513,10 @@ fts_set(FTS *sp, FTSENT *p, int instr) return (0); } -FTSENT * -fts_children(FTS *sp, int instr) +FTSENT11 * +freebsd11_fts_children(FTS11 *sp, int instr) { - FTSENT *p; + FTSENT11 *p; int fd, rc, serrno; if (instr != 0 && instr != FTS_NAMEONLY) { @@ -579,29 +584,29 @@ fts_children(FTS *sp, int instr) return (sp->fts_child); } -#ifndef fts_get_clientptr -#error "fts_get_clientptr not defined" +#ifndef freebsd11_fts_get_clientptr +#error "freebsd11_fts_get_clientptr not defined" #endif void * -(fts_get_clientptr)(FTS *sp) +(freebsd11_fts_get_clientptr)(FTS11 *sp) { - return (fts_get_clientptr(sp)); + return (freebsd11_fts_get_clientptr(sp)); } -#ifndef fts_get_stream -#error "fts_get_stream not defined" +#ifndef freebsd11_fts_get_stream +#error "freebsd11_fts_get_stream not defined" #endif -FTS * -(fts_get_stream)(FTSENT *p) +FTS11 * +(freebsd11_fts_get_stream)(FTSENT11 *p) { - return (fts_get_stream(p)); + return (freebsd11_fts_get_stream(p)); } void -fts_set_clientptr(FTS *sp, void *clientptr) +freebsd11_fts_set_clientptr(FTS11 *sp, void *clientptr) { sp->fts_clientptr = clientptr; @@ -621,12 +626,12 @@ fts_set_clientptr(FTS *sp, void *clientp * directories and for any files after the subdirectories in the directory have * been found, cutting the stat calls by about 2/3. */ -static FTSENT * -fts_build(FTS *sp, int type) +static FTSENT11 * +fts_build(FTS11 *sp, int type) { - struct dirent *dp; - FTSENT *p, *head; - FTSENT *cur, *tail; + struct freebsd11_dirent *dp; + FTSENT11 *p, *head; + FTSENT11 *cur, *tail; DIR *dirp; void *oldaddr; char *cp; @@ -736,7 +741,8 @@ fts_build(FTS *sp, int type) /* Read the directory, attaching each entry to the `link' pointer. */ doadjust = 0; - for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) { + for (head = tail = NULL, nitems = 0; + dirp && (dp = freebsd11_readdir(dirp));) { dnamlen = dp->d_namlen; if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) continue; @@ -870,12 +876,12 @@ mem1: saved_errno = errno; } static int -fts_stat(FTS *sp, FTSENT *p, int follow, int dfd) +fts_stat(FTS11 *sp, FTSENT11 *p, int follow, int dfd) { - FTSENT *t; - dev_t dev; - ino_t ino; - struct stat *sbp, sb; + FTSENT11 *t; + uint32_t dev; + uint32_t ino; + struct freebsd11_stat *sbp, sb; int saved_errno; const char *path; @@ -904,9 +910,10 @@ fts_stat(FTS *sp, FTSENT *p, int follow, * fail, set the errno from the stat call. */ if (ISSET(FTS_LOGICAL) || follow) { - if (fstatat(dfd, path, sbp, 0)) { + if (freebsd11_fstatat(dfd, path, sbp, 0)) { saved_errno = errno; - if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { + if (freebsd11_fstatat(dfd, path, sbp, + AT_SYMLINK_NOFOLLOW)) { p->fts_errno = saved_errno; goto err; } @@ -914,9 +921,9 @@ fts_stat(FTS *sp, FTSENT *p, int follow, if (S_ISLNK(sbp->st_mode)) return (FTS_SLNONE); } - } else if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { + } else if (freebsd11_fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { p->fts_errno = errno; -err: memset(sbp, 0, sizeof(struct stat)); +err: memset(sbp, 0, sizeof(*sbp)); return (FTS_NS); } @@ -965,16 +972,16 @@ err: memset(sbp, 0, sizeof(struct stat) static int fts_compar(const void *a, const void *b) { - FTS *parent; + FTS11 *parent; - parent = (*(const FTSENT * const *)a)->fts_fts; + parent = (*(const FTSENT11 * const *)a)->fts_fts; return (*parent->fts_compar)(a, b); } -static FTSENT * -fts_sort(FTS *sp, FTSENT *head, size_t nitems) +static FTSENT11 * +fts_sort(FTS11 *sp, FTSENT11 *head, size_t nitems) { - FTSENT **ap, *p; + FTSENT11 **ap, *p; /* * Construct an array of pointers to the structures and call qsort(3). @@ -986,29 +993,29 @@ fts_sort(FTS *sp, FTSENT *head, size_t n if (nitems > sp->fts_nitems) { sp->fts_nitems = nitems + 40; if ((sp->fts_array = reallocf(sp->fts_array, - sp->fts_nitems * sizeof(FTSENT *))) == NULL) { + sp->fts_nitems * sizeof(FTSENT11 *))) == NULL) { sp->fts_nitems = 0; return (head); } } for (ap = sp->fts_array, p = head; p; p = p->fts_link) *ap++ = p; - qsort(sp->fts_array, nitems, sizeof(FTSENT *), fts_compar); + qsort(sp->fts_array, nitems, sizeof(FTSENT11 *), fts_compar); for (head = *(ap = sp->fts_array); --nitems; ++ap) ap[0]->fts_link = ap[1]; ap[0]->fts_link = NULL; return (head); } -static FTSENT * -fts_alloc(FTS *sp, char *name, size_t namelen) +static FTSENT11 * +fts_alloc(FTS11 *sp, char *name, size_t namelen) { - FTSENT *p; + FTSENT11 *p; size_t len; - struct ftsent_withstat { - FTSENT ent; - struct stat statbuf; + struct ftsent11_withstat { + FTSENT11 ent; + struct freebsd11_stat statbuf; }; /* @@ -1018,9 +1025,9 @@ fts_alloc(FTS *sp, char *name, size_t na * be careful that the stat structure is reasonably aligned. */ if (ISSET(FTS_NOSTAT)) - len = sizeof(FTSENT) + namelen + 1; + len = sizeof(FTSENT11) + namelen + 1; else - len = sizeof(struct ftsent_withstat) + namelen + 1; + len = sizeof(struct ftsent11_withstat) + namelen + 1; if ((p = malloc(len)) == NULL) return (NULL); @@ -1029,8 +1036,8 @@ fts_alloc(FTS *sp, char *name, size_t na p->fts_name = (char *)(p + 1); p->fts_statp = NULL; } else { - p->fts_name = (char *)((struct ftsent_withstat *)p + 1); - p->fts_statp = &((struct ftsent_withstat *)p)->statbuf; + p->fts_name = (char *)((struct ftsent11_withstat *)p + 1); + p->fts_statp = &((struct ftsent11_withstat *)p)->statbuf; } /* Copy the name and guarantee NUL termination. */ @@ -1048,9 +1055,9 @@ fts_alloc(FTS *sp, char *name, size_t na } static void -fts_lfree(FTSENT *head) +fts_lfree(FTSENT11 *head) { - FTSENT *p; + FTSENT11 *p; /* Free a linked list of structures. */ while ((p = head)) { @@ -1066,7 +1073,7 @@ fts_lfree(FTSENT *head) * plus 256 bytes so don't realloc the path 2 bytes at a time. */ static int -fts_palloc(FTS *sp, size_t more) +fts_palloc(FTS11 *sp, size_t more) { sp->fts_pathlen += more + 256; @@ -1079,9 +1086,9 @@ fts_palloc(FTS *sp, size_t more) * already returned. */ static void -fts_padjust(FTS *sp, FTSENT *head) +fts_padjust(FTS11 *sp, FTSENT11 *head) { - FTSENT *p; + FTSENT11 *p; char *addr = sp->fts_path; #define ADJUST(p) do { \ @@ -1119,10 +1126,10 @@ fts_maxarglen(char * const *argv) * Assumes p->fts_dev and p->fts_ino are filled in. */ static int -fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path) +fts_safe_changedir(FTS11 *sp, FTSENT11 *p, int fd, char *path) { int ret, oerrno, newfd; - struct stat sb; + struct freebsd11_stat sb; newfd = fd; if (ISSET(FTS_NOCHDIR)) @@ -1130,7 +1137,7 @@ fts_safe_changedir(FTS *sp, FTSENT *p, i if (fd < 0 && (newfd = _open(path, O_RDONLY | O_DIRECTORY | O_CLOEXEC, 0)) < 0) return (-1); - if (_fstat(newfd, &sb)) { + if (freebsd11_fstat(newfd, &sb)) { ret = -1; goto bail; } @@ -1152,12 +1159,12 @@ bail: * Check if the filesystem for "ent" has UFS-style links. */ static int -fts_ufslinks(FTS *sp, const FTSENT *ent) +fts_ufslinks(FTS11 *sp, const FTSENT11 *ent) { - struct _fts_private *priv; + struct _fts_private11 *priv; const char **cpp; - priv = (struct _fts_private *)sp; + priv = (struct _fts_private11 *)sp; /* * If this node's device is different from the previous, grab * the filesystem information, and decide on the reliability @@ -1165,7 +1172,7 @@ fts_ufslinks(FTS *sp, const FTSENT *ent) * avoidance. */ if (priv->ftsp_dev != ent->fts_dev) { - if (statfs(ent->fts_path, &priv->ftsp_statfs) != -1) { + if (freebsd11_statfs(ent->fts_path, &priv->ftsp_statfs) != -1) { priv->ftsp_dev = ent->fts_dev; priv->ftsp_linksreliable = 0; for (cpp = ufslike_filesystems; *cpp; cpp++) { @@ -1181,3 +1188,12 @@ fts_ufslinks(FTS *sp, const FTSENT *ent) } return (priv->ftsp_linksreliable); } + +__sym_compat(fts_open, freebsd11_fts_open, FBSD_1.1); +__sym_compat(fts_close, freebsd11_fts_close, FBSD_1.1); +__sym_compat(fts_read, freebsd11_fts_read, FBSD_1.1); +__sym_compat(fts_set, freebsd11_fts_set, FBSD_1.1); +__sym_compat(fts_children, freebsd11_fts_children, FBSD_1.1); +__sym_compat(fts_get_clientptr, freebsd11_fts_get_clientptr, FBSD_1.1); +__sym_compat(fts_get_stream, freebsd11_fts_get_stream, FBSD_1.1); +__sym_compat(fts_set_clientptr, freebsd11_fts_set_clientptr, FBSD_1.1); Copied and modified: head/lib/libc/gen/fts-compat11.h (from r318735, head/include/fts.h) ============================================================================== --- head/include/fts.h Tue May 23 09:20:31 2017 (r318735, copy source) +++ head/lib/libc/gen/fts-compat11.h Tue May 23 09:29:05 2017 (r318736) @@ -30,45 +30,30 @@ * $FreeBSD$ */ -#ifndef _FTS_H_ -#define _FTS_H_ - -#include +#ifndef _FTS_COPMAT11_H_ +#define _FTS_COPMAT11_H_ typedef struct { - struct _ftsent *fts_cur; /* current node */ - struct _ftsent *fts_child; /* linked list of children */ - struct _ftsent **fts_array; /* sort array */ - __dev_t fts_dev; /* starting device # */ + struct _ftsent11 *fts_cur; /* current node */ + struct _ftsent11 *fts_child; /* linked list of children */ + struct _ftsent11 **fts_array; /* sort array */ + uint32_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ __size_t fts_pathlen; /* sizeof(path) */ __size_t fts_nitems; /* elements in the sort array */ int (*fts_compar) /* compare function */ - (const struct _ftsent * const *, const struct _ftsent * const *); - -#define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ -#define FTS_LOGICAL 0x002 /* logical walk */ -#define FTS_NOCHDIR 0x004 /* don't change directories */ -#define FTS_NOSTAT 0x008 /* don't get stat info */ -#define FTS_PHYSICAL 0x010 /* physical walk */ -#define FTS_SEEDOT 0x020 /* return dot and dot-dot */ -#define FTS_XDEV 0x040 /* don't cross devices */ -#define FTS_WHITEOUT 0x080 /* return whiteout information */ -#define FTS_OPTIONMASK 0x0ff /* valid user option mask */ - -#define FTS_NAMEONLY 0x100 /* (private) child names only */ -#define FTS_STOP 0x200 /* (private) unrecoverable error */ + (const struct _ftsent11 * const *, + const struct _ftsent11 * const *); int fts_options; /* fts_open options, global flags */ void *fts_clientptr; /* thunk for sort function */ -} FTS; +} FTS11; -typedef struct _ftsent { - struct _ftsent *fts_cycle; /* cycle node */ - struct _ftsent *fts_parent; /* parent directory */ - struct _ftsent *fts_link; /* next file in directory */ +typedef struct _ftsent11 { + struct _ftsent11 *fts_cycle; /* cycle node */ + struct _ftsent11 *fts_parent; /* parent directory */ + struct _ftsent11 *fts_link; /* next file in directory */ long long fts_number; /* local numeric value */ -#define fts_bignum fts_number /* XXX non-std, should go away */ void *fts_pointer; /* local address value */ char *fts_accpath; /* access path */ char *fts_path; /* root path */ @@ -77,60 +62,34 @@ typedef struct _ftsent { __size_t fts_pathlen; /* strlen(fts_path) */ __size_t fts_namelen; /* strlen(fts_name) */ - __ino_t fts_ino; /* inode */ - __dev_t fts_dev; /* device */ - __nlink_t fts_nlink; /* link count */ + uint32_t fts_ino; /* inode */ + uint32_t fts_dev; /* device */ + uint16_t fts_nlink; /* link count */ -#define FTS_ROOTPARENTLEVEL -1 -#define FTS_ROOTLEVEL 0 long fts_level; /* depth (-1 to N) */ -#define FTS_D 1 /* preorder directory */ -#define FTS_DC 2 /* directory that causes cycles */ -#define FTS_DEFAULT 3 /* none of the above */ -#define FTS_DNR 4 /* unreadable directory */ -#define FTS_DOT 5 /* dot or dot-dot */ -#define FTS_DP 6 /* postorder directory */ -#define FTS_ERR 7 /* error; errno is set */ -#define FTS_F 8 /* regular file */ -#define FTS_INIT 9 /* initialized only */ -#define FTS_NS 10 /* stat(2) failed */ -#define FTS_NSOK 11 /* no stat(2) requested */ -#define FTS_SL 12 /* symbolic link */ -#define FTS_SLNONE 13 /* symbolic link without target */ -#define FTS_W 14 /* whiteout object */ int fts_info; /* user status for FTSENT structure */ -#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ -#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ -#define FTS_ISW 0x04 /* this is a whiteout object */ unsigned fts_flags; /* private flags for FTSENT structure */ -#define FTS_AGAIN 1 /* read node again */ -#define FTS_FOLLOW 2 /* follow symbolic link */ -#define FTS_NOINSTR 3 /* no instructions */ -#define FTS_SKIP 4 /* discard node */ int fts_instr; /* fts_set() instructions */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 23 09:30:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A13AD7974E; Tue, 23 May 2017 09:30:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF657110C; Tue, 23 May 2017 09:30:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N9UgsY028984; Tue, 23 May 2017 09:30:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N9Ug8w028978; Tue, 23 May 2017 09:30:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705230930.v4N9Ug8w028978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 May 2017 09:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318737 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 09:30:44 -0000 Author: kib Date: Tue May 23 09:30:42 2017 New Revision: 318737 URL: https://svnweb.freebsd.org/changeset/base/318737 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Tue May 23 09:29:05 2017 (r318736) +++ head/sys/compat/freebsd32/freebsd32_proto.h Tue May 23 09:30:42 2017 (r318737) @@ -161,24 +161,6 @@ struct freebsd32_shmsys_args { char a3_l_[PADL_(uint32_t)]; uint32_t a3; char a3_r_[PADR_(uint32_t)]; char a4_l_[PADL_(uint32_t)]; uint32_t a4; char a4_r_[PADR_(uint32_t)]; }; -struct freebsd32_stat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)]; -}; -struct freebsd32_fstat_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)]; -}; -struct freebsd32_lstat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)]; -}; -struct freebsd32_getdirentries_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; - char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; - char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)]; -}; struct freebsd32_sysctl_args { char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)]; char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; @@ -551,12 +533,6 @@ struct freebsd32_fexecve_args { char argv_l_[PADL_(uint32_t *)]; uint32_t * argv; char argv_r_[PADR_(uint32_t *)]; char envv_l_[PADL_(uint32_t *)]; uint32_t * envv; char envv_r_[PADR_(uint32_t *)]; }; -struct freebsd32_fstatat_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char buf_l_[PADL_(struct stat *)]; struct stat * buf; char buf_r_[PADR_(struct stat *)]; - char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; -}; struct freebsd32_futimesat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; @@ -697,6 +673,26 @@ struct freebsd32_utimensat_args { char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; +struct freebsd32_fstat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)]; +}; +struct freebsd32_fstatat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char buf_l_[PADL_(struct stat32 *)]; struct stat32 * buf; char buf_r_[PADR_(struct stat32 *)]; + char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; +}; +struct freebsd32_fhstat_args { + char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; + char sb_l_[PADL_(struct stat32 *)]; struct stat32 * sb; char sb_r_[PADR_(struct stat32 *)]; +}; +struct freebsd32_getdirentries_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char count_l_[PADL_(size_t)]; size_t count; char count_r_[PADR_(size_t)]; + char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)]; +}; #if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) #define PAD64_REQUIRED #endif @@ -723,10 +719,6 @@ int freebsd32_sysarch(struct thread *, s int freebsd32_semsys(struct thread *, struct freebsd32_semsys_args *); int freebsd32_msgsys(struct thread *, struct freebsd32_msgsys_args *); int freebsd32_shmsys(struct thread *, struct freebsd32_shmsys_args *); -int freebsd32_stat(struct thread *, struct freebsd32_stat_args *); -int freebsd32_fstat(struct thread *, struct freebsd32_fstat_args *); -int freebsd32_lstat(struct thread *, struct freebsd32_lstat_args *); -int freebsd32_getdirentries(struct thread *, struct freebsd32_getdirentries_args *); int freebsd32_sysctl(struct thread *, struct freebsd32_sysctl_args *); int freebsd32_futimes(struct thread *, struct freebsd32_futimes_args *); int freebsd32_msgsnd(struct thread *, struct freebsd32_msgsnd_args *); @@ -800,7 +792,6 @@ int freebsd32_cpuset_getid(struct thread int freebsd32_cpuset_getaffinity(struct thread *, struct freebsd32_cpuset_getaffinity_args *); int freebsd32_cpuset_setaffinity(struct thread *, struct freebsd32_cpuset_setaffinity_args *); int freebsd32_fexecve(struct thread *, struct freebsd32_fexecve_args *); -int freebsd32_fstatat(struct thread *, struct freebsd32_fstatat_args *); int freebsd32_futimesat(struct thread *, struct freebsd32_futimesat_args *); int freebsd32_jail_get(struct thread *, struct freebsd32_jail_get_args *); int freebsd32_jail_set(struct thread *, struct freebsd32_jail_set_args *); @@ -828,6 +819,10 @@ int freebsd32_procctl(struct thread *, s int freebsd32_ppoll(struct thread *, struct freebsd32_ppoll_args *); int freebsd32_futimens(struct thread *, struct freebsd32_futimens_args *); int freebsd32_utimensat(struct thread *, struct freebsd32_utimensat_args *); +int freebsd32_fstat(struct thread *, struct freebsd32_fstat_args *); +int freebsd32_fstatat(struct thread *, struct freebsd32_fstatat_args *); +int freebsd32_fhstat(struct thread *, struct freebsd32_fhstat_args *); +int freebsd32_getdirentries(struct thread *, struct freebsd32_getdirentries_args *); #ifdef COMPAT_43 @@ -1132,7 +1127,82 @@ int freebsd10_freebsd32_pipe(struct thre #endif /* COMPAT_FREEBSD10 */ + +#ifdef COMPAT_FREEBSD11 + +#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#define PAD64_REQUIRED +#endif +struct freebsd11_freebsd32_mknod_args { + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char dev_l_[PADL_(int)]; int dev; char dev_r_[PADR_(int)]; +}; +struct freebsd11_freebsd32_stat_args { + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char ub_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * ub; char ub_r_[PADR_(struct freebsd11_stat32 *)]; +}; +struct freebsd11_freebsd32_fstat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char ub_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * ub; char ub_r_[PADR_(struct freebsd11_stat32 *)]; +}; +struct freebsd11_freebsd32_lstat_args { + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char ub_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * ub; char ub_r_[PADR_(struct freebsd11_stat32 *)]; +}; +struct freebsd11_freebsd32_getdirentries_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; + char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)]; +}; +struct freebsd11_freebsd32_getdents_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char count_l_[PADL_(int)]; int count; char count_r_[PADR_(int)]; +}; +struct freebsd11_freebsd32_fhstat_args { + char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; + char sb_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * sb; char sb_r_[PADR_(struct freebsd11_stat32 *)]; +}; +#ifdef PAD64_REQUIRED +#else +#endif +#ifdef PAD64_REQUIRED +#else +#endif +struct freebsd11_freebsd32_fstatat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char buf_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * buf; char buf_r_[PADR_(struct freebsd11_stat32 *)]; + char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; +}; +struct freebsd11_freebsd32_mknodat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; + char dev_l_[PADL_(uint32_t)]; uint32_t dev; char dev_r_[PADR_(uint32_t)]; +}; +#ifdef PAD64_REQUIRED +#else +#endif +#ifdef PAD64_REQUIRED +#else +#endif +int freebsd11_freebsd32_mknod(struct thread *, struct freebsd11_freebsd32_mknod_args *); +int freebsd11_freebsd32_stat(struct thread *, struct freebsd11_freebsd32_stat_args *); +int freebsd11_freebsd32_fstat(struct thread *, struct freebsd11_freebsd32_fstat_args *); +int freebsd11_freebsd32_lstat(struct thread *, struct freebsd11_freebsd32_lstat_args *); +int freebsd11_freebsd32_getdirentries(struct thread *, struct freebsd11_freebsd32_getdirentries_args *); +int freebsd11_freebsd32_getdents(struct thread *, struct freebsd11_freebsd32_getdents_args *); +int freebsd11_freebsd32_fhstat(struct thread *, struct freebsd11_freebsd32_fhstat_args *); +int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fstatat_args *); +int freebsd11_freebsd32_mknodat(struct thread *, struct freebsd11_freebsd32_mknodat_args *); + +#endif /* COMPAT_FREEBSD11 */ + #define FREEBSD32_SYS_AUE_freebsd32_wait4 AUE_WAIT4 +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_mknod AUE_MKNOD #define FREEBSD32_SYS_AUE_freebsd4_freebsd32_getfsstat AUE_GETFSSTAT #define FREEBSD32_SYS_AUE_ofreebsd32_lseek AUE_LSEEK #define FREEBSD32_SYS_AUE_freebsd32_recvmsg AUE_RECVMSG @@ -1176,10 +1246,10 @@ int freebsd10_freebsd32_pipe(struct thre #define FREEBSD32_SYS_AUE_freebsd32_shmsys AUE_SHMSYS #define FREEBSD32_SYS_AUE_freebsd6_freebsd32_pread AUE_PREAD #define FREEBSD32_SYS_AUE_freebsd6_freebsd32_pwrite AUE_PWRITE -#define FREEBSD32_SYS_AUE_freebsd32_stat AUE_STAT -#define FREEBSD32_SYS_AUE_freebsd32_fstat AUE_FSTAT -#define FREEBSD32_SYS_AUE_freebsd32_lstat AUE_LSTAT -#define FREEBSD32_SYS_AUE_freebsd32_getdirentries AUE_GETDIRENTRIES +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_stat AUE_STAT +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_fstat AUE_FSTAT +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_lstat AUE_LSTAT +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_getdirentries AUE_GETDIRENTRIES #define FREEBSD32_SYS_AUE_freebsd6_freebsd32_mmap AUE_MMAP #define FREEBSD32_SYS_AUE_freebsd6_freebsd32_lseek AUE_LSEEK #define FREEBSD32_SYS_AUE_freebsd6_freebsd32_truncate AUE_TRUNCATE @@ -1203,10 +1273,12 @@ int freebsd10_freebsd32_pipe(struct thre #define FREEBSD32_SYS_AUE_freebsd32_aio_read AUE_AIO_READ #define FREEBSD32_SYS_AUE_freebsd32_aio_write AUE_AIO_WRITE #define FREEBSD32_SYS_AUE_freebsd32_lio_listio AUE_LIO_LISTIO +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_getdents AUE_O_GETDENTS #define FREEBSD32_SYS_AUE_freebsd32_lutimes AUE_LUTIMES #define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV #define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV #define FREEBSD32_SYS_AUE_freebsd4_freebsd32_fhstatfs AUE_FHSTATFS +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_fhstat AUE_FHSTAT #define FREEBSD32_SYS_AUE_freebsd32_modstat AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kldstat AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_return AUE_AIO_RETURN @@ -1261,8 +1333,9 @@ int freebsd10_freebsd32_pipe(struct thre #define FREEBSD32_SYS_AUE_freebsd32_cpuset_getaffinity AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_setaffinity AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_fexecve AUE_FEXECVE -#define FREEBSD32_SYS_AUE_freebsd32_fstatat AUE_FSTATAT +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_fstatat AUE_FSTATAT #define FREEBSD32_SYS_AUE_freebsd32_futimesat AUE_FUTIMESAT +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_mknodat AUE_MKNODAT #define FREEBSD32_SYS_AUE_freebsd32_jail_get AUE_JAIL_GET #define FREEBSD32_SYS_AUE_freebsd32_jail_set AUE_JAIL_SET #define FREEBSD32_SYS_AUE_freebsd32_semctl AUE_SEMCTL @@ -1283,6 +1356,10 @@ int freebsd10_freebsd32_pipe(struct thre #define FREEBSD32_SYS_AUE_freebsd32_ppoll AUE_POLL #define FREEBSD32_SYS_AUE_freebsd32_futimens AUE_FUTIMES #define FREEBSD32_SYS_AUE_freebsd32_utimensat AUE_FUTIMESAT +#define FREEBSD32_SYS_AUE_freebsd32_fstat AUE_FSTAT +#define FREEBSD32_SYS_AUE_freebsd32_fstatat AUE_FSTATAT +#define FREEBSD32_SYS_AUE_freebsd32_fhstat AUE_FHSTAT +#define FREEBSD32_SYS_AUE_freebsd32_getdirentries AUE_GETDIRENTRIES #undef PAD_ #undef PADL_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Tue May 23 09:29:05 2017 (r318736) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Tue May 23 09:30:42 2017 (r318737) @@ -19,7 +19,7 @@ /* 11 is obsolete execv */ #define FREEBSD32_SYS_chdir 12 #define FREEBSD32_SYS_fchdir 13 -#define FREEBSD32_SYS_mknod 14 +#define FREEBSD32_SYS_freebsd11_freebsd32_mknod 14 #define FREEBSD32_SYS_chmod 15 #define FREEBSD32_SYS_chown 16 #define FREEBSD32_SYS_break 17 @@ -171,14 +171,14 @@ #define FREEBSD32_SYS_setgid 181 #define FREEBSD32_SYS_setegid 182 #define FREEBSD32_SYS_seteuid 183 -#define FREEBSD32_SYS_freebsd32_stat 188 -#define FREEBSD32_SYS_freebsd32_fstat 189 -#define FREEBSD32_SYS_freebsd32_lstat 190 +#define FREEBSD32_SYS_freebsd11_freebsd32_stat 188 +#define FREEBSD32_SYS_freebsd11_freebsd32_fstat 189 +#define FREEBSD32_SYS_freebsd11_freebsd32_lstat 190 #define FREEBSD32_SYS_pathconf 191 #define FREEBSD32_SYS_fpathconf 192 #define FREEBSD32_SYS_getrlimit 194 #define FREEBSD32_SYS_setrlimit 195 -#define FREEBSD32_SYS_freebsd32_getdirentries 196 +#define FREEBSD32_SYS_freebsd11_freebsd32_getdirentries 196 /* 197 is freebsd6 freebsd32_mmap */ #define FREEBSD32_SYS___syscall 198 /* 199 is freebsd6 freebsd32_lseek */ @@ -224,19 +224,19 @@ #define FREEBSD32_SYS_freebsd32_aio_read 255 #define FREEBSD32_SYS_freebsd32_aio_write 256 #define FREEBSD32_SYS_freebsd32_lio_listio 257 -#define FREEBSD32_SYS_getdents 272 +#define FREEBSD32_SYS_freebsd11_freebsd32_getdents 272 #define FREEBSD32_SYS_lchmod 274 #define FREEBSD32_SYS_netbsd_lchown 275 #define FREEBSD32_SYS_freebsd32_lutimes 276 #define FREEBSD32_SYS_netbsd_msync 277 -#define FREEBSD32_SYS_nstat 278 -#define FREEBSD32_SYS_nfstat 279 -#define FREEBSD32_SYS_nlstat 280 +#define FREEBSD32_SYS_freebsd11_nstat 278 +#define FREEBSD32_SYS_freebsd11_nfstat 279 +#define FREEBSD32_SYS_freebsd11_nlstat 280 #define FREEBSD32_SYS_freebsd32_preadv 289 #define FREEBSD32_SYS_freebsd32_pwritev 290 /* 297 is freebsd4 freebsd32_fhstatfs */ #define FREEBSD32_SYS_fhopen 298 -#define FREEBSD32_SYS_fhstat 299 +#define FREEBSD32_SYS_freebsd11_freebsd32_fhstat 299 #define FREEBSD32_SYS_modnext 300 #define FREEBSD32_SYS_freebsd32_modstat 301 #define FREEBSD32_SYS_modfnext 302 @@ -310,10 +310,10 @@ #define FREEBSD32_SYS_lchflags 391 #define FREEBSD32_SYS_uuidgen 392 #define FREEBSD32_SYS_freebsd32_sendfile 393 -#define FREEBSD32_SYS_getfsstat 395 -#define FREEBSD32_SYS_statfs 396 -#define FREEBSD32_SYS_fstatfs 397 -#define FREEBSD32_SYS_fhstatfs 398 +#define FREEBSD32_SYS_freebsd11_getfsstat 395 +#define FREEBSD32_SYS_freebsd11_statfs 396 +#define FREEBSD32_SYS_freebsd11_fstatfs 397 +#define FREEBSD32_SYS_freebsd11_fhstatfs 398 #define FREEBSD32_SYS_ksem_close 400 #define FREEBSD32_SYS_ksem_post 401 #define FREEBSD32_SYS_ksem_wait 402 @@ -398,12 +398,12 @@ #define FREEBSD32_SYS_fchmodat 490 #define FREEBSD32_SYS_fchownat 491 #define FREEBSD32_SYS_freebsd32_fexecve 492 -#define FREEBSD32_SYS_freebsd32_fstatat 493 +#define FREEBSD32_SYS_freebsd11_freebsd32_fstatat 493 #define FREEBSD32_SYS_freebsd32_futimesat 494 #define FREEBSD32_SYS_linkat 495 #define FREEBSD32_SYS_mkdirat 496 #define FREEBSD32_SYS_mkfifoat 497 -#define FREEBSD32_SYS_mknodat 498 +#define FREEBSD32_SYS_freebsd11_freebsd32_mknodat 498 #define FREEBSD32_SYS_openat 499 #define FREEBSD32_SYS_readlinkat 500 #define FREEBSD32_SYS_renameat 501 @@ -458,4 +458,13 @@ #define FREEBSD32_SYS_numa_getaffinity 548 #define FREEBSD32_SYS_numa_setaffinity 549 #define FREEBSD32_SYS_fdatasync 550 -#define FREEBSD32_SYS_MAXSYSCALL 551 +#define FREEBSD32_SYS_freebsd32_fstat 551 +#define FREEBSD32_SYS_freebsd32_fstatat 552 +#define FREEBSD32_SYS_freebsd32_fhstat 553 +#define FREEBSD32_SYS_freebsd32_getdirentries 554 +#define FREEBSD32_SYS_statfs 555 +#define FREEBSD32_SYS_fstatfs 556 +#define FREEBSD32_SYS_getfsstat 557 +#define FREEBSD32_SYS_fhstatfs 558 +#define FREEBSD32_SYS_mknodat 559 +#define FREEBSD32_SYS_MAXSYSCALL 560 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Tue May 23 09:29:05 2017 (r318736) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Tue May 23 09:30:42 2017 (r318737) @@ -23,7 +23,7 @@ const char *freebsd32_syscallnames[] = { "obs_execv", /* 11 = obsolete execv */ "chdir", /* 12 = chdir */ "fchdir", /* 13 = fchdir */ - "mknod", /* 14 = mknod */ + "compat11.freebsd32_mknod", /* 14 = freebsd11 freebsd32_mknod */ "chmod", /* 15 = chmod */ "chown", /* 16 = chown */ "break", /* 17 = break */ @@ -197,15 +197,15 @@ const char *freebsd32_syscallnames[] = { "#185", /* 185 = lfs_markv */ "#186", /* 186 = lfs_segclean */ "#187", /* 187 = lfs_segwait */ - "freebsd32_stat", /* 188 = freebsd32_stat */ - "freebsd32_fstat", /* 189 = freebsd32_fstat */ - "freebsd32_lstat", /* 190 = freebsd32_lstat */ + "compat11.freebsd32_stat", /* 188 = freebsd11 freebsd32_stat */ + "compat11.freebsd32_fstat", /* 189 = freebsd11 freebsd32_fstat */ + "compat11.freebsd32_lstat", /* 190 = freebsd11 freebsd32_lstat */ "pathconf", /* 191 = pathconf */ "fpathconf", /* 192 = fpathconf */ "#193", /* 193 = nosys */ "getrlimit", /* 194 = getrlimit */ "setrlimit", /* 195 = setrlimit */ - "freebsd32_getdirentries", /* 196 = freebsd32_getdirentries */ + "compat11.freebsd32_getdirentries", /* 196 = freebsd11 freebsd32_getdirentries */ "compat6.freebsd32_mmap", /* 197 = freebsd6 freebsd32_mmap */ "__syscall", /* 198 = __syscall */ "compat6.freebsd32_lseek", /* 199 = freebsd6 freebsd32_lseek */ @@ -281,15 +281,15 @@ const char *freebsd32_syscallnames[] = { "#269", /* 269 = nosys */ "#270", /* 270 = nosys */ "#271", /* 271 = nosys */ - "getdents", /* 272 = getdents */ + "compat11.freebsd32_getdents", /* 272 = freebsd11 freebsd32_getdents */ "#273", /* 273 = nosys */ "lchmod", /* 274 = lchmod */ "netbsd_lchown", /* 275 = netbsd_lchown */ "freebsd32_lutimes", /* 276 = freebsd32_lutimes */ "netbsd_msync", /* 277 = netbsd_msync */ - "nstat", /* 278 = nstat */ - "nfstat", /* 279 = nfstat */ - "nlstat", /* 280 = nlstat */ + "compat11.nstat", /* 278 = freebsd11 nstat */ + "compat11.nfstat", /* 279 = freebsd11 nfstat */ + "compat11.nlstat", /* 280 = freebsd11 nlstat */ "#281", /* 281 = nosys */ "#282", /* 282 = nosys */ "#283", /* 283 = nosys */ @@ -308,7 +308,7 @@ const char *freebsd32_syscallnames[] = { "#296", /* 296 = nosys */ "compat4.freebsd32_fhstatfs", /* 297 = freebsd4 freebsd32_fhstatfs */ "fhopen", /* 298 = fhopen */ - "fhstat", /* 299 = fhstat */ + "compat11.freebsd32_fhstat", /* 299 = freebsd11 freebsd32_fhstat */ "modnext", /* 300 = modnext */ "freebsd32_modstat", /* 301 = freebsd32_modstat */ "modfnext", /* 302 = modfnext */ @@ -404,10 +404,10 @@ const char *freebsd32_syscallnames[] = { "uuidgen", /* 392 = uuidgen */ "freebsd32_sendfile", /* 393 = freebsd32_sendfile */ "#394", /* 394 = mac_syscall */ - "getfsstat", /* 395 = getfsstat */ - "statfs", /* 396 = statfs */ - "fstatfs", /* 397 = fstatfs */ - "fhstatfs", /* 398 = fhstatfs */ + "compat11.getfsstat", /* 395 = freebsd11 getfsstat */ + "compat11.statfs", /* 396 = freebsd11 statfs */ + "compat11.fstatfs", /* 397 = freebsd11 fstatfs */ + "compat11.fhstatfs", /* 398 = freebsd11 fhstatfs */ "#399", /* 399 = nosys */ "ksem_close", /* 400 = ksem_close */ "ksem_post", /* 401 = ksem_post */ @@ -515,12 +515,12 @@ const char *freebsd32_syscallnames[] = { "fchmodat", /* 490 = fchmodat */ "fchownat", /* 491 = fchownat */ "freebsd32_fexecve", /* 492 = freebsd32_fexecve */ - "freebsd32_fstatat", /* 493 = freebsd32_fstatat */ + "compat11.freebsd32_fstatat", /* 493 = freebsd11 freebsd32_fstatat */ "freebsd32_futimesat", /* 494 = freebsd32_futimesat */ "linkat", /* 495 = linkat */ "mkdirat", /* 496 = mkdirat */ "mkfifoat", /* 497 = mkfifoat */ - "mknodat", /* 498 = mknodat */ + "compat11.freebsd32_mknodat", /* 498 = freebsd11 freebsd32_mknodat */ "openat", /* 499 = openat */ "readlinkat", /* 500 = readlinkat */ "renameat", /* 501 = renameat */ @@ -583,4 +583,13 @@ const char *freebsd32_syscallnames[] = { "numa_getaffinity", /* 548 = numa_getaffinity */ "numa_setaffinity", /* 549 = numa_setaffinity */ "fdatasync", /* 550 = fdatasync */ + "freebsd32_fstat", /* 551 = freebsd32_fstat */ + "freebsd32_fstatat", /* 552 = freebsd32_fstatat */ + "freebsd32_fhstat", /* 553 = freebsd32_fhstat */ + "freebsd32_getdirentries", /* 554 = freebsd32_getdirentries */ + "statfs", /* 555 = statfs */ + "fstatfs", /* 556 = fstatfs */ + "getfsstat", /* 557 = getfsstat */ + "fhstatfs", /* 558 = fhstatfs */ + "mknodat", /* 559 = mknodat */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Tue May 23 09:29:05 2017 (r318736) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Tue May 23 09:30:42 2017 (r318737) @@ -47,6 +47,12 @@ #define compat10(n, name) 0, (sy_call_t *)nosys #endif +#ifdef COMPAT_FREEBSD11 +#define compat11(n, name) n, (sy_call_t *)__CONCAT(freebsd11_,name) +#else +#define compat11(n, name) 0, (sy_call_t *)nosys +#endif + /* The casts are bogus but will do for now. */ struct sysent freebsd32_sysent[] = { #if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) @@ -66,7 +72,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 11 = obsolete execv */ { AS(chdir_args), (sy_call_t *)sys_chdir, AUE_CHDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 12 = chdir */ { AS(fchdir_args), (sy_call_t *)sys_fchdir, AUE_FCHDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 13 = fchdir */ - { AS(mknod_args), (sy_call_t *)sys_mknod, AUE_MKNOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 14 = mknod */ + { compat11(AS(freebsd11_freebsd32_mknod_args),freebsd32_mknod), AUE_MKNOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 14 = freebsd11 freebsd32_mknod */ { AS(chmod_args), (sy_call_t *)sys_chmod, AUE_CHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 15 = chmod */ { AS(chown_args), (sy_call_t *)sys_chown, AUE_CHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 16 = chown */ { AS(obreak_args), (sy_call_t *)sys_obreak, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 17 = break */ @@ -240,15 +246,15 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 185 = lfs_markv */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 186 = lfs_segclean */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 187 = lfs_segwait */ - { AS(freebsd32_stat_args), (sy_call_t *)freebsd32_stat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 188 = freebsd32_stat */ - { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 189 = freebsd32_fstat */ - { AS(freebsd32_lstat_args), (sy_call_t *)freebsd32_lstat, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 190 = freebsd32_lstat */ + { compat11(AS(freebsd11_freebsd32_stat_args),freebsd32_stat), AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 188 = freebsd11 freebsd32_stat */ + { compat11(AS(freebsd11_freebsd32_fstat_args),freebsd32_fstat), AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 189 = freebsd11 freebsd32_fstat */ + { compat11(AS(freebsd11_freebsd32_lstat_args),freebsd32_lstat), AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 190 = freebsd11 freebsd32_lstat */ { AS(pathconf_args), (sy_call_t *)sys_pathconf, AUE_PATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 191 = pathconf */ { AS(fpathconf_args), (sy_call_t *)sys_fpathconf, AUE_FPATHCONF, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 192 = fpathconf */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 193 = nosys */ { AS(__getrlimit_args), (sy_call_t *)sys_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 194 = getrlimit */ { AS(__setrlimit_args), (sy_call_t *)sys_setrlimit, AUE_SETRLIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 195 = setrlimit */ - { AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 196 = freebsd32_getdirentries */ + { compat11(AS(freebsd11_freebsd32_getdirentries_args),freebsd32_getdirentries), AUE_GETDIRENTRIES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 196 = freebsd11 freebsd32_getdirentries */ { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 197 = freebsd6 freebsd32_mmap */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = __syscall */ { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 199 = freebsd6 freebsd32_lseek */ @@ -324,15 +330,15 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 269 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 270 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 271 = nosys */ - { AS(getdents_args), (sy_call_t *)sys_getdents, AUE_O_GETDENTS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 272 = getdents */ + { compat11(AS(freebsd11_freebsd32_getdents_args),freebsd32_getdents), AUE_O_GETDENTS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = freebsd11 freebsd32_getdents */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = nosys */ { AS(lchmod_args), (sy_call_t *)sys_lchmod, AUE_LCHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = lchmod */ { AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = netbsd_lchown */ { AS(freebsd32_lutimes_args), (sy_call_t *)freebsd32_lutimes, AUE_LUTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 276 = freebsd32_lutimes */ { AS(msync_args), (sy_call_t *)sys_msync, AUE_MSYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 277 = netbsd_msync */ - { AS(nstat_args), (sy_call_t *)sys_nstat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 278 = nstat */ - { AS(nfstat_args), (sy_call_t *)sys_nfstat, AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 279 = nfstat */ - { AS(nlstat_args), (sy_call_t *)sys_nlstat, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 280 = nlstat */ + { compat11(AS(freebsd11_nstat_args),nstat), AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 278 = freebsd11 nstat */ + { compat11(AS(freebsd11_nfstat_args),nfstat), AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 279 = freebsd11 nfstat */ + { compat11(AS(freebsd11_nlstat_args),nlstat), AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 280 = freebsd11 nlstat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 281 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 282 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 283 = nosys */ @@ -351,7 +357,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 296 = nosys */ { compat4(AS(freebsd4_freebsd32_fhstatfs_args),freebsd32_fhstatfs), AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 297 = freebsd4 freebsd32_fhstatfs */ { AS(fhopen_args), (sy_call_t *)sys_fhopen, AUE_FHOPEN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 298 = fhopen */ - { AS(fhstat_args), (sy_call_t *)sys_fhstat, AUE_FHSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 299 = fhstat */ + { compat11(AS(freebsd11_freebsd32_fhstat_args),freebsd32_fhstat), AUE_FHSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 299 = freebsd11 freebsd32_fhstat */ { AS(modnext_args), (sy_call_t *)sys_modnext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 300 = modnext */ { AS(freebsd32_modstat_args), (sy_call_t *)freebsd32_modstat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 301 = freebsd32_modstat */ { AS(modfnext_args), (sy_call_t *)sys_modfnext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 302 = modfnext */ @@ -447,10 +453,10 @@ struct sysent freebsd32_sysent[] = { { AS(uuidgen_args), (sy_call_t *)sys_uuidgen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 392 = uuidgen */ { AS(freebsd32_sendfile_args), (sy_call_t *)freebsd32_sendfile, AUE_SENDFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 393 = freebsd32_sendfile */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 394 = mac_syscall */ - { AS(getfsstat_args), (sy_call_t *)sys_getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 395 = getfsstat */ - { AS(statfs_args), (sy_call_t *)sys_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 396 = statfs */ - { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 397 = fstatfs */ - { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 398 = fhstatfs */ + { compat11(AS(freebsd11_getfsstat_args),getfsstat), AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 395 = freebsd11 getfsstat */ + { compat11(AS(freebsd11_statfs_args),statfs), AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 396 = freebsd11 statfs */ + { compat11(AS(freebsd11_fstatfs_args),fstatfs), AUE_FSTATFS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 397 = freebsd11 fstatfs */ + { compat11(AS(freebsd11_fhstatfs_args),fhstatfs), AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 398 = freebsd11 fhstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 399 = nosys */ { AS(ksem_close_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 400 = ksem_close */ { AS(ksem_post_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 401 = ksem_post */ @@ -558,12 +564,12 @@ struct sysent freebsd32_sysent[] = { { AS(fchmodat_args), (sy_call_t *)sys_fchmodat, AUE_FCHMODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 490 = fchmodat */ { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 491 = fchownat */ { AS(freebsd32_fexecve_args), (sy_call_t *)freebsd32_fexecve, AUE_FEXECVE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 492 = freebsd32_fexecve */ - { AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 493 = freebsd32_fstatat */ + { compat11(AS(freebsd11_freebsd32_fstatat_args),freebsd32_fstatat), AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 493 = freebsd11 freebsd32_fstatat */ { AS(freebsd32_futimesat_args), (sy_call_t *)freebsd32_futimesat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 494 = freebsd32_futimesat */ { AS(linkat_args), (sy_call_t *)sys_linkat, AUE_LINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 495 = linkat */ { AS(mkdirat_args), (sy_call_t *)sys_mkdirat, AUE_MKDIRAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 496 = mkdirat */ { AS(mkfifoat_args), (sy_call_t *)sys_mkfifoat, AUE_MKFIFOAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 497 = mkfifoat */ - { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 498 = mknodat */ + { compat11(AS(freebsd11_freebsd32_mknodat_args),freebsd32_mknodat), AUE_MKNODAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 498 = freebsd11 freebsd32_mknodat */ { AS(openat_args), (sy_call_t *)sys_openat, AUE_OPENAT_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 499 = openat */ { AS(readlinkat_args), (sy_call_t *)sys_readlinkat, AUE_READLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 500 = readlinkat */ { AS(renameat_args), (sy_call_t *)sys_renameat, AUE_RENAMEAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 501 = renameat */ @@ -626,4 +632,13 @@ struct sysent freebsd32_sysent[] = { { AS(numa_getaffinity_args), (sy_call_t *)sys_numa_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 548 = numa_getaffinity */ { AS(numa_setaffinity_args), (sy_call_t *)sys_numa_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 549 = numa_setaffinity */ { AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 550 = fdatasync */ + { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 551 = freebsd32_fstat */ + { AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 552 = freebsd32_fstatat */ + { AS(freebsd32_fhstat_args), (sy_call_t *)freebsd32_fhstat, AUE_FHSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 553 = freebsd32_fhstat */ + { AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 554 = freebsd32_getdirentries */ + { AS(statfs_args), (sy_call_t *)sys_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 555 = statfs */ + { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 556 = fstatfs */ + { AS(getfsstat_args), (sy_call_t *)sys_getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 557 = getfsstat */ + { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 558 = fhstatfs */ + { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 559 = mknodat */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue May 23 09:29:05 2017 (r318736) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue May 23 09:30:42 2017 (r318737) @@ -104,15 +104,6 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } - /* mknod */ - case 14: { - struct mknod_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* int */ - iarg[2] = p->dev; /* int */ - *n_args = 3; - break; - } /* chmod */ case 15: { struct chmod_args *p = params; @@ -914,30 +905,6 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } - /* freebsd32_stat */ - case 188: { - struct freebsd32_stat_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->ub; /* struct stat32 * */ - *n_args = 2; - break; - } - /* freebsd32_fstat */ - case 189: { - struct freebsd32_fstat_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->ub; /* struct stat32 * */ - *n_args = 2; - break; - } - /* freebsd32_lstat */ - case 190: { - struct freebsd32_lstat_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->ub; /* struct stat32 * */ - *n_args = 2; - break; - } /* pathconf */ case 191: { struct pathconf_args *p = params; @@ -970,16 +937,6 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* freebsd32_getdirentries */ - case 196: { - struct freebsd32_getdirentries_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->buf; /* char * */ - uarg[2] = p->count; /* u_int */ - uarg[3] = (intptr_t) p->basep; /* int32_t * */ - *n_args = 4; - break; - } /* nosys */ case 198: { *n_args = 0; @@ -1334,15 +1291,6 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } - /* getdents */ - case 272: { - struct getdents_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->buf; /* char * */ - uarg[2] = p->count; /* size_t */ - *n_args = 3; - break; - } /* lchmod */ case 274: { struct lchmod_args *p = params; @@ -1377,30 +1325,6 @@ systrace_args(int sysnum, void *params, *n_args = 3; break; } - /* nstat */ - case 278: { - struct nstat_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->ub; /* struct nstat * */ - *n_args = 2; - break; - } - /* nfstat */ - case 279: { - struct nfstat_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->sb; /* struct nstat * */ - *n_args = 2; - break; - } - /* nlstat */ - case 280: { - struct nlstat_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->ub; /* struct nstat * */ - *n_args = 2; - break; - } /* freebsd32_preadv */ case 289: { struct freebsd32_preadv_args *p = params; @@ -1431,14 +1355,6 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* fhstat */ - case 299: { - struct fhstat_args *p = params; - uarg[0] = (intptr_t) p->u_fhp; /* const struct fhandle * */ - uarg[1] = (intptr_t) p->sb; /* struct stat * */ - *n_args = 2; - break; - } /* modnext */ case 300: { struct modnext_args *p = params; @@ -1965,39 +1881,6 @@ systrace_args(int sysnum, void *params, *n_args = 8; break; } - /* getfsstat */ - case 395: { - struct getfsstat_args *p = params; - uarg[0] = (intptr_t) p->buf; /* struct statfs * */ - iarg[1] = p->bufsize; /* long */ - iarg[2] = p->mode; /* int */ - *n_args = 3; - break; - } - /* statfs */ - case 396: { - struct statfs_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->buf; /* struct statfs * */ - *n_args = 2; - break; - } - /* fstatfs */ - case 397: { - struct fstatfs_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->buf; /* struct statfs * */ - *n_args = 2; - break; - } - /* fhstatfs */ - case 398: { - struct fhstatfs_args *p = params; - uarg[0] = (intptr_t) p->u_fhp; /* const struct fhandle * */ - uarg[1] = (intptr_t) p->buf; /* struct statfs * */ - *n_args = 2; - break; - } /* ksem_close */ case 400: { struct ksem_close_args *p = params; @@ -2767,16 +2650,6 @@ systrace_args(int sysnum, void *params, *n_args = 3; break; } - /* freebsd32_fstatat */ - case 493: { - struct freebsd32_fstatat_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ - uarg[2] = (intptr_t) p->buf; /* struct stat * */ - iarg[3] = p->flag; /* int */ - *n_args = 4; - break; - } /* freebsd32_futimesat */ case 494: { struct freebsd32_futimesat_args *p = params; @@ -2815,16 +2688,6 @@ systrace_args(int sysnum, void *params, *n_args = 3; break; } - /* mknodat */ - case 498: { - struct mknodat_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ - iarg[2] = p->mode; /* mode_t */ - iarg[3] = p->dev; /* dev_t */ - *n_args = 4; - break; - } /* openat */ case 499: { struct openat_args *p = params; @@ -3324,6 +3187,85 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } + /* freebsd32_fstat */ + case 551: { + struct freebsd32_fstat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->ub; /* struct stat32 * */ + *n_args = 2; + break; + } + /* freebsd32_fstatat */ + case 552: { + struct freebsd32_fstatat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->path; /* char * */ + uarg[2] = (intptr_t) p->buf; /* struct stat32 * */ + iarg[3] = p->flag; /* int */ + *n_args = 4; + break; + } + /* freebsd32_fhstat */ + case 553: { + struct freebsd32_fhstat_args *p = params; + uarg[0] = (intptr_t) p->u_fhp; /* const struct fhandle * */ + uarg[1] = (intptr_t) p->sb; /* struct stat32 * */ + *n_args = 2; + break; + } + /* freebsd32_getdirentries */ + case 554: { + struct freebsd32_getdirentries_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->buf; /* char * */ + uarg[2] = p->count; /* size_t */ + uarg[3] = (intptr_t) p->basep; /* int32_t * */ + *n_args = 4; + break; + } + /* statfs */ + case 555: { + struct statfs_args *p = params; + uarg[0] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->buf; /* struct statfs32 * */ + *n_args = 2; + break; + } + /* fstatfs */ + case 556: { + struct fstatfs_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->buf; /* struct statfs32 * */ + *n_args = 2; + break; + } + /* getfsstat */ + case 557: { + struct getfsstat_args *p = params; + uarg[0] = (intptr_t) p->buf; /* struct statfs32 * */ + iarg[1] = p->bufsize; /* long */ + iarg[2] = p->mode; /* int */ + *n_args = 3; + break; + } + /* fhstatfs */ + case 558: { + struct fhstatfs_args *p = params; + uarg[0] = (intptr_t) p->u_fhp; /* const struct fhandle * */ + uarg[1] = (intptr_t) p->buf; /* struct statfs32 * */ + *n_args = 2; + break; + } + /* mknodat */ + case 559: { + struct mknodat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->path; /* char * */ + iarg[2] = p->mode; /* mode_t */ + iarg[3] = p->dev; /* dev_t */ + *n_args = 4; + break; + } default: *n_args = 0; break; @@ -3473,22 +3415,6 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* mknod */ - case 14: - switch(ndx) { - case 0: - p = "userland char *"; - break; - case 1: - p = "int"; - break; - case 2: - p = "int"; - break; - default: - break; - }; - break; /* chmod */ case 15: switch(ndx) { @@ -4792,45 +4718,6 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* freebsd32_stat */ - case 188: - switch(ndx) { - case 0: - p = "userland char *"; - break; - case 1: - p = "userland struct stat32 *"; - break; - default: - break; - }; - break; - /* freebsd32_fstat */ - case 189: - switch(ndx) { - case 0: - p = "int"; - break; - case 1: - p = "userland struct stat32 *"; - break; - default: - break; - }; - break; - /* freebsd32_lstat */ - case 190: - switch(ndx) { - case 0: - p = "userland char *"; - break; - case 1: - p = "userland struct stat32 *"; - break; - default: - break; - }; - break; /* pathconf */ case 191: switch(ndx) { @@ -4883,25 +4770,6 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* freebsd32_getdirentries */ - case 196: - switch(ndx) { - case 0: - p = "int"; - break; - case 1: - p = "userland char *"; - break; - case 2: - p = "u_int"; - break; - case 3: - p = "userland int32_t *"; - break; - default: - break; - }; - break; /* nosys */ case 198: break; @@ -5435,22 +5303,6 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* getdents */ - case 272: - switch(ndx) { - case 0: - p = "int"; - break; - case 1: - p = "userland char *"; - break; - case 2: - p = "size_t"; - break; - default: - break; - }; - break; /* lchmod */ case 274: switch(ndx) { @@ -5509,78 +5361,39 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* nstat */ - case 278: + /* freebsd32_preadv */ + case 289: switch(ndx) { case 0: - p = "userland char *"; + p = "int"; break; case 1: - p = "userland struct nstat *"; + p = "userland struct iovec32 *"; + break; + case 2: + p = "u_int"; + break; + case 3: + p = "uint32_t"; + break; + case 4: + p = "uint32_t"; break; default: break; }; break; - /* nfstat */ - case 279: + /* freebsd32_pwritev */ + case 290: switch(ndx) { case 0: p = "int"; break; case 1: - p = "userland struct nstat *"; + p = "userland struct iovec32 *"; break; - default: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 23 09:32:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3604AD79803; Tue, 23 May 2017 09:32:28 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11767155E; Tue, 23 May 2017 09:32:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N9WRki032054; Tue, 23 May 2017 09:32:27 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N9WQtT032050; Tue, 23 May 2017 09:32:26 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705230932.v4N9WQtT032050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 23 May 2017 09:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318738 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 09:32:28 -0000 Author: ae Date: Tue May 23 09:32:26 2017 New Revision: 318738 URL: https://svnweb.freebsd.org/changeset/base/318738 Log: Fix possible double releasing for SA and SP references. There are two possible ways how crypto callback are called: directly from caller and deffered from crypto thread. For outbound packets the direct call chain is the following: IPSEC_OUTPUT() method -> ipsec[46]_common_output() -> -> ipsec[46]_perform_request() -> xform_output() -> -> crypto_dispatch() -> crypto_invoke() -> crypto_done() -> -> xform_output_cb() -> ipsec_process_done() -> ip[6]_output(). The SA and SP references are held while crypto processing is not finished. The error handling code wrongly expected that crypto callback always called from the crypto thread context, and it did references releasing in xform_output_cb(). But when the crypto callback called directly, in case of error the error handling code in ipsec[46]_perform_request() also did references releasing. To fix this, remove error handling from ipsec[46]_perform_request() and do it in xform_output() before crypto_dispatch(). MFC after: 10 days Modified: head/sys/netipsec/ipsec_output.c head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Tue May 23 09:30:42 2017 (r318737) +++ head/sys/netipsec/ipsec_output.c Tue May 23 09:32:26 2017 (r318738) @@ -273,10 +273,6 @@ ipsec4_perform_request(struct mbuf *m, s goto bad; } error = (*sav->tdb_xform->xf_output)(m, sp, sav, idx, i, off); - if (error != 0) { - key_freesav(&sav); - key_freesp(&sp); - } return (error); bad: IPSECSTAT_INC(ips_out_inval); @@ -581,10 +577,6 @@ ipsec6_perform_request(struct mbuf *m, s goto bad; } error = (*sav->tdb_xform->xf_output)(m, sp, sav, idx, i, off); - if (error != 0) { - key_freesav(&sav); - key_freesp(&sp); - } return (error); bad: IPSEC6STAT_INC(ips_out_inval); Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Tue May 23 09:30:42 2017 (r318737) +++ head/sys/netipsec/xform_ah.c Tue May 23 09:32:26 2017 (r318738) @@ -1049,6 +1049,8 @@ ah_output(struct mbuf *m, struct secpoli bad: if (m) m_freem(m); + key_freesav(&sav); + key_freesp(&sp); return (error); } Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Tue May 23 09:30:42 2017 (r318737) +++ head/sys/netipsec/xform_esp.c Tue May 23 09:32:26 2017 (r318738) @@ -861,6 +861,8 @@ esp_output(struct mbuf *m, struct secpol bad: if (m) m_freem(m); + key_freesav(&sav); + key_freesp(&sp); return (error); } /* Modified: head/sys/netipsec/xform_ipcomp.c ============================================================================== --- head/sys/netipsec/xform_ipcomp.c Tue May 23 09:30:42 2017 (r318737) +++ head/sys/netipsec/xform_ipcomp.c Tue May 23 09:32:26 2017 (r318738) @@ -510,6 +510,8 @@ ipcomp_output(struct mbuf *m, struct sec bad: if (m) m_freem(m); + key_freesav(&sav); + key_freesp(&sp); return (error); } From owner-svn-src-all@freebsd.org Tue May 23 10:00:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 471C1D7A14B; Tue, 23 May 2017 10:00:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22484123B; Tue, 23 May 2017 10:00:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NA0rUM040474; Tue, 23 May 2017 10:00:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NA0rQu040473; Tue, 23 May 2017 10:00:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705231000.v4NA0rQu040473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 May 2017 10:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318739 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 10:00:54 -0000 Author: kib Date: Tue May 23 10:00:52 2017 New Revision: 318739 URL: https://svnweb.freebsd.org/changeset/base/318739 Log: For ld.so direct execution mode, implement -p option: search for the binary in $PATH. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D10790 Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Tue May 23 09:32:26 2017 (r318738) +++ head/libexec/rtld-elf/rtld.c Tue May 23 10:00:52 2017 (r318739) @@ -120,6 +120,7 @@ static void objlist_push_head(Objlist *, static void objlist_push_tail(Objlist *, Obj_Entry *); static void objlist_put_after(Objlist *, Obj_Entry *, Obj_Entry *); static void objlist_remove(Objlist *, Obj_Entry *); +static int open_binary_fd(const char *argv0, bool search_in_path); static int parse_args(char* argv[], int argc, bool *use_pathp, int *fdp); static int parse_integer(const char *); static void *path_enumerate(const char *, path_enum_proc, void *); @@ -439,12 +440,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ argv0 = argv[rtld_argc]; explicit_fd = (fd != -1); if (!explicit_fd) - fd = open(argv0, O_RDONLY | O_CLOEXEC | O_VERIFY); - if (fd == -1) { - rtld_printf("Opening %s: %s\n", argv0, - rtld_strerror(errno)); - rtld_die(); - } + fd = open_binary_fd(argv0, search_in_path); if (fstat(fd, &st) == -1) { _rtld_error("failed to fstat FD %d (%s): %s", fd, explicit_fd ? "user-provided descriptor" : argv0, @@ -5280,6 +5276,52 @@ symlook_init_from_req(SymLook *dst, cons dst->lockstate = src->lockstate; } +static int +open_binary_fd(const char *argv0, bool search_in_path) +{ + char *pathenv, *pe, binpath[PATH_MAX]; + int fd; + + if (search_in_path && strchr(argv0, '/') == NULL) { + pathenv = getenv("PATH"); + if (pathenv == NULL) { + rtld_printf("-p and no PATH environment variable\n"); + rtld_die(); + } + pathenv = strdup(pathenv); + if (pathenv == NULL) { + rtld_printf("Cannot allocate memory\n"); + rtld_die(); + } + fd = -1; + errno = ENOENT; + while ((pe = strsep(&pathenv, ":")) != NULL) { + if (strlcpy(binpath, pe, sizeof(binpath)) > + sizeof(binpath)) + continue; + if (binpath[0] != '\0' && + strlcat(binpath, "/", sizeof(binpath)) > + sizeof(binpath)) + continue; + if (strlcat(binpath, argv0, sizeof(binpath)) > + sizeof(binpath)) + continue; + fd = open(binpath, O_RDONLY | O_CLOEXEC | O_VERIFY); + if (fd != -1 || errno != ENOENT) + break; + } + free(pathenv); + } else { + fd = open(argv0, O_RDONLY | O_CLOEXEC | O_VERIFY); + } + + if (fd == -1) { + rtld_printf("Opening %s: %s\n", argv0, + rtld_strerror(errno)); + rtld_die(); + } + return (fd); +} /* * Parse a set of command-line arguments. @@ -5341,10 +5383,8 @@ parse_args(char* argv[], int argc, bool } *fdp = fd; break; - /* TODO: } else if (opt == 'p') { *use_pathp = true; - */ } else { rtld_printf("invalid argument: '%s'\n", arg); print_usage(argv[0]); @@ -5391,7 +5431,7 @@ print_usage(const char *argv0) "\n" "Options:\n" " -h Display this help message\n" - /* TODO: " -p Search in PATH for named binary\n" */ + " -p Search in PATH for named binary\n" " -f Execute instead of searching for \n" " -- End of RTLD options\n" " Name of process to execute\n" From owner-svn-src-all@freebsd.org Tue May 23 11:08:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3A98D79A45; Tue, 23 May 2017 11:08:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 912D71398; Tue, 23 May 2017 11:08:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NB8aNP068648; Tue, 23 May 2017 11:08:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NB8aSv068647; Tue, 23 May 2017 11:08:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705231108.v4NB8aSv068647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 11:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318740 - head/share/examples X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 11:08:37 -0000 Author: trasz Date: Tue May 23 11:08:36 2017 New Revision: 318740 URL: https://svnweb.freebsd.org/changeset/base/318740 Log: Remove unneccessary call to mtree, which, when building as an unprivileged user (with -DNO_ROOT), resulted in warnings looking like these: share/man/cat8: user (9, 3819, not modified: Operation not permitted) permissions (0755, 0700, modified) The BSD.usr.mk is already taken care of in etc/Makefile. Submitted by: Alex Richardson Reviewed by: bdrewery MFC after: 1 month Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9212 Modified: head/share/examples/Makefile Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Tue May 23 10:00:52 2017 (r318739) +++ head/share/examples/Makefile Tue May 23 11:08:36 2017 (r318740) @@ -240,8 +240,6 @@ copies: rm -f ${DESTDIR}${BINDIR}/$i; \ fi .endfor - mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ - -f ${SRCTOP}/etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr .for file in ${XFILES} ${INSTALL} -T package=${PACKAGE_${file}:Uexamples} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ ${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file} From owner-svn-src-all@freebsd.org Tue May 23 12:00:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13BB1D7ADE1; Tue, 23 May 2017 12:00:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D31E01BB2; Tue, 23 May 2017 12:00:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NC08Gn088695; Tue, 23 May 2017 12:00:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NC0833088694; Tue, 23 May 2017 12:00:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705231200.v4NC0833088694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 12:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318741 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:00:10 -0000 Author: trasz Date: Tue May 23 12:00:08 2017 New Revision: 318741 URL: https://svnweb.freebsd.org/changeset/base/318741 Log: Remove superfluous parentheses. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/mips/mips/busdma_machdep.c Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Tue May 23 11:08:36 2017 (r318740) +++ head/sys/mips/mips/busdma_machdep.c Tue May 23 12:00:08 2017 (r318741) @@ -759,7 +759,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma bus_addr_t curaddr; bus_size_t sgsize; - if ((map->pagesneeded == 0)) { + if (map->pagesneeded == 0) { CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d", dmat->lowaddr, dmat->boundary, dmat->alignment); CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d", @@ -790,7 +790,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm vm_offset_t vendaddr; bus_addr_t paddr; - if ((map->pagesneeded == 0)) { + if (map->pagesneeded == 0) { CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d", dmat->lowaddr, dmat->boundary, dmat->alignment); CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d", From owner-svn-src-all@freebsd.org Tue May 23 12:04:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67CCFD78472; Tue, 23 May 2017 12:04:01 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2895F125D; Tue, 23 May 2017 12:04:01 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NC40pL092892; Tue, 23 May 2017 12:04:00 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NC40Ll092888; Tue, 23 May 2017 12:04:00 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705231204.v4NC40Ll092888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 23 May 2017 12:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318742 - in stable/11/sys/arm: arm include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:04:01 -0000 Author: mmel Date: Tue May 23 12:03:59 2017 New Revision: 318742 URL: https://svnweb.freebsd.org/changeset/base/318742 Log: MFC r318021,r318251: r318021: Introduce pmap_remap_vm_attr(), it allows to remap one VM memattr class to another. r318251: Clarify usage rules for pmap_remap_vm_attr(). Not a functional change. Modified: stable/11/sys/arm/arm/pmap-v6.c stable/11/sys/arm/include/pmap-v6.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/11/sys/arm/arm/pmap-v6.c Tue May 23 12:00:08 2017 (r318741) +++ stable/11/sys/arm/arm/pmap-v6.c Tue May 23 12:03:59 2017 (r318742) @@ -497,6 +497,42 @@ pmap_set_tex(void) } /* + * Remap one vm_meattr class to another one. This can be useful as + * workaround for SOC errata, e.g. if devices must be accessed using + * SO memory class. + * + * !!! Please note that this function is absolutely last resort thing. + * It should not be used under normal circumstances. !!! + * + * Usage rules: + * - it shall be called after pmap_bootstrap_prepare() and before + * cpu_mp_start() (thus only on boot CPU). In practice, it's expected + * to be called from platform_attach() or platform_late_init(). + * + * - if remapping doesn't change caching mode, or until uncached class + * is remapped to any kind of cached one, then no other restriction exists. + * + * - if pmap_remap_vm_attr() changes caching mode, but both (original and + * remapped) remain cached, then caller is resposible for calling + * of dcache_wbinv_poc_all(). + * + * - remapping of any kind of cached class to uncached is not permitted. + */ +void +pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr) +{ + 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]; + + /* Replace TEX attribute and apply it. */ + tex_class[old_idx] = tex_class[new_idx]; + pmap_set_tex(); +} + +/* * KERNBASE must be multiple of NPT2_IN_PG * PTE1_SIZE. In other words, * KERNBASE is mapped by first L2 page table in L2 page table page. It * meets same constrain due to PT2MAP being placed just under KERNBASE. Modified: stable/11/sys/arm/include/pmap-v6.h ============================================================================== --- stable/11/sys/arm/include/pmap-v6.h Tue May 23 12:00:08 2017 (r318741) +++ stable/11/sys/arm/include/pmap-v6.h Tue May 23 12:03:59 2017 (r318742) @@ -189,6 +189,7 @@ vm_offset_t pmap_preboot_reserve_pages(u vm_offset_t pmap_preboot_get_vpages(u_int); void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t, vm_memattr_t); +void pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr); #endif /* _KERNEL */ #endif /* !_MACHINE_PMAP_V6_H_ */ From owner-svn-src-all@freebsd.org Tue May 23 12:40:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7AD4D7995A; Tue, 23 May 2017 12:40:51 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92A9A1896; Tue, 23 May 2017 12:40:51 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NCeoYA008487; Tue, 23 May 2017 12:40:50 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NCeobS008485; Tue, 23 May 2017 12:40:50 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201705231240.v4NCeobS008485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Tue, 23 May 2017 12:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318743 - in stable: 10/sys/sys 11/sys/kern 11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:40:51 -0000 Author: badger Date: Tue May 23 12:40:50 2017 New Revision: 318743 URL: https://svnweb.freebsd.org/changeset/base/318743 Log: move p_sigqueue to the end of struct proc In order to preserve KBI in stable branches, replace the existing p_sigqueue slot with padding and move the expanded (as of r315949) p_sigqueue to the end of the struct. This is a repeat of r317529 (which concerned td_sigqueue in struct thread) for p_sigqueue in struct proc. Virtualbox modules (and possibly others) are affected without this fix. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D10843 Modified: stable/11/sys/kern/kern_thread.c stable/11/sys/sys/proc.h Changes in other areas also in this revision: Modified: stable/10/sys/sys/proc.h Modified: stable/11/sys/kern/kern_thread.c ============================================================================== --- stable/11/sys/kern/kern_thread.c Tue May 23 12:03:59 2017 (r318742) +++ stable/11/sys/kern/kern_thread.c Tue May 23 12:40:50 2017 (r318743) @@ -87,11 +87,11 @@ _Static_assert(offsetof(struct proc, p_f "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0xbc, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x3d0, +_Static_assert(offsetof(struct proc, p_filemon) == 0x3c0, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x3e0, +_Static_assert(offsetof(struct proc, p_comm) == 0x3d0, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b0, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4a0, "struct proc KBI p_emuldata"); #endif #ifdef __i386__ @@ -107,11 +107,11 @@ _Static_assert(offsetof(struct proc, p_f "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0x74, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x278, +_Static_assert(offsetof(struct proc, p_filemon) == 0x268, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x284, +_Static_assert(offsetof(struct proc, p_comm) == 0x274, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x304, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x2f4, "struct proc KBI p_emuldata"); #endif Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Tue May 23 12:03:59 2017 (r318742) +++ stable/11/sys/sys/proc.h Tue May 23 12:40:50 2017 (r318743) @@ -567,8 +567,8 @@ struct proc { struct mtx p_itimmtx; /* Lock for the virt/prof timers */ struct mtx p_profmtx; /* Lock for the profiling */ struct ksiginfo *p_ksi; /* Locked by parent proc lock */ - sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ -#define p_siglist p_sigqueue.sq_signals + uint64_t padding1[4]; + void *padding2[4]; /* The following fields are all zeroed upon creation in fork. */ #define p_startzero p_oppid @@ -660,6 +660,8 @@ struct proc { u_int p_ptevents; /* (c) ptrace() event mask. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ + sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ +#define p_siglist p_sigqueue.sq_signals }; #define p_session p_pgrp->pg_session From owner-svn-src-all@freebsd.org Tue May 23 12:40:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05937D7995F; Tue, 23 May 2017 12:40:52 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C97E21898; Tue, 23 May 2017 12:40:51 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NCeopn008494; Tue, 23 May 2017 12:40:50 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NCeoKx008493; Tue, 23 May 2017 12:40:50 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201705231240.v4NCeoKx008493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Tue, 23 May 2017 12:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318743 - in stable: 10/sys/sys 11/sys/kern 11/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:40:52 -0000 Author: badger Date: Tue May 23 12:40:50 2017 New Revision: 318743 URL: https://svnweb.freebsd.org/changeset/base/318743 Log: move p_sigqueue to the end of struct proc In order to preserve KBI in stable branches, replace the existing p_sigqueue slot with padding and move the expanded (as of r315949) p_sigqueue to the end of the struct. This is a repeat of r317529 (which concerned td_sigqueue in struct thread) for p_sigqueue in struct proc. Virtualbox modules (and possibly others) are affected without this fix. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D10843 Modified: stable/10/sys/sys/proc.h Changes in other areas also in this revision: Modified: stable/11/sys/kern/kern_thread.c stable/11/sys/sys/proc.h Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Tue May 23 12:03:59 2017 (r318742) +++ stable/10/sys/sys/proc.h Tue May 23 12:40:50 2017 (r318743) @@ -528,8 +528,8 @@ struct proc { LIST_HEAD(, proc) p_children; /* (e) Pointer to list of children. */ struct mtx p_mtx; /* (n) Lock for this struct. */ struct ksiginfo *p_ksi; /* Locked by parent proc lock */ - sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ -#define p_siglist p_sigqueue.sq_signals + uint64_t padding1[4]; + void *padding2[4]; /* The following fields are all zeroed upon creation in fork. */ #define p_startzero p_oppid @@ -626,6 +626,8 @@ struct proc { u_int p_ptevents; /* (c) ptrace() event mask. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ + sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ +#define p_siglist p_sigqueue.sq_signals }; #define p_session p_pgrp->pg_session From owner-svn-src-all@freebsd.org Tue May 23 12:44:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ACB9D79AC2; Tue, 23 May 2017 12:44:25 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2376F1E9D; Tue, 23 May 2017 12:44:24 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 634857005E; Tue, 23 May 2017 08:43:47 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=subject:to :references:cc:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=DFoPeyG9Pxp9 mDDGMSp8ux0mDlY=; b=wA5bMA+mQXT2jAkLLPH9hqr+5TE9pVYTVJSzUMKfpI6B 0Koh04dZq3iv//YG8sd5NYyare0fiNagJGi85+kA6GU5Eo1SkooCtePdA8eLS1mN 4cT7Wq984Pjvzv2nVTE47olIRnFqoOTkPxj5Y3WUeZOVxwkupOYFAOMF/8IuU+8= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 5CD697005D; Tue, 23 May 2017 08:43:47 -0400 (EDT) Received: from [192.168.1.103] (unknown [24.7.205.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 0F9017005C; Tue, 23 May 2017 08:43:45 -0400 (EDT) Subject: Re: svn commit: r317529 - in stable: 10/sys/sys 11/sys/sys To: Slawa Olhovchenkov References: <201704272228.v3RMSoIg000680@repo.freebsd.org> <20170509203244.GA3182@zxy.spb.ru> <6dc19869-1d5e-cd7d-9dca-64379c482f3f@FreeBSD.org> <20170510125721.GE3165@zxy.spb.ru> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org From: Eric Badger Message-ID: <7b33f65d-380a-bb0e-032f-d84253871536@FreeBSD.org> Date: Tue, 23 May 2017 07:43:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170510125721.GE3165@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 759EB9AE-3FB5-11E7-8FED-61520C78B957-46178211!pb-smtp2.pobox.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:44:25 -0000 On 05/10/2017 07:57 AM, Slawa Olhovchenkov wrote: > On Tue, May 09, 2017 at 09:14:20PM -0500, Eric Badger wrote: > >> On 05/09/2017 03:32 PM, Slawa Olhovchenkov wrote: >>> On Thu, Apr 27, 2017 at 10:28:50PM +0000, Eric Badger wrote: >>> >>>> Author: badger >>>> Date: Thu Apr 27 22:28:49 2017 >>>> New Revision: 317529 >>>> URL: https://svnweb.freebsd.org/changeset/base/317529 >>>> >>>> Log: >>>> Move td_sigqueue to the end of struct thread >>>> >>>> In order to preserve KBI in stable branches, replace the existing >>>> td_sigqueue slot with padding and move the expanded (as of r315949) >>>> td_sigqueue to the end of the struct. >>>> >>>> Reported by: jhb >>>> Suggested by: kib >>>> Reviewed by: jhb, kib, vangyzen >>>> Sponsored by: Dell EMC >>>> Differential Revision: https://reviews.freebsd.org/D10515 >>>> >>>> Modified: >>>> stable/10/sys/sys/proc.h >>> >>> Is this resolve only crash related to nvidia-driver? >>> Like virtualbox related crash still occur. >>> >> >> Yes, this was intended to address nvidia driver crashes. Is the virtual >> box problem the same as the one described here? >> >> https://lists.freebsd.org/pipermail/freebsd-stable/2017-March/087028.html > > I am use GENERIC and GENERIC kernel just reboot, w/o create crush > dump. > I mean need to add DDB and KDB to kernel config? > This should be fixed as of r318743. Eric From owner-svn-src-all@freebsd.org Tue May 23 12:57:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 224E5D7A196; Tue, 23 May 2017 12:57:42 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id E441B1794; Tue, 23 May 2017 12:57:41 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from dhcp-10-248-96-26.eduroam.wireless.private.cam.ac.uk (global-5-141.nat-2.net.cam.ac.uk [131.111.5.141]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 7992D4E6DB; Tue, 23 May 2017 12:57:39 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r309749 - in head/sys: amd64/conf arm/conf conf i386/conf mips/conf pc98/conf powerpc/conf sparc64/conf From: Andrew Turner In-Reply-To: <201612091854.uB9IsCpN011656@repo.freebsd.org> Date: Tue, 23 May 2017 13:57:38 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0C6D4B91-128A-4918-9FB0-7F1556A97B12@fubar.geek.nz> References: <201612091854.uB9IsCpN011656@repo.freebsd.org> To: Mark Johnston X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:57:42 -0000 > On 9 Dec 2016, at 18:54, Mark Johnston wrote: >=20 > Author: markj > Date: Fri Dec 9 18:54:12 2016 > New Revision: 309749 > URL: https://svnweb.freebsd.org/changeset/base/309749 >=20 > Log: > Add a COMPAT_FREEBSD11 kernel option. >=20 > Use it wherever COMPAT_FREEBSD10 is currently specified. Why was this only added where COMPAT_FREEBSD10 was already used? We = added arm64 and riscv between 10 and 11 so neither have this option. Andrew From owner-svn-src-all@freebsd.org Tue May 23 13:57:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA963D7A6A6; Tue, 23 May 2017 13:57:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B79F417E0; Tue, 23 May 2017 13:57:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NDvtsv038523; Tue, 23 May 2017 13:57:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NDvtGx038522; Tue, 23 May 2017 13:57:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705231357.v4NDvtGx038522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 May 2017 13:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318744 - head/sys/arm64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 13:57:57 -0000 Author: kib Date: Tue May 23 13:57:55 2017 New Revision: 318744 URL: https://svnweb.freebsd.org/changeset/base/318744 Log: Add COMPAT_FREEBSD11 on arm64, the arch is almost tier-1. Discussed with: andrew, emaste Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Tue May 23 12:40:50 2017 (r318743) +++ head/sys/arm64/conf/GENERIC Tue May 23 13:57:55 2017 (r318744) @@ -50,6 +50,7 @@ options PSEUDOFS # Pseudo-filesystem f options GEOM_PART_GPT # GUID Partition Tables. options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization +options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support From owner-svn-src-all@freebsd.org Tue May 23 14:01:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AC9FD7A889; Tue, 23 May 2017 14:01:09 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0317C1BA8; Tue, 23 May 2017 14:01:09 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22f.google.com with SMTP id k91so97713780ioi.1; Tue, 23 May 2017 07:01:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=3o48eu4Ebo0X/7fXPz1xetsEphao7eNk+JC7RQq6vEQ=; b=r7XkZmUtL8rCeLeFs95Cy3mbfEqmqkf8BSDnYuXvH0D5UktBiSJ1MB3lHjC99mSTYC dLyHefY94S6Q3c/C4LNdz7LvqRza8HmLa2l336PwGoMz0hzj8f376RbZe6qV7JmY/p51 6UY9JuJZSAXhFyZOOKNQzeajzjLRtphnbXz8XWmX/7JDIUKdMwx0U2Ja4Gn9DmG10H/t YI3OBx0kX4iW1RYwOLZqNK67RapOFGcZ//lYxWo/sOKlngNM8HDGuKRPYW3RUpc7rJQQ 4jSCs0ImnvCQmRmhZzPodznvor+DvxSYgibmSOrTQITEl579PMJ2rjbGZuG75dali81B /Dng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=3o48eu4Ebo0X/7fXPz1xetsEphao7eNk+JC7RQq6vEQ=; b=CbavkC24jZrO6hk0tBJMJ/YqyWeV1ONVy5Uy/5lr4lO9gn5k/eWAz82zTCH2yAYU3K U1YhHc4U9tNqE9bn+zCSQbjzgVoe4yhUmWCwOhlMmM9X2/g9Umf1M4FISp8c0oBokXjD f9plY7dtc8f9KwRgt1rHSVI+fzdVWne8EEpsVavQiNtUryx2yCru5CiGToOyq5ix6APs 09cQ4vvw7Nd8dqTnR3B/bR9JPZBkwSgOkJ68W0c4rTcjeyUnNLZfAGqRZebvdxMr/3OA lLZAmCev8LqP+2COa287azfQjPslaV4PMhNXo0H/yknIAORDzUEaFyEYicoolOSv4vmX 38Rg== X-Gm-Message-State: AODbwcASFini/p+wg1FE5+D+B8ipo84ZpN8uBtskwu3ggB9m3TLwlCYi F6NCKiYALaalakxFgf7ypBIm+uY8q40vitU= X-Received: by 10.107.170.16 with SMTP id t16mr26264629ioe.113.1495548067077; Tue, 23 May 2017 07:01:07 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.169.201 with HTTP; Tue, 23 May 2017 07:00:46 -0700 (PDT) In-Reply-To: <201705230929.v4N9T5g1028124@repo.freebsd.org> References: <201705230929.v4N9T5g1028124@repo.freebsd.org> From: Ed Maste Date: Tue, 23 May 2017 10:00:46 -0400 X-Google-Sender-Auth: v6HPSJd9sFY8XP6jCvhP_w00SVo Message-ID: Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... To: Konstantin Belousov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 14:01:09 -0000 On 23 May 2017 at 05:29, Konstantin Belousov wrote: > Author: kib > Date: Tue May 23 09:29:05 2017 > New Revision: 318736 > URL: https://svnweb.freebsd.org/changeset/base/318736 > > Update note: strictly follow the instructions in UPDATING. Build > and install the new kernel with COMPAT_FREEBSD11 option enabled, > then reboot, and only then install new world. There's been some confusion over this point, so let me clarify: this note refers to the regular upgrade procedure documented in UPDATING under the heading "To rebuild everything and install it on the current system". Following the regular, documented procedure is both necessary and sufficient for the ino64 change. It's mentioned explicitly here because folks often take shortcuts with updating (e.g. not rebooting), and such a shortcut will fail with the ino64 change. From owner-svn-src-all@freebsd.org Tue May 23 14:10:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46829D7AD0C; Tue, 23 May 2017 14:10:44 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 280721359; Tue, 23 May 2017 14:10:44 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OQE00F00S2JD200@mr11p00im-asmtp004.me.com>; Tue, 23 May 2017 14:10:31 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1495548631; bh=9Er4YjISgiYC5Jc7lYtF4Qp/grD1lxlcA7hzE52yDwg=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=u+Slni5a/fg4o2pinSN1BLdEHKJsZRjd/KabGae/Pf91ryVmzagXFkPAiXaNEUCnj IFZSm+04PJGVj4vByep0wTpR0e97XD37q0tPfM7q+sL97UVBlOPQ9f6AzMDDw2Z7hK Gs/ugcGYoOkiu3tyVks7msKM1y6wnV2vjyg4CVvZW9UKHQyI4ReMQc8xIxdVsNkkt7 HaGrjBpsGpsH/UD/XkHxUqcN72KahJll7C4oDiiO+rHnWrjLLa7ToPf7yg76yLjklJ 0VDQull+Fz0KrXFSq3DwDU+zVdXfslylpuIQ8O6S1wbyDYy2s0B8F8W1qNBpG8Aph9 nQOvC8dABDeBw== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OQE00OB6SPHK020@mr11p00im-asmtp004.me.com>; Tue, 23 May 2017 14:10:30 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-23_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1705230074 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Tue, 23 May 2017 07:10:29 -0700 Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... From: Ravi Pokala To: Ed Maste , Konstantin Belousov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-id: <76949219-D46A-4D27-A331-1317A1410CD3@panasas.com> Thread-topic: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... References: <201705230929.v4N9T5g1028124@repo.freebsd.org> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 14:10:44 -0000 -----Original Message----- > From: on behalf of Ed Maste > Date: 2017-05-23, Tuesday at 07:00 > To: Konstantin Belousov > Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" > Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... > > On 23 May 2017 at 05:29, Konstantin Belousov wrote: >> Author: kib >> Date: Tue May 23 09:29:05 2017 >> New Revision: 318736 >> URL: https://svnweb.freebsd.org/changeset/base/318736 >> >> Update note: strictly follow the instructions in UPDATING. Build >> and install the new kernel with COMPAT_FREEBSD11 option enabled, >> then reboot, and only then install new world. > > There's been some confusion over this point, so let me clarify: this > note refers to the regular upgrade procedure documented in UPDATING > under the heading "To rebuild everything and install it on the current > system". Following the regular, documented procedure is both necessary > and sufficient for the ino64 change. > > It's mentioned explicitly here because folks often take shortcuts with > updating (e.g. not rebooting), and such a shortcut will fail with the >ino64 change. So then `tools/build/beinstall.sh' won't DTRT for this upgrade? -Ravi (rpokala@) From owner-svn-src-all@freebsd.org Tue May 23 14:17:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B97ACD7AFC3; Tue, 23 May 2017 14:17:12 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 802C417A7; Tue, 23 May 2017 14:17:12 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x22e.google.com with SMTP id g126so20473583ith.0; Tue, 23 May 2017 07:17:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=uGRCPAi6WJZ0MRInwV412e5syz01u9ziwChujyiuPyo=; b=dvz2S1HYpwJevgaE7Uf0m4vq7/P5OBLGPNkFlN/Ehq30HD9HoMoxHhefWZFAXP8seF 5STUBCLN3dkcoex4ft9i4dpnVfEPO5q0irfAITdBPNY58uQ+ET4xDU1C0i1ViqLhDF5t LeLELKm6TJXhS8+OdCCG95K4yoI7aURLRh3LiSsq83G/BbS8v49vC2jmGDch2fPU5NF8 vzlE/uLSg2ZELXAHEZQgjk9TAMjbCFI+i5uZ29D7QS/rjonjlAkDKeJF/qWtdeSJDP6C 8NfDYBmouPy6heWnOFMY6KJQx/Y0km6bffaMtvhVaXIBF1lJUH0qZwmLyCpm9NM2Ca1P 2UHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=uGRCPAi6WJZ0MRInwV412e5syz01u9ziwChujyiuPyo=; b=NYDp9CkSXWUc26MMbpwqR2nZriuKBqUOQqZ9sFVRQ4UtlZhQNGF3GajkUv8Z4UtK0Q u9+v66G2sWCzbqmpIbn/Yp9ibdpjlzmZzQRoN4FbnLLY1Xl6KKXCx2fjHH12vpjwS9EF yD0mv3Ab39BiTMPkwiqjmPZ3/tamPpcoWiqJhVhEJ5LPnnpDT726tkgVSFH+OsEmqRBj uj2Q7m3gky8YcHglBwsYy0Qqhe0i3O9dtcsYLWlfhoIzCMlUUVPPFYE7Kw4/h6fQ8ZUk o6y+NvN4bNNuGNjvtlojS7urs9A/Dhss3RV0ENIaybIW8Pof0YfS68WQBYH4sDewMzRA YKuA== X-Gm-Message-State: AODbwcC2n5Topr3ntxZUN38DtyNuLI08qnnb/7hTEBu0MTTLP5EIBJdj 4HRdVa6k3OeFs0SJ5hxemQ/RNtoK8w== X-Received: by 10.36.192.195 with SMTP id u186mr3158540itf.88.1495549031874; Tue, 23 May 2017 07:17:11 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.169.201 with HTTP; Tue, 23 May 2017 07:16:51 -0700 (PDT) In-Reply-To: <76949219-D46A-4D27-A331-1317A1410CD3@panasas.com> References: <201705230929.v4N9T5g1028124@repo.freebsd.org> <76949219-D46A-4D27-A331-1317A1410CD3@panasas.com> From: Ed Maste Date: Tue, 23 May 2017 10:16:51 -0400 X-Google-Sender-Auth: 1xBEOWt4NvpZaNloPax1xymOOwE Message-ID: Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... To: Ravi Pokala Cc: Konstantin Belousov , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 14:17:12 -0000 On 23 May 2017 at 10:10, Ravi Pokala wrote: > > So then `tools/build/beinstall.sh' won't DTRT for this upgrade? This should be fine, because the new kernel and world get installed into a new boot environment, not over top of the existing system. The problem only occurs when installing a new userland while the older kernel is still running. From owner-svn-src-all@freebsd.org Tue May 23 14:30:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B55DD7A3EE; Tue, 23 May 2017 14:30:27 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from mail.madpilot.net (grunt.madpilot.net [78.47.145.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1B131FFA; Tue, 23 May 2017 14:30:26 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from mail (mail [192.168.254.3]) by mail.madpilot.net (Postfix) with ESMTP id 3wXHxQ2d4dzZt0; Tue, 23 May 2017 16:30:18 +0200 (CEST) Received: from mail.madpilot.net ([192.168.254.3]) by mail (mail.madpilot.net [192.168.254.3]) (amavisd-new, port 10024) with ESMTP id wOtxNNU-ml8V; Tue, 23 May 2017 16:30:16 +0200 (CEST) Received: from marvin.madpilot.net (micro.madpilot.net [88.149.173.206]) by mail.madpilot.net (Postfix) with ESMTPSA; Tue, 23 May 2017 16:30:16 +0200 (CEST) Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... To: Ed Maste , Ravi Pokala Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Konstantin Belousov References: <201705230929.v4N9T5g1028124@repo.freebsd.org> <76949219-D46A-4D27-A331-1317A1410CD3@panasas.com> From: Guido Falsi Message-ID: <66e9311a-edca-c9eb-b3bd-e983c9be619a@FreeBSD.org> Date: Tue, 23 May 2017 16:30:15 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 14:30:27 -0000 On 05/23/17 16:16, Ed Maste wrote: > On 23 May 2017 at 10:10, Ravi Pokala wrote: >> >> So then `tools/build/beinstall.sh' won't DTRT for this upgrade? > > This should be fine, because the new kernel and world get installed > into a new boot environment, not over top of the existing system. The > problem only occurs when installing a new userland while the older > kernel is still running. So people using packaged base should avoid doing a simple "pkg upgrade"(which IS a shortcut, I'm aware of that) but should upgrade the kernel package, reboot and then upgrade the rest? -- Guido Falsi From owner-svn-src-all@freebsd.org Tue May 23 14:34:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30F96D7A69B; Tue, 23 May 2017 14:34:52 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB5101577; Tue, 23 May 2017 14:34:51 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dDAek-0003eX-SU; Tue, 23 May 2017 16:19:27 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Konstantin Belousov" , "Ed Maste" Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... References: <201705230929.v4N9T5g1028124@repo.freebsd.org> Date: Tue, 23 May 2017 16:19:26 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 5a1627636b35b65657045ef62631cd80 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 14:34:52 -0000 On Tue, 23 May 2017 16:00:46 +0200, Ed Maste wrote: > On 23 May 2017 at 05:29, Konstantin Belousov wrote: >> Author: kib >> Date: Tue May 23 09:29:05 2017 >> New Revision: 318736 >> URL: https://svnweb.freebsd.org/changeset/base/318736 >> >> Update note: strictly follow the instructions in UPDATING. Build >> and install the new kernel with COMPAT_FREEBSD11 option enabled, >> then reboot, and only then install new world. > > There's been some confusion over this point, so let me clarify: this > note refers to the regular upgrade procedure documented in UPDATING > under the heading "To rebuild everything and install it on the current > system". Following the regular, documented procedure is both necessary > and sufficient for the ino64 change. > > It's mentioned explicitly here because folks often take shortcuts with > updating (e.g. not rebooting), and such a shortcut will fail with the > ino64 change. I read this in the commit log and my first thought was that it would help a lot of people if there was an extra entry in UPDATING mentioning the explicit need of the 'installkernel, reboot, installworld' order of the official procedure. A lot of people do not read the commits, but do follow UPDATING. BTW: The content of the commit is great work and I'm sure it will benefit future of FreeBSD! Cheers, Ronald. From owner-svn-src-all@freebsd.org Tue May 23 14:39:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB3AD7A8FF; Tue, 23 May 2017 14:39:00 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C37118DB; Tue, 23 May 2017 14:39:00 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NEcxCi054872; Tue, 23 May 2017 14:38:59 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NEcxpK054871; Tue, 23 May 2017 14:38:59 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705231438.v4NEcxpK054871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 23 May 2017 14:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318745 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 14:39:00 -0000 Author: cy Date: Tue May 23 14:38:59 2017 New Revision: 318745 URL: https://svnweb.freebsd.org/changeset/base/318745 Log: Remove redundant variable declaration. MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Tue May 23 13:57:55 2017 (r318744) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Tue May 23 14:38:59 2017 (r318745) @@ -1677,10 +1677,6 @@ ipf_nat_siocdelnat(softc, softn, n, getl ipnat_t *n; int getlock; { -#ifdef IPF_NAT6 - int i; -#endif - if (getlock) { WRITE_ENTER(&softc->ipf_nat); } From owner-svn-src-all@freebsd.org Tue May 23 14:54:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C137CD7A68C; Tue, 23 May 2017 14:54:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 902CA11B1; Tue, 23 May 2017 14:54:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NEsw3B064476; Tue, 23 May 2017 14:54:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NEswUK064475; Tue, 23 May 2017 14:54:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705231454.v4NEswUK064475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 23 May 2017 14:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318746 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 14:54:59 -0000 Author: gjb Date: Tue May 23 14:54:58 2017 New Revision: 318746 URL: https://svnweb.freebsd.org/changeset/base/318746 Log: Document the requirement for two SA entries, following the IPSEC overhaul. Submitted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 23 14:38:59 2017 (r318745) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 23 14:54:58 2017 (r318746) @@ -779,6 +779,13 @@ sponsor="&yandex;">Support for the UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type has been removed. + + + Following the IPSEC code refactoring, + it is now necessary to have a security association + (SA) entry for both inbound and outbound + directions. + From owner-svn-src-all@freebsd.org Tue May 23 15:04:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46F3AD7ABF8; Tue, 23 May 2017 15:04:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16BF21A52; Tue, 23 May 2017 15:04:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NF4UH5068438; Tue, 23 May 2017 15:04:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NF4Usj068437; Tue, 23 May 2017 15:04:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705231504.v4NF4Usj068437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 23 May 2017 15:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318747 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 15:04:31 -0000 Author: gjb Date: Tue May 23 15:04:29 2017 New Revision: 318747 URL: https://svnweb.freebsd.org/changeset/base/318747 Log: Move the SA entry to the tcpmd5 module addition. Submitted by: ae Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 23 14:54:58 2017 (r318746) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 23 15:04:29 2017 (r318747) @@ -457,6 +457,13 @@ ipsec and tcpmd5 kernel modules have been added. + + Following the addition of the tcpmd5 + module, it is now necessary to have a security association + (SA) entry for both inbound and outbound + directions. + + The &man.ipfw.4; packet filter has been updated to add support for named dynamic states. @@ -779,13 +786,6 @@ sponsor="&yandex;">Support for the UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type has been removed. - - - Following the IPSEC code refactoring, - it is now necessary to have a security association - (SA) entry for both inbound and outbound - directions. - From owner-svn-src-all@freebsd.org Tue May 23 15:11:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47D7FD7AE40; Tue, 23 May 2017 15:11:15 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 282461EFA; Tue, 23 May 2017 15:11:15 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OQE00400VGD1B00@mr11p00im-asmtp004.me.com>; Tue, 23 May 2017 15:11:14 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1495552274; bh=ZAi7xRvXDvny8mYQgZ+I6TbNWoxmH3wh7YKS7muAmIo=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=L3bWGuYxT56hvlJXnqrKdk4+0Mw0DBGrzqYTO7QnVbJWV5YRfmL1hkdTALqeHTHwx XYBMg2J3+VpjhnXgDtyRaya/c8+mg2DF+mbIuM0eUe5b6Nw/4VbTw81QhBV+lYQjBf K4RQy6uHyviN4wiMrHKas556c4pGfOGniNBS/Zli6zBiFup0CKggWU1X/lY0mdxEHj 9UQkKp+U8i95ZxuU48AcknEEZEooNNfwhWkqH8oZE13gGYgcu0RZnG8JqzLiDn8RiR CBPu2IoSJMVf28FP8R1j2leTy+vCEIu4cLZwVFCyoQm47j7OxSNXCHGXaCMk5tZsKw PcSLMw/ODO7vg== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OQE0084TVIM9G00@mr11p00im-asmtp004.me.com>; Tue, 23 May 2017 15:11:12 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-23_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1705230079 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Tue, 23 May 2017 08:11:10 -0700 Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... From: Ravi Pokala To: Ed Maste Cc: Konstantin Belousov , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-id: Thread-topic: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... References: <201705230929.v4N9T5g1028124@repo.freebsd.org> <76949219-D46A-4D27-A331-1317A1410CD3@panasas.com> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 15:11:15 -0000 -----Original Message----- > From: on behalf of Ed Maste > Date: 2017-05-23, Tuesday at 07:16 > To: Ravi Pokala > Cc: Konstantin Belousov , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" > Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... > > On 23 May 2017 at 10:10, Ravi Pokala wrote: >> >> So then `tools/build/beinstall.sh' won't DTRT for this upgrade? > > This should be fine, because the new kernel and world get installed > into a new boot environment, not over top of the existing system. The > problem only occurs when installing a new userland while the older > kernel is still running. That's right, I'd forgotten how `beinstall.sh' did it's magic. Thanks for clarifying. -Ravi (rpokala@) From owner-svn-src-all@freebsd.org Tue May 23 15:13:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B368AD7A05C; Tue, 23 May 2017 15:13:24 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7718513B2; Tue, 23 May 2017 15:13:24 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x234.google.com with SMTP id b204so205308507oii.1; Tue, 23 May 2017 08:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UUSTbFHEvkNeJH19bP7az6Xe8uuIAbqE7elyn7cHNDY=; b=WtsSxrX6TlqcJKRMWQfR2uEOdWGLwuAQRkaRWrITjks3TI753Po/Y993+XNwW5g5DM xF/FKtQk59dB3PswN5bA9mHMlNzSpynD50TOmjJw+W4YmfjgU9tUFgJYhxNBK5Mpqs0t h4R9fMAE7JzUNbxrxGJwxK0oppsqUpN+ovJUwpP/IAVTRmwzwajg0tGkkjaub6j8RoeR cNk0FufdV4tHgF9H7GsaDvSsxzWjE3Te1OzxPFf06qdH78Pn9OyeGHwkYlFRVul/9/Z4 cQ2kKbGKMnOuCRJ9Q4fRAmp0yp/OwyoP9JjS6TPt953HA6gHT8e9cEUNBwPKQGTpia8S HrOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UUSTbFHEvkNeJH19bP7az6Xe8uuIAbqE7elyn7cHNDY=; b=bK0ct4BhKGddaBjsrvtesVnR4+wN7GjIyAVyM0Uy/7boZSpTAqIbG6/gRoBFSaUOWZ +molvJq++jzGGhAt91o4LnPfAY9w4UsV69xgFZQCmL9vYNdK3glB/XOFm9QZbq/j+XEa 5K1WclTNPp4MQ/6l35CHdgkoBJJXW5nr/BjIGuZtOXeaaJNn4XX1oJbpy7jOfC6UZhQy vgNcR2l/EzqxdmsheihzHTEWNs1RICwUGn6JT673C9pgBLxu7zXXfKYh9dhqEqKV07qG uLZrNomKbYJZXCZIyOZZK37dVUIPVJi6Nn0mbqQkdV7IPic7ZbsDHDshbGnHVVr06iyi cpdA== X-Gm-Message-State: AODbwcBE7RupM5CTmFEyzAAo0AGPEpWci9tK3yiKct6ecXTy0bYEkZHI yYoy2YSzyvprHHeDX+Q3v+e0bnR3Zg== X-Received: by 10.157.60.58 with SMTP id q55mr2149225otc.31.1495552403632; Tue, 23 May 2017 08:13:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.20.163 with HTTP; Tue, 23 May 2017 08:13:23 -0700 (PDT) In-Reply-To: <201705230655.v4N6tpx0065768@repo.freebsd.org> References: <201705230655.v4N6tpx0065768@repo.freebsd.org> From: Benjamin Kaduk Date: Tue, 23 May 2017 10:13:23 -0500 Message-ID: Subject: Re: svn commit: r318699 - head/lib/libc/gen To: Ngie Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 15:13:24 -0000 On Tue, May 23, 2017 at 1:55 AM, Ngie Cooper wrote: > Author: ngie > Date: Tue May 23 06:55:51 2017 > New Revision: 318699 > URL: https://svnweb.freebsd.org/changeset/base/318699 > > Log: > directory(3): delete trailing whitespace and rewrite `E.g.` as `e.g.` > FWIW, it is better-still written as "e.g.,", i.e., with trailing comma as well as leading comma. -Ben From owner-svn-src-all@freebsd.org Tue May 23 15:46:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 333AED7ABA1; Tue, 23 May 2017 15:46:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 056EB14AA; Tue, 23 May 2017 15:46:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NFkMrF084972; Tue, 23 May 2017 15:46:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NFkMl2084971; Tue, 23 May 2017 15:46:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705231546.v4NFkMl2084971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 23 May 2017 15:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318748 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 15:46:23 -0000 Author: gjb Date: Tue May 23 15:46:21 2017 New Revision: 318748 URL: https://svnweb.freebsd.org/changeset/base/318748 Log: Honor WITHOUT_TFTP for check-old* and delete-old* targets. Submitted by: philippe dot michel7 at sfr dot fr PR: 217949 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue May 23 15:04:29 2017 (r318747) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue May 23 15:46:21 2017 (r318748) @@ -8653,6 +8653,13 @@ OLD_FILES+=usr/share/man/man1/colcrt.1.g OLD_FILES+=usr/share/man/man1/ul.1.gz .endif +.if ${MK_TFTP} == no +OLD_FILES+=usr/bin/tftp +OLD_FILES+=usr/libexec/tftpd +OLD_FILES+=usr/share/man/man1/tftp.1.gz +OLD_FILES+=usr/share/man/man8/tftpd.8.gz +.endif + .if ${MK_TIMED} == no OLD_FILES+=usr/sbin/timed OLD_FILES+=usr/sbin/timedc From owner-svn-src-all@freebsd.org Tue May 23 16:12:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48011D7AA00; Tue, 23 May 2017 16:12:52 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08C5C1825; Tue, 23 May 2017 16:12:51 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NGCpAw097348; Tue, 23 May 2017 16:12:51 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NGCoR3097341; Tue, 23 May 2017 16:12:50 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705231612.v4NGCoR3097341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 23 May 2017 16:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318749 - in head: include lib/libc/include lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 16:12:52 -0000 Author: vangyzen Date: Tue May 23 16:12:50 2017 New Revision: 318749 URL: https://svnweb.freebsd.org/changeset/base/318749 Log: libthr: fix warnings from GCC when WARNS=6 Fix warnings about: - redundant declarations - a local variable shadowing a global function (dlinfo) - an old-style function definition (with an empty parameter list) - a variable that is possibly used uninitialized "make tinderbox" passes this time, except for a few unrelated kernel failures. Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10870 Modified: head/include/stdio.h head/lib/libc/include/libc_private.h head/lib/libthr/thread/thr_exit.c head/lib/libthr/thread/thr_kern.c head/lib/libthr/thread/thr_list.c head/lib/libthr/thread/thr_mutex.c head/lib/libthr/thread/thr_private.h Directory Properties: head/ (props changed) Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Tue May 23 15:46:21 2017 (r318748) +++ head/include/stdio.h Tue May 23 16:12:50 2017 (r318749) @@ -464,7 +464,10 @@ static __inline int __sputc(int _c, FILE (*(p)->_p = (c), (int)*(p)->_p++)) #endif +#ifndef __LIBC_ISTHREADED_DECLARED +#define __LIBC_ISTHREADED_DECLARED extern int __isthreaded; +#endif #ifndef __cplusplus Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Tue May 23 15:46:21 2017 (r318748) +++ head/lib/libc/include/libc_private.h Tue May 23 16:12:50 2017 (r318749) @@ -42,7 +42,10 @@ * or more threads. It is used to avoid calling locking functions * when they are not required. */ +#ifndef __LIBC_ISTHREADED_DECLARED +#define __LIBC_ISTHREADED_DECLARED extern int __isthreaded; +#endif /* * Elf_Auxinfo *__elf_aux_vector, the pointer to the ELF aux vector Modified: head/lib/libthr/thread/thr_exit.c ============================================================================== --- head/lib/libthr/thread/thr_exit.c Tue May 23 15:46:21 2017 (r318748) +++ head/lib/libthr/thread/thr_exit.c Tue May 23 16:12:50 2017 (r318749) @@ -46,8 +46,6 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "thr_private.h" -void _pthread_exit(void *status); - static void exit_thread(void) __dead2; __weak_reference(_pthread_exit, pthread_exit); @@ -72,7 +70,7 @@ static void thread_uw_init(void) { static int inited = 0; - Dl_info dlinfo; + Dl_info dli; void *handle; void *forcedunwind, *getcfa; @@ -80,12 +78,12 @@ thread_uw_init(void) return; handle = RTLD_DEFAULT; if ((forcedunwind = dlsym(handle, "_Unwind_ForcedUnwind")) != NULL) { - if (dladdr(forcedunwind, &dlinfo)) { + if (dladdr(forcedunwind, &dli)) { /* * Make sure the address is always valid by holding the library, * also assume functions are in same library. */ - if ((handle = dlopen(dlinfo.dli_fname, RTLD_LAZY)) != NULL) { + if ((handle = dlopen(dli.dli_fname, RTLD_LAZY)) != NULL) { forcedunwind = dlsym(handle, "_Unwind_ForcedUnwind"); getcfa = dlsym(handle, "_Unwind_GetCFA"); if (forcedunwind != NULL && getcfa != NULL) { Modified: head/lib/libthr/thread/thr_kern.c ============================================================================== --- head/lib/libthr/thread/thr_kern.c Tue May 23 15:46:21 2017 (r318748) +++ head/lib/libthr/thread/thr_kern.c Tue May 23 16:12:50 2017 (r318749) @@ -62,7 +62,7 @@ _thr_setthreaded(int threaded) } void -_thr_assert_lock_level() +_thr_assert_lock_level(void) { PANIC("locklevel <= 0"); } Modified: head/lib/libthr/thread/thr_list.c ============================================================================== --- head/lib/libthr/thread/thr_list.c Tue May 23 15:46:21 2017 (r318748) +++ head/lib/libthr/thread/thr_list.c Tue May 23 16:12:50 2017 (r318749) @@ -35,8 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include "thr_private.h" #include "libc_private.h" +#include "thr_private.h" /*#define DEBUG_THREAD_LIST */ #ifdef DEBUG_THREAD_LIST Modified: head/lib/libthr/thread/thr_mutex.c ============================================================================== --- head/lib/libthr/thread/thr_mutex.c Tue May 23 15:46:21 2017 (r318748) +++ head/lib/libthr/thread/thr_mutex.c Tue May 23 16:12:50 2017 (r318749) @@ -70,8 +70,6 @@ int __pthread_mutex_trylock(pthread_mute int __pthread_mutex_lock(pthread_mutex_t *mutex); int __pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime); -int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, - void *(calloc_cb)(size_t, size_t)); int _pthread_mutex_getspinloops_np(pthread_mutex_t *mutex, int *count); int _pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); int __pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); @@ -712,6 +710,7 @@ mutex_lock_common(struct pthread_mutex * struct pthread *curthread; int ret, robust; + robust = 0; /* pacify gcc */ curthread = _get_curthread(); if (!cvattach && m->m_flags & PMUTEX_FLAG_PRIVATE) THR_CRITICAL_ENTER(curthread); Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Tue May 23 15:46:21 2017 (r318748) +++ head/lib/libthr/thread/thr_private.h Tue May 23 16:12:50 2017 (r318749) @@ -701,7 +701,10 @@ do { \ (curthr->report_events && \ (((curthr)->event_mask | _thread_event_mask ) & e) != 0) +#ifndef __LIBC_ISTHREADED_DECLARED +#define __LIBC_ISTHREADED_DECLARED extern int __isthreaded; +#endif /* * Global variables for the pthread kernel. @@ -835,8 +838,10 @@ int _sched_yield(void); void _pthread_cleanup_push(void (*)(void *), void *); void _pthread_cleanup_pop(int); void _pthread_exit_mask(void *status, sigset_t *mask) __dead2 __hidden; +#ifndef _LIBC_PRIVATE_H_ void _pthread_cancel_enter(int maycancel); void _pthread_cancel_leave(int maycancel); +#endif int _pthread_mutex_consistent(pthread_mutex_t * _Nonnull); int _pthread_mutexattr_getrobust(pthread_mutexattr_t * _Nonnull __restrict, int * _Nonnull __restrict); @@ -844,46 +849,56 @@ int _pthread_mutexattr_setrobust(pthread /* #include */ #ifdef _SYS_FCNTL_H_ +#ifndef _LIBC_PRIVATE_H_ int __sys_fcntl(int, int, ...); int __sys_openat(int, const char *, int, ...); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ /* #include */ #ifdef _SIGNAL_H_ int __sys_kill(pid_t, int); -int __sys_sigaction(int, const struct sigaction *, struct sigaction *); +int __sys_sigaltstack(const struct sigaltstack *, struct sigaltstack *); int __sys_sigpending(sigset_t *); +int __sys_sigreturn(const ucontext_t *); +#ifndef _LIBC_PRIVATE_H_ +int __sys_sigaction(int, const struct sigaction *, struct sigaction *); int __sys_sigprocmask(int, const sigset_t *, sigset_t *); int __sys_sigsuspend(const sigset_t *); -int __sys_sigreturn(const ucontext_t *); -int __sys_sigaltstack(const struct sigaltstack *, struct sigaltstack *); -int __sys_sigwait(const sigset_t *, int *); int __sys_sigtimedwait(const sigset_t *, siginfo_t *, const struct timespec *); +int __sys_sigwait(const sigset_t *, int *); int __sys_sigwaitinfo(const sigset_t *set, siginfo_t *info); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ /* #include */ #ifdef _TIME_H_ +#ifndef _LIBC_PRIVATE_H_ int __sys_clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *); int __sys_nanosleep(const struct timespec *, struct timespec *); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ /* #include */ #ifdef _SYS_UCONTEXT_H_ +#ifndef _LIBC_PRIVATE_H_ int __sys_setcontext(const ucontext_t *ucp); int __sys_swapcontext(ucontext_t *oucp, const ucontext_t *ucp); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ /* #include */ #ifdef _UNISTD_H_ +void __sys_exit(int); +pid_t __sys_getpid(void); +#ifndef _LIBC_PRIVATE_H_ int __sys_close(int); int __sys_fork(void); -pid_t __sys_getpid(void); ssize_t __sys_read(int, void *, size_t); -void __sys_exit(int); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ static inline int _thr_isthreaded(void) From owner-svn-src-all@freebsd.org Tue May 23 16:35:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1428D7B312; Tue, 23 May 2017 16:35:31 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x236.google.com (mail-qt0-x236.google.com [IPv6:2607:f8b0:400d:c0d::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79D541645; Tue, 23 May 2017 16:35:31 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x236.google.com with SMTP id c13so132976054qtc.1; Tue, 23 May 2017 09:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QBJ0FdVc5OanE2EV/hr623swwhR2RyRm0de0KiOqfPE=; b=OxF0Ghq/hnnYz8gJ3eouGne7Vaw6niUQ8FSivG2mLYVxLC67fLU9DmWZCXWMgrgfT6 cMeuCv8GoOuCcKPcdJe2jZXls3CWea1YU26vcmDgqpyNAc1vdoRBS8yFE9ezFCrCgp0V WWGfk1TwD2AOQr5r7ZF8zBqI2Iu326SeDxN+u6X3OFuPfy6uhVVECHQEHChl1A/G25Kc NnK9csmwmDdevhx/XvXQaGmMd28Ti2hUmIjCIgyxMw7ENG9xCTEKitTzAzPN4uOsmRpj PiZlmLBBWVJVzRGOWrBIroyKRKMijeGxgJnnCLuzVk3oDPdNdfkvcGsTDkLpcSVfidhr HTig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=QBJ0FdVc5OanE2EV/hr623swwhR2RyRm0de0KiOqfPE=; b=t6ly0Wb7HFy9M26AuueJHwDRlcaEp8hlej/p/oxqicDR9qtPO/vw9U8nFAQRC9/hGx EmNhVLjRO+n6j04S9cRC5Ur9zphFJBIHRTf75IgjLc7XpBbC+7yKA3X2dZn2afbfE3dD JSVWu+oLDiotXz4iRhEf8nLmBDXMcfRa5vRX6qGgWuC1hEvRlEQ+dtYEWADOu5toXvQ/ ZboJRYKNoc0ycxTD/EegDqxJd/8t1pZUZwKazN63NmlVXTQ2/tWa2Kw3eZNkBOFseStf RyKc9OQby/bmhr6QWmUqaQkoDDt7YrBxk8xQ7tx1bcBuOjPjb6PV06/S4wIqFNPtgWiu FISg== X-Gm-Message-State: AODbwcDutgUO+uTDxp2B+XXHBZXqHkGzSB/OdYQdcMDBFydD8ii/rsgr mingj20oLbuN1UeU X-Received: by 10.237.59.119 with SMTP id q52mr30779048qte.143.1495557330566; Tue, 23 May 2017 09:35:30 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id q5sm755095qtb.52.2017.05.23.09.35.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2017 09:35:29 -0700 (PDT) Sender: Mark Johnston Date: Tue, 23 May 2017 09:35:44 -0700 From: Mark Johnston To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r309749 - in head/sys: amd64/conf arm/conf conf i386/conf mips/conf pc98/conf powerpc/conf sparc64/conf Message-ID: <20170523163544.GA12120@wkstn-mjohnston.west.isilon.com> References: <201612091854.uB9IsCpN011656@repo.freebsd.org> <0C6D4B91-128A-4918-9FB0-7F1556A97B12@fubar.geek.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0C6D4B91-128A-4918-9FB0-7F1556A97B12@fubar.geek.nz> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 16:35:31 -0000 On Tue, May 23, 2017 at 01:57:38PM +0100, Andrew Turner wrote: > > > On 9 Dec 2016, at 18:54, Mark Johnston wrote: > > > > Author: markj > > Date: Fri Dec 9 18:54:12 2016 > > New Revision: 309749 > > URL: https://svnweb.freebsd.org/changeset/base/309749 > > > > Log: > > Add a COMPAT_FREEBSD11 kernel option. > > > > Use it wherever COMPAT_FREEBSD10 is currently specified. > > Why was this only added where COMPAT_FREEBSD10 was already used? We added arm64 and riscv between 10 and 11 so neither have this option. No real reason, it was an oversight on my part. From owner-svn-src-all@freebsd.org Tue May 23 16:38:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F4C9D7B3B7; Tue, 23 May 2017 16:38:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C62017CE; Tue, 23 May 2017 16:38:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NGcBP7005942; Tue, 23 May 2017 16:38:11 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NGcAq1005935; Tue, 23 May 2017 16:38:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705231638.v4NGcAq1005935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 23 May 2017 16:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 16:38:12 -0000 Author: pfg Date: Tue May 23 16:38:10 2017 New Revision: 318750 URL: https://svnweb.freebsd.org/changeset/base/318750 Log: Bring some rough support for FreeBSD S/390 to the GNU toolchain. This is no-op and only for reference: the S/390 port seems to be elusive in the BSDs so it is convenient to keep some trace from past efforts. It is likely newer attempts will focus on a newer toolchain using clang instead. Obtained from: Perforce depot/projects/s390 Added: head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh (contents, props changed) head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh (contents, props changed) head/contrib/gcc/config/s390/freebsd.h - copied, changed from r318546, head/contrib/gcc/config/s390/linux.h Modified: head/contrib/binutils/bfd/config.bfd head/contrib/binutils/ld/configure.tgt head/contrib/gcc/config.gcc Modified: head/contrib/binutils/bfd/config.bfd ============================================================================== --- head/contrib/binutils/bfd/config.bfd Tue May 23 16:12:50 2017 (r318749) +++ head/contrib/binutils/bfd/config.bfd Tue May 23 16:38:10 2017 (r318750) @@ -1156,13 +1156,13 @@ case "${targ}" in targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec" ;; - s390-*-linux*) + s390-*-freebsd* | s390-*-linux*) targ_defvec=bfd_elf32_s390_vec targ64_selvecs=bfd_elf64_s390_vec want64=true ;; #ifdef BFD64 - s390x-*-linux*) + s390x-*-freebsd* | s390x-*-linux*) targ_defvec=bfd_elf64_s390_vec targ_selvecs=bfd_elf32_s390_vec want64=true Modified: head/contrib/binutils/ld/configure.tgt ============================================================================== --- head/contrib/binutils/ld/configure.tgt Tue May 23 16:12:50 2017 (r318749) +++ head/contrib/binutils/ld/configure.tgt Tue May 23 16:38:10 2017 (r318750) @@ -480,12 +480,21 @@ powerpc-*-lynxos*) targ_emul=ppclynx ;; rs6000-*-aix5*) targ_emul=aix5rs6 ;; rs6000-*-aix*) targ_emul=aixrs6 ;; +s390x-*-freebsd*) targ_emul=elf64_s390 + targ_extra_emuls=elf_s390 + targ_extra_libpath=$targ_extra_emuls + tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; s390x-*-linux*) targ_emul=elf64_s390 targ_extra_emuls=elf_s390 targ_extra_libpath=$targ_extra_emuls tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; s390x-*-tpf*) targ_emul=elf64_s390 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; +s390-*-freebsd*) targ_emul=elf_s390 + targ64_extra_emuls=elf64_s390 + targ64_extra_libpath=elf64_s390 + tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'` + ;; s390-*-linux*) targ_emul=elf_s390 targ64_extra_emuls=elf64_s390 targ64_extra_libpath=elf64_s390 Added: head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh Tue May 23 16:38:10 2017 (r318750) @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/elf64_s390.sh +. ${srcdir}/emulparams/elf_fbsd.sh Added: head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh Tue May 23 16:38:10 2017 (r318750) @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/elf_s390.sh +. ${srcdir}/emulparams/elf_fbsd.sh Modified: head/contrib/gcc/config.gcc ============================================================================== --- head/contrib/gcc/config.gcc Tue May 23 16:12:50 2017 (r318749) +++ head/contrib/gcc/config.gcc Tue May 23 16:38:10 2017 (r318750) @@ -1942,10 +1942,19 @@ rs6000-ibm-aix[56789].* | powerpc-ibm-ai thread_file='aix' extra_headers= ;; +s390-*-freebsd*) + tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} s390/freebsd.h" + ;; s390-*-linux*) tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h" tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux" ;; +s390x-*-freebsd*) + tm_file="s390/s390.h s390/s390x.h dbxelf.h elfos.h ${fbsd_tm_file} s390/freebsd.h" + tm_p_file=s390/s390-protos.h + md_file=s390/s390.md + out_file=s390/s390.c + ;; s390x-*-linux*) tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h" tm_p_file=s390/s390-protos.h Copied and modified: head/contrib/gcc/config/s390/freebsd.h (from r318546, head/contrib/gcc/config/s390/linux.h) ============================================================================== --- head/contrib/gcc/config/s390/linux.h Fri May 19 17:14:29 2017 (r318546, copy source) +++ head/contrib/gcc/config/s390/freebsd.h Tue May 23 16:38:10 2017 (r318750) @@ -1,4 +1,4 @@ -/* Definitions for Linux for S/390. +/* Definitions for FreeBSD for S/390. Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Hartmut Penner (hpenner@de.ibm.com) and @@ -21,25 +21,26 @@ along with GCC; see the file COPYING. I Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _LINUX_H -#define _LINUX_H +#ifndef _CONFIG_S390_FREEBSD_H +#define _CONFIG_S390_FREEBSD_H /* Target specific version string. */ #ifdef DEFAULT_TARGET_64BIT #undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (Linux for zSeries)"); +#define TARGET_VERSION fprintf (stderr, " (FreeBSD for zSeries)"); #else #undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (Linux for S/390)"); +#define TARGET_VERSION fprintf (stderr, " (FreeBSD for S/390)"); #endif /* Target specific type definitions. */ /* ??? Do we really want long as size_t on 31-bit? */ +/* Answer is yes for FreeBSD. */ #undef SIZE_TYPE -#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "long unsigned int") +#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") #undef PTRDIFF_TYPE #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") @@ -48,16 +49,8 @@ Software Foundation, 51 Franklin Street, #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 - -/* Target specific preprocessor settings. */ - -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - LINUX_TARGET_OS_CPP_BUILTINS(); \ - } \ - while (0) - +#undef DEFAULT_SIGNED_CHAR +#define DEFAULT_SIGNED_CHAR 1 /* Target specific assembler settings. */ @@ -92,7 +85,7 @@ Software Foundation, 51 Franklin Street, #define TARGET_ASM_FILE_END file_end_indicate_exec_stack -#define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h" +#define MD_UNWIND_SUPPORT "config/s390/freebsd-unwind.h" #ifdef TARGET_LIBC_PROVIDES_SSP /* s390 glibc provides __stack_chk_guard in 0x14(tp), @@ -103,4 +96,10 @@ Software Foundation, 51 Franklin Street, /* Define if long doubles should be mangled as 'g'. */ #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING +/* Override the default comment-starter of "/APP" from unix.h. */ +#undef ASM_APP_ON +#define ASM_APP_ON "#APP\n" +#undef ASM_APP_OFF +#define ASM_APP_OFF "#NO_APP\n" + #endif From owner-svn-src-all@freebsd.org Tue May 23 16:59:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49ECCD7B98D; Tue, 23 May 2017 16:59:26 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9B6712A6; Tue, 23 May 2017 16:59:25 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NGxOW9013884; Tue, 23 May 2017 16:59:24 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NGxOB8013882; Tue, 23 May 2017 16:59:24 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201705231659.v4NGxOB8013882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Tue, 23 May 2017 16:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318751 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 16:59:26 -0000 Author: swills (ports committer) Date: Tue May 23 16:59:24 2017 New Revision: 318751 URL: https://svnweb.freebsd.org/changeset/base/318751 Log: Add security.bsd.see_jail_proc Add security.bsd.see_jail_proc sysctl to hide jail processes from non-root users Reviewed by: jamie Approved by: allanjude Relnotes: yes Differential Revision: https://reviews.freebsd.org/D10770 Modified: head/sys/kern/kern_prot.c head/sys/sys/proc.h Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Tue May 23 16:38:10 2017 (r318750) +++ head/sys/kern/kern_prot.c Tue May 23 16:59:24 2017 (r318751) @@ -1386,6 +1386,35 @@ cr_canseeothergids(struct ucred *u1, str return (0); } +/* + * 'see_jail_proc' determines whether or not visibility of processes and + * sockets with credentials holding different jail ids is possible using a + * variety of system MIBs. + * + * XXX: data declarations should be together near the beginning of the file. + */ + +static int see_jail_proc = 1; +SYSCTL_INT(_security_bsd, OID_AUTO, see_jail_proc, CTLFLAG_RW, + &see_jail_proc, 0, + "Unprivileged processes may see subjects/objects with different jail ids"); + +/*- + * Determine if u1 "can see" the subject specified by u2, according to the + * 'see_jail_proc' policy. + * Returns: 0 for permitted, ESRCH otherwise + * Locks: none + * References: *u1 and *u2 must not change during the call + * u1 may equal u2, in which case only one reference is required + */ +int +cr_canseejailproc(struct ucred *u1, struct ucred *u2) +{ + if (u1->cr_uid == 0) + return (0); + return (!see_jail_proc && u1->cr_prison != u2->cr_prison ? ESRCH : 0); +} + /*- * Determine if u1 "can see" the subject specified by u2. * Returns: 0 for permitted, an errno value otherwise @@ -1408,6 +1437,8 @@ cr_cansee(struct ucred *u1, struct ucred return (error); if ((error = cr_canseeothergids(u1, u2))) return (error); + if ((error = cr_canseejailproc(u1, u2))) + return (error); return (0); } Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue May 23 16:38:10 2017 (r318750) +++ head/sys/sys/proc.h Tue May 23 16:59:24 2017 (r318751) @@ -988,6 +988,7 @@ int cr_cansee(struct ucred *u1, struct u int cr_canseesocket(struct ucred *cred, struct socket *so); int cr_canseeothergids(struct ucred *u1, struct ucred *u2); int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); +int cr_canseejailproc(struct ucred *u1, struct ucred *u2); int cr_cansignal(struct ucred *cred, struct proc *proc, int signum); int enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess); From owner-svn-src-all@freebsd.org Tue May 23 17:00:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29BBCD7BDBA; Tue, 23 May 2017 17:00:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC294161D; Tue, 23 May 2017 17:00:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NH0u7n014756; Tue, 23 May 2017 17:00:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NH0ucv014751; Tue, 23 May 2017 17:00:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705231700.v4NH0ucv014751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 23 May 2017 17:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318752 - in stable/11: sbin/geom/class/mirror sys/geom/mirror X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 17:00:58 -0000 Author: mav Date: Tue May 23 17:00:56 2017 New Revision: 318752 URL: https://svnweb.freebsd.org/changeset/base/318752 Log: MFC r309321: Add `gmirror create` subcommand, alike to gstripe, gconcat, etc. It is quite specific mode of operation without storing on-disk metadata. It can be useful in some cases in combination with some external control tools handling mirror creation and disks hot-plug. Sponsored by: iXsystems, Inc. Modified: stable/11/sbin/geom/class/mirror/geom_mirror.c stable/11/sbin/geom/class/mirror/gmirror.8 stable/11/sys/geom/mirror/g_mirror.c stable/11/sys/geom/mirror/g_mirror.h stable/11/sys/geom/mirror/g_mirror_ctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/geom/class/mirror/geom_mirror.c ============================================================================== --- stable/11/sbin/geom/class/mirror/geom_mirror.c Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sbin/geom/class/mirror/geom_mirror.c Tue May 23 17:00:56 2017 (r318752) @@ -79,6 +79,16 @@ struct g_command class_commands[] = { "[-adfFhnv] [-b balance] [-s slice] name\n" "[-v] -p priority name prov" }, + { "create", G_FLAG_VERBOSE, NULL, + { + { 'b', "balance", GMIRROR_BALANCE, G_TYPE_STRING }, + { 'F', "nofailsync", NULL, G_TYPE_BOOL }, + { 'n', "noautosync", NULL, G_TYPE_BOOL }, + { 's', "slice", GMIRROR_SLICE, G_TYPE_NUMBER }, + G_OPT_SENTINEL + }, + "[-Fnv] [-b balance] [-s slice] name prov ..." + }, { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov ..." }, Modified: stable/11/sbin/geom/class/mirror/gmirror.8 ============================================================================== --- stable/11/sbin/geom/class/mirror/gmirror.8 Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sbin/geom/class/mirror/gmirror.8 Tue May 23 17:00:56 2017 (r318752) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 27, 2013 +.Dd November 27, 2016 .Dt GMIRROR 8 .Os .Sh NAME @@ -43,6 +43,13 @@ .Op Fl v .Ar prov ... .Nm +.Cm create +.Op Fl Fnv +.Op Fl b Ar balance +.Op Fl s Ar slice +.Ar name +.Ar prov ... +.Nm .Cm configure .Op Fl adfFhnv .Op Fl b Ar balance @@ -170,6 +177,12 @@ Defaults to 4096 bytes. .El .It Cm clear Clear metadata on the given providers. +.It Cm create +Similar to +.Cm label, +but creates mirror without storing on-disk metadata in last sector. +This special "manual" operation mode assumes some external control to manage +mirror detection after reboot, device hot-plug and other external events. .It Cm configure Configure the given device. .Pp Modified: stable/11/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.c Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sys/geom/mirror/g_mirror.c Tue May 23 17:00:56 2017 (r318752) @@ -698,6 +698,8 @@ g_mirror_clear_metadata(struct g_mirror_ g_topology_assert_not(); sx_assert(&disk->d_softc->sc_lock, SX_LOCKED); + if (disk->d_softc->sc_type != G_MIRROR_TYPE_AUTOMATIC) + return (0); error = g_mirror_write_metadata(disk, NULL); if (error == 0) { G_MIRROR_DEBUG(2, "Metadata on %s cleared.", @@ -763,6 +765,8 @@ g_mirror_update_metadata(struct g_mirror sc = disk->d_softc; sx_assert(&sc->sc_lock, SX_LOCKED); + if (sc->sc_type != G_MIRROR_TYPE_AUTOMATIC) + return; if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_WIPE) == 0) g_mirror_fill_metadata(sc, disk, &md); error = g_mirror_write_metadata(disk, &md); @@ -2919,8 +2923,9 @@ end: return (error); } -static struct g_geom * -g_mirror_create(struct g_class *mp, const struct g_mirror_metadata *md) +struct g_geom * +g_mirror_create(struct g_class *mp, const struct g_mirror_metadata *md, + u_int type) { struct g_mirror_softc *sc; struct g_geom *gp; @@ -2943,6 +2948,7 @@ g_mirror_create(struct g_class *mp, cons gp->access = g_mirror_access; gp->dumpconf = g_mirror_dumpconf; + sc->sc_type = type; sc->sc_id = md->md_mid; sc->sc_slice = md->md_slice; sc->sc_balance = md->md_balance; @@ -3119,6 +3125,8 @@ g_mirror_taste(struct g_class *mp, struc sc = gp->softc; if (sc == NULL) continue; + if (sc->sc_type != G_MIRROR_TYPE_AUTOMATIC) + continue; if (sc->sc_sync.ds_geom == gp) continue; if (strcmp(md.md_name, sc->sc_name) != 0) @@ -3131,7 +3139,7 @@ g_mirror_taste(struct g_class *mp, struc break; } if (gp == NULL) { - gp = g_mirror_create(mp, &md); + gp = g_mirror_create(mp, &md, G_MIRROR_TYPE_AUTOMATIC); if (gp == NULL) { G_MIRROR_DEBUG(0, "Cannot create device %s.", md.md_name); @@ -3279,6 +3287,19 @@ g_mirror_dumpconf(struct sbuf *sb, const } else { g_topology_unlock(); sx_xlock(&sc->sc_lock); + sbuf_printf(sb, "%s", indent); + switch (sc->sc_type) { + case G_MIRROR_TYPE_AUTOMATIC: + sbuf_printf(sb, "AUTOMATIC"); + break; + case G_MIRROR_TYPE_MANUAL: + sbuf_printf(sb, "MANUAL"); + break; + default: + sbuf_printf(sb, "UNKNOWN"); + break; + } + sbuf_printf(sb, "\n"); sbuf_printf(sb, "%s%u\n", indent, (u_int)sc->sc_id); sbuf_printf(sb, "%s%u\n", indent, sc->sc_syncid); sbuf_printf(sb, "%s%u\n", indent, sc->sc_genid); Modified: stable/11/sys/geom/mirror/g_mirror.h ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.h Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sys/geom/mirror/g_mirror.h Tue May 23 17:00:56 2017 (r318752) @@ -165,11 +165,15 @@ struct g_mirror_event { #define G_MIRROR_DEVICE_STATE_STARTING 0 #define G_MIRROR_DEVICE_STATE_RUNNING 1 +#define G_MIRROR_TYPE_MANUAL 0 +#define G_MIRROR_TYPE_AUTOMATIC 1 + /* Bump syncid on first write. */ #define G_MIRROR_BUMP_SYNCID 0x1 /* Bump genid immediately. */ #define G_MIRROR_BUMP_GENID 0x2 struct g_mirror_softc { + u_int sc_type; /* Device type (manual/automatic). */ u_int sc_state; /* Device state. */ uint32_t sc_slice; /* Slice size. */ uint8_t sc_balance; /* Balance algorithm. */ @@ -220,7 +224,11 @@ struct g_mirror_softc { }; #define sc_name sc_geom->name +struct g_mirror_metadata; + u_int g_mirror_ndisks(struct g_mirror_softc *sc, int state); +struct g_geom * g_mirror_create(struct g_class *mp, + const struct g_mirror_metadata *md, u_int type); #define G_MIRROR_DESTROY_SOFT 0 #define G_MIRROR_DESTROY_DELAYED 1 #define G_MIRROR_DESTROY_HARD 2 Modified: stable/11/sys/geom/mirror/g_mirror_ctl.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror_ctl.c Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sys/geom/mirror/g_mirror_ctl.c Tue May 23 17:00:56 2017 (r318752) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -301,6 +302,182 @@ g_mirror_ctl_configure(struct gctl_req * } static void +g_mirror_create_orphan(struct g_consumer *cp) +{ + + KASSERT(1 == 0, ("%s called while creating %s.", __func__, + cp->provider->name)); +} + +static void +g_mirror_ctl_create(struct gctl_req *req, struct g_class *mp) +{ + struct g_mirror_metadata md; + struct g_geom *gp; + struct g_consumer *cp; + struct g_provider *pp; + struct g_mirror_softc *sc; + struct sbuf *sb; + const char *name; + char param[16]; + int *nargs; + intmax_t *val; + int *ival; + const char *sval; + int bal; + unsigned attached, no, sectorsize; + off_t mediasize; + + nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); + if (nargs == NULL) { + gctl_error(req, "No '%s' argument.", "nargs"); + return; + } + if (*nargs <= 2) { + gctl_error(req, "Too few arguments."); + return; + } + + strlcpy(md.md_magic, G_MIRROR_MAGIC, sizeof(md.md_magic)); + md.md_version = G_MIRROR_VERSION; + name = gctl_get_asciiparam(req, "arg0"); + if (name == NULL) { + gctl_error(req, "No 'arg%u' argument.", 0); + return; + } + strlcpy(md.md_name, name, sizeof(md.md_name)); + md.md_mid = arc4random(); + md.md_all = *nargs - 1; + md.md_genid = 0; + md.md_syncid = 1; + md.md_sync_offset = 0; + val = gctl_get_paraml(req, "slice", sizeof(*val)); + if (val == NULL) { + gctl_error(req, "No slice argument."); + return; + } + md.md_slice = *val; + sval = gctl_get_asciiparam(req, "balance"); + if (sval == NULL) { + gctl_error(req, "No balance argument."); + return; + } + bal = balance_id(sval); + if (bal < 0) { + gctl_error(req, "Invalid balance algorithm."); + return; + } + md.md_balance = bal; + md.md_mflags = 0; + md.md_dflags = 0; + ival = gctl_get_paraml(req, "noautosync", sizeof(*ival)); + if (ival != NULL && *ival) + md.md_mflags |= G_MIRROR_DEVICE_FLAG_NOAUTOSYNC; + ival = gctl_get_paraml(req, "nofailsync", sizeof(*ival)); + if (ival != NULL && *ival) + md.md_mflags |= G_MIRROR_DEVICE_FLAG_NOFAILSYNC; + /* These fields not used in manual mode. */ + bzero(md.md_provider, sizeof(md.md_provider)); + md.md_provsize = 0; + + g_topology_lock(); + mediasize = OFF_MAX; + sectorsize = 0; + gp = g_new_geomf(mp, "%s", md.md_name); + gp->orphan = g_mirror_create_orphan; + cp = g_new_consumer(gp); + for (no = 1; no < *nargs; no++) { + snprintf(param, sizeof(param), "arg%u", no); + name = gctl_get_asciiparam(req, param); + if (name == NULL) { + gctl_error(req, "No 'arg%u' argument.", no); +err: + g_destroy_consumer(cp); + g_destroy_geom(gp); + g_topology_unlock(); + return; + } + if (strncmp(name, "/dev/", strlen("/dev/")) == 0) + name += strlen("/dev/"); + pp = g_provider_by_name(name); + if (pp == NULL) { + G_MIRROR_DEBUG(1, "Disk %s is invalid.", name); + gctl_error(req, "Disk %s is invalid.", name); + goto err; + } + g_attach(cp, pp); + if (g_access(cp, 1, 0, 0) != 0) { + G_MIRROR_DEBUG(1, "Can't open disk %s.", name); + gctl_error(req, "Can't open disk %s.", name); +err2: + g_detach(cp); + goto err; + } + if (pp->mediasize == 0 || pp->sectorsize == 0) { + G_MIRROR_DEBUG(1, "Disk %s has no media.", name); + gctl_error(req, "Disk %s has no media.", name); + g_access(cp, -1, 0, 0); + goto err2; + } + if (pp->mediasize < mediasize) + mediasize = pp->mediasize; + if (pp->sectorsize > sectorsize) + sectorsize = pp->sectorsize; + g_access(cp, -1, 0, 0); + g_detach(cp); + } + g_destroy_consumer(cp); + g_destroy_geom(gp); + md.md_mediasize = mediasize; + md.md_sectorsize = sectorsize; + md.md_mediasize -= (md.md_mediasize % md.md_sectorsize); + + gp = g_mirror_create(mp, &md, G_MIRROR_TYPE_MANUAL); + if (gp == NULL) { + gctl_error(req, "Can't create %s.", md.md_name); + g_topology_unlock(); + return; + } + + sc = gp->softc; + g_topology_unlock(); + sx_xlock(&sc->sc_lock); + sc->sc_flags |= G_MIRROR_DEVICE_FLAG_TASTING; + sb = sbuf_new_auto(); + sbuf_printf(sb, "Can't attach disk(s) to %s:", gp->name); + for (attached = 0, no = 1; no < *nargs; no++) { + snprintf(param, sizeof(param), "arg%u", no); + name = gctl_get_asciiparam(req, param); + if (strncmp(name, "/dev/", strlen("/dev/")) == 0) + name += strlen("/dev/"); + pp = g_provider_by_name(name); + if (pp == NULL) { + G_MIRROR_DEBUG(1, "Provider %s disappear?!", name); + sbuf_printf(sb, " %s", name); + continue; + } + md.md_did = arc4random(); + md.md_priority = no - 1; + if (g_mirror_add_disk(sc, pp, &md) != 0) { + G_MIRROR_DEBUG(1, "Disk %u (%s) not attached to %s.", + no, pp->name, gp->name); + sbuf_printf(sb, " %s", pp->name); + continue; + } + attached++; + } + sbuf_finish(sb); + sc->sc_flags &= ~G_MIRROR_DEVICE_FLAG_TASTING; + if (md.md_all != attached || + (sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { + g_mirror_destroy(gp->softc, G_MIRROR_DESTROY_HARD); + gctl_error(req, "%s", sbuf_data(sb)); + } else + sx_xunlock(&sc->sc_lock); + sbuf_delete(sb); +} + +static void g_mirror_ctl_rebuild(struct gctl_req *req, struct g_class *mp) { struct g_mirror_metadata md; @@ -401,6 +578,7 @@ g_mirror_ctl_insert(struct gctl_req *req struct g_provider *provider; struct g_consumer *consumer; } *disks; + off_t mdsize; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -462,16 +640,6 @@ g_mirror_ctl_insert(struct gctl_req *req gctl_error(req, "Unknown provider %s.", name); continue; } - if (sc->sc_provider->mediasize > - pp->mediasize - pp->sectorsize) { - gctl_error(req, "Provider %s too small.", name); - continue; - } - if ((sc->sc_provider->sectorsize % pp->sectorsize) != 0) { - gctl_error(req, "Invalid sectorsize of provider %s.", - name); - continue; - } cp = g_new_consumer(sc->sc_geom); if (g_attach(cp, pp) != 0) { g_destroy_consumer(cp); @@ -479,9 +647,40 @@ g_mirror_ctl_insert(struct gctl_req *req continue; } if (g_access(cp, 0, 1, 1) != 0) { + gctl_error(req, "Cannot access provider %s.", name); +err: g_detach(cp); g_destroy_consumer(cp); - gctl_error(req, "Cannot access provider %s.", name); + continue; + } + mdsize = (sc->sc_type == G_MIRROR_TYPE_AUTOMATIC) ? + pp->sectorsize : 0; + if (sc->sc_provider->mediasize > pp->mediasize - mdsize) { + gctl_error(req, "Provider %s too small.", name); +err2: + g_access(cp, 0, -1, -1); + goto err; + } + if ((sc->sc_provider->sectorsize % pp->sectorsize) != 0) { + gctl_error(req, "Invalid sectorsize of provider %s.", + name); + goto err2; + } + if (sc->sc_type != G_MIRROR_TYPE_AUTOMATIC) { + g_access(cp, 0, -1, -1); + g_detach(cp); + g_destroy_consumer(cp); + g_topology_unlock(); + sc->sc_ndisks++; + g_mirror_fill_metadata(sc, NULL, &md); + md.md_priority = *priority; + if (*inactive) + md.md_dflags |= G_MIRROR_DISK_FLAG_INACTIVE; + if (g_mirror_add_disk(sc, pp, &md) != 0) { + sc->sc_ndisks--; + gctl_error(req, "Disk %s not inserted.", name); + } + g_topology_lock(); continue; } disks[n].provider = pp; @@ -872,6 +1071,8 @@ g_mirror_config(struct gctl_req *req, st g_topology_unlock(); if (strcmp(verb, "configure") == 0) g_mirror_ctl_configure(req, mp); + else if (strcmp(verb, "create") == 0) + g_mirror_ctl_create(req, mp); else if (strcmp(verb, "rebuild") == 0) g_mirror_ctl_rebuild(req, mp); else if (strcmp(verb, "insert") == 0) From owner-svn-src-all@freebsd.org Tue May 23 17:12:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBDDDD7A21F; Tue, 23 May 2017 17:12:40 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57A341E82; Tue, 23 May 2017 17:12:39 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([78.52.3.248]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MYP57-1dQbKY2LXl-00V9nO; Tue, 23 May 2017 19:12:31 +0200 Date: Tue, 23 May 2017 19:12:24 +0200 From: "O. Hartmann" To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 Message-ID: <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201705231638.v4NGcAq1005935@repo.freebsd.org> References: <201705231638.v4NGcAq1005935@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/al1vyjXYFJz=ZTpFGvfuiI1"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:HuRH17bcvOkD4itWerAs6FUpSljGhjgUJwgo7Oki+yWHIcf8lk7 9R2f2PyWR8uY2drk2kDVM/c88POLN2MX4riSF9ylB+xTNELhIlyKWS04FBPDkFZaJg41QwN nlNuXptiqBrf7ks/Xu5PDY8ofrApVjQSXsybKFZ8vBfa9oXEJ5HFsAr7gY476IibO/jYDD5 Bga4+IsashLPXtZ4q2IEg== X-UI-Out-Filterresults: notjunk:1;V01:K0:RTzphnd5OFY=:hxQjUQ56OdMWaftaYDmK0h p7Af3v8qdVb5CYZxoHM3hk8tk7KSbfckITUOax5MRzMtbisAHz9YM1rp2REsq4ugO4RyQ+VSw m91l4/aG5J3m2DL4jldeDI75EM6usjLUGZrionfRRssmC8G81YTRsf0P1lug8xWa164xPvsNf Gc8b5oGNCYtDljYpAVRCdOKw43oJ1nyJfFQfeYDqc+bSpLC+wEueEFgJOIo7LOgX8iIoGMSeM DCtgFV29RmlcB5Qf/x41GB1NP/BgNOJHv7rMcikpaAslr2TqENxT58hitBG2jG9JIiWU8aNX9 dIcZbpixYf/z+wyW4yODda1BTleC6E5cqlqJbVZ9kBNIRL6mRc55CHatua0LRIY/mdLcINIJs Vzz1JaYm0+EQWfIYNhzf0cW3Zgr7Wm+EIU8INnc757Da/0SgiSVr234Ax4oRIOPfeMtJ/liRh ZoQvpXYm2WyOXwSDXjrqfxT/PvuvTbQTbCtkQ3CYbp9ANB+hS6+pYEghVViEsPEl3sLnBQJYc D0cLmreIoTfH6wn13S2hfI25lrCVpE48U9LUHaP/gDApx/qSTV7GmOAgaMKR3IE8EUi8kKAp/ WPTQ41J0WIS1E/cwLjjucv/HifVLZbzAU3TGcYCrXhRUGVDK7CGiIH78WeiNhpv0nKgMM18ZN GScSI5/olq8sKNMDN6wfLNEQekMJ3q5ZpHIKsmdvuq1OJ7VQ5AUCJYGCHNopiLltqJy165UXe n3h569pzHnR//sH0vJn/CivCQjlbH5e6S3+W/2YUK3IFzKRmVyC4b70OF8Jiqm736ccb8PZLW oTMTdzD X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 17:12:41 -0000 --Sig_/al1vyjXYFJz=ZTpFGvfuiI1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Tue, 23 May 2017 16:38:10 +0000 (UTC) "Pedro F. Giffuni" schrieb: > Author: pfg > Date: Tue May 23 16:38:10 2017 > New Revision: 318750 > URL: https://svnweb.freebsd.org/changeset/base/318750 >=20 > Log: > Bring some rough support for FreeBSD S/390 to the GNU toolchain. > =20 > This is no-op and only for reference: the S/390 port seems to be elusive > in the BSDs so it is convenient to keep some trace from past efforts. > It is likely newer attempts will focus on a newer toolchain using clang > instead. > =20 > Obtained from: Perforce depot/projects/s390 >=20 > Added: > head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh (contents, pro= ps changed) > head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh (contents, props= changed) > head/contrib/gcc/config/s390/freebsd.h > - copied, changed from r318546, head/contrib/gcc/config/s390/linux.h > Modified: > head/contrib/binutils/bfd/config.bfd > head/contrib/binutils/ld/configure.tgt > head/contrib/gcc/config.gcc >=20 > Modified: head/contrib/binutils/bfd/config.bfd > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/binutils/bfd/config.bfd Tue May 23 16:12:50 2017 > (r318749) +++ head/contrib/binutils/bfd/config.bfd Tue May 23 16:38:10 > 2017 (r318750) @@ -1156,13 +1156,13 @@ case "${targ}" in > targ_selvecs=3D"bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerp= cle_pe_vec > bfd_powerpc_pe_vec" ;; > =20 > - s390-*-linux*) > + s390-*-freebsd* | s390-*-linux*) > targ_defvec=3Dbfd_elf32_s390_vec > targ64_selvecs=3Dbfd_elf64_s390_vec > want64=3Dtrue > ;; > #ifdef BFD64 > - s390x-*-linux*) > + s390x-*-freebsd* | s390x-*-linux*) > targ_defvec=3Dbfd_elf64_s390_vec > targ_selvecs=3Dbfd_elf32_s390_vec > want64=3Dtrue >=20 > Modified: head/contrib/binutils/ld/configure.tgt > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/binutils/ld/configure.tgt Tue May 23 16:12:50 2017 > (r318749) +++ head/contrib/binutils/ld/configure.tgt Tue May 23 16:38:10 > 2017 (r318750) @@ -480,12 +480,21 @@ powerpc-*-lynxos*) > targ_emul=3Dppclynx ;; rs6000-*-aix5*) targ_emul=3Daix5rs6 ;; > rs6000-*-aix*) targ_emul=3Daixrs6 > ;; > +s390x-*-freebsd*) targ_emul=3Delf64_s390 > + targ_extra_emuls=3Delf_s390 > + targ_extra_libpath=3D$targ_extra_emuls > + tdir_elf_s390=3D`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; > s390x-*-linux*) targ_emul=3Delf64_s390 > targ_extra_emuls=3Delf_s390 > targ_extra_libpath=3D$targ_extra_emuls > tdir_elf_s390=3D`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; > s390x-*-tpf*) targ_emul=3Delf64_s390 > tdir_elf_s390=3D`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; > +s390-*-freebsd*) targ_emul=3Delf_s390 > + targ64_extra_emuls=3Delf64_s390 > + targ64_extra_libpath=3Delf64_s390 > + tdir_elf64_s390=3D`echo ${targ_alias} | sed -e 's/s390/s390x/'` > + ;; > s390-*-linux*) targ_emul=3Delf_s390 > targ64_extra_emuls=3Delf64_s390 > targ64_extra_libpath=3Delf64_s390 >=20 > Added: head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh Tue May 23 16:= 38:10 > 2017 (r318750) @@ -0,0 +1,2 @@ > +. ${srcdir}/emulparams/elf64_s390.sh > +. ${srcdir}/emulparams/elf_fbsd.sh >=20 > Added: head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh Tue May 23 16:38= :10 > 2017 (r318750) @@ -0,0 +1,2 @@ > +. ${srcdir}/emulparams/elf_s390.sh > +. ${srcdir}/emulparams/elf_fbsd.sh >=20 > Modified: head/contrib/gcc/config.gcc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/gcc/config.gcc Tue May 23 16:12:50 2017 (r318749) > +++ head/contrib/gcc/config.gcc Tue May 23 16:38:10 2017 (r318750) > @@ -1942,10 +1942,19 @@ rs6000-ibm-aix[56789].* | powerpc-ibm-ai > thread_file=3D'aix' > extra_headers=3D > ;; > +s390-*-freebsd*) > + tm_file=3D"${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} s390/freebsd.h" > + ;; > s390-*-linux*) > tm_file=3D"s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h" > tmake_file=3D"${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux" > ;; > +s390x-*-freebsd*) > + tm_file=3D"s390/s390.h s390/s390x.h dbxelf.h elfos.h ${fbsd_tm_file} > s390/freebsd.h" > + tm_p_file=3Ds390/s390-protos.h > + md_file=3Ds390/s390.md > + out_file=3Ds390/s390.c > + ;; > s390x-*-linux*) > tm_file=3D"s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s39= 0/linux.h" > tm_p_file=3Ds390/s390-protos.h >=20 > Copied and modified: head/contrib/gcc/config/s390/freebsd.h (from r318546, > head/contrib/gcc/config/s390/linux.h) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D --- > head/contrib/gcc/config/s390/linux.h Fri May 19 17:14:29 2017 (r318546, > copy source) +++ head/contrib/gcc/config/s390/freebsd.h Tue May 23 16:38:= 10 > 2017 (r318750) @@ -1,4 +1,4 @@ -/* Definitions for Linux for S/390. > +/* Definitions for FreeBSD for S/390. > Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006 > Free Software Foundation, Inc. > Contributed by Hartmut Penner (hpenner@de.ibm.com) and > @@ -21,25 +21,26 @@ along with GCC; see the file COPYING. I > Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA > 02110-1301, USA. */ > =20 > -#ifndef _LINUX_H > -#define _LINUX_H > +#ifndef _CONFIG_S390_FREEBSD_H > +#define _CONFIG_S390_FREEBSD_H > =20 > /* Target specific version string. */ > =20 > #ifdef DEFAULT_TARGET_64BIT > #undef TARGET_VERSION > -#define TARGET_VERSION fprintf (stderr, " (Linux for zSeries)"); > +#define TARGET_VERSION fprintf (stderr, " (FreeBSD for zSeries)"); > #else > #undef TARGET_VERSION > -#define TARGET_VERSION fprintf (stderr, " (Linux for S/390)"); > +#define TARGET_VERSION fprintf (stderr, " (FreeBSD for S/390)"); > #endif > =20 > =20 > /* Target specific type definitions. */ > =20 > /* ??? Do we really want long as size_t on 31-bit? */ > +/* Answer is yes for FreeBSD. */ > #undef SIZE_TYPE > -#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "long unsigned i= nt") > +#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") > #undef PTRDIFF_TYPE > #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") > =20 > @@ -48,16 +49,8 @@ Software Foundation, 51 Franklin Street, > #undef WCHAR_TYPE_SIZE > #define WCHAR_TYPE_SIZE 32 > =20 > - > -/* Target specific preprocessor settings. */ > - > -#define TARGET_OS_CPP_BUILTINS() \ > - do \ > - { \ > - LINUX_TARGET_OS_CPP_BUILTINS(); \ > - } \ > - while (0) > - > +#undef DEFAULT_SIGNED_CHAR > +#define DEFAULT_SIGNED_CHAR 1 > =20 > /* Target specific assembler settings. */ > =20 > @@ -92,7 +85,7 @@ Software Foundation, 51 Franklin Street, > =20 > #define TARGET_ASM_FILE_END file_end_indicate_exec_stack > =20 > -#define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h" > +#define MD_UNWIND_SUPPORT "config/s390/freebsd-unwind.h" > =20 > #ifdef TARGET_LIBC_PROVIDES_SSP > /* s390 glibc provides __stack_chk_guard in 0x14(tp), > @@ -103,4 +96,10 @@ Software Foundation, 51 Franklin Street, > /* Define if long doubles should be mangled as 'g'. */ > #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING > =20 > +/* Override the default comment-starter of "/APP" from unix.h. */ > +#undef ASM_APP_ON > +#define ASM_APP_ON "#APP\n" > +#undef ASM_APP_OFF > +#define ASM_APP_OFF "#NO_APP\n" > + > #endif > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Buildworld fails on r318751 with a "Segmentation fault" error as shown belo= w: Building /usr/obj/usr/src/lib/libkiconv/_libinstall --- lib/libmd__L --- --- skein_block_asm.o --- Segmentation fault *** [skein_block_asm.o] Error code 139 make[4]: stopped in /usr/src/lib/libmd .ERROR_TARGET=3D'skein_block_asm.o' .ERROR_META_FILE=3D'/usr/obj/usr/src/lib/libmd/skein_block_asm.o.meta' .MAKE.LEVEL=3D'4' MAKEFILE=3D'' Host is running recent CURRENT: FreeBSD 12.0-CURRENT #124 r318748: Tue May = 23 18:52:59 CEST 2017 amd64 --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/al1vyjXYFJz=ZTpFGvfuiI1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWSRteAAKCRDS528fyFhY lNJzAf9E+JYxM4l1P7Nh49Rrg1l7hDKe8ta/GFes1MQCpLG9A6I5bi5Bx4awtjMi 9fwdsMRU/M6rqb3k8eLBlkx78DILAf9nMvaOE+Ardj0y0rkLy3kXsXTVrxBoiboR VTxLE2TZ4qNuRdBdTsZtUCjqBWS+EVKhZSd9qj6yzCY6tfeKOhA9 =0zre -----END PGP SIGNATURE----- --Sig_/al1vyjXYFJz=ZTpFGvfuiI1-- From owner-svn-src-all@freebsd.org Tue May 23 17:34:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A873D7A94B; Tue, 23 May 2017 17:34:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AA6B1A64; Tue, 23 May 2017 17:34:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NHYANQ030369; Tue, 23 May 2017 17:34:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NHYAsT030368; Tue, 23 May 2017 17:34:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705231734.v4NHYAsT030368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 17:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318753 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 17:34:11 -0000 Author: ngie Date: Tue May 23 17:34:10 2017 New Revision: 318753 URL: https://svnweb.freebsd.org/changeset/base/318753 Log: directory(3): add trailing comma after e.g., missed in r318699 Submitted by: bjk MFC after: 2 weeks MFC with: r318699 Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/directory.3 Modified: head/lib/libc/gen/directory.3 ============================================================================== --- head/lib/libc/gen/directory.3 Tue May 23 17:00:56 2017 (r318752) +++ head/lib/libc/gen/directory.3 Tue May 23 17:34:10 2017 (r318753) @@ -300,7 +300,7 @@ will always set the correct location to .Fn readdir performed. This is enough for some applications which want to -"push back the last entry read", e.g. Samba. +"push back the last entry read", e.g., Samba. Seeks back to any other location, other than the beginning of the directory, may result in unexpected behaviour if deletes are present. From owner-svn-src-all@freebsd.org Tue May 23 17:34:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4B1ED7A99D; Tue, 23 May 2017 17:34:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B03B21BD6; Tue, 23 May 2017 17:34:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x229.google.com with SMTP id m17so121161139pfg.3; Tue, 23 May 2017 10:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=gHX4TZH9H1Oy8yIXDeX/KcX2GZMU/ZV31tzSJNnUYjk=; b=SpcZ5ghs9fm34qwuIAUoVq0IjL+6RQc/HRMdexQvlQCY5Qi5JQNod193Gsl3YmvUmo LIDY4ITW71Y9hBid92AdzIfGTWn5cnte0rfM85UzW5jipZrO1cyG5aVNfq4/gR9CTCpL OjEY15kn0t82iDP0CmqLioHk278Pa9/F47cg1Qt/MwRu3toqtWki9QoWDQLTGGgKncyD lRppNDIDynwcIvXgjvJkJCWkIKcFgezznBm1JcPlIFAkAGEswHJF7oT8+wByz3IPgjEO TmmJHOfxzL0tWZMedckaWKp/OxSDQQbK1yn1RBQQs14rewdOQ2nQKHB+ipkuLtjxcfLz CJAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=gHX4TZH9H1Oy8yIXDeX/KcX2GZMU/ZV31tzSJNnUYjk=; b=EZqSOCcUjEB3SNheVhV2uzrGs0m/rxzJfQIANonjF0/tnsFGHc1JMBFdjW3lfo3wDG 7s/a9dKdkEBOuI1J6PIr5D+RsvK4rg6yWH2S5QAMjBomf4JSab8QkCXHlOK0DZNWtDcG SpcfS1NR75h1lWw6vIv5NDSw8hcgMcMeVNlEfOiqdgBQWd1w+ZwJkvuFsxtByyt4pkmJ zo3VsxeoEgOfj41rv9zteMtuKo+s6lYrw4421bGekTpS55USo0V/F5AQ3Gtb8HlU0tkc ycqZMzXTgkL9olVO4VC8Z+9eEGPZ2of2txFdRZ5zjrpHR37skPVKcSgwjWOM+bUjjf62 418g== X-Gm-Message-State: AODbwcAWfGa8AdAKKL8+s7wx2ghVr9/fSC/virxSZZ5cVK52Z8pe5yvS nsiTWHGyLfT25A== X-Received: by 10.98.200.23 with SMTP id z23mr33605160pff.18.1495560872301; Tue, 23 May 2017 10:34:32 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id c12sm2572197pgn.21.2017.05.23.10.34.31 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 May 2017 10:34:31 -0700 (PDT) Subject: Re: svn commit: r318699 - head/lib/libc/gen Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FCC89D2C-C32B-4E97-9973-870294F5DC79"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Tue, 23 May 2017 10:34:30 -0700 Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <35E7F169-33E3-4F48-B19C-58C5AAC82E27@gmail.com> References: <201705230655.v4N6tpx0065768@repo.freebsd.org> To: Benjamin Kaduk X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 17:34:33 -0000 --Apple-Mail=_FCC89D2C-C32B-4E97-9973-870294F5DC79 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 23, 2017, at 08:13, Benjamin Kaduk wrote: >=20 > On Tue, May 23, 2017 at 1:55 AM, Ngie Cooper wrote: > Author: ngie > Date: Tue May 23 06:55:51 2017 > New Revision: 318699 > URL: https://svnweb.freebsd.org/changeset/base/318699 >=20 > Log: > directory(3): delete trailing whitespace and rewrite `E.g.` as = `e.g.` >=20 > FWIW, it is better-still written as "e.g.,", i.e., with trailing = comma as well as leading comma. Fixed in r318753 =E2=80=94 thanks :). -Ngie --Apple-Mail=_FCC89D2C-C32B-4E97-9973-870294F5DC79 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZJHKmAAoJEPWDqSZpMIYVVDYP+gIlJ29PxGaN0lN2OMkY+AUm ZbMabGxICU5T9Vqgy8HCuqs+3jy1NZErGP1FggmSx5w4V9hW+/mQZr/mlfxOe1zx VE1wx0boN5rCKkYj8tJjHdtx1ckj8D/aGEw3a//bLvtnr7qixyi9D0txDH9XeQqK htAFobzHfTr+Xk6x3qmlYmY7Wqq2NIybWqBXHPVAsH1PLJ6INA3sAOKsr7ahm6TC S5FaQkQygYzZ1EDEVWaNH5qRC5fHYe0NXk2yxsihK8tBaqabMG2FhsyvxnAgc1oa XkR6Ibp5sd5KH+51ESRVmCPxD9K7hvn8Jv3U8m9BdnQNhc7JluAS/iECC8tcu01s chXmSS3N5Br0wro0K4b3pe5zMl0Fih4WOCWihxRQPYGL8uCjS5AYug2NH/yq9lpz uZtPBF5mhziyxOUtZjcJIhZasG1aSFH7KfyoWGUEGaK70VmWQcPWX6ySa4EC9E2o i8ghIHr2LwaLaGy/P5ztEwm9rHlQrTDKyxqdvvt4djdBEA6i/Q8VrFKWhHC+6ue1 mOjSz5El/cstGsJjBKNS1Tm0Jf3FUoh2r3GAJoiYT5tHbY2QpBKXAGFe5hGCj3fP irzes8kOGySjAXzqrDr5uAPTxX3R/fSpQqwTiaFaVqgMLw7oWaMPJzvwoac4B6y7 Xn5ru/psctW9X+o2BCV5 =pbim -----END PGP SIGNATURE----- --Apple-Mail=_FCC89D2C-C32B-4E97-9973-870294F5DC79-- From owner-svn-src-all@freebsd.org Tue May 23 17:41:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 792D5D7AA57; Tue, 23 May 2017 17:41:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 480D11E93; Tue, 23 May 2017 17:41:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NHf9Cm031343; Tue, 23 May 2017 17:41:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NHf9jH031342; Tue, 23 May 2017 17:41:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705231741.v4NHf9jH031342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 23 May 2017 17:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318754 - head/sys/boot/mips/beri/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 17:41:10 -0000 Author: jhb Date: Tue May 23 17:41:09 2017 New Revision: 318754 URL: https://svnweb.freebsd.org/changeset/base/318754 Log: Pass -N directly to ld via -Wl rather than passing it to the compiler driver. In particular, clang doesn't accept -N. Obtained from: CheriBSD Sponsored by: DARPA / AFRL Modified: head/sys/boot/mips/beri/boot2/Makefile Modified: head/sys/boot/mips/beri/boot2/Makefile ============================================================================== --- head/sys/boot/mips/beri/boot2/Makefile Tue May 23 17:34:10 2017 (r318753) +++ head/sys/boot/mips/beri/boot2/Makefile Tue May 23 17:41:09 2017 (r318754) @@ -63,7 +63,7 @@ LIBSTAND= ${.OBJDIR}/../../../../../lib/ LDFLAGS= -nostdlib \ -static \ - -N \ + -Wl,-N \ -G0 \ -L${.CURDIR} From owner-svn-src-all@freebsd.org Tue May 23 17:56:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8199D7B19B; Tue, 23 May 2017 17:56:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C65CF1A42; Tue, 23 May 2017 17:56:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 03EF310AFA3; Tue, 23 May 2017 13:56:21 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... Date: Tue, 23 May 2017 10:31:01 -0700 Message-ID: <13857290.5K0PvDnonX@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705230929.v4N9T5g1028124@repo.freebsd.org> References: <201705230929.v4N9T5g1028124@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 23 May 2017 13:56:21 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 17:56:29 -0000 On Tuesday, May 23, 2017 09:29:05 AM Konstantin Belousov wrote: > Author: kib > Date: Tue May 23 09:29:05 2017 > New Revision: 318736 > URL: https://svnweb.freebsd.org/changeset/base/318736 > > Log: > Commit the 64-bit inode project. A _big_ thanks to kib@ for driving this to completion and to gleb@ for doing a large share of the work. -- John Baldwin From owner-svn-src-all@freebsd.org Tue May 23 19:00:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4144ED7B351; Tue, 23 May 2017 19:00:49 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B36CC1546; Tue, 23 May 2017 19:00:48 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([78.52.3.248]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LsChr-1dx8Es1jcF-013uBc; Tue, 23 May 2017 21:00:45 +0200 Date: Tue, 23 May 2017 21:00:39 +0200 From: "O. Hartmann" To: Pedro Giffuni Cc: "O. Hartmann" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 Message-ID: <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> In-Reply-To: <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/MYZaQ/c8XecG4rMc5Pxs4x_"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:66NVIBnOfqWnxMHg26vSq7J/c/TICtOJSm++d5aabF1Dc0ZaLiY aZIlDuCbitSdhq3nUiwVRuHXbQBerv+5u8O+Xspty695GnTyE38LjGSKSU3jtFAQ4n6RRbd uxRZ2W/LKjPVYP+GSSaL41MDtWJNDAewVcfSNpRiHF9WNkjSBd0H24yXapKXP5X6azrzxyg cm8LZAXadTozxcN7HIySg== X-UI-Out-Filterresults: notjunk:1;V01:K0:1Fg6uvCmUdE=:UWIK/kQF9OEMnxMuTzgEJr 6X+FqMTbikmQKgWieC8UXdu88y42tQHcSov8WhvbGqc5nbxSTlsdeWpH/WLrfbkMPM6vfMa1E Lw9a2naLF3Lp1g1PRV2RVCw9MSZhyVNnCN/LjzFwEIk+B2kXS1YOUj+J4pMS/XQQV1llld/ok 4ouGj0DjpSMVj8Oqsk6nenFdOzqfa1/WCJCPkExmauExr5TMHqG+FjyhIx6UkfUW2DQIKdadS trPTRxRU2FCRHzI+U5ks8VgjAmRKwJEsnBEYT6aWBRbpnDNrCqlilCs//tCWDFxV4qqETQNQi ilbxdEaWONaGNxw9WV04CJxDx+X0pwasd54kdxaEwo12Uqb56vlzhCyCpazzacM1UDzA57uhp Z10WoV5jx0hG+ELCecJ5Qf56T/05wsVudInB+HF/IpSi0PLLvlv9H1z4hiV5pyy6qwrUeQWFR 47hEueBAQZiavImcsKqf2G0YaBzNwdOQU6gPhRLpO8jYBc3PMkVRlvVcrX0jDvPgkN+JhC60E fmesRJHbVMAar7JY/8fKlForRjZgSOPXahP/+1Jj+lLaA5gls+3o4p404qpWbuM4RyIa79mr+ iEO18JPN8YyacO+zFOTfgSnQ99gzQRJq38f0id2U929hFWBYNS6pGK2fJscwqcofUREseep7W mXv5KwTciV9zZ2weGG15YdUefhicnAXsRPxlPzYntCGxcjf+s8UNtBu6illeNChGQ4wCyGzFJ tUxwBX0iU09bmvSpkWdOW1L6d+SI4weia0Py+0hnxyMWJjpstrUCo7fUL2eYxs22ZIklIv2B6 jVALHX5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 19:00:49 -0000 --Sig_/MYZaQ/c8XecG4rMc5Pxs4x_ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am Tue, 23 May 2017 12:52:35 -0500 Pedro Giffuni schrieb: > On 23/05/2017 12:12, O. Hartmann wrote: > > Am Tue, 23 May 2017 16:38:10 +0000 (UTC) > > "Pedro F. Giffuni" schrieb: > > =20 > >> Author: pfg > >> Date: Tue May 23 16:38:10 2017 > >> New Revision: 318750 > >> URL: https://svnweb.freebsd.org/changeset/base/318750 > >> > >> Log: > >> Bring some rough support for FreeBSD S/390 to the GNU toolchain. > >> =20 > >> This is no-op and only for reference: the S/390 port seems to be el= usive > >> in the BSDs so it is convenient to keep some trace from past effort= s. > >> It is likely newer attempts will focus on a newer toolchain using c= lang > >> instead. > >> =20 > >> Obtained from: Perforce depot/projects/s390 > >> > >> Added: > >> head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh (contents,= props changed) > >> head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh (contents, p= rops changed) > >> head/contrib/gcc/config/s390/freebsd.h > >> - copied, changed from r318546, head/contrib/gcc/config/s390/lin= ux.h > >> Modified: > >> head/contrib/binutils/bfd/config.bfd > >> head/contrib/binutils/ld/configure.tgt > >> head/contrib/gcc/config.gcc =20 > ... > >> Buildworld fails on r318751 with a "Segmentation fault" error as shown= below: > >> > >> Building /usr/obj/usr/src/lib/libkiconv/_libinstall > >> --- lib/libmd__L --- > >> --- skein_block_asm.o --- > >> Segmentation fault > >> *** [skein_block_asm.o] Error code 139 > >> > >> make[4]: stopped in /usr/src/lib/libmd > >> .ERROR_TARGET=3D'skein_block_asm.o' > >> .ERROR_META_FILE=3D'/usr/obj/usr/src/lib/libmd/skein_block_asm.o.meta' > >> .MAKE.LEVEL=3D'4' > >> MAKEFILE=3D'' > >> > >> > >> Host is running recent CURRENT: FreeBSD 12.0-CURRENT #124 r318748: Tue= May 23 > >> 18:52:59 CEST 2017 amd64 =20 >=20 > It shouldn't be related to this change: >=20 > 1) This only affects s390 configuration which is never activated > 2) I did run a tinderbox build to make sure nothing was affected (the=20 > only thing failing was an unrelated powerpc warning that was fixed). >=20 > Pedro. Hello, the problem could be resolved by deleting the /usr/obj folder and start a c= lean build again. Regards, Oliver --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/MYZaQ/c8XecG4rMc5Pxs4x_ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWSSG1wAKCRDS528fyFhY lHLCAf4947rxL/M19A3aoocLM3R5MaMCyVTiwguRowwWYEupAZDf9EPfjNaveee2 Kpqv90pGvdna71TZib/fJwppBKArAgCZUpDGwOPLjD9G6nupskaLEzT/Q6rcCdn0 PZImG1pQsK+xHNEYiP2R7lSH8nwE/qzjXa9Eu/qOwSMH7QotuSq9 =1vjE -----END PGP SIGNATURE----- --Sig_/MYZaQ/c8XecG4rMc5Pxs4x_-- From owner-svn-src-all@freebsd.org Tue May 23 19:03:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D80ED7B4E3; Tue, 23 May 2017 19:03:09 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38BAA1833; Tue, 23 May 2017 19:03:09 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NJ38gd068266; Tue, 23 May 2017 19:03:08 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NJ37Nh068261; Tue, 23 May 2017 19:03:07 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201705231903.v4NJ37Nh068261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Tue, 23 May 2017 19:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318755 - in head/contrib/blacklist: bin include lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 19:03:09 -0000 Author: lidl Date: Tue May 23 19:03:07 2017 New Revision: 318755 URL: https://svnweb.freebsd.org/changeset/base/318755 Log: Extend libblacklist support with new action types The original blacklist library supported two notification types: - failed auth attempt, which incremented the failed login count by one for the remote address - successful auth attempt, which reset the failed login count to zero for that remote address When the failed login count reached the limit in the configuration file, the remote address would be blocked by a packet filter. This patch implements a new notification type, "abusive behavior", and accepts, but does not act on an additional type, "bad username". It is envisioned that a system administrator will configure a small list of "known bad usernames" that should be blocked immediately. Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10604 Modified: head/contrib/blacklist/bin/blacklistd.c head/contrib/blacklist/include/bl.h head/contrib/blacklist/include/blacklist.h head/contrib/blacklist/lib/blacklist.c head/contrib/blacklist/lib/libblacklist.3 Modified: head/contrib/blacklist/bin/blacklistd.c ============================================================================== --- head/contrib/blacklist/bin/blacklistd.c Tue May 23 17:41:09 2017 (r318754) +++ head/contrib/blacklist/bin/blacklistd.c Tue May 23 19:03:07 2017 (r318755) @@ -214,6 +214,17 @@ process(bl_t bl) } switch (bi->bi_type) { + case BL_ABUSE: + /* + * If the application has signaled abusive behavior, + * set the number of fails to be one less than the + * configured limit. Fallthrough to the normal BL_ADD + * processing, which will increment the failure count + * to the threshhold, and block the abusive address. + */ + if (c.c_nfail != -1) + dbi.count = c.c_nfail - 1; + /*FALLTHROUGH*/ case BL_ADD: dbi.count++; dbi.last = ts.tv_sec; @@ -249,6 +260,9 @@ process(bl_t bl) dbi.count = 0; dbi.last = 0; break; + case BL_BADUSER: + /* ignore for now */ + break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } Modified: head/contrib/blacklist/include/bl.h ============================================================================== --- head/contrib/blacklist/include/bl.h Tue May 23 17:41:09 2017 (r318754) +++ head/contrib/blacklist/include/bl.h Tue May 23 19:03:07 2017 (r318755) @@ -40,7 +40,9 @@ typedef enum { BL_INVALID, BL_ADD, - BL_DELETE + BL_DELETE, + BL_ABUSE, + BL_BADUSER } bl_type_t; typedef struct { Modified: head/contrib/blacklist/include/blacklist.h ============================================================================== --- head/contrib/blacklist/include/blacklist.h Tue May 23 17:41:09 2017 (r318754) +++ head/contrib/blacklist/include/blacklist.h Tue May 23 19:03:07 2017 (r318755) @@ -43,4 +43,13 @@ int blacklist_sa_r(struct blacklist *, i const struct sockaddr *, socklen_t, const char *); __END_DECLS +/* action values for user applications */ +#define BLACKLIST_API_ENUM 1 +enum { + BLACKLIST_AUTH_OK = 0, + BLACKLIST_AUTH_FAIL, + BLACKLIST_ABUSIVE_BEHAVIOR, + BLACKLIST_BAD_USER +}; + #endif /* _BLACKLIST_H */ Modified: head/contrib/blacklist/lib/blacklist.c ============================================================================== --- head/contrib/blacklist/lib/blacklist.c Tue May 23 17:41:09 2017 (r318754) +++ head/contrib/blacklist/lib/blacklist.c Tue May 23 19:03:07 2017 (r318755) @@ -61,7 +61,27 @@ int blacklist_sa_r(struct blacklist *bl, int action, int rfd, const struct sockaddr *sa, socklen_t slen, const char *msg) { - return bl_send(bl, action ? BL_ADD : BL_DELETE, rfd, sa, slen, msg); + int internal_action; + + /* internal values are not the same as user application values */ + switch (action) { + case BLACKLIST_AUTH_FAIL: + internal_action = BL_ADD; + break; + case BLACKLIST_AUTH_OK: + internal_action = BL_DELETE; + break; + case BLACKLIST_ABUSIVE_BEHAVIOR: + internal_action = BL_ABUSE; + break; + case BLACKLIST_BAD_USER: + internal_action = BL_BADUSER; + break; + default: + internal_action = BL_INVALID; + break; + } + return bl_send(bl, internal_action, rfd, sa, slen, msg); } int Modified: head/contrib/blacklist/lib/libblacklist.3 ============================================================================== --- head/contrib/blacklist/lib/libblacklist.3 Tue May 23 17:41:09 2017 (r318754) +++ head/contrib/blacklist/lib/libblacklist.3 Tue May 23 19:03:07 2017 (r318755) @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 22, 2015 +.Dd May 5, 2017 .Dt LIBBLACKLIST 3 .Os .Sh NAME @@ -76,13 +76,9 @@ The .Fn blacklist function sends a message to .Xr blacklistd 8 , -with an +with an integer .Ar action -argument specifying -.Dv 1 -for a failed connection or -.Dv 0 -for a successful connection, +argument specifying the type of notification, a file descriptor .Ar fd specifying the accepted file descriptor connected to the client, @@ -91,6 +87,30 @@ and an optional message in the argument. .Pp The +.Ar action +parameter can take these values: +.Bl -tag -width ".Va BLACKLIST_ABUSIVE_BEHAVIOR" +.It Va BLACKLIST_AUTH_FAIL +There was an unsuccessful authentication attempt. +.It Va BLACKLIST_AUTH_OK +A user successfully authenticated. +.It Va BLACKLIST_ABUSIVE_BEHAVIOR +The sending daemon has detected abusive behavior +from the remote system. The remote address should +be blocked as soon as possible. +.It Va BLACKLIST_BAD_USER +The sending daemon has determined the username +presented for authentication is invalid. The +.Xr blacklistd 8 +daemon compares the username to a configured list of forbidden +usernames and +blocks the address immediately if a forbidden username matches. +(The +.Ar BLACKLIST_BAD_USER +support is not currently available.) +.El +.Pp +The .Fn blacklist_r function is more efficient because it keeps the blacklist state around. .Pp @@ -102,8 +122,13 @@ functions can be used with unconnected s .Xr getpeername 2 will not work, the server will pass the peer name in the message. .Pp -All functions log errors to -.Xr syslogd 8 . +By default, +.Xr syslogd 8 +is used for message logging. +The internal +.Fn bl_create +function can be used to create the required internal +state and specify a custom logging function. .Sh RETURN VALUES The function .Fn blacklist_open From owner-svn-src-all@freebsd.org Tue May 23 19:45:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE027D7A2EA; Tue, 23 May 2017 19:45:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF6D61F85; Tue, 23 May 2017 19:45:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NJjV3p085054; Tue, 23 May 2017 19:45:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NJjVf1085053; Tue, 23 May 2017 19:45:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705231945.v4NJjVf1085053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 19:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318756 - stable/10/contrib/netbsd-tests/lib/libc/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 19:45:33 -0000 Author: ngie Date: Tue May 23 19:45:31 2017 New Revision: 318756 URL: https://svnweb.freebsd.org/changeset/base/318756 Log: :raw no longer SIGSEGVs on FreeBSD; revert the signal expectation This is a direct commit to ^/stable/10, since this expectation was only added to ^/stable/10's copy of t_raw.c. PR: 216954 Sponsored by: Dell EMC Isilon Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Tue May 23 19:03:07 2017 (r318755) +++ stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Tue May 23 19:45:31 2017 (r318756) @@ -38,12 +38,6 @@ __RCSID("$NetBSD: t_rpc.c,v 1.10 2016/08 #define RPCBPROC_NULL 0 -/* XXX (ngie): for clarity on what needs to be reverted later. */ -#define __FreeBSD_bug_216954__ -#ifdef __FreeBSD_bug_216954__ -#include -#endif - static int reply(caddr_t replyp, struct netbuf * raddrp, struct netconfig * nconf) { @@ -331,12 +325,6 @@ ATF_TC_HEAD(raw, tc) ATF_TC_BODY(raw, tc) { -#ifdef __FreeBSD__ -#ifdef __FreeBSD_bug_216954__ - atf_tc_expect_signal(SIGSEGV, - "fails with SIGSEGV only on ^/stable/10 -- bug # 216954"); -#endif -#endif rawtest(NULL); } From owner-svn-src-all@freebsd.org Tue May 23 20:25:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FDCCD7B0A7; Tue, 23 May 2017 20:25:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0E4A1710; Tue, 23 May 2017 20:25:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NKPnYU001396; Tue, 23 May 2017 20:25:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NKPnrH001395; Tue, 23 May 2017 20:25:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705232025.v4NKPnrH001395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 23 May 2017 20:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318757 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 20:25:51 -0000 Author: emaste Date: Tue May 23 20:25:49 2017 New Revision: 318757 URL: https://svnweb.freebsd.org/changeset/base/318757 Log: Add note to UPDATING for ino64 to follow the standard upgrade process The existing upgrade process documented in UPDATING is both necessary and sufficient for upgrading across the ino64 change. However, the shortcut of installing both kernel + world before a single reboot has been possible for quite some time, and several developers and users were surprised by fallout from ino64. Add an explicit entry pointing out that the full process must be followed. Reviewed by: allanjude, gjb, vangyzen Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10877 Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue May 23 19:45:31 2017 (r318756) +++ head/UPDATING Tue May 23 20:25:49 2017 (r318757) @@ -51,6 +51,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20170523: + The "ino64" 64-bit inode project has been committed, which extends + a number of types to 64 bits. In order to upgrade, carefully follow + the full procedure documented below under the heading "To rebuild + everything and install it on the current system." Specifically, a + reboot is required after installing the new kernel before installing + world. + 20170424: The NATM framework including the en(4), fatm(4), hatm(4), and patm(4) devices has been removed. Consumers should plan a From owner-svn-src-all@freebsd.org Tue May 23 20:51:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A428D7B880; Tue, 23 May 2017 20:51:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE3531519; Tue, 23 May 2017 20:51:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NKpmeJ010358; Tue, 23 May 2017 20:51:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NKpm9g010357; Tue, 23 May 2017 20:51:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705232051.v4NKpm9g010357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 23 May 2017 20:51:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318758 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 20:51:50 -0000 Author: emaste Date: Tue May 23 20:51:48 2017 New Revision: 318758 URL: https://svnweb.freebsd.org/changeset/base/318758 Log: UPDATING: ino64 upgrade should include COMPAT_FREEBSD11 The upgrade process requires COMPAT_FREEBSD11 to support the combination of "old" userland and "new" kernel that exists after "make kernel" and reboot. Mention this explicitly for those using custom kernel configs. Once the "new" world is installed the COMPAT_FREEBSD11 could be removed again, but that does not seem necessary to mention in UPDATING. Reported by: kib Sponsored by: The FreeBSD Foundation Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue May 23 20:25:49 2017 (r318757) +++ head/UPDATING Tue May 23 20:51:48 2017 (r318758) @@ -57,7 +57,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 the full procedure documented below under the heading "To rebuild everything and install it on the current system." Specifically, a reboot is required after installing the new kernel before installing - world. + world. In addition, if using a custom kernel configuration ensure + that the COMPAT_FREEBSD11 option is included. 20170424: The NATM framework including the en(4), fatm(4), hatm(4), and From owner-svn-src-all@freebsd.org Tue May 23 21:33:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E274D7BFDB; Tue, 23 May 2017 21:33:07 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0506F189B; Tue, 23 May 2017 21:33:07 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 3695A11EE; Tue, 23 May 2017 21:33:06 +0000 (UTC) Date: Tue, 23 May 2017 21:33:06 +0000 From: Alexey Dokuchaev To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318757 - head Message-ID: <20170523213306.GA74154@FreeBSD.org> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705232025.v4NKPnrH001395@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 21:33:07 -0000 On Tue, May 23, 2017 at 08:25:49PM +0000, Ed Maste wrote: > New Revision: 318757 > URL: https://svnweb.freebsd.org/changeset/base/318757 > > Log: > Add note to UPDATING for ino64 to follow the standard upgrade process > ... > +20170523: > + The "ino64" 64-bit inode project has been committed, which extends > + a number of types to 64 bits. For the dumb people among us, what is it all about? E.g., what's so cool about it? ./danfe From owner-svn-src-all@freebsd.org Tue May 23 21:39:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B0FBD7B067; Tue, 23 May 2017 21:39:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D4351A93; Tue, 23 May 2017 21:39:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id w69so30091456pfk.1; Tue, 23 May 2017 14:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=6Fy68fvVETDEqBTngAirEzB0rwggcgDiL5v6hOMs/ns=; b=ObgPGYamadAgmqGxKRySmm3syRraR7br3dvpWcM4mm2oRaMPQNpYwReC3cAgKqzK71 cV131tXCqrQH3RCsDghO0FH86j0wWbKse0KFg07z+B/1+8sMW+z6oviadyTs1jg8bOne VEA618hRUAzL8yrk0sq1VSpB5q4ko7J5ELf2/88sqF6KDRCnsqc9JDq1SVKGxEtnQ8Ok B+Re5MVQcIXegJS/yXm+KqCZs3OFFn93MjLpl9Xl7nP0VMYzn2cKWYdVAMmn3VFEDDGZ q4HK2KpVPN0W5cSG6HNVcExnz9t4gj1X2mqAlNRL0BTK3VGNBa0p8TX4a0qMP/YYy7dG 4j6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=6Fy68fvVETDEqBTngAirEzB0rwggcgDiL5v6hOMs/ns=; b=R6h/tSaRW3YgDFwkMb8AyrGJe0AdXzORTvegUQcgae7LF+VOfRsLdcusSmnye2SC1C uew5P8R1jDn9LjdgYL2QYb+gUs3d3QciMPzXnVa7LeNyc9ol0I3VjazGW2eYvp2liVmf Wy5UklzfJm2GAuYLpVzwHzgVNLeNxniawQ94qXu+UcdmDayAw+TqeMXS0iIA9a7P9AKb Ig4cIsqdVXOU8Vk8YPCXkiWsJsKlxUvBRLpKie/1BuipMfHdqrWNeWRdUirET+Mkjbs6 +m9sbfRJeN4+n8oylOCHqvBOsQXiiBajfBWn/txiIctNcX7FlojdQigNcaEm8/au4CJX CUdQ== X-Gm-Message-State: AODbwcCFrPFsuXRu3NTajsVQ5PQ/tUveUFoNe+c4d6C+V4AoLMn29dls t+KYIjJn630X0DUQAr0= X-Received: by 10.99.1.85 with SMTP id 82mr35101245pgb.164.1495575576456; Tue, 23 May 2017 14:39:36 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y2sm3749947pfa.65.2017.05.23.14.39.34 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 May 2017 14:39:35 -0700 (PDT) Subject: Re: svn commit: r318757 - head Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3158879A-AB5C-45EE-900B-38C69308CB43"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170523213306.GA74154@FreeBSD.org> Date: Tue, 23 May 2017 14:39:33 -0700 Cc: Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0BB13EA0-7DE0-48CF-B51F-8BC68338CCDF@gmail.com> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170523213306.GA74154@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 21:39:37 -0000 --Apple-Mail=_3158879A-AB5C-45EE-900B-38C69308CB43 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 23, 2017, at 14:33, Alexey Dokuchaev wrote: >=20 > On Tue, May 23, 2017 at 08:25:49PM +0000, Ed Maste wrote: >> New Revision: 318757 >> URL: https://svnweb.freebsd.org/changeset/base/318757 >>=20 >> Log: >> Add note to UPDATING for ino64 to follow the standard upgrade = process >> ... >> +20170523: >> + The "ino64" 64-bit inode project has been committed, which = extends >> + a number of types to 64 bits. >=20 > For the dumb people among us, what is it all about? E.g., what's so = cool > about it? 64-bit inodes: more addressable inodes for bigger = filesystems/disks. =46rom = https://lists.freebsd.org/pipermail/freebsd-fs/2017-April/024684.html : =E2=80=9C=E2=80=9D" Inodes are data structures corresponding to objects in a file system, such as files and directories. FreeBSD has historically used 32-bit values to identify inodes, which limits file systems to somewhat under 2^32 objects. Many modern file systems internally use 64-bit identifiers and FreeBSD needs to follow suit to properly and fully support these file systems. =E2=80=9C=E2=80=9D=E2=80=9D With Isilon OneFS we currently support multiples of petabytes of = storage ( = https://www.emc.com/collateral/hardware/white-papers/h10719-isilon-onefs-t= echnical-overview-wp.pdf ), so this matters very much to us. It=E2=80=99s = also useful for other file systems though (assuming they can scale that = high). Cheers, -Ngie --Apple-Mail=_3158879A-AB5C-45EE-900B-38C69308CB43 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZJKwWAAoJEPWDqSZpMIYVLP0QANDJVWawXT4f1RFkrsjZV2bV 2SJC6taXcpoGjRnt6iAwmpd++1uAvty0TryHeHtOEfhfJZSkCLQlGwxqxaJkzpgZ DETwXcTuN3RCXaciqBGRVJRPQqRDjof2Av7hngOumfVyu9gW85rDnujdr1/EApKo Erq8BkOwftYBMjHkxY/NPGhwn25nvnG89Qwr05j5b8iQWK4dlAI3laP/7PW9cQtG FD2YOOG8pKADwUkPO+jaUoeta6L6c71wnuUQ0ZxaN0Y96HHJpmEE+u5DVWGf3rHq TTTvmxXzFfPIOxYy+qUokZAchx9Sw20cIfe5BPWTjGuqi4b8Sbw+oeRNToH8lcf1 Gk3aWFbWckwF0Gt5yq3M14/UzktH6C1Z3/S0022joqpWNx7PfZMzpjrv4xuQavyS nLudaJZeQcr6lK0Oe/pg21VJv/51x+7Qb9VYXFR/wozf004o40LBMbuyFk0ro6Ak xmnhXd7iErtqwiLsVjUrTLyvvJ+V/19auLCk+8hBStX5dH0Q5APyaYIdbuwQ1MCn kXCOpIqI4HsNN0EiHo6LRqgyDWg0RZubPiR4PEd1p+MrXR7iaZgaRz8dhZ6mlgRH CptpnqRvNGYGIdUGsjrB4KV0d6tfq4ldxoD3E0Lm/0/Q73fN05swlEbrmzaXre6u Xppgl5qVPeSbE6ZMyTvi =q8DN -----END PGP SIGNATURE----- --Apple-Mail=_3158879A-AB5C-45EE-900B-38C69308CB43-- From owner-svn-src-all@freebsd.org Tue May 23 21:40:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BD65D7B0FE; Tue, 23 May 2017 21:40:08 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 168A31C16; Tue, 23 May 2017 21:40:07 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.10] (unknown [192.168.1.10]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 4D19413719; Tue, 23 May 2017 21:40:00 +0000 (UTC) Subject: Re: svn commit: r318757 - head To: Alexey Dokuchaev , Ed Maste References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170523213306.GA74154@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: Date: Tue, 23 May 2017 17:39:50 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170523213306.GA74154@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8EOgERNrMS4TpFKonWhVKT148xaD8918m" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 21:40:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8EOgERNrMS4TpFKonWhVKT148xaD8918m Content-Type: multipart/mixed; boundary="FaPg3vpMjwdeVcvUEJFO4wiTLFOBFoQTr"; protected-headers="v1" From: Allan Jude To: Alexey Dokuchaev , Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170523213306.GA74154@FreeBSD.org> In-Reply-To: <20170523213306.GA74154@FreeBSD.org> --FaPg3vpMjwdeVcvUEJFO4wiTLFOBFoQTr Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2017-05-23 17:33, Alexey Dokuchaev wrote: > On Tue, May 23, 2017 at 08:25:49PM +0000, Ed Maste wrote: >> New Revision: 318757 >> URL: https://svnweb.freebsd.org/changeset/base/318757 >> >> Log: >> Add note to UPDATING for ino64 to follow the standard upgrade proces= s >> ... >> +20170523: >> + The "ino64" 64-bit inode project has been committed, which extends >> + a number of types to 64 bits. >=20 > For the dumb people among us, what is it all about? E.g., what's so co= ol > about it? >=20 > ./danfe >=20 64bit inodes allow you to have more than 4 billion files in one file system, or NFS mount. The project also includes fixing a number of other long-standing-because-of-ABI changes, like the max length of a mountpoint is now 1024 instead of some small value (60 or 80 or something it was before) --=20 Allan Jude --FaPg3vpMjwdeVcvUEJFO4wiTLFOBFoQTr-- --8EOgERNrMS4TpFKonWhVKT148xaD8918m Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) iQIcBAEBAgAGBQJZJKwsAAoJEBmVNT4SmAt+YX4P/ibdx3JimySwjrma5bGUGjsS Hb1q7CaH8jyI5AxZuxsCd4uSNQHD8k11ivJ1290MJ4pdLqE5yyUOqp2ZSFV4UPn4 YE6smNxqwx6TSlv95Q+dgolPirfF/n+cmsfG5FGFslkr3hwLM+11gCff1BDUmwWV Qf2Ipv8or6XoANO7QMbiF9TQObBNMLRG6n6OIAQyKigNlfpQfsEOOnl0CpTce2Ew iMXo3IQiBrkUFPX0TxhxQo0P0EfguVbsWM08OXTHCk1wQBe83LN+RM7Ok/svZZKH XXCB+ZQjT22uP0YDIzIHTOrCuohSak6yJBumYNB6WsE9Bmyyv4aSwv5X8F5IVJ7l 3OSt3Quj+uL5p6GF5FOuCdnMElOORUCVMpU1ZqDBOsrbQ5kbA7L6qwKdp26yqG7A qr2mJSbiNeMhP0s+/xsQsi4iaQM1R9a3ZyqwqJTKKducG8xlEMoplj9wnzd8DKCw OpS7IC+HzNTjTdGAQEsQUmrzOZh+evsnzFbAe2prbj+1DyyHDQaQ5FrsZ8g6QinZ ZuvW0EPksXb/gJHcNgQ0O7Rb1GmurOkJOZLBv4LJrB6PMCFhtmNnoN1YDq/+OY5L pjfQJk7zrdu5T//ATg0wxj2nTpDb5+9S2w20SzdKvIbdPS6ehx2XtPGz0EB+ynCJ yolfsbcWWV5C7pz4Mdow =e9in -----END PGP SIGNATURE----- --8EOgERNrMS4TpFKonWhVKT148xaD8918m-- From owner-svn-src-all@freebsd.org Tue May 23 21:46:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA524D7B508; Tue, 23 May 2017 21:46:45 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A35C3119E; Tue, 23 May 2017 21:46:45 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:To:From:Subject:Date:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=IPQmzfuPLbRYFKxussXGmH4b4N+QyyWhHDqtFJHI++E=; b=pxnNU7G7rxjNufc6K3OhBH580P Y5vPqeu/cWuRyTFB48rDUpcKLrSxyX3FhtBmq4gl/u/8HhhDzbFskHxslQn+ydWiCu6AA7/x24ZGz ekrBgtUabd8HC/y5ret76ZBoVmR6jZakQgMFEfZeqYVKNedDp3GOMb9VPDxuArKw6twA=; Received: from [74.203.163.58] (port=38685 helo=[10.106.10.44]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1dDHdc-0008Zx-Kb; Tue, 23 May 2017 16:46:44 -0500 User-Agent: Microsoft-MacOutlook/f.23.0.170517 Date: Tue, 23 May 2017 16:46:14 -0500 Subject: Re: svn commit: r318757 - head From: Larry Rosenman To: Ed Maste , , , , "freebsd-current@freebsd.org" Message-ID: Thread-Topic: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> In-Reply-To: <201705232025.v4NKPnrH001395@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 21:46:45 -0000 My PostgreSQL buildfarm animal BROKE with this change until I force rebuilt lang/perl5.24 and all my p5-* ports.=20 emulators/qemu-user-static also won=E2=80=99t compile (sbruno@ is on this one). Poudriere did *NOT* force a fuill rebuild even though freebsd-version *WAS*= bumped.=20 Is there a hazard for others here? Or more info needed in /usr/{src,ports}/UPDATING? --=20 Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 =20 From owner-svn-src-all@freebsd.org Tue May 23 21:56:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 719D7D7BA54; Tue, 23 May 2017 21:56:16 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 394ED1B7E; Tue, 23 May 2017 21:56:15 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 86FC0260874; Tue, 23 May 2017 23:56:13 +0200 (CEST) Subject: Re: svn commit: r318757 - head To: Alexey Dokuchaev , Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "kwm@freebsd.org" References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170523213306.GA74154@FreeBSD.org> From: Hans Petter Selasky Message-ID: <9f3bfde8-370c-0d22-d076-1e57cbba4aa0@selasky.org> Date: Tue, 23 May 2017 23:54:14 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <20170523213306.GA74154@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 21:56:16 -0000 On 05/23/17 23:33, Alexey Dokuchaev wrote: > On Tue, May 23, 2017 at 08:25:49PM +0000, Ed Maste wrote: >> New Revision: 318757 >> URL: https://svnweb.freebsd.org/changeset/base/318757 >> >> Log: >> Add note to UPDATING for ino64 to follow the standard upgrade process >> ... >> +20170523: >> + The "ino64" 64-bit inode project has been committed, which extends >> + a number of types to 64 bits. > > For the dumb people among us, what is it all about? E.g., what's so cool > about it? Hi, /usr/ports/multimedia/webcamd should be updated after this change to the latest version. See e-mail to freebsd-multimedia@freebsd.org . Else there will be some breakage in /usr/ports for X.org . I would prefer that webcamd was updated before putting this change into -head, but anyway the road is a bit bumpy sometimes. --HPS From owner-svn-src-all@freebsd.org Tue May 23 22:07:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 897CDD7BDFE for ; Tue, 23 May 2017 22:07:31 +0000 (UTC) (envelope-from 0100015c3759afc2-0f5555cc-ea90-46d0-bebc-7566c190e860-000000@amazonses.com) Received: from a8-26.smtp-out.amazonses.com (a8-26.smtp-out.amazonses.com [54.240.8.26]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CBB81488 for ; Tue, 23 May 2017 22:07:30 +0000 (UTC) (envelope-from 0100015c3759afc2-0f5555cc-ea90-46d0-bebc-7566c190e860-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ae7m2yrxjw65l2cqdpjxuucyrvy564tn; d=tarsnap.com; t=1495577244; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=tq32Mp1xfGFIvk9Um/L58cD/+KIod1VkKBaANEOShmI=; b=N/v/OdrvfFBxBggJSzTMWe1O2WuO1PGxpkmI0ClC0+5lwf8IPBJ6/Ss9hVdDc+Il Bkt0Zmn5xf/JM9cGxIsY/6dT4ABOM+2R1SlhdoLyRud6j3vNWq7cPuy50SjXZuBz0As 878B+DoK/SecrOXe3nKImEQwF7qHc+dJ2H0OfjZw= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1495577244; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=tq32Mp1xfGFIvk9Um/L58cD/+KIod1VkKBaANEOShmI=; b=kwxFuWuyinLn+m2EWxJnA+Yjb/oGuJ9zs015UytiS8uVe22H9USJHMAwNBwpIR9o L8VYw4VyEUmaH6SagObgHoLj1TD63TIwmqsYoAeLcaYG/iSFa2LnS6BUMVPFwwGdg0v E86eE0HKoh6iH+h6XSB38CR2tu9lpYKwunT/vxt8= Subject: Re: svn commit: r318757 - head To: Allan Jude , Alexey Dokuchaev , Ed Maste References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170523213306.GA74154@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Colin Percival Message-ID: <0100015c3759afc2-0f5555cc-ea90-46d0-bebc-7566c190e860-000000@email.amazonses.com> Date: Tue, 23 May 2017 22:07:23 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2017.05.23-54.240.8.26 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 22:07:31 -0000 On 05/23/17 14:39, Allan Jude wrote: > On 2017-05-23 17:33, Alexey Dokuchaev wrote: >> On Tue, May 23, 2017 at 08:25:49PM +0000, Ed Maste wrote: >>> New Revision: 318757 >>> URL: https://svnweb.freebsd.org/changeset/base/318757 >>> >>> Log: >>> Add note to UPDATING for ino64 to follow the standard upgrade process >>> ... >>> +20170523: >>> + The "ino64" 64-bit inode project has been committed, which extends >>> + a number of types to 64 bits. >> >> For the dumb people among us, what is it all about? E.g., what's so cool >> about it? > > 64bit inodes allow you to have more than 4 billion files in one file > system, or NFS mount. It can avoid problems on NFS even if you have less than 2^32 files, since NFS uses 64-bit fileids and is not required to use the values 0, 1, 2, 3... for files. In Amazon EFS for example every fileid is > 2^32 and there's no guarantee that two files won't map to the same 32-bit inode # (pre-ino64, we simply reduced the fileid mod 2^32 to generate an inode #). -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@freebsd.org Tue May 23 22:11:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 423B5D7BFD1; Tue, 23 May 2017 22:11:47 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C9D81710; Tue, 23 May 2017 22:11:46 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NMBk9L046290; Tue, 23 May 2017 22:11:46 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NMBkXA046289; Tue, 23 May 2017 22:11:46 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201705232211.v4NMBkXA046289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 23 May 2017 22:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318759 - stable/11/usr.bin/sed X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 22:11:47 -0000 Author: brd (doc,ports committer) Date: Tue May 23 22:11:45 2017 New Revision: 318759 URL: https://svnweb.freebsd.org/changeset/base/318759 Log: MFC r316030, r317378: Add some useful examples to the sed man page. Reviewed by: wblock, bcr Differential Revision: https://reviews.freebsd.org/D9958 Modified: stable/11/usr.bin/sed/sed.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sed/sed.1 ============================================================================== --- stable/11/usr.bin/sed/sed.1 Tue May 23 20:51:48 2017 (r318758) +++ stable/11/usr.bin/sed/sed.1 Tue May 23 22:11:45 2017 (r318759) @@ -31,7 +31,7 @@ .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd May 10, 2016 +.Dd March 27, 2017 .Dt SED 1 .Os .Sh NAME @@ -586,6 +586,36 @@ as described in .Xr environ 7 . .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Replace +.Ql bar +with +.Ql baz +when piped from another command: +.Bd -literal -offset indent +echo "An alternate word, like bar, is sometimes used in examples." | sed 's/bar/baz/' +.Ed +.Pp +Using backlashes can sometimes be hard to read and follow: +.Bd -literal -offset indent +echo "/home/example" | sed 's/\\/home\\/example/\\/usr\\/local\\/example/' +.Ed +.Pp +Using a different separator can be handy when working with paths: +.Bd -literal -offset indent +echo "/home/example" | sed 's#/home/example#/usr/local/example#' +.Ed +.Pp +Replace all occurances of +.Ql foo +with +.Ql bar +in the file +.Pa test.txt , +without creating a backup of the file: +.Bd -literal -offset indent +sed -i '' -e 's/foo/bar/g' test.txt +.Ed .Sh SEE ALSO .Xr awk 1 , .Xr ed 1 , From owner-svn-src-all@freebsd.org Tue May 23 22:30:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3EA1D78231; Tue, 23 May 2017 22:30:16 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70ED91E96; Tue, 23 May 2017 22:30:16 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NMUFc3051323; Tue, 23 May 2017 22:30:15 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NMUFj9051321; Tue, 23 May 2017 22:30:15 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201705232230.v4NMUFj9051321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Tue, 23 May 2017 22:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318760 - head/sys/dev/bhnd/nvram X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 22:30:16 -0000 Author: landonf Date: Tue May 23 22:30:15 2017 New Revision: 318760 URL: https://svnweb.freebsd.org/changeset/base/318760 Log: bhnd(4): Fix a SPROM identification regression introduced in r315866 In r315866, we introduced a direct read of the 8-bit sromrev field from the memory mapped SPROM/OTP device. On OTP devices that require 16-bit access alignment, this read fails, preventing identification of the SPROM layout. So, let's perform an aligned read of the combined 16-bit sromrev/crc field instead. Approved by: adrian (mentor, implicit) Modified: head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c head/sys/dev/bhnd/nvram/bhnd_sprom.c Modified: head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c ============================================================================== --- head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c Tue May 23 22:11:45 2017 (r318759) +++ head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c Tue May 23 22:30:15 2017 (r318760) @@ -184,6 +184,7 @@ bhnd_nvram_sprom_ident(struct bhnd_nvram u_char buf[512]; size_t nread; uint16_t magic; + uint8_t srevcrc[2]; uint8_t srev; bool crc_valid; bool have_magic; @@ -224,12 +225,15 @@ bhnd_nvram_sprom_ident(struct bhnd_nvram nbytes += nr; } - /* Read SPROM revision */ - error = bhnd_nvram_io_read(io, layout->srev_offset, &srev, - sizeof(srev)); + /* Read 8-bit SPROM revision, maintaining 16-bit size alignment + * required by some OTP/SPROM chipsets. */ + error = bhnd_nvram_io_read(io, layout->srev_offset, &srevcrc, + sizeof(srevcrc)); if (error) return (error); + srev = srevcrc[0]; + /* Early sromrev 1 devices (specifically some BCM440x enet * cards) are reported to have been incorrectly programmed * with a revision of 0x10. */ Modified: head/sys/dev/bhnd/nvram/bhnd_sprom.c ============================================================================== --- head/sys/dev/bhnd/nvram/bhnd_sprom.c Tue May 23 22:11:45 2017 (r318759) +++ head/sys/dev/bhnd/nvram/bhnd_sprom.c Tue May 23 22:30:15 2017 (r318760) @@ -120,9 +120,9 @@ bhnd_sprom_attach(device_t dev, bus_size sprom_size = r_size - offset; - /* Allocate an I/O context for the SPROM parser. SPROM reads do not - * appear to require any specific alignment. */ - io = bhnd_nvram_iores_new(r, offset, sprom_size, 1); + /* Allocate an I/O context for the SPROM parser. All SPROM reads + * must be 16-bit aligned */ + io = bhnd_nvram_iores_new(r, offset, sprom_size, sizeof(uint16_t)); if (io == NULL) { error = ENXIO; goto failed; From owner-svn-src-all@freebsd.org Tue May 23 22:34:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C620D784DF; Tue, 23 May 2017 22:34:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E8EB1471; Tue, 23 May 2017 22:34:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NMYIng055166; Tue, 23 May 2017 22:34:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NMYIOE055164; Tue, 23 May 2017 22:34:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705232234.v4NMYIOE055164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 23 May 2017 22:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318761 - in head/sys: i386/i386 x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 22:34:19 -0000 Author: jhb Date: Tue May 23 22:34:18 2017 New Revision: 318761 URL: https://svnweb.freebsd.org/changeset/base/318761 Log: Remove the BSD/OS 2.1 system call gate LDT entry. An extra copy of the system call gate was added to the default LDT back in 1996 (r18513 / r18514). However, the ability to run BSD/OS 2.1 i386 binaries under FreeBSD's native ABI is most likely no longer needed. Discussed with: kib Modified: head/sys/i386/i386/machdep.c head/sys/x86/include/segments.h Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Tue May 23 22:30:15 2017 (r318760) +++ head/sys/i386/i386/machdep.c Tue May 23 22:34:18 2017 (r318761) @@ -2446,10 +2446,6 @@ init386(int first) gdp->gd_p = 1; gdp->gd_hioffset = x >> 16; - /* XXX does this work? */ - /* XXX yes! */ - ldt[LBSDICALLS_SEL] = ldt[LSYS5CALLS_SEL]; - /* transfer to user mode */ _ucodesel = GSEL(GUCODE_SEL, SEL_UPL); Modified: head/sys/x86/include/segments.h ============================================================================== --- head/sys/x86/include/segments.h Tue May 23 22:30:15 2017 (r318760) +++ head/sys/x86/include/segments.h Tue May 23 22:34:18 2017 (r318761) @@ -252,8 +252,7 @@ union descriptor { #define LUDATA_SEL 5 /* separate stack, es,fs,gs sels ? */ /* #define LPOSIXCALLS_SEL 5*/ /* notyet */ -#define LBSDICALLS_SEL 16 /* BSDI system call gate */ -#define NLDT (LBSDICALLS_SEL + 1) +#define NLDT (LUDATA_SEL + 1) #else /* !__i386__ */ /* From owner-svn-src-all@freebsd.org Tue May 23 23:09:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7FC1D78D68; Tue, 23 May 2017 23:09:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 794AB12EF; Tue, 23 May 2017 23:09:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 8675D2A00; Tue, 23 May 2017 23:09:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 40A6D623D; Tue, 23 May 2017 23:09:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 8s_2dUNIxS1D; Tue, 23 May 2017 23:08:57 +0000 (UTC) Subject: Re: svn commit: r318757 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 22F5F6238 To: Larry Rosenman , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" References: <201705232025.v4NKPnrH001395@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Tue, 23 May 2017 16:08:30 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7ngPRtaOIQbnxJqNeuRdJSqjKauXNvC3g" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 23:09:02 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7ngPRtaOIQbnxJqNeuRdJSqjKauXNvC3g Content-Type: multipart/mixed; boundary="O416vTc3HT3obfmXbKHFLdbWDPBt5iOtr"; protected-headers="v1" From: Bryan Drewery To: Larry Rosenman , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" Message-ID: Subject: Re: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> In-Reply-To: --O416vTc3HT3obfmXbKHFLdbWDPBt5iOtr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/23/2017 2:46 PM, Larry Rosenman wrote: > My PostgreSQL buildfarm animal BROKE with this change until I force reb= uilt > lang/perl5.24 > and all my p5-* ports.=20 >=20 > emulators/qemu-user-static also won=E2=80=99t compile (sbruno@ is on th= is one). >=20 > Poudriere did *NOT* force a fuill rebuild even though freebsd-version *= WAS* bumped.=20 >=20 It should have. What version are you using? Can you show output of 'poudriere jail -l' please? And show /usr/local/etc/poudriere.d/jails/JAILNAME/version And show the .jailversion output from your PACKAGES directory. > Is there a hazard for others here? >=20 > Or more info needed in /usr/{src,ports}/UPDATING? >=20 >=20 --=20 Regards, Bryan Drewery --O416vTc3HT3obfmXbKHFLdbWDPBt5iOtr-- --7ngPRtaOIQbnxJqNeuRdJSqjKauXNvC3g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJZJMD3AAoJEDXXcbtuRpfPv+UIANL/FGjoyrgsYparr9NuMLV0 sOU79WRCvMeJd8+HhfzU7bDLGuIHxleKQrIw4NcLnwTSDAai2oGvAjIRlW47TUk/ Bpha4qpyVvy/+craFBMDWBYPxGIgB762kQ5mc6I0GHY+eYRXl5FZ6oRK4bBd/Y0o sep9MsiBoOEo3SIGdS0Lw48jfrlWFE1ijI/oUKVg57BI7hQfhV9HydJh5ygVp20u 7NY0VQ+RvCO7uohogyAZ2IwJNM9csK+a92HYjzZ/K09WMBKn573B2Z3cn2mXBlKl EHe/+MxC7TbLWIk9BOxJQAr9ItHVTAvXdBxYTmlpFBUlVKfEx4V1wlZRq/iRFn8= =NC5t -----END PGP SIGNATURE----- --7ngPRtaOIQbnxJqNeuRdJSqjKauXNvC3g-- From owner-svn-src-all@freebsd.org Tue May 23 23:24:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83B4FD793BD; Tue, 23 May 2017 23:24:32 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 614891C6A; Tue, 23 May 2017 23:24:32 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:To:From:Subject:Date:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BkXt1vaTsoO61oeUQp+TW7ZvYwJ59C3ZZK5X8bZ8uyw=; b=DAW8APJZ8S0Or6q1la3/kDKwlk CWKNWMg70klgOrdTq/gK90Oj8h7GlqysyzRTZay4VVWbxqXh/GO4egTR1QvSzFqfXOpphkzYmZh76 fM8wFjgD0GFefz4RRrCFcnE+BKwo5UXAYGns+cIxGkoSzbVvFp9boLCIki1AF3kq9e+Y=; Received: from adsl-108-90-214-189.dsl.aus2tx.sbcglobal.net ([108.90.214.189]:57713 helo=[172.18.245.140]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1dDJAF-000BZ6-2K; Tue, 23 May 2017 18:24:31 -0500 User-Agent: Microsoft-MacOutlook/f.23.0.170517 Date: Tue, 23 May 2017 18:24:28 -0500 Subject: Re: svn commit: r318757 - head From: Larry Rosenman To: Bryan Drewery , Ed Maste , , , , "freebsd-current@freebsd.org" Message-ID: <145539DE-59B4-4F21-B699-877DED6A2D1C@lerctr.org> Thread-Topic: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 23:24:32 -0000 borg.lerctr.org /home/ler $ sudo poudriere jail -l JAILNAME VERSION ARCH METHOD TIMESTAMP = PATH p103amd64 10.3-RELEASE-p18 amd64 http 2017-04-23 08:39:24 = /usr/local/poudriere/jails/p103amd64 p103i386 10.3-RELEASE-p18 i386 http 2017-04-23 08:40:44 = /usr/local/poudriere/jails/p103i386 p110amd64 11.0-RELEASE-p10 amd64 http 2017-05-15 14:54:58 = /usr/local/poudriere/jails/p110amd64 p110i386 11.0-RELEASE-p9 i386 http 2017-04-23 08:41:48 = /usr/local/poudriere/jails/p110i386 live 12.0-CURRENT amd64 src=3D/usr/src 2017-05-23 13:39:40 = /usr/local/poudriere/jails/live pHEADamd64 12.0-CURRENT amd64 src=3D/usr/src 2017-04-24 17:15:13 = /usr/local/poudriere/jails/pHEADamd64 p120armv6 12.0-CURRENT r317340 arm.armv6 svn+https 2017-04-23 10:07:40 = /usr/local/poudriere/jails/p110borg.lerctr.org /usr/local/etc/poudriere.d/ja= ils/live $ cat version 12.0-CURRENT borg.lerctr.org /usr/local/etc/poudriere.d/jails/live $armv6 borg.lerctr.org /home/ler $ borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $ cat .j= ailversion 12.0-CURRENT borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $ --=20 Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 =20 =20 On 5/23/17, 6:08 PM, "Bryan Drewery" wrote: On 5/23/2017 2:46 PM, Larry Rosenman wrote: > My PostgreSQL buildfarm animal BROKE with this change until I force r= ebuilt > lang/perl5.24 > and all my p5-* ports.=20 >=20 > emulators/qemu-user-static also won=E2=80=99t compile (sbruno@ is on this o= ne). >=20 > Poudriere did *NOT* force a fuill rebuild even though freebsd-version= *WAS* bumped.=20 >=20 =20 It should have. What version are you using? Can you show output of 'poudriere jail -l' please? And show /usr/local/etc/poudriere.d/jails/JAILNAME/version And show the .jailversion output from your PACKAGES directory. =20 > Is there a hazard for others here? >=20 > Or more info needed in /usr/{src,ports}/UPDATING? >=20 >=20 =20 =20 --=20 Regards, Bryan Drewery =20 =20 From owner-svn-src-all@freebsd.org Tue May 23 23:29:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFFC2D79599; Tue, 23 May 2017 23:29:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7453A1F4F; Tue, 23 May 2017 23:29:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 5C3292E92; Tue, 23 May 2017 23:29:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 85EB26278; Tue, 23 May 2017 23:29:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id wlQCwxoyB8JK; Tue, 23 May 2017 23:29:27 +0000 (UTC) Subject: Re: svn commit: r318757 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com D0D126273 To: Larry Rosenman , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <145539DE-59B4-4F21-B699-877DED6A2D1C@lerctr.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> Date: Tue, 23 May 2017 16:29:26 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <145539DE-59B4-4F21-B699-877DED6A2D1C@lerctr.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7eDIcNVIx9U8VmIiW83X24XGONA0TUhKX" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 23:29:36 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7eDIcNVIx9U8VmIiW83X24XGONA0TUhKX Content-Type: multipart/mixed; boundary="9GFaLkKRl5JbSf39It2Jhcnhfwof5N4lD"; protected-headers="v1" From: Bryan Drewery To: Larry Rosenman , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" Message-ID: <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> Subject: Re: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <145539DE-59B4-4F21-B699-877DED6A2D1C@lerctr.org> In-Reply-To: <145539DE-59B4-4F21-B699-877DED6A2D1C@lerctr.org> --9GFaLkKRl5JbSf39It2Jhcnhfwof5N4lD Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/23/2017 4:24 PM, Larry Rosenman wrote: > borg.lerctr.org /home/ler $ sudo poudriere jail -l > JAILNAME VERSION ARCH METHOD TIMESTAMP = PATH > p103amd64 10.3-RELEASE-p18 amd64 http 2017-04-23 08:39= :24 /usr/local/poudriere/jails/p103amd64 > p103i386 10.3-RELEASE-p18 i386 http 2017-04-23 08:40= :44 /usr/local/poudriere/jails/p103i386 > p110amd64 11.0-RELEASE-p10 amd64 http 2017-05-15 14:54= :58 /usr/local/poudriere/jails/p110amd64 > p110i386 11.0-RELEASE-p9 i386 http 2017-04-23 08:41= :48 /usr/local/poudriere/jails/p110i386 > live 12.0-CURRENT amd64 src=3D/usr/src 2017-05-23 13:= 39:40 /usr/local/poudriere/jails/live > pHEADamd64 12.0-CURRENT amd64 src=3D/usr/src 2017-04-24 17:= 15:13 /usr/local/poudriere/jails/pHEADamd64 > p120armv6 12.0-CURRENT r317340 arm.armv6 svn+https 2017-04-23 10:07= :40 /usr/local/poudriere/jails/p110borg.lerctr.org /usr/local/etc/poudrie= re.d/jails/live $ cat version > 12.0-CURRENT > borg.lerctr.org /usr/local/etc/poudriere.d/jails/live $armv6 > borg.lerctr.org /home/ler $ >=20 >=20 > borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $ ca= t .jailversion > 12.0-CURRENT > borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $ >=20 >=20 >=20 That looks like a bug in Poudriere with -m src. It is using 12.0-CURRENT rather than __FreeBSD_version of 1200031. I'm working on a fix. --=20 Regards, Bryan Drewery --9GFaLkKRl5JbSf39It2Jhcnhfwof5N4lD-- --7eDIcNVIx9U8VmIiW83X24XGONA0TUhKX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJZJMXWAAoJEDXXcbtuRpfP/FkIANUr5zRaopwkNsKDg44grl0M PtWHRYAOLX1vmgrMgNRhPv8e+nbb9T2tgb9U4T1N3uJ9ifuD6j6IVWrX6+nCBI0m OzUnoPfG0ieXwOauYthNBx0EHAYL2y2AyM3aJJt0v/FUgdfs2XOFDja8hc+7C20H 5ztPJluCKvfPU88zEzwrMkWQMdDhFIn7CZyJjddr/6zU4JBEFzDwH6A8k/+hE9Kw nNkx2htz2HkW46U8f6nuG47ot3G5v90ntztVqwlPWS9OmCsq9TH2oaFQ9Fu9VqRw 81546gDaEW6FW4EBm/d0UXF3/zG0ddnp19FCoflVLpjfpJhhDcePPXpip0SlhG8= =P2A5 -----END PGP SIGNATURE----- --7eDIcNVIx9U8VmIiW83X24XGONA0TUhKX-- From owner-svn-src-all@freebsd.org Tue May 23 23:33:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11C17D798C6; Tue, 23 May 2017 23:33:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D187A1562; Tue, 23 May 2017 23:33:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id D3BC13067; Tue, 23 May 2017 23:33:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 187AF628F; Tue, 23 May 2017 23:33:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 5XmE4Ocyl3D8; Tue, 23 May 2017 23:33:06 +0000 (UTC) Subject: Re: svn commit: r318757 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 88219628A From: Bryan Drewery To: Larry Rosenman , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <145539DE-59B4-4F21-B699-877DED6A2D1C@lerctr.org> <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <1c1ab22c-60bf-4707-f635-8069aa1e0594@FreeBSD.org> Date: Tue, 23 May 2017 16:33:06 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sIw1a8MPU8obGIEqPMSjxuV84b026de6m" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 23:33:14 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sIw1a8MPU8obGIEqPMSjxuV84b026de6m Content-Type: multipart/mixed; boundary="8b3Tlc1Bt9VfscoFw6tX1N8B8aTeGubhr"; protected-headers="v1" From: Bryan Drewery To: Larry Rosenman , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" Message-ID: <1c1ab22c-60bf-4707-f635-8069aa1e0594@FreeBSD.org> Subject: Re: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <145539DE-59B4-4F21-B699-877DED6A2D1C@lerctr.org> <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> In-Reply-To: <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> --8b3Tlc1Bt9VfscoFw6tX1N8B8aTeGubhr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/23/2017 4:29 PM, Bryan Drewery wrote: > On 5/23/2017 4:24 PM, Larry Rosenman wrote: >> borg.lerctr.org /home/ler $ sudo poudriere jail -l >> JAILNAME VERSION ARCH METHOD TIMESTAMP = PATH >> p103amd64 10.3-RELEASE-p18 amd64 http 2017-04-23 08:3= 9:24 /usr/local/poudriere/jails/p103amd64 >> p103i386 10.3-RELEASE-p18 i386 http 2017-04-23 08:4= 0:44 /usr/local/poudriere/jails/p103i386 >> p110amd64 11.0-RELEASE-p10 amd64 http 2017-05-15 14:5= 4:58 /usr/local/poudriere/jails/p110amd64 >> p110i386 11.0-RELEASE-p9 i386 http 2017-04-23 08:4= 1:48 /usr/local/poudriere/jails/p110i386 >> live 12.0-CURRENT amd64 src=3D/usr/src 2017-05-23 13= :39:40 /usr/local/poudriere/jails/live >> pHEADamd64 12.0-CURRENT amd64 src=3D/usr/src 2017-04-24 17= :15:13 /usr/local/poudriere/jails/pHEADamd64 >> p120armv6 12.0-CURRENT r317340 arm.armv6 svn+https 2017-04-23 10:0= 7:40 /usr/local/poudriere/jails/p110borg.lerctr.org /usr/local/etc/poudri= ere.d/jails/live $ cat version >> 12.0-CURRENT >> borg.lerctr.org /usr/local/etc/poudriere.d/jails/live $armv6 >> borg.lerctr.org /home/ler $ >> >> >> borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $ c= at .jailversion >> 12.0-CURRENT >> borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $ >> >> >> >=20 > That looks like a bug in Poudriere with -m src. It is using 12.0-CURREN= T > rather than __FreeBSD_version of 1200031. I'm working on a fix. >=20 Usually Poudriere, for head, will rebuild if the SVN revision changes. It is very liberal with rebuilds on head and does not usually consider __FreeBSD_version since it can be forgotten, and historically was not always bumped on SA/EN either so we used the uname -r output. So this bug is limited to -m src|null|tar. --=20 Regards, Bryan Drewery --8b3Tlc1Bt9VfscoFw6tX1N8B8aTeGubhr-- --sIw1a8MPU8obGIEqPMSjxuV84b026de6m Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJZJMayAAoJEDXXcbtuRpfPcd0IAKm8P8McX5I9yUZbOWf8I4Ms cz9Uhts2sDuaiAD1pGRR3/POZmljGebUQks2eX6BVdUz0Uwol6APEs+TK1M8BXBW 3RtL5pXGbjK4fx88DOpRuuWyi8/jZtGmscf4P+miMWPEqE9N7PM1oW41yT13zxmg n67e8BDAbMQTelEd2DZGpHx9QiqZp66ilhUXbQamp709WIBgzDnvzw/JLlogo/ya DigzeoUSsnbznKilvdhQHfTZqYzOOcoYJX7sPcyoS+OG/xLcN9ZxKYoy6ZSeoQ5s ZFQgcFOKhBGUSZwC4Zi4e4e5m6Ruu614wdlbdygD29gmm0WCvfVz+/wSASdRgX0= =3K0J -----END PGP SIGNATURE----- --sIw1a8MPU8obGIEqPMSjxuV84b026de6m-- From owner-svn-src-all@freebsd.org Tue May 23 23:40:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0775ED79AD6; Tue, 23 May 2017 23:40:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 777AA19FA; Tue, 23 May 2017 23:40:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NNeH5a081290; Tue, 23 May 2017 23:40:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NNeHS0081287; Tue, 23 May 2017 23:40:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705232340.v4NNeHS0081287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 23 May 2017 23:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318762 - in head/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 23:40:19 -0000 Author: np Date: Tue May 23 23:40:17 2017 New Revision: 318762 URL: https://svnweb.freebsd.org/changeset/base/318762 Log: cxgbe(4): Update the T4, T5, and T6 firmwares to 1.16.45.0. The latest firmware has a number of link related fixes, support for a new custom card, and the fix for a bug that affected rate limiting on FreeBSD. Obtained from: Chelsio Communications MFC after: 1 week Sponsored by: Chelsio Communications Added: head/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu (contents, props changed) head/sys/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu (contents, props changed) head/sys/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu (contents, props changed) Deleted: head/sys/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu head/sys/dev/cxgbe/firmware/t5fw-1.16.26.0.bin.uu head/sys/dev/cxgbe/firmware/t6fw-1.16.26.0.bin.uu Modified: head/sys/conf/files head/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt head/sys/dev/cxgbe/firmware/t4fw_interface.h head/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt head/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt head/sys/modules/cxgbe/t4_firmware/Makefile head/sys/modules/cxgbe/t5_firmware/Makefile head/sys/modules/cxgbe/t6_firmware/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue May 23 22:34:18 2017 (r318761) +++ head/sys/conf/files Tue May 23 23:40:17 2017 (r318762) @@ -1376,7 +1376,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1400,7 +1400,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.16.26.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1424,7 +1424,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.16.26.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Added: head/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu Tue May 23 23:40:17 2017 (r318762) @@ -0,0 +1,9729 @@ +/*- + * Copyright (c) 2017 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +begin-base64 644 t4fw +AAAEOAEQLQAAAQkEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAABBsEKgQyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IFRodSBNYXkgIDQgMDk6 +Mjg6NDAgUERUIDIwMTcgb24gdm5jNC5hc2ljZGVzaWduZXJzLmNvbTovaG9tZS9maXJtd2FyZS9j +dnMvZnctcmVsZWFzZSksIFZlcnNpb24gVDR4eCAwMS4xMC4yZC4wMAAAAAAAAAAAAAAAAI/sRllg +AMgA4QB78AAQAADhADC4eP///x/84UCAAAAB4QB7cAAAEAAf//2M4QGUcCAAAADhAZwE4QB5AAAC +AEDhAHmAAAYAQAACAAoABgAK4QB5BAAMAACAAAEC4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAA +AAAAgADhAHsAAABAAeEAe5wAAEAAREREQuAAAADjAARzREREQOMACAAgAAJcAAAAAB//ktAAAAAA +H/+S1AAAAAAf/5LYAAAAAB//ktwf/8AAAAAAAAAAAADAABL/zRP/zZMgEv/NE//NhCAEMwGTIBH/ +zBL/zJIQEf/MEv/MkhAR/8wB9DER/8siCv+SEADkMQAFMQECABL/yALnMQIWABH/x4EQAQFfwCEC +EQHJERH/xBL/xJIQEf/EEv/EkhBgAA8R/78S/8OSEBH/vxL/wpIQgRAR/8HAIJIREv/AkhLAIJIT +Ev+/khCCEALyUGUv9xH/vccvkhAR/7ySEBL/vBP/vJMgwDKTIRP/u5MigiIS/7oT/7qTICMiIRT/ +uQQzAck4E/+4gzADgxQIMxEU/7akM5MhE/+qkyJgAAjCMJMhE/+nkyIS/7GQIJAhkCKQI5AkkCWQ +JpAnkCiQKZAqkCuQLJAtkC6QLyAmECAmEYIiEv+kwDAtNzAtNzQtNzgtNzwjPQFyM+0AAgAS/6HA +MC83AC83EC83IC83MCM9AXIz7QACABL/l8AwKDcwKDc0KDc4KDc8Iz0BcjPtEv+VwDAnNwAnNxAn +NyAnNzAjPQFyM+0S/5AV/5AW/5HAMNcgBWYBYAAZAAAAAAAAAAQ2BQACANMP0w8FMwxuOxQHRxQH +BEN2MeYENgUFMwxvO+0AAgAS/4MV/4EjCgACJwIHBEMEPgUFMwwHRxRvO/ADAgAS/33JLoMghCGF +IrwidDsOhlC0VZYwtDN0M/Rj/+YAZT/iZV/fEv9xwDIDLgUDAgAS/2jAMCg3QCg3RCg3SCg3TCM9 +AXIz7QACABL/ay0nAMARAUkxAEgxAQIAwAAU/2gE0jEV/2eUUBT/ZwTTMRX/ZpRQFP9mBNQxFf9m +lFAU/2UE1TEV/2WUUBD/ZQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+KQOMACfgf/4pAH/+KQOMAFDgf +/4pAH/+KQOMAFDgf/4pAH/+L4OMAFDgf/4vgH/+SzOMAFdgf/5LQH/+z8OMAHMgf/7PwH/+z8OMA +Pegf/8AAH//+eeMAPeggAAAAIAABauMAfGQgAAF4IAABfOMAfdAgAAF8IAABheMAfdQgAAGYIAAB +nOMAfeAgAAGcIAABpeMAfeQgAAG4IAABvOMAffAgAAG8IAABxeMAffQgAAHYIAAB2OMAfgAgAAHc +IAAB4uMAfgAgAAH4IAAB+OMAfgggAAH8IAAB/OMAfgggAAIYIAACGOMAfgggAAIcIAACHOMAfggg +AAI4IAACOOMAfgggAAI8IAACPOMAfgggAAJYIAACWOMAfgggAAJcIAACYuMAfgggAAJ4IAACeOMA +fhAgAAJ8IAACguMAfhAgAAKYIAH4+eMAfhggAwAAIAMVtOMCdHwgAxW0IAMVtOMCijAgAxW4IAbx +XOMCijQgBvFgIAb00OMGZdwgCAAAIAgOYOMGaUwgCA5gIAkpjuMGd6wgCSmQIAkqXOMHktwgCwAA +IAsAAOMHk6ggCwAAIAsAAOMHk6ggCwAAIAuiCOMHk6gAAAAAAAAAAAAAAAAgABOOIAATgCAAF2og +ABOAIAAW5SAAE4AgABQyIAAWfSAAFgIgABOAIAAVsSAAFWogABT9IAATbSAAFKcgABOAIAATgCAA +E4AgABRSAAAAAP///////w/8///w////APwgALC+IACyMiAAsmIgALIoIACx6SAAsd8gALGuIACx +pCAAsZggALFHIACyYCAAsT0gALENIACyYiAAsQMgALDxARAYAQAEAAAAAAAAAAAAAAAAAAoAAAAK +AAAAFAAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEA +AQACAAMABAAFAAYABwAIAAkACgAOABEAFQAZAB4AIwAtADwAUABkAMgBLAGQAfQAAAAAAAAAAAAA +AAAAAAAAAAAAAQABAAIAAgADAAMAAwADAAQABAAEAAQABAAFAAUABQAFAAUABQAGAAYABwAHAAAA +AgAAAAYAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKA +AAADgAAABQEAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAA +AcAAAAKAAAADgAD/AAECAgAAABAgQAAAAAAABAACAAEAAIAAQAAgABAACCBAgAAAAAAAAAAAAAAA +AAAgCKlYIAipWCAIqQsgCKjYIAiooCAIqFsgCKhbIAiqiCAIqoggCKhbIAiqiCAIqoggCKhbIAio +WyAIqAYgCKqIIAiqiCAIqoggCKqIIAiqiCAIqoggCKqIIAiqiCAIqoggCKqIIAiqiCAIqoggCKqI +IAiqiCAIqoggCKqIIAioNyADCtAAAAABIAMK2AAAAAIgAw8YAAAA/yADCDAAAAD/IAMKvAAAAAIg +AwrAAAAAAyADCsgAAAAHAAAAAAAAAAAgAwqgAAAAASADCqQAAAACIAMKrAAAAAQgAw8YAAAA/yAD +CDAAAAD/AAAAAAAAAAAgAwgwAAAAACADDxgAAAAAIAMJbAAAAAEgAwl0AAAABCADCXwAAAAIIAMJ +iAAAACAgAwmYAAAAQCADCaAAAACAIAMJqAAAAQAgAwmwAAACACADCcQAAAQAIAMJ2AAACAAgAwnw +AAAQACADCgQAACAAIAMKFAAAQAAgAwogAACAACADCjQAAQAAIAMKRAACAAAgAwpUABAAACADCmwA +IAAAIAMKhABAAAAgAwqMAIAAACADCVgAAAAQIAMJYAAAABEgAwlAAAAAACADCUQAAAABIAMJSAAA +AAIgAwlQAAAAAwAAAAAAAP//AAAAAAAA//8gAwjAAAABACADCMwAAACAIAMI3AAAAEAgAwjsAAAA +ICADCPwAAAAQIAMJDAAAAAggAwkYAAAABCADCSQAAAACIAMJMAAAAAEAAAAAAAAAAAAAAAEAAAAB +AAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEA +AAAHAAAABwAAAAYAAAAGAAw1AAAQRqoAFFhVABhqAAAAK2gAACODAAAYagAADQYAAAsqAAAAAAAA +AAAAAAAAAABoKwAAaCsAAGyCAABvnAAASmgAAEpoAABNKQAASmgAAE7qAABMmAAAUj0AAE+4AAGG +oAABhqAAAgjWAAII1gACCNUAAgjVAAKLCwACiwsAAgjVAAK2cgACtnIAAw1AAAQGBwAAAAAAAAAA +AAAAAAACAgUFCAgLCw4OEREUFBcXGhodHSAgIyMmJikpLCwvLzIyNTU4ODs7AAAAAAAAAAEDEREI +CBAJAwEAAAAAAAAgBMzkIAGy9CAAN0ggAYJQIAGvQCABqbQgAWM4IAQ5LB//6jwgAJyoIACzGB// +3RAgAGjgIABaQAAAAAAAAAAAIAGECCAAiLAAAAAAAAAAAB//1fQf/8V8H//ClB//wDAgAFVAIABI +nCAARcggAKgwH//j8CAGxCgAAAAAAAAAACAATFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +IAG6XCABmnggAL1gIAC8lB//8RAf/9CgH//MOCAAhiggBUzoIAEzqCABE6wgAPrYIADvSCAA4rQg +ANUsIADAQCAE0NggAybgIAEosCADVVggAea8IABooAAAAAAgAL3EIAXFxCAAsDAgAY0MIAACmCAA +ofAAAAAAAAAAAB//9FggAL18IAMpkAAAAAAAAAAAIAOnvCAAJ4wgAAlwIAAmiAAAAAAgADKAIAAw +GCAALUgAAAAAIAA3CCABLHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgADSk +IATMhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAA2SCADsJggADVYAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAN0ggAJogAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAgLAAAAIAMTCAgAAAAgAxMUCAAAACADEyAKAAAAIAMT +LAwAAAAgAxM4EgAAACADE0gNAAAAIAMTXA4AAAAgAxNsEwAAACADE3wKAAAAIAMTkA4AAAAgAxOc +GAAAACADE6wNAAAAIAMTyA4AAAAgAxPYEAAAACADE+gSAAAAIAMT/A4AAAAgAxQQEAAAACADFCAR +AAAAIAMUNAoAAAAgAxRICwAAACADFFQNAAAAIAMUYBQAAAAgAxRwCgAAACADFIgPAAAAIAMUlAYA +AAAgAxSkBgAAACADFKwGAAAAIAMUtAYAAAAgAxS8BgAAACADFMQJAAAAIAMUzAYAAAAgAxTYBAAA +ACADFOAGAAAAIAMU6AsAAAAgAxTwCwAAACADFPwEAAAAIAMU4AQAAAAgAxUICQAAACADFRAJAAAA +IAMVHAAAAAAAAAAADQAAACADFSgKAAAAIAMVOAYAAAAgAxVEAgAAACADFUwDAAAAIAMO7AEAAAAg +AxVQAAAAAAAAAADXaqR46Me3ViQgcNvBvc7u9XwPr0eHxiqoMEYT/UaVAWmAmNiLRPev//9bsYlc +175rkBEi/Zhxk6Z5Q45JtAgh9h4lYsBAs0AmXlpR6bbHqtYvEF0CRBRT2KHmgefT+8gh4c3mwzcH +1vTVDYdFWhTtqePpBfzvo/hnbwLZjSpMiv/6OUKHcfaBbZ1hIv3lOAykvupES97Pqfa7S2C+v7xw +KJt+xuqhJ/rU7zCFBIgdBdnU0Dnm25nlH6J8+MSsVmX0KSJEQyr/l6uUI6f8k6A5ZVtZw48MzJL/ +7/R9hYRd0W+ofk/+LObgowFDFE4IEaH3U36CvTryNSrX0rvrhtORBwwRFgcMERYHDBEWBwwRFgUJ +DhQFCQ4UBQkOFAUJDhQECxAXBAsQFwQLEBcECxAXBgoPFQYKDxUGCg8VBgoPFR//wAAABAAgIAb0 +0CAG+YAf/N4AIAb1IB//rBQf/60kH/+wkAOAAACBAAAAH/+wgAD/+AABAAAAABAAAIEEAQCBBAAA +AQQAAAEEAQCAAAAAAAX//x//hTAGAAAAKgAAAB//z/ggBExcAgAAAIAQAABBQAAAQUABAIMAAAH/ +/7//v////x//mMwEAAAIIAMNCIGAAAAMAAAAH/+TIP//AAD//wD/AAEAAAAA//8f/7GAH/+oxA// +/////9Bk///TYB//Zowf/ODoIAbyrP//vvQf/2aAH/9nBP//wWAf/63cH/+e1B/84gAAAAi44P/+ +AOEBkgAf/5lAAP///x//nXQf/638BEEACAQBAAilAAAAwAAAAMAEAAAwAAAAH/+ugAAAHUAAAP+A +IAbxYCALYiDhAC4AH/+udB//qjwf/68wH/+qoAAAF4DgAACg4QAwuAAAgADhAGAQAABAAOECEADh +AjAA4QJQAOECcADhABAIH/zhQOEAe3Af/7OwH/+zqB/84Agf/7OsH/+zyB//s8Af/7PEH/+z4B// +s9gf/7PcIAb1IB//sYAf/6wUH/zeAB//rSQf/60gH/+twB//nYQf/7DMH/+qJCALAGAf/69MAAD/ +gAAAHiAf/5MgH/+vWB//r1Qf/6+4IAsGcAQAAAgFAAAAg/8AAIEAAAAAEAAAKgAAACAACbQgAwwo +H/+JgB//hTAf/4c0H/+wkGdFIwHvzauJmLrc/hAyVHYf/4AAAAA/KCADDuzP////IAsHYBAAAAA/ +////AgAAAEAAAAD//3//IAsIgB//sIAgACPAIAsIsCALCSAIAAAAAP///yALCZD3////IAsLgCAA +IGj//v//IAsWoIAAAAAgAw0ADAAAAAAAQAAAAP//AACAAP/7//8P9oAAIAsaECALGkAAAQAAAAQA +ACALeNAf/63QIAAygCAANGAgADAYIAsa0CAALUggCxtgIAsbsCALHEAEAQAI4AAAACALHMAgCxyA +UwAAACALHOBSAAAAIAsdIFEAAAAgAe/sH/+qkCALH7AgCyAQIAsf4CALIpAf/638IAsi4B//nXwf +/62gIAsk0BQAAACAAAACfFAAAIAAABCAAAAGgACwAAAACgAA/zSS///wD4AAsQDhAZoAAAIAACAL +JJAf/5r0AAB+QB//rdQA/8AAH/+t4B//k6QBAAAAKAAAACYAAAAgCyUAH/+T4AYAAAAFgAAAH/+p +6CsAAAAgAE+4IAt7gB//q4QDgAAAB////zUAAAADAAAAAD///4BAAAAID///H////yAAAAAAAMAA +H/+tuD0AAAAf/5lsBwAAAIEEAQCBBAAAH/+sAAAAOpjDAAAAAAAP/wBDAAAAAAgABAAAAB//q7wg +C3vgH/+zJB//saAf/5jMAAYAAOEAegAf/5k8H/+txCCgAAAf/6wYH/+djB//nXggC3wQAAMHgCAL +fIAf/5tYACAAAABAAAAAAAkAAAAwAv/8+H/AAAAAo/+7AKP/ugANAAAA4AMAAIP/tgAP////D//4 +AP8AAAAgC3zAIAsmYCALJpAgC31QAA8AAAAKAAD//wAPA//AAIP/wAAgC33QIAt+QB//rqAf/7IQ +/2DwAB//sfAf/5LgBIAACB//gFAARAAA/x///wDAAAABgMIAAACBAPAAAACBgAAA/3///x/84HQf +/6jE/7//////AAAAgAAAAACG3R//nswf/OIAH/+T0O4AAAAAAAm8H/ziDA8AAAAgCybQH/+uQAAA +CLwf/69EH/+fSB//mWgf/4BgIAbzAAAAMAAAACcQH//cgCALhKAgC4RwH/+upB//mWAAAP/+H/+d +bN6tvu8gAwfgNAAAAD8AAAAf/69gAACJBgCZAAAf/7DoEAAHAgHAgACZAAAAH/+v0ACIAAiCgAAB +H/+xOP//8AADFQAAAxEAAAAPA/8gCyzgH/+tpCALhPAgCy1AIAstkCALLiAgCy0QIADp7CALLfAg +Cy/AIAsv8CALMEAgCzCgIADvkCkAAAAAAIkUIAD19CALhWAgC4XAIAD/6B//rvDw8PDw/wD/AKqq +qqrMzMzMH/+yMAAAHxAf/7A4AAP//wAAJ/8gAQhoIAuGMAAPQkAgA1x4H/+ueAAJAAAAAEgAggAA +ACABLHggC4agH/+uJDsAAAgOAAAA0AAAAB//gKAAAB/KAAAIUAAAH0AgCznwIAs6ECALOjAACQAI +H/+xNDAAAAD///f/IAs8gCADYsQAAIP/IAb4SBWgAAAgBvlAH/+w+B//rcwAAAgGAACIzH8AAAAA +AA/+IAuLYCALi/AAAOAAIAuJQCALi8Af/5sMAAQD/woAAAAgBvWYH/+tkCAG9eAf/54gg/+3AIP/ +tiAgCzyw4QAAADMAAAAf/7EAH/+x9AP/4AB///8AAD/2kAAAH9gD//AAIAtnoCALZ2AgC2fAH/+z +ACALPTAaAAAAIAs9gCABepgf/7D8AA///x//ryAf/63cIAuMgB//nawf/6o8H/+sMCAAbQggBvKI +IAAFiB//qSAf/5qIH/+ZCB//qpggC0CQwAQAAB//rCQf/6w8H/+x4B//sVQgC42QIAtA0CADDbAg +AG3o4AEAAB//ntAgC47gIAtBECAArQgf/57IIACqCCALjmAgC46wH/+bLCALQyDg//4AIAtqQB// +ntQgC07AH/+t2B//lVwgC1jgIAtZcB//saQgC1mAIAtZsEgAAAAgAcIwH/+rlCABxDQf/5m8H/+p +NB//qVwAABgwAAAWPB//rGQgBvUUH/+p5B//mUDhAC4AH/+scOEAXgDhAg4A//+//+EADgDhAY4A +//++/x//nXQf/6psIAHJYCAB1YjgBQAAA/8AAB//qaQgAw0IH/y//zwAAAAABf//gwAAAB//qTwg +AeuAIAtl4B//rrQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYAAAAAAAAD/////////////////////H//8 +gB///IAf//xIH//8SB///Egf//xIH//10B//+Pgf//dUH//3VB//91QgBsYYAAAAAAAAAAAAAAAA +AAAAACAGyWAgBslgAAAAAAAAAAAAAAAAAAAAACAGxhggBsYYH//57B//+ewf//nsH//57B//+ewf +//nsAAAAACAByngAAAAAAAAAAAAAAAAAAAAAAgEAAAAAAAAAAAAAAAAAAAQAAAAAAAAAgYAAAAAA +ABAFAAAAAAAABAAAAAAAAAAAAAAAAAAAAACBAAAAAAAAGAUAAACAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAgCgAR8o8T8o/TDwPmMQECABbyjRfyjndrBpBgtGZ3Y/hUDzFVzCAPFABj//kAAABsEAgoIAUn +IAcpMQX4IIYV4BlFAPkADoVhdwEAiiIW8oD95QAF4AyVAPFXvA3gD6UA6vJ9G8cCgACmiCuCngp5 +CimSv/1gDYOiAJ0AKIKdCYgB6BYFJA1RgAAo0gj3AA2okgCdACtiruzycRWKuYAAKmKtLMJ/7KsB +BHP9AAD9QAoeIgCdAC7WCP1ACh4iAJ0ALyAUpP8PD0cvJBT14Axd0gCdABnyYy4iFiwhKYgVH/Jh +rsyfgOoiHi5nwoAA/QBmFaANJQD9AEYV4AtlAO3yWh1WAoAAC6oCixSagekAFQRAQQAAiRUIAIoo +PBD9IMYV4EwFAP0g5hWgDEUA7Ls2BMiBAABtuQUIAIYJAmHu8ksVoIeAAIgV7gAFDc8CgACpiOiM +ICWkNQAAC8kMbZkCCAJhLSEp0w/qISgm6AUAAA0NTy0lKf1AB3RiAJ0A/+R4BeAMFQD6IKgV4B7l +AOoiHi7NQoAA+CAmFeAIBQD4IAYVoA0FAOgWAiXZgQAAWIZM/uAAFzfFAQD3wABHMA2VAO3mnSgE +CoAA+YAFWVIAnQDAINEPAAAA6iQACdgEgADsRAAK6ASAAFiINdKg0Q8AAAAAwLAPiTTp1ggt9i4A +APpAaB2gG8UA/AACHaANFQBYjPlj/8EAAOokAArYBIAAWInO0qDRDwD/+VgNoAgFAOokAAPYYQAA +/AACHaANlQBYjO1j/5HAoFnFlh3yAojY+R/yCJAPpQBj/6TaIFgLjGP+cAAAAAAA/AACHeAKBQD6 +RSQdr/wqAIon60QACmgEgAD7RAAVoAwFAFiBxdKg0Q8AAABsEAYuIhCUEeUhGirQBIAAJiAH9kEo +FeAfxQDqFgAqx8KAAP8CUg3hZgEABwlC8SBwDeKFAQBkgfLU8CkgBfxASBWgG4UA/p4ADbAaRQD7 +IA+VIgCdAOXx2R4L1gAA5/HZG08CgAD0wAwSEgCdAKWZLZKe96AR61IAnQApkp0Hagoqor8KmQHu +lAAEjkmAAIwpiyoMBz4Muwz3YAkD4gCdACogTi0gTLGo+6AN7CALFQAoJE4qMAEpIhjzQA32kgCd +ACsgBy0hJPhgJBWgDFUA/UAEBTC7EQDgqhEN2oKAAAuqAhvxvwqIAiohBywhCQvdAvsGAAx6qgEA +6/G6HVMCgAAKzAIqISKY4IggnOOd5AuqApri/QAAFDAKZQAKiAKY4S0iEJ3lLCA4G/Gv+AAiHaBN +FQD5wSYVoMwZAAzYOR3xq5ToDL05+aYADrALBQCb5xjxnp3m7fGfFOAFAAAsJhib65nq6AAVB0jB +AAAJAIrt5g4hyEEAAO/mDyd5AQAACSCGDwJjCQCGDwJhDG4Rpe7q5p0jgLGAAIgpLyA4p4goJgnz +4AgXkgCdAIkQCQlH+SAHAVIAnQDAINEPnhLqJAAL2ASAAFiKpI4S/00QDeAfxQDsEgEpUASAAO0S +ACnYBIAAWIeR0qDRDwAe8XWK6PdABjiSAJ0ADGkRpZkrkp73YAaLUgCdACmSnQdrCiuyvwuZAWSQ +v7CsnOjulAAM834AAGAALAAAAAAA89/wSFIAnQAJVAz0nQAVr/gCAAAAAAAA6xIAKVAEgABYiR7S +oNEPAOokAANYYQAA/AAiHaANZQBYjD9j/2mNIsDkDt0C/EBGFe/9fgAAAAD4Q6gVpNkBAADRBAC8 +GgyIAvhDphWv+MYAiieNEcDA6qwgLtgEgABYgRrSoNEP2iBYhydj/vkAAP/3PA2gCQUAwKBZxNQe +8T+K6Plf+XiQH8UA//0oDaAJBQDAkMC6C6s0+8EGFe/87gAAAABsEA6VHCgiEC4iCSchNSkgByMW +DioyAv5giBXgDRUA/GBoHae1AQDjIRol2/kAAAvbOfohphXhmQEA5/82CbfCgAD+wlIN46oBAA4O +QvHAcA3i0wEAZNRjJiAFwej5/gAPMBdFAPbAJB1iAJ0AhyKLHvTl/A3gDoUAK7ABnxHzYCEnEgCd +AJkQmRqaFBjxEu3xExIoDQAA5RYLLK8CgADoVQgM34KAAK276xYJInAFAACJGp4YjRv1IAaqEgCd +ACtSnoYZ/WAKI+IAnQAvUp0mYr8G/wFk9DkZ8QCJmPcgCZiSAJ0AKoKuZKFSGvD9I4KtKqJ/HfD5 +CjsB6xYFJNv9AAD6YAnmIgCdAJvY+mAfZiIAnQCHKYYqDAM+B2YM8sAJq+IAnQApGgDzIjIN4Pr1 +ACsgFpwT+2AJ/SIAnQCLEYbDKiA49+DmFaAGBQD34SYVoEcFAPvhBhXgqhkACnY5F/DrlhYtIhcW +8Oid+i0iG537icQKdjmWF/lgEUriAJ0Ahh2eH+wWAyMN2YAAYAEIGfDSiZhqkS6LGypSno8Ze6NL +LVKdL/K/D90BnRWGFevwyhTT/QAA72QAAwHpgACauGX/E2ADSp4f/CBmFaAKBQBZxFUZ8MGJmBjw +vowT7hIPJI7bAAD//1wNoA8FAMCg+iCmFa/+5gAd8LjAugubNPuhBhXv/vYAAAAAAP/7FA2gDwUA +nh8vFhD8IGYVoAoFAFnEQRnwrYwTLxIQiZiOHxjwqfk/9XCSAJ0AYAK9wKCaFYsVFvClwNoNnTTt +Zggt9iYAAGACpJ4fLxYQnBPqJAAJ2ASAAFiJwowTLxIQ7hIPJXWhgABgAlqeHy8WEPpA8BWgDAUA +WImbjBMvEhDuEg8tdWYAAGADx44XixOIFIwR9iDIFa+KBQAqJDsMmQwIZgKZtKzYBu4CLSIQ6CYb +KVAEgABYiEiOH4wTGPCC+rOmFaEJBQBzmw0rIBYqCv/7YARNIgCdAIopKyA4DwIAo6rqJgkoBAqA +APNgBD+SAJ0AJiE1L8IEKyEaKSIQ5v82De/CgAB/2wsKCkJkoAULDUJk0HP+ICYV4B2FAPn+AA7w +ChUA+iGmFaAGNQD2IYYVr/XGAIonLxYQix7qrCAqYASAAFiE2C8SEJoTLSIb+UCIFe/83gAAAAAA +AADqIAcp4ASAAFiJNRjwV4wT/iHoFa/9ngDaIFiGNxjwUowTjh/6QSgVr/22AHGeiAq/DP/9ABXv +/goAixSKFi0iEBnwWAuqAhvwWApoAoYdGvBPCYgC6fBOGws+AAAjFhElFhImIAeFwCMhB/ZBJBXg +ZhEA61UBCzKCgAD2pgAKujMBAOYhIimbAoAAA3cCClUCIyEkCWYClfCFIJfzlvL94KYV45gBAOj2 +BizKAoAACTkC4xIRIlP5AADp9gQqrgKAAOXlAgZAgQAA5fYBJ8jBAADlEhIiFDUAAG2pBQgAhgkC +YSYgFKRmBgZHJiQU9MAINdIAnQCIGPizphWhBwUA8uHyDeD59QArIBb5YAjNYgCdACoiF7Gq6iYX +IYCpgACMKSsgOKPMnCnzYAefkgCdAI0dZdDPwCDRDy8gTmT72Q54AvhARhWgAIYAAAAAAADzH9zA +UgCdAA4/DP/9ABXv7jYAAAAAAADrEg4pUASAAO0SDCpgBIAAWIYX0qDRDwDrEgwpUASAAFiHutKg +0Q8A+kBoHaAbxQD8ACIdoA0VAFiK22P/wYsQ+kBoHaAMFQDtEgsl2GEAAFiK1WP/qQAAJiA7ZGBx +6iQADlgEgAD8ICgVr4kFAOkkOyxwBIAAWIen+iEGFaALBQArJhv6R2Yd7/vOAAAAAADrEgUpUASA +AFgJaWP+74on60QACmgEgAD7RAAVoAwFAFh/p9Kg0Q8A2iBYhbVj/wjqIAcp4ASAAFiIq2P+3AAA +JyEJJRYSIxYRJBYTJiAHhMAjIST0QOQV4GYRAOtEAQsygoAABkQCCkQC9kREFaq1AQDrIgct0wKA +AAp3AglmAiqxFZoSlPCFIJfzlvL94KYV40gBAOj2BioiAoAABDMC4/YEJdiBAAD0ImgVr8MFAAO7 +ASMSEeupCAquAoAABeUC5fYBJmCBAADlEhIkyQEAAOnLQ35ABIAALUz+DNYRpobmkzt34MEAAPSf +7/ESAJ0AbdkFCACGDAJhY/3tixD6QGgdoAwVAPtiQBXgDQUAWIqCY/5aAAAA+48ADD/+9gAInQwN +SRRtmQUIIIYMAmPv2ggFwQEAAOlMDAVIwQAA9Z/tQRIAnQArzP5tuQUIQIYJAmVj/ZQAAGwQBigg +BRzvhfffBgXgGkUA+wAKnSIAnQArIE6JyLC7KyRO9yAIyJIAnQAucq7t730XEXGAACtyrS3Sfw27 +Aea0AAWRKYAAsJ7uxggliDmAAC8gFLP/Dw9HLyQU9eAQxdIAnQAuIHP4Q6gV7/r1APvABADQCxUA +4LgaB2gFAAD7FwANNN0BAC0kcwmIAQi4OQqZAekmHSwHDgAAiiJ8pwQoIE7Jj32nCCsgTCkgTnuT +FMxsLCAU7SICLlgcAABk0cnAINEPAI4nx/MPrwHvJgInUMEAAFh2pOPvYRUBOYAAKKAA0w/TDwOI +CiiCEOygBy1YBIAA+kBoHaANRQALgABlr9yJJ9MPZJ+mKpkUyqeKmWSvnCigAAOICiiCEOygBy1Y +BIAA+kBoHaANNQALgABlr+Bj/3oAAP//VA2gCgUAwKBZwsoc7zWJyPk/9uiSAJ0AwGApIBSzmfhC +hh3v/B4AAAAAAAAAAOokAArYBIAAWIbs0qDRDwAqIAUrIAfB1P1ADmVhuwEABQVH+KAOeVIAnQCT +EI02nRLt7yEdmASAAPVgCYoSAJ0ADLoRp6ouop73wA2c0gCdACqinQ28CizCvwyqAWShPfpACBXg +DBUAWCJ/He8VKSEJGO8VKyEiLyAHHu8fLCEk+WYADbD/EQDoEgIv+oKAAA/MAg7MAiymAI4gm6L5 +QKYVoA8lAOmmAy92AoAAD+4C/0AmFaAJBQDtABUFUGEAALGZ6oMeDI/oAAAMORH3IABE8AilACiW +nfS/8rkSAJ0AiifrRAAKaASAAPtEABWgDAUAWH7DY/46//dsDaALBQDAugubNOvGCCtvBgAAY/7b +6iQAC1gEgABYCHX93cwFr/d2AIonwLD7RAAVoAwVAFiHcBnu8pmg/kAIFaAbxQD53eAFoAwVAPlA +RhWgDRUA/cAAFzAIFQDo7gINeASAAO72ASlQBIAAWIm8wCDRD4nI9yAEoJIAnQAMOhGnqi6invfA +BVTSAJ0AKqKdDT4KLuK/DqoBZKCYsJ+fyGWuwYgi6xYBJAThgAD4v+w5UgCdAIonKwoA+0QAFaAM +FQBYgzSLEB7uzp6gjCAd7s6dov2AABYwDRUADcwCnKGLtvtAZhXv9UoAAAAA61QACVAEgABYhnJj +/TyPM/4gRhXv+NYA//lkDaAKBQD6ICYV4AoFAFnCPBzuqInIixEd7qf5P/q4kgCdAP/9yA2gCgUA +AMCgwIoImDT5gQYVr/2KAAAAAOokAAXYYQAA/AAiHaANpQBYiYFj/1EAAGwQBCggFO+LHmoYBIAA +iif6YGgd4AwFAOqsICnoBIAAWH5h0qDRDwCLInO+SxTui4pIaqFHG+6ILLKuyscd7okssq0t0n8N +ywF9wBuwrp5IfcAhLyAU7yQUL9rQAADaIFgIDWP/p8CwwIoIqDToRggt/xYAAIkiyZXAINEPwKBZ +wguKSGuhrWP/6gAAAAAAAPpAaB2gG8UA/AAiHaANFQBYiVfAINEPAGwQCCwiDy8gByghNCcyB/5D +RBWn1QEA+b/AFeALFQDpuTkJsASAAOsiCSpQBIAA+CCGFeAEFQDodzYPT8KAAPciUg3h/wEACwlC +8SBwDeKOAQBkgnLBtOx7Hw6UdAAALCBP6SBNJmAFAAAMDEcsJE/9IBSjogCdACwgBfuAEv1iAJ0A +jSL6IAYVr/s1AP1gDljiAJ0AKCIZjjL5wBTVIgCdAIk4GO5HHO5E5JJib9+CgACaEJgRrLvo7j4V +SA0AAJkT6xYCL6cCgACoRPXgDSISAJ0AixMqQp77QBsb4gCdAIoSKUKd0w8qor8KmQHulAAEknGA +AIwpiyoMBT7TDwy7DPVgCdviAJ0ALRoA9aHyDeD49QArIBb5YBl1IgCdACwhIhnuOSghByohJCsh +CfxA8BXqiAEA6aoCDEMCgAAIuwIZ7jIY7iMNLUDpzAIO6oKAAAjdAp3giSCc4prk+8BmFeAKVQDr +7ioczgKAAAqZApnhiC+Y5SwgOPfBBhXgDQUA/cDmFeAKJQD93EQF4EklAPjAiBWgzBkADJo5mOkM +2zmNZZ3qHe4c/MDIFaAJBQDs5gsjh+GAAAqcEA3MApzsjBGJaJfvme6IaSjmEI1qLeYR7AAVB0kh +AAAJAIqIZ/jgC6OiAJ0AH+4BCr0CD90CnebAxfyTphWhCQUA9SHyDeD49QArIBb5YBOlIgCdACwi +GYopKyBPKSA45aoIBmAFAADsJhkl2/0AACskT5op8yAPj5IAnQCLFGWx78Ag0Q+fFZ8WnhfqJAAK +2ASAAFiG/44X7xIFJXWRgACMFGXP24on2zDsEgAlUMEAAFiCDsAg0Q8a7dCKqPdAEIiSAJ0AjBMr +Qp79YBFDogCdAIsSKUKdK7K/He3HC5kB5JIUZWP9AACc2O6UAAzyZgAAYACOKCA58R/4DhIAnQD/ +++QNoAkVAAAAAADzn+xIUgCdAAnnDPb9gBXv9foAAAAAwbN7yRQpIDqaEP4gxhXgDPUA/SAQ/SIA +nQDqJAAK2ASAAFiFbtKg0Q8A8AAYDaAa1QDAoYw3KyEJjTiOMuuvEQ3dAoAAD7sC5LsCCVAEgABY +hVLAINEPAAAA//9YDaAahQDqJAAH2GEAAPwgaBXgDBUAWIiBY/8FAAAKuAKY5sDV/JOmFeEMBQB1 +yw0rIBYpCv/5YA41YgCdAIoUZKFdi2qMZ4ppq3sHzAycZ/dg0g3gDgUAsaqMZZtqi2aaaazqq3t3 +uwGxqo4pm2aaZS0gOKXuninzoAo3kgCdAIknKJkUyoKLmcm+Ge2LKLAAnxWfFgmICiiCECywB/pA +aB2gDTUAC4AAjxWLIsej+1/ygOIAnQAoITSHZy4hGooviynodzYPZ8KAAHfLCgsJQsiUDgtCZLC0 +wdT6/gAOsAwVAPwghhWv8q4A2iBYg0Zj/gqKJ+qsMCtYBIAAWG2D0qDRDwAA//KoDaAJBQAAAJ8V +nxaeF/pA8BWgDAUAWIZdjhfvEgUtZf4AAOokAAfYSQAA/AAiHaANBQBYiDhj/eAAAAAAAOogByrg +BIAAWIYnY/2BnxX+IMYV4AoFAFnA2hrtRoqojxX5X+7YkgCdAP/34A2gCQUAwJAc7UDAugurNPuB +BhXv95oAAAAAAPNf+jhSAJ0ACecM9v2AFe/88gCKJ58V7xYGKdgEgADsEgAlUMEAAFiBbtag/iCo +Fe/6FgCfFe8WBilQBIAAWIMO/iCoFe/6tgAAAMFT+kBoHaALBQD8AAIdoA01AFh7mysgBY8WihD1 +f9qFYgCdAGP9IZ8VnxbqIAcq4ASAAFiF+P4gqBXv+K4AAAAAbBAOkxyVGogviikuIRonITQvMgT4 +QPAV57UBAPt/wBXgDRUAC9s56xYLKeAEgAD34QAP8ZkBAOcgBS83woAA/sHyDeKqAQDxQHAN4m4B +AGRkQcGkCPqN+uAjTSIAnQCOIosc9cRcDeAKhQArsAGfEvNgIFcSAJ0AmRHo7PgSWA0AAJsZG+z4 +6RYILK8CgADoVQgM14KAAKuq6hYHInAFAACGGJ4Wixn0wAXqEgCdACpSnoYX+0AJY+IAnQAvUp0m +Yr8G/wFk9CEZ7OaJmPcgCOCSAJ0AKoKuZKE5GuzjI4KtKqJ/HezfCjsB6xYDJNv9AAD6YAkeIgCd +AJvY+mAepiIAnQCHKYYqDAM+B2YM8sAI4+IAnQApGgDzIjIN4Pr1ACsgFpwQ+2AJJSIAnQAb7OQp +IDj72cQFoAYFAPfg5hWgRwUA/YCIFeCZGQAJdjkJujmLEpoUlhX9YBHS4gCdAIYbZGHTYAEDGey+ +iZhqkS6LGSpSno8Xe6NLLVKdL/K/D90BnROGE+vsthTT/QAA72QAAwHpgACauGX/K2ADSp4d/CAG +FaAKBQBZwEEZ7K2JmIwQGOyq7hINJI7bAAD//1wNoA8FAMCg+iBmFa/+5gAd7KTAugubNPuhBhXv +/vYAAAAAAP/7dA2gDwUAAJ4dnx78IAYVoAoFAFnALRnsmYwQjx6JmI4dGOyV+T/2OJIAnQBgAr7A +oJoTixMW7JHA2g2dNO1mCC327gAAYAKlnh2fHpwQ6iQACdgEgABYha6MEI8e7hINJXZ5gABgAl2e +HZ8e+kDwFaAMBQBYhYiMEI8e7hINLXZOAABgA8ScEP4hphWviQUA6SQ7JjhBAAAHAIbnEgInsIEA +AAYCYY3Hl/iKxInGrX0HqgyaxHfbCZ4d7BYAJMgFAACMEosQhhWOFJm2nbcG7gLtIg8pUASAAFiE +LI4dGOxmjBD6s6YVoQcFAHN7CCsgFikK/3m5foopKyA4o6rqJgkoBAqAAPNgBCeSAJ0AJiE0j8Qr +IRqJL+b/Ng3vwoAAf9sKCgpCyKQLDUJk0HP+IEYV4B1FAPn+AA7wChUA+iFmFaAGNQD2IUYVr/XG +AAAAAAAAnh2KJ58eixzqrCAqYASAAFiAvO8SDi1gBIAA/iGoFa/8UgDqIAcp4ASAAFiFG4wQGOw8 +/iGoFa/9tgDaIFiCHYwQGOw4jh36QSgVr/3CAHGeiAq/DP/9gBXv/goAF+w6G+w6Hew/BqkChhsa +7D7tmQIGQEEAAOVhVGfogQAAJRYQkx8lIAeDwAUlQOozAQqqgoAABTMCBzMCJyEHKiEiJiEJ9EHo +Fep3AQDrqgILuwKAAAdmAichJJPwgyCW85n2mvL14KYV46kBAOUSEC1SAoAACncC5/YEKZ4CgAAD +4wLj9gEiU/0AAOMSDyIMNQAAbakFCACGDQJhJiAUpGYGBkcmJBT0wAgd0gCdAIgW+LOmFaEHBQDy +4fIN4Pn1ACsgFvlgCLViAJ0AyD+LKSogOKO7mynzQAffkgCdAIwbZcDXwCDRDy0gTmTb8wroAvhA +RhWgAIYAAAAAAADzH93QUgCdAArvDP/9gBXv7r4AAAAAAADrEgwpUASAAO0SCipgBIAAWIID0qDR +DwDrEgopUASAAFiDptKg0Q8A+kBoHaAbxQD8ACIdoA0VAFiGx2P/wYsR+kBoHaAMFQDtEgkl2GEA +AFiGwWP/qQAAAAAAJiA7ZGB3K/qAKyQ77BICLlgEgAAIIIYNAmPs9ggs8ASAAO0iDylQBIAAWIOP ++iDGFaAMBQD8R2Ydr/vKAOsSAylQBIAAWAVTY/7yiifrRAAKaASAAPtEABWgDAUAWHuR0qDRDwDa +IFiBn2P/AOogByngBIAAWISVY/7fAAAAJyEHJBYRJiAHhMCTH/JERBXgZhEA6kQBCzKCgAAGRAIW +67YsISSKJwZEAiYhCfpmAAn6dwEA66EVK7sCgAAHZgKHL5TwhCCX9ZPy9+BmFaM5AQDp9gYpmgKA +AAPMAuMSDyomAoAABOQC7PYEJVCBAAD14CYVr8wFAAyqAaq85BIRJmEBAADsiz18SASAALBIDIYR +ppZ2wzb0n/CIkgCdAG2JBQlAhg0CZWP+AIsR+kBoHaAMFQD7YkAV4A0FAFiGcGP+YgAAAPsPAAz/ +/w4ACcwMDEgUbYkFCWCGDQJn780IBUkBAADoTAwGwIEAAPWf7diSAJ0AsM5t6QUJgIYIAmlj/agA +AABsEAYoIAUjIAckCgP9D0BEUTMBACggImSAbwIqAlh5VP1MwIDQDRUALCAhGOtpDwIA7DMRBn1W +gACoMykyng8CAG6TRSsynWSwP/pACBWg/uUADs4B/cYADvAPBQD8RCYd4AkFAPggBhXgDAUA+CAm +FeAOlQD4IEYV4A0FAFh/ePRzphWgAgUA0Q/AINEPAABsEAoqIAX4QPAV4AwVAPhgaB2ntQEA6BYA +Jdv5AADryzkKGASAAOsWBSwgBIAA/UHABFGZAQDBw/1AICUiAJ0AjSLv60EenBYAAOvrPRGwEQAA +5hYELPeCgACv7u4WAyzXAoAAq6rqFgcswASAAIcX9QAEIhIAnQCKFCdynoYTjxf64AdbogCdACZi +vy/ynQb/Ae8WBieaEYAAJSEbikKHKYYqBaU29U8ADnELBQB8swHVoJgaB2YM9MAF4+IAnQAqGgD1 +QjIN4Pz1ACsgFpga/WAF/SIAnQCKQvqgDnqiAJ0AjBUb6zKHQ5ga63cBBgj5gABgALYAABrrE4qo +6BYKJQzfgACLF4wUhhMrsp6PFyZiv3yzQy/ynRzrCgb/AeTwOWVb/QAAm8jvFgYv+24AAGACowAA +AAD4IWYV4AoFAFm+lBrrAIqoiRvoEgolDt8AAP//TA2gDwUAwPAc6vrAugurNPuBBhXv/wYAAAAA +AP/8eA2gDwUAmRvqJAAK2ASAAFiEFokb6BIKJXmpgABgAjUAmRv6QPAVoAwFAFiD8Ikb6BIKLXmW +AABgAxrw4ASIUgCdAC0hGowplxj4IUYVou0BAOkWCy8EFgAAlxj4IUYVouwBAOkWCycDgYAAmBrp +Fgsu/8KAAHX7Xg7VDPnV4AWgt+kA5kIDLdyCgAALeQKZGAhmAfaAZhWgAQIAiieZGysSAOqsICng +BIAAWH9AiRv4IUgVoAslAOukAi0gBIAA6qICKAQKgADy//u4UgCdAIwplxiYGpkbjhiPFuWtDApY +BIAA5cwICVAEgADtRgIq6ASAAOwmCSngBIAAWH9biBqJG48X+/OmFaEOBQB16wgrIBYmCv92uQzA +ofogphWv93YAAAAA6iAHKuAEgABYg4WJG/ghSBWv/4oAjykY6sGJFqX/nymMQ4tAjRXnxAAEyIEA +APwOAAU36wEA7hYBLojmAAAnIAcHB0EIdwoncp/urRANU8KAAO2qAgJAQQAA6ncBAdP9AADnxwIB +jD0AAG2pBQgAhgkCYYtAwICYEhnqrBrqqy8hGoYWHuqoJCEHGOql/CAoFaHXMQD/oABGukQBAO3Q +gConAoAA7MwPJnBBAAD4hgAKNMwdAORmACZgBQAADDwMFOqADV0M6CIAL/oCgACfZpdnnmOdZQyk +OQmJAulmBCxGAoAA5GYCIdAFAAAIqAKYYSYgFONmCA0gBIAA5iQUKAQKgADzYAQakgCdAIgX9ROm +FaEHBQD04fIN4Pn1ACsgFvlgBR1iAJ0AiBLSgNEPAIoVZKCjwCDRDwAAAAAAAADqJAAE2GEAAPwg +iBXgDBUAWIU/Y//Ziif8ISYVp9tBAOqsICgECoAA9aAEYdIAnQCMFisKAezMICnoBIAAWHoemhL6 +gAgV7/vOAACLFuxNEQlQBIAA/WAARfAMFQBYd/z0gGAVr/2iAGW7/Plf38jSAJ0ALyAg8f/fd5IA +nQBj/3MAAAAAAAAA6iAHKuAEgABYgxOIEtKA0Q+KJ9ww6xIAJVCBAABYfqjAsvtARh3gAgUA0Q8A +AAAA6zQADjgEgAD8YGgd4AwFAFh5+9tA7DQACugEgADqFgIr8ASAAO8SBilQBIAAWH7H+oAIFe/7 +FgDqJAAE2EkAAPwAIh2gDQUAWIUDY/7pAABsEAiSFJMVGeoniED4IEYVr8sFAOsqAQJwIQAA+iBm +FaeIQQDkgcBiUBEAAI8TLSEFqYwswACv3wTMC+/8QC5YBIAA/4ANiuIAnQD6ICYVoGgBAP4AIh3g +DQUABv04C98L690KB9ghAACCFZ4Q+QAARXAMJQDyQQAV4A8FAPJAgBWgAg4AjRQOVQz/4CAVoAMF +AO/kAARABQAA8Q5gDeB+AQCGEyKgAC3RBQQiC+bWCAlYBIAA4hYGIzEBAAD2QAZ6ogCdAAgGQPIA +Ih2gDQUABi04C9IL690KAVghAAD3IBAVoAIVAAcjOIcVB2YLF+n+pzcncKAGMgoGMwvsfAgBmCEA +AI7QCwCJBe42LiYAAwCLItIA6qwBJMgFAAD0X/sj4gCdAAUpDA4qDPugBhWgBxUA9WAoFeAGBQAJ +djgIaAgisgAF5QgltgF+WwIiLAHitgAmfRKAABbp5YsSHunk5rYBB5AFAAAGIgKGFe67AQxuAoAA +DbsCkmD6gAYV4SwdANEPixD8ICgV7/1SAAAA/E8ADf/8xgCFFRnptQXFC/gAChXgAgUAsSLlgx4J +D+gAAB3pzoYSGunO7W0BB9gFAAANuwKNFepmAQxOAoAACWYC69YAJhAFAAD2gAYVoSIdANEPAAAA +AOoWAS1oBIAA+8BoHe/51gD9jwAN//k+AGwQDPhASBWgCgUA6yAHKcgEgADygGgd58UBAP2fwBWg +BBUA7Ew5DLgEgAD8ISYVobsBAPMbXA3gDAUAmhacFZkTmxSbGxjphx3prB/phxXphObpqB33goAA +r+4uFgouIBbmFggtpwKAAPSAAEJw//UAf+ETAioCWC1OGOl6Heme6hYIJSoRgABgABcAAGZjy/jA +HyiQ+vUAKSAW+yAZTSIAnQCJiPcgBhCSAJ0AK1KuHOlvZLDRLMJ/K1KtDLsBZLDHsJmZiBzpjWSz +SyzAgCzMN/4haBWkzB0ArDzrFgImYB0AAPXABYISAJ0ALkKe/cAIK6IAnQCMGitCnSzCvwy7AesW +ACWZUYAAKnEMiXeZEf1ADqxiAJ0ALHAQ63IDJglBgAD5n/so0gCdAC5yA2Tg0I8WZfGwhhGPGI0U +7hIAKVAEgADm/zYL2ASAAO8WASngBIAAWCsEGOlDHeln568ubTAEgABgAvIAAMCgWbzRGOk9iYgd +6WD5P/mIkgCdAP/9CA2gCwUAwLDAqgqZNPkBBhXv/M4AAGqRJCtCnnyzQYwaK0KdLMK/DLsB5LA1 +ZPP9AAD/AQYVr/0qAAAAAAD8IaYVoAoFAFm8uhjpJomIHelK7BINJI8TAAD//IwNoAsFAMCwwPoP +nzT/AQYV7/xSAAAAAAAAAP/8GA2gCwUAAAAAihjAsZsW+V/5KuIAnQDA4J4W+V/4yuIAnQDrdAAJ +UASAAO0SCSngBIAAWCtA/gAiHeAHFQDnFgktOASAAP9AZhXv+7oAZLBJjxX+ACIdoAwFAA/sOGTA +jIgRhhjqJAAL2ASAAO0SBCngBIAA6GY2CPAEgADmFgEg+BEAAFgrzOjo+B0wBIAA/dI2Be/3/gAA +AACLGA8CAA8CAPlhNg3gDAUAeaMBwMH4ACId4A4FAAyeOOwWBSd8kYAA63QACVAEgADtEgkp4ASA +AFgsavdAaB3gCxUA+iEmFeAKFQD64GYVr/2eAIsQFej9KiEHiXAc6Pn/0cAF6qoBAP9AABU4mQEA +7KoCBMA9AAD8ISgVpIgdAOq2ACRACQAACDgMjiCZs+hfOQGz/QAA77YCL3YCgADubgIFqEEAAO62 +AS4O5gAAiBPojCAhlFUAAOo8/irIBIAAbakFCACGCQJhKzz+DLsRq1ubECggFCwgBKOI9YAImRIA +nQAICUcpJBT1IAouUgCdAIhyKCYciXHoFgctqASAAPMgCjBSAJ0A8TX4DeAHBQCnZiZGnSogFisK +/3uhCusSASlQBIAAWC/UjBllwOPAINEP6xIBKVAEgABYL88uIBYY6KP90Y4F4P/1AP/f5RxiAJ0A +Y/yHiBllj9IqcBDbcPxgaB2gCRUA+1/gFaANBQDqnTgJUASAAFgp9sAg0Q8AAAD6QGgdoBvFAPwA +Ih2gDRUAWIN3Y/+9AAAd6LMt0IDrEgQm6N0AAPpAaB2k3R0A/GAARvAMFQDt3Acl2GEAAFiDbGP/ +jy4gFi8K///f+vRiAJ0A6xIBKVAEgABYL6fAINEPixAMbBGsu/ogBhXv+5YAKCQUjXDxv/i6kgCd +APpAaB2gDAUAWHYq9sBgFa/8EgCKJ+s0AAnoBIAA+0QAFaAMBQBYeD3SoNEPAAAAAAAAAOsSAilQ +BIAAWAHz+iAIFe/6wgAAAAAAAOokAAxgBIAAWAN2iBeJcZoc56QADV8CgADrVQgE9U2AAOtUAAlQ +BIAA/QBoHeAMBQBYAzv3QABD//o6AIon/KBoHaALJQDqrCAp6ASAAFgp6CtwEPl/8TjSAJ0AKXAV +CQhFZI4ZK3EJHOhsKnEML3ARjicMqgyr/w+ICf3CpBWvzQUA7uwgJHiJAADt7gEEQEkAAAr4Oah9 +rs7u7EAm6IEAAO7bWn7QBIAADuowG+hcLaEB/UAEFaH5MQAL/worIhfv8p8uZAKAAAzdAgvuDA/u +LK7dqF79wCQd792BAP3ABB3v9nYAixT6QGgdoAwVAPtiQBXgDQUAWIMLY/4NAAD9rwANP/6aAGwQ +BCMgACQK7XQxBiIhA7wi0Q+EIYYg8kBoFaAIJQD3ZAACsJRxAPkPAAxzNgEA9GAAQfNmgQDl6Dkc +AQqAAABmGvZgAQG9RAEA5SIBAag5AADlIgwBmGkAAAQkLAQzKKMi0Q9sEAiKIicgB4kwlRX4QtAV +oXcBAPFdTA3omQEA+CAmFeD89QB8gR0FC0f7f8AV4AkVAOubOQlQBIAAWC9N81MwDeD89QAa5/SI +qBbn8vcADZiSAJ0ALmKuGefyZOHbKZJ/JWKtCVUBZFHRKIz/KKYI6VQAAo2BgAAb6A4lsIDt5+cS +qN0AAPggBhXkVR0A5UUIC88CgADmmQgCqA0AAPTgCJISAJ0AKJKe9QATO+IAnQAlkp0NeAoogr8I +VQFkUYgpIBb9IyYNoOvVACowEPtAElRiAJ0AKzELvLvaIFgu+SggFCwgBKSI9YAMQReYAQApJBT1 +IA4uUgCdAIoVHufljREoIQcc58kZ5+H/oeAV6ogBAP8AABQ0/x0A6YgCB/gFAAAPTwyYUIsgD+w5 +/KBmFeeqAQDsVgIt3gKAAOtLAgLIQQAA61YBIcBBAAD5QAlxUgCdAOhBDWJT/QAAbakFCACGCQJh +wICYFOkgBCJb/QAADLsRq1v1IAkJEgCdAIgyKCYc6TIBJdhBAACbEygWAvMgCbhQBQUAZpFQpUyI +FAx9Eabd7NadLBAEgADRDwAAAAAA9wAOkJIAnQAMeRGmmS6SnvXADvviAJ0AJZKdDXsKK7K/C1UB +ZFHNsI2dqGVe3WAAYwAAAAAAAADqJAAJ2ASAAO0SBSpgBIAAWH2h0qDRDwDAoFm7GBrng4io+R/y +GJD89QD/+VgNoAUFAAAAAAAAAPpAaB2gG8UA/AAiHaANFQBYgmFj/7HAUMDqDog0+UEGFa/4rgAd +55kt0IAt3Df64wAV5N0dAO1NCAlQBIAA/aBgFeAMFQBYglRj/3sAAAAA+EKGHa/6DgAAAACKJ/0g +aB2gCxUA6qwgKmgEgABYdzT6IIYVr/tKAIsw82AIopIAnQDiEgQr5wKAAKbMJMad0Q8AAAAAAAAA +6xIAKVAEgABYAONj/jAAAOokAAxgBIAAWAJoiTGLE4gS7KwRDSgEgADsuwgE9Z2AANog/QBoHeAM +BQBYAi+IFKWlpUwMfRGm3ezWnSwQBIAA0Q8AAAAAAP/2lA2gBQUAjTWMNB7nZvpg6BXgCSUA/HAA +B7CtcQD7LwAMu4whAPsgBADTzAEA6MwID/gKgAD/gAEGfd0BAO67AQZwOQAA7rsMBmBpAAANvSwN +zCj9YABFv/W6AAAAAOokAAPYSQAA/AAiHaANBQBYgg1j/mHAoFm6thrnIoioHeci+R/xCJD89QD/ ++PANoAUFAMBQwLoLizT7QQYV7/i2ALBLDLsR61sICVAEgAD7YgAV4AwFAFh0zLNM4hIEK+8CgACm +3SzWndEPAGwQBIk3F+c1KzAW+c5YBaMqBQAKKigLtgnoqAgLNwKAAKhmGOcvp2fkcr8pAQqAAP74 +CBWgDBUA6GYIDmgKgADmQRh0wCEAAIsymOCek5aSDbsCKHbAmzLRDwAAH+cir68p8r0AsQTt8sEu +cAqAAA6ZAvn3phXv/vUADt0DDZkBHuca5XLAKW8CgACu3ZnQjzKYUOaGACkBCoAA5YYBLiAKgAAE +/wIodsCfMtEPAAAAbBAKGecOCSkKKJJ/4hYIKWgEgAD7AAQA0AYVAOYWCisoCoAA+CCGFeBVTQAS +5wUb5wUc5vYY5tP1zggFoyoFAOraKA6/AoAA6ZJ/Juu5AACdFaSkqHesrJwWKHK5JEKf66oIBMv9 +AAD6IOYVo5kBAPghJhXgYwUA+IAEAjAAagCKGsCw/f/iHaBjBQDsVQMFAuGAAJsaLXK4BF4BDt0B +nRABAIcDNmBoPtWKGIsXjRUc5ueIFuM5CQHygQAA7hYJLM8CgACpiP0AAEY///UA4ogIDwEKgADo +gp8rSAqAAA+ZAwlEAQuAAGP/qgCKGYsUsaoKCkMqtn/RDwAAbBAEG+bUiiArsn8e5tP7TwANcy8F +AA+vKA7+CCnivyjivv3NnAXv+/UAC5kD6YsBDWcCgAD9gABGf/T1AP2ACBWgAxUA+Q7gHeANBQAZ +5sQY5rD5AABGfywBAOz8CAX9RIAAyykI6jApwr8v4sAJiAzo+xN+gQqAAC/ivgA4GgSIAwj/AS/m +vv2gIBXhux0A5LAsZmDBAAB/txRj/8QAAAnqMPmX5hXv/4YAAAAAAAD9oCAV4bsdAOW/3GZgwQAA +WC+owCDRDwBsEAQmIQn4QpAV7/gFACcgFeiYAQs2AoAA6JkMC7kCgAAHZgL4QoYd4AcFACc0APhg +Zh2gBBUABGYCljEV5mEkVq3RDwAAAABsEAQW5pQV5mvTD6YiBTUCJSaAJCKAZ0ALbQgFKCKAZ4AC +Y//z0Q8AbBAEE+aLIjaKY//8AAAAAGwQBCggBSUgB/pgqBWv9NUA+kBIFeADJQD9ASAR0VUBAMAg +0Q8AiCmaKw8CAPsACDwiAJ0AGuZ7CloJ6aH8JVALAAAqoQD7IASzogCdAPNgBHASAJ0AAioCWHQS +KyICDwIAA7oBZK+4iicEuwHrJgIlUMEAAFhthuPmQxUBOYAAKKAA0w/TDwOICiiCEOygBy1YBIAA ++kBoHaANRQALgABlr9yJJ9MPZJ92KpkUyqeKmWSvbCigAAOICiiCEOygBy1YBIAA+kBoHaANNQAL +gABlr+Bj/0oAAP//VA2gCgUA2iBYc/8rICLquwwJUASAAFh1SdpQ+gAiHeAMBQBYdvyLIgO6AfN/ ++uZiAJ0ALyAH2iD8ACIdoA0FAPVgBAcxvwEA7iYCJdh9AABYgO/AINEPAAAAAAAAAOsgIilQBIAA +WHU1KiAFwYN4oQxoqCmLIvNgBAV//EYAKSA6wL97mer6QGgdoAsFAPwAAh2gDSUAWHRsY//XAAD6 +QGgdoAsFAPwAAh2gDSUAWHPlY/+/AABsEAqIKx3mEy4gIYs3/GDIFaD/5QAP7gEuJCENzAEMuwzr +iQh4yASAAMAg0Q8DAIYJAmGbFSggBSUgB/ghBhXv9NUA/EBIFeADJQD9G0BB0VUBAIopHOYPmyv7 +QAgUYgCdAAxcCevB/CZgCwAALMEA/WAEo6IAnQDzoARgEgCdANogWHOkiyIDugFkr5uKJwS7Aesm +AiVQwQAAWG0ZCqsC4+XVFQEpgAAosADTDwOICiiCECywB/pAaB2gDUUAC4AA66QADX8eAACJJ2Sf +WiqZFCuSCcqoZL9PKLAAA4gKKIIQLLAH+kBoHaANNQALgADrpAANfy4AAGP/LQAAAAAA//9IDaAL +BQDaIFhzkSsgIuq7DAlQBIAAWHTb2lD6ACId4AwFAFh2josiA7oB83/6zmIAnQAvIAfaIPwAIh2g +DQUA9WAEBzG/AQDuJgIl2H0AAFiAgcAg0Q8AAAAAAAAA6yAiKVAEgABYdMcqIAXBg3ihDGioKYsi +82AEBX/8OgApIDrAv3uZ6vpAaB2gCwUA/AACHaANJQBYc/5j/9cAAPpAaB2gCwUA/AACHaANJQBY +c3dj/78AAGwQBBzltysyBCkwFv1gBAW1mR0A9SAIAJIAnQDq5bIUiIGAAP/LYgWv/eUA5OWEFKS1 +AAAsoX5plR18swoqzAT7YAijogCdACsgBrC7CwtH6yQGJYLRgADAINEPACyhftMP7LMMdngRAAD/ +YAfT4gCdACggBrCICAhH6CQGLH7WAACJJ4siKpkUDbsBmyKLmWSgtCiwAASICiiCENog/WDwFaAN +NQALgADAINEPAIsiiicPAgANuwHrJgIlUMEAAFhsocmtKKAABIgKKIIQ7KAHLVgEgAD6QGgdoA1F +AAuAAGWv4IknZJ9uKpkUZKBgiplkr2MooAAEiAooghDsoActWASAAPpAaB2gDTUAC4AAZa/gY/9B +AADqJAAJ2ASAAOxEAAroBIAAWHR/wCDRDwDqJAAJ2ASAAOxEAAroBIAAW/9BwCDRDwD//RwNoAsF +AP/+dA2gCgUAiDci4n8JiBH4QABBP/uSAIg3IuJ/CYgR+EAAQT/7+gBsEAQa5UEoottkgAsJ6jAr +otwLmQxnkAHRD1h2pNEPAGwQBB3lVCcgBxzlU/5BBBXg5xEADtw5nDCIIPvKLgXgCiUA+mBGFeAZ +BQDpNgMsRgKAAAqJAvhgJhXhdwEA5iB5K7wCgAD35gAPcA0FAPwEAh2gCzUA6eVBEwI5gACdNZwz +C4oCFuU+mjEa5T4G7gImIQmeNJo2BGYCIiAHnTmVO/jGAAtxIgEA5jYKKRQCgAAC/wIJ/wLvNggt +kASAANEPLCEIKyEJnTWVNwfMAgS7Agm7AgnMApw06zYGLRAEgADRDwBsEAQY5Q0e5SIsIAcd5SIZ +5SX6QQQV4PwRAP/NAA7xzAEA7TYALmQCgAAMuwIJuwLjgIApsASAAB3k3/xACBWgDgUAnmXtZgIh +uN0AAPrAhhXkdx0A6nz/LmYCgADsfAINVwKAAOxmASVT4QAAmmMCBImZZiNmBwYgiyUhCfTBZhWk +Mx0A5WYKK5AEgADogAUDKMEAAG05AgUCYdEPAAAAbBAGHeUBCysRrbMqMn8Z5P8X5NyIoMBA+OAA +RPAGFQDpuQgEAamAACwyeC8ye/mABXxiAJ0AZfEULDZ8KzJ5KzZ73UAN5BYBAgCUoA3kFsDJ/EAF +3CIAnQAvMnvBwO3k7BeDkYAAIjJ8KiEEjiDz4f4NproBACQ2fPRvZhWgAB4ALjZ87a8BBcP9AAAI +/wLvJQQljFkAACIyfLDM7zJ7IQDxgADJxmP/v9ogWHa/ZaDCKiEE/0EADBaaAQDIl9EP2iBYdrLR +D9ogWHZ00Q8AAAAAAAD6QGgdoAsFAFh3QtEPLiz46tKILwEKgAD8wAEF3/z1AAy7AwuqASrWiFm+ +QCQ2fCQ2e/pv6BWv/OIAAAAV5HwvUFhk8GpZs4VYdisoctvTD8iBWHYAKVBYZJ8pWHX6yK4V5Lgs +UmuwzOxWayYCyYAAWHWBY/8OAAAAABzksv5viBWgClUA/G9IFeALRQDtFgAha+UAAFm8cPpv6BWv ++zIALjJ74jZ8L3oeAAAiNnvRDx/kpi/yrnH2i/arBh2v/iIAAAAAAFmzTPqtZhWv/pIAbBAEFOSe +GeSY6OR1GV7CgACktCNCf6mI6LgIAYIhgAAqMgB4qQIqQnsc5JArMQQqRn8MugHqNQQp0ASAAFh2 +cc6pKTEE/yEADBbZAQDI19EP2jBYdmXRD9owWHYn0Q8A+kBoHaALBQBYdvbRDyNGf9EPAABsEATw +YOAN7/n1AIgiCTkDCYgBmCKKJyqsMFhrhuPkQhUBGYAAKKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA1F +AAuAAGWv4Ikny5IqmRTKpYqZya0ooAADiAooghDsoActWASAAPpAaB2gDTUAC4AAZa/g0Q8AAP// +XA2gCgUA0Q8AAGwQCB3kOhvkYhbkYPXILAWgGMUA4yzoJdOBAAD4QA3MJzMBAAw1EaRV6FKeKWbC +gACmxClAf/kAEJPiAJ0AKFKdZIIHmxHqCx4NSASAAJkQCiCGCwJlCwJjDQCHCQJhCQJhFuRNH+RL +7cMICQEKgADyIKYV4A4VAOPkDB9wCoAAnhOvz/4ghhXv//UA/9cAD3AHRQD+IEYVoAC6AACKmcmt +KKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA01AAuAAGWv4ClCIGSQ6y1AfB7kKYwVDdsJrt4MuwosQH2m +u4qyLuCAZKE4/ce+DaAIFQDA8A2POIgVD/8JCP8KL/0XL/wcL/Ib8eFwDeAMBQDAsQvbAwsLRytE +fAu7CQi7Cqa7/I+mHaAMBQCNsO9Snibz/wAALuD//+AEe6IAnQAvUp32/+AV4Pj1APHnwA3ndwEA +eHF06hIEJkAFAADoRH0m4+EAAFh19okT0qDrEgIkgGGAAIqiC6oBKiYCiicqrDBYaw7JrSigAAOI +CiiCEOygBy1YBIAA+kBoHaANRQALgABlr+CJJ2SfGyqZFGWu8v/7xA2gCgUAjBGLEAyAhgxghgsC +aQsCZ9EPjxGNEC5Efw/Ahg+ghg0CbQ0Ca9EPmxHqBx4NQASAAJgQCgCGCwJjCwJhDeCHCAJv6OwA +CdAEgABZsq9kr6/t47oZrwKAAORVCAlmwoAA94AAQj/5MgAAAP4gqBWgCxUA+7cADfAMBQD8j6Yd +p7sBACtEfAu7Cf9gAQWwDAUA92AARb/7egAAAAtghgtAhgoCZwoCZdEPAABsEAQY44ECA0cMMxGo +MysyhBnjjiiwAIqxCYgKCiGMAgo+KIIQAwI+/EBoHaANJQALgAAiNoTRD2wQBBTjcwIDRwwzEQQz +CCQyhCpCASZAAChACPqYaB2gqSUAAgU+AwI+eYEjGON6CGgKKIIQ6lQAClgEgAD8QGgdoA0lAAuA +ACI2hNEPAAAA6yQAClAEgABYdbvzQGgdr/82AAAAAAAAbBAEWbYTEuNYE+N5DAIAKSKCCRqOA6gK +iIQLgABj/+sS46AD6DAE7jAFsTCTIJQhlSIS45wT41uEIAQzApMgEuOawDAoN0AoN0QoN0goN0wj +PQFyM+0S45XAMJMgxy8T45QDIwMS45OEIAQ0AZQgEuOShCAENAGUIBLjkIQgBDQBlCAS44+EIAQ0 +AZQgxy/AMQMjAxLjjIQgBDQBlCBj//wAAAAS44mDIAMTFA8zEZMgEuOGwDAjJgBX/9kQ44WRAJIB +kwKUAxHjg4IQAeowohEB8DHAQATkFgACABHjf4IQIxoAAyICkhAR43zAIZIQBOQxhAODAoIBgQAA +0jABIwAAAAAQ43eRAJIBkwKUAxHjdYIQAeowohEB8THAQATkFgACABHjbYIQIyoAAyICkhAR423A +IZIQBOQxhAODAoIBgQAA0zABMwAAAAAQ42iRAJIBkwKUAxHjZoIQAeowohEB8jHAQATkFgACABHj +W4IQI0oAAyICkhAR417AIZIQBOQxhAODAoIBgQAA1DABQwAAAAAAXJQBXZQCXpQDX5QAQwAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFyQAV2QAl6QA1+Q +AFMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACclAAd +kAGdlAKelAOflAQIlAUJlAYKlAcLlABDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAnJABnZACnpAHHZADn5AEeJAFeZAGepAHe5AAUwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAANyUAB2QAd2UAt6UA9+UBASUBQWUBgaUBweUCAiUCQmUCgqUCwuUAEMAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAADckAHdkALekAsdkAPfkAS0kAW1kAa2kAe3kAi4kAm5kAq6kAu7kABT +AAAAH//9pADSMRD//goAAAAAAB///ewA0zEQ//4KAAAAAAAf//40ANQxEP/+CgAAAAAAAPQwCgAA +AAAA9DAKAAAAAAD0MAoAAAAAbBAIJyAHiCIW4lP9xJ4F4XcBAOWA8WvXAoAAGOJMLoCA5qoIB3Dd +AAD9U8gVpO4dAK5O6+JHF3AJAAD/gAhLoAmlACqinQt8CizCvwyqAeoWAiUH+YAAiNj3AAjwkgCd +AC9iruziPReFwYAAKmKtLMJ/7KsBBHP9AAD9QAUmIgCdAJ7Y/UAFLiIAnQAvIBSk/w8PRy8kFPXg +B65SAJ0A+CBIFeeFAQD5AAdxUgCdAOg8ECIMPQAAsEptqQUIAIYJAmHAUIgSjTLtJhwiS/0AAOsy +ASzPAoAAqYiYE/NgCkBQCgUA6hYALYtKAACLEOtLCAvnAoAA5swIBdv9AADrxp0qkASAANEP6iQA +CdgEgADsRAAK6ASAAFh3w9Kg0Q8AwLAJjDTs1ggt+x4AAI0iZd/V+kBoHaAbxQD8ACIdoA0VAFh8 +h2P/v//8DA2gCgUAAACOImXvsC2AgC3cN/rjABXk3R0A7U0ICVAEgAD9oEAV4AwVAFh8emP/jMCg +WbUjHeHyiNj5H/bAkAmlAGP/nNogW/sZY/8GAI4nnhGI6fvCpBXvyQUA5ekUJ2CBAAAJyQHpvQgK +VwKAAOpVDARAQQAAmOkIVTLl5RQm6QEAAP0ACDriAJ0AaKs9qKsrvPD7oATT4gCdAO8SAiIMdQAA +sE5t6QUIAIYPAmErwgELqwjlyQQl28EAAP1gBsxiAJ0A68YBLcAEgABkUKn1AGgd7/qWAAAAAAAA +6iQADuAEgADsFgQsWASAAFv8eIsxiBONFOoWAC1nAoAA7IgIBfT9gADaIPsAaB3gDAUAW/w/jRDt +rQgKkASAAO1NCAv3AoAA5u4IBuv9AAAt5p3RDwjdDPogSBXk/R0A0w9t+QUIIIYLAmMrEgLvTwwE +wQEAAO27CAeMQQAALvz/bekFCECGCwJlL8kEDagMqJgojDDoxgEv+tYAACqcQJrB+4AGFaAIBQD5 +gIQdr/0WAAuIDPnBJhWv+9oAKJxA+YAmFa/8sgBsEAQd4Zoa4Zsc4Zkt0pgqoX4swo6j3eo6DA7u +QoAA/YAARnALBQArxAQrxAVZEwj6QGgdoAsFAFv86tEPAAAAbBAEGOGNKYJ/KjAHLZECLpEE/SCk +FaAPBQDrkgAmiRGAAO7s/yaT/QAA4pUCL3cCgADuuwgOZwKAAP1vAA2wAMYAK5EFLZEEsbv/v+AV +r7sBAOuVBS93AoAA/WAGvGIAnQCMkO7MCA3fAoAAC8sMCwCHD99g6wAHBvMngAAe4W8pkQUr4n8J +mRGp2e3ifSWGEYAAjNGL0JvAi9CcsZ/Qn9Er4n+wuyvmf/WgBhwfuQEAjNn5owAVr8kFAPkABAR/ +EgUAotIrJjr/ogQd5UkFAOnVESQhAQAA5NYHLS8CgADk1gYqWASAAPWABOQiAJ0AJdUQ6FgIBHgb +AADsjEAn+gEAAP3gBGOiAJ0AyTLpRAAFAIGAAG2pBQMAhgkCYSsiQqtY/wAFjGIAnQDoJkImk+EA +ANEPL5UF//yYDaALBQDApf3CfgWgOyUAWbjbwCDRDy3igIzRi9CbwIvQnLGf0J/RK+KCsLv70EYV +7/z6AADAwPsP6BWgDRUAWHAcwCDRDwAAAAAAAADv1gkmk+EAANEPAMsw+mBoHeBcxQDsrDYKcASA +AG3JBQsghg4CY/hgAEXwXkUAfqENL6ys0w9t+QULQIYEAmUpjfvpJkImk+EAANEPAAAAAOQmQiaT +4QAA0Q8AAGwQBIIjAgJB0Q8AAGwQBIUjgyAU4RP4QIQVoVUBAOrhERquwoAA5FQIAYC5gAD7AAQE +Npg5AAmIAiglBCJCf9EPHeEIE+EJH+EJJkJ+KyEELkJ/kmCWIaP//WAEBfbLOQAMuwKvX+8mACco +BQAAJUZ/IkZ+6yUEKpAEgADRDwAAbBAEiiBloFAd4PrqIgMp9sKAAK7d/a/oFeAMFQD8gEAGMaoB +AAaqAg3ILAjdKCclBe3MDARYBQAA/W0ADD/7xQDrqgEMTkKAAAlZAgOqApojCYgCKCUE0Q+PIxvg +5g8PQQv+EavrLbJ/LLJ+ctka2cDzI/4NoAwFAMDALLZ/LLZ++kAIFaAASgAA2MDzDIYNoAwFAHLR +HY0hmtCOICmyfZ3hnCDsJgEky/0AAPlvphXv/WIAABngzBjgzamIqOh4oSHqtn8vgTYAAM2uKrJ9 +aqIZLbJ7/W/mFeAATgAAAAAAAAAA7LZ/J/8hgAD6QAgVr/6eABzgvRngvYghrJmp6fkPAAzwDAUA +Ccg4+W/GFa/+FgAAbBAE9cFwBeAGFQD0QGgdoAI1APaAQAMwABoAsCIoUn/oY/dyq4EAANEPAAAA +AAAAbBAEKCIc6zQACmAEgADtVAAJUASAAAuAANKg0Q8AAABsEAT0QkgVpCNBAPJaAAk/U4EABCIK +hCaCIQVEKApEEaQi0Q9sEAQqIhIjIAf6PgAEMAY1APUACRCRMwEACshR9QAJKJIAnQD6KAAGsDsF +AP3BJAWgClUAWbglF+CA5OB+Gc8CgAD0YAYSEgCdAKeZKpKe90AIidIAnQAqkp0EOworsr8LqgHx +TuAN50UBACghBxnggv/BBAWqiAEA6+CBHEcCgAAJiAKYoBjgf/xACBXgPAUAnKf7QKYV4BmFAJmj ++UBGFaAIBQCYpu7dAg7+AoAAnaQG/wKfoS8iEg+PQeimCC//AoAAn6nt4HAZ9wKAAKfuJuadLCIS +KiIQDcwC7CYSKVgEgABY5GdoQhmKJ/oAIh3gDAUA+0QAFaANFQBYb7vSoNEPAMAg0Q8c4EmLyGqx +Www5EaeZLZKebtNmKpKdBD0KLdK/DaoB5KBZZfP9AAD/gQYVr/zCAC8aAA+qAvpCRhWv+2IAKCoA +CKoC+kJGFa/7VgAAAIkiy5loQk3AINEPAAAAAP/77A2gCgUAwKBZs2Ac4C6LyGuxlv/7mA2gCgUA +AMCgwNoNvTT9gQYV7/taAAAAAOokAAHYYQAA/AACHaANNQBYeqdpQrGMJy/JFIrJ/4QAFa/IBQDo +7gEH+EEAAO/FFCVTwQAA6sYJJ3EBAAB+qyopwRUd4C2qmprJnaCMIPvAVgXgDRUA66YCLmYCgAAN +zAL9QCYVoAIFANEPHeAjnaCMIPvARAXgDRUA66YCLmYCgAANzAL9QCYVoAIFANEPAGwQGBTgHJIQ +jiAZ4BmLIy0iASwiAiwWIi0WJCsWI/ggxhXgCBUA+CDmFaAPNQD+ISYV4AoFAPogphWgD7UA/iIm +FeAKdQD6IaYVoAiVAPgh5hWgCYUA+CHGFeALZQD6IYYV4A1FAPwhRhXgDFUA/CFmFaANxQD8IkYV +4AzVAPwiZhWgC+UA+iKGFeAJ9QD4IqYV4AhFAJgUGt/5+iSmFaACJQDyIQYVoAKlACIWEBLf8oUW +KxIkKRIFJlF+LBIiJ1F/BpkoL0CAqXn4XogVo5kBAAOZCu6SAC9QBIAAJVI+LRIjCO4IC1AAjhcs +EiQtEiIG7igvQIGufvheqBWj7gEAA+4KjuAqFhbqEiMtWASAAKjuC1AAjhgsEhYtEiQG7igvQIKu +fvheyBWj7gEAA+4KjuAqFhfqEiItWASAAAjuCAtQAI4ZLBIXLRIWBu4oL0CDrn74XugVo+4BAAPu +Co7gKhYY6hIkLVgEgACo7gtQAI4aLBIYLRIXBu4oL0CErn74XwgVo+4BAAPuCo7gKhYZ6hIWLVgE +gACo7gtQAI4bLBIZLRIYBu4oL0CFrn74XygVo+4BAAPuCo7gKhYa6hIXLVgEgAAI7ggLUACOHCwS +Gi0SGQbuKC9Ahq5++F9IFaPuAQAD7gqO4CoWG+oSGC1YBIAAqO4LUACOHSwSGy0SGgbuKC9Ah65+ ++F9oFaPuAQAD7gqO4CoWHOoSGS1YBIAAqO4LUACOHiwSHC0SGwbuKC9AiA5+CPhfiBWj7gEAA+4K +LuIAKhYd6hIaLVgEgACo7gtQAI4fLBIdLRIcBu4oL0CJDn4I+F+oFaPuAQAD7gou4gAqFh7qEhst +WASAAAjuCAtQAC4SECwSHi0SHQbuKC9Aiq5++F/IFaPuAQAD7gqO4CoWH+oSHC1YBIAAqO4LUAAu +EhEsEh8tEh4G7igvQIuufvhf6BWj7gEAA+4KjuAqFiDqEh0tWASAAKjuC1AALBIgLhISLRIfKBIl +Bu4oL0CMrn75D+gVo+4BAAPuCi7iACoWIeoSHi1YBIAACO4IC1AALBIhLRIgLhITL0CNKBIlBu4o +mhOufvkQCBWj7gEAA+4KjuDqEh8tWASAAJsRqO4LUACMES0SIS4SFC9AjigSJQbuKJoSrn75ECgV +o+4BAAPuCo7g6hIgLVgEgAArFiOo7gtQACwSIy4SFY0TKBIlBu4oL0CPrn75EEgVo+4BAAPuCo7g +6hIhLTAEgAAmFiLo7ggLWASAAAtQAI4RKhYkKRISKxITKBIlLRIVjxXsEhQkQQEAAOgWJSboQQAA +7RYVJ/hBAADvFgUmYEEAAOwWFCXYQQAA6xYTJMhBAAApFhKLHYkcjB4vEhCNH+gSESZgQQAA7BYO +J/hBAADvFhAm6EEAAO0WDyRAQQAA6BYRJMhBAADpFgwl2EEAAJsdiRaLF4gbjRnvEgohEQEAAOwS +CCRAQQAA6BYLJuhBAADtFgkn+EEAAO8WCiIgQQAA7xIEJmBBAADsFggl2EEAAOsWByTIIQAA6RYG +J/v9AADvFgQv4WYAAIsQiBOMEo+wibONso6xrJmm3aruqP+fsJ6xnbKZs9EPAAAAbBAEKSIV+KAA +BPA4dQDpjAwBIEEAAPMgAEU/iwUA66QQJVBFAAD5AAXTYgCdACsKAFmvFywiFSsiFO3NEQlABIAA +/EJGFe6APQD9awANsAk1APpCZhXgCiUAbaoMjoQODo7uhgQkQBEAAA8CANMP0w9tmiHpggQkQEEA +AIqBi4KMgwkJjgoKjgsLjgwMjpmAmoGbgpyD60QACVAEgABb/q2KIIgiiSGPIwgIjgkJjg8PjgoK +jpognyMpJgHoJgIpQASAABnexAIAhgMCYfgAChXgCbUAbZoCCACK0Q8AAAAAAAAA/YEAFaALBQBZ +ruj4QGgdoAlFANMPbZoh6YIEJEBBAACKgYuCjIMJCY4KCo4LC44MDI6ZgJqBm4Kcg+okAApYBIAA +W/6L2kD/+/wNoDyFAABsEAYpIhX4QogVoEYFANMP+IAARXWZAQAJZgx0qwGxiComFQYqDOgmFCVR +QQAA9oAHs6IAnQDrNAALYASAAFmuvPhAaB2gCUUA0w/TD22aIemCBCRAQQAAioGLgoyDCQmOCgqO +CwuODAyOmYCagZuCnIMlLBDqJAAK2ASAAFv+aAZHDPbgBY7SAJ0A5jQICtAEgAD24GgdoAMFAOQW +ACpABIAA+MhoHaAJRQAKAmcIQIYKAmUIIIYKAmMIAIbqDAAJQASAAG2aIemCBCRAQQAAioGLgoyD +CQmOCgqOCwuODAyOmYCagZuCnIPqJAAK2ASAAFv+S+pUAAGYBQAA5mzAIiEBAADvbZpqQASAAIsQ +CjwRC8sI7HwMCtAEgABZroTRDwAAAAAAAOs0AApgBIAAWa5/0Q8AAAD2YABGMAMFAPwgBhWv/yYA +bBAEGN5YGd5WGt5UE95XkyOYIpkh+kAGFaALBQArJhUrJhTRDwAAAGwQBt4g5OIQKmAEgADnQgcr +0ASAAPu8iAXgGDUA40IVKZAEgADncg4i++kAAHj7JxjeRQj4CoiAmhOcEu4WASwAIoAAAJMQKrKl +7FQACVgEgABZsD1kpcfygqYV4AIFANEPAAAAACviEgubUu4WASX/QYAAGt4t4xYAKVgEgADqoscq +4ASAAFmwMGSlehreJtsg6qLJKuAEgABZsCsjfQXkps9hmgEAABreINsg6qLLKuAEgABZsCT3R+AN +44YFABreGtsg6qLNKuAEgABZsB5kpsQa3hXbIOqizyrgBIAAWbAZ+0BCiBIAnQArMOXBWPVgK+Bi +AJ0AabchJTTlixD6gqYV4AIFANEPkxAqsp3sVAAJWASAAFmwDGSnAosQ+oKmFeACBQDRDwCTECqy +q+xUAAlYBIAAWbAEZa8a+iBoHaALtQBY4Gv6ACId4AMFAOqzOAUA4YAA6hICK1gEgABZrojIqRzd ++I0RDKw2LNYXZTMljRD8gqYV4AIFANEPLkBuZO7SkxAqssHsVAAJWASAAFmv7WWuv/ogaB2gG2UA +WOBU+gAiHeACBQDqsjgFAKmAAOoSAitYBIAAWa5yLH0DKsUoZSLRjRD8gqYV4AIFANEPAACTECqy +s+xUAAlYBIAAWa/ZZKK3Gt3Q2yDTD+qinyrgBIAAWa/UZa5a+iBoHaALVQBY4Dv6ACId4AIFAOqy +OAUn6YAA6hICK1gEgABZrlgsQG/xgCc+0gCdAGSk34oT+gCiHeAM1QBY4BjSoNEPkxAqsrnsVAAJ +WASAAFmvvmWux/ogaB2gGyUAWOAlZKI1K0BuZLdv6hICK1gEgABZrkQsQhYKzDYsRhaLEPqCphXg +AgUA0Q+TECqyt+xUAAlYBIAAWa+sZKIzGt2j2yDqorEq4ASAAFmvp2WubfogaB2gC+UAWOAPZKHb +6hICK1gEgABZri8rfQIqtRSLEPqCphXgAgUA0Q+TECqyqexUAAlYBIAAWa+YZKIqGt2O2yDqorUq +4ASAAFmvk2Sjhxrditsg0w/qoqMq4ASAAFmvjmWuB/ogaB2gC3UAWN/1ZKF1K0BuZLbjGt1/ixLq +ou8rYASAAFmvhGWmRitAb8DIDLsCK0RvixD6gqYV4AIFANEPAACTECqyv+xUAAlYBIAAWa95ZKHv +Gt1w2yDTD+qioSrgBIAAWa90Za2f+iBoHaALZQBY39tkoQ0rQG5ktmoa3WWLEuqi7ytgBIAAWa9q +ZKZ5K0BvLAr9DLsBK0RvixD6gqYV4AIFANEPAJMQKrKn7FQACVgEgABZr19kobca3VbbINMP6qKb +KuAEgABZr1pkotoa3VDbIOqiuyrgBIAAWa9VZKxfGt1M2yDqosMq4ASAAFmvUGWsTBrdR4sS6qLd +K2AEgABZr0tlpFKLESuyEguZUsiZaJIH+SAPYdIAnQCMESvGEvKCphXgAgUA0Q+TECqyl+xUAAlY +BIAAWa8+ZKF6Gt002yDqopkq4ASAAFmvOWWstPogaB2gCyUAWN+gyqIa3SyLEuqi7ytgBIAAWa8x +ZayUihP6AEId4AzVAFjfgtKg0Q/AINEPAAAA+iBoHaAL9QBY35Jkr+rqEgIrWASAAFmts+sSACPg +CwAAKsUV+oKmFeACBQDRDwAA+iBoHaAbFQBY34Zkr7otQG5k1QYpQG/xP+GXkgCdAPE/4VfSAJ0A +6hICK1gEgABZraEuQhcK7jYuRheLEPqCphXgAgUA0Q8A+iBoHaALpQBY33Rkr3IvQG7TD2T0duoS +AitYBIAAWa2TKEE0+wAPAqIAnQCKE/oBQh3gDNUAWN9T0qDRDwAAAPogaB2gG1UAWN9kZK8y6hIB +KlgEgADsEgIraASAAFje7IsQ+oKmFeACBQDRDwAAAPogaB2gC5UAWN9YZK8CKUBuZJQZGtzjixLq +ou8rYASAAFmu52WiXCtAb40Q/IKmFeAMFQAMuwL6jeYd4AIFANEPAAAAAAAAAPogaB2gCxUAWN9G +ZK66GtzSixLTD+qi7ytgBIAAWa7WZaspihP6ACId4AzVAFjfJ9Kg0Q8AAAAA6hICK1gEgABZrVz1 +QBXykgCdAMcv0Q8A+iBoHaALhQBY3zL6ACId4AIFAOqyOAUBSYAALEBuDwIAZMODGtzC6xICK2AE +gABZrr5lom4tQG/A6A7dAi1Eb2UuNY8Q/oKmFeACBQDRDwDqEgEqWASAAFjfJ2WvnCsw5WP6cwAA +AAD6IGgdoBsFAFjfGGSuAihAbtMPZIL16hICK1gEgABZrTcpQhiLECtGFQqZNviDBhXgAgUA0Q8A +APogaB2gCzUAWN8KZK3KGtyWixLTD+qi1StgBIAAWa6a49ycHQcuAACLESuyEgvJUciZaJIH+T/5 +EdIAnQCOEYwQA70BLeYS/IKmFaACBQDRD2UthI8Q/oKmFeACBQDRD+oSAitYBIAAWa0WKkU0ghDy +gqYVoAIFANEPJX0E9LAAFeALBQD6oGgdoIwFAFmsp+oSAirYBIAAWN8/KzDlwMQMuwL6fCYdp7sB +APp8ph3v5f4ALTDl+iBIFaAOJQAO3QLtNOUrWASAAFms/isw5fp8hh2v5W4AAIoSWaDjLzDif6kU +ihJZoODcoOoSAiPYEwAAWa5lZKG3wKL9uMwFoDsFAFmz5ccv0Q8a3FeLEuqi1ytgBIAAWa5cZa4+ +ixErshILyVFokQpokgf5P/Fp0gCdAB7cWQO9AQ7dAo4RjBAt5hL8gqYVoAIFANEPihP6ASId4AzV +AFjeodKg0Q8AAAD6IGgdoAtFAFjesmSsahrcPosS0w/qotUrYASAAFmuQuPcRx0FZgAAixErshIL +6VHImWiSB/k/7hHSAJ0AjhGMEAO9AS3mEvyCphWgAgUA0Q8a3C2LEuqi3ytgBIAAWa4yZa2WixEr +shILmVJokQpokgf5P+wp0gCdAB/cMYIR778CA+gXAADvJhIm6gEAACzQ5cDhDswCLNTl8oKmFeAC +BQDRD4oT+gECHeAM1QBY3nPSoNEPI30FIzyAKzDlwMEMuwILC0f6fKYd7+ASAAAAGtwOixLqotcr +YASAAFmuEmWtF4sRK7ISC+lRaJEKaJIH+T/oMdIAnQAd3BIDvAENzAKNESzWEosQ+oKmFeACBQDR +DwAAAAAA9uAAQzALBQD6wGgdoIwFAFmsKMFQ6hICK1gEgABY3sArMOUFuwL6fCYdp7sBAPp8ph3v +3hIAAAArMOXAyAy7AgsLR/p8ph3v3b4AihP6AOId4AzVAFjeQ9Kg0Q+KE/oCAh3gDMUAWN4/0qDR +D4oT+gFCHeAMxQBY3jvSoNEPihP6ASId4AzFAFjeNtKg0Q8AihP6AQId4AzFAFjeMtKg0Q+KE/oC +Qh3gDMUAWN4u0qDRDwCKE/oCIh3gDMUAWN4p0qDRD4oT+gDCHeAMxQBY3iXSoNEPihP6AOId4AzF +AFjeIdKg0Q+KE/oAwh3gDNUAWN4c0qDRDwBsEAQkIhBkQGwpMBAqMBEsMBrrMBIszgKAAAqZAuow +EyzOAoAAC5kC6zAZLM4CgAAKmQLqMBgkhREAAAiqEQuqAuswGy1WAoAADKoCCKoRC6oCsarqJhYk +hI0AACkiEuvbthTAKIAAC5sBKyYSLEAFLQqVfcFJwCDRDwAuMBQvMBXoMBYvdgKAAA/uAu8wFy92 +AoAACO4CCO4RD+4C/ddgAFCNBQAvIhJ49yTApf23RgWgOwUAWbMcwCDRDwAAAAD6gGgdoAtlAFj6 +xsAg0Q8AjCcpyRSLyfmEABWvygUA6ogBBMkBAADpxRQl2wEAAOvGCSRBAQAAeLsGLsEVq+ubyRjb +j9mw+AAIHaAPRQBt+gIJAmEc23WcsIog/UAAFTAMRQAMqgKasSkwFCowFR7bhe8wFizOAoAACpkC +6jAXLM4CgAAPmQLutgIszgKAAAqZAum2BCHAIQAA6AYABfhhAAAPAIoqIhKJIg2qAuomEiz35gAA ++kBoHaANNQAL4ABj/ukAbBAGKCAEKQoYeYEDwCDRDyoiEiQiENMP80AKR9IAnQAvQG7TDw8CAP3n +AIDQnFUAK0AFfLHVHNtj/EAIFeAKJQD+gAgVoDsFAFmy1vqAaB2gDSUA/EymHeALFQBY+oDAINEP +ABzbWY0gjjYvMQv4Y/AVoApVAPggBhWgOwUAWbLJGttSJCIYLDELiCyJSoVH/QAARDALBQD4QYYV +oA0FAOVSDiSQSoAALUYeCp4C/oFGFaAAHgArQh7rWggB2IEAAFmrUi9CHi4xC41Ar+4uRh4qUAQs +UAUY2z7rUAYtVgKAAAyqAulQBy1WAoAAC6oC7Ns5HS4CgAAJVQIIVQH0oGAV7/jFAPigBAKwOwUA +/qBoHeAKVQBZsqMqIhMpMQsrQh4PAgAKmQjpJhMiwMEAAPl/9sUiAJ0AHdsoLEIKDcwB7EYKKVAE +gABY94f6QGgdoAsFAPwAAh2gDSUAWDfrwCDRDwAvIhMuMQv6QGgdoAsFAP/AAEdwDAUA/kJmFaAN +JQBYN+LAINEPAAAAbBAGHNsTLSIALjIF9EDoFadVAQD+v8AV4AgVAA+POfSCghWgClUA9CAGFaA7 +RQBZsnqJImWQmCYgBxfa0gYGQeoyBStHAoAAp4grgp4krB/5tZgF5EQdAHSzfCiCnQlrCiuyvwuI +Ae2EAAQDqYAAHNrwDACHbUkCCAJhiDQe2tGe0IkgHNrT6tYDJthBAADs1gIszgKAAOlJAgHggQAA +6dYBKVAEgAALgAAMbxGn/+T2nSKUdQAAiif6AUId4AwFAPtEABWgDaUAWGob0qDRD8Ag0Q8AAAAA +//4sDaAIBQDqJAAKaASAAPrDABXgDAUAWHUnwCDRDwBsEASHJyp5FB/azPjipBXvzQUA6HIIJVAH +AADscgslUoEAAOqTd3PYgQAADbsBq5nowXR0yQEAAC6NAep1FCdSgQAA6pNxfDAEgAB5oX2aeO8A +BQs4BIAABwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhF9qal2CFIJNllGTztWwFoAelAOJm +AiquAoAAB1UC5WYBKxAEgADRD8Ag0Q8AAAAAAAD3gGgdoAgFAPjhZhWv/nIACJoMCroMKq0BKqzg ++uEGFa/+IgAsvED84QYVr/32AABsEATHjwhYAwg4AghIA6ho6CIIC4EKgAACIhiiMtEPAGwQBAQ4 +AwhYA6ho6CIIC4EKgAACIhiiMtEPAABsEAQEOAMIWAEISAOoaOgiCAuBCoAAAiIYojLRDwAAAGwQ +BAVIAwg4AQhYA6ho6CIIC4EKgAACIhiiMtEPAAAAbBAEIyIQKDAF+EJIFeCUJQB0iUj/KKADEI0F +AHifPXCfGeraehS9WIAACpoB+kJGFaACBQDRDwAAAAAA/bTqBaAKVQD8YAgV4DsFAFmx3yswbtMP +abEFLDAFdMEGwCDRDwAAAPpgaB2gDSUA/EymHeALFQBY+YTAINEPAIwnL8kUi8n/hAAVr8gFAOju +AQf5AQAA78UUJdsBAADrxgkncQEAAH67BinBFaubm8kc2k3ZsPwACB2gCkUAbaoCCQJhHNoznLCJ +IB7aSPv/4h2gDEUA6rYELM4CgAAMmQKZsSgiEo8inrINiALoJhIv+4YAAPpAaB2gDTUAC+AAwCDR +D2wQBBPaRAMiAtEPAGwQBiYgB4giHNoJ9EIIFeFmAQDlgntrTwKAAKyZKJKeGtoC9wATitIAnQAk +kp0KaAoogr8IRAHo2hYSEumAACciEoop+EFIFeB3QQCXEAh3CidykOqZDAPYwQAA+yAPs+IAnQAr +IBYoCv94sRL6QPAVoAwFAFhyjuzZ7RURoYAAKyEHHdn6+bRCBeq7AQDv2fod3wKAAA27AptAiCD7 +tDoF4EoFAPqAZhWgBlUA70YCLHYCgAAG7gKeQS0iEo4QLyEa+7QmBaLdUQDq7hEO7YKAAA3uAgvu +AvsGAAwx3jEAqd0t0IDoRgQv+gKAAJ9GDX0M7kYHJujBAACdRSoiFYsp90AARX/pBQDnuwgFUMEA +AOomFSXYwQAA6yYJIlCBAAD4gAtsYgCdABvZ68SQ+gAIHeANBQAKAmEKAmEKAmEpRCAtRCQtRCct +RCb8hKYd74oFACpEIS9SEf6HZh3o/x0A/odGHej/HQD+hyYd6P8dAC9EOC4iFv6H5h2o7h0A/ofG +HajuHQD+h6YdqO4dAC5EPIo0GNnh79nVEfBhAAD1QAYYEPn1AO4GAAJQoQAACgCKKUQwKEQx/oZG +He/+9QAuRDOKNC1EI/qG5h2o/R0A/oRGHejqHQD+hsYdqO4dAP6Gph2o7h0ALkQ06wAFAkkBAAAJ +AmEoIAcICEEMiBGsiCaGnSsgFi8K/3+xCvpA8BWgPAUAWHH8iDRogCeKJ/oAgh3gDAUA+0QAFaAN +RQBYaOwrIhIs+n8MuwH6QkYV4AIFANEPHtm1LSISDt0C/EJGFe//LgDaIFhyNOzZdBVwKYAAYAAr +iF4Z2aixiJheCYgC+IZmHaj4HQD+hkYd6P8dAP6GJh3o/x0A/oYGHe/83gDAINEPAADrbBgpUASA +APwAIh2gDVUAWHPjwCDRDwDrbBIpUASAAPwAIh2gDQUAWHPdwCDRDwBsEAYkIhIqCo7pIhMifGyA +ACgxC6mI+EJmFaAJBQDpJhEskASAANEPLyIYL/B0evFUKCAFGtmJ6dmJFAJZgAArMQsKRAEkJhKN +OSwiE32YPy4iEavM7CYTImWegABk4JKN7H3XIIjr+8BoHaALBQD8AAIdoA0lAAuAAMCQ6SYRLJAE +gADRD8Ag0Q8AAAAAAAD9sugFoAolAP5ACBWgOwUAWbDVKiIQKaAFKwqVe5HWwML8TKYdoAsVAFj4 +fsAg0Q8c2WmN4P/AsBWgClUA9CAGFaA7BQBZsMgtIhLAkPhCJhXvvvUADt0B7SYSLJAEgADRDwDa +IFj1scCQ6SYRLJAEgADRD2wQCCoiEg8CAPNADyfQiOUALSIYK9B0+WAOtCIAnQApIAUc2VDv2VAU +jkGAAAyqAiomEvNAJztSAJ0AjiwoMgYkMCD8YUQVr/XFAP8AJ60lRAEADAxO/ZtgFaAmVQD1gAQG +cIW1APVgEtRgJxUAD6gCrOn4QYYV4DsVAPhCRhWgLCUA9oJGDeAKBQB2QQp7QQf8gCg9IgCdAC0w +MCoiEC4wMS8wMuqgcC7uAoAADt0C7jAzLu4CgAAP3QLo3REFeBkAAO7dAg+CCoAADQ4Z9cAj11X9 +AQAK5REF9QKVEfogBhWgOwUA/bJCBaAKVQBZsIEc2N0b2R8swqAvIhgrsoqlzO/wdC5mQoAArLv6 +QiYV4Ii1AOqwBS3oBIAA+eAYNSCepQD/QBf0IJi1APlAF7QiAJ0A9UAXcJCZlQD5QCClYA9FAPaA +BXxiAJ0A9oAFPCIAnQApMEEsMEAuMDwqMD3oMD4uZgKAAOnMAg92AoAACu4CKTA/6jBCL3YCgAAI +7gLoMEMuZgKAAOrMAg92AoAA6e4CDmYCgAAIzAIOyAzqIhAkBIuAACWiEn5RCAXoDGaAAi6mEi6i +E3zhCA7JDGaQAiymE4q8D6oCmrx2QT3DwfyACXwiAJ0A9oAPjGIAnQDC4v6AF3QiAJ0ALxAQZfMS +wCDRDwAAKDAjwJEImDkotEEoFBD2n/pdIgCdACowIX+nuykwQSwwQC4wPCowPegwPi5mAoAA6cwC +D3YCgAAK7gIpMD/qMEIvdgKAAAjuAugwQy5mAoAA6swCD3YCgADp7gIOZgKAAAjMAg7IDOoiECQE +i4AAJKISfkEIBOgMZoACLqYSLqITfOEIDskMZpACLKYTLjA4KDA5jLzpMDovdgKAAAjuAugwOy92 +AoAACe4C6ti0H3YCgAAI7gLvzAIHcAUAAC4mFpy8+2FmFa/8tgAAAPgAYh2jmuEA+R/s9mIAnQAo +MCQpMCXrMCYsRgKAAAmIAukwJyxGAoAAC4gCCIgR6YgCBlgRAAD5bQAOP/W+AAApMCHxIAfOEgCd +ACowJCwwJe4wJi1WAoAADKoC7DAnLVYCgAAOqgIIqhEMqgJloM8sMEwuME3vME4uZgKAAA7MAu4w +Ty5mAoAAD8wCCMwRDswC6iIQJgVpgAAuohj9wAUTogCdACy2EiowSC4wSe8wSi1WAoAADqoC7jBL +LVYCgAAPqgIIqhEOqgIqthQpMDQuMDXqMDYszgKAAA6ZAujYdRzOAoAACpkC+mbwFaAOBQAuthUu +thPotgsszgKAAAqZAvlhphXv+IYALjA4LzA56DA6L3YCgAAP7gLvMDsvdgKAAAjuAgjuEQ/uAuzY +YxdwBQAALiYW/WFmFa/3sgAAKiIQL6AFKAqV+f/vBCIAnQDAkvhMph3gCxUAWPdkwCDRDxzYVu2y +AC1wBIAA+kJIFaA7BQD6IAYVoApVAFmvrC0iEvpCCBWgTgUADt0CLSYSLjBBKzBALDA8LzA97TA+ +Ld4CgADuuwIOZgKAAA/MAi4wP+8wQi5mAoAADcwC7TBDLd4CgADvuwIOZgKAAO7MAg3eAoAADbsC +DL0M97/qaBIAnQAtohJ80QgNzwxm8AIsphIsohP7n+mcYgCdAAy4DGaNKPtCZhXgAgUA0Q8AAAAq +MDgsMDnuMDotVgKAAAyqAuwwOy1WAoAADqoCCKoRDKoC6dgjFVAFAAAqJhaZu4rXKTwg+0HIFaAL +NQBtugUJAIYKAmHAINEPKSIRZJB/iZeJnvkmABXgC2UAKjwg0w9tuQUKIIYJAmPAINEPAAAqIhBj +/rwAAP/uMA2v9fUAHNgNLzAwKTAxjrDoMDIv/gKAAAn/AukwMy/+AoAA6P8CDWgEgADoMCAv/gKA +APnmAA/wCiUA+CAGFaA7BQBZr1jAINEPAAAA+kImFa/9kgCJ1ysxC4mev7sLS0vlv3xkyMEAAGP8 +NQBsEAYrIgcmIAcPAgAouRQFDUf1YcgVoWYBAOOyCSQOUYAA+aAQUVIAnQAc1+koIgD/YEgVoApV +AP2/wBXgCRUA7Z05CXgEgAD4IAYVoDsFAFmvORzX4PxgEBXgClUA/koQFaA7BQBZrzQX147l140b +TwKAAPTAC8ISAJ0Ap5kqkp73QA9aUgCdACqSnQVrCiuyvwuqAWShpSshBykgQC8gB/WvJgXquwEA +7dfLHd8CgAD1IAuYke8BAPUgCRkSAJ0A9YAI2pIAnQDAwPmviAWg/xEA6SEIL/qCgAAPuwLtuwIP +dAKAAA6ZAgiZApugjiCYpvVARhXgPwUA+UCGFeANRQD/QGYV4AkFAOmmBSVYgQAA6aYHL3YCgAD9 +xgAPcA8lAO6mAS52AoAA7+4CBUkBAAADIIYLAmMDAIYLAmH/QSYVr5V1AASAhgkCaQRghgkCZwRA +hgkCZegiEitPAoAAp5ntlp0hISEAAPUMRg2vZ4UAFtebIyISDwIABzkIKpInJZR9LJImLKYAK5Im ++2AmFaAIBQDoliYhm4EAAOiWJynQBIAAWazh+gCiHaA7BQDsZAAJ6ASAAFmu3y8iEsDh0w/17wAP +sA0FAA/tOGTfpOUkBSlQBIAAWazUwCDRDwD8gFAVr/ueAP/42A2gAwUAHNcqi8hqsX8MaRGnmSiS +nvcABHJSAJ0AKpKdBW0KLdK/DaoBZKB8sL6eyGWueWAAHAAAAAAAAAD8EEIdr/p+AC8gQAj/EP5g +BhXv98IAjyJk8F8c12juIgApaASAAPngaB2gCRUA/y0ADHAKVQD4IAYVoDsFAFmutMAg0Q8AAAD/ ++IQNoAoFAMCgWao4HNcGi8j5f/uQkgCdAP/+NA2gCgUAwKDA2g29NP2BBhXv/foAAACPMOokAANY +YQAA/66cBaf/wQD+SAYd4AwVAP5gBhWgDUUAWHF6/kBIFe/93gBsEAiJJysgByiZFPTgAAZxuwEA +5pIJJAgJgAD5gAnhUgCdAC0gQRTW6+zW6R2YBIAA8bNMDeAFRQD2AAId4A0FAPVgBtoSAJ0ADLoR +pKouop71wA0b4gCdACminQy+Ci7ivw6ZAeqUAASJ6YAALyBBZfFmHNbrGdckKCEHLSAHHtcj/kEE +FeqIAQD8IAAF8N0RAOrdEAxHAoAA7YgCDdwCgAAL/wIO/wIJiAKYoIggn6T/QMYVoA0FAJ2l/UDm +FeA7BQD9QEYVoAlFAOumAyxGAoAACYgC6KYBJUiBAAAGIIYJAmMGAIYJAmH84AAVsAwlAAy7Apup +DDoRBKoI9VOmFe+ZdQDpJAUpUASAAFmsU8Ag0Q8AAAAA//v8DaAGBQAf1qqO+PfABriSAJ0ADDoR +pKooop71AAeD4gCdACqinQw4CiiCvwiqAeSg3mdL/QAAmfj5QGgd7/w6ACogQAiqEPrABhWv+voA +j54t8AQn8AUe1sjl8AYu7gKAAAfdAu/wBy7uAoAABd0CCN0RD90CDt0BJdxn9I4ACvCHlQD0oIAV +7/p+AI8i6xYEJ4R5gAAc1tvuIgApaASAAPngaB2gCRUA/y0ADHAKVQD4IAYVoDsFAFmuJcAg0Q8s +3Ejr3GcpcASAAP7AaB3kux0AWa0KY/5/AAAAAAD/+aQNoAkFAJsU/CCmFeAKBQBZqaAf1m6NFY74 +ixQc1m753/iAkgCdAP/8uA2gCgUAwKDAygzsNP3hBhWv/H4AAAAAjWDqJAAF2GEAAP2tbAWn3cEA +7SRAKugEgAD8wAYVoAwVAFhw4P5ASBXv/TIAbBAGiScjIAcomRQDA0HmkgkkBzGAABTWVfWspgXn +hQEA+QAIoVIAnQD0YAaaEgCdAAw5EaSZKpKeBTsKK7K/90AJ6lIAnQAqkp0LqgFkoPcpIAcrIQcc +1pL7QAAF8NkRAOrdEA3fAoAADbsCDLsCm6COIPmsogWgPwUA/0BmFeANRQDopgIvdgKAAA3uAp6h +LCBB+gACHeAPBQD5RAAV4ekBAOXA0W90AoAALCEIn6UOzAIe1nyfp56mDswCnKQGIIYJAmMGAIYJ +AmH9YAAVsAwlAAy7ApupDDkRpJn9M6YV75h1AOgkBSlQBIAAWavBwCDRDwAAAAD//GgNoAYFABfW +GIt4arF/DDkRpJktkp4FPArswr8oBAqAAPegBApSAJ0AKpKdDKoB5KB1Zev9AACdeGWvGWAADi4g +QAjuEP7ABhWv+5oAAI8iZPBlHNZb7iIAKWgEgAD54GgdoAkVAP8tAAxwClUA+CAGFaA7BQBZraPA +INEPAPoRIh3v/L4A//skDaAKBQDAoFmpJot4+X/7qJIAnQD//mANoAoFAADAoMDKDLw0/OEGFa/+ +IgAAAAAAj2DqJAAB2GEAAP+sgAWn/8EA/kgGHeAMFQD+wAYVoA1FAFhwaP5ASBXv/cYAbBAEiiqO +rxjWN+gmCyFIgQAA6eYAJXjhAADvJggpWASAAP5BJhWgDAUA+UHmFe+YhQD4QKYdoA0lAFhu1MAg +0Q8AAABsEAQb1igqMQzTDyuyfxzWCfhiEBXgFGUA+0P2DeAFBQB8oRfqJAAK2ASAAOw0AApoBIAA +WPRywCDRDwBokUFokiFolAnAQP//ZA2gBQUAfKHRe6vO2jBY9KDVoP//EA2gBAUA/UDmDaAUZQB7 +owJgAAHAQNowWPS3//6cDaAFBQDaMFj0y+WkAAUBEYAA/awMBaAKVQD8YCgV4DsFAFmtT//9/A2g +BAUAAAAA//3QDaAExQBsEAQpMBPxJgAN4PWFAGiRA8Ag0Q+EJ4ROHNX37TARIkAXAAAthGL+YlAV +oApVAP8MZh2gOwUAWa08Kk0E7DARIdhhAABY9NzlOwgCUBcAAOwwEiVTgQAAWPTX6iQAClgEgABY +9i3AINEPhCcPAgAPAgCEThzV4i0wES1EAv5iUBWgClUA/oBmHaA7BQBZrSbrPBgiUAsAAOwwESVT +IQAAWPTF5TsIAlAPAADsMBIlUqEAAFj0wcAg0Q8AAGwQBPRAYCXosx0AI1RX+qrGHeBENQD0qqYd +oAh1APiqhh2gCQUA+KpmHeBKBQAqVFLRDwBsEASPOP2rhAWgClUA/GIQFeA7BQD/4Ggdof/xAFmt +BikwEOrVvBSMkQAAaJJZaZQSiDYion8JiBGoIiggBSkKlXmBXsAg0Q8AAADaMFj3BP9fAA3gCXUA +i6eLviyyjgydVv0jQB3o7LkAwNN+0BD7YEAl4AwFAFj2zsAg0Q8AAFj16cAg0Q8AizYqon8JuxH7 +QABFcAsFAFj1dsAg0Q8AAAAAwKX9qzgFoDsFAFms4vpAaB2gCyUAWPSOwCDRDwBsEASILiMsOHOJ +BcAg0Q8AAIsuiLPsRAAK6ASAAOu84ClQBIAAC4AAjCLtIAUufu4AAGTf1Y4uc+nWY//NAAAAbBAY +JRYZlB4rIAcjFh6HNegyBCn4BIAA/+HkFeADFQDyIgYV4bsBAPojBhXgyFEALBYa/CPIFaDYWQD8 +I6YV4L95ACsWFSrAAP+DsBWj9vUA/YekFeB3+QD8ImYV7DgdAP4gBh2ge3UA7MIfJFRCgAAPCEn4 +IeYVoAAeAACWHxnVZygSGfwiJhWgDwUA+S/EFeAEBQD7QBG8Z4gBAC8WFAk5DPgi5hWvmQEAKRYW +9QBIcRIAnQCKIvtAVKCSAJ0A8OcQDeAOBQDuFhIjgFGAAAM6AlkAAMBQ8oXADeAGBQAtEh4t0IMN +XUIvEh0rEhr+AGIdoAwlAO/sOQvQBIAAWP/fpqbwgQAN4Ar1ACkSHimSKihsMAmGOXagbPQhphWk +th0A4xYMJdgFAAD6I2YV4AGaAAAALBIT0w8PAgD7gEZYEgCdAC0SHg8CAI3V8b/7u1IAnQDrEhMp +0ASAAPwiKBWgDhUA7hYSKOgEgABZAAv7QE4gUgCdAP4AYh3gBQUACvU6ZFGpw2CUHfIhhhXkhh0A +KBYbKRIYHNTAE9TC7tTAHKAEgAD1IAniEgCdAOsSGyy3AoAAo2YqYp77QFKL4gCdACZinQ6YCiiC +vwhmAQZrAu/CCC2wBIAA+2BOoBIAnQArFgX34E8QkgCdACkyrhrVDPsgTIgSAJ0ALjKtLaJg7esB +B9P9AAD9wEvuYgCdAJrI/cBMFmIAnQCNHiwgFK3MDAxHLCQU9YBNplIAnQAuEh3I6ykSFsCD+QBO +0OIAnQBkUPoqEhoPAgDIoWRQY+tkAAlQBIAA/ABiHaAdhQBY//3uEg8teASAAOYSDCK6GYAAHNTs +LRIV+ak2BeAKBQCa8przmvSa9elpAg9EAoAA6fYALuiCgADo3QIK9sKAAP+mAA6wG8UA/eAmFeAK +VQBZrCErEhf5YElpUgCdAMAg7BIbKm8CgACj3SzWndEPLhIeLuCD/kUABzAEFQD+IoYVr/b6AI/I +9+BJoJIAnQDpEhsqNwKAAKNmKGKe+QBJ++IAnQArYp0OTQot0r8NuwHmtAAIBAqAAPtgSVgSAJ0A +sP6eyPrAaB3v+qYAAAAA/JrMDeA2BQD/9rQNoA0FAC8SEmTwdusSBSlQBIAA/ABiHaAdhQBY/8AZ +1LMW1LGOHCgQACZinwnuAhnUhQgfFOaGCw/7AoAA6f8CBHycgAAsEhHtEhMjW/8AACiyPyuxfZ6g +n6Gdopyjm6T5QKYVoABuACwSES0SEythBYhjnqCfoZuimKOdpJylJqwYLRIVjB8C3RDtFgguZAKA +AOwWCSuwPgAALhIdGNRE/iGIFeAKBQDqFgYvcYKAAJ4XCP8C/iFGFeAPJQCfG+tkAAlQBIAA/ABi +HaAdhQBY/5OLHS8SHokW5hIeJZFBgAAmYIPv8gUkkXmAAIgdBk5A5IIYb3MCgAAoEh4ogIIIBkAK +ZhCMFwbtAv2GAA5w36EA86gAFrCPkQD9hgAOcN+JAOOIEA7ogoAA+aYADrCPmQAEiBAIzAIoEh6L +Gg3MAoiE+0AGFeP99QCdopylHNRp/UBmFamIAQCYpBjUZZihLhIL6ZwBJTBhAADpFgYnc/0AAO4W +Cy96RgAALxIU9eAs+JIAnQD14C2xEgCdAPXgLnGSAJ0A9eAvMhIAnQD14C/ykgCdAPXgMLMSAJ0A +9eAxc5IAnQCOHdMPZOBPLxIeL/IqZPBG62QACVAEgAD8AGIdoB2FAFj/USgSHhvUR4wa+QVIFaP9 +9QCdov1ABhWsCQUAmaP7QCYV6ZixAOmmBCxFgoAA6KYFJTBhAADrZAAJUASAAPwAYh2gHYUAWP8/ +HdQ3jxiMGfYhSBWgCQUAmRGZEpkTmRSZpPlAphXv+/UAm6Kbo5ag78wCCvbCgAAOzALuEh4lMGEA +AO3MAgDYIQAA7KYBIOhBAADqHAQg4DEAAFj9WPlAaB3gCBUA6ok5DSgEgADpFiElIzmAACQWIvoA +Ih3gCgUACbo45RYjJWNZgAAT1BeNGYQcGNPmH9QW5RIdKieCgAD4hgAKNgwFAPghCBWgChUA5aU5 +CvDCgAAF/Dn5xgAPMAk1AP3GAA7wCCUABZg5KBYgDs4CLhYc/YYADnAFBQD8I+YVoAR+AAAAAAAA +AP/3bA2gBgUAwOD/98gNoAYFAIgd/CPIFeQMBQD2YAAHMrYpAPELAA3gBgUALdIq7cY5DduCgAAs +EAD/YAAEcN/JAOvdEA5iAoAA7O4CDEUCgAD5xgAPMM/BAPWQABYwj3kA/YYADnDfqQD/QKYVoO+x +AODuEQ7rwoAA/6YADrDvgQDsiBEPdkKAAP8GAAwx72kABO4R/wYADDDvuQDtiAIPckKAAA6+AgyI +Ao0anaAc06ScoQjuAv7GAA8wCCUACO4CnqQY09CYoh7Tz/9AZhWv9i4AAAAAAPoAAh3gBgUA//1M +DaAOBQAAAAAAAACZoZSgnqKeo56knqWdpp2nnaidqS8SIOVcASUwoQAA/qARnGIAnQDrZAAJUASA +APwAgh2gLYUAWP685FBRas7CgAD0oApgkgCdACsSH8fv+yYADPANBQDjmQIL/S4AAI0TLBIejhKP +EYvMLMIQmaGbqfVABhWgCAUAmKKYpp+jnqSdp5yljBT9QQYVr/4mAC0SHSwSHBvTogyZAuuZAgaE +GYAA8OJADe/+9QCZoZSgnqKeo56k/0CmFaANBQCdpp2nnaj9QSYV7/02AC8SHiIWJSvyFibxOCLx +OizyFejxOSs0AoAABiICJvE7LfIb7vIaLEQCgAAIZgIo8hcv8hmfop6jnaScppunmKiWpZmhlKCS +qfIkqBWv+/YAAAAAAAAAAPDiQA3v+/UAmaGUoJuim6ObpPtAphXgCAUAmKaYp5io+UEmFa/7OgAs +Eh6NEi/BOybBOSjBOC7BOuvCGCs0AoAA5v8CDEQCgAAI7gImwhSIzCzCEJukmKeWqJmhnaKUoJyj +n6WeqYwU/UDGFa/6GgArEh3sEhwlg1GAABvTYMfv/SYADLANBQDrmQIDgPGAAJmhlKCeop6jnqSe +pZ2mnaedqP1BJhXv+TIALhIeIhYlLeISLOITK+IYiO2G7i/iFILvLuIRnqKdo5ykm6WYppann6mZ +oZSgkqjyJKgVr/hWACsSH8ff+yYADPAMBQDjmQIDgPGAAJmhlKCdop2jnaSdpZymnKecqP1BJhWv +95oAmaGUoI4T/iAoFeAIBQCYopijmKSYppinmKifpf9BJhWv9woAKhIeGdMyiqUT0sYlEiPkEiIl +TDCAAOPSwhOD4YAAHNMsixwMuwL7P0YV7+JeACUSEMDS960ACv/i4gAAwKX9pkoFoBvFAO4+EQno +BIAAWapZY/bd+iLIFaAOBQCeEZ4SnhOeFFj8RCQWIuUWIyVfYYAA+iLIFaALBQBY/DckFiL0JGYV +7+9aAC8SEfv/uZCSAJ0AY/atGtLjiBwKiAL5P0YVr+B+AADAoFlg/sinG9MKK7CAZLEsKhIWWPwv +6RIhLVweAAD6IsgVoAsVAFj8IvgkKBXv7cIA3GDqEgwpWASAAPwjyBXgDhUAWPzU90BoHa/p8gAA +ANxg6hIMKVgEgAD8I8gV4A41AFj8zPdAaB2v6XYAAAAA3GDqEgwpWASAAPwjyBXgDnUAWPzE90Bo +Ha/o9gAAAADcYOoSDClYBIAA/CPIFeAOtQBY/Lz3QGgdr+h2AAAAANxg6hIMKVgEgAD8I8gV4A7F +AFj8tPdAaB2v5/YAAAAA3GDqEgwpWASAAPwjyBXgDtUAWPys90BoHa/ndgAAAADcYOoSDClYBIAA +/CPIFeAO9QBY/KT3QGgdr+b2AOsSEynQBIAA7BIRKOgEgABY/XJj9ikAACsSHowe7RIZKVAEgABY +aAbSoNEPAAAAAPulfAWhSxUAWZNlLBoADKwC+6VyBaFLFQBZk2Vj/rMAwLDA2g39NJ3I+3+0MJIA +nQD6QGgdoBvFAPwAAh2gDRUAWGzBY/+gAAAAKxIY+kBoHaAMBQDtEhsl2GEAAFhsumP/hMCgWaVj +HNIyj8j5/7CgkgCdAGP/uNogW+tZY/ZHiieNHsDA6qwgLtgEgABYYZjSoOsSGypnAoAAo8wrxp3R +DwAAAAAAAP/W7A2gBgUA/9ikDaAFRQDAoFmlThzSHI/IHtId+f+1+JIAnQD/27ANoAYFAAAAAP/b +NA2gCwUAwNoN/TT9gQYV79tSAAAAAGwQBBTSgoIgJEJ/E9KBBCIMAyIC0Q8AAGwQDBjSfxrSDRnS +fCiAfSqiqSmShgmqEeqZCAR8RIAAJJ0B9JAAFaAAMgAAACSdAyRMgBnSOyhBKfkACAxiAJ0AGtIn +6gAFCMgEgAAJAmEJAmEJAmEJAmEZ0mwY0kQf0mmOIJ8S+CDGFaAKRQDpFgAvdgKAAArqApoRKUAH +L0Ep/aTGBaGZAQDj7gIMzAKAAAn/Agj/Ap8UKyA5/iFmFaANJQCdGQy7AusWCCgECoAA9GAEsZIA +nQCJRyqZFOSgf2TggQAAjZmLwP/4Ah2gJYUA7s4BBoIZgABtCC59sTgv0AAp0Ad18S8vwQXu+AgM +zwKAAOndCARBAQAA6NsRftAEgADtpAAFAImAAGP/ygAA/68ADX//vgD9bwANcAkFAAqdOObUAA6B +pgAA6kQACNgEgAD8AIIdoA0lAFhdWtEP//4MDaANBQAAACocOvpHQBXgDGUAWaH2Y/9cwnaOaPoA +oh2gO0UA7NIqG2gEgAD+RzAV4+4BAFmpVIpoCo9Xd/FtikcuoRX7RAAVr8sFAAurAavr62pwc2kB +AADvogAmgYGAAH3xKCzQANMPDwIAdcEdKdAHDJkR6d0IBcEBAADo2yR+0ASAAO2kAA1+xgAA/e8A +DfAKBQALrTjm1AAG+mGAAGP/dgAA/68ADT//cgAsIDkKDUN9yYiOIAjuEQ4+Ap5r0Q8AAAD/rwAO +v/5CAGwQBiggBSwgB8GUDwIA+QAQdWHMAQApIgJlkcMtMAEW0YHr0X8eOASAAP+hQAbQD6UALiBO +ZeJX7tF4Hk8CgAD1gArSEgCdAKaZKJKenBALywr3ABGU0gCdACuyvyqSnQurAesWASWOSYAAiuj3 +QA64kgCdAChiru3RbBQL+YAALGKtLdJ/7csBBUP9AAD9gAteYgCdAJjo/YALZmIAnQApIBSkmQkJ +RykkFPUgDXXSAJ0AHtFtG9FmjCD4ICgV4AoFACq2Mu7MAg5uAoAA/WcGFaAORQAO3QIttjEb0crc +kOsPHg3QBIAADAJnC0CGDAJlCyCGDAJjCwCG7AwABNkBAAAK4IYLAm8KwIYLAm0KoIYLAmsKgIYL +AmkuMQEoIQktIAcsMAEb0bgqIST8IAAGMN0RAOrdEA5kAoAADcwCDKoCHdGyLCEiC6oCKpYgDcwC +iyAd0U8oliMuliQsliL9YAAVsAwlAAy7AiuWIYoz6pYlJMgHAADtABUEymEAAAkAigx4EaaI/xOm +FeflAQD5wAa5UgCdAMAg0Q8AAIro90AH4JIAnQAMeRGmmS2Sngt7Ciuyv/egCGTSAJ0ALZKdC9sB +ZLEAsK2d6OsWAS305gAA/CAGFaABZgAAAAAAAOokAAnYBIAA7EQACugEgABYZsHSoNEPAAAAAMCw +D6k06eYILfTmAAD6QGgdoBvFAPwAIh2gDRUAWGuFY//BAADqJAAK2ASAAFhoWtKg0Q8AixD6QGgd +oAwVAPtjABXgDaUAWGt7Y/+XwKBZpCQe0PKK6Plf8PiQD6UAY/+q2iBb6hr/+TQNoA+lAACKJ+tE +AApoBIAA+0QAFaAMBQBYYFbSoNEPAAAAAP/3XA2gCwUAwLgLmwL6QEYV7/0eAAAAAPwgBhWgCgUA +WaQMHtDbiuiMEBvQ2/lf93iQD6UA//woDaALBQAAwLAPrTT9wQYV7/vyAABsEAYoIAUmIAfnNAAK +2ASAAPgCgh3gBTUA+QAPnWFmAQALCEdoghSKIhfQyRjQyORkAAUDyYAAwCDRDwArIh1lseGIJ4OI ++wKkFe/MBQDpggskcIEAAAzsAey7CAp/AoAA7BYAJdkBAADzIA38YgCdAC2JFKP6r90thRT7YA3r +ogCdAMl1yUPZMG1JBQcAhgkCYYrgDwIADwIAr6r7QBCsYgCdAPvABhWv/f4A7GoRAyTxAAAHqggr +op4PAgD3YArZ0gCdACqinQhrCiuyvwuqAWWgT+tsGClQBIAA/AAiHaANNQBYax3AINEPABvQlom4 +9yAMoJIAnQAMShEHqggsop73gA0B0gCdACqinQhMCizCvwyqAeShjmTr/QAALbYIZK+vGdCymaCI +IP+iCAXgCxUA66YCLEYCgAAFiAKYoYgzL/J//6E6BaiIHQCo/5+j7gAVBUhBAAD/oSAF4AgFALGI +6YMeDA/oAACfphnQ9PlBBhXgGAUAmKeOIAjuEQXuAp6pDE0Rp90l1p2OIiwgBoknC+4C69DrFmAF +AADsJAYkyIEAAIiR/SCCFe/MBQAMnAHuJgIkQ0EAAOiWASbowQAA7ZUEJmEBAAB8iyIqkQUd0HSo +qJiRnYCMIOuGAi5mAoAABcwC/QAmFaACBQDRDx3QbJ2AjCAb0NPrhgIuZgKAAAXMAv0AJhWgAgUA +0Q/aIFhnq9Kg0Q8AAAD/+sQNoAoFAFgAJ2P+FwAA8yBoHeAOBQD/AWYVr/e+AOO6DAOBuYAACksU +7LwIK8AEgADsTDYJyASAANMPbckFCACGCQJhiRCqeOtNDATJAQAAbdkFCCCGCQJjixAK/Aysuyu8 +QPvABhXv9ooAwKBZo18b0C2JuBjQLvk/8viSAJ0A//n8DaAKBQDAoMDaDZ00/WEGFe/5wgCPEC/8 +QP/ABhXv9aYAAABsEAYS0CIX0J/1oFYFoBOVAPhQyBWgpiUAKiKCf6cgKyKCf7cYKiKELKAIJaAH +dsE3iETAoAuAAAUzDGU/2tEPLSKEKSKHKiKH+WAABPuqgQB6mTAK6jArQkHDwgy7KKuq+puGFa/+ +6gAuoQsu7PgODkPu7Pwi6/0AAP+iAAq//s4AAAAADAIALyKCf//FJdAHblu/3HD6AKIdoAsFAP6g +ABcw/wUAWaeeJVzxylsoCnGYEcChWZt++iAoFeAJ9QAJWTaZEAm7DPogJhXgCgUAWYBkihAKVQxl +X9fAoVmbdPoOIh3gCgUAWYBeY/9lAABsEAYoIAUvIAfBlPkAFM1h/wEA9CAmFaeFAQCYEvUAD7kS +AJ0AiSIdz9rmz9wfoASAAOvP2RyRlgAA9eAPQhAHtQDvFgAv1wKAAKaqLKKeC/sKK7K/94AVu+IA +nQAsop0LywHntAAFkomAAI7Y98AS+JIAnQAsYq7q0EgWECmAAC9irSui5+v8AQdD/QAA++APjmIA +nQCY2PvgD6ZiAJ0AKyAUKTAHq5kJCUcpJBT1IBG10gCdAB/QOZ9wiSD8AIId4AUVAOV2AizOAoAA +DZkCmXGINhnQMyyiGv+flgWiiB0ACYgBqMz84GYVoCsFAO4AFQPIQQAACQCKm3cZz7vpdgYh4MEA +AOwHHgPAgQAACAJj7uMFA+DBAAAMAmEvdhCIIOV2EixGAoAADYgCKHYRjDMqohgMjBSsqup2EyP5 +gQAA7gAVA9FBAAAKAIopdhbrdhch0EEAAApghg8CZwpAhg8CZS0wAY8zGM/Z8aAFB9AchQAtIAcV +0Av6RIQVoN0RAOMxAS7qgoAACN0CLXYgiyApdiIsdiP9YAAVsAw1AAy7Aut2ISPIBwAA7uMFBMpB +AAAJAmEJAmEuIAcoIQny5SYV4BmlAP7lBhXgCwUA63YlLEUCgAD5BgAMce4BAOh2Ji90AoAADq4C +Be4C/uSGFaAJtQDsEgIqbwKAAKbdKdad+YAHqVIAnQDAINEPAAD//4QNoAmFAC4iHWTuBv4gBhXg +A+4Ajtj3wAfgkgCdAAxKEaaqKKKe9wAIo+IAnQAsop0LSAoogr8IzAHrxAAGCEGAALDpmdjntAAN +8H4AAP4gBhXgAVIA6iQACdgEgADsEgEq6ASAAFhk/dKg0Q8AAMDAwLoL6zTr1ggucKYAAPpAaB2g +G8UA/AAiHaANFQBYacFj/8EAAOokAArYBIAAWGaW0qDRDwCLEPpAaB2gDBUA+2MAFeANtQBYabdj +/5fAoFmiYB3PLo7Y+d/suJIAnQBj/6oAAADrxAAJUASAAFvoU/ufUgWv9v4AiieNEcDA6qwgLtgE +gABYXpHSoNEP//U8DaALBQAAAAAAAFv+/P4gCBXv9AYA/iAGFeAKBQBZokgdzxeO2I8QG88X+d/3 +eJIAnQD//DwNoAsFAAAAAP/74A2gDAUAwMoM7DT9oQYVr/veAAAAAGwQCuQiBypQBIAAiCL+QPAV +r88FAOVBFS1nAoAA7DwIAiCBAAAPRAGkVORMQC5YBIAA9YAl0qHuAQAtsAfs3P4tsASAAOSACGbo +DQAAwCDRDx/O9e0WACXAgQAAmBMdzvT1ACSaogCdAOXO8h8gBIAA9cAfYhIAnQAM6xGluymynu4W +ASZAIQAA+SAlm6IAnQArsp0N6Aoogr8IuwHntAAFoBmAAI34mhTTD/egIsiSAJ0AKVKu689eFKBB +gAAuUq0vsucbztkP6AHoFgImy/0AAP/AH4ZiAJ0Ambj/wB/GYgCdAC4gFC1gB67d+iCGFafdAQAt +JBT1oCFt0gCdABnPGh/PTo4giDTtzt0aXwKAAOW7CA92AoAA8QAE+lAFNQCDYyohJAXsAiggBy5h +AfzgRhXgFIUAlHP84CYVoIgRAOzO5xxCgoAA+QYADHAEBQD44AYVoAglAOwABQPgQQAAbYoCDAJh +LSEJLCAHlHX+4SYVoDilAON2CC7tAoAA+aYADrHMAQDtdgYuZAKAAAyqAg+qApp0KSEJAioC/sAk +FaAMBQDltp0s3QKAAPlmAA2wDQUAWGXqwCDRD4gTiID1gCAVoIkVAPXGAAo3iMEAeYkZlHHvzxcW +S/0AAP7gBhXhmR0A+OBGFeAAUgCUcYgTGc8TmXCIgQhYFJhyjzYZzwwoIgcUzwwpkhr1AqQV4v8d +AAT/ASUWBg+ZCO+CCSRAgQAA+OBmFe/JBQDpiAEFIAkAAOgWBSonAoAABP8ICFUI7KkIAqkBAADl +8wp0yAkAACgSBgj/DOoWBCzPAoAABJkM5JBFbicCgADvSAgDyEEAAJkX+KAOyqIAnQAPVQwFThTT +D23pBQ8AhgkCYYkVDs8Mp1jsjBAkyQEAAG35BQkghgwCYy4iAAjuERjO4vTgAESwDxUA/yDGFeAM +RQAM7AKYlBjO25yVjGMoghgVzt7/nOYF6MwdAKyImJcYztnvABUE8IEAAP+dsgXgDAUAsczugx4O +D+gAAP0hRhXgLAUAnJuHY4Q0jDUIRAHvzAELwkKAAAhEAgVEApScKGAJLmALJGAKJWAI787JH3EC +gADmRBAMQwKAAP0GAAwwxTEA7kQCDmHCgAAMRAIIRAKMNhjOaJSd9GFIFaXlHQDvzAEPcEKAAA7M +Av0hxhWkVQEA6EQBCqoCgAAFRAKIZZifhWYllhCPZySWEi+WEY5kLpYTLGAB8YAEp9IAnQAsIAce +znLywCQV4MwRAO8hJC5igoAADswCLJYUiCD+AwIdoAw1AO6WFyxGAoAADIgCHM5E/SLGFeAOBQD5 +IqYVoAglAOwABQThgQAAbYoCDAJhKCEJmhQtIAf7AAAUMBylAAyIAiiWGvmdGgWh3QEA7pYZLuwC +gAAN/QII3QKIECOWHSeWHO2WGCRADQAAmBCOFI8QL7adLWAHiif/oABGsAwFAOvUAAVQgQAAWF1n +0qDRDwAAZM5WbckFD0CGCQJlY/5EjfiaFPegBviSAJ0ADEsRpbsosp64yfkAB6viAJ0AGM3sKbKd +CEgKKIK/CJkB65QABIcxgACw2Zn417DuFgEt4C4AAI0QixH6QGgdoAwVAO3cAyXYYQAAWGhhwCDR +DwAAAMDgnhKIEhvN2MCaCdk06bYILGCGAAD6QGgdoBvFAPwAIh2gDRUAWGhVwCDRDwD1jwAN/+0a +AAWLDPogZhXv7aoAAAAAAAD8IQYVoAoFAFmg9h/NxY34ihSMGPm/3JiSAJ0AY/+wAJwY6xICKVAE +gABb5umKFPwhCBWv7xIAAP/tZA2gCwUAnhH8IQYVoAoFAFmg5h/NtIoUjfiMGI4R+b/4SJIAnQD/ +/LgNoAsFAP/8aA2gCQUAwIoI2DT54QYVr/xmAAAAAGwQBikgBSYgB9gw9gBiHeAaRQD7IA/NIWYB +AAUJR/0jAAFfxQUAiyITzaEZzZ/kZAAFg7GAAMAg0Q+IJ4uILoEV6YILJHiBAAAF+gHq7ggKbwKA +AOoWACdxAQAA+yAORGIAnQAsiRSdEavarcwshRT7wA4jogCdAMk0yULZsG1JBQMAhgkCYSwSASry +AAyqCP9AESQiAJ0AmvDTsPhgaB2v/hoAAAAAAOxqEQMk/QAAA6oILaKeCWsKK7K/96ALAdIAnQAq +op0PAgALqgFloE/rbBgpUASAAPwAIh2gDTUAWGf1wCDRDwAAAAAdzW2L2JgS92AMkJIAnQAMShGj *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 23 23:46:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 736DBD79DC1; Tue, 23 May 2017 23:46:18 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "StartCom Class 2 IV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DD5C1EA5; Tue, 23 May 2017 23:46:18 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id AE130BB4; Tue, 23 May 2017 18:46:15 -0500 (CDT) Date: Tue, 23 May 2017 18:46:14 -0500 From: Mark Linimon To: Allan Jude Cc: Alexey Dokuchaev , Ed Maste , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318757 - head Message-ID: <20170523234614.GA7981@lonesome.com> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170523213306.GA74154@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 23:46:18 -0000 On Tue, May 23, 2017 at 05:39:50PM -0400, Allan Jude wrote: > The project also includes fixing a number of other long-standing- > because-of-ABI changes, like the max length of a mountpoint is now > 1024 instead of some small value (60 or 80 or something it was before) It was around 80. I hit that while trying to run poudriere under jails using ZFS (on what was then PC-BSD). Of course I could have re-done my entire ZFS hierarchy, but I was several years into using it the exact way I had laid it out by that point. I simply installed onto another machine; it was easier. mcl From owner-svn-src-all@freebsd.org Wed May 24 00:00:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47CC2D7A677; Wed, 24 May 2017 00:00:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F02611693; Wed, 24 May 2017 00:00:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O00tlQ091894; Wed, 24 May 2017 00:00:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O00t5j091891; Wed, 24 May 2017 00:00:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705240000.v4O00t5j091891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 May 2017 00:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318763 - in stable/11/sys: amd64/conf i386/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 00:00:57 -0000 Author: jhb Date: Wed May 24 00:00:55 2017 New Revision: 318763 URL: https://svnweb.freebsd.org/changeset/base/318763 Log: MFC 310177: Enable EARLY_AP_STARTUP on amd64 and i386 kernels by default. PR: 199321, 203682 Discussed with: re (kib) Relnotes: yes Modified: stable/11/sys/amd64/conf/GENERIC stable/11/sys/amd64/conf/MINIMAL stable/11/sys/i386/conf/GENERIC Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/conf/GENERIC ============================================================================== --- stable/11/sys/amd64/conf/GENERIC Tue May 23 23:40:17 2017 (r318762) +++ stable/11/sys/amd64/conf/GENERIC Wed May 24 00:00:55 2017 (r318763) @@ -85,6 +85,7 @@ options KDB_TRACE # Print a stack trac # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel options DEVICE_NUMA # I/O Device Affinity +options EARLY_AP_STARTUP # CPU frequency control device cpufreq Modified: stable/11/sys/amd64/conf/MINIMAL ============================================================================== --- stable/11/sys/amd64/conf/MINIMAL Tue May 23 23:40:17 2017 (r318762) +++ stable/11/sys/amd64/conf/MINIMAL Wed May 24 00:00:55 2017 (r318763) @@ -93,6 +93,7 @@ options MALLOC_DEBUG_MAXZONES=8 # Separ # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel options DEVICE_NUMA # I/O Device Affinity +options EARLY_AP_STARTUP # CPU frequency control device cpufreq Modified: stable/11/sys/i386/conf/GENERIC ============================================================================== --- stable/11/sys/i386/conf/GENERIC Tue May 23 23:40:17 2017 (r318762) +++ stable/11/sys/i386/conf/GENERIC Wed May 24 00:00:55 2017 (r318763) @@ -85,6 +85,7 @@ options KDB_TRACE # Print a stack trac # To make an SMP kernel, the next two lines are needed options SMP # Symmetric MultiProcessor Kernel device apic # I/O APIC +options EARLY_AP_STARTUP # CPU frequency control device cpufreq From owner-svn-src-all@freebsd.org Wed May 24 00:36:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FF8AD6B1E4; Wed, 24 May 2017 00:36:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 355E218A4; Wed, 24 May 2017 00:36:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O0aRIK006104; Wed, 24 May 2017 00:36:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O0aRLM006103; Wed, 24 May 2017 00:36:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705240036.v4O0aRLM006103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 May 2017 00:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318764 - stable/11/lib/libsysdecode X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 00:36:28 -0000 Author: jhb Date: Wed May 24 00:36:27 2017 New Revision: 318764 URL: https://svnweb.freebsd.org/changeset/base/318764 Log: MFC 315283: Fix sysdecode_cap_rights which currently prints bogus capability rights. PR: 217787 Modified: stable/11/lib/libsysdecode/flags.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/flags.c ============================================================================== --- stable/11/lib/libsysdecode/flags.c Wed May 24 00:00:55 2017 (r318763) +++ stable/11/lib/libsysdecode/flags.c Wed May 24 00:36:27 2017 (r318764) @@ -963,23 +963,15 @@ sysdecode_umtx_rwlock_flags(FILE *fp, u_ return (print_mask_0ul(fp, umtxrwlockflags, flags, rem)); } -/* XXX: This should be in */ -#define CAPMASK(right) ((right) & (((uint64_t)1 << 57) - 1)) - void sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp) { struct name_table *t; - int idx; bool comma; comma = false; for (t = caprights; t->str != NULL; t++) { - idx = ffs(CAPIDXBIT(t->val)) - 1; - if (CAPARSIZE(rightsp) < idx) - continue; - if ((rightsp->cr_rights[CAPIDXBIT(t->val)] & CAPMASK(t->val)) == - CAPMASK(t->val)) { + if (cap_rights_is_set(rightsp, t->val)) { fprintf(fp, "%s%s", comma ? "," : "", t->str); comma = true; } From owner-svn-src-all@freebsd.org Wed May 24 00:58:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7456D6B85D; Wed, 24 May 2017 00:58:32 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6646C1262; Wed, 24 May 2017 00:58:32 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O0wVoC014507; Wed, 24 May 2017 00:58:31 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O0wUMW014502; Wed, 24 May 2017 00:58:30 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201705240058.v4O0wUMW014502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 24 May 2017 00:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318765 - in head: lib/libc/sys share/man/man4 sys/compat/freebsd32 sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 00:58:32 -0000 Author: allanjude Date: Wed May 24 00:58:30 2017 New Revision: 318765 URL: https://svnweb.freebsd.org/changeset/base/318765 Log: Allow cpuset_{get,set}affinity in capabilities mode bhyve was recently sandboxed with capsicum, and needs to be able to control the CPU sets of its vcpu threads Reviewed by: emaste, oshogbo, rwatson MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D10170 Modified: head/lib/libc/sys/cpuset_getaffinity.2 head/share/man/man4/capsicum.4 head/sys/compat/freebsd32/capabilities.conf head/sys/kern/capabilities.conf head/sys/kern/kern_cpuset.c Modified: head/lib/libc/sys/cpuset_getaffinity.2 ============================================================================== --- head/lib/libc/sys/cpuset_getaffinity.2 Wed May 24 00:36:27 2017 (r318764) +++ head/lib/libc/sys/cpuset_getaffinity.2 Wed May 24 00:58:30 2017 (r318765) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 2, 2016 +.Dd May 23, 2017 .Dt CPUSET_GETAFFINITY 2 .Os .Sh NAME @@ -148,8 +148,14 @@ was either preposterously large or small .It Bq Er EPERM The calling process did not have the credentials required to complete the operation. +.It Bq Er ECAPMODE +The calling process attempted to act on a process other than itself, while +in capability mode. +See +.Xr capsicum 4 . .El .Sh SEE ALSO +.Xr capsicum 4 , .Xr cpuset 1 , .Xr cpuset 2 , .Xr cpuset_getid 2 , Modified: head/share/man/man4/capsicum.4 ============================================================================== --- head/share/man/man4/capsicum.4 Wed May 24 00:36:27 2017 (r318764) +++ head/share/man/man4/capsicum.4 Wed May 24 00:58:30 2017 (r318765) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 5, 2016 +.Dd May 18, 2017 .Dt CAPSICUM 4 .Os .Sh NAME @@ -88,6 +88,16 @@ An extension to the POSIX shared memory associated with file descriptors; described in greater detail in .Xr shm_open 2 . .El +.Pp +In some cases, +.Nm +limits the valid values of some parameters to traditional APIs in order to +restrict access to global namespaces: +.Bl -tag -width indent +.It process IDs +Processes can only act upon their own process ID with syscalls such as +.Xr cpuset_setaffinity 2 . +.El .Sh SEE ALSO .Xr cap_enter 2 , .Xr cap_fcntls_limit 2 , Modified: head/sys/compat/freebsd32/capabilities.conf ============================================================================== --- head/sys/compat/freebsd32/capabilities.conf Wed May 24 00:36:27 2017 (r318764) +++ head/sys/compat/freebsd32/capabilities.conf Wed May 24 00:58:30 2017 (r318765) @@ -76,9 +76,9 @@ close closefrom connectat #cpuset -#freebsd32_cpuset_getaffinity +freebsd32_cpuset_getaffinity #freebsd32_cpuset_getid -#freebsd32_cpuset_setaffinity +freebsd32_cpuset_setaffinity #freebsd32_cpuset_setid dup dup2 Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Wed May 24 00:36:27 2017 (r318764) +++ head/sys/kern/capabilities.conf Wed May 24 00:58:30 2017 (r318765) @@ -133,13 +133,12 @@ closefrom connectat ## -## cpuset(2) and related calls require scoping by process, but should -## eventually be allowed, at least in the current process case. +## cpuset(2) and related calls are limited to caller's own process/thread. ## #cpuset -#cpuset_getaffinity +cpuset_getaffinity #cpuset_getid -#cpuset_setaffinity +cpuset_setaffinity #cpuset_setid ## Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Wed May 24 00:36:27 2017 (r318764) +++ head/sys/kern/kern_cpuset.c Wed May 24 00:58:30 2017 (r318765) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -522,6 +523,7 @@ cpuset_setproc(pid_t pid, struct cpuset int threads; int nfree; int error; + /* * The algorithm requires two passes due to locking considerations. * @@ -1096,6 +1098,15 @@ kern_cpuset_getaffinity(struct thread *t if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); + /* In Capability mode, you can only get your own CPU set. */ + if (IN_CAPABILITY_MODE(td)) { + if (level != CPU_LEVEL_WHICH) + return (ECAPMODE); + if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) + return (ECAPMODE); + if (id != -1) + return (ECAPMODE); + } size = cpusetsize; mask = malloc(size, M_TEMP, M_WAITOK | M_ZERO); error = cpuset_which(which, id, &p, &ttd, &set); @@ -1204,6 +1215,15 @@ kern_cpuset_setaffinity(struct thread *t if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); + /* In Capability mode, you can only set your own CPU set. */ + if (IN_CAPABILITY_MODE(td)) { + if (level != CPU_LEVEL_WHICH) + return (ECAPMODE); + if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) + return (ECAPMODE); + if (id != -1) + return (ECAPMODE); + } mask = malloc(cpusetsize, M_TEMP, M_WAITOK | M_ZERO); error = copyin(maskp, mask, cpusetsize); if (error) From owner-svn-src-all@freebsd.org Wed May 24 01:01:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2A20D6B9D9; Wed, 24 May 2017 01:01:44 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF5A41682; Wed, 24 May 2017 01:01:44 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O11hYK014720; Wed, 24 May 2017 01:01:43 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O11hSq014719; Wed, 24 May 2017 01:01:43 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201705240101.v4O11hSq014719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 24 May 2017 01:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318766 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 01:01:45 -0000 Author: kevlo Date: Wed May 24 01:01:43 2017 New Revision: 318766 URL: https://svnweb.freebsd.org/changeset/base/318766 Log: Remove duplicate definition of iflib_led_create(). Modified: head/share/man/man9/iflibdi.9 Modified: head/share/man/man9/iflibdi.9 ============================================================================== --- head/share/man/man9/iflibdi.9 Wed May 24 00:58:30 2017 (r318765) +++ head/share/man/man9/iflibdi.9 Wed May 24 01:01:43 2017 (r318766) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd March 23, 2017 +.Dd May 24, 2017 .Dt IFLIBDI 9 .Os .Sh NAME @@ -81,10 +81,6 @@ .Fa "int linkstate" .Fc .Ft void -.Fo iflib_led_create -.Fa "if_ctx_t ctx" -.Fc -.Ft void .Fo iflib_add_int_delay_sysctl .Fa "if_ctx_t ctx" .Fa "const char *" From owner-svn-src-all@freebsd.org Wed May 24 01:01:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B950CD6BA32; Wed, 24 May 2017 01:01:58 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 951AF17A0; Wed, 24 May 2017 01:01:58 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O11vYK017706; Wed, 24 May 2017 01:01:57 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O11vgG017704; Wed, 24 May 2017 01:01:57 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201705240101.v4O11vgG017704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 24 May 2017 01:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318767 - in head/sys: compat/freebsd32 kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 01:01:58 -0000 Author: allanjude Date: Wed May 24 01:01:57 2017 New Revision: 318767 URL: https://svnweb.freebsd.org/changeset/base/318767 Log: Followup to r318765 (capsicumize cpuset_*affinity) Update *sysent files Modified: head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Wed May 24 01:01:43 2017 (r318766) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Wed May 24 01:01:57 2017 (r318767) @@ -558,8 +558,8 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_cpuset_setid_args), (sy_call_t *)freebsd32_cpuset_setid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 485 = freebsd32_cpuset_setid */ #endif { AS(freebsd32_cpuset_getid_args), (sy_call_t *)freebsd32_cpuset_getid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 486 = freebsd32_cpuset_getid */ - { AS(freebsd32_cpuset_getaffinity_args), (sy_call_t *)freebsd32_cpuset_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 487 = freebsd32_cpuset_getaffinity */ - { AS(freebsd32_cpuset_setaffinity_args), (sy_call_t *)freebsd32_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 488 = freebsd32_cpuset_setaffinity */ + { AS(freebsd32_cpuset_getaffinity_args), (sy_call_t *)freebsd32_cpuset_getaffinity, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 487 = freebsd32_cpuset_getaffinity */ + { AS(freebsd32_cpuset_setaffinity_args), (sy_call_t *)freebsd32_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 488 = freebsd32_cpuset_setaffinity */ { AS(faccessat_args), (sy_call_t *)sys_faccessat, AUE_FACCESSAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 489 = faccessat */ { AS(fchmodat_args), (sy_call_t *)sys_fchmodat, AUE_FCHMODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 490 = fchmodat */ { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 491 = fchownat */ Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Wed May 24 01:01:43 2017 (r318766) +++ head/sys/kern/init_sysent.c Wed May 24 01:01:57 2017 (r318767) @@ -538,8 +538,8 @@ struct sysent sysent[] = { { AS(cpuset_args), (sy_call_t *)sys_cpuset, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 484 = cpuset */ { AS(cpuset_setid_args), (sy_call_t *)sys_cpuset_setid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 485 = cpuset_setid */ { AS(cpuset_getid_args), (sy_call_t *)sys_cpuset_getid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 486 = cpuset_getid */ - { AS(cpuset_getaffinity_args), (sy_call_t *)sys_cpuset_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 487 = cpuset_getaffinity */ - { AS(cpuset_setaffinity_args), (sy_call_t *)sys_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 488 = cpuset_setaffinity */ + { AS(cpuset_getaffinity_args), (sy_call_t *)sys_cpuset_getaffinity, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 487 = cpuset_getaffinity */ + { AS(cpuset_setaffinity_args), (sy_call_t *)sys_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 488 = cpuset_setaffinity */ { AS(faccessat_args), (sy_call_t *)sys_faccessat, AUE_FACCESSAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 489 = faccessat */ { AS(fchmodat_args), (sy_call_t *)sys_fchmodat, AUE_FCHMODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 490 = fchmodat */ { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 491 = fchownat */ From owner-svn-src-all@freebsd.org Wed May 24 01:02:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 019A6D6BBF4; Wed, 24 May 2017 01:02:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B918F19F8; Wed, 24 May 2017 01:02:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O12ZgX018442; Wed, 24 May 2017 01:02:35 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O12ZA9018441; Wed, 24 May 2017 01:02:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705240102.v4O12ZA9018441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 24 May 2017 01:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318768 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 01:02:37 -0000 Author: adrian Date: Wed May 24 01:02:35 2017 New Revision: 318768 URL: https://svnweb.freebsd.org/changeset/base/318768 Log: [ath] begin migration of AHB support to use the PCI style board data API for calibration data. This brings the AHB support in line with the PCI support - now other "things" can wrap up the calibration / board data into a firmware blob and have them probe/attach after the system has finished booting. Note that this change requires /all/ of the AHB using kernel configurations to change - so until I drop those changes in, this breaks AHB. Fear not, I'll do that soon. TODO: * the above stuff. Tested: * AR9331, carambola 2, loading if_ath / wlan as modules at run time Modified: head/sys/dev/ath/if_ath_ahb.c Modified: head/sys/dev/ath/if_ath_ahb.c ============================================================================== --- head/sys/dev/ath/if_ath_ahb.c Wed May 24 01:01:57 2017 (r318767) +++ head/sys/dev/ath/if_ath_ahb.c Wed May 24 01:02:35 2017 (r318768) @@ -66,6 +66,12 @@ __FBSDID("$FreeBSD$"); #include #include +/* For EEPROM firmware */ +#ifdef ATH_EEPROM_FIRMWARE +#include +#include +#endif /* ATH_EEPROM_FIRMWARE */ + /* * bus glue. */ @@ -77,7 +83,6 @@ struct ath_ahb_softc { struct ath_softc sc_sc; struct resource *sc_sr; /* memory resource */ struct resource *sc_irq; /* irq resource */ - struct resource *sc_eeprom; /* eeprom location */ void *sc_ih; /* interrupt handler */ }; @@ -132,10 +137,11 @@ ath_ahb_attach(device_t dev) struct ath_softc *sc = &psc->sc_sc; int error = ENXIO; int rid; - long eepromaddr; - int eepromsize; - uint8_t *p; int device_id, vendor_id; +#ifdef ATH_EEPROM_FIRMWARE + const struct firmware *fw = NULL; + const char *buf; +#endif sc->sc_dev = dev; @@ -146,44 +152,6 @@ ath_ahb_attach(device_t dev) goto bad; } - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - "eepromaddr", &eepromaddr) != 0) { - device_printf(dev, "cannot fetch 'eepromaddr' from hints\n"); - goto bad0; - } - - /* - * The default EEPROM size is 2048 * 16 bit words. - * Later EEPROM/OTP/flash regions may be quite a bit bigger. - */ - if (resource_int_value(device_get_name(dev), device_get_unit(dev), - "eepromsize", &eepromsize) != 0) { - eepromsize = ATH_EEPROM_DATA_SIZE * 2; - } - - rid = 0; - device_printf(sc->sc_dev, "eeprom @ %p (%d bytes)\n", - (void *) eepromaddr, eepromsize); - /* - * XXX this assumes that the parent device is the nexus - * and will just pass through requests for all of memory. - * - * Later on, when this has to attach off of the actual - * AHB, this won't work. - * - * Ideally this would be done in machdep code in mips/atheros/ - * and it'd expose the EEPROM via the firmware interface, - * so the ath/ath_ahb drivers can be loaded as modules - * after boot-time. - */ - psc->sc_eeprom = bus_alloc_resource(dev, SYS_RES_MEMORY, - &rid, (uintptr_t) eepromaddr, - (uintptr_t) eepromaddr + (uintptr_t) (eepromsize - 1), 0, RF_ACTIVE); - if (psc->sc_eeprom == NULL) { - device_printf(dev, "cannot map eeprom space\n"); - goto bad0; - } - sc->sc_st = (HAL_BUS_TAG) rman_get_bustag(psc->sc_sr); sc->sc_sh = (HAL_BUS_HANDLE) rman_get_bushandle(psc->sc_sr); /* @@ -192,22 +160,35 @@ ath_ahb_attach(device_t dev) */ sc->sc_invalid = 1; - /* Copy the EEPROM data out */ - sc->sc_eepromdata = malloc(eepromsize, M_TEMP, M_NOWAIT | M_ZERO); - if (sc->sc_eepromdata == NULL) { - device_printf(dev, "cannot allocate memory for eeprom data\n"); - goto bad1; +#ifdef ATH_EEPROM_FIRMWARE + /* + * If there's an EEPROM firmware image, load that in. + */ + if (resource_string_value(device_get_name(dev), device_get_unit(dev), + "eeprom_firmware", &buf) == 0) { + device_printf(dev, "%s: looking up firmware @ '%s'\n", + __func__, buf); + + fw = firmware_get(buf); + if (fw == NULL) { + device_printf(dev, "%s: couldn't find firmware\n", + __func__); + goto bad1; + } + + device_printf(dev, "%s: EEPROM firmware @ %p\n", + __func__, fw->data); + sc->sc_eepromdata = + malloc(fw->datasize, M_TEMP, M_WAITOK | M_ZERO); + if (! sc->sc_eepromdata) { + device_printf(dev, "%s: can't malloc eepromdata\n", + __func__); + goto bad1; + } + memcpy(sc->sc_eepromdata, fw->data, fw->datasize); + firmware_put(fw, 0); } - device_printf(sc->sc_dev, "eeprom data @ %p\n", (void *) rman_get_bushandle(psc->sc_eeprom)); - /* XXX why doesn't this work? -adrian */ -#if 0 - bus_space_read_multi_1( - rman_get_bustag(psc->sc_eeprom), - rman_get_bushandle(psc->sc_eeprom), - 0, (u_int8_t *) sc->sc_eepromdata, eepromsize); -#endif - p = (void *) rman_get_bushandle(psc->sc_eeprom); - memcpy(sc->sc_eepromdata, p, eepromsize); +#endif /* ATH_EEPROM_FIRMWARE */ /* * Arrange interrupt line. @@ -278,8 +259,6 @@ bad3: bad2: bus_release_resource(dev, SYS_RES_IRQ, 0, psc->sc_irq); bad1: - bus_release_resource(dev, SYS_RES_MEMORY, 0, psc->sc_eeprom); -bad0: bus_release_resource(dev, SYS_RES_MEMORY, 0, psc->sc_sr); bad: /* XXX?! */ @@ -305,7 +284,6 @@ ath_ahb_detach(device_t dev) bus_dma_tag_destroy(sc->sc_dmat); bus_release_resource(dev, SYS_RES_MEMORY, 0, psc->sc_sr); - bus_release_resource(dev, SYS_RES_MEMORY, 0, psc->sc_eeprom); /* XXX?! */ if (sc->sc_eepromdata) free(sc->sc_eepromdata, M_TEMP); From owner-svn-src-all@freebsd.org Wed May 24 01:03:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33C49D6BC70; Wed, 24 May 2017 01:03:32 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE5211B4C; Wed, 24 May 2017 01:03:31 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O13UP3018518; Wed, 24 May 2017 01:03:30 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O13UGx018517; Wed, 24 May 2017 01:03:30 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201705240103.v4O13UGx018517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 24 May 2017 01:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318769 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 01:03:32 -0000 Author: kevlo Date: Wed May 24 01:03:30 2017 New Revision: 318769 URL: https://svnweb.freebsd.org/changeset/base/318769 Log: Add missing MLINKS for functions decribed in iflibdd(9), iflibdi(9), and iflibtxrx(9). Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Wed May 24 01:02:35 2017 (r318768) +++ head/share/man/man9/Makefile Wed May 24 01:03:30 2017 (r318769) @@ -963,6 +963,61 @@ MLINKS+=ieee80211_scan.9 ieee80211_add_s MLINKS+=ieee80211_vap.9 ieee80211_vap_attach.9 \ ieee80211_vap.9 ieee80211_vap_detach.9 \ ieee80211_vap.9 ieee80211_vap_setup.9 +MLINKS+=iflibdd.9 ifdi_attach_pre.9 \ + iflibdd.9 ifdi_attach_post.9 \ + iflibdd.9 ifdi_detach.9 \ + iflibdd.9 ifdi_get_counter.9 \ + iflibdd.9 ifdi_i2c_req.9 \ + iflibdd.9 ifdi_init.9 \ + iflibdd.9 ifdi_intr_enable.9 \ + iflibdd.9 ifdi_intr_disable.9 \ + iflibdd.9 ifdi_led_func.9 \ + iflibdd.9 ifdi_link_intr_enable.9 \ + iflibdd.9 ifdi_media_set.9 \ + iflibdd.9 ifdi_media_status.9 \ + iflibdd.9 ifdi_media_change.9 \ + iflibdd.9 ifdi_mtu_set.9 \ + iflibdd.9 ifdi_multi_set.9 \ + iflibdd.9 ifdi_promisc_set.9 \ + iflibdd.9 ifdi_queues_alloc.9 \ + iflibdd.9 ifdi_queues_free.9 \ + iflibdd.9 ifdi_queue_intr_enable.9 \ + iflibdd.9 ifdi_resume.9 \ + iflibdd.9 ifdi_rxq_setup.9 \ + iflibdd.9 ifdi_stop.9 \ + iflibdd.9 ifdi_suspend.9 \ + iflibdd.9 ifdi_sysctl_int_delay.9 \ + iflibdd.9 ifdi_timer.9 \ + iflibdd.9 ifdi_txq_setup.9 \ + iflibdd.9 ifdi_update_admin_status.9 \ + iflibdd.9 ifdi_vf_add.9 \ + iflibdd.9 ifdi_vflr_handle.9 \ + iflibdd.9 ifdi_vlan_register.9 \ + iflibdd.9 ifdi_vlan_unregister.9 \ + iflibdd.9 ifdi_watchdog_reset.9 \ + iflibdd.9 iov_init.9 \ + iflibdd.9 iov_uinit.9 +MLINKS+=iflibdi.9 iflib_add_int_delay_sysctl.9 \ + iflibdi.9 iflib_device_attach.9 \ + iflibdi.9 iflib_device_deregister.9 \ + iflibdi.9 iflib_device_detach.9 \ + iflibdi.9 iflib_device_suspend.9 \ + iflibdi.9 iflib_device_register.9 \ + iflibdi.9 iflib_device_resume.9 \ + iflibdi.9 iflib_led_create.9 \ + iflibdi.9 iflib_irq_alloc.9 \ + iflibdi.9 iflib_irq_alloc_generic.9 \ + iflibdi.9 iflib_link_intr_deferred.9 \ + iflibdi.9 iflib_link_state_change.9 \ + iflibdi.9 iflib_rx_intr_deferred.9 \ + iflibdi.9 iflib_tx_intr_deferred.9 +MLINKS+=iflibtxrx.9 isc_rxd_available.9 \ + iflibtxrx.9 isc_rxd_refill.9 \ + iflibtxrx.9 isc_rxd_flush.9 \ + iflibtxrx.9 isc_rxd_pkt_get.9 \ + iflibtxrx.9 isc_txd_credits_update.9 \ + iflibtxrx.9 isc_txd_encap.9 \ + iflibtxrx.9 isc_txd_flush.9 MLINKS+=ifnet.9 if_addmulti.9 \ ifnet.9 if_alloc.9 \ ifnet.9 if_allmulti.9 \ From owner-svn-src-all@freebsd.org Wed May 24 01:06:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6147D6BD1A; Wed, 24 May 2017 01:06:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B635D1CF2; Wed, 24 May 2017 01:06:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O169YJ018662; Wed, 24 May 2017 01:06:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O169cZ018661; Wed, 24 May 2017 01:06:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705240106.v4O169cZ018661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 May 2017 01:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318770 - stable/11/lib/libsysdecode X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 01:06:11 -0000 Author: jhb Date: Wed May 24 01:06:09 2017 New Revision: 318770 URL: https://svnweb.freebsd.org/changeset/base/318770 Log: MFC 315310: Spell "const" properly. PR: 217797 Modified: stable/11/lib/libsysdecode/sysdecode_ioctlname.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/sysdecode_ioctlname.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_ioctlname.3 Wed May 24 01:03:30 2017 (r318769) +++ stable/11/lib/libsysdecode/sysdecode_ioctlname.3 Wed May 24 01:06:09 2017 (r318770) @@ -37,7 +37,7 @@ .In sys/types.h .In stdbool.h .In sysdecode.h -.Ft conts char * +.Ft const char * .Fn sysdecode_ioctlname "unsigned long request" .Sh DESCRIPTION The From owner-svn-src-all@freebsd.org Wed May 24 03:26:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB384D7B3D1; Wed, 24 May 2017 03:26:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CEB11006; Wed, 24 May 2017 03:26:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O3QF9M076765; Wed, 24 May 2017 03:26:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O3QF5o076764; Wed, 24 May 2017 03:26:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705240326.v4O3QF5o076764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 May 2017 03:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318771 - stable/11/usr.bin/kdump X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 03:26:16 -0000 Author: jhb Date: Wed May 24 03:26:15 2017 New Revision: 318771 URL: https://svnweb.freebsd.org/changeset/base/318771 Log: MFC 315334: Decode arguments to chflagsat(). Modified: stable/11/usr.bin/kdump/kdump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/kdump/kdump.c ============================================================================== --- stable/11/usr.bin/kdump/kdump.c Wed May 24 01:06:09 2017 (r318770) +++ stable/11/usr.bin/kdump/kdump.c Wed May 24 03:26:15 2017 (r318771) @@ -876,6 +876,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in quad_slots = 1; switch (ktr->ktr_code) { case SYS_bindat: + case SYS_chflagsat: case SYS_connectat: case SYS_faccessat: case SYS_fchmodat: @@ -1018,6 +1019,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in narg--; break; case SYS_chflags: + case SYS_chflagsat: case SYS_fchflags: case SYS_lchflags: print_number(ip, narg, c); From owner-svn-src-all@freebsd.org Wed May 24 03:56:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A873CD7BCD0; Wed, 24 May 2017 03:56:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6085010B4; Wed, 24 May 2017 03:56:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O3um6G089439; Wed, 24 May 2017 03:56:48 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O3umks089438; Wed, 24 May 2017 03:56:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705240356.v4O3umks089438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 03:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318772 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 03:56:49 -0000 Author: np Date: Wed May 24 03:56:48 2017 New Revision: 318772 URL: https://svnweb.freebsd.org/changeset/base/318772 Log: MFC r317170, r317389, and r317390. r317170: Remove redundant assignment. r317389: Frames that are not considered for LRO should not be counted in LRO statistics. r317390: Flush the LRO ctrl as soon as lro_mbufs fills up. There is no need to wait for the next enqueue from the driver. Sponsored by: Chelsio Communications Modified: stable/11/sys/netinet/tcp_lro.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_lro.c ============================================================================== --- stable/11/sys/netinet/tcp_lro.c Wed May 24 03:26:15 2017 (r318771) +++ stable/11/sys/netinet/tcp_lro.c Wed May 24 03:56:48 2017 (r318772) @@ -110,7 +110,6 @@ tcp_lro_init_args(struct lro_ctrl *lc, s lc->lro_bad_csum = 0; lc->lro_queued = 0; lc->lro_flushed = 0; - lc->lro_cnt = 0; lc->lro_mbuf_count = 0; lc->lro_mbuf_max = lro_mbufs; lc->lro_cnt = lro_entries; @@ -889,18 +888,12 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, /* check if packet is not LRO capable */ if (__predict_false(mb->m_pkthdr.csum_flags == 0 || (lc->ifp->if_capenable & IFCAP_LRO) == 0)) { - lc->lro_flushed++; - lc->lro_queued++; /* input packet to network layer */ (*lc->ifp->if_input) (lc->ifp, mb); return; } - /* check if array is full */ - if (__predict_false(lc->lro_mbuf_count == lc->lro_mbuf_max)) - tcp_lro_flush_all(lc); - /* create sequence number */ lc->lro_mbuf_data[lc->lro_mbuf_count].seq = (((uint64_t)M_HASHTYPE_GET(mb)) << 56) | @@ -908,7 +901,11 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, ((uint64_t)lc->lro_mbuf_count); /* enter mbuf */ - lc->lro_mbuf_data[lc->lro_mbuf_count++].mb = mb; + lc->lro_mbuf_data[lc->lro_mbuf_count].mb = mb; + + /* flush if array is full */ + if (__predict_false(++lc->lro_mbuf_count == lc->lro_mbuf_max)) + tcp_lro_flush_all(lc); } /* end */ From owner-svn-src-all@freebsd.org Wed May 24 04:42:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BD37D78957; Wed, 24 May 2017 04:42:32 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D5A71713; Wed, 24 May 2017 04:42:32 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O4gVPC010645; Wed, 24 May 2017 04:42:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O4gVqd010644; Wed, 24 May 2017 04:42:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705240442.v4O4gVqd010644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 04:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318773 - stable/11/sys/dev/cxgbe/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 04:42:32 -0000 Author: np Date: Wed May 24 04:42:31 2017 New Revision: 318773 URL: https://svnweb.freebsd.org/changeset/base/318773 Log: MFC r311846: cxgbe(4): Refresh t4_msg.h, mainly for definitions related to the crypto engine. Modified: stable/11/sys/dev/cxgbe/common/t4_msg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_msg.h Wed May 24 03:56:48 2017 (r318772) +++ stable/11/sys/dev/cxgbe/common/t4_msg.h Wed May 24 04:42:31 2017 (r318773) @@ -106,6 +106,7 @@ enum { CPL_RX_FCOE_DIF = 0x4A, CPL_RX_DATA_DIF = 0x4B, CPL_ERR_NOTIFY = 0x4D, + CPL_RX_TLS_CMP = 0x4E, CPL_RDMA_READ_REQ = 0x60, CPL_RX_ISCSI_DIF = 0x60, @@ -113,6 +114,11 @@ enum { CPL_SET_LE_REQ = 0x80, CPL_PASS_OPEN_REQ6 = 0x81, CPL_ACT_OPEN_REQ6 = 0x83, + CPL_TX_TLS_PDU = 0x88, + CPL_TX_TLS_SFO = 0x89, + + CPL_TX_SEC_PDU = 0x8A, + CPL_TX_TLS_ACK = 0x8B, CPL_RDMA_TERMINATE = 0xA2, CPL_RDMA_WRITE = 0xA4, @@ -129,6 +135,7 @@ enum { CPL_TRACE_PKT = 0xB0, CPL_RX2TX_DATA = 0xB1, + CPL_TLS_DATA = 0xB1, CPL_ISCSI_DATA = 0xB2, CPL_FCOE_DATA = 0xB3, @@ -136,6 +143,7 @@ enum { CPL_FW4_PLD = 0xC1, CPL_FW4_ACK = 0xC3, CPL_SRQ_TABLE_RPL = 0xCC, + CPL_RX_PHYS_DSGL = 0xD0, CPL_FW6_MSG = 0xE0, CPL_FW6_PLD = 0xE1, @@ -200,6 +208,7 @@ enum { ULP_MODE_RDMA = 4, ULP_MODE_TCPDDP = 5, ULP_MODE_FCOE = 6, + ULP_MODE_TLS = 8, }; enum { @@ -993,6 +1002,23 @@ struct cpl_abort_req_rss { __u8 status; }; +struct cpl_abort_req_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + +#define S_ABORT_RSS_STATUS 0 +#define M_ABORT_RSS_STATUS 0xff +#define V_ABORT_RSS_STATUS(x) ((x) << S_ABORT_RSS_STATUS) +#define G_ABORT_RSS_STATUS(x) (((x) >> S_ABORT_RSS_STATUS) & M_ABORT_RSS_STATUS) + +#define S_ABORT_RSS_SRQIDX 8 +#define M_ABORT_RSS_SRQIDX 0xffffff +#define V_ABORT_RSS_SRQIDX(x) ((x) << S_ABORT_RSS_SRQIDX) +#define G_ABORT_RSS_SRQIDX(x) (((x) >> S_ABORT_RSS_SRQIDX) & M_ABORT_RSS_SRQIDX) + + /* cpl_abort_req status command code in case of T6, * bit[0] specifies whether to send RST (0) to remote peer or suppress it (1) * bit[1] indicates ABORT_REQ was sent after a CLOSE_CON_REQ @@ -1014,6 +1040,12 @@ struct cpl_abort_rpl_rss { __u8 status; }; +struct cpl_abort_rpl_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + struct cpl_abort_rpl { WR_HDR; union opcode_tid ot; @@ -2612,6 +2644,7 @@ enum { FW_TYPE_RSSCPL = 4, FW_TYPE_WRERR_RPL = 5, FW_TYPE_PI_ERR = 6, + FW_TYPE_TLS_KEY = 7, }; struct cpl_fw2_pld { @@ -2712,7 +2745,8 @@ enum { ULP_TX_SC_IMM = 0x81, ULP_TX_SC_DSGL = 0x82, ULP_TX_SC_ISGL = 0x83, - ULP_TX_SC_PICTRL = 0x84 + ULP_TX_SC_PICTRL = 0x84, + ULP_TX_SC_MEMRD = 0x86 }; #define S_ULPTX_CMD 24 @@ -2763,6 +2797,12 @@ struct ulptx_idata { #define S_ULPTX_NSGE 0 #define M_ULPTX_NSGE 0xFFFF #define V_ULPTX_NSGE(x) ((x) << S_ULPTX_NSGE) +#define G_ULPTX_NSGE(x) (((x) >> S_ULPTX_NSGE) & M_ULPTX_NSGE) + +struct ulptx_sc_memrd { + __be32 cmd_to_len; + __be32 addr; +}; struct ulp_mem_io { WR_HDR; @@ -2817,6 +2857,21 @@ struct ulp_txpkt { }; /* ulp_txpkt.cmd_dest fields */ +#define S_ULP_TXPKT_DATAMODIFY 23 +#define M_ULP_TXPKT_DATAMODIFY 0x1 +#define V_ULP_TXPKT_DATAMODIFY(x) ((x) << S_ULP_TXPKT_DATAMODIFY) +#define G_ULP_TXPKT_DATAMODIFY(x) \ + (((x) >> S_ULP_TXPKT_DATAMODIFY) & M_ULP_TXPKT_DATAMODIFY_) +#define F_ULP_TXPKT_DATAMODIFY V_ULP_TXPKT_DATAMODIFY(1U) + +#define S_ULP_TXPKT_CHANNELID 22 +#define M_ULP_TXPKT_CHANNELID 0x1 +#define V_ULP_TXPKT_CHANNELID(x) ((x) << S_ULP_TXPKT_CHANNELID) +#define G_ULP_TXPKT_CHANNELID(x) \ + (((x) >> S_ULP_TXPKT_CHANNELID) & M_ULP_TXPKT_CHANNELID) +#define F_ULP_TXPKT_CHANNELID V_ULP_TXPKT_CHANNELID(1U) + +/* ulp_txpkt.cmd_dest fields */ #define S_ULP_TXPKT_DEST 16 #define M_ULP_TXPKT_DEST 0x3 #define V_ULP_TXPKT_DEST(x) ((x) << S_ULP_TXPKT_DEST) @@ -3044,4 +3099,542 @@ struct cpl_rx_mps_pkt { #define X_CPL_RX_MPS_PKT_TYPE_QFC (1 << 2) #define X_CPL_RX_MPS_PKT_TYPE_PTP (1 << 3) +struct cpl_tx_tls_sfo { + __be32 op_to_seg_len; + __be32 pld_len; + __be64 rsvd; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +/* cpl_tx_tls_sfo macros */ +#define S_CPL_TX_TLS_SFO_OPCODE 24 +#define M_CPL_TX_TLS_SFO_OPCODE 0xff +#define V_CPL_TX_TLS_SFO_OPCODE(x) ((x) << S_CPL_TX_TLS_SFO_OPCODE) +#define G_CPL_TX_TLS_SFO_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_OPCODE) & M_CPL_TX_TLS_SFO_OPCODE) + +#define S_CPL_TX_TLS_SFO_DATA_TYPE 20 +#define M_CPL_TX_TLS_SFO_DATA_TYPE 0xf +#define V_CPL_TX_TLS_SFO_DATA_TYPE(x) ((x) << S_CPL_TX_TLS_SFO_DATA_TYPE) +#define G_CPL_TX_TLS_SFO_DATA_TYPE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_DATA_TYPE) & M_CPL_TX_TLS_SFO_DATA_TYPE) + +#define S_CPL_TX_TLS_SFO_CPL_LEN 16 +#define M_CPL_TX_TLS_SFO_CPL_LEN 0xf +#define V_CPL_TX_TLS_SFO_CPL_LEN(x) ((x) << S_CPL_TX_TLS_SFO_CPL_LEN) +#define G_CPL_TX_TLS_SFO_CPL_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_CPL_LEN) & M_CPL_TX_TLS_SFO_CPL_LEN) +#define S_CPL_TX_TLS_SFO_SEG_LEN 0 +#define M_CPL_TX_TLS_SFO_SEG_LEN 0xffff +#define V_CPL_TX_TLS_SFO_SEG_LEN(x) ((x) << S_CPL_TX_TLS_SFO_SEG_LEN) +#define G_CPL_TX_TLS_SFO_SEG_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_SEG_LEN) & M_CPL_TX_TLS_SFO_SEG_LEN) + +struct cpl_tls_data { + RSS_HDR + __be32 op_tid; + __be32 length_pkd; + __be32 seq; + __be32 r1; +}; + +#define S_CPL_TLS_DATA_OPCODE 24 +#define M_CPL_TLS_DATA_OPCODE 0xff +#define V_CPL_TLS_DATA_OPCODE(x) ((x) << S_CPL_TLS_DATA_OPCODE) +#define G_CPL_TLS_DATA_OPCODE(x) \ + (((x) >> S_CPL_TLS_DATA_OPCODE) & M_CPL_TLS_DATA_OPCODE) + +#define S_CPL_TLS_DATA_TID 0 +#define M_CPL_TLS_DATA_TID 0xffffff +#define V_CPL_TLS_DATA_TID(x) ((x) << S_CPL_TLS_DATA_TID) +#define G_CPL_TLS_DATA_TID(x) \ + (((x) >> S_CPL_TLS_DATA_TID) & M_CPL_TLS_DATA_TID) + +#define S_CPL_TLS_DATA_LENGTH 0 +#define M_CPL_TLS_DATA_LENGTH 0xffff +#define V_CPL_TLS_DATA_LENGTH(x) ((x) << S_CPL_TLS_DATA_LENGTH) +#define G_CPL_TLS_DATA_LENGTH(x) \ + (((x) >> S_CPL_TLS_DATA_LENGTH) & M_CPL_TLS_DATA_LENGTH) + +struct cpl_rx_tls_cmp { + RSS_HDR + __be32 op_tid; + __be32 pdulength_length; + __be32 seq; + __be32 ddp_report; + __be32 r; + __be32 ddp_valid; +}; + +#define S_CPL_RX_TLS_CMP_OPCODE 24 +#define M_CPL_RX_TLS_CMP_OPCODE 0xff +#define V_CPL_RX_TLS_CMP_OPCODE(x) ((x) << S_CPL_RX_TLS_CMP_OPCODE) +#define G_CPL_RX_TLS_CMP_OPCODE(x) \ + (((x) >> S_CPL_RX_TLS_CMP_OPCODE) & M_CPL_RX_TLS_CMP_OPCODE) + +#define S_CPL_RX_TLS_CMP_TID 0 +#define M_CPL_RX_TLS_CMP_TID 0xffffff +#define V_CPL_RX_TLS_CMP_TID(x) ((x) << S_CPL_RX_TLS_CMP_TID) +#define G_CPL_RX_TLS_CMP_TID(x) \ + (((x) >> S_CPL_RX_TLS_CMP_TID) & M_CPL_RX_TLS_CMP_TID) + +#define S_CPL_RX_TLS_CMP_PDULENGTH 16 +#define M_CPL_RX_TLS_CMP_PDULENGTH 0xffff +#define V_CPL_RX_TLS_CMP_PDULENGTH(x) ((x) << S_CPL_RX_TLS_CMP_PDULENGTH) +#define G_CPL_RX_TLS_CMP_PDULENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_PDULENGTH) & M_CPL_RX_TLS_CMP_PDULENGTH) + +#define S_CPL_RX_TLS_CMP_LENGTH 0 +#define M_CPL_RX_TLS_CMP_LENGTH 0xffff +#define V_CPL_RX_TLS_CMP_LENGTH(x) ((x) << S_CPL_RX_TLS_CMP_LENGTH) +#define G_CPL_RX_TLS_CMP_LENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_LENGTH) & M_CPL_RX_TLS_CMP_LENGTH) + +#define S_SCMD_SEQ_NO_CTRL 29 +#define M_SCMD_SEQ_NO_CTRL 0x3 +#define V_SCMD_SEQ_NO_CTRL(x) ((x) << S_SCMD_SEQ_NO_CTRL) +#define G_SCMD_SEQ_NO_CTRL(x) \ + (((x) >> S_SCMD_SEQ_NO_CTRL) & M_SCMD_SEQ_NO_CTRL) + +/* StsFieldPrsnt- Status field at the end of the TLS PDU */ +#define S_SCMD_STATUS_PRESENT 28 +#define M_SCMD_STATUS_PRESENT 0x1 +#define V_SCMD_STATUS_PRESENT(x) ((x) << S_SCMD_STATUS_PRESENT) +#define G_SCMD_STATUS_PRESENT(x) \ + (((x) >> S_SCMD_STATUS_PRESENT) & M_SCMD_STATUS_PRESENT) +#define F_SCMD_STATUS_PRESENT V_SCMD_STATUS_PRESENT(1U) + +/* ProtoVersion - Protocol Version 0: 1.2, 1:1.1, 2:DTLS, 3:Generic, + * 3-15: Reserved. */ +#define S_SCMD_PROTO_VERSION 24 +#define M_SCMD_PROTO_VERSION 0xf +#define V_SCMD_PROTO_VERSION(x) ((x) << S_SCMD_PROTO_VERSION) +#define G_SCMD_PROTO_VERSION(x) \ + (((x) >> S_SCMD_PROTO_VERSION) & M_SCMD_PROTO_VERSION) + +/* EncDecCtrl - Encryption/Decryption Control. 0: Encrypt, 1: Decrypt */ +#define S_SCMD_ENC_DEC_CTRL 23 +#define M_SCMD_ENC_DEC_CTRL 0x1 +#define V_SCMD_ENC_DEC_CTRL(x) ((x) << S_SCMD_ENC_DEC_CTRL) +#define G_SCMD_ENC_DEC_CTRL(x) \ + (((x) >> S_SCMD_ENC_DEC_CTRL) & M_SCMD_ENC_DEC_CTRL) +#define F_SCMD_ENC_DEC_CTRL V_SCMD_ENC_DEC_CTRL(1U) + +/* CipherAuthSeqCtrl - Cipher Authentication Sequence Control. */ +#define S_SCMD_CIPH_AUTH_SEQ_CTRL 22 +#define M_SCMD_CIPH_AUTH_SEQ_CTRL 0x1 +#define V_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + ((x) << S_SCMD_CIPH_AUTH_SEQ_CTRL) +#define G_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + (((x) >> S_SCMD_CIPH_AUTH_SEQ_CTRL) & M_SCMD_CIPH_AUTH_SEQ_CTRL) +#define F_SCMD_CIPH_AUTH_SEQ_CTRL V_SCMD_CIPH_AUTH_SEQ_CTRL(1U) + +/* CiphMode - Cipher Mode. 0: NOP, 1:AES-CBC, 2:AES-GCM, 3:AES-CTR, + * 4:Generic-AES, 5-15: Reserved. */ +#define S_SCMD_CIPH_MODE 18 +#define M_SCMD_CIPH_MODE 0xf +#define V_SCMD_CIPH_MODE(x) ((x) << S_SCMD_CIPH_MODE) +#define G_SCMD_CIPH_MODE(x) \ + (((x) >> S_SCMD_CIPH_MODE) & M_SCMD_CIPH_MODE) + +/* AuthMode - Auth Mode. 0: NOP, 1:SHA1, 2:SHA2-224, 3:SHA2-256 + * 4-15: Reserved */ +#define S_SCMD_AUTH_MODE 14 +#define M_SCMD_AUTH_MODE 0xf +#define V_SCMD_AUTH_MODE(x) ((x) << S_SCMD_AUTH_MODE) +#define G_SCMD_AUTH_MODE(x) \ + (((x) >> S_SCMD_AUTH_MODE) & M_SCMD_AUTH_MODE) + +/* HmacCtrl - HMAC Control. 0:NOP, 1:No truncation, 2:Support HMAC Truncation + * per RFC 4366, 3:IPSec 96 bits, 4-7:Reserved + */ +#define S_SCMD_HMAC_CTRL 11 +#define M_SCMD_HMAC_CTRL 0x7 +#define V_SCMD_HMAC_CTRL(x) ((x) << S_SCMD_HMAC_CTRL) +#define G_SCMD_HMAC_CTRL(x) \ + (((x) >> S_SCMD_HMAC_CTRL) & M_SCMD_HMAC_CTRL) + +/* IvSize - IV size in units of 2 bytes */ +#define S_SCMD_IV_SIZE 7 +#define M_SCMD_IV_SIZE 0xf +#define V_SCMD_IV_SIZE(x) ((x) << S_SCMD_IV_SIZE) +#define G_SCMD_IV_SIZE(x) \ + (((x) >> S_SCMD_IV_SIZE) & M_SCMD_IV_SIZE) + +/* NumIVs - Number of IVs */ +#define S_SCMD_NUM_IVS 0 +#define M_SCMD_NUM_IVS 0x7f +#define V_SCMD_NUM_IVS(x) ((x) << S_SCMD_NUM_IVS) +#define G_SCMD_NUM_IVS(x) \ + (((x) >> S_SCMD_NUM_IVS) & M_SCMD_NUM_IVS) + +/* EnbDbgId - If this is enabled upper 20 (63:44) bits if SeqNumber + * (below) are used as Cid (connection id for debug status), these + * bits are padded to zero for forming the 64 bit + * sequence number for TLS + */ +#define S_SCMD_ENB_DBGID 31 +#define M_SCMD_ENB_DBGID 0x1 +#define V_SCMD_ENB_DBGID(x) ((x) << S_SCMD_ENB_DBGID) +#define G_SCMD_ENB_DBGID(x) \ + (((x) >> S_SCMD_ENB_DBGID) & M_SCMD_ENB_DBGID) + +/* IV generation in SW. */ +#define S_SCMD_IV_GEN_CTRL 30 +#define M_SCMD_IV_GEN_CTRL 0x1 +#define V_SCMD_IV_GEN_CTRL(x) ((x) << S_SCMD_IV_GEN_CTRL) +#define G_SCMD_IV_GEN_CTRL(x) \ + (((x) >> S_SCMD_IV_GEN_CTRL) & M_SCMD_IV_GEN_CTRL) +#define F_SCMD_IV_GEN_CTRL V_SCMD_IV_GEN_CTRL(1U) + +/* More frags */ +#define S_SCMD_MORE_FRAGS 20 +#define M_SCMD_MORE_FRAGS 0x1 +#define V_SCMD_MORE_FRAGS(x) ((x) << S_SCMD_MORE_FRAGS) +#define G_SCMD_MORE_FRAGS(x) (((x) >> S_SCMD_MORE_FRAGS) & M_SCMD_MORE_FRAGS) + +/*last frag */ +#define S_SCMD_LAST_FRAG 19 +#define M_SCMD_LAST_FRAG 0x1 +#define V_SCMD_LAST_FRAG(x) ((x) << S_SCMD_LAST_FRAG) +#define G_SCMD_LAST_FRAG(x) (((x) >> S_SCMD_LAST_FRAG) & M_SCMD_LAST_FRAG) + +/* TlsCompPdu */ +#define S_SCMD_TLS_COMPPDU 18 +#define M_SCMD_TLS_COMPPDU 0x1 +#define V_SCMD_TLS_COMPPDU(x) ((x) << S_SCMD_TLS_COMPPDU) +#define G_SCMD_TLS_COMPPDU(x) (((x) >> S_SCMD_TLS_COMPPDU) & M_SCMD_TLS_COMPPDU) + +/* KeyCntxtInline - Key context inline after the scmd OR PayloadOnly*/ +#define S_SCMD_KEY_CTX_INLINE 17 +#define M_SCMD_KEY_CTX_INLINE 0x1 +#define V_SCMD_KEY_CTX_INLINE(x) ((x) << S_SCMD_KEY_CTX_INLINE) +#define G_SCMD_KEY_CTX_INLINE(x) \ + (((x) >> S_SCMD_KEY_CTX_INLINE) & M_SCMD_KEY_CTX_INLINE) +#define F_SCMD_KEY_CTX_INLINE V_SCMD_KEY_CTX_INLINE(1U) + +/* TLSFragEnable - 0: Host created TLS PDUs, 1: TLS Framgmentation in ASIC */ +#define S_SCMD_TLS_FRAG_ENABLE 16 +#define M_SCMD_TLS_FRAG_ENABLE 0x1 +#define V_SCMD_TLS_FRAG_ENABLE(x) ((x) << S_SCMD_TLS_FRAG_ENABLE) +#define G_SCMD_TLS_FRAG_ENABLE(x) \ + (((x) >> S_SCMD_TLS_FRAG_ENABLE) & M_SCMD_TLS_FRAG_ENABLE) +#define F_SCMD_TLS_FRAG_ENABLE V_SCMD_TLS_FRAG_ENABLE(1U) + +/* MacOnly - Only send the MAC and discard PDU. This is valid for hash only + * modes, in this case TLS_TX will drop the PDU and only + * send back the MAC bytes. */ +#define S_SCMD_MAC_ONLY 15 +#define M_SCMD_MAC_ONLY 0x1 +#define V_SCMD_MAC_ONLY(x) ((x) << S_SCMD_MAC_ONLY) +#define G_SCMD_MAC_ONLY(x) \ + (((x) >> S_SCMD_MAC_ONLY) & M_SCMD_MAC_ONLY) +#define F_SCMD_MAC_ONLY V_SCMD_MAC_ONLY(1U) + +/* AadIVDrop - Drop the AAD and IV fields. Useful in protocols + * which have complex AAD and IV formations Eg:AES-CCM + */ +#define S_SCMD_AADIVDROP 14 +#define M_SCMD_AADIVDROP 0x1 +#define V_SCMD_AADIVDROP(x) ((x) << S_SCMD_AADIVDROP) +#define G_SCMD_AADIVDROP(x) \ + (((x) >> S_SCMD_AADIVDROP) & M_SCMD_AADIVDROP) +#define F_SCMD_AADIVDROP V_SCMD_AADIVDROP(1U) + +/* HdrLength - Length of all headers excluding TLS header + * present before start of crypto PDU/payload. */ +#define S_SCMD_HDR_LEN 0 +#define M_SCMD_HDR_LEN 0x3fff +#define V_SCMD_HDR_LEN(x) ((x) << S_SCMD_HDR_LEN) +#define G_SCMD_HDR_LEN(x) \ + (((x) >> S_SCMD_HDR_LEN) & M_SCMD_HDR_LEN) + +struct cpl_tx_sec_pdu { + __be32 op_ivinsrtofst; + __be32 pldlen; + __be32 aadstart_cipherstop_hi; + __be32 cipherstop_lo_authinsert; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +#define S_CPL_TX_SEC_PDU_OPCODE 24 +#define M_CPL_TX_SEC_PDU_OPCODE 0xff +#define V_CPL_TX_SEC_PDU_OPCODE(x) ((x) << S_CPL_TX_SEC_PDU_OPCODE) +#define G_CPL_TX_SEC_PDU_OPCODE(x) \ + (((x) >> S_CPL_TX_SEC_PDU_OPCODE) & M_CPL_TX_SEC_PDU_OPCODE) + +/* RX Channel Id */ +#define S_CPL_TX_SEC_PDU_RXCHID 22 +#define M_CPL_TX_SEC_PDU_RXCHID 0x1 +#define V_CPL_TX_SEC_PDU_RXCHID(x) ((x) << S_CPL_TX_SEC_PDU_RXCHID) +#define G_CPL_TX_SEC_PDU_RXCHID(x) \ +(((x) >> S_CPL_TX_SEC_PDU_RXCHID) & M_CPL_TX_SEC_PDU_RXCHID) +#define F_CPL_TX_SEC_PDU_RXCHID V_CPL_TX_SEC_PDU_RXCHID(1U) + +/* Ack Follows */ +#define S_CPL_TX_SEC_PDU_ACKFOLLOWS 21 +#define M_CPL_TX_SEC_PDU_ACKFOLLOWS 0x1 +#define V_CPL_TX_SEC_PDU_ACKFOLLOWS(x) ((x) << S_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define G_CPL_TX_SEC_PDU_ACKFOLLOWS(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ACKFOLLOWS) & M_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define F_CPL_TX_SEC_PDU_ACKFOLLOWS V_CPL_TX_SEC_PDU_ACKFOLLOWS(1U) + +/* Loopback bit in cpl_tx_sec_pdu */ +#define S_CPL_TX_SEC_PDU_ULPTXLPBK 20 +#define M_CPL_TX_SEC_PDU_ULPTXLPBK 0x1 +#define V_CPL_TX_SEC_PDU_ULPTXLPBK(x) ((x) << S_CPL_TX_SEC_PDU_ULPTXLPBK) +#define G_CPL_TX_SEC_PDU_ULPTXLPBK(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ULPTXLPBK) & M_CPL_TX_SEC_PDU_ULPTXLPBK) +#define F_CPL_TX_SEC_PDU_ULPTXLPBK V_CPL_TX_SEC_PDU_ULPTXLPBK(1U) + +/* Length of cpl header encapsulated */ +#define S_CPL_TX_SEC_PDU_CPLLEN 16 +#define M_CPL_TX_SEC_PDU_CPLLEN 0xf +#define V_CPL_TX_SEC_PDU_CPLLEN(x) ((x) << S_CPL_TX_SEC_PDU_CPLLEN) +#define G_CPL_TX_SEC_PDU_CPLLEN(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CPLLEN) & M_CPL_TX_SEC_PDU_CPLLEN) + +/* PlaceHolder */ +#define S_CPL_TX_SEC_PDU_PLACEHOLDER 10 +#define M_CPL_TX_SEC_PDU_PLACEHOLDER 0x1 +#define V_CPL_TX_SEC_PDU_PLACEHOLDER(x) ((x) << S_CPL_TX_SEC_PDU_PLACEHOLDER) +#define G_CPL_TX_SEC_PDU_PLACEHOLDER(x) \ + (((x) >> S_CPL_TX_SEC_PDU_PLACEHOLDER) & \ + M_CPL_TX_SEC_PDU_PLACEHOLDER) + +/* IvInsrtOffset: Insertion location for IV */ +#define S_CPL_TX_SEC_PDU_IVINSRTOFST 0 +#define M_CPL_TX_SEC_PDU_IVINSRTOFST 0x3ff +#define V_CPL_TX_SEC_PDU_IVINSRTOFST(x) ((x) << S_CPL_TX_SEC_PDU_IVINSRTOFST) +#define G_CPL_TX_SEC_PDU_IVINSRTOFST(x) \ + (((x) >> S_CPL_TX_SEC_PDU_IVINSRTOFST) & \ + M_CPL_TX_SEC_PDU_IVINSRTOFST) + +/* AadStartOffset: Offset in bytes for AAD start from + * the first byte following + * the pkt headers (0-255 + * bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTART 24 +#define M_CPL_TX_SEC_PDU_AADSTART 0xff +#define V_CPL_TX_SEC_PDU_AADSTART(x) ((x) << S_CPL_TX_SEC_PDU_AADSTART) +#define G_CPL_TX_SEC_PDU_AADSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTART) & \ + M_CPL_TX_SEC_PDU_AADSTART) + +/* AadStopOffset: offset in bytes for AAD stop/end from the first byte following + * the pkt headers (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTOP 15 +#define M_CPL_TX_SEC_PDU_AADSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AADSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AADSTOP) +#define G_CPL_TX_SEC_PDU_AADSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTOP) & M_CPL_TX_SEC_PDU_AADSTOP) + +/* CipherStartOffset: offset in bytes for encryption/decryption start from the + * first byte following the pkt headers (0-1023 + * bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTART 5 +#define M_CPL_TX_SEC_PDU_CIPHERSTART 0x3ff +#define V_CPL_TX_SEC_PDU_CIPHERSTART(x) ((x) << S_CPL_TX_SEC_PDU_CIPHERSTART) +#define G_CPL_TX_SEC_PDU_CIPHERSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTART) & \ + M_CPL_TX_SEC_PDU_CIPHERSTART) + +/* CipherStopOffset: offset in bytes for encryption/decryption end + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0x1f +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_HI) + +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_LO 28 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_LO 0xf +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_LO) + +/* AuthStartOffset: offset in bytes for authentication start from + * the first byte following the pkt headers (0-1023) + * */ +#define S_CPL_TX_SEC_PDU_AUTHSTART 18 +#define M_CPL_TX_SEC_PDU_AUTHSTART 0x3ff +#define V_CPL_TX_SEC_PDU_AUTHSTART(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTART) +#define G_CPL_TX_SEC_PDU_AUTHSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTART) & \ + M_CPL_TX_SEC_PDU_AUTHSTART) + +/* AuthStopOffset: offset in bytes for authentication + * end from end of the payload of this command (0-511 Bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHSTOP 9 +#define M_CPL_TX_SEC_PDU_AUTHSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTOP) +#define G_CPL_TX_SEC_PDU_AUTHSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTOP) & \ + M_CPL_TX_SEC_PDU_AUTHSTOP) + +/* AuthInsrtOffset: offset in bytes for authentication insertion + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHINSERT 0 +#define M_CPL_TX_SEC_PDU_AUTHINSERT 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHINSERT(x) ((x) << S_CPL_TX_SEC_PDU_AUTHINSERT) +#define G_CPL_TX_SEC_PDU_AUTHINSERT(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHINSERT) & \ + M_CPL_TX_SEC_PDU_AUTHINSERT) + +struct cpl_rx_phys_dsgl { + __be32 op_to_tid; + __be32 pcirlxorder_to_noofsgentr; + struct rss_header rss_hdr_int; +}; + +#define S_CPL_RX_PHYS_DSGL_OPCODE 24 +#define M_CPL_RX_PHYS_DSGL_OPCODE 0xff +#define V_CPL_RX_PHYS_DSGL_OPCODE(x) ((x) << S_CPL_RX_PHYS_DSGL_OPCODE) +#define G_CPL_RX_PHYS_DSGL_OPCODE(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_OPCODE) & M_CPL_RX_PHYS_DSGL_OPCODE) + +#define S_CPL_RX_PHYS_DSGL_ISRDMA 23 +#define M_CPL_RX_PHYS_DSGL_ISRDMA 0x1 +#define V_CPL_RX_PHYS_DSGL_ISRDMA(x) ((x) << S_CPL_RX_PHYS_DSGL_ISRDMA) +#define G_CPL_RX_PHYS_DSGL_ISRDMA(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_ISRDMA) & M_CPL_RX_PHYS_DSGL_ISRDMA) +#define F_CPL_RX_PHYS_DSGL_ISRDMA V_CPL_RX_PHYS_DSGL_ISRDMA(1U) + +#define S_CPL_RX_PHYS_DSGL_RSVD1 20 +#define M_CPL_RX_PHYS_DSGL_RSVD1 0x7 +#define V_CPL_RX_PHYS_DSGL_RSVD1(x) ((x) << S_CPL_RX_PHYS_DSGL_RSVD1) +#define G_CPL_RX_PHYS_DSGL_RSVD1(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_RSVD1) & M_CPL_RX_PHYS_DSGL_RSVD1) + +#define S_CPL_RX_PHYS_DSGL_PCIRLXORDER 31 +#define M_CPL_RX_PHYS_DSGL_PCIRLXORDER 0x1 +#define V_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define G_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCIRLXORDER) & \ + M_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define F_CPL_RX_PHYS_DSGL_PCIRLXORDER V_CPL_RX_PHYS_DSGL_PCIRLXORDER(1U) + +#define S_CPL_RX_PHYS_DSGL_PCINOSNOOP 30 +#define M_CPL_RX_PHYS_DSGL_PCINOSNOOP 0x1 +#define V_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define G_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCINOSNOOP) & \ + M_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define F_CPL_RX_PHYS_DSGL_PCINOSNOOP V_CPL_RX_PHYS_DSGL_PCINOSNOOP(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNTENB 29 +#define M_CPL_RX_PHYS_DSGL_PCITPHNTENB 0x1 +#define V_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define G_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNTENB) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define F_CPL_RX_PHYS_DSGL_PCITPHNTENB V_CPL_RX_PHYS_DSGL_PCITPHNTENB(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNT 27 +#define M_CPL_RX_PHYS_DSGL_PCITPHNT 0x3 +#define V_CPL_RX_PHYS_DSGL_PCITPHNT(x) ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNT) +#define G_CPL_RX_PHYS_DSGL_PCITPHNT(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNT) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNT) + +#define S_CPL_RX_PHYS_DSGL_DCAID 16 +#define M_CPL_RX_PHYS_DSGL_DCAID 0x7ff +#define V_CPL_RX_PHYS_DSGL_DCAID(x) ((x) << S_CPL_RX_PHYS_DSGL_DCAID) +#define G_CPL_RX_PHYS_DSGL_DCAID(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_DCAID) & \ + M_CPL_RX_PHYS_DSGL_DCAID) + +#define S_CPL_RX_PHYS_DSGL_NOOFSGENTR 0 +#define M_CPL_RX_PHYS_DSGL_NOOFSGENTR 0xffff +#define V_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_NOOFSGENTR) +#define G_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_NOOFSGENTR) & \ + M_CPL_RX_PHYS_DSGL_NOOFSGENTR) + +/* CPL_TX_TLS_ACK */ +struct cpl_tx_tls_ack { + __be32 op_to_Rsvd2; + __be32 PldLen; + __be64 Rsvd3; +}; + +#define S_CPL_TX_TLS_ACK_OPCODE 24 +#define M_CPL_TX_TLS_ACK_OPCODE 0xff +#define V_CPL_TX_TLS_ACK_OPCODE(x) ((x) << S_CPL_TX_TLS_ACK_OPCODE) +#define G_CPL_TX_TLS_ACK_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_ACK_OPCODE) & M_CPL_TX_TLS_ACK_OPCODE) + +#define S_CPL_TX_TLS_ACK_RSVD1 23 +#define M_CPL_TX_TLS_ACK_RSVD1 0x1 +#define V_CPL_TX_TLS_ACK_RSVD1(x) ((x) << S_CPL_TX_TLS_ACK_RSVD1) +#define G_CPL_TX_TLS_ACK_RSVD1(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD1) & M_CPL_TX_TLS_ACK_RSVD1) +#define F_CPL_TX_TLS_ACK_RSVD1 V_CPL_TX_TLS_ACK_RSVD1(1U) + +#define S_CPL_TX_TLS_ACK_RXCHID 22 +#define M_CPL_TX_TLS_ACK_RXCHID 0x1 +#define V_CPL_TX_TLS_ACK_RXCHID(x) ((x) << S_CPL_TX_TLS_ACK_RXCHID) +#define G_CPL_TX_TLS_ACK_RXCHID(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RXCHID) & M_CPL_TX_TLS_ACK_RXCHID) +#define F_CPL_TX_TLS_ACK_RXCHID V_CPL_TX_TLS_ACK_RXCHID(1U) + +#define S_CPL_TX_TLS_ACK_FWMSG 21 +#define M_CPL_TX_TLS_ACK_FWMSG 0x1 +#define V_CPL_TX_TLS_ACK_FWMSG(x) ((x) << S_CPL_TX_TLS_ACK_FWMSG) +#define G_CPL_TX_TLS_ACK_FWMSG(x) \ + (((x) >> S_CPL_TX_TLS_ACK_FWMSG) & M_CPL_TX_TLS_ACK_FWMSG) +#define F_CPL_TX_TLS_ACK_FWMSG V_CPL_TX_TLS_ACK_FWMSG(1U) + +#define S_CPL_TX_TLS_ACK_ULPTXLPBK 20 +#define M_CPL_TX_TLS_ACK_ULPTXLPBK 0x1 +#define V_CPL_TX_TLS_ACK_ULPTXLPBK(x) ((x) << S_CPL_TX_TLS_ACK_ULPTXLPBK) +#define G_CPL_TX_TLS_ACK_ULPTXLPBK(x) \ + (((x) >> S_CPL_TX_TLS_ACK_ULPTXLPBK) & M_CPL_TX_TLS_ACK_ULPTXLPBK) +#define F_CPL_TX_TLS_ACK_ULPTXLPBK V_CPL_TX_TLS_ACK_ULPTXLPBK(1U) + +#define S_CPL_TX_TLS_ACK_CPLLEN 16 +#define M_CPL_TX_TLS_ACK_CPLLEN 0xf +#define V_CPL_TX_TLS_ACK_CPLLEN(x) ((x) << S_CPL_TX_TLS_ACK_CPLLEN) +#define G_CPL_TX_TLS_ACK_CPLLEN(x) \ + (((x) >> S_CPL_TX_TLS_ACK_CPLLEN) & M_CPL_TX_TLS_ACK_CPLLEN) + +#define S_CPL_TX_TLS_ACK_COMPLONERR 15 +#define M_CPL_TX_TLS_ACK_COMPLONERR 0x1 +#define V_CPL_TX_TLS_ACK_COMPLONERR(x) ((x) << S_CPL_TX_TLS_ACK_COMPLONERR) +#define G_CPL_TX_TLS_ACK_COMPLONERR(x) \ + (((x) >> S_CPL_TX_TLS_ACK_COMPLONERR) & M_CPL_TX_TLS_ACK_COMPLONERR) +#define F_CPL_TX_TLS_ACK_COMPLONERR V_CPL_TX_TLS_ACK_COMPLONERR(1U) + +#define S_CPL_TX_TLS_ACK_LCB 14 +#define M_CPL_TX_TLS_ACK_LCB 0x1 +#define V_CPL_TX_TLS_ACK_LCB(x) ((x) << S_CPL_TX_TLS_ACK_LCB) +#define G_CPL_TX_TLS_ACK_LCB(x) \ + (((x) >> S_CPL_TX_TLS_ACK_LCB) & M_CPL_TX_TLS_ACK_LCB) +#define F_CPL_TX_TLS_ACK_LCB V_CPL_TX_TLS_ACK_LCB(1U) + +#define S_CPL_TX_TLS_ACK_PHASH 13 +#define M_CPL_TX_TLS_ACK_PHASH 0x1 +#define V_CPL_TX_TLS_ACK_PHASH(x) ((x) << S_CPL_TX_TLS_ACK_PHASH) +#define G_CPL_TX_TLS_ACK_PHASH(x) \ + (((x) >> S_CPL_TX_TLS_ACK_PHASH) & M_CPL_TX_TLS_ACK_PHASH) +#define F_CPL_TX_TLS_ACK_PHASH V_CPL_TX_TLS_ACK_PHASH(1U) + +#define S_CPL_TX_TLS_ACK_RSVD2 0 +#define M_CPL_TX_TLS_ACK_RSVD2 0x1fff +#define V_CPL_TX_TLS_ACK_RSVD2(x) ((x) << S_CPL_TX_TLS_ACK_RSVD2) +#define G_CPL_TX_TLS_ACK_RSVD2(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD2) & M_CPL_TX_TLS_ACK_RSVD2) + #endif /* T4_MSG_H */ From owner-svn-src-all@freebsd.org Wed May 24 04:48:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91253D78A7C; Wed, 24 May 2017 04:48:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6340718F3; Wed, 24 May 2017 04:48:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O4m9wh011001; Wed, 24 May 2017 04:48:09 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O4m9Mr011000; Wed, 24 May 2017 04:48:09 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705240448.v4O4m9Mr011000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 04:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318774 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 04:48:10 -0000 Author: np Date: Wed May 24 04:48:09 2017 New Revision: 318774 URL: https://svnweb.freebsd.org/changeset/base/318774 Log: cxgbe/iw_cxgbe: sodisconnect failures are harmless and should not be treated as fatal errors. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Wed May 24 04:42:31 2017 (r318773) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Wed May 24 04:48:09 2017 (r318774) @@ -2376,6 +2376,8 @@ int c4iw_ep_disconnect(struct c4iw_ep *e set_bit(EP_DISC_ABORT, &ep->com.history); close_complete_upcall(ep, -ECONNRESET); ret = send_abort(ep); + if (ret) + fatal = 1; } else { CTR2(KTR_IW_CXGBE, "%s:ced5 %p", __func__, ep); @@ -2383,13 +2385,9 @@ int c4iw_ep_disconnect(struct c4iw_ep *e if (!ep->parent_ep) __state_set(&ep->com, MORIBUND); - ret = sodisconnect(ep->com.so); + sodisconnect(ep->com.so); } - if (ret) { - - fatal = 1; - } } if (fatal) { From owner-svn-src-all@freebsd.org Wed May 24 05:30:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 228A4D79767; Wed, 24 May 2017 05:30:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7F521B39; Wed, 24 May 2017 05:30:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O5UbVT028928; Wed, 24 May 2017 05:30:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O5UbMt028927; Wed, 24 May 2017 05:30:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705240530.v4O5UbMt028927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 05:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318775 - stable/10/sys/dev/cxgbe/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 05:30:38 -0000 Author: np Date: Wed May 24 05:30:36 2017 New Revision: 318775 URL: https://svnweb.freebsd.org/changeset/base/318775 Log: MFC r311846: cxgbe(4): Refresh t4_msg.h, mainly for definitions related to the crypto engine. Modified: stable/10/sys/dev/cxgbe/common/t4_msg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_msg.h Wed May 24 04:48:09 2017 (r318774) +++ stable/10/sys/dev/cxgbe/common/t4_msg.h Wed May 24 05:30:36 2017 (r318775) @@ -106,6 +106,7 @@ enum { CPL_RX_FCOE_DIF = 0x4A, CPL_RX_DATA_DIF = 0x4B, CPL_ERR_NOTIFY = 0x4D, + CPL_RX_TLS_CMP = 0x4E, CPL_RDMA_READ_REQ = 0x60, CPL_RX_ISCSI_DIF = 0x60, @@ -113,6 +114,11 @@ enum { CPL_SET_LE_REQ = 0x80, CPL_PASS_OPEN_REQ6 = 0x81, CPL_ACT_OPEN_REQ6 = 0x83, + CPL_TX_TLS_PDU = 0x88, + CPL_TX_TLS_SFO = 0x89, + + CPL_TX_SEC_PDU = 0x8A, + CPL_TX_TLS_ACK = 0x8B, CPL_RDMA_TERMINATE = 0xA2, CPL_RDMA_WRITE = 0xA4, @@ -129,6 +135,7 @@ enum { CPL_TRACE_PKT = 0xB0, CPL_RX2TX_DATA = 0xB1, + CPL_TLS_DATA = 0xB1, CPL_ISCSI_DATA = 0xB2, CPL_FCOE_DATA = 0xB3, @@ -136,6 +143,7 @@ enum { CPL_FW4_PLD = 0xC1, CPL_FW4_ACK = 0xC3, CPL_SRQ_TABLE_RPL = 0xCC, + CPL_RX_PHYS_DSGL = 0xD0, CPL_FW6_MSG = 0xE0, CPL_FW6_PLD = 0xE1, @@ -200,6 +208,7 @@ enum { ULP_MODE_RDMA = 4, ULP_MODE_TCPDDP = 5, ULP_MODE_FCOE = 6, + ULP_MODE_TLS = 8, }; enum { @@ -993,6 +1002,23 @@ struct cpl_abort_req_rss { __u8 status; }; +struct cpl_abort_req_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + +#define S_ABORT_RSS_STATUS 0 +#define M_ABORT_RSS_STATUS 0xff +#define V_ABORT_RSS_STATUS(x) ((x) << S_ABORT_RSS_STATUS) +#define G_ABORT_RSS_STATUS(x) (((x) >> S_ABORT_RSS_STATUS) & M_ABORT_RSS_STATUS) + +#define S_ABORT_RSS_SRQIDX 8 +#define M_ABORT_RSS_SRQIDX 0xffffff +#define V_ABORT_RSS_SRQIDX(x) ((x) << S_ABORT_RSS_SRQIDX) +#define G_ABORT_RSS_SRQIDX(x) (((x) >> S_ABORT_RSS_SRQIDX) & M_ABORT_RSS_SRQIDX) + + /* cpl_abort_req status command code in case of T6, * bit[0] specifies whether to send RST (0) to remote peer or suppress it (1) * bit[1] indicates ABORT_REQ was sent after a CLOSE_CON_REQ @@ -1014,6 +1040,12 @@ struct cpl_abort_rpl_rss { __u8 status; }; +struct cpl_abort_rpl_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + struct cpl_abort_rpl { WR_HDR; union opcode_tid ot; @@ -2612,6 +2644,7 @@ enum { FW_TYPE_RSSCPL = 4, FW_TYPE_WRERR_RPL = 5, FW_TYPE_PI_ERR = 6, + FW_TYPE_TLS_KEY = 7, }; struct cpl_fw2_pld { @@ -2712,7 +2745,8 @@ enum { ULP_TX_SC_IMM = 0x81, ULP_TX_SC_DSGL = 0x82, ULP_TX_SC_ISGL = 0x83, - ULP_TX_SC_PICTRL = 0x84 + ULP_TX_SC_PICTRL = 0x84, + ULP_TX_SC_MEMRD = 0x86 }; #define S_ULPTX_CMD 24 @@ -2763,6 +2797,12 @@ struct ulptx_idata { #define S_ULPTX_NSGE 0 #define M_ULPTX_NSGE 0xFFFF #define V_ULPTX_NSGE(x) ((x) << S_ULPTX_NSGE) +#define G_ULPTX_NSGE(x) (((x) >> S_ULPTX_NSGE) & M_ULPTX_NSGE) + +struct ulptx_sc_memrd { + __be32 cmd_to_len; + __be32 addr; +}; struct ulp_mem_io { WR_HDR; @@ -2817,6 +2857,21 @@ struct ulp_txpkt { }; /* ulp_txpkt.cmd_dest fields */ +#define S_ULP_TXPKT_DATAMODIFY 23 +#define M_ULP_TXPKT_DATAMODIFY 0x1 +#define V_ULP_TXPKT_DATAMODIFY(x) ((x) << S_ULP_TXPKT_DATAMODIFY) +#define G_ULP_TXPKT_DATAMODIFY(x) \ + (((x) >> S_ULP_TXPKT_DATAMODIFY) & M_ULP_TXPKT_DATAMODIFY_) +#define F_ULP_TXPKT_DATAMODIFY V_ULP_TXPKT_DATAMODIFY(1U) + +#define S_ULP_TXPKT_CHANNELID 22 +#define M_ULP_TXPKT_CHANNELID 0x1 +#define V_ULP_TXPKT_CHANNELID(x) ((x) << S_ULP_TXPKT_CHANNELID) +#define G_ULP_TXPKT_CHANNELID(x) \ + (((x) >> S_ULP_TXPKT_CHANNELID) & M_ULP_TXPKT_CHANNELID) +#define F_ULP_TXPKT_CHANNELID V_ULP_TXPKT_CHANNELID(1U) + +/* ulp_txpkt.cmd_dest fields */ #define S_ULP_TXPKT_DEST 16 #define M_ULP_TXPKT_DEST 0x3 #define V_ULP_TXPKT_DEST(x) ((x) << S_ULP_TXPKT_DEST) @@ -3044,4 +3099,542 @@ struct cpl_rx_mps_pkt { #define X_CPL_RX_MPS_PKT_TYPE_QFC (1 << 2) #define X_CPL_RX_MPS_PKT_TYPE_PTP (1 << 3) +struct cpl_tx_tls_sfo { + __be32 op_to_seg_len; + __be32 pld_len; + __be64 rsvd; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +/* cpl_tx_tls_sfo macros */ +#define S_CPL_TX_TLS_SFO_OPCODE 24 +#define M_CPL_TX_TLS_SFO_OPCODE 0xff +#define V_CPL_TX_TLS_SFO_OPCODE(x) ((x) << S_CPL_TX_TLS_SFO_OPCODE) +#define G_CPL_TX_TLS_SFO_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_OPCODE) & M_CPL_TX_TLS_SFO_OPCODE) + +#define S_CPL_TX_TLS_SFO_DATA_TYPE 20 +#define M_CPL_TX_TLS_SFO_DATA_TYPE 0xf +#define V_CPL_TX_TLS_SFO_DATA_TYPE(x) ((x) << S_CPL_TX_TLS_SFO_DATA_TYPE) +#define G_CPL_TX_TLS_SFO_DATA_TYPE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_DATA_TYPE) & M_CPL_TX_TLS_SFO_DATA_TYPE) + +#define S_CPL_TX_TLS_SFO_CPL_LEN 16 +#define M_CPL_TX_TLS_SFO_CPL_LEN 0xf +#define V_CPL_TX_TLS_SFO_CPL_LEN(x) ((x) << S_CPL_TX_TLS_SFO_CPL_LEN) +#define G_CPL_TX_TLS_SFO_CPL_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_CPL_LEN) & M_CPL_TX_TLS_SFO_CPL_LEN) +#define S_CPL_TX_TLS_SFO_SEG_LEN 0 +#define M_CPL_TX_TLS_SFO_SEG_LEN 0xffff +#define V_CPL_TX_TLS_SFO_SEG_LEN(x) ((x) << S_CPL_TX_TLS_SFO_SEG_LEN) +#define G_CPL_TX_TLS_SFO_SEG_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_SEG_LEN) & M_CPL_TX_TLS_SFO_SEG_LEN) + +struct cpl_tls_data { + RSS_HDR + __be32 op_tid; + __be32 length_pkd; + __be32 seq; + __be32 r1; +}; + +#define S_CPL_TLS_DATA_OPCODE 24 +#define M_CPL_TLS_DATA_OPCODE 0xff +#define V_CPL_TLS_DATA_OPCODE(x) ((x) << S_CPL_TLS_DATA_OPCODE) +#define G_CPL_TLS_DATA_OPCODE(x) \ + (((x) >> S_CPL_TLS_DATA_OPCODE) & M_CPL_TLS_DATA_OPCODE) + +#define S_CPL_TLS_DATA_TID 0 +#define M_CPL_TLS_DATA_TID 0xffffff +#define V_CPL_TLS_DATA_TID(x) ((x) << S_CPL_TLS_DATA_TID) +#define G_CPL_TLS_DATA_TID(x) \ + (((x) >> S_CPL_TLS_DATA_TID) & M_CPL_TLS_DATA_TID) + +#define S_CPL_TLS_DATA_LENGTH 0 +#define M_CPL_TLS_DATA_LENGTH 0xffff +#define V_CPL_TLS_DATA_LENGTH(x) ((x) << S_CPL_TLS_DATA_LENGTH) +#define G_CPL_TLS_DATA_LENGTH(x) \ + (((x) >> S_CPL_TLS_DATA_LENGTH) & M_CPL_TLS_DATA_LENGTH) + +struct cpl_rx_tls_cmp { + RSS_HDR + __be32 op_tid; + __be32 pdulength_length; + __be32 seq; + __be32 ddp_report; + __be32 r; + __be32 ddp_valid; +}; + +#define S_CPL_RX_TLS_CMP_OPCODE 24 +#define M_CPL_RX_TLS_CMP_OPCODE 0xff +#define V_CPL_RX_TLS_CMP_OPCODE(x) ((x) << S_CPL_RX_TLS_CMP_OPCODE) +#define G_CPL_RX_TLS_CMP_OPCODE(x) \ + (((x) >> S_CPL_RX_TLS_CMP_OPCODE) & M_CPL_RX_TLS_CMP_OPCODE) + +#define S_CPL_RX_TLS_CMP_TID 0 +#define M_CPL_RX_TLS_CMP_TID 0xffffff +#define V_CPL_RX_TLS_CMP_TID(x) ((x) << S_CPL_RX_TLS_CMP_TID) +#define G_CPL_RX_TLS_CMP_TID(x) \ + (((x) >> S_CPL_RX_TLS_CMP_TID) & M_CPL_RX_TLS_CMP_TID) + +#define S_CPL_RX_TLS_CMP_PDULENGTH 16 +#define M_CPL_RX_TLS_CMP_PDULENGTH 0xffff +#define V_CPL_RX_TLS_CMP_PDULENGTH(x) ((x) << S_CPL_RX_TLS_CMP_PDULENGTH) +#define G_CPL_RX_TLS_CMP_PDULENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_PDULENGTH) & M_CPL_RX_TLS_CMP_PDULENGTH) + +#define S_CPL_RX_TLS_CMP_LENGTH 0 +#define M_CPL_RX_TLS_CMP_LENGTH 0xffff +#define V_CPL_RX_TLS_CMP_LENGTH(x) ((x) << S_CPL_RX_TLS_CMP_LENGTH) +#define G_CPL_RX_TLS_CMP_LENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_LENGTH) & M_CPL_RX_TLS_CMP_LENGTH) + +#define S_SCMD_SEQ_NO_CTRL 29 +#define M_SCMD_SEQ_NO_CTRL 0x3 +#define V_SCMD_SEQ_NO_CTRL(x) ((x) << S_SCMD_SEQ_NO_CTRL) +#define G_SCMD_SEQ_NO_CTRL(x) \ + (((x) >> S_SCMD_SEQ_NO_CTRL) & M_SCMD_SEQ_NO_CTRL) + +/* StsFieldPrsnt- Status field at the end of the TLS PDU */ +#define S_SCMD_STATUS_PRESENT 28 +#define M_SCMD_STATUS_PRESENT 0x1 +#define V_SCMD_STATUS_PRESENT(x) ((x) << S_SCMD_STATUS_PRESENT) +#define G_SCMD_STATUS_PRESENT(x) \ + (((x) >> S_SCMD_STATUS_PRESENT) & M_SCMD_STATUS_PRESENT) +#define F_SCMD_STATUS_PRESENT V_SCMD_STATUS_PRESENT(1U) + +/* ProtoVersion - Protocol Version 0: 1.2, 1:1.1, 2:DTLS, 3:Generic, + * 3-15: Reserved. */ +#define S_SCMD_PROTO_VERSION 24 +#define M_SCMD_PROTO_VERSION 0xf +#define V_SCMD_PROTO_VERSION(x) ((x) << S_SCMD_PROTO_VERSION) +#define G_SCMD_PROTO_VERSION(x) \ + (((x) >> S_SCMD_PROTO_VERSION) & M_SCMD_PROTO_VERSION) + +/* EncDecCtrl - Encryption/Decryption Control. 0: Encrypt, 1: Decrypt */ +#define S_SCMD_ENC_DEC_CTRL 23 +#define M_SCMD_ENC_DEC_CTRL 0x1 +#define V_SCMD_ENC_DEC_CTRL(x) ((x) << S_SCMD_ENC_DEC_CTRL) +#define G_SCMD_ENC_DEC_CTRL(x) \ + (((x) >> S_SCMD_ENC_DEC_CTRL) & M_SCMD_ENC_DEC_CTRL) +#define F_SCMD_ENC_DEC_CTRL V_SCMD_ENC_DEC_CTRL(1U) + +/* CipherAuthSeqCtrl - Cipher Authentication Sequence Control. */ +#define S_SCMD_CIPH_AUTH_SEQ_CTRL 22 +#define M_SCMD_CIPH_AUTH_SEQ_CTRL 0x1 +#define V_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + ((x) << S_SCMD_CIPH_AUTH_SEQ_CTRL) +#define G_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + (((x) >> S_SCMD_CIPH_AUTH_SEQ_CTRL) & M_SCMD_CIPH_AUTH_SEQ_CTRL) +#define F_SCMD_CIPH_AUTH_SEQ_CTRL V_SCMD_CIPH_AUTH_SEQ_CTRL(1U) + +/* CiphMode - Cipher Mode. 0: NOP, 1:AES-CBC, 2:AES-GCM, 3:AES-CTR, + * 4:Generic-AES, 5-15: Reserved. */ +#define S_SCMD_CIPH_MODE 18 +#define M_SCMD_CIPH_MODE 0xf +#define V_SCMD_CIPH_MODE(x) ((x) << S_SCMD_CIPH_MODE) +#define G_SCMD_CIPH_MODE(x) \ + (((x) >> S_SCMD_CIPH_MODE) & M_SCMD_CIPH_MODE) + +/* AuthMode - Auth Mode. 0: NOP, 1:SHA1, 2:SHA2-224, 3:SHA2-256 + * 4-15: Reserved */ +#define S_SCMD_AUTH_MODE 14 +#define M_SCMD_AUTH_MODE 0xf +#define V_SCMD_AUTH_MODE(x) ((x) << S_SCMD_AUTH_MODE) +#define G_SCMD_AUTH_MODE(x) \ + (((x) >> S_SCMD_AUTH_MODE) & M_SCMD_AUTH_MODE) + +/* HmacCtrl - HMAC Control. 0:NOP, 1:No truncation, 2:Support HMAC Truncation + * per RFC 4366, 3:IPSec 96 bits, 4-7:Reserved + */ +#define S_SCMD_HMAC_CTRL 11 +#define M_SCMD_HMAC_CTRL 0x7 +#define V_SCMD_HMAC_CTRL(x) ((x) << S_SCMD_HMAC_CTRL) +#define G_SCMD_HMAC_CTRL(x) \ + (((x) >> S_SCMD_HMAC_CTRL) & M_SCMD_HMAC_CTRL) + +/* IvSize - IV size in units of 2 bytes */ +#define S_SCMD_IV_SIZE 7 +#define M_SCMD_IV_SIZE 0xf +#define V_SCMD_IV_SIZE(x) ((x) << S_SCMD_IV_SIZE) +#define G_SCMD_IV_SIZE(x) \ + (((x) >> S_SCMD_IV_SIZE) & M_SCMD_IV_SIZE) + +/* NumIVs - Number of IVs */ +#define S_SCMD_NUM_IVS 0 +#define M_SCMD_NUM_IVS 0x7f +#define V_SCMD_NUM_IVS(x) ((x) << S_SCMD_NUM_IVS) +#define G_SCMD_NUM_IVS(x) \ + (((x) >> S_SCMD_NUM_IVS) & M_SCMD_NUM_IVS) + +/* EnbDbgId - If this is enabled upper 20 (63:44) bits if SeqNumber + * (below) are used as Cid (connection id for debug status), these + * bits are padded to zero for forming the 64 bit + * sequence number for TLS + */ +#define S_SCMD_ENB_DBGID 31 +#define M_SCMD_ENB_DBGID 0x1 +#define V_SCMD_ENB_DBGID(x) ((x) << S_SCMD_ENB_DBGID) +#define G_SCMD_ENB_DBGID(x) \ + (((x) >> S_SCMD_ENB_DBGID) & M_SCMD_ENB_DBGID) + +/* IV generation in SW. */ +#define S_SCMD_IV_GEN_CTRL 30 +#define M_SCMD_IV_GEN_CTRL 0x1 +#define V_SCMD_IV_GEN_CTRL(x) ((x) << S_SCMD_IV_GEN_CTRL) +#define G_SCMD_IV_GEN_CTRL(x) \ + (((x) >> S_SCMD_IV_GEN_CTRL) & M_SCMD_IV_GEN_CTRL) +#define F_SCMD_IV_GEN_CTRL V_SCMD_IV_GEN_CTRL(1U) + +/* More frags */ +#define S_SCMD_MORE_FRAGS 20 +#define M_SCMD_MORE_FRAGS 0x1 +#define V_SCMD_MORE_FRAGS(x) ((x) << S_SCMD_MORE_FRAGS) +#define G_SCMD_MORE_FRAGS(x) (((x) >> S_SCMD_MORE_FRAGS) & M_SCMD_MORE_FRAGS) + +/*last frag */ +#define S_SCMD_LAST_FRAG 19 +#define M_SCMD_LAST_FRAG 0x1 +#define V_SCMD_LAST_FRAG(x) ((x) << S_SCMD_LAST_FRAG) +#define G_SCMD_LAST_FRAG(x) (((x) >> S_SCMD_LAST_FRAG) & M_SCMD_LAST_FRAG) + +/* TlsCompPdu */ +#define S_SCMD_TLS_COMPPDU 18 +#define M_SCMD_TLS_COMPPDU 0x1 +#define V_SCMD_TLS_COMPPDU(x) ((x) << S_SCMD_TLS_COMPPDU) +#define G_SCMD_TLS_COMPPDU(x) (((x) >> S_SCMD_TLS_COMPPDU) & M_SCMD_TLS_COMPPDU) + +/* KeyCntxtInline - Key context inline after the scmd OR PayloadOnly*/ +#define S_SCMD_KEY_CTX_INLINE 17 +#define M_SCMD_KEY_CTX_INLINE 0x1 +#define V_SCMD_KEY_CTX_INLINE(x) ((x) << S_SCMD_KEY_CTX_INLINE) +#define G_SCMD_KEY_CTX_INLINE(x) \ + (((x) >> S_SCMD_KEY_CTX_INLINE) & M_SCMD_KEY_CTX_INLINE) +#define F_SCMD_KEY_CTX_INLINE V_SCMD_KEY_CTX_INLINE(1U) + +/* TLSFragEnable - 0: Host created TLS PDUs, 1: TLS Framgmentation in ASIC */ +#define S_SCMD_TLS_FRAG_ENABLE 16 +#define M_SCMD_TLS_FRAG_ENABLE 0x1 +#define V_SCMD_TLS_FRAG_ENABLE(x) ((x) << S_SCMD_TLS_FRAG_ENABLE) +#define G_SCMD_TLS_FRAG_ENABLE(x) \ + (((x) >> S_SCMD_TLS_FRAG_ENABLE) & M_SCMD_TLS_FRAG_ENABLE) +#define F_SCMD_TLS_FRAG_ENABLE V_SCMD_TLS_FRAG_ENABLE(1U) + +/* MacOnly - Only send the MAC and discard PDU. This is valid for hash only + * modes, in this case TLS_TX will drop the PDU and only + * send back the MAC bytes. */ +#define S_SCMD_MAC_ONLY 15 +#define M_SCMD_MAC_ONLY 0x1 +#define V_SCMD_MAC_ONLY(x) ((x) << S_SCMD_MAC_ONLY) +#define G_SCMD_MAC_ONLY(x) \ + (((x) >> S_SCMD_MAC_ONLY) & M_SCMD_MAC_ONLY) +#define F_SCMD_MAC_ONLY V_SCMD_MAC_ONLY(1U) + +/* AadIVDrop - Drop the AAD and IV fields. Useful in protocols + * which have complex AAD and IV formations Eg:AES-CCM + */ +#define S_SCMD_AADIVDROP 14 +#define M_SCMD_AADIVDROP 0x1 +#define V_SCMD_AADIVDROP(x) ((x) << S_SCMD_AADIVDROP) +#define G_SCMD_AADIVDROP(x) \ + (((x) >> S_SCMD_AADIVDROP) & M_SCMD_AADIVDROP) +#define F_SCMD_AADIVDROP V_SCMD_AADIVDROP(1U) + +/* HdrLength - Length of all headers excluding TLS header + * present before start of crypto PDU/payload. */ +#define S_SCMD_HDR_LEN 0 +#define M_SCMD_HDR_LEN 0x3fff +#define V_SCMD_HDR_LEN(x) ((x) << S_SCMD_HDR_LEN) +#define G_SCMD_HDR_LEN(x) \ + (((x) >> S_SCMD_HDR_LEN) & M_SCMD_HDR_LEN) + +struct cpl_tx_sec_pdu { + __be32 op_ivinsrtofst; + __be32 pldlen; + __be32 aadstart_cipherstop_hi; + __be32 cipherstop_lo_authinsert; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +#define S_CPL_TX_SEC_PDU_OPCODE 24 +#define M_CPL_TX_SEC_PDU_OPCODE 0xff +#define V_CPL_TX_SEC_PDU_OPCODE(x) ((x) << S_CPL_TX_SEC_PDU_OPCODE) +#define G_CPL_TX_SEC_PDU_OPCODE(x) \ + (((x) >> S_CPL_TX_SEC_PDU_OPCODE) & M_CPL_TX_SEC_PDU_OPCODE) + +/* RX Channel Id */ +#define S_CPL_TX_SEC_PDU_RXCHID 22 +#define M_CPL_TX_SEC_PDU_RXCHID 0x1 +#define V_CPL_TX_SEC_PDU_RXCHID(x) ((x) << S_CPL_TX_SEC_PDU_RXCHID) +#define G_CPL_TX_SEC_PDU_RXCHID(x) \ +(((x) >> S_CPL_TX_SEC_PDU_RXCHID) & M_CPL_TX_SEC_PDU_RXCHID) +#define F_CPL_TX_SEC_PDU_RXCHID V_CPL_TX_SEC_PDU_RXCHID(1U) + +/* Ack Follows */ +#define S_CPL_TX_SEC_PDU_ACKFOLLOWS 21 +#define M_CPL_TX_SEC_PDU_ACKFOLLOWS 0x1 +#define V_CPL_TX_SEC_PDU_ACKFOLLOWS(x) ((x) << S_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define G_CPL_TX_SEC_PDU_ACKFOLLOWS(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ACKFOLLOWS) & M_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define F_CPL_TX_SEC_PDU_ACKFOLLOWS V_CPL_TX_SEC_PDU_ACKFOLLOWS(1U) + +/* Loopback bit in cpl_tx_sec_pdu */ +#define S_CPL_TX_SEC_PDU_ULPTXLPBK 20 +#define M_CPL_TX_SEC_PDU_ULPTXLPBK 0x1 +#define V_CPL_TX_SEC_PDU_ULPTXLPBK(x) ((x) << S_CPL_TX_SEC_PDU_ULPTXLPBK) +#define G_CPL_TX_SEC_PDU_ULPTXLPBK(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ULPTXLPBK) & M_CPL_TX_SEC_PDU_ULPTXLPBK) +#define F_CPL_TX_SEC_PDU_ULPTXLPBK V_CPL_TX_SEC_PDU_ULPTXLPBK(1U) + +/* Length of cpl header encapsulated */ +#define S_CPL_TX_SEC_PDU_CPLLEN 16 +#define M_CPL_TX_SEC_PDU_CPLLEN 0xf +#define V_CPL_TX_SEC_PDU_CPLLEN(x) ((x) << S_CPL_TX_SEC_PDU_CPLLEN) +#define G_CPL_TX_SEC_PDU_CPLLEN(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CPLLEN) & M_CPL_TX_SEC_PDU_CPLLEN) + +/* PlaceHolder */ +#define S_CPL_TX_SEC_PDU_PLACEHOLDER 10 +#define M_CPL_TX_SEC_PDU_PLACEHOLDER 0x1 +#define V_CPL_TX_SEC_PDU_PLACEHOLDER(x) ((x) << S_CPL_TX_SEC_PDU_PLACEHOLDER) +#define G_CPL_TX_SEC_PDU_PLACEHOLDER(x) \ + (((x) >> S_CPL_TX_SEC_PDU_PLACEHOLDER) & \ + M_CPL_TX_SEC_PDU_PLACEHOLDER) + +/* IvInsrtOffset: Insertion location for IV */ +#define S_CPL_TX_SEC_PDU_IVINSRTOFST 0 +#define M_CPL_TX_SEC_PDU_IVINSRTOFST 0x3ff +#define V_CPL_TX_SEC_PDU_IVINSRTOFST(x) ((x) << S_CPL_TX_SEC_PDU_IVINSRTOFST) +#define G_CPL_TX_SEC_PDU_IVINSRTOFST(x) \ + (((x) >> S_CPL_TX_SEC_PDU_IVINSRTOFST) & \ + M_CPL_TX_SEC_PDU_IVINSRTOFST) + +/* AadStartOffset: Offset in bytes for AAD start from + * the first byte following + * the pkt headers (0-255 + * bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTART 24 +#define M_CPL_TX_SEC_PDU_AADSTART 0xff +#define V_CPL_TX_SEC_PDU_AADSTART(x) ((x) << S_CPL_TX_SEC_PDU_AADSTART) +#define G_CPL_TX_SEC_PDU_AADSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTART) & \ + M_CPL_TX_SEC_PDU_AADSTART) + +/* AadStopOffset: offset in bytes for AAD stop/end from the first byte following + * the pkt headers (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTOP 15 +#define M_CPL_TX_SEC_PDU_AADSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AADSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AADSTOP) +#define G_CPL_TX_SEC_PDU_AADSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTOP) & M_CPL_TX_SEC_PDU_AADSTOP) + +/* CipherStartOffset: offset in bytes for encryption/decryption start from the + * first byte following the pkt headers (0-1023 + * bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTART 5 +#define M_CPL_TX_SEC_PDU_CIPHERSTART 0x3ff +#define V_CPL_TX_SEC_PDU_CIPHERSTART(x) ((x) << S_CPL_TX_SEC_PDU_CIPHERSTART) +#define G_CPL_TX_SEC_PDU_CIPHERSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTART) & \ + M_CPL_TX_SEC_PDU_CIPHERSTART) + +/* CipherStopOffset: offset in bytes for encryption/decryption end + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0x1f +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_HI) + +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_LO 28 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_LO 0xf +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_LO) + +/* AuthStartOffset: offset in bytes for authentication start from + * the first byte following the pkt headers (0-1023) + * */ +#define S_CPL_TX_SEC_PDU_AUTHSTART 18 +#define M_CPL_TX_SEC_PDU_AUTHSTART 0x3ff +#define V_CPL_TX_SEC_PDU_AUTHSTART(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTART) +#define G_CPL_TX_SEC_PDU_AUTHSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTART) & \ + M_CPL_TX_SEC_PDU_AUTHSTART) + +/* AuthStopOffset: offset in bytes for authentication + * end from end of the payload of this command (0-511 Bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHSTOP 9 +#define M_CPL_TX_SEC_PDU_AUTHSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTOP) +#define G_CPL_TX_SEC_PDU_AUTHSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTOP) & \ + M_CPL_TX_SEC_PDU_AUTHSTOP) + +/* AuthInsrtOffset: offset in bytes for authentication insertion + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHINSERT 0 +#define M_CPL_TX_SEC_PDU_AUTHINSERT 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHINSERT(x) ((x) << S_CPL_TX_SEC_PDU_AUTHINSERT) +#define G_CPL_TX_SEC_PDU_AUTHINSERT(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHINSERT) & \ + M_CPL_TX_SEC_PDU_AUTHINSERT) + +struct cpl_rx_phys_dsgl { + __be32 op_to_tid; + __be32 pcirlxorder_to_noofsgentr; + struct rss_header rss_hdr_int; +}; + +#define S_CPL_RX_PHYS_DSGL_OPCODE 24 +#define M_CPL_RX_PHYS_DSGL_OPCODE 0xff +#define V_CPL_RX_PHYS_DSGL_OPCODE(x) ((x) << S_CPL_RX_PHYS_DSGL_OPCODE) +#define G_CPL_RX_PHYS_DSGL_OPCODE(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_OPCODE) & M_CPL_RX_PHYS_DSGL_OPCODE) + +#define S_CPL_RX_PHYS_DSGL_ISRDMA 23 +#define M_CPL_RX_PHYS_DSGL_ISRDMA 0x1 +#define V_CPL_RX_PHYS_DSGL_ISRDMA(x) ((x) << S_CPL_RX_PHYS_DSGL_ISRDMA) +#define G_CPL_RX_PHYS_DSGL_ISRDMA(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_ISRDMA) & M_CPL_RX_PHYS_DSGL_ISRDMA) +#define F_CPL_RX_PHYS_DSGL_ISRDMA V_CPL_RX_PHYS_DSGL_ISRDMA(1U) + +#define S_CPL_RX_PHYS_DSGL_RSVD1 20 +#define M_CPL_RX_PHYS_DSGL_RSVD1 0x7 +#define V_CPL_RX_PHYS_DSGL_RSVD1(x) ((x) << S_CPL_RX_PHYS_DSGL_RSVD1) +#define G_CPL_RX_PHYS_DSGL_RSVD1(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_RSVD1) & M_CPL_RX_PHYS_DSGL_RSVD1) + +#define S_CPL_RX_PHYS_DSGL_PCIRLXORDER 31 +#define M_CPL_RX_PHYS_DSGL_PCIRLXORDER 0x1 +#define V_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define G_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCIRLXORDER) & \ + M_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define F_CPL_RX_PHYS_DSGL_PCIRLXORDER V_CPL_RX_PHYS_DSGL_PCIRLXORDER(1U) + +#define S_CPL_RX_PHYS_DSGL_PCINOSNOOP 30 +#define M_CPL_RX_PHYS_DSGL_PCINOSNOOP 0x1 +#define V_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define G_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCINOSNOOP) & \ + M_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define F_CPL_RX_PHYS_DSGL_PCINOSNOOP V_CPL_RX_PHYS_DSGL_PCINOSNOOP(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNTENB 29 +#define M_CPL_RX_PHYS_DSGL_PCITPHNTENB 0x1 +#define V_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define G_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNTENB) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define F_CPL_RX_PHYS_DSGL_PCITPHNTENB V_CPL_RX_PHYS_DSGL_PCITPHNTENB(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNT 27 +#define M_CPL_RX_PHYS_DSGL_PCITPHNT 0x3 +#define V_CPL_RX_PHYS_DSGL_PCITPHNT(x) ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNT) +#define G_CPL_RX_PHYS_DSGL_PCITPHNT(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNT) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNT) + +#define S_CPL_RX_PHYS_DSGL_DCAID 16 +#define M_CPL_RX_PHYS_DSGL_DCAID 0x7ff +#define V_CPL_RX_PHYS_DSGL_DCAID(x) ((x) << S_CPL_RX_PHYS_DSGL_DCAID) +#define G_CPL_RX_PHYS_DSGL_DCAID(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_DCAID) & \ + M_CPL_RX_PHYS_DSGL_DCAID) + +#define S_CPL_RX_PHYS_DSGL_NOOFSGENTR 0 +#define M_CPL_RX_PHYS_DSGL_NOOFSGENTR 0xffff +#define V_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_NOOFSGENTR) +#define G_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_NOOFSGENTR) & \ + M_CPL_RX_PHYS_DSGL_NOOFSGENTR) + +/* CPL_TX_TLS_ACK */ +struct cpl_tx_tls_ack { + __be32 op_to_Rsvd2; + __be32 PldLen; + __be64 Rsvd3; +}; + +#define S_CPL_TX_TLS_ACK_OPCODE 24 +#define M_CPL_TX_TLS_ACK_OPCODE 0xff +#define V_CPL_TX_TLS_ACK_OPCODE(x) ((x) << S_CPL_TX_TLS_ACK_OPCODE) +#define G_CPL_TX_TLS_ACK_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_ACK_OPCODE) & M_CPL_TX_TLS_ACK_OPCODE) + +#define S_CPL_TX_TLS_ACK_RSVD1 23 +#define M_CPL_TX_TLS_ACK_RSVD1 0x1 +#define V_CPL_TX_TLS_ACK_RSVD1(x) ((x) << S_CPL_TX_TLS_ACK_RSVD1) +#define G_CPL_TX_TLS_ACK_RSVD1(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD1) & M_CPL_TX_TLS_ACK_RSVD1) +#define F_CPL_TX_TLS_ACK_RSVD1 V_CPL_TX_TLS_ACK_RSVD1(1U) + +#define S_CPL_TX_TLS_ACK_RXCHID 22 +#define M_CPL_TX_TLS_ACK_RXCHID 0x1 +#define V_CPL_TX_TLS_ACK_RXCHID(x) ((x) << S_CPL_TX_TLS_ACK_RXCHID) +#define G_CPL_TX_TLS_ACK_RXCHID(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RXCHID) & M_CPL_TX_TLS_ACK_RXCHID) +#define F_CPL_TX_TLS_ACK_RXCHID V_CPL_TX_TLS_ACK_RXCHID(1U) + +#define S_CPL_TX_TLS_ACK_FWMSG 21 +#define M_CPL_TX_TLS_ACK_FWMSG 0x1 +#define V_CPL_TX_TLS_ACK_FWMSG(x) ((x) << S_CPL_TX_TLS_ACK_FWMSG) +#define G_CPL_TX_TLS_ACK_FWMSG(x) \ + (((x) >> S_CPL_TX_TLS_ACK_FWMSG) & M_CPL_TX_TLS_ACK_FWMSG) +#define F_CPL_TX_TLS_ACK_FWMSG V_CPL_TX_TLS_ACK_FWMSG(1U) + +#define S_CPL_TX_TLS_ACK_ULPTXLPBK 20 +#define M_CPL_TX_TLS_ACK_ULPTXLPBK 0x1 +#define V_CPL_TX_TLS_ACK_ULPTXLPBK(x) ((x) << S_CPL_TX_TLS_ACK_ULPTXLPBK) +#define G_CPL_TX_TLS_ACK_ULPTXLPBK(x) \ + (((x) >> S_CPL_TX_TLS_ACK_ULPTXLPBK) & M_CPL_TX_TLS_ACK_ULPTXLPBK) +#define F_CPL_TX_TLS_ACK_ULPTXLPBK V_CPL_TX_TLS_ACK_ULPTXLPBK(1U) + +#define S_CPL_TX_TLS_ACK_CPLLEN 16 +#define M_CPL_TX_TLS_ACK_CPLLEN 0xf +#define V_CPL_TX_TLS_ACK_CPLLEN(x) ((x) << S_CPL_TX_TLS_ACK_CPLLEN) +#define G_CPL_TX_TLS_ACK_CPLLEN(x) \ + (((x) >> S_CPL_TX_TLS_ACK_CPLLEN) & M_CPL_TX_TLS_ACK_CPLLEN) + +#define S_CPL_TX_TLS_ACK_COMPLONERR 15 +#define M_CPL_TX_TLS_ACK_COMPLONERR 0x1 +#define V_CPL_TX_TLS_ACK_COMPLONERR(x) ((x) << S_CPL_TX_TLS_ACK_COMPLONERR) +#define G_CPL_TX_TLS_ACK_COMPLONERR(x) \ + (((x) >> S_CPL_TX_TLS_ACK_COMPLONERR) & M_CPL_TX_TLS_ACK_COMPLONERR) +#define F_CPL_TX_TLS_ACK_COMPLONERR V_CPL_TX_TLS_ACK_COMPLONERR(1U) + +#define S_CPL_TX_TLS_ACK_LCB 14 +#define M_CPL_TX_TLS_ACK_LCB 0x1 +#define V_CPL_TX_TLS_ACK_LCB(x) ((x) << S_CPL_TX_TLS_ACK_LCB) +#define G_CPL_TX_TLS_ACK_LCB(x) \ + (((x) >> S_CPL_TX_TLS_ACK_LCB) & M_CPL_TX_TLS_ACK_LCB) +#define F_CPL_TX_TLS_ACK_LCB V_CPL_TX_TLS_ACK_LCB(1U) + +#define S_CPL_TX_TLS_ACK_PHASH 13 +#define M_CPL_TX_TLS_ACK_PHASH 0x1 +#define V_CPL_TX_TLS_ACK_PHASH(x) ((x) << S_CPL_TX_TLS_ACK_PHASH) +#define G_CPL_TX_TLS_ACK_PHASH(x) \ + (((x) >> S_CPL_TX_TLS_ACK_PHASH) & M_CPL_TX_TLS_ACK_PHASH) +#define F_CPL_TX_TLS_ACK_PHASH V_CPL_TX_TLS_ACK_PHASH(1U) + +#define S_CPL_TX_TLS_ACK_RSVD2 0 +#define M_CPL_TX_TLS_ACK_RSVD2 0x1fff +#define V_CPL_TX_TLS_ACK_RSVD2(x) ((x) << S_CPL_TX_TLS_ACK_RSVD2) +#define G_CPL_TX_TLS_ACK_RSVD2(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD2) & M_CPL_TX_TLS_ACK_RSVD2) + #endif /* T4_MSG_H */ From owner-svn-src-all@freebsd.org Wed May 24 06:49:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AF87D7BC5B; Wed, 24 May 2017 06:49:03 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FA161B2C; Wed, 24 May 2017 06:49:03 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O6n2Or060628; Wed, 24 May 2017 06:49:02 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O6n2xI060627; Wed, 24 May 2017 06:49:02 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705240649.v4O6n2xI060627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 24 May 2017 06:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318776 - stable/11/contrib/binutils/gas/config X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 06:49:03 -0000 Author: mmel Date: Wed May 24 06:49:01 2017 New Revision: 318776 URL: https://svnweb.freebsd.org/changeset/base/318776 Log: MFC r318135: Fix parsing of 'vmov Q.F32,Q.F32' instruction. Modified: stable/11/contrib/binutils/gas/config/tc-arm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- stable/11/contrib/binutils/gas/config/tc-arm.c Wed May 24 05:30:36 2017 (r318775) +++ stable/11/contrib/binutils/gas/config/tc-arm.c Wed May 24 06:49:01 2017 (r318776) @@ -5211,12 +5211,6 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].present = 1; } } - else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS) - /* Case 2: VMOV.
, # - Case 3: VMOV.
, # - Case 10: VMOV.F32 , # - Case 11: VMOV.F64
, # */ - inst.operands[i].immisfloat = 1; else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_NSDQ, &rtype, &optype)) != FAIL) { @@ -5253,9 +5247,15 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].reg = val; inst.operands[i].isreg = 1; - inst.operands[i++].present = 1; + inst.operands[i].present = 1; } } + else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS) + /* Case 2: VMOV.
, # + Case 3: VMOV.
, # + Case 10: VMOV.F32 , # + Case 11: VMOV.F64
, # */ + inst.operands[i].immisfloat = 1; else if (parse_big_immediate (&ptr, i) == SUCCESS) /* Case 2: VMOV.
, # Case 3: VMOV.
, # */ @@ -5337,7 +5337,7 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].isvec = 1; inst.operands[i].issingle = 1; inst.operands[i].vectype = optype; - inst.operands[i++].present = 1; + inst.operands[i].present = 1; } } else From owner-svn-src-all@freebsd.org Wed May 24 09:01:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26DA5D7B67F; Wed, 24 May 2017 09:01:56 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECD411F4A; Wed, 24 May 2017 09:01:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O91tY4014521; Wed, 24 May 2017 09:01:55 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O91tVF014520; Wed, 24 May 2017 09:01:55 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705240901.v4O91tVF014520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 24 May 2017 09:01:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318777 - stable/11/sbin/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 09:01:56 -0000 Author: ae Date: Wed May 24 09:01:54 2017 New Revision: 318777 URL: https://svnweb.freebsd.org/changeset/base/318777 Log: MFC r318400: Allow zero port specification in table entries with type flow. PR: 217620 Modified: stable/11/sbin/ipfw/tables.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/tables.c ============================================================================== --- stable/11/sbin/ipfw/tables.c Wed May 24 06:49:01 2017 (r318776) +++ stable/11/sbin/ipfw/tables.c Wed May 24 09:01:54 2017 (r318777) @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj if ((p = strchr(arg, ',')) != NULL) *p++ = '\0'; - if ((port = htons(strtol(arg, NULL, 10))) == 0) { + port = htons(strtol(arg, &pp, 10)); + if (*pp != '\0') { if ((sent = getservbyname(arg, NULL)) == NULL) errx(EX_DATAERR, "Unknown service: %s", arg); - else - key = sent->s_port; + port = sent->s_port; } - tfe->sport = port; - arg = p; } @@ -1304,16 +1302,14 @@ tentry_fill_key_type(char *arg, ipfw_obj if ((p = strchr(arg, ',')) != NULL) *p++ = '\0'; - if ((port = htons(strtol(arg, NULL, 10))) == 0) { + port = htons(strtol(arg, &pp, 10)); + if (*pp != '\0') { if ((sent = getservbyname(arg, NULL)) == NULL) errx(EX_DATAERR, "Unknown service: %s", arg); - else - key = sent->s_port; + port = sent->s_port; } - tfe->dport = port; - arg = p; } From owner-svn-src-all@freebsd.org Wed May 24 09:03:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE79AD7B7B8; Wed, 24 May 2017 09:03:47 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE60811FC; Wed, 24 May 2017 09:03:47 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O93kSM018170; Wed, 24 May 2017 09:03:46 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O93kVa018169; Wed, 24 May 2017 09:03:46 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705240903.v4O93kVa018169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 24 May 2017 09:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318778 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 09:03:48 -0000 Author: ae Date: Wed May 24 09:03:46 2017 New Revision: 318778 URL: https://svnweb.freebsd.org/changeset/base/318778 Log: MFC r318399: Set M_BCAST and M_MCAST flags on mbuf sent via divert socket. r290383 has changed how mbufs sent by divert socket are handled. Previously they are always handled by slow path processing in ip_input(). Now ip_tryforward() is invoked from ip_input() before in_broadcast() check. Since diverted packet lost all mbuf flags, it passes the broadcast check in ip_tryforward() due to missing M_BCAST flag. In the result the broadcast packet is forwarded to the wire instead of be consumed by network stack. Add in_broadcast() check to the div_output() function. And restore the M_BCAST flag if destination address is broadcast for the given network interface. PR: 209491 Modified: stable/11/sys/netinet/ip_divert.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_divert.c ============================================================================== --- stable/11/sys/netinet/ip_divert.c Wed May 24 09:01:54 2017 (r318777) +++ stable/11/sys/netinet/ip_divert.c Wed May 24 09:03:46 2017 (r318778) @@ -489,6 +489,14 @@ div_output(struct socket *so, struct mbu /* Send packet to input processing via netisr */ switch (ip->ip_v) { case IPVERSION: + /* + * Restore M_BCAST flag when destination address is + * broadcast. It is expected by ip_tryforward(). + */ + if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) + m->m_flags |= M_MCAST; + else if (in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) + m->m_flags |= M_BCAST; netisr_queue_src(NETISR_IP, (uintptr_t)so, m); break; #ifdef INET6 From owner-svn-src-all@freebsd.org Wed May 24 09:05:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD535D7B875; Wed, 24 May 2017 09:05:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A27F13B2; Wed, 24 May 2017 09:05:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4O95qbG030400 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 24 May 2017 12:05:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4O95qbG030400 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4O95qht030392; Wed, 24 May 2017 12:05:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 24 May 2017 12:05:52 +0300 From: Konstantin Belousov To: Larry Rosenman Cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" Subject: Re: svn commit: r318757 - head Message-ID: <20170524090552.GF1622@kib.kiev.ua> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 09:05:59 -0000 On Tue, May 23, 2017 at 04:46:14PM -0500, Larry Rosenman wrote: > My PostgreSQL buildfarm animal BROKE with this change until I force rebuilt > lang/perl5.24 > and all my p5-* ports. So what was the symptoms and the error, exactly ? A lot of efforts were spent to ensure that _consistent_ set of old binaries and libraries would run without issues on the new system. I mean that if you have binaries and libraries built on pre-ino64 system, which do not reference any libraries built on post ino64, except system libraries (like libc/libthr etc), everything should work. This feature was the main cause of long delay finishing ino64. > > emulators/qemu-user-static also won???t compile (sbruno@ is on this one). This is a separate issue. > > Poudriere did *NOT* force a fuill rebuild even though freebsd-version *WAS* bumped. > > Is there a hazard for others here? > > Or more info needed in /usr/{src,ports}/UPDATING? > > > -- > Larry Rosenman http://www.lerctr.org/~ler > Phone: +1 214-642-9640 E-Mail: ler@lerctr.org > US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 > > > > From owner-svn-src-all@freebsd.org Wed May 24 09:25:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7B36D7BEC0; Wed, 24 May 2017 09:25:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8203F1FD1; Wed, 24 May 2017 09:25:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O9PD6r026684; Wed, 24 May 2017 09:25:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O9PDsZ026682; Wed, 24 May 2017 09:25:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705240925.v4O9PDsZ026682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 24 May 2017 09:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318780 - in head: include sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 09:25:14 -0000 Author: kib Date: Wed May 24 09:25:13 2017 New Revision: 318780 URL: https://svnweb.freebsd.org/changeset/base/318780 Log: Use __BSD_VISIBLE test instead checking for absense of _POSIX_SOURCE. The Termios headers and used sometimes _POSIX_SOURCE directly to determine if a thing should be exposed to the user. This circumvented the feature mechanisms of . Submitted by: Sebastian Huber MFC after: 2 weeks Modified: head/include/termios.h head/sys/sys/_termios.h Modified: head/include/termios.h ============================================================================== --- head/include/termios.h Wed May 24 09:09:10 2017 (r318779) +++ head/include/termios.h Wed May 24 09:25:13 2017 (r318780) @@ -42,12 +42,12 @@ typedef __pid_t pid_t; #define _PID_T_DECLARED #endif -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define OXTABS TAB3 #define MDMBUF CCAR_OFLOW #endif -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE) #endif @@ -57,7 +57,7 @@ typedef __pid_t pid_t; #define TCSANOW 0 /* make change immediate */ #define TCSADRAIN 1 /* drain output, then change */ #define TCSAFLUSH 2 /* drain output, flush input */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define TCSASOFT 0x10 /* flag - don't alter h.w. state */ #endif @@ -95,7 +95,7 @@ __END_DECLS #endif /* !_TERMIOS_H_ */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #include #include #endif Modified: head/sys/sys/_termios.h ============================================================================== --- head/sys/sys/_termios.h Wed May 24 09:09:10 2017 (r318779) +++ head/sys/sys/_termios.h Wed May 24 09:25:13 2017 (r318780) @@ -42,15 +42,15 @@ */ #define VEOF 0 /* ICANON */ #define VEOL 1 /* ICANON */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VEOL2 2 /* ICANON together with IEXTEN */ #endif #define VERASE 3 /* ICANON */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VWERASE 4 /* ICANON together with IEXTEN */ #endif #define VKILL 5 /* ICANON */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VREPRINT 6 /* ICANON together with IEXTEN */ #define VERASE2 7 /* ICANON */ #endif @@ -58,18 +58,18 @@ #define VINTR 8 /* ISIG */ #define VQUIT 9 /* ISIG */ #define VSUSP 10 /* ISIG */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VDSUSP 11 /* ISIG together with IEXTEN */ #endif #define VSTART 12 /* IXON, IXOFF */ #define VSTOP 13 /* IXON, IXOFF */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VLNEXT 14 /* IEXTEN */ #define VDISCARD 15 /* IEXTEN */ #endif #define VMIN 16 /* !ICANON */ #define VTIME 17 /* !ICANON */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VSTATUS 18 /* ICANON together with IEXTEN */ /* 19 spare 2 */ #endif @@ -91,16 +91,16 @@ #define ICRNL 0x00000100 /* map CR to NL (ala CRMOD) */ #define IXON 0x00000200 /* enable output flow control */ #define IXOFF 0x00000400 /* enable input flow control */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define IXANY 0x00000800 /* any char will restart after stop */ #define IMAXBEL 0x00002000 /* ring bell on input queue full */ -#endif /*_POSIX_SOURCE */ +#endif /* * Output flags - software output processing */ #define OPOST 0x00000001 /* enable following output processing */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */ #define TABDLY 0x00000004 /* tab delay mask */ #define TAB0 0x00000000 /* no tab delay and expansion */ @@ -109,12 +109,12 @@ #define OCRNL 0x00000010 /* map CR to NL on output */ #define ONOCR 0x00000020 /* no CR output at column 0 */ #define ONLRET 0x00000040 /* NL performs CR function */ -#endif /*_POSIX_SOURCE */ +#endif /* * Control flags - hardware control of terminal */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define CIGNORE 0x00000001 /* ignore control flags */ #endif #define CSIZE 0x00000300 /* character size mask */ @@ -128,7 +128,7 @@ #define PARODD 0x00002000 /* odd parity, else even */ #define HUPCL 0x00004000 /* hang up on last close */ #define CLOCAL 0x00008000 /* ignore modem status lines */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define CCTS_OFLOW 0x00010000 /* CTS flow control of output */ #define CRTSCTS (CCTS_OFLOW | CRTS_IFLOW) #define CRTS_IFLOW 0x00020000 /* RTS flow control of input */ @@ -146,30 +146,30 @@ * input flag. */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ECHOKE 0x00000001 /* visual erase for line kill */ -#endif /*_POSIX_SOURCE */ +#endif #define ECHOE 0x00000002 /* visually erase chars */ #define ECHOK 0x00000004 /* echo NL after line kill */ #define ECHO 0x00000008 /* enable echoing */ #define ECHONL 0x00000010 /* echo NL even if ECHO is off */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ECHOPRT 0x00000020 /* visual erase mode for hardcopy */ #define ECHOCTL 0x00000040 /* echo control chars as ^(Char) */ -#endif /*_POSIX_SOURCE */ +#endif #define ISIG 0x00000080 /* enable signals INTR, QUIT, [D]SUSP */ #define ICANON 0x00000100 /* canonicalize input lines */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ALTWERASE 0x00000200 /* use alternate WERASE algorithm */ -#endif /*_POSIX_SOURCE */ +#endif #define IEXTEN 0x00000400 /* enable DISCARD and LNEXT */ #define EXTPROC 0x00000800 /* external processing */ #define TOSTOP 0x00400000 /* stop background jobs from output */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define FLUSHO 0x00800000 /* output being flushed (state) */ #define NOKERNINFO 0x02000000 /* no kernel output from VSTATUS */ #define PENDIN 0x20000000 /* XXX retype pending input (state) */ -#endif /*_POSIX_SOURCE */ +#endif #define NOFLSH 0x80000000 /* don't flush after interrupt */ /* @@ -191,7 +191,7 @@ #define B9600 9600 #define B19200 19200 #define B38400 38400 -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define B7200 7200 #define B14400 14400 #define B28800 28800 @@ -203,7 +203,7 @@ #define B921600 921600 #define EXTA 19200 #define EXTB 38400 -#endif /* !_POSIX_SOURCE */ +#endif typedef unsigned int tcflag_t; typedef unsigned char cc_t; From owner-svn-src-all@freebsd.org Wed May 24 10:09:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07255D7AF1E; Wed, 24 May 2017 10:09:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC20D16AF; Wed, 24 May 2017 10:09:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OA9sUj043746; Wed, 24 May 2017 10:09:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OA9sMY043744; Wed, 24 May 2017 10:09:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705241009.v4OA9sMY043744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 24 May 2017 10:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318781 - in head: share/man/man9 sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 10:09:56 -0000 Author: kib Date: Wed May 24 10:09:54 2017 New Revision: 318781 URL: https://svnweb.freebsd.org/changeset/base/318781 Log: Add BIT_OR2(), BIT_AND2(), BIT_NAND2(), BIT_XOR() and BIT_XOR2(). Submitted by: Sebastian Huber MFC after: 2 weeks Modified: head/share/man/man9/bitset.9 head/sys/sys/bitset.h Modified: head/share/man/man9/bitset.9 ============================================================================== --- head/share/man/man9/bitset.9 Wed May 24 09:25:13 2017 (r318780) +++ head/share/man/man9/bitset.9 Wed May 24 10:09:54 2017 (r318781) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 29, 2016 +.Dd May 24, 2017 .Dt BITSET 9 .Os .Sh NAME @@ -48,8 +48,13 @@ .Nm BIT_OVERLAP , .Nm BIT_CMP , .Nm BIT_OR , +.Nm BIT_OR2 , .Nm BIT_AND , +.Nm BIT_AND2 , .Nm BIT_NAND , +.Nm BIT_NAND2 , +.Nm BIT_XOR , +.Nm BIT_XOR2 , .Nm BIT_CLR_ATOMIC , .Nm BIT_SET_ATOMIC , .Nm BIT_SET_ATOMIC_ACQ , @@ -95,8 +100,33 @@ .Fa "const SETSIZE" "struct STRUCTNAME *bitset1" "struct STRUCTNAME *bitset2" .Fc .Fn BIT_OR "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_OR2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc .Fn BIT_AND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_AND2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc .Fn BIT_NAND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_NAND2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc +.Fn BIT_XOR "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_XOR2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc .\" .Fn BIT_CLR_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" .Fn BIT_SET_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" @@ -312,6 +342,23 @@ is composed of multiple machine words, performs multiple individually atomic operations.) .Pp The +.Fn BIT_OR2 +macro computes +.Fa src1 +bitwise or +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +| +.Fa src2 . ) +.Pp +The .Fn BIT_AND macro clears bits absent from .Fa src @@ -328,6 +375,23 @@ is similar, with the same atomic semanti .Fn BIT_OR_ATOMIC . .Pp The +.Fn BIT_AND2 +macro computes +.Fa src1 +bitwise and +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +& +.Fa src2 . ) +.Pp +The .Fn BIT_NAND macro clears bits set in .Fa src @@ -339,6 +403,53 @@ equivalent of the scalar: .Fa dst &= .Fa ~ src . ) +.Pp +The +.Fn BIT_NAND2 +macro computes +.Fa src1 +bitwise and not +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +& ~ +.Fa src2 . ) +.Pp +The +.Fn BIT_XOR +macro toggles bits set in +.Fa src +in +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +^= +.Fa src . ) +.Pp +The +.Fn BIT_XOR2 +macro computes +.Fa src1 +bitwise exclusive or +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +^ +.Fa src2 . ) .Sh BITSET_T_INITIALIZER EXAMPLE .Bd -literal BITSET_DEFINE(_myset, MYSETSIZE); Modified: head/sys/sys/bitset.h ============================================================================== --- head/sys/sys/bitset.h Wed May 24 09:25:13 2017 (r318780) +++ head/sys/sys/bitset.h Wed May 24 10:09:54 2017 (r318781) @@ -122,18 +122,48 @@ (d)->__bits[__i] |= (s)->__bits[__i]; \ } while (0) +#define BIT_OR2(_s, d, s1, s2) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] = (s1)->__bits[__i] | (s2)->__bits[__i];\ +} while (0) + #define BIT_AND(_s, d, s) do { \ __size_t __i; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ (d)->__bits[__i] &= (s)->__bits[__i]; \ } while (0) +#define BIT_AND2(_s, d, s1, s2) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] = (s1)->__bits[__i] & (s2)->__bits[__i];\ +} while (0) + #define BIT_NAND(_s, d, s) do { \ __size_t __i; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ (d)->__bits[__i] &= ~(s)->__bits[__i]; \ } while (0) +#define BIT_NAND2(_s, d, s1, s2) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] = (s1)->__bits[__i] & ~(s2)->__bits[__i];\ +} while (0) + +#define BIT_XOR(_s, d, s) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] ^= (s)->__bits[__i]; \ +} while (0) + +#define BIT_XOR2(_s, d, s1, s2) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] = (s1)->__bits[__i] ^ (s2)->__bits[__i];\ +} while (0) + #define BIT_CLR_ATOMIC(_s, n, p) \ atomic_clear_long(&(p)->__bits[__bitset_word(_s, n)], \ __bitset_mask((_s), n)) From owner-svn-src-all@freebsd.org Wed May 24 11:09:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ECB8D7A622; Wed, 24 May 2017 11:09:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 109381794; Wed, 24 May 2017 11:09:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OB970W068502; Wed, 24 May 2017 11:09:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OB97kZ068501; Wed, 24 May 2017 11:09:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241109.v4OB97kZ068501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318782 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:09:08 -0000 Author: avg Date: Wed May 24 11:09:06 2017 New Revision: 318782 URL: https://svnweb.freebsd.org/changeset/base/318782 Log: MFC r316643: use msr 0xc001100c to discover multi-node AMD processors Modified: stable/11/sys/x86/x86/mp_x86.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/mp_x86.c ============================================================================== --- stable/11/sys/x86/x86/mp_x86.c Wed May 24 10:09:54 2017 (r318781) +++ stable/11/sys/x86/x86/mp_x86.c Wed May 24 11:09:06 2017 (r318782) @@ -235,7 +235,9 @@ static void topo_probe_amd(void) { u_int p[4]; + uint64_t v; int level; + int nodes_per_socket; int share_count; int type; int i; @@ -294,13 +296,18 @@ topo_probe_amd(void) caches[1].present = 1; } if (((p[3] >> 18) & 0x3fff) != 0) { - - /* - * TODO: Account for dual-node processors - * where each node within a package has its own - * L3 cache. - */ - caches[2].id_shift = pkg_id_shift; + nodes_per_socket = 1; + if ((amd_feature2 & AMDID2_NODE_ID) != 0) { + /* + * Handle multi-node processors that + * have multiple chips, each with its + * own L3 cache, on the same die. + */ + v = rdmsr(0xc001100c); + nodes_per_socket = 1 + ((v >> 3) & 0x7); + } + caches[2].id_shift = + pkg_id_shift - mask_width(nodes_per_socket); caches[2].present = 1; } } From owner-svn-src-all@freebsd.org Wed May 24 11:10:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E815D7A7E3; Wed, 24 May 2017 11:10:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FF971AB7; Wed, 24 May 2017 11:10:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OBAulR068656; Wed, 24 May 2017 11:10:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OBAujr068655; Wed, 24 May 2017 11:10:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241110.v4OBAujr068655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318783 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:10:57 -0000 Author: avg Date: Wed May 24 11:10:55 2017 New Revision: 318783 URL: https://svnweb.freebsd.org/changeset/base/318783 Log: MFC r316853: dtrace: fix normalization of stddev aggregation Sponsored by: Panzura Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed May 24 11:09:06 2017 (r318782) +++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed May 24 11:10:55 2017 (r318783) @@ -389,8 +389,10 @@ dt_stddev(uint64_t *data, uint64_t norma * The standard approximation for standard deviation is * sqrt(average(x**2) - average(x)**2), i.e. the square root * of the average of the squares minus the square of the average. + * When normalizing, we should divide the sum of x**2 by normal**2. */ dt_divide_128(data + 2, normal, avg_of_squares); + dt_divide_128(avg_of_squares, normal, avg_of_squares); dt_divide_128(avg_of_squares, data[0], avg_of_squares); norm_avg = (int64_t)data[1] / (int64_t)normal / (int64_t)data[0]; From owner-svn-src-all@freebsd.org Wed May 24 11:11:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAE90D7A9AF; Wed, 24 May 2017 11:11:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B675A1C21; Wed, 24 May 2017 11:11:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OBBDkm068741; Wed, 24 May 2017 11:11:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OBBDJx068740; Wed, 24 May 2017 11:11:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241111.v4OBBDJx068740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318784 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:11:15 -0000 Author: avg Date: Wed May 24 11:11:13 2017 New Revision: 318784 URL: https://svnweb.freebsd.org/changeset/base/318784 Log: MFC r316853: dtrace: fix normalization of stddev aggregation Sponsored by: Panzura Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed May 24 11:10:55 2017 (r318783) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed May 24 11:11:13 2017 (r318784) @@ -389,8 +389,10 @@ dt_stddev(uint64_t *data, uint64_t norma * The standard approximation for standard deviation is * sqrt(average(x**2) - average(x)**2), i.e. the square root * of the average of the squares minus the square of the average. + * When normalizing, we should divide the sum of x**2 by normal**2. */ dt_divide_128(data + 2, normal, avg_of_squares); + dt_divide_128(avg_of_squares, normal, avg_of_squares); dt_divide_128(avg_of_squares, data[0], avg_of_squares); norm_avg = (int64_t)data[1] / (int64_t)normal / (int64_t)data[0]; From owner-svn-src-all@freebsd.org Wed May 24 11:38:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BAFAD7B21D; Wed, 24 May 2017 11:38:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D0131AEC; Wed, 24 May 2017 11:38:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OBcV0v081340; Wed, 24 May 2017 11:38:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OBcVhO081339; Wed, 24 May 2017 11:38:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241138.v4OBcVhO081339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318785 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:38:32 -0000 Author: avg Date: Wed May 24 11:38:31 2017 New Revision: 318785 URL: https://svnweb.freebsd.org/changeset/base/318785 Log: MFC r316854: rename vfs.zfs.debug_flags to vfs.zfs.debugflags Since this is a stable branch vfs.zfs.debug_flags sysctl is also kept. The corresponing tunable could never work. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.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 Wed May 24 11:11:13 2017 (r318784) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 11:38:31 2017 (r318785) @@ -353,9 +353,13 @@ sysctl_vfs_zfs_debug_flags(SYSCTL_HANDLE return (0); } -SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags, CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing."); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, + CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(int), + sysctl_vfs_zfs_debug_flags, "IU", + "Debug flags for ZFS testing (deprecated, see vfs.zfs.debugflags)."); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_synctime_ms, CTLFLAG_RDTUN, &zfs_deadman_synctime_ms, 0, From owner-svn-src-all@freebsd.org Wed May 24 11:38:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8FE7D7B268; Wed, 24 May 2017 11:38:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A6A61BB2; Wed, 24 May 2017 11:38:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OBch9m081397; Wed, 24 May 2017 11:38:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OBchlq081396; Wed, 24 May 2017 11:38:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241138.v4OBchlq081396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318786 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:38:44 -0000 Author: avg Date: Wed May 24 11:38:43 2017 New Revision: 318786 URL: https://svnweb.freebsd.org/changeset/base/318786 Log: MFC r316854: rename vfs.zfs.debug_flags to vfs.zfs.debugflags Since this is a stable branch vfs.zfs.debug_flags sysctl is also kept. The corresponing tunable could never work. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 11:38:31 2017 (r318785) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 11:38:43 2017 (r318786) @@ -286,10 +286,14 @@ sysctl_vfs_zfs_debug_flags(SYSCTL_HANDLE return (0); } -TUNABLE_INT("vfs.zfs.debug_flags", &zfs_flags); -SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, +TUNABLE_INT("vfs.zfs.debugflags", &zfs_flags); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags, CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(int), sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing."); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, + CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(int), + sysctl_vfs_zfs_debug_flags, "IU", + "Debug flags for ZFS testing (deprecated, see vfs.zfs.debugflags)."); /* * If destroy encounters an EIO while reading metadata (e.g. indirect From owner-svn-src-all@freebsd.org Wed May 24 13:06:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E018D7B2EB; Wed, 24 May 2017 13:06:36 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C00816BF; Wed, 24 May 2017 13:06:36 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Zn21Gb2CZEPJpRgF45rO/+tXieOqv+9MKeq/3Z1Rz8g=; b=nmI8f4c7F3MOk9rI0/4Fxz2Nv2 PFGMsUbJKNeQcvIJVdTgZT5Xe8l0wUkMd2EpRlbOsQRwSDrzRY4LMJn8UWcEaDwdC0UWrIIUptQ1z Mt5qP0A8BRL8leEc1nU+ZsE25fDC6K0MWnX9dCWVCdz5YESYZEaQTswWb5oHIHDws6Wk=; Received: from [47.220.164.50] (port=35847 helo=[192.168.200.198]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1dDVzn-000BkK-A5; Wed, 24 May 2017 08:06:35 -0500 User-Agent: Microsoft-MacOutlook/f.23.0.170517 Date: Wed, 24 May 2017 08:06:34 -0500 Subject: Re: svn commit: r318757 - head From: Larry Rosenman To: Konstantin Belousov CC: Ed Maste , , , , "freebsd-current@freebsd.org" Message-ID: <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> Thread-Topic: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> In-Reply-To: <20170524090552.GF1622@kib.kiev.ua> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 13:06:36 -0000 The initial failure: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=peripatus&dt=2017-05-23%2019%3A17%3A42 I then recompiled perl, and got: borg.lerctr.org /home/pgbuildfarm $ cd /home/pgbuildfarm/bin/latest && ./run_branches.pl --run-all --config=/home/pgbuildfarm/conf/build-farm.conf Socket.c: loadable library and perl binaries are mismatched (got handshake key 0xd200080, needed 0xdf00080) borg.lerctr.org /home/pgbuildfarm/bin/latest $ force rebuilding and installing perl and all p5-* ports fixed that. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 On 5/24/17, 4:05 AM, "Konstantin Belousov" wrote: On Tue, May 23, 2017 at 04:46:14PM -0500, Larry Rosenman wrote: > My PostgreSQL buildfarm animal BROKE with this change until I force rebuilt > lang/perl5.24 > and all my p5-* ports. So what was the symptoms and the error, exactly ? A lot of efforts were spent to ensure that _consistent_ set of old binaries and libraries would run without issues on the new system. I mean that if you have binaries and libraries built on pre-ino64 system, which do not reference any libraries built on post ino64, except system libraries (like libc/libthr etc), everything should work. This feature was the main cause of long delay finishing ino64. > > emulators/qemu-user-static also won???t compile (sbruno@ is on this one). This is a separate issue. > > Poudriere did *NOT* force a fuill rebuild even though freebsd-version *WAS* bumped. > > Is there a hazard for others here? > > Or more info needed in /usr/{src,ports}/UPDATING? > > > -- > Larry Rosenman http://www.lerctr.org/~ler > Phone: +1 214-642-9640 E-Mail: ler@lerctr.org > US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 > > > > From owner-svn-src-all@freebsd.org Wed May 24 13:33:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB15FD7BF5B; Wed, 24 May 2017 13:33:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 613BF1ACE; Wed, 24 May 2017 13:33:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4ODXI8N090403 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 24 May 2017 16:33:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4ODXI8N090403 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4ODXIYW090402; Wed, 24 May 2017 16:33:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 24 May 2017 16:33:18 +0300 From: Konstantin Belousov To: Larry Rosenman Cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" Subject: Re: svn commit: r318757 - head Message-ID: <20170524133318.GN1622@kib.kiev.ua> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 13:33:24 -0000 On Wed, May 24, 2017 at 08:06:34AM -0500, Larry Rosenman wrote: > The initial failure: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=peripatus&dt=2017-05-23%2019%3A17%3A42 > > I then recompiled perl, and got: > borg.lerctr.org /home/pgbuildfarm $ cd /home/pgbuildfarm/bin/latest && ./run_branches.pl --run-all --config=/home/pgbuildfarm/conf/build-farm.conf > Socket.c: loadable library and perl binaries are mismatched (got handshake key 0xd200080, needed 0xdf00080) > borg.lerctr.org /home/pgbuildfarm/bin/latest $ > > force rebuilding and installing perl and all p5-* ports fixed that. >From what I understand in reading some perl bugs and perl source, perl performs some validation of the structures shared between the perl interpreter and XS libraries loaded into it. So I am almost sure that you have perl itself and some module built against different src/ bases. Is it true ? If yes, then this is user error. You are trying to mix two binaries built against incompatible ABI. > > > > -- > Larry Rosenman http://www.lerctr.org/~ler > Phone: +1 214-642-9640 E-Mail: ler@lerctr.org > US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 > > > > On 5/24/17, 4:05 AM, "Konstantin Belousov" wrote: > > On Tue, May 23, 2017 at 04:46:14PM -0500, Larry Rosenman wrote: > > My PostgreSQL buildfarm animal BROKE with this change until I force rebuilt > > lang/perl5.24 > > and all my p5-* ports. > So what was the symptoms and the error, exactly ? > > A lot of efforts were spent to ensure that _consistent_ set of old binaries > and libraries would run without issues on the new system. I mean that > if you have binaries and libraries built on pre-ino64 system, which do > not reference any libraries built on post ino64, except system libraries > (like libc/libthr etc), everything should work. This feature was the > main cause of long delay finishing ino64. > > > > > emulators/qemu-user-static also won???t compile (sbruno@ is on this one). > This is a separate issue. > > > > > Poudriere did *NOT* force a fuill rebuild even though freebsd-version *WAS* bumped. > > > > Is there a hazard for others here? > > > > Or more info needed in /usr/{src,ports}/UPDATING? > > > > > > -- > > Larry Rosenman http://www.lerctr.org/~ler > > Phone: +1 214-642-9640 E-Mail: ler@lerctr.org > > US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 > > > > > > > > > > From owner-svn-src-all@freebsd.org Wed May 24 13:53:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5C87D7A7FA; Wed, 24 May 2017 13:53:26 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B35521A18; Wed, 24 May 2017 13:53:26 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5D4J63eVro7sM0qJYmf0PJG6ACD7iZtn76b58drdU6o=; b=XUtdEP++BaoXkQH92eWBbE12az kFmxLcyycirFT6JxW/KVwDQm1Pi+58m+dC4x2hlwny9bb8mh4Ur1tFNo5w4EI8ssbqU24FGZdcPHf Km2XbpyBlijqk9Y0JLz8tR8vgIG9+qJ4IKQmKKhuIBg5lNzIYOOSJRSc+hIsVc+bInpk=; Received: from [74.203.163.58] (port=13119 helo=[10.106.10.44]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1dDWj7-000DHr-VU; Wed, 24 May 2017 08:53:26 -0500 User-Agent: Microsoft-MacOutlook/f.23.0.170517 Date: Wed, 24 May 2017 08:52:55 -0500 Subject: Re: svn commit: r318757 - head From: Larry Rosenman To: Konstantin Belousov CC: Ed Maste , , , , "freebsd-current@freebsd.org" Message-ID: <341C4D4C-13EE-4640-96DC-F019E1A6E778@lerctr.org> Thread-Topic: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> <20170524133318.GN1622@kib.kiev.ua> In-Reply-To: <20170524133318.GN1622@kib.kiev.ua> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 13:53:26 -0000 The initial failure was NOT, except that the PostgreSQL build builds a PL/Perl interpreter that MIGHT Be considered that. It was unexpected. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 On 5/24/17, 8:33 AM, "Konstantin Belousov" wrote: On Wed, May 24, 2017 at 08:06:34AM -0500, Larry Rosenman wrote: > The initial failure: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=peripatus&dt=2017-05-23%2019%3A17%3A42 > > I then recompiled perl, and got: > borg.lerctr.org /home/pgbuildfarm $ cd /home/pgbuildfarm/bin/latest && ./run_branches.pl --run-all --config=/home/pgbuildfarm/conf/build-farm.conf > Socket.c: loadable library and perl binaries are mismatched (got handshake key 0xd200080, needed 0xdf00080) > borg.lerctr.org /home/pgbuildfarm/bin/latest $ > > force rebuilding and installing perl and all p5-* ports fixed that. From what I understand in reading some perl bugs and perl source, perl performs some validation of the structures shared between the perl interpreter and XS libraries loaded into it. So I am almost sure that you have perl itself and some module built against different src/ bases. Is it true ? If yes, then this is user error. You are trying to mix two binaries built against incompatible ABI. > > > > -- > Larry Rosenman http://www.lerctr.org/~ler > Phone: +1 214-642-9640 E-Mail: ler@lerctr.org > US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 > > > > On 5/24/17, 4:05 AM, "Konstantin Belousov" wrote: > > On Tue, May 23, 2017 at 04:46:14PM -0500, Larry Rosenman wrote: > > My PostgreSQL buildfarm animal BROKE with this change until I force rebuilt > > lang/perl5.24 > > and all my p5-* ports. > So what was the symptoms and the error, exactly ? > > A lot of efforts were spent to ensure that _consistent_ set of old binaries > and libraries would run without issues on the new system. I mean that > if you have binaries and libraries built on pre-ino64 system, which do > not reference any libraries built on post ino64, except system libraries > (like libc/libthr etc), everything should work. This feature was the > main cause of long delay finishing ino64. > > > > > emulators/qemu-user-static also won???t compile (sbruno@ is on this one). > This is a separate issue. > > > > > Poudriere did *NOT* force a fuill rebuild even though freebsd-version *WAS* bumped. > > > > Is there a hazard for others here? > > > > Or more info needed in /usr/{src,ports}/UPDATING? > > > > > > -- > > Larry Rosenman http://www.lerctr.org/~ler > > Phone: +1 214-642-9640 E-Mail: ler@lerctr.org > > US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 > > > > > > > > > > From owner-svn-src-all@freebsd.org Wed May 24 14:22:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5CD4D7B2EE; Wed, 24 May 2017 14:22:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5B081D6F; Wed, 24 May 2017 14:22:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OEMM1x053337; Wed, 24 May 2017 14:22:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OEMMrt053336; Wed, 24 May 2017 14:22:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705241422.v4OEMMrt053336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 24 May 2017 14:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318787 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 14:22:24 -0000 Author: gjb Date: Wed May 24 14:22:22 2017 New Revision: 318787 URL: https://svnweb.freebsd.org/changeset/base/318787 Log: Document r318763, EARLY_AP_STARTUP enabled by default. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 24 11:38:43 2017 (r318786) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 24 14:22:22 2017 (r318787) @@ -443,6 +443,12 @@ IPSEC_FILTERTUNNEL kernel option has been removed, which was deprecated by the net.inet.ipsec.filtertunnel sysctl. + + The EARLY_AP_STARTUP + option has been enabled by default on &arch.amd64; and + &arch.i386; architectures, which when enabled releases + Application Processors (APs) earlier in the + kernel startup process. From owner-svn-src-all@freebsd.org Wed May 24 14:24:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AFBED7B3DC; Wed, 24 May 2017 14:24:49 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B1571F11; Wed, 24 May 2017 14:24:49 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OEOmMC053465; Wed, 24 May 2017 14:24:48 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OEOmIf053464; Wed, 24 May 2017 14:24:48 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705241424.v4OEOmIf053464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 24 May 2017 14:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318788 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 14:24:49 -0000 Author: pfg Date: Wed May 24 14:24:47 2017 New Revision: 318788 URL: https://svnweb.freebsd.org/changeset/base/318788 Log: bhyvegc_resize: make use of reallocarray(3) for bounds-checking. Also add __FBSDID. Reviewed by: grehan This file lacks a license(!) so for this change the following declaration applies: To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action). Modified: head/usr.sbin/bhyve/bhyvegc.c Modified: head/usr.sbin/bhyve/bhyvegc.c ============================================================================== --- head/usr.sbin/bhyve/bhyvegc.c Wed May 24 14:22:22 2017 (r318787) +++ head/usr.sbin/bhyve/bhyvegc.c Wed May 24 14:24:47 2017 (r318788) @@ -1,4 +1,5 @@ #include +__FBSDID("$FreeBSD$"); #include @@ -56,9 +57,11 @@ bhyvegc_resize(struct bhyvegc *gc, int w gc_image->width = width; gc_image->height = height; if (!gc->raw) { - gc_image->data = realloc(gc_image->data, - sizeof (uint32_t) * width * height); - memset(gc_image->data, 0, width * height * sizeof (uint32_t)); + gc_image->data = reallocarray(gc_image->data, width * height, + sizeof (uint32_t)); + if (gc_image->data != NULL) + memset(gc_image->data, 0, width * height * + sizeof (uint32_t)); } } From owner-svn-src-all@freebsd.org Wed May 24 14:36:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7227DD7B83B; Wed, 24 May 2017 14:36:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F455167D; Wed, 24 May 2017 14:36:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OEaq2Q057611; Wed, 24 May 2017 14:36:52 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OEaq6k057610; Wed, 24 May 2017 14:36:52 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705241436.v4OEaq6k057610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 24 May 2017 14:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318789 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 14:36:53 -0000 Author: cy Date: Wed May 24 14:36:51 2017 New Revision: 318789 URL: https://svnweb.freebsd.org/changeset/base/318789 Log: Ifdef out a redundant if statement when LARGE_NAT is disabled. MFC after: 1 week Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Wed May 24 14:24:47 2017 (r318788) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Wed May 24 14:36:51 2017 (r318789) @@ -497,7 +497,9 @@ ipf_nat_soft_init(softc, arg) softn->ipf_nat_pending.ifq_next = NULL; for (i = 0, tq = softn->ipf_nat_tcptq; i < IPF_TCP_NSTATES; i++, tq++) { +#ifdef LARGE_NAT if (tq->ifq_ttl < softn->ipf_nat_deficmpage) +#endif tq->ifq_ttl = softn->ipf_nat_deficmpage; #ifdef LARGE_NAT else if (tq->ifq_ttl > softn->ipf_nat_defage) From owner-svn-src-all@freebsd.org Wed May 24 14:53:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38D73D7A053 for ; Wed, 24 May 2017 14:53:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm20-vm4.bullet.mail.ne1.yahoo.com (nm20-vm4.bullet.mail.ne1.yahoo.com [98.138.91.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C817127C for ; Wed, 24 May 2017 14:53:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1495637598; bh=WQlOQbTL5h2Oo8BRBokTJenmSFxhGyO6yNYH2lodR8w=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=d88jeUAkYvjMi0XZUu0yCNYXOu9m6g0i4w8b+ctTll8rjKkdtcqs5sGoh4o5v0pNrz6qHNoz3wzUnTHP7ESlQZCkSH6aqFEtFaulReHDHcBBk36TYu80kg52esHXheV0XtTb8rIDg6MOiXBStLPTdpSQOP/6fwDAUyp4qlKkSz3RH99rGbn/z5sxkOcp20jkJjU9eCa/aTsJ4OsvRH/M9AaGi1OiTxoGst+RnlscR2/YR4lbKUpaoBA9OWBLU+iJrg6f5blCAFDsRscELvUdjp6PmHAFw7QNkPgNwviowyVHZrMbwloN2UC7FxyVtsp9GrdVL2sgGLQdUWXaaLNkEg== Received: from [98.138.101.132] by nm20.bullet.mail.ne1.yahoo.com with NNFMP; 24 May 2017 14:53:18 -0000 Received: from [98.138.104.112] by tm20.bullet.mail.ne1.yahoo.com with NNFMP; 24 May 2017 14:53:18 -0000 Received: from [127.0.0.1] by smtp221.mail.ne1.yahoo.com with NNFMP; 24 May 2017 14:53:18 -0000 X-Yahoo-Newman-Id: 508169.93409.bm@smtp221.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: CfyyFkAVM1mh2qSmmQkT0Xb610dbv6dqT.yuQsGSeyo63kG g3UEN0g9ommSGiAciM59uDQ3MYy_BR4i8ptCA6lLSgNHQuQgg.zvThYRo4Xw 8FJDqPvRSqu1NgBr5xbCG1wwhqw_M4NoiJ2i0xSpyvH5DhAdwUpjt_2da7Gb fh5yDbJeUnIAAgH17JqDh_MB4IACdbX0Pm0.RobkA4Ux6lDS9GuFuQMOhnWE Islh.d1if57KmHfZiaDDV6KqsxC_Av2HmLu0IwJ_YTw8GhIREfhIK0eShNZH uHQJExSSPdAP8WcuRmsnzkESoSKUUignKyw6qwWuIGwKQLKUfvL4Zyf3mW6L 4_TJQNKgKea_PxCBYNj8yvh1HLezGaV5Ll1R2eRmwc_tWlvZOo4bSWbnl0Bg qyB.BD28efpLp7c.9RxyUuBxdXmFcf6m4i4JAye3yMv00b6g_2ElXt86iuo6 Cr7qNs0oZB5BaOq7dxXP_90t81.GG8kSLXzMHRtmZiexF0nz2JLapZ4NhQ37 IyoOtlzsb5WboYRYzlPck.NsBI2n.EqZ8hgAY._uz30qQ X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705230929.v4N9T5g1028124@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: Date: Wed, 24 May 2017 09:53:17 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <201705230929.v4N9T5g1028124@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 14:53:25 -0000 First of all, HUGE thanks to everyone involved in this project! On 05/23/17 04:29, Konstantin Belousov wrote: > Author: kib > Date: Tue May 23 09:29:05 2017 > New Revision: 318736 > URL: https://svnweb.freebsd.org/changeset/base/318736 > > Log: > Commit the 64-bit inode project. > > Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify > struct dirent layout to add d_off, increase the size of d_fileno > to 64-bits, increase the size of d_namlen to 16-bits, and change > the required alignment. Increase struct statfs f_mntfromname[] and > f_mntonname[] array length MNAMELEN to 1024. > > ABI breakage is mitigated by providing compatibility using versioned > symbols, ingenious use of the existing padding in structures, and > by employing other tricks. Unfortunately, not everything can be > fixed, especially outside the base system. For instance, third-party > APIs which pass struct stat around are broken in backward and > forward incompatible ways. > > Kinfo sysctl MIBs ABI is changed in backward-compatible way, but > there is no general mechanism to handle other sysctl MIBS which > return structures where the layout has changed. It was considered > that the breakage is either in the management interfaces, where we > usually allow ABI slip, or is not important. > > Struct xvnode changed layout, no compat shims are provided. > > For struct xtty, dev_t tty device member was reduced to uint32_t. > It was decided that keeping ABI compat in this case is more useful > than reporting 64-bit dev_t, for the sake of pstat. > > Update note: strictly follow the instructions in UPDATING. Build > and install the new kernel with COMPAT_FREEBSD11 option enabled, > then reboot, and only then install new world. > > Credits: The 64-bit inode project, also known as ino64, started life > many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick > (mckusick) then picked up and updated the patch, and acted as a > flag-waver. Feedback, suggestions, and discussions were carried > by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), > and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial > ports investigation followed by an exp-run by Antoine Brodin (antoine). > Essential and all-embracing testing was done by Peter Holm (pho). > The heavy lifting of coordinating all these efforts and bringing the > project to completion were done by Konstantin Belousov (kib). > > Sponsored by: The FreeBSD Foundation (emaste, kib) > Differential revision: https://reviews.freebsd.org/D10439 > There is now a bunch of coverity issues (OVERFLOW_BEFORE_WIDEN mostly) tied to ino64_t. At least the following CIDs are related: 977071, 977072, 977073, 977094, 977095, 977096, 1375572, 1375573, 1375574, 1375575 1375576, 1375577, 1375578, 1375579, 1375580, 1375581, 1375582, 1375584. It may take some time to shake up the issues but the change was very necessary. Thanks again! Pedro. From owner-svn-src-all@freebsd.org Wed May 24 16:26:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48DA6D7C906; Wed, 24 May 2017 16:26:22 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AB061437; Wed, 24 May 2017 16:26:22 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-oi0-x22e.google.com with SMTP id b204so248413756oii.1; Wed, 24 May 2017 09:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=1mKs5uCw24aKza8ugHIhUmZZwN7AIdvnQJLEDXXXnvo=; b=IiqPjM7ezLyp6K0yCA1w0fIz5im/Mj5scxukPBnf+QQhcb+zinCmCL2KbrzTgxef6M 4C79V6FVRgOyqrZErBcySbwUWTja/LvyqaubwtAHFe8kFjYidfSuX/1eEm+qYNR4P9UO 6dfMh3HPJ03+E8rBqI/h6dcqXjgQGxrX61MGGxjitcnaKjUZa0KQdX/yM3UwPgs+MAul 3UhpUg6eiooDz5lXjNvxOrJfBwa3lA5PTV5WPinptjLyVb9NQlqsED5sHW/KYed40V1O dZmjev68PSyJKDihe6sRO9qYhc4EA/wucFqCKyOmSfPpMn9+TUJ/IRXlEt7fOorzwJ9L qFng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=1mKs5uCw24aKza8ugHIhUmZZwN7AIdvnQJLEDXXXnvo=; b=MdXJiKZLhhHwAq5z/lhro2iptK/BajdvhBe29ikvTL5G1qgPiZ6U/0r2MH7CEGN5cA QfaXZ2gKIVkxnrOEkYVS/UqjD38ZLtqA3Q+PQvpq8bVFJ1vscH96/WcCrGWbqCqa/7Tn jBvBpBwyEkHq0d359+OkizlLxNyC7jwzExGUFJybpSTL7W7IqOLVjUVR7qWAc8ymIrpV 3XQ3DLALDLcOe/Ur3eutnT361LxmvcZ9FBPpr5aW9ANgmVGuH366E0+koRd4oO2S3Dd4 1LdE0kXEAaUH1WWy/bpHHu3NydXDViEZreq6lCZgMvIbBqoroo9A2aARS7B/D8h/SwQR o03w== X-Gm-Message-State: AODbwcAjO74HnN9zsooHNi6fWI+BLrbQUWiE7zxoPE3qn4tjZBP1de2j 3li6hqMk09um9MknOUEpUvUi63s7SHjc X-Received: by 10.202.4.144 with SMTP id 138mr15320887oie.105.1495643181154; Wed, 24 May 2017 09:26:21 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.202.219.197 with HTTP; Wed, 24 May 2017 09:26:00 -0700 (PDT) In-Reply-To: References: <201705230929.v4N9T5g1028124@repo.freebsd.org> From: Ed Maste Date: Wed, 24 May 2017 12:26:00 -0400 X-Google-Sender-Auth: wfOZ8K6n1f_5E8UVVZbotk7xUlE Message-ID: Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... To: Pedro Giffuni Cc: Konstantin Belousov , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 16:26:22 -0000 On 24 May 2017 at 10:53, Pedro Giffuni wrote: > > There is now a bunch of coverity issues (OVERFLOW_BEFORE_WIDEN mostly) > tied to ino64_t. At least the following CIDs are related: On a quick look the OVERFLOW_BEFORE_WIDEN issues are false positives in practice: for correct operation the product must fit within 32 bits, because inodes were previously 32 bits. However, it does seem unusual to perform a multiplication with types that could overflow 32 bits, and then store the result in a 64-bit variable. So it seems that a code change to eliminate the warning is likely reasonable. From owner-svn-src-all@freebsd.org Wed May 24 16:30:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C06A1D7C9A8; Wed, 24 May 2017 16:30:39 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF48166D; Wed, 24 May 2017 16:30:39 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OGUcLs003067; Wed, 24 May 2017 16:30:38 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OGUcrS003066; Wed, 24 May 2017 16:30:38 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705241630.v4OGUcrS003066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 24 May 2017 16:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318790 - head/usr.sbin/bootparamd/bootparamd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 16:30:39 -0000 Author: asomers Date: Wed May 24 16:30:38 2017 New Revision: 318790 URL: https://svnweb.freebsd.org/changeset/base/318790 Log: Fix a buffer overflow in bootparamd(8) If /etc/bootparams contains a line with an excessively long pathname, and a client asks for that path, then bootparamd will overflow a buffer and crash while parsing that line. This is not remotely exploitable since it requires a malformed /etc/bootparams file. Reported by: Coverity CID: 1305954 MFC after: 1 week Sponsored by: Spectra Logic Corp Modified: head/usr.sbin/bootparamd/bootparamd/bootparamd.c Modified: head/usr.sbin/bootparamd/bootparamd/bootparamd.c ============================================================================== --- head/usr.sbin/bootparamd/bootparamd/bootparamd.c Wed May 24 14:36:51 2017 (r318789) +++ head/usr.sbin/bootparamd/bootparamd/bootparamd.c Wed May 24 16:30:38 2017 (r318790) @@ -199,7 +199,10 @@ int blen; int ch, pch, fid_len, res = 0; int match = 0; - char info[MAX_FILEID + MAX_PATH_LEN+MAX_MACHINE_NAME + 3]; +#define INFOLEN 1343 + _Static_assert(INFOLEN >= MAX_FILEID + MAX_PATH_LEN+MAX_MACHINE_NAME + 3, + "INFOLEN isn't large enough"); + char info[INFOLEN + 1]; bpf = fopen(bootpfile, "r"); if ( ! bpf ) @@ -251,8 +254,9 @@ int blen; info of the file */ if (match) { - fid_len = strlen(fileid); - while ( ! res && (fscanf(bpf,"%s", info)) > 0) { /* read a string */ +#define AS_FORMAT(d) "%" #d "s" +#define REXPAND(d) AS_FORMAT(d) /* Force another preprocessor expansion */ + while ( ! res && (fscanf(bpf, REXPAND(INFOLEN), info)) > 0) { ch = getc(bpf); /* and a character */ if ( *info != '#' ) { /* Comment ? */ if (! strncmp(info, fileid, fid_len) && *(info + fid_len) == '=') { From owner-svn-src-all@freebsd.org Wed May 24 16:39:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3B1AD7CDE6; Wed, 24 May 2017 16:39:20 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2A671E8B; Wed, 24 May 2017 16:39:20 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OGdJRu007459; Wed, 24 May 2017 16:39:19 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OGdJW6007458; Wed, 24 May 2017 16:39:19 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201705241639.v4OGdJW6007458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 24 May 2017 16:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318791 - stable/11/sys/dev/sdhci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 16:39:20 -0000 Author: loos Date: Wed May 24 16:39:19 2017 New Revision: 318791 URL: https://svnweb.freebsd.org/changeset/base/318791 Log: MFC r312346: Set the the wp_disabled flag when asked to. While here, add the missing new line. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c Wed May 24 16:30:38 2017 (r318790) +++ stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c Wed May 24 16:39:19 2017 (r318791) @@ -90,7 +90,7 @@ cd_setup(struct sdhci_fdt_gpio *gpio, ph gpio->slot->opt |= SDHCI_NON_REMOVABLE; gpio->cd_disabled = true; if (bootverbose) - device_printf(dev, "Non-removable media"); + device_printf(dev, "Non-removable media\n"); return; } @@ -177,8 +177,12 @@ wp_setup(struct sdhci_fdt_gpio *gpio, ph dev = gpio->dev; - if (OF_hasprop(node, "wp-disable")) + if (OF_hasprop(node, "wp-disable")) { + gpio->wp_disabled = true; + if (bootverbose) + device_printf(dev, "Write protect disabled\n"); return; + } if (gpio_pin_get_by_ofw_property(dev, node, "wp-gpios", &gpio->wp_pin)) return; From owner-svn-src-all@freebsd.org Wed May 24 17:11:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20ECBD7CB56; Wed, 24 May 2017 17:11:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0FBA1445; Wed, 24 May 2017 17:11:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OHBArD019795; Wed, 24 May 2017 17:11:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OHBAJI019794; Wed, 24 May 2017 17:11:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705241711.v4OHBAJI019794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 24 May 2017 17:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318792 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:11:12 -0000 Author: emaste Date: Wed May 24 17:11:10 2017 New Revision: 318792 URL: https://svnweb.freebsd.org/changeset/base/318792 Log: UPDATING: clarify ino64 upgrade instructions even further - mention COMPAT_FREEBSD11 earlier so that the steps are in chronological order - suggest removing /usr/obj before build to ensure there are no stale objects Reviewed by: allanjude, kib Sponsored by: The FreeBSD Foundation Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed May 24 16:39:19 2017 (r318791) +++ head/UPDATING Wed May 24 17:11:10 2017 (r318792) @@ -53,12 +53,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 20170523: The "ino64" 64-bit inode project has been committed, which extends - a number of types to 64 bits. In order to upgrade, carefully follow - the full procedure documented below under the heading "To rebuild - everything and install it on the current system." Specifically, a - reboot is required after installing the new kernel before installing - world. In addition, if using a custom kernel configuration ensure - that the COMPAT_FREEBSD11 option is included. + a number of types to 64 bits. Upgrading in place requires care and + adherence to the documented upgrade procedure. + + If using a custom kernel configuration ensure that the + COMPAT_FREEBSD11 option is included (as during the upgrade the + system will be running the ino64 kernel with the existing world). + + For the safest in-place upgrade begin by removing previous build + artifacts via "rm -rf /usr/obj/*". Then, carefully follow the + full procedure documented below under the heading "To rebuild + everything and install it on the current system." Specifically, + a reboot is required after installing the new kernel before + installing world. 20170424: The NATM framework including the en(4), fatm(4), hatm(4), and From owner-svn-src-all@freebsd.org Wed May 24 17:25:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EED3BD7B071; Wed, 24 May 2017 17:25:25 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 566EC1EC1; Wed, 24 May 2017 17:25:24 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([85.179.134.189]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LcSAg-1ddKaz3mX0-00jtEu; Wed, 24 May 2017 19:25:16 +0200 Date: Wed, 24 May 2017 19:25:08 +0200 From: "O. Hartmann" To: Larry Rosenman Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Maste , "freebsd-current@freebsd.org" Subject: Re: svn commit: r318757 - head Message-ID: <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> In-Reply-To: <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/HXwAKwZWR0EO3RAdCuQhNXc"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:vaO/dICadey8gwzTKquirs3W/4+tH8T7VGEkpbttTKRUGkiM7GQ /ENTjlU+MO0bjLGFNS/6uS4UCPh3snZ0Ok5ECsCYt0f/vlsIHDZbNVNATz4D6h6beVxbpS4 2OIohIGi9LhStb2J08KSfTqpHm3m/+CojaG2YrqLUaap2mi69Yye8EzU6d89n/9GOEqYXwJ DS3Z+Nyd4QUdmKsc0I2NA== X-UI-Out-Filterresults: notjunk:1;V01:K0:r6Ny5eS5iR4=:JbJbRuJdwn1lE2WE9/KPqq yqrxfNUk5Vjzuzh+WAHW+SijErOpPFiNJdBhXfbuHG9FttttazFgFBT81cGia3U/77E6GtpQt WSbWe+5+H9L+PPELmj9M1I2qDtMBgJvrgMnfwxnoHjaE1FdtYjomCpX9n/wQl4ejyZ5zf0RKV DAIElNPqb3NalsZ0XsbicZaPEw4tj/Qfmw3doKOPiKogVTIEddSPA4XKrxjiALzcfTZjzRP8n kLBOpQnihS3N5nnu5fqUBKAHUGyMaH8vdQ5MNM9uzzejGO1ZMsDw1oJpJUt+3HsU/DeofZtJR +kdD5NIjW03pMMa6UpzzqVWztdLZGCK4N163pEdz7VuogZXfKj7DvnmQbQDJ5MoYDSajbLKyP 7omGgI10KLsI9BOfdcZtWu8x+uIk9srazl0SpEKDLchA4AUayit3Qto3JjHRRGx+QBlytL37n qRg56ZRQx02cnqfTpPQL7+coOb9Ip44HlgkglEiDLwGsN+mS2ir9ZE2H0wNKjWYS3ROhlD4pK C6MjTL4YJ7dZTK+gLhBYmU0mMTtFiIpoF24vs0ItRv4nXt6ylLf8KgwD2VoEWgWJkG/m7Ey+X 4Kqa8VnVslxHrZC6OcXhIK3LxZnm6e0JoqCtkF3QFEcvvGLYeH9LwgPQUWOJwY02rFn+OBUzC 9fcafp4tnb+/oFEyMm1Zd/3a22w6Di6ULKYl2ggysf6Yiwh3ZpUf6RYeAIaRZ/GI1dGZ3MAz7 JgCB4DbP0+vIeQNoHxGm6LllMbqPMN+s+hd2aFfMPmte1BTi3VkPVjjxWuU= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:25:26 -0000 --Sig_/HXwAKwZWR0EO3RAdCuQhNXc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Wed, 24 May 2017 08:06:34 -0500 Larry Rosenman schrieb: > The initial failure: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dperipatus&dt=3D= 2017-05-23%2019%3A17%3A42 >=20 > I then recompiled perl, and got: > borg.lerctr.org /home/pgbuildfarm $ cd /home/pgbuildfarm/bin/latest > && ./run_branches.pl --run-all --config=3D/home/pgbuildfarm/conf/build-fa= rm.conf > Socket.c: loadable library and perl binaries are mismatched (got handshak= e key > 0xd200080, needed 0xdf00080) borg.lerctr.org /home/pgbuildfarm/bin/latest= $ >=20 > force rebuilding and installing perl and all p5-* ports fixed that.=20 >=20 >=20 >=20 I ran into a similar problem, several ports do not build due to a mysteriou= s error from perl: ListUtil.c: loadable library and perl binaries are mismatched (got handshak= e key 0xd200080, needed 0xdf00080) lang/perl5.24 can be rebuild, but almost every p5* port bails out with that= error shown above. Rebuilding p5-* ports is impossible. Running FreeBSD 12.0-CURRENT #3 r318789: Wed May 24 18:03:48 CEST 2017 am= d64 with WITH_LLD_IS_LD=3Dyes. --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/HXwAKwZWR0EO3RAdCuQhNXc Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWSXB9AAKCRDS528fyFhY lMx2Af9VMWu9nqGEnQl3VYZZKUN9LeOATJmhHclqxFZLzYyiEFV2pu/hWuQdhQV/ 8miyNDVZnn4oAfZcFUj/N+uhcUr1Af973dwdunpkN7WF8yP3UzdEbuD7ChwYKFbL BPR/LHqcPBTbWkCiJRvIqRv2+tnEeS1IdU/gnRqFAKtQ5/ZWiMML =Sqdw -----END PGP SIGNATURE----- --Sig_/HXwAKwZWR0EO3RAdCuQhNXc-- From owner-svn-src-all@freebsd.org Wed May 24 17:29:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21849D7B2B3; Wed, 24 May 2017 17:29:23 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2EF312F3; Wed, 24 May 2017 17:29:22 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WmIzXrPZlmr1PxWZLAuHaC5xZHKY/Erz5vbMJZjpqNQ=; b=IKQ65r7IGbGe/Ue00aLW4Iri4V GU6Z2OKLJEDyWlpXTFkDu9bzIWhosH4NSJId1C6sr/AXTzWeZQvUfWXaFEHsqOYjsDdIUX71GaWl8 o3TWPHZkAUrn3PGaOq3AP3XRe+Eab4djpxNjyGUdDn5qgVsA3FwK+j3/a1JPZxxUguxU=; Received: from [74.203.163.58] (port=43042 helo=[10.106.10.44]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1dDa65-000KQM-Q8; Wed, 24 May 2017 12:29:21 -0500 User-Agent: Microsoft-MacOutlook/f.23.0.170517 Date: Wed, 24 May 2017 12:28:51 -0500 Subject: Re: svn commit: r318757 - head From: Larry Rosenman To: "O. Hartmann" CC: Konstantin Belousov , , , , Ed Maste , "freebsd-current@freebsd.org" Message-ID: <163D09DC-C0B3-4D49-B0BF-C71C26C2807B@lerctr.org> Thread-Topic: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:29:23 -0000 I fixed my issues by force-rebuilding perl and all installed p5-* ports. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 From owner-svn-src-all@freebsd.org Wed May 24 17:40:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5B0DD7B76D; Wed, 24 May 2017 17:40:58 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06F1C1BB1; Wed, 24 May 2017 17:40:57 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([85.179.134.189]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LwqwS-1e22CU13Oa-016Q1F; Wed, 24 May 2017 19:40:54 +0200 Date: Wed, 24 May 2017 19:40:46 +0200 From: "O. Hartmann" To: Larry Rosenman Cc: "O. Hartmann" , src-committers@freebsd.org, Ed Maste , svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" , Konstantin Belousov Subject: Re: svn commit: r318757 - head Message-ID: <20170524194046.1226b05b@thor.intern.walstatt.dynvpn.de> In-Reply-To: <163D09DC-C0B3-4D49-B0BF-C71C26C2807B@lerctr.org> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> <163D09DC-C0B3-4D49-B0BF-C71C26C2807B@lerctr.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/Qxe0A1Q9LNeFnxwAIt0cOiU"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:LpeonhpISUQspAfXIHlfexPohc5YklM+MqWwSWfi9UgAlDVlqu9 0k8SaxsfpzICbERemxetQ7kfQRQIDuqtHOspYDj/WpbfUA8+kMJZvGxIQzSlkiZdjS5nSCy QJGUxxFjA11ZnqOBGxDjxP2/NvK+p5FdM54yv/TwSdA4wz4eqagM7ao0qYDm/4jMTg6jrXH cb92ce8ixujrOHycY/nDA== X-UI-Out-Filterresults: notjunk:1;V01:K0:Cjzrh2VDmkE=:ZZw8U4TyRjTEKKJS/hj3ir 5VV+3p+/dNJU7bpm5xZnTIPRCGIWcUL5ge/bNcA08KTbw0Cdkfjy708Omj1Y9oDL9Znogi6yi PwIjb1SWbPvaPg1fCaFEBeMiToD5kNwc+DjgndurxQt0BlXtBvpf9vzT9nm5tSctO9SpfZoBL CqcIfW6sOJSKf2VdiYmXqPEe9pdO8Ire5FZSKXC6LhnEfsV3j6bKfwdj+X+j/oZ9jQAew933C dalXgzrD2QRmg31hxY/6cbgmKzGDjScyh8BtQsOt2EwIhFJiTpJGhkDuuVX6itcXDmgLo9aH0 BCi9I/QxxJog+7j1wXY2e6IU9Nm9CNSG0j3I6wM9MKd/sKrarbUD3tj9JGDGu4E2CtGQGcCLw SO93b/9IeuzgDmtVgmLoaqrwprrSMAv+n5kmcvy7bqSaWhmr/+dFi7ZsbpxtSYiLy2no8QIzB /N246rxYwoB8yu4utACaIoxaQiKdLtwbfLxKvY/b7fi4J/frygPRVODZ5HtNtZ0S0Q0I+fA3f 6Jzf8tS7K0A+VJ1HXzHIMiDI/Eq8Ekh0CmoA8a6FOCSAskwiz+TZvasq7NdPcf0ASjR02VRGR ewaJJ3AGhGWU0Efg2MW3/W4BOkGo1tOwAxxZMkYVmYEhbkeXxVRv4frkWb7i8iJzuLEIdVJko ISe2G9RyNjLmnJnBuKlStI+fH4aZYDIoQWYxMDj5Lt0kxNgh2w4AmJecMjwtmU+GPCCwwTLta HITjvp3qCbI+FFqVKzgfHK974B+Gk2zyHJgi6c8xZUrDVqIEz7BuZnnYGJ8= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:40:58 -0000 --Sig_/Qxe0A1Q9LNeFnxwAIt0cOiU Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Wed, 24 May 2017 12:28:51 -0500 Larry Rosenman schrieb: > I fixed my issues by force-rebuilding perl and all installed p5-* ports.= =20 >=20 >=20 This isn't possible in my case :-( lang/perl rebuilds all right, but every p5-* ports fails with [...] Checking if your kit is complete... ListUtil.c: loadable library and perl binaries are mismatched (got handshak= e key 0xd200080, needed 0xdf00080)=20 *** Error code 1 I tried to rebuild also via portmaster -f, no success. Now, I growing bunch= of ports showing up with this mysterious error. To which port "ListUtil.c" might belong to? Rebuilding autotools (which I suspected first) also fails ... --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/Qxe0A1Q9LNeFnxwAIt0cOiU Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWSXFngAKCRDS528fyFhY lJmqAgCHPd10F/shbWNTVqrmb2CyQAnICW3L5yKCpvCgsl7kLKMIPAR6Vfx6Z9Lr IpMmxMvNfJMA6vP9MZRrnYcfmoCCAf0fv4q9TaqCwqzRNdtusW98T0nlkimG7aeW uYdz8WWEeXaj8ongo9Qou19Va3Ldep69uJR4TZhqyfRm1Eym69kp =4DGd -----END PGP SIGNATURE----- --Sig_/Qxe0A1Q9LNeFnxwAIt0cOiU-- From owner-svn-src-all@freebsd.org Wed May 24 17:42:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A321D7BA60; Wed, 24 May 2017 17:42:38 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7675910AB; Wed, 24 May 2017 17:42:38 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6rJJmRfysSYWxe2An696FD5pXmvVQShE5XvOJrljbqE=; b=IJZUMh8B+pNIg0FlbuAP7Xph5+ KvK3LgwYamhWZeHmlcGuejsj5B7OdMyr/I/xZV3KrO2wtiev+bhwo21xmbhvwd5Mis9JhrnbClg/V MENQ1D0lrv2cp64iqpzelNwme/n7IAsMNyEkFmRVXfhaUM2vHTn709Mpds1Tez79mgn4=; Received: from [74.203.163.58] (port=32002 helo=[10.106.10.44]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1dDaIv-000Kqv-SI; Wed, 24 May 2017 12:42:37 -0500 User-Agent: Microsoft-MacOutlook/f.23.0.170517 Date: Wed, 24 May 2017 12:42:07 -0500 Subject: Re: svn commit: r318757 - head From: Larry Rosenman To: "O. Hartmann" CC: , Ed Maste , , , "freebsd-current@freebsd.org" , Konstantin Belousov Message-ID: Thread-Topic: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> <163D09DC-C0B3-4D49-B0BF-C71C26C2807B@lerctr.org> <20170524194046.1226b05b@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170524194046.1226b05b@thor.intern.walstatt.dynvpn.de> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:42:38 -0000 -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 On 5/24/17, 12:40 PM, "O. Hartmann" wrote: Am Wed, 24 May 2017 12:28:51 -0500 Larry Rosenman schrieb: > I fixed my issues by force-rebuilding perl and all installed p5-* ports. > > This isn't possible in my case :-( lang/perl rebuilds all right, but every p5-* ports fails with [...] Checking if your kit is complete... ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xd200080, needed 0xdf00080) *** Error code 1 I tried to rebuild also via portmaster -f, no success. Now, I growing bunch of ports showing up with this mysterious error. To which port "ListUtil.c" might belong to? Rebuilding autotools (which I suspected first) also fails ... I rebuilt all in Poudriere and it was fine. From owner-svn-src-all@freebsd.org Wed May 24 17:47:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B073D7BC84; Wed, 24 May 2017 17:47:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 562CF1451; Wed, 24 May 2017 17:47:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OHlGv3035801; Wed, 24 May 2017 17:47:16 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OHlG5C035799; Wed, 24 May 2017 17:47:16 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201705241747.v4OHlG5C035799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 24 May 2017 17:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318793 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:47:17 -0000 Author: glebius Date: Wed May 24 17:47:16 2017 New Revision: 318793 URL: https://svnweb.freebsd.org/changeset/base/318793 Log: o Rearrange struct inpcb fields to optimize the TCP output code path considering cache line hits and misses. Put the lock and hash list glue into the first cache line, put inp_refcount inp_flags inp_socket into the second cache line. o On allocation zero out entire structure except the lock and list entries, including inp_route inp_lle inp_gencnt. When inp_route and inp_lle were introduced, they were added below inp_zero_size, resulting on not being cleared after free/alloc. This definitely was a source of bugs with route caching. Could be that r315956 has just fixed one of them. The inp_gencnt is reinitialized on every alloc, so it is safe to clear it. This has been proved to improve TCP performance at Netflix. Obtained from: rrs Differential Revision: D10686 Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Wed May 24 17:11:10 2017 (r318792) +++ head/sys/netinet/in_pcb.c Wed May 24 17:47:16 2017 (r318793) @@ -300,7 +300,7 @@ in_pcballoc(struct socket *so, struct in inp = uma_zalloc(pcbinfo->ipi_zone, M_NOWAIT); if (inp == NULL) return (ENOBUFS); - bzero(inp, inp_zero_size); + bzero(&inp->inp_start_zero, inp_zero_size); inp->inp_pcbinfo = pcbinfo; inp->inp_socket = so; inp->inp_cred = crhold(so->so_cred); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Wed May 24 17:11:10 2017 (r318792) +++ head/sys/netinet/in_pcb.h Wed May 24 17:47:16 2017 (r318793) @@ -183,26 +183,29 @@ struct icmp6_filter; struct inpcbpolicy; struct m_snd_tag; struct inpcb { + /* Cache line #1 (amd64) */ LIST_ENTRY(inpcb) inp_hash; /* (h/i) hash list */ LIST_ENTRY(inpcb) inp_pcbgrouphash; /* (g/i) hash list */ - LIST_ENTRY(inpcb) inp_list; /* (p/l) list for all PCBs for proto */ - /* (p[w]) for list iteration */ - /* (p[r]/l) for addition/removal */ + struct rwlock inp_lock; + /* Cache line #2 (amd64) */ +#define inp_start_zero inp_refcount +#define inp_zero_size (sizeof(struct inpcb) - \ + offsetof(struct inpcb, inp_start_zero)) + u_int inp_refcount; /* (i) refcount */ + int inp_flags; /* (i) generic IP/datagram flags */ + int inp_flags2; /* (i) generic IP/datagram flags #2*/ void *inp_ppcb; /* (i) pointer to per-protocol pcb */ + struct socket *inp_socket; /* (i) back pointer to socket */ struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */ struct inpcbgroup *inp_pcbgroup; /* (g/i) PCB group list */ LIST_ENTRY(inpcb) inp_pcbgroup_wild; /* (g/i/h) group wildcard entry */ - struct socket *inp_socket; /* (i) back pointer to socket */ struct ucred *inp_cred; /* (c) cache of socket cred */ u_int32_t inp_flow; /* (i) IPv6 flow information */ - int inp_flags; /* (i) generic IP/datagram flags */ - int inp_flags2; /* (i) generic IP/datagram flags #2*/ u_char inp_vflag; /* (i) IP version flag (v4/v6) */ u_char inp_ip_ttl; /* (i) time to live proto */ u_char inp_ip_p; /* (c) protocol proto */ u_char inp_ip_minttl; /* (i) minimum TTL or drop */ uint32_t inp_flowid; /* (x) flow id / queue id */ - u_int inp_refcount; /* (i) refcount */ struct m_snd_tag *inp_snd_tag; /* (i) send tag for outgoing mbufs */ uint32_t inp_flowtype; /* (x) M_HASHTYPE value */ uint32_t inp_rss_listen_bucket; /* (x) overridden RSS listen bucket */ @@ -235,17 +238,16 @@ struct inpcb { }; LIST_ENTRY(inpcb) inp_portlist; /* (i/h) */ struct inpcbport *inp_phd; /* (i/h) head of this list */ -#define inp_zero_size offsetof(struct inpcb, inp_gencnt) inp_gen_t inp_gencnt; /* (c) generation count */ struct llentry *inp_lle; /* cached L2 information */ - struct rwlock inp_lock; rt_gen_t inp_rt_cookie; /* generation for route entry */ union { /* cached L3 information */ - struct route inpu_route; - struct route_in6 inpu_route6; - } inp_rtu; -#define inp_route inp_rtu.inpu_route -#define inp_route6 inp_rtu.inpu_route6 + struct route inp_route; + struct route_in6 inp_route6; + }; + LIST_ENTRY(inpcb) inp_list; /* (p/l) list for all PCBs for proto */ + /* (p[w]) for list iteration */ + /* (p[r]/l) for addition/removal */ }; #endif /* _KERNEL */ From owner-svn-src-all@freebsd.org Wed May 24 17:47:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0237AD7BCF4; Wed, 24 May 2017 17:47:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE0D21638; Wed, 24 May 2017 17:47:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OHlnmW035862; Wed, 24 May 2017 17:47:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OHlniS035859; Wed, 24 May 2017 17:47:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705241747.v4OHlniS035859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 24 May 2017 17:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318794 - in head: sbin/zfsbootcfg share/man/man9 usr.sbin/efidp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:47:51 -0000 Author: gjb Date: Wed May 24 17:47:49 2017 New Revision: 318794 URL: https://svnweb.freebsd.org/changeset/base/318794 Log: Update the "first appeared in" version in several manual pages. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sbin/zfsbootcfg/zfsbootcfg.8 head/share/man/man9/mutex.9 head/usr.sbin/efidp/efidp.8 Modified: head/sbin/zfsbootcfg/zfsbootcfg.8 ============================================================================== --- head/sbin/zfsbootcfg/zfsbootcfg.8 Wed May 24 17:47:16 2017 (r318793) +++ head/sbin/zfsbootcfg/zfsbootcfg.8 Wed May 24 17:47:49 2017 (r318794) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2016 +.Dd May 24, 2017 .Dt ZFSBOOTCFG 8 .Os .Sh NAME @@ -86,7 +86,7 @@ To clear the boot options: .Sh HISTORY .Nm appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS This manual page was written by .An Andriy Gapon Aq Mt avg@FreeBSD.org . Modified: head/share/man/man9/mutex.9 ============================================================================== --- head/share/man/man9/mutex.9 Wed May 24 17:47:16 2017 (r318793) +++ head/share/man/man9/mutex.9 Wed May 24 17:47:49 2017 (r318794) @@ -28,7 +28,7 @@ .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ .\" $FreeBSD$ .\" -.Dd July 18, 2016 +.Dd May 24, 2017 .Dt MUTEX 9 .Os .Sh NAME @@ -557,4 +557,4 @@ and The .Fn mtx_trylock_spin function was added in -.Fx 12.0 . +.Fx 11.1 . Modified: head/usr.sbin/efidp/efidp.8 ============================================================================== --- head/usr.sbin/efidp/efidp.8 Wed May 24 17:47:16 2017 (r318793) +++ head/usr.sbin/efidp/efidp.8 Wed May 24 17:47:49 2017 (r318794) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 5, 2017 +.Dd May 24, 2017 .Dt EFIDP 8 .Os .Sh NAME @@ -50,4 +50,4 @@ have the format described in RFC 4122. The .Nm utility first appeared in -.Fx 12.0 . +.Fx 11.1 . From owner-svn-src-all@freebsd.org Wed May 24 17:50:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29F82D7BDBA; Wed, 24 May 2017 17:50:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDD0E17E5; Wed, 24 May 2017 17:50:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OHoY2p036024; Wed, 24 May 2017 17:50:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OHoYaI036022; Wed, 24 May 2017 17:50:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705241750.v4OHoYaI036022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 24 May 2017 17:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318795 - in head/lib/libc: gen sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:50:36 -0000 Author: gjb Date: Wed May 24 17:50:34 2017 New Revision: 318795 URL: https://svnweb.freebsd.org/changeset/base/318795 Log: Update the "first appeared in" version in several manual pages. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/gen/sem_timedwait.3 head/lib/libc/sys/fsync.2 Modified: head/lib/libc/gen/sem_timedwait.3 ============================================================================== --- head/lib/libc/gen/sem_timedwait.3 Wed May 24 17:47:49 2017 (r318794) +++ head/lib/libc/gen/sem_timedwait.3 Wed May 24 17:50:34 2017 (r318795) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2017 +.Dd May 24, 2017 .Dt SEM_TIMEDWAIT 3 .Os .Sh NAME @@ -160,4 +160,4 @@ function first appeared in The .Fn sem_clockwait_np function first appeared in -.Fx 12.0 . +.Fx 11.1 . Modified: head/lib/libc/sys/fsync.2 ============================================================================== --- head/lib/libc/sys/fsync.2 Wed May 24 17:47:49 2017 (r318794) +++ head/lib/libc/sys/fsync.2 Wed May 24 17:50:34 2017 (r318795) @@ -34,7 +34,7 @@ .\" @(#)fsync.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 17, 2016 +.Dd May 24, 2017 .Dt FSYNC 2 .Os .Sh NAME @@ -119,7 +119,7 @@ system call appeared in The .Fn fdatasync system call appeared in -.Fx 12.0 +.Fx 11.1 . .Sh BUGS The .Fn fdatasync From owner-svn-src-all@freebsd.org Wed May 24 17:51:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9623FD7BF5F; Wed, 24 May 2017 17:51:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48E3A19C5; Wed, 24 May 2017 17:51:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OHp8DI036090; Wed, 24 May 2017 17:51:08 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OHp84s036087; Wed, 24 May 2017 17:51:08 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241751.v4OHp84s036087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 17:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318796 - in stable/11/sys/dev/cxgbe: . common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:51:09 -0000 Author: np Date: Wed May 24 17:51:07 2017 New Revision: 318796 URL: https://svnweb.freebsd.org/changeset/base/318796 Log: MFC r316774: cxgbe: Query some more RDMA related parameters from the firmware. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/common.h stable/11/sys/dev/cxgbe/offload.h stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/common.h Wed May 24 17:50:34 2017 (r318795) +++ stable/11/sys/dev/cxgbe/common/common.h Wed May 24 17:51:07 2017 (r318796) @@ -366,6 +366,9 @@ struct adapter_params { unsigned int ofldq_wr_cred; unsigned int eo_wr_cred; + + unsigned int max_ordird_qp; + unsigned int max_ird_adapter; }; #define CHELSIO_T4 0x4 Modified: stable/11/sys/dev/cxgbe/offload.h ============================================================================== --- stable/11/sys/dev/cxgbe/offload.h Wed May 24 17:50:34 2017 (r318795) +++ stable/11/sys/dev/cxgbe/offload.h Wed May 24 17:51:07 2017 (r318796) @@ -121,6 +121,7 @@ struct t4_virt_res { struct t4_range pbl; struct t4_range qp; struct t4_range cq; + struct t4_range srq; struct t4_range ocq; struct t4_range l2t; }; Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 17:50:34 2017 (r318795) +++ stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 17:51:07 2017 (r318796) @@ -3490,6 +3490,21 @@ get_params__post_init(struct adapter *sc sc->vres.cq.size = val[3] - val[2] + 1; sc->vres.ocq.start = val[4]; sc->vres.ocq.size = val[5] - val[4] + 1; + + param[0] = FW_PARAM_PFVF(SRQ_START); + param[1] = FW_PARAM_PFVF(SRQ_END); + param[2] = FW_PARAM_DEV(MAXORDIRD_QP); + param[3] = FW_PARAM_DEV(MAXIRD_ADAPTER); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query RDMA parameters(3): %d.\n", rc); + return (rc); + } + sc->vres.srq.start = val[0]; + sc->vres.srq.size = val[1] - val[0] + 1; + sc->params.max_ordird_qp = val[2]; + sc->params.max_ird_adapter = val[3]; } if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START); From owner-svn-src-all@freebsd.org Wed May 24 17:52:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CE9DD7C052; Wed, 24 May 2017 17:52:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 544B21D3D; Wed, 24 May 2017 17:52:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OHqvwg039807; Wed, 24 May 2017 17:52:57 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OHqvHU039805; Wed, 24 May 2017 17:52:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241752.v4OHqvHU039805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 17:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318797 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:52:58 -0000 Author: np Date: Wed May 24 17:52:56 2017 New Revision: 318797 URL: https://svnweb.freebsd.org/changeset/base/318797 Log: MFC r316774: cxgbe: Query some more RDMA related parameters from the firmware. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/common.h Wed May 24 17:51:07 2017 (r318796) +++ stable/10/sys/dev/cxgbe/common/common.h Wed May 24 17:52:56 2017 (r318797) @@ -366,6 +366,9 @@ struct adapter_params { unsigned int ofldq_wr_cred; unsigned int eo_wr_cred; + + unsigned int max_ordird_qp; + unsigned int max_ird_adapter; }; #define CHELSIO_T4 0x4 Modified: stable/10/sys/dev/cxgbe/offload.h ============================================================================== --- stable/10/sys/dev/cxgbe/offload.h Wed May 24 17:51:07 2017 (r318796) +++ stable/10/sys/dev/cxgbe/offload.h Wed May 24 17:52:56 2017 (r318797) @@ -121,6 +121,7 @@ struct t4_virt_res { struct t4_range pbl; struct t4_range qp; struct t4_range cq; + struct t4_range srq; struct t4_range ocq; struct t4_range l2t; }; Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 17:51:07 2017 (r318796) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 17:52:56 2017 (r318797) @@ -3301,6 +3301,21 @@ get_params__post_init(struct adapter *sc sc->vres.cq.size = val[3] - val[2] + 1; sc->vres.ocq.start = val[4]; sc->vres.ocq.size = val[5] - val[4] + 1; + + param[0] = FW_PARAM_PFVF(SRQ_START); + param[1] = FW_PARAM_PFVF(SRQ_END); + param[2] = FW_PARAM_DEV(MAXORDIRD_QP); + param[3] = FW_PARAM_DEV(MAXIRD_ADAPTER); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query RDMA parameters(3): %d.\n", rc); + return (rc); + } + sc->vres.srq.start = val[0]; + sc->vres.srq.size = val[1] - val[0] + 1; + sc->params.max_ordird_qp = val[2]; + sc->params.max_ird_adapter = val[3]; } if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START); From owner-svn-src-all@freebsd.org Wed May 24 18:01:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CDCFD7C258; Wed, 24 May 2017 18:01:53 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6786109D; Wed, 24 May 2017 18:01:52 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([85.179.134.189]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MMTZa-1dJeLh2d6U-008HMS; Wed, 24 May 2017 20:01:43 +0200 Date: Wed, 24 May 2017 20:01:36 +0200 From: "O. Hartmann" To: "O. Hartmann" Cc: Larry Rosenman , src-committers@freebsd.org, Ed Maste , svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" , Konstantin Belousov Subject: Re: svn commit: r318757 - head Message-ID: <20170524200136.09ac15b1@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170524194046.1226b05b@thor.intern.walstatt.dynvpn.de> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> <163D09DC-C0B3-4D49-B0BF-C71C26C2807B@lerctr.org> <20170524194046.1226b05b@thor.intern.walstatt.dynvpn.de> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/3nYXUifKigH5b4auBUi23i3"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:IY+ZH8oRj94cOpVNOEyN5vTYA//EBVYy7pjbBrIcDbxFkNCx4UN JuliUdPDlko9UXrBGcyghL68MHY0+5Fl8ov6nv3/XS+xbytjFO140gCm++7KKv2K1Fcf3Bq 7La8caticZYMMn/Bu32HBmGzD7HmYZqg3SkhPKNS9ToKFtSRm1VBJTAn3Eb+KAiAvXxnAkl vN9XDOZ12nnBZenzVWF6g== X-UI-Out-Filterresults: notjunk:1;V01:K0:+AFGLqgNgQc=:WWuqxPCtLURBp3iQY5HqVD UCFS98AG9V/zuLMjzbekQ986nycI/JfnNincDeFQ5pkMV2AvpqPSnxmjigaZWY2DbbSr+0hcR sb9jKrAiWuRtbxyEKGOwUNCK+Yy3h+C+Ggenm53KnaNtfxeUVMIk9WqsEKxCU18F6Cpz1H4Q8 8i0M/RRJbXIeDtIc8nnqMylHxoUQgG0kiDM7qDx+GcWg/B2FN0uApJXRqk5XbiYauJT8HD0tN nklhLL9e2ee8LcwztJ21KfJHcp3SP77XArNsphFsOC+DjFMQRN59LOgHIhPgI2Ux5UI8ckqk+ +/q56meBxODXExPpj6kg39H+p7y5gWMrUUqrlc1/QLLxzkqP80iqve/npBJ/nXd5LaSvgIQ5K YInmrkRHp/N3aeE2dsOC+OL1rBLO1rKzRDudjpS5SDZt8Vokmj9VDI7QMQfaBay6doihU9qyW LPfHUa3Pv/yJu6xc15bCJxASSgS7jSlPbSHabLFUgT3eOPdz+1VTHB2GF8rKrgA1kYJd7Cwix C4bJnHAZqDYrusqSFHP//531EDsLF+3gb4cMNV1lGzKOTtB2MkwSWQk6LlPf621rvcAhIVrKq LNYcHFWQaaS2r/hLpHZKqii2dcJL9f226ktGmDtmiCySjSxgl5ix27ow5pgGUtzvL2VlBCiG+ y0S0F0jvob6Ea4gYTwg3ZE2xJjJSutwQNZSITn5ErDzlyw+4XWhys7zQkXhg/o22mdZtUk23i VZvr7fcALJjtr1pYcu4vg/snOACStGjkhl5ZvwjntVvhsa+dQsV6gkS5Iik= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 18:01:53 -0000 --Sig_/3nYXUifKigH5b4auBUi23i3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Wed, 24 May 2017 19:40:46 +0200 "O. Hartmann" schrieb: > Am Wed, 24 May 2017 12:28:51 -0500 > Larry Rosenman schrieb: >=20 > > I fixed my issues by force-rebuilding perl and all installed p5-* ports= .=20 > >=20 > > =20 >=20 >=20 > This isn't possible in my case :-( >=20 > lang/perl rebuilds all right, but every p5-* ports fails with >=20 > [...] > Checking if your kit is complete... > ListUtil.c: loadable library and perl binaries are mismatched (got handsh= ake key > 0xd200080, needed 0xdf00080)=20 > *** Error code 1 >=20 > I tried to rebuild also via portmaster -f, no success. Now, I growing bun= ch of ports > showing up with this mysterious error. >=20 > To which port "ListUtil.c" might belong to? >=20 > Rebuilding autotools (which I suspected first) also fails ... >=20 >=20 ... it seems, as K. belousov mentioned prior regarding different ABI, all p= 5-* ports need to be deleted by force ... They rebuild properly afterwards. --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/3nYXUifKigH5b4auBUi23i3 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWSXKgAAKCRDS528fyFhY lI3oAf9+f0tRnl/GBTmvOa6J9+KZnN7WYFi9X2PbDkrr0R0NYHeJC4avdlf2k8+g 1V2XvIui7Qc0JbounWtAp/03p/qxAf9b4Nob1oei5rCZ+vApXzGPIFUwpjg0EKad GxRrEKkE30I6ngAusHG1ZLG4GdC46BvjZMvZYNo+lmI3gy9FdP89 =sLnN -----END PGP SIGNATURE----- --Sig_/3nYXUifKigH5b4auBUi23i3-- From owner-svn-src-all@freebsd.org Wed May 24 18:05:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D79DD7C38F; Wed, 24 May 2017 18:05:01 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58F3D1591; Wed, 24 May 2017 18:05:01 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=cWy4zL+BQlSKdAJqSu7mN73OyYO/PaISTgJu7Vh1HrA=; b=hl1n6z74rdVydeuo2YLKeWf6dw t7XddrmI+ElbKi1RKeehHlyk676xAA5SZDBf4JvdicSywzBRLMDA9cjwtx3OLTCuTJc+3KwRCSB2d cMRmgHOq+xIDWWYNmg4ypg3Gf1IJV0cNPFs/5I/JVyLzntPmK7F+r4JfQEeoytILk1Eo=; Received: from [74.203.163.58] (port=33186 helo=[10.106.10.44]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1dDaea-000LkG-Gl; Wed, 24 May 2017 13:05:00 -0500 User-Agent: Microsoft-MacOutlook/f.23.0.170517 Date: Wed, 24 May 2017 13:04:30 -0500 Subject: Re: svn commit: r318757 - head From: Larry Rosenman To: "O. Hartmann" CC: , Ed Maste , , , "freebsd-current@freebsd.org" , Konstantin Belousov Message-ID: <26FCC584-3B24-4F70-9374-C432775844F6@lerctr.org> Thread-Topic: svn commit: r318757 - head References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> <163D09DC-C0B3-4D49-B0BF-C71C26C2807B@lerctr.org> <20170524194046.1226b05b@thor.intern.walstatt.dynvpn.de> <20170524200136.09ac15b1@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170524200136.09ac15b1@thor.intern.walstatt.dynvpn.de> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 18:05:01 -0000 On 5/24/17, 1:01 PM, "O. Hartmann" wrote: Am Wed, 24 May 2017 19:40:46 +0200 "O. Hartmann" schrieb: =20 > Am Wed, 24 May 2017 12:28:51 -0500 > Larry Rosenman schrieb: >=20 > > I fixed my issues by force-rebuilding perl and all installed p5-* p= orts.=20 > >=20 > > =20 >=20 >=20 > This isn't possible in my case :-( >=20 > lang/perl rebuilds all right, but every p5-* ports fails with >=20 > [...] > Checking if your kit is complete... > ListUtil.c: loadable library and perl binaries are mismatched (got ha= ndshake key > 0xd200080, needed 0xdf00080)=20 > *** Error code 1 >=20 > I tried to rebuild also via portmaster -f, no success. Now, I growing= bunch of ports > showing up with this mysterious error. >=20 > To which port "ListUtil.c" might belong to? >=20 > Rebuilding autotools (which I suspected first) also fails ... >=20 >=20 =20 ... it seems, as K. belousov mentioned prior regarding different ABI, a= ll p5-* ports need to be deleted by force ... They rebuild properly afterwards. =20 Which is essentially what I did re: Poudriere (poudriere bulk =E2=80=93C =E2=80=93j -p -f ) =20 From owner-svn-src-all@freebsd.org Wed May 24 18:10:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74E70D7C511; Wed, 24 May 2017 18:10:11 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECB4218DC; Wed, 24 May 2017 18:10:10 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([85.179.134.189]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lmqxo-1ds9jx2NDg-00h4SH; Wed, 24 May 2017 20:10:01 +0200 Date: Wed, 24 May 2017 20:10:00 +0200 From: "O. Hartmann" To: Larry Rosenman Cc: "O. Hartmann" , , Ed Maste , , , "freebsd-current@freebsd.org" , Konstantin Belousov Subject: Re: svn commit: r318757 - head Message-ID: <20170524201000.5bfc736f@thor.intern.walstatt.dynvpn.de> In-Reply-To: <26FCC584-3B24-4F70-9374-C432775844F6@lerctr.org> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> <163D09DC-C0B3-4D49-B0BF-C71C26C2807B@lerctr.org> <20170524194046.1226b05b@thor.intern.walstatt.dynvpn.de> <20170524200136.09ac15b1@thor.intern.walstatt.dynvpn.de> <26FCC584-3B24-4F70-9374-C432775844F6@lerctr.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/B2ftN4AfDQgPu8dljSySCvm"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:w64jR4dxgcE4dVI5al09fmSLtNxxMiua4kc8mP5pFhjKkwiPelS aHaGuzb3etdVH6RdbmAAb9b9o4zRbisp0mTC4Rb3V37LgsF+i5LmqPKNji7aigZiPiprwrJ 1ki6pyy5q5m6YDCegLepK0btDsByILHirxs1AzlVgf65or+2AYfLbmno28/gTL1zNUYVozz HSKUXkmFlcj+CiAMRDyOw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Ns4mbM6nHZY=:cPT0ND3xLjRYb78yz85rFi ZlrdN/LGMIqAieMW3UL4aKZdOy4X01YpRC8scjpjJ/29NuT2laDvCPNSBwrcrwoGukcrNSaQb M8Tf/EW85yM4zyP1NdxOmBhhVG0xFV0PX7KmzRzGsKgAEY//BBTv7nrJad7djQ5iXkLwsE3M8 GxJoVFqs4XjIWU132CMm7ND3Gfg3gcaFW8Ig+obfxS0P/w9ZKTHklLkc5GfjzptX0sUBoQEjF n2jmuZbMltV+8FqfEoVoY4Cnh2PZ2U8WWZg5ZpTSMY4ErybkrbwM4ZRcLsl7Pkh3mH9cPCn9L +etq7UviMOWJYqebbG7anVgdQAc7GLiKfvjaCwgd1jVYoba6yTPU6hweuyU4NViWGycJmpfmy JFkLnnMWRaJjpy0ysrxiea9qveqZMXluuqq9SGCZG0Ta7u3gmEf1+P9WnKOjFibOUzxQTrKb8 0c0UCAeyQ6SbLXLs+5RID4BfCQij0likiCGkjCrfhiSugTmjuDGbPHGgwYK+YWRHbuGA18r98 tSsX2sqPMmPq1VCPXF9zFWxSMKvOctzxnc9X/Ndy3P4NHwfd/A1ji2aknLmAPzhCzmw/Jl7bS fkJmvPRxC3S8LMXEXvvhu69rpgERTxqVaVfQOSi7xTRsbtOfLVas5vjQYFAM8Q7AQqiNpEjaH MltDpKHzNUiMjAXNNOprHSDPg/QA2S9qjYcoglCX8yhCsPddrqcSWKWhZIvHJKtpOp/UrUQ7v 8vYnIIW8zUJgmo7CCnspkQqwT8S8FlkcNcx2oTmFy0WakiEFvfc7XYdr1K0= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 18:10:11 -0000 --Sig_/B2ftN4AfDQgPu8dljSySCvm Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am Wed, 24 May 2017 13:04:30 -0500 Larry Rosenman schrieb: > On 5/24/17, 1:01 PM, "O. Hartmann" wrote: >=20 > Am Wed, 24 May 2017 19:40:46 +0200 > "O. Hartmann" schrieb: > =20 > > Am Wed, 24 May 2017 12:28:51 -0500 > > Larry Rosenman schrieb: > > =20 > > > I fixed my issues by force-rebuilding perl and all installed p5-*= ports.=20 > > >=20 > > > =20 > >=20 > >=20 > > This isn't possible in my case :-( > >=20 > > lang/perl rebuilds all right, but every p5-* ports fails with > >=20 > > [...] > > Checking if your kit is complete... > > ListUtil.c: loadable library and perl binaries are mismatched (got = handshake key > > 0xd200080, needed 0xdf00080)=20 > > *** Error code 1 > >=20 > > I tried to rebuild also via portmaster -f, no success. Now, I growi= ng bunch of > > ports showing up with this mysterious error. > >=20 > > To which port "ListUtil.c" might belong to? > >=20 > > Rebuilding autotools (which I suspected first) also fails ... > >=20 > > =20 > =20 > ... it seems, as K. belousov mentioned prior regarding different ABI,= all p5-* > ports need to be deleted by force ... They rebuild properly afterwards. > =20 > Which is essentially what I did re: Poudriere (poudriere bulk =E2=80=93C = =E2=80=93j -p > -f ) I use the traditional "make" way (via portmaster) --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/B2ftN4AfDQgPu8dljSySCvm Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWSXMeAAKCRDS528fyFhY lC3FAgCjOsC9Vq+JEj7IXCBiDh2tbLfH8I8pZa3UnYCr81dSYV1Lobqu7HE6+Z1F dpkWPJcpsnnsGJvD5UGANLpuvmaQAf9wQs6KToM7mI97tYWpLRI9+a1zeLHBxtJq Qitq0G+CUJB+QDwpMNllasOTtUIlEIcaytsWiD+uVEbgR3G1VHv+ =IYSB -----END PGP SIGNATURE----- --Sig_/B2ftN4AfDQgPu8dljSySCvm-- From owner-svn-src-all@freebsd.org Wed May 24 18:14:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ED3AD7CA9E; Wed, 24 May 2017 18:14:59 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D7C210F6; Wed, 24 May 2017 18:14:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OIEwXP048178; Wed, 24 May 2017 18:14:58 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OIEvNT048170; Wed, 24 May 2017 18:14:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241814.v4OIEvNT048170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 18:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318798 - in stable/11: contrib/ofed/libcxgb4/src sys/dev/cxgb/ulp/iw_cxgb sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 18:14:59 -0000 Author: np Date: Wed May 24 18:14:57 2017 New Revision: 318798 URL: https://svnweb.freebsd.org/changeset/base/318798 Log: MFC r311880, r314167, r316118, r316571, r316573, r316580, r316936-r316937, r316940, and r317410. r311880: The iw_cxgb and iw_cxgbe drivers should not use a FreeBSD device_t where a linuxkpi style device is expected. If OFED/linuxkpi actually starts using this field then we'll have to figure out whether to create fake devices for these drivers or have linuxkpi deal with NULL device. This mismatch was first reported as part of D6585. r314167: cxgbe/iw_cxgbe: Minor changes for T6. r316118: cxgbe/iw_cxgbe: T6 has no limit on the amount of memory that can be registered in one ib_reg_phys_mr. r316571: cxgbe/iw_cxgbe: Remove bad cast that resulted in incorrect length for memory regions larger than 4GB. r316573: cxgbe/iw_cxgbe: Replace a magic constant with something more readable (and accurate). T4 and later have an extra bit for page shift so the maximum page size is 8TB (shift of 12 + 31) instead of 128MB (12 + 15). This saves space in the chip's PBL (physical buffer list) when registering very large memory regions. r316580: cxgbe/iw_cxgbe: Remove another bad cast. This should have been included in r316571. r316936: cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. r316937: cxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device. r316940: cxgbe/iw_cxgbe: Report the actual values of various parameters as configured by the firmware. r317410: cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the iw_cxgb4 Linux driver. Sponsored by: Chelsio Communications Modified: stable/11/contrib/ofed/libcxgb4/src/t4.h stable/11/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c stable/11/sys/dev/cxgbe/iw_cxgbe/device.c stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c stable/11/sys/dev/cxgbe/iw_cxgbe/provider.c stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c stable/11/sys/dev/cxgbe/iw_cxgbe/t4.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ofed/libcxgb4/src/t4.h ============================================================================== --- stable/11/contrib/ofed/libcxgb4/src/t4.h Wed May 24 17:52:56 2017 (r318797) +++ stable/11/contrib/ofed/libcxgb4/src/t4.h Wed May 24 18:14:57 2017 (r318798) @@ -102,7 +102,7 @@ #define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) #define T4_MAX_NUM_STAG (1<<15) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 Modified: stable/11/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- stable/11/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Wed May 24 18:14:57 2017 (r318798) @@ -1094,7 +1094,7 @@ int iwch_register_device(struct iwch_dev memcpy(dev->ibdev.node_desc, IWCH_NODE_DESC, sizeof(IWCH_NODE_DESC)); dev->ibdev.phys_port_cnt = sc->params.nports; dev->ibdev.num_comp_vectors = 1; - dev->ibdev.dma_device = dev->rdev.adap->dev; + dev->ibdev.dma_device = NULL; dev->ibdev.query_device = iwch_query_device; dev->ibdev.query_port = iwch_query_port; dev->ibdev.modify_port = iwch_modify_port; Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/device.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/device.c Wed May 24 18:14:57 2017 (r318798) @@ -330,7 +330,7 @@ c4iw_modevent(module_t mod, int cmd, voi case MOD_LOAD: rc = c4iw_mod_load(); if (rc == 0) - printf("iw_cxgbe: Chelsio T4/T5 RDMA driver loaded.\n"); + printf("iw_cxgbe: Chelsio T4/T5/T6 RDMA driver loaded.\n"); break; case MOD_UNLOAD: Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 24 18:14:57 2017 (r318798) @@ -157,49 +157,70 @@ static inline int c4iw_num_stags(struct return (int)(rdev->adap->vres.stag.size >> 5); } -#define C4IW_WR_TO (10*HZ) +#define C4IW_WR_TO (60*HZ) struct c4iw_wr_wait { int ret; - atomic_t completion; + struct completion completion; }; static inline void c4iw_init_wr_wait(struct c4iw_wr_wait *wr_waitp) { wr_waitp->ret = 0; - atomic_set(&wr_waitp->completion, 0); + init_completion(&wr_waitp->completion); } static inline void c4iw_wake_up(struct c4iw_wr_wait *wr_waitp, int ret) { wr_waitp->ret = ret; - atomic_set(&wr_waitp->completion, 1); - wakeup(wr_waitp); + complete(&wr_waitp->completion); } static inline int c4iw_wait_for_reply(struct c4iw_rdev *rdev, struct c4iw_wr_wait *wr_waitp, - u32 hwtid, u32 qpid, const char *func) + u32 hwtid, u32 qpid, const char *func) { struct adapter *sc = rdev->adap; unsigned to = C4IW_WR_TO; + int ret; + int timedout = 0; + struct timeval t1, t2; + + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + goto out; + } - while (!atomic_read(&wr_waitp->completion)) { - tsleep(wr_waitp, 0, "c4iw_wait", to); - if (SIGPENDING(curthread)) { - printf("%s - Device %s not responding - " - "tid %u qpid %u\n", func, - device_get_nameunit(sc->dev), hwtid, qpid); - if (c4iw_fatal_error(rdev)) { - wr_waitp->ret = -EIO; - break; - } - to = to << 2; - } - } + getmicrotime(&t1); + do { + ret = wait_for_completion_timeout(&wr_waitp->completion, to); + if (!ret) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s not responding after %ld.%06ld " + "seconds - tid %u qpid %u\n", func, + device_get_nameunit(sc->dev), t2.tv_sec, t2.tv_usec, + hwtid, qpid); + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + break; + } + to = to << 2; + timedout = 1; + } + } while (!ret); + +out: + if (timedout) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s reply after %ld.%06ld seconds - " + "tid %u qpid %u\n", func, device_get_nameunit(sc->dev), + t2.tv_sec, t2.tv_usec, hwtid, qpid); + } if (wr_waitp->ret) - CTR4(KTR_IW_CXGBE, "%s: FW reply %d tid %u qpid %u", - device_get_nameunit(sc->dev), wr_waitp->ret, hwtid, qpid); + CTR4(KTR_IW_CXGBE, "%p: FW reply %d tid %u qpid %u", sc, + wr_waitp->ret, hwtid, qpid); return (wr_waitp->ret); } Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c Wed May 24 18:14:57 2017 (r318798) @@ -46,12 +46,15 @@ __FBSDID("$FreeBSD$"); #define T4_ULPTX_MIN_IO 32 #define C4IW_MAX_INLINE_SIZE 96 -static int mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) +static int +mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) { - return (is_t4(dev->rdev.adap) || + + return ((is_t4(dev->rdev.adap) || is_t5(dev->rdev.adap)) && - length >= 8*1024*1024*1024ULL; + length >= 8*1024*1024*1024ULL); } + static int write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) { @@ -342,7 +345,8 @@ static int build_phys_page_list(struct i } /* Find largest page shift we can use to cover buffers */ - for (*shift = PAGE_SHIFT; *shift < 27; ++(*shift)) + for (*shift = PAGE_SHIFT; *shift < PAGE_SHIFT + M_FW_RI_TPTE_PS; + ++(*shift)) if ((1ULL << *shift) & mask) break; @@ -439,7 +443,7 @@ int c4iw_reregister_phys_mem(struct ib_m mhp->attr.zbva = 0; mhp->attr.va_fbo = *iova_start; mhp->attr.page_size = shift - 12; - mhp->attr.len = (u32) total_size; + mhp->attr.len = total_size; mhp->attr.pbl_size = npages; } @@ -511,7 +515,7 @@ struct ib_mr *c4iw_register_phys_mem(str mhp->attr.va_fbo = *iova_start; mhp->attr.page_size = shift - 12; - mhp->attr.len = (u32) total_size; + mhp->attr.len = total_size; mhp->attr.pbl_size = npages; ret = register_mem(rhp, php, mhp, shift); if (ret) Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 24 18:14:57 2017 (r318798) @@ -190,7 +190,7 @@ static int c4iw_mmap(struct ib_ucontext "%s:6 USER DB-GTS addr %p region %p, reglen %u", __func__, addr, va_udbs_res, len_udbs_res); #ifdef DOT5 - if (is_t5(rdev->lldi.adapter_type) && map_udb_as_wc) + if (!is_t4(rdev->lldi.adapter_type) && map_udb_as_wc) vma->vm_page_prot = t4_pgprot_wc(vma->vm_page_prot); else #endif @@ -307,6 +307,7 @@ c4iw_query_device(struct ib_device *ibde { struct c4iw_dev *dev = to_c4iw_dev(ibdev); struct adapter *sc = dev->rdev.adap; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; CTR3(KTR_IW_CXGBE, "%s ibdev %p, props %p", __func__, ibdev, props); @@ -320,13 +321,15 @@ c4iw_query_device(struct ib_device *ibde props->vendor_id = pci_get_vendor(sc->dev); props->vendor_part_id = pci_get_device(sc->dev); props->max_mr_size = T4_MAX_MR_SIZE; - props->max_qp = T4_MAX_NUM_QP; - props->max_qp_wr = T4_MAX_QP_DEPTH; + props->max_qp = sc->vres.qp.size / 2; + props->max_qp_wr = T4_MAX_QP_DEPTH(spg_ndesc); props->max_sge = T4_MAX_RECV_SGE; props->max_sge_rd = 1; - props->max_qp_rd_atom = c4iw_max_read_depth; - props->max_qp_init_rd_atom = c4iw_max_read_depth; - props->max_cq = T4_MAX_NUM_CQ; + props->max_res_rd_atom = sc->params.max_ird_adapter; + props->max_qp_rd_atom = min(sc->params.max_ordird_qp, + c4iw_max_read_depth); + props->max_qp_init_rd_atom = props->max_qp_rd_atom; + props->max_cq = sc->vres.qp.size; props->max_cqe = T4_MAX_CQ_DEPTH; props->max_mr = c4iw_num_stags(&dev->rdev); props->max_pd = T4_MAX_NUM_PD; @@ -429,7 +432,7 @@ c4iw_register_device(struct c4iw_dev *de strlcpy(ibdev->node_desc, C4IW_NODE_DESC, sizeof(ibdev->node_desc)); ibdev->phys_port_cnt = sc->params.nports; ibdev->num_comp_vectors = 1; - ibdev->dma_device = sc->dev; + ibdev->dma_device = NULL; ibdev->query_device = c4iw_query_device; ibdev->query_port = c4iw_query_port; ibdev->modify_port = c4iw_modify_port; Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c Wed May 24 18:14:57 2017 (r318798) @@ -133,6 +133,7 @@ static int create_qp(struct c4iw_rdev *r int ret; int eqsize; struct wrqe *wr; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; wq->sq.qid = c4iw_get_qpid(rdev, uctx); if (!wq->sq.qid) @@ -214,8 +215,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ @@ -237,8 +237,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ V_FW_RI_RES_WR_CPRIO(0) | /* don't keep in chip cache */ @@ -1523,7 +1522,7 @@ c4iw_create_qp(struct ib_pd *pd, struct struct c4iw_create_qp_resp uresp; int sqsize, rqsize; struct c4iw_ucontext *ucontext; - int ret; + int ret, spg_ndesc; struct c4iw_mm_entry *mm1, *mm2, *mm3, *mm4; CTR2(KTR_IW_CXGBE, "%s ib_pd %p", __func__, pd); @@ -1541,12 +1540,13 @@ c4iw_create_qp(struct ib_pd *pd, struct if (attrs->cap.max_inline_data > T4_MAX_SEND_INLINE) return ERR_PTR(-EINVAL); + spg_ndesc = rhp->rdev.adap->params.sge.spg_len / EQ_ESIZE; rqsize = roundup(attrs->cap.max_recv_wr + 1, 16); - if (rqsize > T4_MAX_RQ_SIZE) + if (rqsize > T4_MAX_RQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); sqsize = roundup(attrs->cap.max_send_wr + 1, 16); - if (sqsize > T4_MAX_SQ_SIZE) + if (sqsize > T4_MAX_SQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); ucontext = pd->uobject ? to_c4iw_ucontext(pd->uobject->context) : NULL; @@ -1556,9 +1556,10 @@ c4iw_create_qp(struct ib_pd *pd, struct if (!qhp) return ERR_PTR(-ENOMEM); qhp->wq.sq.size = sqsize; - qhp->wq.sq.memsize = (sqsize + 1) * sizeof *qhp->wq.sq.queue; + qhp->wq.sq.memsize = (sqsize + spg_ndesc) * sizeof *qhp->wq.sq.queue + + 16 * sizeof(__be64); qhp->wq.rq.size = rqsize; - qhp->wq.rq.memsize = (rqsize + 1) * sizeof *qhp->wq.rq.queue; + qhp->wq.rq.memsize = (rqsize + spg_ndesc) * sizeof *qhp->wq.rq.queue; if (ucontext) { qhp->wq.sq.memsize = roundup(qhp->wq.sq.memsize, PAGE_SIZE); Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/t4.h ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/t4.h Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/t4.h Wed May 24 18:14:57 2017 (r318798) @@ -59,21 +59,17 @@ #define CIDXINC_SHIFT 0 #define CIDXINC(x) ((x) << CIDXINC_SHIFT) -#define T4_MAX_NUM_QP (1<<16) -#define T4_MAX_NUM_CQ (1<<15) -#define T4_MAX_NUM_PD (1<<15) -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) -#define T4_MAX_EQ_SIZE (65520 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_IQ_SIZE (65520 - 1) -#define T4_MAX_RQ_SIZE (8192 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_SQ_SIZE (T4_MAX_EQ_SIZE - 1) -#define T4_MAX_QP_DEPTH (T4_MAX_RQ_SIZE - 1) -#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) +#define T4_MAX_NUM_PD 65536 +#define T4_MAX_EQ_SIZE 65520 +#define T4_MAX_IQ_SIZE 65520 +#define T4_MAX_RQ_SIZE(n) (8192 - (n) - 1) +#define T4_MAX_SQ_SIZE(n) (T4_MAX_EQ_SIZE - (n) - 1) +#define T4_MAX_QP_DEPTH(n) (T4_MAX_RQ_SIZE(n)) +#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 2) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) #define A_PCIE_MA_SYNC 0x30b4 struct t4_status_page { From owner-svn-src-all@freebsd.org Wed May 24 18:16:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3169FD7CB6F; Wed, 24 May 2017 18:16:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F381F12D3; Wed, 24 May 2017 18:16:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OIGKja048293; Wed, 24 May 2017 18:16:20 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OIGKBn048285; Wed, 24 May 2017 18:16:20 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241816.v4OIGKBn048285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 18:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318799 - in stable/10: contrib/ofed/libcxgb4/src sys/dev/cxgb/ulp/iw_cxgb sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 18:16:22 -0000 Author: np Date: Wed May 24 18:16:20 2017 New Revision: 318799 URL: https://svnweb.freebsd.org/changeset/base/318799 Log: MFC r311880, r314167, r316118, r316571, r316573, r316580, r316936-r316937, r316940, and r317410. r311880: The iw_cxgb and iw_cxgbe drivers should not use a FreeBSD device_t where a linuxkpi style device is expected. If OFED/linuxkpi actually starts using this field then we'll have to figure out whether to create fake devices for these drivers or have linuxkpi deal with NULL device. This mismatch was first reported as part of D6585. r314167: cxgbe/iw_cxgbe: Minor changes for T6. r316118: cxgbe/iw_cxgbe: T6 has no limit on the amount of memory that can be registered in one ib_reg_phys_mr. r316571: cxgbe/iw_cxgbe: Remove bad cast that resulted in incorrect length for memory regions larger than 4GB. r316573: cxgbe/iw_cxgbe: Replace a magic constant with something more readable (and accurate). T4 and later have an extra bit for page shift so the maximum page size is 8TB (shift of 12 + 31) instead of 128MB (12 + 15). This saves space in the chip's PBL (physical buffer list) when registering very large memory regions. r316580: cxgbe/iw_cxgbe: Remove another bad cast. This should have been included in r316571. r316936: cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. r316937: cxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device. r316940: cxgbe/iw_cxgbe: Report the actual values of various parameters as configured by the firmware. r317410: cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the iw_cxgb4 Linux driver. Modified: stable/10/contrib/ofed/libcxgb4/src/t4.h stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c stable/10/sys/dev/cxgbe/iw_cxgbe/device.c stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h stable/10/sys/dev/cxgbe/iw_cxgbe/mem.c stable/10/sys/dev/cxgbe/iw_cxgbe/provider.c stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c stable/10/sys/dev/cxgbe/iw_cxgbe/t4.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/libcxgb4/src/t4.h ============================================================================== --- stable/10/contrib/ofed/libcxgb4/src/t4.h Wed May 24 18:14:57 2017 (r318798) +++ stable/10/contrib/ofed/libcxgb4/src/t4.h Wed May 24 18:16:20 2017 (r318799) @@ -102,7 +102,7 @@ #define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) #define T4_MAX_NUM_STAG (1<<15) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 Modified: stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Wed May 24 18:16:20 2017 (r318799) @@ -1085,7 +1085,7 @@ int iwch_register_device(struct iwch_dev memcpy(dev->ibdev.node_desc, IWCH_NODE_DESC, sizeof(IWCH_NODE_DESC)); dev->ibdev.phys_port_cnt = sc->params.nports; dev->ibdev.num_comp_vectors = 1; - dev->ibdev.dma_device = dev->rdev.adap->dev; + dev->ibdev.dma_device = NULL; dev->ibdev.query_device = iwch_query_device; dev->ibdev.query_port = iwch_query_port; dev->ibdev.modify_port = iwch_modify_port; Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Wed May 24 18:16:20 2017 (r318799) @@ -332,7 +332,7 @@ c4iw_modevent(module_t mod, int cmd, voi case MOD_LOAD: rc = c4iw_mod_load(); if (rc == 0) - printf("iw_cxgbe: Chelsio T4/T5 RDMA driver loaded.\n"); + printf("iw_cxgbe: Chelsio T4/T5/T6 RDMA driver loaded.\n"); break; case MOD_UNLOAD: Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 24 18:16:20 2017 (r318799) @@ -157,49 +157,70 @@ static inline int c4iw_num_stags(struct return (int)(rdev->adap->vres.stag.size >> 5); } -#define C4IW_WR_TO (10*HZ) +#define C4IW_WR_TO (60*HZ) struct c4iw_wr_wait { int ret; - atomic_t completion; + struct completion completion; }; static inline void c4iw_init_wr_wait(struct c4iw_wr_wait *wr_waitp) { wr_waitp->ret = 0; - atomic_set(&wr_waitp->completion, 0); + init_completion(&wr_waitp->completion); } static inline void c4iw_wake_up(struct c4iw_wr_wait *wr_waitp, int ret) { wr_waitp->ret = ret; - atomic_set(&wr_waitp->completion, 1); - wakeup(wr_waitp); + complete(&wr_waitp->completion); } static inline int c4iw_wait_for_reply(struct c4iw_rdev *rdev, struct c4iw_wr_wait *wr_waitp, - u32 hwtid, u32 qpid, const char *func) + u32 hwtid, u32 qpid, const char *func) { struct adapter *sc = rdev->adap; unsigned to = C4IW_WR_TO; + int ret; + int timedout = 0; + struct timeval t1, t2; - while (!atomic_read(&wr_waitp->completion)) { - tsleep(wr_waitp, 0, "c4iw_wait", to); - if (SIGPENDING(curthread)) { - printf("%s - Device %s not responding - " - "tid %u qpid %u\n", func, - device_get_nameunit(sc->dev), hwtid, qpid); - if (c4iw_fatal_error(rdev)) { - wr_waitp->ret = -EIO; - break; - } - to = to << 2; - } - } + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + goto out; + } + + getmicrotime(&t1); + do { + ret = wait_for_completion_timeout(&wr_waitp->completion, to); + if (!ret) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s not responding after %ld.%06ld " + "seconds - tid %u qpid %u\n", func, + device_get_nameunit(sc->dev), t2.tv_sec, t2.tv_usec, + hwtid, qpid); + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + break; + } + to = to << 2; + timedout = 1; + } + } while (!ret); + +out: + if (timedout) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s reply after %ld.%06ld seconds - " + "tid %u qpid %u\n", func, device_get_nameunit(sc->dev), + t2.tv_sec, t2.tv_usec, hwtid, qpid); + } if (wr_waitp->ret) - CTR4(KTR_IW_CXGBE, "%s: FW reply %d tid %u qpid %u", - device_get_nameunit(sc->dev), wr_waitp->ret, hwtid, qpid); + CTR4(KTR_IW_CXGBE, "%p: FW reply %d tid %u qpid %u", sc, + wr_waitp->ret, hwtid, qpid); return (wr_waitp->ret); } Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/mem.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/mem.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/mem.c Wed May 24 18:16:20 2017 (r318799) @@ -46,12 +46,15 @@ __FBSDID("$FreeBSD$"); #define T4_ULPTX_MIN_IO 32 #define C4IW_MAX_INLINE_SIZE 96 -static int mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) +static int +mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) { - return (is_t4(dev->rdev.adap) || + + return ((is_t4(dev->rdev.adap) || is_t5(dev->rdev.adap)) && - length >= 8*1024*1024*1024ULL; + length >= 8*1024*1024*1024ULL); } + static int write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) { @@ -342,7 +345,8 @@ static int build_phys_page_list(struct i } /* Find largest page shift we can use to cover buffers */ - for (*shift = PAGE_SHIFT; *shift < 27; ++(*shift)) + for (*shift = PAGE_SHIFT; *shift < PAGE_SHIFT + M_FW_RI_TPTE_PS; + ++(*shift)) if ((1ULL << *shift) & mask) break; @@ -439,7 +443,7 @@ int c4iw_reregister_phys_mem(struct ib_m mhp->attr.zbva = 0; mhp->attr.va_fbo = *iova_start; mhp->attr.page_size = shift - 12; - mhp->attr.len = (u32) total_size; + mhp->attr.len = total_size; mhp->attr.pbl_size = npages; } @@ -511,7 +515,7 @@ struct ib_mr *c4iw_register_phys_mem(str mhp->attr.va_fbo = *iova_start; mhp->attr.page_size = shift - 12; - mhp->attr.len = (u32) total_size; + mhp->attr.len = total_size; mhp->attr.pbl_size = npages; ret = register_mem(rhp, php, mhp, shift); if (ret) Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 24 18:16:20 2017 (r318799) @@ -188,7 +188,7 @@ static int c4iw_mmap(struct ib_ucontext "%s:6 USER DB-GTS addr %p region %p, reglen %u", __func__, addr, va_udbs_res, len_udbs_res); #ifdef DOT5 - if (is_t5(rdev->lldi.adapter_type) && map_udb_as_wc) + if (!is_t4(rdev->lldi.adapter_type) && map_udb_as_wc) vma->vm_page_prot = t4_pgprot_wc(vma->vm_page_prot); else #endif @@ -305,6 +305,7 @@ c4iw_query_device(struct ib_device *ibde { struct c4iw_dev *dev = to_c4iw_dev(ibdev); struct adapter *sc = dev->rdev.adap; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; CTR3(KTR_IW_CXGBE, "%s ibdev %p, props %p", __func__, ibdev, props); @@ -318,13 +319,15 @@ c4iw_query_device(struct ib_device *ibde props->vendor_id = pci_get_vendor(sc->dev); props->vendor_part_id = pci_get_device(sc->dev); props->max_mr_size = T4_MAX_MR_SIZE; - props->max_qp = T4_MAX_NUM_QP; - props->max_qp_wr = T4_MAX_QP_DEPTH; + props->max_qp = sc->vres.qp.size / 2; + props->max_qp_wr = T4_MAX_QP_DEPTH(spg_ndesc); props->max_sge = T4_MAX_RECV_SGE; props->max_sge_rd = 1; - props->max_qp_rd_atom = c4iw_max_read_depth; - props->max_qp_init_rd_atom = c4iw_max_read_depth; - props->max_cq = T4_MAX_NUM_CQ; + props->max_res_rd_atom = sc->params.max_ird_adapter; + props->max_qp_rd_atom = min(sc->params.max_ordird_qp, + c4iw_max_read_depth); + props->max_qp_init_rd_atom = props->max_qp_rd_atom; + props->max_cq = sc->vres.qp.size; props->max_cqe = T4_MAX_CQ_DEPTH; props->max_mr = c4iw_num_stags(&dev->rdev); props->max_pd = T4_MAX_NUM_PD; @@ -427,7 +430,7 @@ c4iw_register_device(struct c4iw_dev *de strlcpy(ibdev->node_desc, C4IW_NODE_DESC, sizeof(ibdev->node_desc)); ibdev->phys_port_cnt = sc->params.nports; ibdev->num_comp_vectors = 1; - ibdev->dma_device = sc->dev; + ibdev->dma_device = NULL; ibdev->query_device = c4iw_query_device; ibdev->query_port = c4iw_query_port; ibdev->modify_port = c4iw_modify_port; Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Wed May 24 18:16:20 2017 (r318799) @@ -132,6 +132,7 @@ static int create_qp(struct c4iw_rdev *r int ret; int eqsize; struct wrqe *wr; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; wq->sq.qid = c4iw_get_qpid(rdev, uctx); if (!wq->sq.qid) @@ -213,8 +214,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ @@ -236,8 +236,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ V_FW_RI_RES_WR_CPRIO(0) | /* don't keep in chip cache */ @@ -1522,7 +1521,7 @@ c4iw_create_qp(struct ib_pd *pd, struct struct c4iw_create_qp_resp uresp; int sqsize, rqsize; struct c4iw_ucontext *ucontext; - int ret; + int ret, spg_ndesc; struct c4iw_mm_entry *mm1, *mm2, *mm3, *mm4; CTR2(KTR_IW_CXGBE, "%s ib_pd %p", __func__, pd); @@ -1540,12 +1539,13 @@ c4iw_create_qp(struct ib_pd *pd, struct if (attrs->cap.max_inline_data > T4_MAX_SEND_INLINE) return ERR_PTR(-EINVAL); + spg_ndesc = rhp->rdev.adap->params.sge.spg_len / EQ_ESIZE; rqsize = roundup(attrs->cap.max_recv_wr + 1, 16); - if (rqsize > T4_MAX_RQ_SIZE) + if (rqsize > T4_MAX_RQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); sqsize = roundup(attrs->cap.max_send_wr + 1, 16); - if (sqsize > T4_MAX_SQ_SIZE) + if (sqsize > T4_MAX_SQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); ucontext = pd->uobject ? to_c4iw_ucontext(pd->uobject->context) : NULL; @@ -1555,9 +1555,10 @@ c4iw_create_qp(struct ib_pd *pd, struct if (!qhp) return ERR_PTR(-ENOMEM); qhp->wq.sq.size = sqsize; - qhp->wq.sq.memsize = (sqsize + 1) * sizeof *qhp->wq.sq.queue; + qhp->wq.sq.memsize = (sqsize + spg_ndesc) * sizeof *qhp->wq.sq.queue + + 16 * sizeof(__be64); qhp->wq.rq.size = rqsize; - qhp->wq.rq.memsize = (rqsize + 1) * sizeof *qhp->wq.rq.queue; + qhp->wq.rq.memsize = (rqsize + spg_ndesc) * sizeof *qhp->wq.rq.queue; if (ucontext) { qhp->wq.sq.memsize = roundup(qhp->wq.sq.memsize, PAGE_SIZE); Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/t4.h ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/t4.h Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/t4.h Wed May 24 18:16:20 2017 (r318799) @@ -59,21 +59,17 @@ #define CIDXINC_SHIFT 0 #define CIDXINC(x) ((x) << CIDXINC_SHIFT) -#define T4_MAX_NUM_QP (1<<16) -#define T4_MAX_NUM_CQ (1<<15) -#define T4_MAX_NUM_PD (1<<15) -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) -#define T4_MAX_EQ_SIZE (65520 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_IQ_SIZE (65520 - 1) -#define T4_MAX_RQ_SIZE (8192 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_SQ_SIZE (T4_MAX_EQ_SIZE - 1) -#define T4_MAX_QP_DEPTH (T4_MAX_RQ_SIZE - 1) -#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) +#define T4_MAX_NUM_PD 65536 +#define T4_MAX_EQ_SIZE 65520 +#define T4_MAX_IQ_SIZE 65520 +#define T4_MAX_RQ_SIZE(n) (8192 - (n) - 1) +#define T4_MAX_SQ_SIZE(n) (T4_MAX_EQ_SIZE - (n) - 1) +#define T4_MAX_QP_DEPTH(n) (T4_MAX_RQ_SIZE(n)) +#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 2) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) #define A_PCIE_MA_SYNC 0x30b4 struct t4_status_page { From owner-svn-src-all@freebsd.org Wed May 24 18:54:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EE1FD7C69B; Wed, 24 May 2017 18:54:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E36951688; Wed, 24 May 2017 18:54:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OIsLKR064343; Wed, 24 May 2017 18:54:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OIsLJR064342; Wed, 24 May 2017 18:54:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705241854.v4OIsLJR064342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 May 2017 18:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318800 - head/sys/x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 18:54:23 -0000 Author: jhb Date: Wed May 24 18:54:21 2017 New Revision: 318800 URL: https://svnweb.freebsd.org/changeset/base/318800 Log: Remove constants and comments for unimplemented entries in the default LDT. These entries will never be added to the default LDT in the future. Modified: head/sys/x86/include/segments.h Modified: head/sys/x86/include/segments.h ============================================================================== --- head/sys/x86/include/segments.h Wed May 24 18:16:20 2017 (r318799) +++ head/sys/x86/include/segments.h Wed May 24 18:54:21 2017 (r318800) @@ -247,11 +247,8 @@ union descriptor { */ #define LSYS5CALLS_SEL 0 /* forced by intel BCS */ #define LSYS5SIGR_SEL 1 -#define L43BSDCALLS_SEL 2 /* notyet */ #define LUCODE_SEL 3 #define LUDATA_SEL 5 -/* separate stack, es,fs,gs sels ? */ -/* #define LPOSIXCALLS_SEL 5*/ /* notyet */ #define NLDT (LUDATA_SEL + 1) #else /* !__i386__ */ From owner-svn-src-all@freebsd.org Wed May 24 19:11:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C560DD7C8EC; Wed, 24 May 2017 19:11:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CDA91C95; Wed, 24 May 2017 19:11:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id w69so33970602pfk.1; Wed, 24 May 2017 12:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=H+hSoUgbGoYg+gFU1DdaAdLjL/Lz0RM/0qJOJeuAtuw=; b=ujR+w3LuizboSxFePmnqsjnR2NAAqU0Bbzghmpe1+RmTqlvlZAhFZ03WJ/T74n+zvK m7ylpg08VQtQjjfAtb/iJf1n7XEXecOdeVQq3KZKA4+kQwByaW/HtO+uRhKQHNxWaZ2y 5YYv3P2g8CEccmgCR2Qcs6O17p400yjs8JaX+RCnU6cx0DkT1ON3UkgGp9/XkMjdShk+ X+htL1R1rIVhw/7E5ggWelvOM6oCesOZmXL6C6pBp5FjfHBui+D/UKYUJZ2cQWM3X4/T rPbS41p7feEjexYGNx7+7/2kN8nXD0WpN1Joz7JydLgCEBnnz/QuquLVJXb8QRMx6Bhe bFrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=H+hSoUgbGoYg+gFU1DdaAdLjL/Lz0RM/0qJOJeuAtuw=; b=ljjIjEKdtdaYnytfRSjB18d/qdZazl/fj0qzQ7lkcJW5Kj5zwjPzCKy2hThgNLomlh 7D9whzC5mKIbty3yXblWIcRtFsUNelFjZqKJ4lwd86XKDRPxixDTKzoAAYeSovBmBQpd KjHZs5Z6Uns9fO4u30tRCgOd3m3pp9VJLQIulFkVN9bQeBUVERR117ocWEVQOS+G+Hms Ju7dvOpqR+SM1vnmOVqJNDxUxiGR1b/wgSglfjl7vfHQX4zbMejNzZ18mZFxs8QcnREa gCmxytRYlxDnAEfHuWZTINDRh49y82nu+D+G344Rl+Xx9goOkCSXsapqg8uMWSpCdavw rAbQ== X-Gm-Message-State: AODbwcD2bQPpIbbDL5G2k5QTp0A9CswDXaQi1mjBR513eYLyDJhPDZ/y pPSDzhtJMGebOnRrDLk= X-Received: by 10.99.103.70 with SMTP id b67mr41521704pgc.96.1495653069049; Wed, 24 May 2017 12:11:09 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id d2sm9321522pfb.110.2017.05.24.12.11.07 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 12:11:08 -0700 (PDT) Subject: Re: svn commit: r318757 - head Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3E3916D7-5B6E-40CD-A65A-0D3DE2D153B6"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170524201000.5bfc736f@thor.intern.walstatt.dynvpn.de> Date: Wed, 24 May 2017 12:11:06 -0700 Cc: Larry Rosenman , src-committers , Ed Maste , svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" , Konstantin Belousov Message-Id: References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> <163D09DC-C0B3-4D49-B0BF-C71C26C2807B@lerctr.org> <20170524194046.1226b05b@thor.intern.walstatt.dynvpn.de> <20170524200136.09ac15b1@thor.intern.walstatt.dynvpn.de> <26FCC584-3B24-4F70-9374-C432775844F6@lerctr.org> <20170524201000.5bfc736f@thor.intern.walstatt.dynvpn.de> To: "O. Hartmann" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 19:11:09 -0000 --Apple-Mail=_3E3916D7-5B6E-40CD-A65A-0D3DE2D153B6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 24, 2017, at 11:10, O. Hartmann wrote: >=20 > Am Wed, 24 May 2017 13:04:30 -0500 > Larry Rosenman schrieb: =E2=80=A6 > I use the traditional "make" way (via portmaster) There were some reports about needing to do =E2=80=9Cmake = clean=E2=80=9D before =E2=80=9Cmake install=E2=80=9D. Memory serves me = correctly there are ways in portmaster to bypass =E2=80=9Cmake clean=E2=80= =9D before running =E2=80=9Cmake install=E2=80=9D. Could you please = provide your portmasterrc file? Thanks, -Ngie --Apple-Mail=_3E3916D7-5B6E-40CD-A65A-0D3DE2D153B6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZJdrLAAoJEPWDqSZpMIYVTPAP/1vRh+QCPZhNkfcrr1tEcJPi z3dsNAuJPTyhe16osCwSu4MMCPAGnJRqF9Kt8PI6h0WUvRyP0lIfG4t1tlZKl3L3 sezcrNuRrEoAr1/o94RoyWXdQCX8zizRk2nbEL0sDrM9Nc4mPx7KFWIJgXJZm76C moA+7glJU7kNet96BYtzdwfKeaSPTCAOUkdkb68QH8qh+hfIhNwrBMEdV21zNt7M Hw8k+bZZXqJ/ZX9wSeQsjjwHM6l6W8QGcHRBQqEwsRmLYMC0500ucMIsWt9mV33b UFUZMF9SVQOKmfByzTqeuLx9VWHoGz6GF/+NR4UM0MhYPND+WGuqGhtfqwk+Sand pQ44MeX1MZYNTNIGoKYTlMPZygzi13CZmR44XMuZ84KuZTs4H5H7QGUrVRAvh5Cp Efg4YMoCOiXmsvA83FhFltvxLIcU+hTbgD94AycZ7rYKzmuZG/NYWm+isKbMbXne 8Z8WraZBx5/g81ropHtDJuB3jfHpEw552IsKtRQQEXeVodOJOGUWpAAQIOnl6ILK m4bU7rrKfiCxF6qYKOeQpVHyCd+0H+1uJMal/aujPpEyWiRsnSVQDC/tI019os3z 4cCjJVTkzuJuQ/xdIGw4AWcLOwnR1SIHAQ/KIYtqeZ/nbICiToTJTmpY+mH0Eang qKPXimhBGpgDbq+QPpk0 =bpJB -----END PGP SIGNATURE----- --Apple-Mail=_3E3916D7-5B6E-40CD-A65A-0D3DE2D153B6-- From owner-svn-src-all@freebsd.org Wed May 24 19:18:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 575D9D7CB9F; Wed, 24 May 2017 19:18:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28F7711F9; Wed, 24 May 2017 19:18:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OJIa8o072656; Wed, 24 May 2017 19:18:36 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OJIaB7072655; Wed, 24 May 2017 19:18:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241918.v4OJIaB7072655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 19:18:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318801 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 19:18:37 -0000 Author: np Date: Wed May 24 19:18:36 2017 New Revision: 318801 URL: https://svnweb.freebsd.org/changeset/base/318801 Log: MFC r314131: Avoid NULL dereference in a couple of sysctl handlers in ibcore. iw_cxgbe sets ib_device->dma_device to NULL (since r311880). Sponsored by: Chelsio Communications Modified: stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed May 24 18:54:21 2017 (r318800) +++ stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed May 24 19:18:36 2017 (r318801) @@ -1225,7 +1225,7 @@ show_dev_device(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", @@ -1238,7 +1238,7 @@ show_dev_vendor(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", From owner-svn-src-all@freebsd.org Wed May 24 19:19:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72F7FD7CBF5; Wed, 24 May 2017 19:19:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 422E1132C; Wed, 24 May 2017 19:19:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OJJ2YC072721; Wed, 24 May 2017 19:19:02 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OJJ2Md072720; Wed, 24 May 2017 19:19:02 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241919.v4OJJ2Md072720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 19:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318802 - stable/10/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 19:19:03 -0000 Author: np Date: Wed May 24 19:19:02 2017 New Revision: 318802 URL: https://svnweb.freebsd.org/changeset/base/318802 Log: MFC r314131: Avoid NULL dereference in a couple of sysctl handlers in ibcore. iw_cxgbe sets ib_device->dma_device to NULL (since r311880). Sponsored by: Chelsio Communications Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed May 24 19:18:36 2017 (r318801) +++ stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed May 24 19:19:02 2017 (r318802) @@ -782,7 +782,7 @@ show_dev_device(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", @@ -795,7 +795,7 @@ show_dev_vendor(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", From owner-svn-src-all@freebsd.org Wed May 24 19:42:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AF99D7C4BF; Wed, 24 May 2017 19:42:53 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A953C121F; Wed, 24 May 2017 19:42:52 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([85.179.134.189]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M5cpk-1eApbE35K4-00xdY9; Wed, 24 May 2017 21:42:48 +0200 Date: Wed, 24 May 2017 21:42:40 +0200 From: "O. Hartmann" To: "Ngie Cooper (yaneurabeya)" Cc: "O. Hartmann" , Larry Rosenman , src-committers , Ed Maste , svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" , Konstantin Belousov Subject: Re: svn commit: r318757 - head Message-ID: <20170524214240.56898f49@thor.intern.walstatt.dynvpn.de> In-Reply-To: References: <201705232025.v4NKPnrH001395@repo.freebsd.org> <20170524090552.GF1622@kib.kiev.ua> <8A9597FF-FC4B-4998-87A8-F5ED13303474@lerctr.org> <20170524192415.7bb764a7@thor.intern.walstatt.dynvpn.de> <163D09DC-C0B3-4D49-B0BF-C71C26C2807B@lerctr.org> <20170524194046.1226b05b@thor.intern.walstatt.dynvpn.de> <20170524200136.09ac15b1@thor.intern.walstatt.dynvpn.de> <26FCC584-3B24-4F70-9374-C432775844F6@lerctr.org> <20170524201000.5bfc736f@thor.intern.walstatt.dynvpn.de> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_//9UtlAXwddK82MsGGgt9aeP"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:eAZVHU55JnQ1NGPFxZtRZrDg1UgnRU8Gra6kxuGjOjqHvO/8djb 0s069pdsS8vas5E39NqoQDYkpG6g1RZFk1N+ZYIS08KM2KuX7/UVFqK72tGZMvywCtiAxXG 14O5GfBt9IlfCkFy2G/Qn798LAhiDBLCN3EtEdLPeb4lmqcF2McW7rBTtjufPYFrdVJUOSq KOotUCF3WGoZqYi5O1kew== X-UI-Out-Filterresults: notjunk:1;V01:K0:/FputYUvTmc=:dca8V8h3yST9OFy2xZ1aF9 BPQpGz9FxGLTqeZfasmZ9o6AjyXQv5s26zJpcBdB6/n3p/BCHffhDvrHtruTZW6QyPrayppku g3Ednf1L5j9OXEzlKR04suJKHE+iQANnDzUZa+cSIGlvCDa7/kYed1TB7pOzfF2n8o1ZBJtYI H5fzovGam+rfxYNdWl6Fmmko6+jNgQjw5ptd5voTuHYnDdpaPJ570UlN9Fk89aXfAxfVIo6FD IbRrk560k5FO4stOqV1YIp2be5TvG8ypi8UOAO5xTtS/S5ROo2rLNmg8bEhcgsT0y7ztAX/vT t58dRFVHQU/5BDWFqBonzzTprS6CSJCzWye+DJAO6XVGfHv52NAAapnKCD2mCjr3nuTfIDoAj Bj5uwVTAEOlD+POgTuyCedcKRC45Btul9SjyLgGDoalE1ieTo+MzIfNzsMY0B3sznFupvU8K8 lZDJIMUFB811gHSy8CyCUjZbjXGIYAz9j4z7FcBRioGS6r4arFy2Up5ltKIFws+TovSYdPz3k G+FRPADdgWxv9ILI7gCPR+fbqMDzj5HylXi4BX6nYS9VogIZKbmBNEHAaHPynn/he6Hjwi7in EjyLVEfSOMx4KgWcik7KOxTsXd+TrvIgFHK5tBUtonGqfc0wYi9/ZZekOdBcSi64mkneB3RUA WCj1tKQPcXt1JG+FQ6Cq26tue1+sC89f4GOkww7sE82WwbNZf3VK/hI6E/LT00+i10u6R7zlg Z/LXXYWzUSYRSjd5S0QmLS7G5RD5Pl7TGsX8mbKznvfBoJH7nay9+F6N+QY= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 19:42:53 -0000 --Sig_//9UtlAXwddK82MsGGgt9aeP Content-Type: multipart/mixed; boundary="MP_/QXuJWY8+K7cFF5R+jrvtRLx" --MP_/QXuJWY8+K7cFF5R+jrvtRLx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Am Wed, 24 May 2017 12:11:06 -0700 "Ngie Cooper (yaneurabeya)" schrieb: > > On May 24, 2017, at 11:10, O. Hartmann wrote: > >=20 > > Am Wed, 24 May 2017 13:04:30 -0500 > > Larry Rosenman schrieb: =20 >=20 > =E2=80=A6 >=20 > > I use the traditional "make" way (via portmaster) =20 >=20 > There were some reports about needing to do =E2=80=9Cmake clean=E2=80=9D= before =E2=80=9Cmake install=E2=80=9D. > Memory serves me correctly there are ways in portmaster to bypass =E2=80= =9Cmake clean=E2=80=9D before > running =E2=80=9Cmake install=E2=80=9D. Could you please provide your por= tmasterrc file? Thanks, -Ngie attached, but there is nothing unusual from my point of view. make clean is= also done prior to the make all. --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --MP_/QXuJWY8+K7cFF5R+jrvtRLx Content-Type: application/octet-stream; name=portmaster.rc Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=portmaster.rc IyAkRnJlZUJTRCQKIwojIFNhbXBsZSBwb3J0bWFzdGVyIHJjIGZpbGUuCiMgUGxhY2UgaW4gJEhP TUUvLnBvcnRtYXN0ZXJyYyBvciAvdXNyL2xvY2FsL2V0Yy9wb3J0bWFzdGVyLnJjCiMKIyBQbGVh c2UgcmVhZCB0aGUgcG9ydG1hc3RlciBtYW4gcGFnZSBmb3IgbW9yZSBpbmZvcm1hdGlvbiBvbgoj IHRoZXNlIG9wdGlvbnMuCiMKIyBEbyBub3QgY3JlYXRlIHRlbXBvcmFyeSBiYWNrdXAgcGFja2Fn ZXMgYmVmb3JlIHBrZ19kZWxldGUgKC1CKQojIE5PX0JBQ0tVUD1Cb3B0CiMKIyBBbHdheXMgc2F2 ZSB0aGUgYmFja3VwIHBhY2thZ2VzIG9mIHRoZSBvbGQgcG9ydCAoLWIpCiMgQkFDS1VQPWJvcHQK IwojIE1ha2UgYW5kIHNhdmUgYSBwYWNrYWdlIG9mIHRoZSBuZXcgcG9ydCAoLWcpCiMgTUFLRV9Q QUNLQUdFPWdvcHQKIwojIERvIG5vdCBwcmVjbGVhbiB0aGUgcG9ydCdzIGJ1aWxkIGRpcmVjdG9y eSAoLUMpCiMgRE9OVF9QUkVfQ0xFQU49Q29wdAojCiMgRG8gbm90IGNsZWFuIHRoZSBwb3J0J3Mg YnVpbGQgZGlyZWN0b3J5IGFmdGVyIGluc3RhbGxhdGlvbiAoLUspCiMgRE9OVF9QT1NUX0NMRUFO PUtvcHQKIwojIE5ldmVyIHNlYXJjaCBmb3Igc3RhbGUgZGlzdGZpbGVzIHRvIGRlbGV0ZSAoLUQp CiMgRE9OVF9TQ1JVQl9ESVNURklMRVM9RG9wdAojCiMgQWx3YXlzIGRlbGV0ZSBzdGFsZSBkaXN0 ZmlsZXMgd2l0aG91dCBwcm9tcHRpbmcgKC1kKQpBTFdBWVNfU0NSVUJfRElTVEZJTEVTPWRvcHQK IwojIERvIG5vdCBydW4gJ21ha2UgY29uZmlnJyBmb3IgcG9ydHMgdGhhdCBuZWVkIHVwZGF0aW5n ICgtRykKIyBQTV9OT19NQUtFX0NPTkZJRz1Hb3B0CiMKIyBIaWRlIHRoZSBidWlsZCBhbmQgaW5z dGFsbCBwcm9jZXNzZXMgaW4gYSBsb2cgZmlsZSAoLUgpCiMgSElERV9CVUlMRD1Ib3B0CiMKIyBB cmd1bWVudHMgdG8gcGFzcyB0byBtYWtlICgtbSkKIyBQTV9NQUtFX0FSR1M9Jy1ERk9SQ0VfUEtH X1JFR0lTVEVSJwojCiMgUmVjdXJzZSB0aHJvdWdoIGV2ZXJ5IGRlcGVuZGVuY3ksIGFuZCBjaGls ZCBkZXBlbmRlbmNpZXMgKC10KQojCiMgTk9URToJVVNFIE9GIFRISVMgT1BUSU9OIElOIFlPVVIg Q09ORklHIEZJTEUgSVMgTk9UIFJFQ09NTUVOREVECiMJSVQgSVMgT05MWSBORUVERUQgSU4gU1BF Q0lBTCBDSVJDVU1TVEFOQ0VTLCBBTkQgU0hPVUxEIEJFCiMJVVNFRCBGUk9NIFRIRSBDT01NQU5E IExJTkUuCiMKIyBSRUNVUlNFX1RIT1JPVUdIPXRvcHQKIwojIEJlIHZlcmJvc2UgKC12KQojIFBN X1ZFUkJPU0U9dm9wdAojCiMgU2F2ZSBjb3BpZXMgb2Ygb2xkIHNoYXJlZCBsaWJyYXJpZXMgKHJl Y29tbWVuZGVkKSAoLXcpCiMgU0FWRV9TSEFSRUQ9d29wdAojCiMgSW5zdGFsbCBhIHBhY2thZ2Ug aWYgYXZhaWxhYmxlICgtUCBvciAtLXBhY2thZ2VzKQojIFBNX1BBQ0tBR0VTPWZpcnN0CiMKIyBP bmx5IGluc3RhbGwgcGFja2FnZXMgKC1QUCBvciAtLXBhY2thZ2VzLW9ubHkpCiMgUE1fUEFDS0FH RVM9b25seQojCiMgSW5zdGFsbCBwYWNrYWdlcyBmb3IgYnVpbGQtb25seSBkZXBlbmRlbmNpZXMg KC0tcGFja2FnZXMtYnVpbGQpCiMgUE1fUEFDS0FHRVNfQlVJTEQ9cG1wX2J1aWxkCiMKIyBEZWxl dGUgYnVpbGQtb25seSBkZXBlbmRlbmNpZXMgd2hlbiBmaW5pc2hlZCAoLS1kZWxldGUtYnVpbGQt b25seSkKIyBQTV9ERUxfQlVJTERfT05MWT1wbV9kYm8KIwojIFVzZSBwYWNrYWdlcyBpZiB0aGV5 IGFyZSBuZXdlciB0aGFuIGluc3RhbGxlZCAoLS1wYWNrYWdlcy1uZXdlcikKIyBQTV9QQUNLQUdF Uz1uZXdlcgojIFBNX1BBQ0tBR0VTX05FV0VSPXBtcF9uZXdlcgojCiMgQWx3YXlzIGZldGNoIG5l dyBwYWNrYWdlIGZpbGVzICgtLWFsd2F5cy1mZXRjaCkKIyBQTV9BTFdBWVNfRkVUQ0g9cG1fYWx3 YXlzX2ZldGNoCiMKIyBTcGVjaWZ5IGEgbG9jYWwgcGFja2FnZSByZXBvc2l0b3J5ICgtLWxvY2Fs LXBhY2thZ2VkaXIpCiMgTE9DQUxfUEFDS0FHRURJUj08cGF0aD4KIwojIE9ubHkgdXNlIHBhY2th Z2VzIGZyb20gLS1sb2NhbC1wYWNrYWdlZGlyICgtLXBhY2thZ2VzLWxvY2FsKQojIFBNX1BBQ0tB R0VTX0xPQ0FMPXBtcF9sb2NhbAojCiMgRGVsZXRlIHBhY2thZ2VzIGFmdGVyIHRoZXkgYXJlIGlu c3RhbGxlZCAoLS1kZWxldGUtcGFja2FnZXMpCiMgUE1fREVMRVRFX1BBQ0tBR0VTPXBtX2RlbGV0 ZV9wYWNrYWdlcwojCiMgU3VwcHJlc3MgdGhlIGJ1aWxkIGNvbmZpcm1hdGlvbiBtZXNzYWdlICgt LW5vLWNvbmZpcm0pCiMgUE1fTk9fQ09ORklSTT1wbV9ub19jb25maXJtCiMKIyBEbyBub3QgdXBk YXRlIHRoZSB4dGVybSB0aXRsZSBiYXIgKC0tbm8tdGVybS10aXRsZSkKIyBQTV9OT19URVJNX1RJ VExFPXBtX25vX3Rlcm1fdGl0bGUKIwojIERvIG5vdCBmZXRjaCB0aGUgSU5ERVggZmlsZSAoLS1u by1pbmRleC1mZXRjaCkKIyBQTV9OT19JTkRFWF9GRVRDSD1wbV9ub19pbmRleF9mZXRjaAojCiMg VXNlIG9ubHkgdGhlIElOREVYIGZpbGUgdG8gY2hlY2sgaWYgYSBwb3J0IGlzIG91dCBvZiBkYXRl ICgtLWluZGV4KQojIFBNX0lOREVYPXBtX2luZGV4CiMKIyBVc2UgdGhlIElOREVYIGZpbGUgZmly c3QsIHRoZW4gY2hlY2sgL3Vzci9wb3J0cyAoLS1pbmRleC1maXJzdCkKIyBQTV9JTkRFWD1wbV9p bmRleAojIFBNX0lOREVYX0ZJUlNUPXBtX2luZGV4X2ZpcnN0CiMKIyBVc2UgdGhlIElOREVYIGZp bGUgaW5zdGVhZCBvZiAvdXNyL3BvcnRzICgtLWluZGV4LW9ubHkpCiMgUE1fSU5ERVg9cG1faW5k ZXgKIyBQTV9JTkRFWF9PTkxZPXBtX2luZGV4X29ubHkKIwojIElmIGJ1aWxkaW5nIGFzIGFuIHVu cHJpdmlsZWdlZCB1c2VyIGFuZCB5b3UgaGF2ZSBTVV9DTUQgaW4gbWFrZS5jb25mKDUpLgojIE5v dGU6IHBvcnRtYXN0ZXIgZG9lcyBub3QgcHJvdmlkZSBjb21tYW5kIGFzIGEgc2luZ2xlIGFyZ3Vt ZW50LCBpLmUuCiMgaWYgeW91ciBtYWtlLmNvbmYoNSkgc3BlY2lmaWVzIGBTVV9DTUQ9c3VkbyAt RSBzaCAtY2AsIHRoZW4gdGhlIGNvcnJlY3QKIyBjb3JyZXNwb25kaW5nIHBvcnRtYXN0ZXIgY29u ZmlndXJhdGlvbiBpcyBgUE1fU1VfQ01EPXN1ZG9gLgojIFBNX1NVX0NNRD1zdWRvCiMKIwojIFRo ZSBmb2xsb3dpbmcgb3B0aW9ucyBhcmUgYXZhaWxhYmxlIGZvciB0aGUgcmMgZmlsZSBvbmx5Ogoj CiMgTG9nIGFjdGlvbnMgdGFrZW4gYnkgcG9ydG1hc3RlciB3aXRoIGEgZGF0ZS90aW1lIHN0YW1w CiMgUE1fTE9HPS9mdWxsL3BhdGgvdG8vZmlsZQojCiMgRG8gbm90IHByb21wdCB0aGUgdXNlciBm b3IgZmFpbGVkIGJhY2t1cCBwYWNrYWdlIGNyZWF0aW9uCiMgUE1fSUdOT1JFX0ZBSUxFRF9CQUNL VVBfUEFDS0FHRT1wbV9pZ25vcmVfZmFpbGVkX2JhY2t1cF9wYWNrYWdlCiMKIyBMaXN0IG9mIGZp bGVzIHRvIHByZXNlcnZlIGFjcm9zcyB1cGdyYWRlcywgYW5kIHRoZSBwb3J0cyB0aGF0IGluc3Rh bGwgdGhlbS4KIyBZb3UgY2FuIGNvbnZlcnQgY2F0ZWdvcnkvcG9ydG5hbWUgdG8gdGhlIHJpZ2h0 IHBhdHRlcm4gZm9yIHRoZSBfZmlsZXMgdmFyaWFibGUKIyBieSB1c2luZyB0aGUgZm9sbG93aW5n OiBlY2hvIGNhdGVnb3J5L3BvcnRuYW1lIHwgc2VkICdzI1stKy9cLl0jXyNnJwojIFBNX1BSRVNF UlZFX1BPUlRTPSJkbnMvcDUtTmV0LUROUyIKIyBkbnNfcDVfTmV0X0ROU19maWxlcz0iL3Vzci9s b2NhbC9zaGFyZS9kb2MvcDUtTmV0LUROUy9UT0RPIgo= --MP_/QXuJWY8+K7cFF5R+jrvtRLx-- --Sig_//9UtlAXwddK82MsGGgt9aeP Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWSXiMAAKCRDS528fyFhY lKZaAf9Mh/NGbOXlFteO1mCZgevP6TNx+jVtWsNNORsT8yDqnl/AWlObYlo8+jPG BllRgegk9sMlTnGKe6ywabqfd0QKAf9qMxJPu2RpFJuljWWKlr3lLGetMBRTDXn6 6dbjTi5tC061y1OnKSzCapCCzx9FIjybvteqmSIwGm1ZFThKzd4G =JoU6 -----END PGP SIGNATURE----- --Sig_//9UtlAXwddK82MsGGgt9aeP-- From owner-svn-src-all@freebsd.org Wed May 24 19:57:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8B6AD7C9E1; Wed, 24 May 2017 19:57:23 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 985D91CF1; Wed, 24 May 2017 19:57:23 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OJvMaC089344; Wed, 24 May 2017 19:57:22 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OJvMps089337; Wed, 24 May 2017 19:57:22 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241957.v4OJvMps089337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 19:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318803 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 19:57:23 -0000 Author: np Date: Wed May 24 19:57:22 2017 New Revision: 318803 URL: https://svnweb.freebsd.org/changeset/base/318803 Log: MFC r313346: cxgbe/t4_tom: Fix CLIP entry refcounting on the passive side. Every IPv6 connection being handled by the TOE should have a reference on its CLIP entry. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c stable/11/sys/dev/cxgbe/tom/t4_listen.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_connect.c Wed May 24 19:19:02 2017 (r318802) +++ stable/11/sys/dev/cxgbe/tom/t4_connect.c Wed May 24 19:57:22 2017 (r318803) @@ -402,7 +402,7 @@ t4_connect(struct toedev *tod, struct so if ((inp->inp_vflag & INP_IPV6) == 0) DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); - toep->ce = hold_lip(td, &inp->in6p_laddr); + toep->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (toep->ce == NULL) DONT_OFFLOAD_ACTIVE_OPEN(ENOENT); Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_listen.c Wed May 24 19:19:02 2017 (r318802) +++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Wed May 24 19:57:22 2017 (r318803) @@ -209,7 +209,7 @@ alloc_lctx(struct adapter *sc, struct in !IN6_ARE_ADDR_EQUAL(&in6addr_any, &inp->in6p_laddr)) { struct tom_data *td = sc->tom_softc; - lctx->ce = hold_lip(td, &inp->in6p_laddr); + lctx->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (lctx->ce == NULL) { free(lctx, M_CXGBE); return (NULL); @@ -1584,6 +1584,8 @@ reset: INP_WLOCK_ASSERT(new_inp); MPASS(so->so_vnet == lctx->vnet); toep->vnet = lctx->vnet; + if (inc.inc_flags & INC_ISIPV6) + toep->ce = hold_lip(sc->tom_softc, &inc.inc6_laddr, lctx->ce); /* * This is for the unlikely case where the syncache entry that we added Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.c Wed May 24 19:19:02 2017 (r318802) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.c Wed May 24 19:57:22 2017 (r318803) @@ -730,12 +730,12 @@ search_lip(struct tom_data *td, struct i } struct clip_entry * -hold_lip(struct tom_data *td, struct in6_addr *lip) +hold_lip(struct tom_data *td, struct in6_addr *lip, struct clip_entry *ce) { - struct clip_entry *ce; mtx_lock(&td->clip_table_lock); - ce = search_lip(td, lip); + if (ce == NULL) + ce = search_lip(td, lip); if (ce != NULL) ce->refcount++; mtx_unlock(&td->clip_table_lock); Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.h Wed May 24 19:19:02 2017 (r318802) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.h Wed May 24 19:57:22 2017 (r318803) @@ -321,7 +321,8 @@ uint64_t calc_opt0(struct socket *, stru uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); void set_tcpddp_ulp_mode(struct toepcb *); int negative_advice(int); -struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *); +struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *, + struct clip_entry *); void release_lip(struct tom_data *, struct clip_entry *); /* t4_connect.c */ From owner-svn-src-all@freebsd.org Wed May 24 20:01:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00C15D7CA96; Wed, 24 May 2017 20:01:14 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D20C21EE2; Wed, 24 May 2017 20:01:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OK1COs091681; Wed, 24 May 2017 20:01:12 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OK1C5H091677; Wed, 24 May 2017 20:01:12 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242001.v4OK1C5H091677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318804 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:01:14 -0000 Author: np Date: Wed May 24 20:01:12 2017 New Revision: 318804 URL: https://svnweb.freebsd.org/changeset/base/318804 Log: MFC r313346: cxgbe/t4_tom: Fix CLIP entry refcounting on the passive side. Every IPv6 connection being handled by the TOE should have a reference on its CLIP entry. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/dev/cxgbe/tom/t4_tom.c stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_connect.c Wed May 24 19:57:22 2017 (r318803) +++ stable/10/sys/dev/cxgbe/tom/t4_connect.c Wed May 24 20:01:12 2017 (r318804) @@ -402,7 +402,7 @@ t4_connect(struct toedev *tod, struct so if ((inp->inp_vflag & INP_IPV6) == 0) DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); - toep->ce = hold_lip(td, &inp->in6p_laddr); + toep->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (toep->ce == NULL) DONT_OFFLOAD_ACTIVE_OPEN(ENOENT); Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_listen.c Wed May 24 19:57:22 2017 (r318803) +++ stable/10/sys/dev/cxgbe/tom/t4_listen.c Wed May 24 20:01:12 2017 (r318804) @@ -207,7 +207,7 @@ alloc_lctx(struct adapter *sc, struct in !IN6_ARE_ADDR_EQUAL(&in6addr_any, &inp->in6p_laddr)) { struct tom_data *td = sc->tom_softc; - lctx->ce = hold_lip(td, &inp->in6p_laddr); + lctx->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (lctx->ce == NULL) { free(lctx, M_CXGBE); return (NULL); @@ -1639,6 +1639,8 @@ reset: INP_WLOCK_ASSERT(new_inp); MPASS(so->so_vnet == lctx->vnet); toep->vnet = lctx->vnet; + if (inc.inc_flags & INC_ISIPV6) + toep->ce = hold_lip(sc->tom_softc, &inc.inc6_laddr, lctx->ce); /* * This is for the unlikely case where the syncache entry that we added Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.c Wed May 24 19:57:22 2017 (r318803) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.c Wed May 24 20:01:12 2017 (r318804) @@ -745,12 +745,12 @@ search_lip(struct tom_data *td, struct i } struct clip_entry * -hold_lip(struct tom_data *td, struct in6_addr *lip) +hold_lip(struct tom_data *td, struct in6_addr *lip, struct clip_entry *ce) { - struct clip_entry *ce; mtx_lock(&td->clip_table_lock); - ce = search_lip(td, lip); + if (ce == NULL) + ce = search_lip(td, lip); if (ce != NULL) ce->refcount++; mtx_unlock(&td->clip_table_lock); Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Wed May 24 19:57:22 2017 (r318803) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Wed May 24 20:01:12 2017 (r318804) @@ -293,7 +293,8 @@ uint64_t calc_opt0(struct socket *, stru uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); void set_tcpddp_ulp_mode(struct toepcb *); int negative_advice(int); -struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *); +struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *, + struct clip_entry *); void release_lip(struct tom_data *, struct clip_entry *); /* t4_connect.c */ From owner-svn-src-all@freebsd.org Wed May 24 20:10:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED948D7CCA3; Wed, 24 May 2017 20:10:39 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC61F1391; Wed, 24 May 2017 20:10:39 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKAcdA093636; Wed, 24 May 2017 20:10:38 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKAcba093635; Wed, 24 May 2017 20:10:38 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201705242010.v4OKAcba093635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Wed, 24 May 2017 20:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318805 - stable/11/sys/dev/tws X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:10:40 -0000 Author: jpaetzel Date: Wed May 24 20:10:38 2017 New Revision: 318805 URL: https://svnweb.freebsd.org/changeset/base/318805 Log: MFC 318401 Increase the number of LUNs this hardware can support. Experimentally we know this value works, but the hardware may support an even higher value. PR: 213876 Reported by: J.Catrysse@proximedia.be Modified: stable/11/sys/dev/tws/tws.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/tws/tws.h ============================================================================== --- stable/11/sys/dev/tws/tws.h Wed May 24 20:01:12 2017 (r318804) +++ stable/11/sys/dev/tws/tws.h Wed May 24 20:10:38 2017 (r318805) @@ -67,7 +67,7 @@ extern int tws_queue_depth; #define TWS_DRIVER_VERSION_STRING "10.80.00.005" #define TWS_MAX_NUM_UNITS 65 -#define TWS_MAX_NUM_LUNS 16 +#define TWS_MAX_NUM_LUNS 32 #define TWS_MAX_IRQS 2 #define TWS_SCSI_INITIATOR_ID 66 #define TWS_MAX_IO_SIZE 0x20000 /* 128kB */ From owner-svn-src-all@freebsd.org Wed May 24 20:13:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A982D7CE63; Wed, 24 May 2017 20:13:51 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A67717FC; Wed, 24 May 2017 20:13:50 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKDoM5097338; Wed, 24 May 2017 20:13:50 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKDoxC097337; Wed, 24 May 2017 20:13:50 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201705242013.v4OKDoxC097337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Wed, 24 May 2017 20:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318806 - stable/10/sys/dev/tws X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:13:51 -0000 Author: jpaetzel Date: Wed May 24 20:13:49 2017 New Revision: 318806 URL: https://svnweb.freebsd.org/changeset/base/318806 Log: MFC 318401 Increase the number of LUNs this hardware can support. Experimentally we know this value works, but the hardware may support an even higher value. PR: 213876 Reported by: J.Catrysse@proximedia.be Modified: stable/10/sys/dev/tws/tws.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/tws/tws.h ============================================================================== --- stable/10/sys/dev/tws/tws.h Wed May 24 20:10:38 2017 (r318805) +++ stable/10/sys/dev/tws/tws.h Wed May 24 20:13:49 2017 (r318806) @@ -67,7 +67,7 @@ extern int tws_queue_depth; #define TWS_DRIVER_VERSION_STRING "10.80.00.005" #define TWS_MAX_NUM_UNITS 65 -#define TWS_MAX_NUM_LUNS 16 +#define TWS_MAX_NUM_LUNS 32 #define TWS_MAX_IRQS 2 #define TWS_SCSI_INITIATOR_ID 66 #define TWS_MAX_IO_SIZE 0x20000 /* 128kB */ From owner-svn-src-all@freebsd.org Wed May 24 20:19:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF293D7CF91; Wed, 24 May 2017 20:19:43 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DA541A2E; Wed, 24 May 2017 20:19:42 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id DckldeK0rM9gtDckmdFLty; Wed, 24 May 2017 14:19:35 -0600 X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=tJ8p9aeEuA8A:10 a=6I5d2MoRAAAA:8 a=6VqBrpBaAAAA:8 a=YxBL1-UpAAAA:8 a=QflrKiuasJPXsMzlugIA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=l6wOqGboJC1rSQv2Z1Bd:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 70FCE196; Wed, 24 May 2017 13:19:31 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v4OKHFbC030278; Wed, 24 May 2017 13:17:15 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201705242017.v4OKHFbC030278@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Bryan Drewery cc: Larry Rosenman , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" Subject: Re: svn commit: r318757 - head In-Reply-To: Message from Bryan Drewery of "Tue, 23 May 2017 16:33:06 -0700." <1c1ab22c-60bf-4707-f635-8069aa1e0594@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 24 May 2017 13:17:15 -0700 X-CMAE-Envelope: MS4wfNjCKTfuCmf/qz4XavPa4oh94E2fIMBgZsLPhJM4ToPk+eG7QotPLp9S5QS2+cCMykuGN8HD3wf5bxkId4XgOtorhDchnBt0GT2PmcvWL6zWjRE/6mLE J7k6pbe6NpP4r5r+JP7rzM53dzQ8i9C1s5gSWzoO1/oQ7b9xdFnuxDlGiU20hnlvHB0o2DsFUetzi04xr2L/lN5qcRMOPm8CGdQpcrO500SGpeT8OhRgSDvw +vIqMwa+53gU/jIZu6dFyBLPfPu8oZJxsTMSocwpHHQxO9tktdN55GVjCaNgG9VlHDyWcGdyuCkSJu2eoA7hnB+wFdCttJPgBauLoZ6rpv8TrTQo9076shMi EG8/MZITQWlXJa/9Wi7gieKxq5xnNw== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:19:44 -0000 In message <1c1ab22c-60bf-4707-f635-8069aa1e0594@FreeBSD.org>, Bryan Drewery wr ites: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --sIw1a8MPU8obGIEqPMSjxuV84b026de6m > Content-Type: multipart/mixed; boundary="8b3Tlc1Bt9VfscoFw6tX1N8B8aTeGubhr"; > protected-headers="v1" > From: Bryan Drewery > To: Larry Rosenman , Ed Maste , > src-committers@freebsd.org, svn-src-all@freebsd.org, > svn-src-head@freebsd.org, > "freebsd-current@freebsd.org" > Message-ID: <1c1ab22c-60bf-4707-f635-8069aa1e0594@FreeBSD.org> > Subject: Re: svn commit: r318757 - head > References: <201705232025.v4NKPnrH001395@repo.freebsd.org> > > > <145539DE-59B4-4F21-B699-877DED6A2D1C@lerctr.org> > <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> > In-Reply-To: <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> > > --8b3Tlc1Bt9VfscoFw6tX1N8B8aTeGubhr > Content-Type: text/plain; charset=utf-8 > Content-Language: en-US > Content-Transfer-Encoding: quoted-printable > > On 5/23/2017 4:29 PM, Bryan Drewery wrote: > > On 5/23/2017 4:24 PM, Larry Rosenman wrote: > >> borg.lerctr.org /home/ler $ sudo poudriere jail -l > >> JAILNAME VERSION ARCH METHOD TIMESTAMP = > PATH > >> p103amd64 10.3-RELEASE-p18 amd64 http 2017-04-23 08:3= > 9:24 /usr/local/poudriere/jails/p103amd64 > >> p103i386 10.3-RELEASE-p18 i386 http 2017-04-23 08:4= > 0:44 /usr/local/poudriere/jails/p103i386 > >> p110amd64 11.0-RELEASE-p10 amd64 http 2017-05-15 14:5= > 4:58 /usr/local/poudriere/jails/p110amd64 > >> p110i386 11.0-RELEASE-p9 i386 http 2017-04-23 08:4= > 1:48 /usr/local/poudriere/jails/p110i386 > >> live 12.0-CURRENT amd64 src=3D/usr/src 2017-05-23 13= > :39:40 /usr/local/poudriere/jails/live > >> pHEADamd64 12.0-CURRENT amd64 src=3D/usr/src 2017-04-24 17= > :15:13 /usr/local/poudriere/jails/pHEADamd64 > >> p120armv6 12.0-CURRENT r317340 arm.armv6 svn+https 2017-04-23 10:0= > 7:40 /usr/local/poudriere/jails/p110borg.lerctr.org /usr/local/etc/poudri= > ere.d/jails/live $ cat version > >> 12.0-CURRENT > >> borg.lerctr.org /usr/local/etc/poudriere.d/jails/live $armv6 > >> borg.lerctr.org /home/ler $ > >> > >> > >> borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $ c= > at .jailversion > >> 12.0-CURRENT > >> borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $ > >> > >> > >> > >=20 > > That looks like a bug in Poudriere with -m src. It is using 12.0-CURREN= > T > > rather than __FreeBSD_version of 1200031. I'm working on a fix. > >=20 > > Usually Poudriere, for head, will rebuild if the SVN revision changes. > It is very liberal with rebuilds on head and does not usually consider > __FreeBSD_version since it can be forgotten, and historically was not > always bumped on SA/EN either so we used the uname -r output. So this > bug is limited to -m src|null|tar. Hi Bryan, If do you choose to fix this, please provide a facility to override the liberal rebuilds. I for one know when I need to blow away all my package repos and start from scratch, which BTW I commenced with -c this morning after upgrading my poudriere jails. I may update a poudriere jail to address occasional port build failures under 12.0 which are fixed by more recent commits to -CURRENT that don't affect the ABI. Rebuilding packages from scratch is painful. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed May 24 20:25:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFC0DD8024E; Wed, 24 May 2017 20:25:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A15351FD8; Wed, 24 May 2017 20:25:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKPeZN001519; Wed, 24 May 2017 20:25:40 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKPenJ001518; Wed, 24 May 2017 20:25:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705242025.v4OKPenJ001518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 24 May 2017 20:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318807 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:25:41 -0000 Author: asomers Date: Wed May 24 20:25:40 2017 New Revision: 318807 URL: https://svnweb.freebsd.org/changeset/base/318807 Log: MFC r317715: ifconfig displays ND6_IFF_NO_DAD as "IGNORELOOP" PR: 218958 Reviewed by: kristof Differential Revision: https://reviews.freebsd.org/D10543 Modified: stable/11/sbin/ifconfig/af_nd6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/af_nd6.c ============================================================================== --- stable/11/sbin/ifconfig/af_nd6.c Wed May 24 20:13:49 2017 (r318806) +++ stable/11/sbin/ifconfig/af_nd6.c Wed May 24 20:25:40 2017 (r318807) @@ -57,8 +57,7 @@ static const char rcsid[] = #define MAX_SYSCTL_TRY 5 #define ND6BITS "\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \ "\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \ - "\007NO_RADR\010NO_PREFER_IFACE\011IGNORELOOP\012NO_DAD" \ - "\020DEFAULTIF" + "\007NO_RADR\010NO_PREFER_IFACE\011NO_DAD\020DEFAULTIF" static int isnd6defif(int); void setnd6flags(const char *, int, int, const struct afswtch *); From owner-svn-src-all@freebsd.org Wed May 24 20:28:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A26A7D8030F; Wed, 24 May 2017 20:28:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F6801295; Wed, 24 May 2017 20:28:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKSm8b001844; Wed, 24 May 2017 20:28:48 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKSmL3001842; Wed, 24 May 2017 20:28:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242028.v4OKSmL3001842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318808 - in stable/11: share/man/man4 sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:28:49 -0000 Author: np Date: Wed May 24 20:28:48 2017 New Revision: 318808 URL: https://svnweb.freebsd.org/changeset/base/318808 Log: MFC r313318: cxgbe(4): Allow tunables that control the number of queues to be set to '-n' to tell the driver to create _up to_ 'n' queues if enough cores are available. For example, setting hw.cxgbe.nrxq10g="-32" will result in 16 queues if the system has 16 cores, 32 if it has 32. There is no change in the default number of queues of any type. Sponsored by: Chelsio Communications Modified: stable/11/share/man/man4/cxgbe.4 stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/cxgbe.4 ============================================================================== --- stable/11/share/man/man4/cxgbe.4 Wed May 24 20:25:40 2017 (r318807) +++ stable/11/share/man/man4/cxgbe.4 Wed May 24 20:28:48 2017 (r318808) @@ -167,6 +167,10 @@ Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . +There are multiple tunables that control the number of queues of various +types. +A negative value for such a tunable instructs the driver to create +up to that many queues if there are enough CPU cores available. .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g Number of tx queues used for a 10Gb or higher-speed port. Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 20:25:40 2017 (r318807) +++ stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 20:28:48 2017 (r318808) @@ -232,8 +232,8 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Tunables. See tweak_tunables() too. * * Each tunable is set to a default value here if it's known at compile-time. - * Otherwise it is set to -1 as an indication to tweak_tunables() that it should - * provide a reasonable default when the driver is loaded. + * Otherwise it is set to -n as an indication to tweak_tunables() that it should + * provide a reasonable default (upto n) when the driver is loaded. * * Tunables applicable to both T4 and T5 are under hw.cxgbe. Those specific to * T5 are under hw.cxl. @@ -243,27 +243,27 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Number of queues for tx and rx, 10G and 1G, NIC and offload. */ #define NTXQ_10G 16 -int t4_ntxq10g = -1; +int t4_ntxq10g = -NTXQ_10G; TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq10g); #define NRXQ_10G 8 -int t4_nrxq10g = -1; +int t4_nrxq10g = -NRXQ_10G; TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq10g); #define NTXQ_1G 4 -int t4_ntxq1g = -1; +int t4_ntxq1g = -NTXQ_1G; TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1g); #define NRXQ_1G 2 -int t4_nrxq1g = -1; +int t4_nrxq1g = -NRXQ_1G; TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g); #define NTXQ_VI 1 -static int t4_ntxq_vi = -1; +static int t4_ntxq_vi = -NTXQ_VI; TUNABLE_INT("hw.cxgbe.ntxq_vi", &t4_ntxq_vi); #define NRXQ_VI 1 -static int t4_nrxq_vi = -1; +static int t4_nrxq_vi = -NRXQ_VI; TUNABLE_INT("hw.cxgbe.nrxq_vi", &t4_nrxq_vi); static int t4_rsrv_noflowq = 0; @@ -271,37 +271,37 @@ TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4 #ifdef TCP_OFFLOAD #define NOFLDTXQ_10G 8 -static int t4_nofldtxq10g = -1; +static int t4_nofldtxq10g = -NOFLDTXQ_10G; TUNABLE_INT("hw.cxgbe.nofldtxq10g", &t4_nofldtxq10g); #define NOFLDRXQ_10G 2 -static int t4_nofldrxq10g = -1; +static int t4_nofldrxq10g = -NOFLDRXQ_10G; TUNABLE_INT("hw.cxgbe.nofldrxq10g", &t4_nofldrxq10g); #define NOFLDTXQ_1G 2 -static int t4_nofldtxq1g = -1; +static int t4_nofldtxq1g = -NOFLDTXQ_1G; TUNABLE_INT("hw.cxgbe.nofldtxq1g", &t4_nofldtxq1g); #define NOFLDRXQ_1G 1 -static int t4_nofldrxq1g = -1; +static int t4_nofldrxq1g = -NOFLDRXQ_1G; TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g); #define NOFLDTXQ_VI 1 -static int t4_nofldtxq_vi = -1; +static int t4_nofldtxq_vi = -NOFLDTXQ_VI; TUNABLE_INT("hw.cxgbe.nofldtxq_vi", &t4_nofldtxq_vi); #define NOFLDRXQ_VI 1 -static int t4_nofldrxq_vi = -1; +static int t4_nofldrxq_vi = -NOFLDRXQ_VI; TUNABLE_INT("hw.cxgbe.nofldrxq_vi", &t4_nofldrxq_vi); #endif #ifdef DEV_NETMAP #define NNMTXQ_VI 2 -static int t4_nnmtxq_vi = -1; +static int t4_nnmtxq_vi = -NNMTXQ_VI; TUNABLE_INT("hw.cxgbe.nnmtxq_vi", &t4_nnmtxq_vi); #define NNMRXQ_VI 2 -static int t4_nnmrxq_vi = -1; +static int t4_nnmrxq_vi = -NNMRXQ_VI; TUNABLE_INT("hw.cxgbe.nnmrxq_vi", &t4_nnmrxq_vi); #endif @@ -9553,6 +9553,22 @@ uld_active(struct adapter *sc, int uld_i #endif /* + * t = ptr to tunable. + * nc = number of CPUs. + * c = compiled in default for that tunable. + */ +static void +calculate_nqueues(int *t, int nc, const int c) +{ + int nq; + + if (*t > 0) + return; + nq = *t < 0 ? -*t : c; + *t = min(nc, nq); +} + +/* * Come up with reasonable defaults for some of the tunables, provided they're * not set by the user (in which case we'll use the values as is). */ @@ -9565,7 +9581,7 @@ tweak_tunables(void) #ifdef RSS t4_ntxq10g = rss_getnumbuckets(); #else - t4_ntxq10g = min(nc, NTXQ_10G); + calculate_nqueues(&t4_ntxq10g, nc, NTXQ_10G); #endif } @@ -9574,18 +9590,17 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_ntxq1g = rss_getnumbuckets(); #else - t4_ntxq1g = min(nc, NTXQ_1G); + calculate_nqueues(&t4_ntxq1g, nc, NTXQ_1G); #endif } - if (t4_ntxq_vi < 1) - t4_ntxq_vi = min(nc, NTXQ_VI); + calculate_nqueues(&t4_ntxq_vi, nc, NTXQ_VI); if (t4_nrxq10g < 1) { #ifdef RSS t4_nrxq10g = rss_getnumbuckets(); #else - t4_nrxq10g = min(nc, NRXQ_10G); + calculate_nqueues(&t4_nrxq10g, nc, NRXQ_10G); #endif } @@ -9594,31 +9609,19 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_nrxq1g = rss_getnumbuckets(); #else - t4_nrxq1g = min(nc, NRXQ_1G); + calculate_nqueues(&t4_nrxq1g, nc, NRXQ_1G); #endif } - if (t4_nrxq_vi < 1) - t4_nrxq_vi = min(nc, NRXQ_VI); + calculate_nqueues(&t4_nrxq_vi, nc, NRXQ_VI); #ifdef TCP_OFFLOAD - if (t4_nofldtxq10g < 1) - t4_nofldtxq10g = min(nc, NOFLDTXQ_10G); - - if (t4_nofldtxq1g < 1) - t4_nofldtxq1g = min(nc, NOFLDTXQ_1G); - - if (t4_nofldtxq_vi < 1) - t4_nofldtxq_vi = min(nc, NOFLDTXQ_VI); - - if (t4_nofldrxq10g < 1) - t4_nofldrxq10g = min(nc, NOFLDRXQ_10G); - - if (t4_nofldrxq1g < 1) - t4_nofldrxq1g = min(nc, NOFLDRXQ_1G); - - if (t4_nofldrxq_vi < 1) - t4_nofldrxq_vi = min(nc, NOFLDRXQ_VI); + calculate_nqueues(&t4_nofldtxq10g, nc, NOFLDTXQ_10G); + calculate_nqueues(&t4_nofldtxq1g, nc, NOFLDTXQ_1G); + calculate_nqueues(&t4_nofldtxq_vi, nc, NOFLDTXQ_VI); + calculate_nqueues(&t4_nofldrxq10g, nc, NOFLDRXQ_10G); + calculate_nqueues(&t4_nofldrxq1g, nc, NOFLDRXQ_1G); + calculate_nqueues(&t4_nofldrxq_vi, nc, NOFLDRXQ_VI); if (t4_toecaps_allowed == -1) t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; @@ -9645,11 +9648,8 @@ tweak_tunables(void) #endif #ifdef DEV_NETMAP - if (t4_nnmtxq_vi < 1) - t4_nnmtxq_vi = min(nc, NNMTXQ_VI); - - if (t4_nnmrxq_vi < 1) - t4_nnmrxq_vi = min(nc, NNMRXQ_VI); + calculate_nqueues(&t4_nnmtxq_vi, nc, NNMTXQ_VI); + calculate_nqueues(&t4_nnmrxq_vi, nc, NNMRXQ_VI); #endif if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) From owner-svn-src-all@freebsd.org Wed May 24 20:29:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A0E2D8038F; Wed, 24 May 2017 20:29:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 159D31518; Wed, 24 May 2017 20:29:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKTLtW002035; Wed, 24 May 2017 20:29:21 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKTKf4002033; Wed, 24 May 2017 20:29:20 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242029.v4OKTKf4002033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318809 - in stable/10: share/man/man4 sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:29:22 -0000 Author: np Date: Wed May 24 20:29:20 2017 New Revision: 318809 URL: https://svnweb.freebsd.org/changeset/base/318809 Log: MFC r313318: cxgbe(4): Allow tunables that control the number of queues to be set to '-n' to tell the driver to create _up to_ 'n' queues if enough cores are available. For example, setting hw.cxgbe.nrxq10g="-32" will result in 16 queues if the system has 16 cores, 32 if it has 32. There is no change in the default number of queues of any type. Sponsored by: Chelsio Communications Modified: stable/10/share/man/man4/cxgbe.4 stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/cxgbe.4 ============================================================================== --- stable/10/share/man/man4/cxgbe.4 Wed May 24 20:28:48 2017 (r318808) +++ stable/10/share/man/man4/cxgbe.4 Wed May 24 20:29:20 2017 (r318809) @@ -168,6 +168,10 @@ Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . +There are multiple tunables that control the number of queues of various +types. +A negative value for such a tunable instructs the driver to create +up to that many queues if there are enough CPU cores available. .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g Number of tx queues used for a 10Gb or higher-speed port. Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 20:28:48 2017 (r318808) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 20:29:20 2017 (r318809) @@ -221,8 +221,8 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Tunables. See tweak_tunables() too. * * Each tunable is set to a default value here if it's known at compile-time. - * Otherwise it is set to -1 as an indication to tweak_tunables() that it should - * provide a reasonable default when the driver is loaded. + * Otherwise it is set to -n as an indication to tweak_tunables() that it should + * provide a reasonable default (upto n) when the driver is loaded. * * Tunables applicable to both T4 and T5 are under hw.cxgbe. Those specific to * T5 are under hw.cxl. @@ -232,27 +232,27 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Number of queues for tx and rx, 10G and 1G, NIC and offload. */ #define NTXQ_10G 16 -int t4_ntxq10g = -1; +int t4_ntxq10g = -NTXQ_10G; TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq10g); #define NRXQ_10G 8 -int t4_nrxq10g = -1; +int t4_nrxq10g = -NRXQ_10G; TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq10g); #define NTXQ_1G 4 -int t4_ntxq1g = -1; +int t4_ntxq1g = -NTXQ_1G; TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1g); #define NRXQ_1G 2 -int t4_nrxq1g = -1; +int t4_nrxq1g = -NRXQ_1G; TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g); #define NTXQ_VI 1 -static int t4_ntxq_vi = -1; +static int t4_ntxq_vi = -NTXQ_VI; TUNABLE_INT("hw.cxgbe.ntxq_vi", &t4_ntxq_vi); #define NRXQ_VI 1 -static int t4_nrxq_vi = -1; +static int t4_nrxq_vi = -NRXQ_VI; TUNABLE_INT("hw.cxgbe.nrxq_vi", &t4_nrxq_vi); static int t4_rsrv_noflowq = 0; @@ -260,37 +260,37 @@ TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4 #ifdef TCP_OFFLOAD #define NOFLDTXQ_10G 8 -static int t4_nofldtxq10g = -1; +static int t4_nofldtxq10g = -NOFLDTXQ_10G; TUNABLE_INT("hw.cxgbe.nofldtxq10g", &t4_nofldtxq10g); #define NOFLDRXQ_10G 2 -static int t4_nofldrxq10g = -1; +static int t4_nofldrxq10g = -NOFLDRXQ_10G; TUNABLE_INT("hw.cxgbe.nofldrxq10g", &t4_nofldrxq10g); #define NOFLDTXQ_1G 2 -static int t4_nofldtxq1g = -1; +static int t4_nofldtxq1g = -NOFLDTXQ_1G; TUNABLE_INT("hw.cxgbe.nofldtxq1g", &t4_nofldtxq1g); #define NOFLDRXQ_1G 1 -static int t4_nofldrxq1g = -1; +static int t4_nofldrxq1g = -NOFLDRXQ_1G; TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g); #define NOFLDTXQ_VI 1 -static int t4_nofldtxq_vi = -1; +static int t4_nofldtxq_vi = -NOFLDTXQ_VI; TUNABLE_INT("hw.cxgbe.nofldtxq_vi", &t4_nofldtxq_vi); #define NOFLDRXQ_VI 1 -static int t4_nofldrxq_vi = -1; +static int t4_nofldrxq_vi = -NOFLDRXQ_VI; TUNABLE_INT("hw.cxgbe.nofldrxq_vi", &t4_nofldrxq_vi); #endif #ifdef DEV_NETMAP #define NNMTXQ_VI 2 -static int t4_nnmtxq_vi = -1; +static int t4_nnmtxq_vi = -NNMTXQ_VI; TUNABLE_INT("hw.cxgbe.nnmtxq_vi", &t4_nnmtxq_vi); #define NNMRXQ_VI 2 -static int t4_nnmrxq_vi = -1; +static int t4_nnmrxq_vi = -NNMRXQ_VI; TUNABLE_INT("hw.cxgbe.nnmrxq_vi", &t4_nnmrxq_vi); #endif @@ -9408,6 +9408,22 @@ uld_active(struct adapter *sc, int uld_i #endif /* + * t = ptr to tunable. + * nc = number of CPUs. + * c = compiled in default for that tunable. + */ +static void +calculate_nqueues(int *t, int nc, const int c) +{ + int nq; + + if (*t > 0) + return; + nq = *t < 0 ? -*t : c; + *t = min(nc, nq); +} + +/* * Come up with reasonable defaults for some of the tunables, provided they're * not set by the user (in which case we'll use the values as is). */ @@ -9420,7 +9436,7 @@ tweak_tunables(void) #ifdef RSS t4_ntxq10g = rss_getnumbuckets(); #else - t4_ntxq10g = min(nc, NTXQ_10G); + calculate_nqueues(&t4_ntxq10g, nc, NTXQ_10G); #endif } @@ -9429,18 +9445,17 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_ntxq1g = rss_getnumbuckets(); #else - t4_ntxq1g = min(nc, NTXQ_1G); + calculate_nqueues(&t4_ntxq1g, nc, NTXQ_1G); #endif } - if (t4_ntxq_vi < 1) - t4_ntxq_vi = min(nc, NTXQ_VI); + calculate_nqueues(&t4_ntxq_vi, nc, NTXQ_VI); if (t4_nrxq10g < 1) { #ifdef RSS t4_nrxq10g = rss_getnumbuckets(); #else - t4_nrxq10g = min(nc, NRXQ_10G); + calculate_nqueues(&t4_nrxq10g, nc, NRXQ_10G); #endif } @@ -9449,31 +9464,19 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_nrxq1g = rss_getnumbuckets(); #else - t4_nrxq1g = min(nc, NRXQ_1G); + calculate_nqueues(&t4_nrxq1g, nc, NRXQ_1G); #endif } - if (t4_nrxq_vi < 1) - t4_nrxq_vi = min(nc, NRXQ_VI); + calculate_nqueues(&t4_nrxq_vi, nc, NRXQ_VI); #ifdef TCP_OFFLOAD - if (t4_nofldtxq10g < 1) - t4_nofldtxq10g = min(nc, NOFLDTXQ_10G); - - if (t4_nofldtxq1g < 1) - t4_nofldtxq1g = min(nc, NOFLDTXQ_1G); - - if (t4_nofldtxq_vi < 1) - t4_nofldtxq_vi = min(nc, NOFLDTXQ_VI); - - if (t4_nofldrxq10g < 1) - t4_nofldrxq10g = min(nc, NOFLDRXQ_10G); - - if (t4_nofldrxq1g < 1) - t4_nofldrxq1g = min(nc, NOFLDRXQ_1G); - - if (t4_nofldrxq_vi < 1) - t4_nofldrxq_vi = min(nc, NOFLDRXQ_VI); + calculate_nqueues(&t4_nofldtxq10g, nc, NOFLDTXQ_10G); + calculate_nqueues(&t4_nofldtxq1g, nc, NOFLDTXQ_1G); + calculate_nqueues(&t4_nofldtxq_vi, nc, NOFLDTXQ_VI); + calculate_nqueues(&t4_nofldrxq10g, nc, NOFLDRXQ_10G); + calculate_nqueues(&t4_nofldrxq1g, nc, NOFLDRXQ_1G); + calculate_nqueues(&t4_nofldrxq_vi, nc, NOFLDRXQ_VI); if (t4_toecaps_allowed == -1) t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; @@ -9500,11 +9503,8 @@ tweak_tunables(void) #endif #ifdef DEV_NETMAP - if (t4_nnmtxq_vi < 1) - t4_nnmtxq_vi = min(nc, NNMTXQ_VI); - - if (t4_nnmrxq_vi < 1) - t4_nnmrxq_vi = min(nc, NNMRXQ_VI); + calculate_nqueues(&t4_nnmtxq_vi, nc, NNMTXQ_VI); + calculate_nqueues(&t4_nnmrxq_vi, nc, NNMRXQ_VI); #endif if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) From owner-svn-src-all@freebsd.org Wed May 24 20:33:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DA75D8068F; Wed, 24 May 2017 20:33:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DB961A30; Wed, 24 May 2017 20:33:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKXoaS006198; Wed, 24 May 2017 20:33:50 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKXn3B006197; Wed, 24 May 2017 20:33:49 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242033.v4OKXn3B006197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318810 - in stable/11/release: . tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:33:51 -0000 Author: np Date: Wed May 24 20:33:49 2017 New Revision: 318810 URL: https://svnweb.freebsd.org/changeset/base/318810 Log: MFC r307008: Add the ability to override the size of the swap partition when building VM images. The default continues to be 1G. Sponsored by: Chelsio Communications Modified: stable/11/release/Makefile.vm stable/11/release/tools/vmimage.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/release/Makefile.vm ============================================================================== --- stable/11/release/Makefile.vm Wed May 24 20:29:20 2017 (r318809) +++ stable/11/release/Makefile.vm Wed May 24 20:33:49 2017 (r318810) @@ -8,6 +8,7 @@ VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G +SWAPSIZE?= 1G VMBASE?= vm VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image Modified: stable/11/release/tools/vmimage.subr ============================================================================== --- stable/11/release/tools/vmimage.subr Wed May 24 20:29:20 2017 (r318809) +++ stable/11/release/tools/vmimage.subr Wed May 24 20:33:49 2017 (r318810) @@ -11,7 +11,7 @@ trap "cleanup" INT QUIT TRAP ABRT TERM write_partition_layout() { if [ -z "${NOSWAP}" ]; then - SWAPOPT="-p freebsd-swap/swapfs::1G" + SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" fi _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" From owner-svn-src-all@freebsd.org Wed May 24 20:34:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F23AD806ED; Wed, 24 May 2017 20:34:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F43B1B8F; Wed, 24 May 2017 20:34:20 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKYKUM006264; Wed, 24 May 2017 20:34:20 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKYJgQ006262; Wed, 24 May 2017 20:34:19 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242034.v4OKYJgQ006262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318811 - in stable/10/release: . tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:34:21 -0000 Author: np Date: Wed May 24 20:34:19 2017 New Revision: 318811 URL: https://svnweb.freebsd.org/changeset/base/318811 Log: MFC r307008: Add the ability to override the size of the swap partition when building VM images. The default continues to be 1G. Sponsored by: Chelsio Communications Modified: stable/10/release/Makefile.vm stable/10/release/tools/vmimage.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile.vm ============================================================================== --- stable/10/release/Makefile.vm Wed May 24 20:33:49 2017 (r318810) +++ stable/10/release/Makefile.vm Wed May 24 20:34:19 2017 (r318811) @@ -8,6 +8,7 @@ VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G +SWAPSIZE?= 1G VMBASE?= vm VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image Modified: stable/10/release/tools/vmimage.subr ============================================================================== --- stable/10/release/tools/vmimage.subr Wed May 24 20:33:49 2017 (r318810) +++ stable/10/release/tools/vmimage.subr Wed May 24 20:34:19 2017 (r318811) @@ -11,7 +11,7 @@ trap "cleanup" INT QUIT TRAP ABRT TERM write_partition_layout() { if [ -z "${NOSWAP}" ]; then - SWAPOPT="-p freebsd-swap/swapfs::1G" + SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" fi _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" From owner-svn-src-all@freebsd.org Wed May 24 20:37:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24FEAD807C2; Wed, 24 May 2017 20:37:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EAABC1D33; Wed, 24 May 2017 20:37:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id D897D56C1; Wed, 24 May 2017 20:37:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 9D0C972EE; Wed, 24 May 2017 20:37:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id iEtasI4ylVsa; Wed, 24 May 2017 20:37:18 +0000 (UTC) Subject: Re: svn commit: r318757 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com C933B72E8 To: Cy Schubert References: <201705242017.v4OKHFbC030278@slippy.cwsent.com> Cc: Larry Rosenman , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" From: Bryan Drewery Organization: FreeBSD Message-ID: <939f7ce1-b6f0-2ca1-5d83-da100b5727e5@FreeBSD.org> Date: Wed, 24 May 2017 13:37:01 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201705242017.v4OKHFbC030278@slippy.cwsent.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JCUPfB24pL7cutbBkXanSp027BebBqLE2" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:37:26 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JCUPfB24pL7cutbBkXanSp027BebBqLE2 Content-Type: multipart/mixed; boundary="j5V9ka7PD7rxapig3ihA8RJkqXjxWaDSH"; protected-headers="v1" From: Bryan Drewery To: Cy Schubert Cc: Larry Rosenman , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-current@freebsd.org" Message-ID: <939f7ce1-b6f0-2ca1-5d83-da100b5727e5@FreeBSD.org> Subject: Re: svn commit: r318757 - head References: <201705242017.v4OKHFbC030278@slippy.cwsent.com> In-Reply-To: <201705242017.v4OKHFbC030278@slippy.cwsent.com> --j5V9ka7PD7rxapig3ihA8RJkqXjxWaDSH Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 5/24/17 1:17 PM, Cy Schubert wrote: > In message <1c1ab22c-60bf-4707-f635-8069aa1e0594@FreeBSD.org>, Bryan=20 > Drewery wr > ites: >> This is an OpenPGP/MIME signed message (RFC 4880 and 3156) >> --sIw1a8MPU8obGIEqPMSjxuV84b026de6m >> Content-Type: multipart/mixed; boundary=3D"8b3Tlc1Bt9VfscoFw6tX1N8B8aT= eGubhr"; >> protected-headers=3D"v1" >> From: Bryan Drewery >> To: Larry Rosenman , Ed Maste , >> src-committers@freebsd.org, svn-src-all@freebsd.org, >> svn-src-head@freebsd.org, >> "freebsd-current@freebsd.org" >> Message-ID: <1c1ab22c-60bf-4707-f635-8069aa1e0594@FreeBSD.org> >> Subject: Re: svn commit: r318757 - head >> References: <201705232025.v4NKPnrH001395@repo.freebsd.org> >> >> >> <145539DE-59B4-4F21-B699-877DED6A2D1C@lerctr.org> >> <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> >> In-Reply-To: <4fe6fbf4-03e4-804d-784a-67283ed9efd0@FreeBSD.org> >> >> --8b3Tlc1Bt9VfscoFw6tX1N8B8aTeGubhr >> Content-Type: text/plain; charset=3Dutf-8 >> Content-Language: en-US >> Content-Transfer-Encoding: quoted-printable >> >> On 5/23/2017 4:29 PM, Bryan Drewery wrote: >>> On 5/23/2017 4:24 PM, Larry Rosenman wrote: >>>> borg.lerctr.org /home/ler $ sudo poudriere jail -l >>>> JAILNAME VERSION ARCH METHOD TIMESTAMP = =3D >> PATH >>>> p103amd64 10.3-RELEASE-p18 amd64 http 2017-04-23 08= :3=3D >> 9:24 /usr/local/poudriere/jails/p103amd64 >>>> p103i386 10.3-RELEASE-p18 i386 http 2017-04-23 08= :4=3D >> 0:44 /usr/local/poudriere/jails/p103i386 >>>> p110amd64 11.0-RELEASE-p10 amd64 http 2017-05-15 14= :5=3D >> 4:58 /usr/local/poudriere/jails/p110amd64 >>>> p110i386 11.0-RELEASE-p9 i386 http 2017-04-23 08= :4=3D >> 1:48 /usr/local/poudriere/jails/p110i386 >>>> live 12.0-CURRENT amd64 src=3D3D/usr/src 2017-05-2= 3 13=3D >> :39:40 /usr/local/poudriere/jails/live >>>> pHEADamd64 12.0-CURRENT amd64 src=3D3D/usr/src 2017-04-2= 4 17=3D >> :15:13 /usr/local/poudriere/jails/pHEADamd64 >>>> p120armv6 12.0-CURRENT r317340 arm.armv6 svn+https 2017-04-23 10= :0=3D >> 7:40 /usr/local/poudriere/jails/p110borg.lerctr.org /usr/local/etc/pou= dri=3D >> ere.d/jails/live $ cat version >>>> 12.0-CURRENT >>>> borg.lerctr.org /usr/local/etc/poudriere.d/jails/live $armv6 >>>> borg.lerctr.org /home/ler $ >>>> >>>> >>>> borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $= c=3D >> at .jailversion >>>> 12.0-CURRENT >>>> borg.lerctr.org /usr/local/poudriere/data/packages/live-host-ports $= >>>> >>>> >>>> >>> =3D20 >>> That looks like a bug in Poudriere with -m src. It is using 12.0-CURR= EN=3D >> T >>> rather than __FreeBSD_version of 1200031. I'm working on a fix. >>> =3D20 >> >> Usually Poudriere, for head, will rebuild if the SVN revision changes.= >> It is very liberal with rebuilds on head and does not usually consider= >> __FreeBSD_version since it can be forgotten, and historically was not >> always bumped on SA/EN either so we used the uname -r output. So this= >> bug is limited to -m src|null|tar. >=20 > Hi Bryan, >=20 > If do you choose to fix this, please provide a facility to override the= =20 > liberal rebuilds. I for one know when I need to blow away all my packag= e=20 > repos and start from scratch, which BTW I commenced with -c this mornin= g=20 > after upgrading my poudriere jails. I may update a poudriere jail to=20 > address occasional port build failures under 12.0 which are fixed by mo= re=20 > recent commits to -CURRENT that don't affect the ABI. >=20 > Rebuilding packages from scratch is painful. >=20 >=20 Agreed, it is painful. I came up with an idea to reduce the massive rebuild needs on arch@ a few years ago. I just haven't had a chance to implement it. https://lists.freebsd.org/pipermail/freebsd-arch/2015-April/017025.html --=20 Regards, Bryan Drewery --j5V9ka7PD7rxapig3ihA8RJkqXjxWaDSH-- --JCUPfB24pL7cutbBkXanSp027BebBqLE2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJZJe7uAAoJEDXXcbtuRpfPpC4IAI0/ODHDGqXlGj9qXiqmLcJR mvtzCrepymiwwy/2nC5jfv00oD8Q/e2RIzjiHjvpusl/Em9ETh4vm47CbyYnW0PE ZnzK7hMQeeptuK3V2IeJzrPV3dw0MFImSyBCVpv5IMSdE8qQIBQGX/z+qS3YR9PA IEPQcjODbEp2GIWQTh7Boe6z79fEu5hYOYHHPLt4NHGqOB0YkHVYlsEtSnQ5BLhy xWBKZqq2Ge6npoowGPiM26l0lGA4tqAy9UpOZNoiCpz1PQN7QRNfqdX7Rk4d7zuu 9R7BvAtxHZ/7k06xC/JJw7BPiOw1PXYMOP9XVB50358UnH/hhwrsmjq7oRKFu5k= =/s3v -----END PGP SIGNATURE----- --JCUPfB24pL7cutbBkXanSp027BebBqLE2-- From owner-svn-src-all@freebsd.org Wed May 24 20:41:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04343D80A46; Wed, 24 May 2017 20:41:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A46C41383; Wed, 24 May 2017 20:41:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKfQpj009392; Wed, 24 May 2017 20:41:26 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKfQeW009391; Wed, 24 May 2017 20:41:26 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242041.v4OKfQeW009391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 20:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318812 - head/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:41:28 -0000 Author: avg Date: Wed May 24 20:41:26 2017 New Revision: 318812 URL: https://svnweb.freebsd.org/changeset/base/318812 Log: MFV r316860: 7545 zdb should disable reference tracking illumos/illumos-gate@4dd77f9e38ef05b39db128ff7608d926fd3218c6 https://github.com/illumos/illumos-gate/commit/4dd77f9e38ef05b39db128ff7608d926fd3218c6 https://www.illumos.org/issues/7545 When evicting from the ARC, we manipulate some refcount_t's, e.g. arcs_size. When using zdb to examine a large amount of data (e.g. zdb -bb on a large pool with small blocks), the ARC may have a large number of entries. If reference tracking is enabled, there will be ~1 reference for each block in the ARC. When evicting, we decrement the refcount and have to search all the references to find the one that we are removing, which is very slow. Since zdb is typically used to find problems with the on-disk format, and not with the code it is running, we should disable reference tracking in zdb. Reviewed by: Dan Kimmel Reviewed by: Steve Gonczi Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed May 24 20:34:19 2017 (r318811) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed May 24 20:41:26 2017 (r318812) @@ -75,10 +75,12 @@ DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES)) #ifndef lint +extern int reference_tracking_enable; extern boolean_t zfs_recover; extern uint64_t zfs_arc_max, zfs_arc_meta_limit; extern int zfs_vdev_async_read_max_active; #else +int reference_tracking_enable; boolean_t zfs_recover; uint64_t zfs_arc_max, zfs_arc_meta_limit; int zfs_vdev_async_read_max_active; @@ -3696,6 +3698,11 @@ main(int argc, char **argv) */ zfs_vdev_async_read_max_active = 10; + /* + * Disable reference tracking for better performance. + */ + reference_tracking_enable = B_FALSE; + kernel_init(FREAD); g_zfs = libzfs_init(); if (g_zfs == NULL) From owner-svn-src-all@freebsd.org Wed May 24 20:52:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39F4DD7C02F; Wed, 24 May 2017 20:52:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16FE11FC3; Wed, 24 May 2017 20:52:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKqmj6014699; Wed, 24 May 2017 20:52:48 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKqlBD014694; Wed, 24 May 2017 20:52:47 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705242052.v4OKqlBD014694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 24 May 2017 20:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318813 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:52:49 -0000 Author: asomers Date: Wed May 24 20:52:47 2017 New Revision: 318813 URL: https://svnweb.freebsd.org/changeset/base/318813 Log: MFC r317755, r317758 r317755: Various Coverity fixes in ifconfig(8) * Exit early if kldload(2) fails (1011259). This is the only change that affects ifconfig's behavior. * Close memory and resource leaks (1305624, 1305205, 1007100) * Mark usage() as _Noreturn (1305806, 1305750) * Fix some dereference after null checks (1011474, 270774) Reported by: Coverity CID: 1305624, 1305205, 1007100, 1305806, 1305750, 1011474, CID: 270774, 1011259 Reviewed by: cem Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10587 r317758: Unbreak ifconfig for mlx4en(4) after r317755 ifconfig doesn't correctly infer mlx interfaces' module names, so it will attempt to load the mlx(4) module even when not necessary. Reported by: rstone X-MFC-With: 317755 Sponsored by: Spectra Logic Corp Modified: stable/11/sbin/ifconfig/af_inet6.c stable/11/sbin/ifconfig/ifclone.c stable/11/sbin/ifconfig/ifconfig.c stable/11/sbin/ifconfig/iflagg.c stable/11/sbin/ifconfig/ifpfsync.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/11/sbin/ifconfig/af_inet6.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/af_inet6.c Wed May 24 20:52:47 2017 (r318813) @@ -349,12 +349,14 @@ in6_getaddr(const char *s, int which) bzero(&hints, sizeof(struct addrinfo)); hints.ai_family = AF_INET6; error = getaddrinfo(s, NULL, &hints, &res); + if (error != 0) { + if (inet_pton(AF_INET6, s, &sin->sin6_addr) != 1) + errx(1, "%s: bad value", s); + } else { + bcopy(res->ai_addr, sin, res->ai_addrlen); + freeaddrinfo(res); + } } - if (error != 0) { - if (inet_pton(AF_INET6, s, &sin->sin6_addr) != 1) - errx(1, "%s: bad value", s); - } else - bcopy(res->ai_addr, sin, res->ai_addrlen); } static int Modified: stable/11/sbin/ifconfig/ifclone.c ============================================================================== --- stable/11/sbin/ifconfig/ifclone.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/ifclone.c Wed May 24 20:52:47 2017 (r318813) @@ -87,6 +87,7 @@ list_cloners(void) putchar('\n'); free(buf); + close(s); } struct clone_defcb { Modified: stable/11/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/11/sbin/ifconfig/ifconfig.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/ifconfig.c Wed May 24 20:52:47 2017 (r318813) @@ -106,7 +106,7 @@ static int ifconfig(int argc, char *cons static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl, struct ifaddrs *ifa); static void tunnel_status(int s); -static void usage(void); +static void usage(void) _Noreturn; static struct afswtch *af_getbyname(const char *name); static struct afswtch *af_getbyfamily(int af); @@ -802,26 +802,24 @@ top: */ p = (setaddr ? &setifdstaddr_cmd : &setifaddr_cmd); } - if (p->c_u.c_func || p->c_u.c_func2) { - if (p->c_parameter == NEXTARG) { - if (argv[1] == NULL) - errx(1, "'%s' requires argument", - p->c_name); - p->c_u.c_func(argv[1], 0, s, afp); + if (p->c_parameter == NEXTARG && p->c_u.c_func) { + if (argv[1] == NULL) + errx(1, "'%s' requires argument", + p->c_name); + p->c_u.c_func(argv[1], 0, s, afp); + argc--, argv++; + } else if (p->c_parameter == OPTARG && p->c_u.c_func) { + p->c_u.c_func(argv[1], 0, s, afp); + if (argv[1] != NULL) argc--, argv++; - } else if (p->c_parameter == OPTARG) { - p->c_u.c_func(argv[1], 0, s, afp); - if (argv[1] != NULL) - argc--, argv++; - } else if (p->c_parameter == NEXTARG2) { - if (argc < 3) - errx(1, "'%s' requires 2 arguments", - p->c_name); - p->c_u.c_func2(argv[1], argv[2], s, afp); - argc -= 2, argv += 2; - } else - p->c_u.c_func(*argv, p->c_parameter, s, afp); - } + } else if (p->c_parameter == NEXTARG2 && p->c_u.c_func2) { + if (argc < 3) + errx(1, "'%s' requires 2 arguments", + p->c_name); + p->c_u.c_func2(argv[1], argv[2], s, afp); + argc -= 2, argv += 2; + } else if (p->c_u.c_func) + p->c_u.c_func(*argv, p->c_parameter, s, afp); argc--, argv++; } @@ -1297,8 +1295,8 @@ printb(const char *s, unsigned v, const printf("%s=%o", s, v); else printf("%s=%x", s, v); - bits++; if (bits) { + bits++; putchar('<'); while ((i = *bits++) != '\0') { if (v & (1 << (i-1))) { @@ -1376,8 +1374,11 @@ ifmaybeload(const char *name) } } - /* not present, we should try to load it */ - kldload(ifkind); + /* + * Try to load the module. But ignore failures, because ifconfig can't + * infer the names of all drivers (eg mlx4en(4)). + */ + (void) kldload(ifkind); } static struct cmd basic_cmds[] = { Modified: stable/11/sbin/ifconfig/iflagg.c ============================================================================== --- stable/11/sbin/ifconfig/iflagg.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/iflagg.c Wed May 24 20:52:47 2017 (r318813) @@ -200,24 +200,17 @@ static void lagg_status(int s) { struct lagg_protos lpr[] = LAGG_PROTOS; - struct lagg_reqport rp, rpbuf[LAGG_MAX_PORTS]; + struct lagg_reqport rpbuf[LAGG_MAX_PORTS]; struct lagg_reqall ra; struct lagg_reqopts ro; struct lagg_reqflags rf; struct lacp_opreq *lp; const char *proto = ""; - int i, isport = 0; + int i; - bzero(&rp, sizeof(rp)); bzero(&ra, sizeof(ra)); bzero(&ro, sizeof(ro)); - strlcpy(rp.rp_ifname, name, sizeof(rp.rp_ifname)); - strlcpy(rp.rp_portname, name, sizeof(rp.rp_portname)); - - if (ioctl(s, SIOCGLAGGPORT, &rp) == 0) - isport = 1; - strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname)); ra.ra_size = sizeof(rpbuf); ra.ra_port = rpbuf; @@ -257,8 +250,6 @@ lagg_status(int s) sep = ","; } } - if (isport) - printf(" laggdev %s", rp.rp_ifname); putchar('\n'); if (verbose) { printf("\tlagg options:\n"); Modified: stable/11/sbin/ifconfig/ifpfsync.c ============================================================================== --- stable/11/sbin/ifconfig/ifpfsync.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/ifpfsync.c Wed May 24 20:52:47 2017 (r318813) @@ -120,6 +120,7 @@ setpfsync_syncpeer(const char *val, int if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1) err(1, "SIOCSETPFSYNC"); + freeaddrinfo(peerres); } /* ARGSUSED */ From owner-svn-src-all@freebsd.org Wed May 24 20:53:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8A9AD7C085; Wed, 24 May 2017 20:53:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8F2910D0; Wed, 24 May 2017 20:53:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKr1jt014753; Wed, 24 May 2017 20:53:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKr1hK014752; Wed, 24 May 2017 20:53:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242053.v4OKr1hK014752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 20:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318814 - head/cddl/contrib/opensolaris/lib/libzfs_core/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:53:03 -0000 Author: avg Date: Wed May 24 20:53:01 2017 New Revision: 318814 URL: https://svnweb.freebsd.org/changeset/base/318814 Log: MFC r316904: 7729 libzfs_core`lzc_rollback() leaks result nvl illumos/illumos-gate@ac428481f96be89add7a1edf43ae47dd71038553 https://github.com/illumos/illumos-gate/commit/ac428481f96be89add7a1edf43ae47dd71038553 https://www.illumos.org/issues/7729 libzfs_core`lzc_rollback() doesn't free the result nvl after lzc_ioctl() call. Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Approved by: Dan McDonald Author: Yuri Pankov MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Wed May 24 20:52:47 2017 (r318813) +++ head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Wed May 24 20:53:01 2017 (r318814) @@ -759,6 +759,8 @@ lzc_rollback(const char *fsname, char *s const char *snapname = fnvlist_lookup_string(result, "target"); (void) strlcpy(snapnamebuf, snapname, snapnamelen); } + nvlist_free(result); + return (err); } From owner-svn-src-all@freebsd.org Wed May 24 20:54:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F185D7C156; Wed, 24 May 2017 20:54:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F492139B; Wed, 24 May 2017 20:54:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKsE3L014875; Wed, 24 May 2017 20:54:14 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKsEqY014874; Wed, 24 May 2017 20:54:14 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242054.v4OKsEqY014874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318815 - stable/11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:54:15 -0000 Author: np Date: Wed May 24 20:54:14 2017 New Revision: 318815 URL: https://svnweb.freebsd.org/changeset/base/318815 Log: MFC r307380: Fix typo in comments. Modified: stable/11/sys/sys/mbuf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/mbuf.h ============================================================================== --- stable/11/sys/sys/mbuf.h Wed May 24 20:53:01 2017 (r318814) +++ stable/11/sys/sys/mbuf.h Wed May 24 20:54:14 2017 (r318815) @@ -334,7 +334,7 @@ struct mbuf { #define M_HASHTYPE_RSS_TCP_IPV6 M_HASHTYPE_HASH(4) /* TCPv6 4-tuple */ #define M_HASHTYPE_RSS_IPV6_EX M_HASHTYPE_HASH(5) /* IPv6 2-tuple + * ext hdrs */ -#define M_HASHTYPE_RSS_TCP_IPV6_EX M_HASHTYPE_HASH(6) /* TCPv6 4-tiple + +#define M_HASHTYPE_RSS_TCP_IPV6_EX M_HASHTYPE_HASH(6) /* TCPv6 4-tuple + * ext hdrs */ /* Non-standard RSS hash types */ #define M_HASHTYPE_RSS_UDP_IPV4 M_HASHTYPE_HASH(7) /* IPv4 UDP 4-tuple*/ From owner-svn-src-all@freebsd.org Wed May 24 21:02:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A32ED7C401; Wed, 24 May 2017 21:02:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E98261905; Wed, 24 May 2017 21:02:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OL2seI019344; Wed, 24 May 2017 21:02:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OL2sn1019335; Wed, 24 May 2017 21:02:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705242102.v4OL2sn1019335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 24 May 2017 21:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318816 - in head: lib/lib80211 lib/libc/net lib/libc/sys lib/libpmc share/man/man4 share/man/man7 usr.sbin/pmcstudy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:02:56 -0000 Author: trasz Date: Wed May 24 21:02:53 2017 New Revision: 318816 URL: https://svnweb.freebsd.org/changeset/base/318816 Log: Don't end up manpage titles with a full stop. MFC after: 2 weeks Modified: head/lib/lib80211/lib80211.3 head/lib/libc/net/sctp_bindx.3 head/lib/libc/net/sctp_getassocid.3 head/lib/libc/sys/setfib.2 head/lib/libpmc/pmc_event_names_of_class.3 head/share/man/man4/mmcsd.4 head/share/man/man7/growfs.7 head/usr.sbin/pmcstudy/pmcstudy.8 Modified: head/lib/lib80211/lib80211.3 ============================================================================== --- head/lib/lib80211/lib80211.3 Wed May 24 20:54:14 2017 (r318815) +++ head/lib/lib80211/lib80211.3 Wed May 24 21:02:53 2017 (r318816) @@ -36,7 +36,7 @@ .Nm lib80211_regdomain_findbyname , .Nm lib80211_country_findbycc , .Nm lib80211_country_findbyname -.Nd manage net80211 configuration and regulatory database. +.Nd manage net80211 configuration and regulatory database .Sh LIBRARY .Lb lib80211 .Sh SYNOPSIS Modified: head/lib/libc/net/sctp_bindx.3 ============================================================================== --- head/lib/libc/net/sctp_bindx.3 Wed May 24 20:54:14 2017 (r318815) +++ head/lib/libc/net/sctp_bindx.3 Wed May 24 21:02:53 2017 (r318816) @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm sctp_bindx -.Nd bind or unbind an SCTP socket to a list of addresses. +.Nd bind or unbind an SCTP socket to a list of addresses .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: head/lib/libc/net/sctp_getassocid.3 ============================================================================== --- head/lib/libc/net/sctp_getassocid.3 Wed May 24 20:54:14 2017 (r318815) +++ head/lib/libc/net/sctp_getassocid.3 Wed May 24 21:02:53 2017 (r318816) @@ -32,7 +32,7 @@ .Os .Sh NAME .Nm sctp_getassocid -.Nd return an association id for a specified socket address. +.Nd return an association id for a specified socket address .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: head/lib/libc/sys/setfib.2 ============================================================================== --- head/lib/libc/sys/setfib.2 Wed May 24 20:54:14 2017 (r318815) +++ head/lib/libc/sys/setfib.2 Wed May 24 21:02:53 2017 (r318816) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm setfib -.Nd set the default FIB (routing table) for the calling process. +.Nd set the default FIB (routing table) for the calling process .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: head/lib/libpmc/pmc_event_names_of_class.3 ============================================================================== --- head/lib/libpmc/pmc_event_names_of_class.3 Wed May 24 20:54:14 2017 (r318815) +++ head/lib/libpmc/pmc_event_names_of_class.3 Wed May 24 21:02:53 2017 (r318816) @@ -28,7 +28,7 @@ .Os .Sh NAME .Nm pmc_event_names_of_class -.Nd return a list of event names supported by a PMC class. +.Nd return a list of event names supported by a PMC class .Sh LIBRARY .Lb libpmc .Sh SYNOPSIS Modified: head/share/man/man4/mmcsd.4 ============================================================================== --- head/share/man/man4/mmcsd.4 Wed May 24 20:54:14 2017 (r318815) +++ head/share/man/man4/mmcsd.4 Wed May 24 21:02:53 2017 (r318816) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm mmcsd -.Nd MMC and SD memory card driver. +.Nd MMC and SD memory card driver .Sh SYNOPSIS .Cd device mmcsd .Sh DESCRIPTION Modified: head/share/man/man7/growfs.7 ============================================================================== --- head/share/man/man7/growfs.7 Wed May 24 20:54:14 2017 (r318815) +++ head/share/man/man7/growfs.7 Wed May 24 21:02:53 2017 (r318816) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm growfs -.Nd start up script to grow the root file-system. +.Nd start up script to grow the root file-system .Sh DESCRIPTION The following options in .Pa /etc/rc.conf Modified: head/usr.sbin/pmcstudy/pmcstudy.8 ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.8 Wed May 24 20:54:14 2017 (r318815) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Wed May 24 21:02:53 2017 (r318816) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm pmcstudy -.Nd Perform various studies on a system's overall PMCs. +.Nd Perform various studies on a system's overall PMCs .Sh SYNOPSIS .Nm .Oo Fl i Ar inputfile | Fl A | Fl T | Fl v | Fl m Ar max | Fl e exp | Fl Ar E | Fl h | fl H Oc From owner-svn-src-all@freebsd.org Wed May 24 21:08:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90B0AD7C512; Wed, 24 May 2017 21:08:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE1B1B3D; Wed, 24 May 2017 21:08:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id u26so34587908pfd.2; Wed, 24 May 2017 14:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=tsG1TSiRKkxSvvT1JDbkdhop+oJyZgeP6OxK//dZxiU=; b=Yk3M+ChvVl8+SlF5yve0Hal6Gzq6ofdNtMbIDWVAa6mDOOAkniAK45xwpBX0kh459f pWA2IDUYqcPkziok5H2RF8ETS/hdXa2GU5+cZd0oIPL2yGPou4zgING02mL5vXMUWFvb lKnaKDsbbUaxuI1mjxEOOi6oWSRo2hX193FqDJ4MqU1OI6nLkuJi56LBhjMA02s6J04F 6QOSJniwJQFaQigr9mgH+kxcqWrFO2Kawe1b0MOrSQKJlpPU0SJR41UuaxMu8z6/rsGs AgkITy0wuA80MQMck3dupvVWz7BEZ9ud7za8Fe3/WzxiaFNGmtisJED/YRqj4hhmUJ8P lw4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=tsG1TSiRKkxSvvT1JDbkdhop+oJyZgeP6OxK//dZxiU=; b=FL7iQjRVoNVynUS1HHgN1PThQInQ+0ScoFb+VSVrtgB+VUA3aE8qD1OR9Lfay6W5z5 gXDF9HBaaCNPWqB+A6pADX5rnrT20mkLVV78LCiI+LtyG0X6lLIWg6MTxDQMFgPfM+AZ 97vOgMDs/MwDenk22koKvf6MmcGGZ6gh0JWKzudCtCv5ogEOOLCvW9ab+xQJIKioiRNp sHPW38F/OWGaSJmVdMly029/WSxu92fZI4KhYcO5m96btp6dmydOkZa1nbFyxkQAD9eA NvmbW95brBhupwq75jxht7nTy4ClOmRbWZiPYawdwBQ2NsT38VGOr5IMlbyHmTr0YWa0 olLA== X-Gm-Message-State: AODbwcA4OhVU+8ThQ0kbiaH8VJU6nQEux1H43PoAG4YJubOYyb+hC0km Uc3gScHO4x2uVGknGQ8= X-Received: by 10.84.194.34 with SMTP id g31mr8257455pld.89.1495660106472; Wed, 24 May 2017 14:08:26 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id r73sm8680488pfk.114.2017.05.24.14.08.25 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 14:08:25 -0700 (PDT) Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D41F78AE-185C-4C04-A79F-65D75918BEC6"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 24 May 2017 14:08:24 -0700 Cc: Pedro Giffuni , Konstantin Belousov , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <201705230929.v4N9T5g1028124@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:08:27 -0000 --Apple-Mail=_D41F78AE-185C-4C04-A79F-65D75918BEC6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 24, 2017, at 09:26, Ed Maste wrote: >=20 > On 24 May 2017 at 10:53, Pedro Giffuni wrote: >>=20 >> There is now a bunch of coverity issues (OVERFLOW_BEFORE_WIDEN = mostly) >> tied to ino64_t. At least the following CIDs are related: >=20 > On a quick look the OVERFLOW_BEFORE_WIDEN issues are false positives > in practice: for correct operation the product must fit within 32 > bits, because inodes were previously 32 bits. However, it does seem > unusual to perform a multiplication with types that could overflow 32 > bits, and then store the result in a 64-bit variable. So it seems that > a code change to eliminate the warning is likely reasonable. Wouldn=E2=80=99t the proper fix be: - Check the inode value for overflow? - Cast to the smaller historical value? Or: - Widen the type for the smaller historical value to a larger value? Thanks, -Ngie PS I=E2=80=99d have to see how we fixed this internally at Isilon. We = might have a patch kicking around for this. --Apple-Mail=_D41F78AE-185C-4C04-A79F-65D75918BEC6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZJfZIAAoJEPWDqSZpMIYV7WsQAKz+vRLrXUUO8eWBRebNOBv6 YBhGZpNNUdWdS++LaOJONt/zKT+ShvtgDWCtosQ7U0Kx1N/ePnQfhSUrWIGSPvMK dBNpa80oScDvU24aEBaw+lOpfImKWgxkKK8Bd5QSjzorY9PPe6pde9kypr8RduCQ MPbC4a9rn4PLYqWdMJWFeWii8oonQToOo6Jlv5SdorkcpSp8KfkP1wfrgcorsS25 +ef29047NMG91Fj5PmLf9tc5znTuBap059ZAohvbVwP5BheJ4bntx36a3FDPacxf sOhshfEi+RuR1lDdOh/VP59Ek8Kt//1k0sNPemc7DnG+4OnISBm+nBUd3VIB/2cU r7q19CeU0rwBIjTygSuaE8G0vdQrTXb660l7BT5X02NK4Cgzw24NR1USmau1FkUt FXLbGEMu+wOS2nElHuaZ4PnRSuImPIpvIVbs+2lgCX6YWavPRVJn/5Jaxy+3MiHl zRqKc+PDpo1H0rIZ2qkAFd+uRdcVkp63lUP9ZGlqaDe2ikxW4VhU004Ul7sf9tVN 11nMCx1clGTh3B99R480iByuGiHS3eJmTAmxxwY9zJH61I4k1QW8n77YVIhYCwUN LQi8N3gz9GocX8VjhbfT5XiIFfFn8pX1DtNNy+GmbeBJcIv88xs7aFN9uTuwvY1K Di0zg1Cv8fpv+5q7O//y =9lgE -----END PGP SIGNATURE----- --Apple-Mail=_D41F78AE-185C-4C04-A79F-65D75918BEC6-- From owner-svn-src-all@freebsd.org Wed May 24 21:18:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4BDDD7C772; Wed, 24 May 2017 21:18:14 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C6F81FF2; Wed, 24 May 2017 21:18:14 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLIDXx023535; Wed, 24 May 2017 21:18:13 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLIDZs023534; Wed, 24 May 2017 21:18:13 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705242118.v4OLIDZs023534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 24 May 2017 21:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318817 - stable/11/sbin/camcontrol X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:18:14 -0000 Author: asomers Date: Wed May 24 21:18:13 2017 New Revision: 318817 URL: https://svnweb.freebsd.org/changeset/base/318817 Log: MFC r317759: Fix memory leaks in camcontrol Reported by: Coverity CID: 1331674, 1331675 Reviewed by: ken Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10588 Modified: stable/11/sbin/camcontrol/fwdownload.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/fwdownload.c ============================================================================== --- stable/11/sbin/camcontrol/fwdownload.c Wed May 24 21:02:53 2017 (r318816) +++ stable/11/sbin/camcontrol/fwdownload.c Wed May 24 21:18:13 2017 (r318817) @@ -550,8 +550,7 @@ fw_validate_ibm(struct cam_device *dev, fprintf(stdout, "Firmware file is valid for this drive.\n"); retval = 0; bailout: - if (ccb != NULL) - cam_freeccb(ccb); + cam_freeccb(ccb); return (retval); } @@ -753,8 +752,8 @@ fw_check_device_ready(struct cam_device goto bailout; } bailout: - if (ccb != NULL) - cam_freeccb(ccb); + free(ptr); + cam_freeccb(ccb); return (retval); } @@ -913,8 +912,7 @@ fw_download_img(struct cam_device *cam_d bailout: if (quiet == 0) progress_complete(&progress, size - img_size); - if (ccb != NULL) - cam_freeccb(ccb); + cam_freeccb(ccb); return (retval); } @@ -923,6 +921,7 @@ fwdownload(struct cam_device *device, in char *combinedopt, int printerrors, int task_attr, int retry_count, int timeout) { + union ccb *ccb = NULL; struct fw_vendor *vp; char *fw_img_path = NULL; struct ata_params *ident_buf = NULL; @@ -965,8 +964,6 @@ fwdownload(struct cam_device *device, in if ((devtype == CC_DT_ATA) || (devtype == CC_DT_ATA_BEHIND_SCSI)) { - union ccb *ccb; - ccb = cam_getccb(device); if (ccb == NULL) { warnx("couldn't allocate CCB"); @@ -976,7 +973,6 @@ fwdownload(struct cam_device *device, in if (ata_do_identify(device, retry_count, timeout, ccb, &ident_buf) != 0) { - cam_freeccb(ccb); retval = 1; goto bailout; } @@ -1048,6 +1044,7 @@ fwdownload(struct cam_device *device, in fprintf(stdout, "Firmware download successful\n"); bailout: + cam_freeccb(ccb); free(buf); return (retval); } From owner-svn-src-all@freebsd.org Wed May 24 21:29:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB65BD7CAD0; Wed, 24 May 2017 21:29:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A85618B5; Wed, 24 May 2017 21:29:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLTWiV027894; Wed, 24 May 2017 21:29:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLTVbx027885; Wed, 24 May 2017 21:29:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242129.v4OLTVbx027885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 21:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318818 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:29:33 -0000 Author: avg Date: Wed May 24 21:29:31 2017 New Revision: 318818 URL: https://svnweb.freebsd.org/changeset/base/318818 Log: MFC r316907: 1300 filename normalization doesn't work for removes illumos/illumos-gate@1c17160ac558f98048951327f4e9248d8f46acc0 https://github.com/illumos/illumos-gate/commit/1c17160ac558f98048951327f4e9248d8f46acc0 https://www.illumos.org/issues/1300 FreeBSD note: recent FreeBSD was not affected by the issue fixed as the name cache is completely bypassed when normalization is enabled. The change is imported for the sake of ZAP infrastructure modifications. Reviewed by: Yuri Pankov Reviewed by: Pavel Zakharov Reviewed by: Matt Ahrens Approved by: Dan McDonald Author: Kevin Crowe MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed May 24 21:18:13 2017 (r318817) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed May 24 21:29:31 2017 (r318818) @@ -18,15 +18,16 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. - * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2015, STRATO AG, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Nexenta Systems, Inc. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -1622,7 +1623,7 @@ dmu_snapshot_realname(objset_t *os, char return (zap_lookup_norm(ds->ds_dir->dd_pool->dp_meta_objset, dsl_dataset_phys(ds)->ds_snapnames_zapobj, name, 8, 1, &ignored, - MT_FIRST, real, maxlen, conflict)); + MT_NORMALIZE, real, maxlen, conflict)); } int Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Wed May 24 21:18:13 2017 (r318817) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Wed May 24 21:29:31 2017 (r318818) @@ -12,8 +12,10 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright 2017 Nexenta Systems, Inc. */ #include @@ -59,16 +61,14 @@ dsl_dataset_bmark_lookup(dsl_dataset_t * { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; uint64_t bmark_zapobj = ds->ds_bookmarks; - matchtype_t mt; + matchtype_t mt = 0; int err; if (bmark_zapobj == 0) return (SET_ERROR(ESRCH)); if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) - mt = MT_FIRST; - else - mt = MT_EXACT; + mt = MT_NORMALIZE; err = zap_lookup_norm(mos, bmark_zapobj, shortname, sizeof (uint64_t), sizeof (*bmark_phys) / sizeof (uint64_t), bmark_phys, mt, @@ -339,12 +339,10 @@ dsl_dataset_bookmark_remove(dsl_dataset_ { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; uint64_t bmark_zapobj = ds->ds_bookmarks; - matchtype_t mt; + matchtype_t mt = 0; if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) - mt = MT_FIRST; - else - mt = MT_EXACT; + mt = MT_NORMALIZE; return (zap_remove_norm(mos, bmark_zapobj, name, mt, tx)); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed May 24 21:18:13 2017 (r318817) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed May 24 21:29:31 2017 (r318818) @@ -18,6 +18,7 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright (c) 2011 Martin Matuska @@ -27,6 +28,7 @@ * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2016, OmniTI Computer Consulting, Inc. All rights reserved. + * Copyright 2017 Nexenta Systems, Inc. */ #include @@ -364,17 +366,15 @@ dsl_dataset_snap_lookup(dsl_dataset_t *d { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; uint64_t snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; - matchtype_t mt; + matchtype_t mt = 0; int err; if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) - mt = MT_FIRST; - else - mt = MT_EXACT; + mt = MT_NORMALIZE; err = zap_lookup_norm(mos, snapobj, name, 8, 1, value, mt, NULL, 0, NULL); - if (err == ENOTSUP && mt == MT_FIRST) + if (err == ENOTSUP && (mt & MT_NORMALIZE)) err = zap_lookup(mos, snapobj, name, 8, 1, value); return (err); } @@ -385,18 +385,16 @@ dsl_dataset_snap_remove(dsl_dataset_t *d { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; uint64_t snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; - matchtype_t mt; + matchtype_t mt = 0; int err; dsl_dir_snap_cmtime_update(ds->ds_dir); if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) - mt = MT_FIRST; - else - mt = MT_EXACT; + mt = MT_NORMALIZE; err = zap_remove_norm(mos, snapobj, name, mt, tx); - if (err == ENOTSUP && mt == MT_FIRST) + if (err == ENOTSUP && (mt & MT_NORMALIZE)) err = zap_remove(mos, snapobj, name, tx); if (err == 0 && adj_cnt) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h Wed May 24 21:18:13 2017 (r318817) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h Wed May 24 21:29:31 2017 (r318818) @@ -18,9 +18,11 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright 2017 Nexenta Systems, Inc. */ #ifndef _SYS_ZAP_H @@ -88,22 +90,15 @@ extern "C" { /* * Specifies matching criteria for ZAP lookups. - */ -typedef enum matchtype -{ - /* Only find an exact match (non-normalized) */ - MT_EXACT, - /* - * If there is an exact match, find that, otherwise find the - * first normalized match. - */ - MT_BEST, - /* - * Find the "first" normalized (case and Unicode form) match; - * the designated "first" match will not change as long as the - * set of entries with this normalization doesn't change. - */ - MT_FIRST + * MT_NORMALIZE Use ZAP normalization flags, which can include both + * unicode normalization and case-insensitivity. + * MT_MATCH_CASE Do case-sensitive lookups even if MT_NORMALIZE is + * specified and ZAP normalization flags include + * U8_TEXTPREP_TOUPPER. + */ +typedef enum matchtype { + MT_NORMALIZE = 1 << 0, + MT_MATCH_CASE = 1 << 1, } matchtype_t; typedef enum zap_flags { @@ -120,16 +115,6 @@ typedef enum zap_flags { /* * Create a new zapobj with no attributes and return its object number. - * MT_EXACT will cause the zap object to only support MT_EXACT lookups, - * otherwise any matchtype can be used for lookups. - * - * normflags specifies what normalization will be done. values are: - * 0: no normalization (legacy on-disk format, supports MT_EXACT matching - * only) - * U8_TEXTPREP_TOLOWER: case normalization will be performed. - * MT_FIRST/MT_BEST matching will find entries that match without - * regard to case (eg. looking for "foo" can find an entry "Foo"). - * Eventually, other flags will permit unicode normalization as well. */ uint64_t zap_create(objset_t *ds, dmu_object_type_t ot, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h Wed May 24 21:18:13 2017 (r318817) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h Wed May 24 21:29:31 2017 (r318818) @@ -18,11 +18,13 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Nexenta Systems, Inc. */ #ifndef _SYS_ZAP_IMPL_H @@ -189,6 +191,7 @@ typedef struct zap_name { int zn_key_norm_numints; uint64_t zn_hash; matchtype_t zn_matchtype; + int zn_normflags; char zn_normbuf[ZAP_MAXNAMELEN]; } zap_name_t; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c Wed May 24 21:18:13 2017 (r318817) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c Wed May 24 21:29:31 2017 (r318818) @@ -18,9 +18,11 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2015 by Delphix. All rights reserved. + * Copyright 2017 Nexenta Systems, Inc. */ /* @@ -361,7 +363,7 @@ zap_leaf_array_match(zap_leaf_t *l, zap_ } ASSERT(zn->zn_key_intlen == 1); - if (zn->zn_matchtype == MT_FIRST) { + if (zn->zn_matchtype & MT_NORMALIZE) { char *thisname = kmem_alloc(array_numints, KM_SLEEP); boolean_t match; @@ -403,7 +405,6 @@ zap_leaf_lookup(zap_leaf_t *l, zap_name_ ASSERT3U(zap_leaf_phys(l)->l_hdr.lh_magic, ==, ZAP_LEAF_MAGIC); -again: for (chunkp = LEAF_HASH_ENTPTR(l, zn->zn_hash); *chunkp != CHAIN_END; chunkp = &le->le_next) { uint16_t chunk = *chunkp; @@ -418,9 +419,9 @@ again: /* * NB: the entry chain is always sorted by cd on * normalized zap objects, so this will find the - * lowest-cd match for MT_FIRST. + * lowest-cd match for MT_NORMALIZE. */ - ASSERT(zn->zn_matchtype == MT_EXACT || + ASSERT((zn->zn_matchtype == 0) || (zap_leaf_phys(l)->l_hdr.lh_flags & ZLF_ENTRIES_CDSORTED)); if (zap_leaf_array_match(l, zn, le->le_name_chunk, le->le_name_numints)) { @@ -434,15 +435,6 @@ again: } } - /* - * NB: we could of course do this in one pass, but that would be - * a pain. We'll see if MT_BEST is even used much. - */ - if (zn->zn_matchtype == MT_BEST) { - zn->zn_matchtype = MT_FIRST; - goto again; - } - return (SET_ERROR(ENOENT)); } @@ -697,7 +689,7 @@ zap_entry_normalization_conflict(zap_ent continue; if (zn == NULL) { - zn = zap_name_alloc(zap, name, MT_FIRST); + zn = zap_name_alloc(zap, name, MT_NORMALIZE); allocdzn = B_TRUE; } if (zap_leaf_array_match(zeh->zeh_leaf, zn, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Wed May 24 21:18:13 2017 (r318817) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Wed May 24 21:29:31 2017 (r318818) @@ -18,11 +18,13 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Nexenta Systems, Inc. */ #include @@ -133,7 +135,7 @@ zap_hash(zap_name_t *zn) } static int -zap_normalize(zap_t *zap, const char *name, char *namenorm) +zap_normalize(zap_t *zap, const char *name, char *namenorm, int normflags) { size_t inlen, outlen; int err; @@ -145,8 +147,8 @@ zap_normalize(zap_t *zap, const char *na err = 0; (void) u8_textprep_str((char *)name, &inlen, namenorm, &outlen, - zap->zap_normflags | U8_TEXTPREP_IGNORE_NULL | - U8_TEXTPREP_IGNORE_INVALID, U8_UNICODE_LATEST, &err); + normflags | U8_TEXTPREP_IGNORE_NULL | U8_TEXTPREP_IGNORE_INVALID, + U8_UNICODE_LATEST, &err); return (err); } @@ -156,15 +158,15 @@ zap_match(zap_name_t *zn, const char *ma { ASSERT(!(zap_getflags(zn->zn_zap) & ZAP_FLAG_UINT64_KEY)); - if (zn->zn_matchtype == MT_FIRST) { + if (zn->zn_matchtype & MT_NORMALIZE) { char norm[ZAP_MAXNAMELEN]; - if (zap_normalize(zn->zn_zap, matchname, norm) != 0) + if (zap_normalize(zn->zn_zap, matchname, norm, + zn->zn_normflags) != 0) return (B_FALSE); return (strcmp(zn->zn_key_norm, norm) == 0); } else { - /* MT_BEST or MT_EXACT */ return (strcmp(zn->zn_key_orig, matchname) == 0); } } @@ -185,15 +187,30 @@ zap_name_alloc(zap_t *zap, const char *k zn->zn_key_orig = key; zn->zn_key_orig_numints = strlen(zn->zn_key_orig) + 1; zn->zn_matchtype = mt; + zn->zn_normflags = zap->zap_normflags; + + /* + * If we're dealing with a case sensitive lookup on a mixed or + * insensitive fs, remove U8_TEXTPREP_TOUPPER or the lookup + * will fold case to all caps overriding the lookup request. + */ + if (mt & MT_MATCH_CASE) + zn->zn_normflags &= ~U8_TEXTPREP_TOUPPER; + if (zap->zap_normflags) { - if (zap_normalize(zap, key, zn->zn_normbuf) != 0) { + /* + * We *must* use zap_normflags because this normalization is + * what the hash is computed from. + */ + if (zap_normalize(zap, key, zn->zn_normbuf, + zap->zap_normflags) != 0) { zap_name_free(zn); return (NULL); } zn->zn_key_norm = zn->zn_normbuf; zn->zn_key_norm_numints = strlen(zn->zn_key_norm) + 1; } else { - if (mt != MT_EXACT) { + if (mt != 0) { zap_name_free(zn); return (NULL); } @@ -202,6 +219,20 @@ zap_name_alloc(zap_t *zap, const char *k } zn->zn_hash = zap_hash(zn); + + if (zap->zap_normflags != zn->zn_normflags) { + /* + * We *must* use zn_normflags because this normalization is + * what the matching is based on. (Not the hash!) + */ + if (zap_normalize(zap, key, zn->zn_normbuf, + zn->zn_normflags) != 0) { + zap_name_free(zn); + return (NULL); + } + zn->zn_key_norm_numints = strlen(zn->zn_key_norm) + 1; + } + return (zn); } @@ -215,7 +246,7 @@ zap_name_alloc_uint64(zap_t *zap, const zn->zn_key_intlen = sizeof (*key); zn->zn_key_orig = zn->zn_key_norm = key; zn->zn_key_orig_numints = zn->zn_key_norm_numints = numints; - zn->zn_matchtype = MT_EXACT; + zn->zn_matchtype = 0; zn->zn_hash = zap_hash(zn); return (zn); @@ -305,7 +336,6 @@ mze_find(zap_name_t *zn) mze_tofind.mze_hash = zn->zn_hash; mze_tofind.mze_cd = 0; -again: mze = avl_find(avl, &mze_tofind, &idx); if (mze == NULL) mze = avl_nearest(avl, idx, AVL_AFTER); @@ -314,10 +344,7 @@ again: if (zap_match(zn, MZE_PHYS(zn->zn_zap, mze)->mze_name)) return (mze); } - if (zn->zn_matchtype == MT_BEST) { - zn->zn_matchtype = MT_FIRST; - goto again; - } + return (NULL); } @@ -422,8 +449,7 @@ mzap_open(objset_t *os, uint64_t obj, dm if (mze->mze_name[0]) { zap_name_t *zn; - zn = zap_name_alloc(zap, mze->mze_name, - MT_EXACT); + zn = zap_name_alloc(zap, mze->mze_name, 0); if (mze_insert(zap, i, zn->zn_hash) == 0) zap->zap_m.zap_num_entries++; else { @@ -629,7 +655,7 @@ mzap_upgrade(zap_t **zapp, void *tag, dm continue; dprintf("adding %s=%llu\n", mze->mze_name, mze->mze_value); - zn = zap_name_alloc(zap, mze->mze_name, MT_EXACT); + zn = zap_name_alloc(zap, mze->mze_name, 0); err = fzap_add_cd(zn, 8, 1, &mze->mze_value, mze->mze_cd, tag, tx); zap = zn->zn_zap; /* fzap_add_cd() may change zap */ @@ -642,6 +668,23 @@ mzap_upgrade(zap_t **zapp, void *tag, dm return (err); } +/* + * The "normflags" determine the behavior of the matchtype_t which is + * passed to zap_lookup_norm(). Names which have the same normalized + * version will be stored with the same hash value, and therefore we can + * perform normalization-insensitive lookups. We can be Unicode form- + * insensitive and/or case-insensitive. The following flags are valid for + * "normflags": + * + * U8_TEXTPREP_NFC + * U8_TEXTPREP_NFD + * U8_TEXTPREP_NFKC + * U8_TEXTPREP_NFKD + * U8_TEXTPREP_TOUPPER + * + * The *_NF* (Normalization Form) flags are mutually exclusive; at most one + * of them may be supplied. + */ void mzap_create_impl(objset_t *os, uint64_t obj, int normflags, zap_flags_t flags, dmu_tx_t *tx) @@ -800,7 +843,7 @@ again: if (zn == NULL) { zn = zap_name_alloc(zap, MZE_PHYS(zap, mze)->mze_name, - MT_FIRST); + MT_NORMALIZE); allocdzn = B_TRUE; } if (zap_match(zn, MZE_PHYS(zap, other)->mze_name)) { @@ -829,7 +872,7 @@ zap_lookup(objset_t *os, uint64_t zapobj uint64_t integer_size, uint64_t num_integers, void *buf) { return (zap_lookup_norm(os, zapobj, name, integer_size, - num_integers, buf, MT_EXACT, NULL, 0, NULL)); + num_integers, buf, 0, NULL, 0, NULL)); } static int @@ -897,7 +940,7 @@ zap_lookup_by_dnode(dnode_t *dn, const c uint64_t integer_size, uint64_t num_integers, void *buf) { return (zap_lookup_norm_by_dnode(dn, name, integer_size, - num_integers, buf, MT_EXACT, NULL, 0, NULL)); + num_integers, buf, 0, NULL, 0, NULL)); } int @@ -970,7 +1013,7 @@ int zap_contains(objset_t *os, uint64_t zapobj, const char *name) { int err = zap_lookup_norm(os, zapobj, name, 0, - 0, NULL, MT_EXACT, NULL, 0, NULL); + 0, NULL, 0, NULL, 0, NULL); if (err == EOVERFLOW || err == EINVAL) err = 0; /* found, but skipped reading the value */ return (err); @@ -988,7 +1031,7 @@ zap_length(objset_t *os, uint64_t zapobj err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, FTAG, &zap); if (err) return (err); - zn = zap_name_alloc(zap, name, MT_EXACT); + zn = zap_name_alloc(zap, name, 0); if (zn == NULL) { zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); @@ -1091,7 +1134,7 @@ zap_add(objset_t *os, uint64_t zapobj, c err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap); if (err) return (err); - zn = zap_name_alloc(zap, key, MT_EXACT); + zn = zap_name_alloc(zap, key, 0); if (zn == NULL) { zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); @@ -1170,7 +1213,7 @@ zap_update(objset_t *os, uint64_t zapobj err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap); if (err) return (err); - zn = zap_name_alloc(zap, name, MT_EXACT); + zn = zap_name_alloc(zap, name, 0); if (zn == NULL) { zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); @@ -1233,7 +1276,7 @@ zap_update_uint64(objset_t *os, uint64_t int zap_remove(objset_t *os, uint64_t zapobj, const char *name, dmu_tx_t *tx) { - return (zap_remove_norm(os, zapobj, name, MT_EXACT, tx)); + return (zap_remove_norm(os, zapobj, name, 0, tx)); } int @@ -1525,7 +1568,7 @@ zap_count_write_by_dnode(dnode_t *dn, co return (err); if (!zap->zap_ismicro) { - zap_name_t *zn = zap_name_alloc(zap, name, MT_EXACT); + zap_name_t *zn = zap_name_alloc(zap, name, 0); if (zn) { err = fzap_count_write(zn, add, towrite, tooverwrite); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Wed May 24 21:18:13 2017 (r318817) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Wed May 24 21:29:31 2017 (r318818) @@ -18,9 +18,11 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2015 by Delphix. All rights reserved. + * Copyright 2017 Nexenta Systems, Inc. */ #include @@ -63,12 +65,11 @@ */ static int zfs_match_find(zfsvfs_t *zfsvfs, znode_t *dzp, const char *name, - boolean_t exact, uint64_t *zoid) + matchtype_t mt, uint64_t *zoid) { int error; if (zfsvfs->z_norm) { - matchtype_t mt = exact? MT_EXACT : MT_FIRST; /* * In the non-mixed case we only expect there would ever @@ -108,7 +109,7 @@ int zfs_dirent_lookup(znode_t *dzp, const char *name, znode_t **zpp, int flag) { zfsvfs_t *zfsvfs = dzp->z_zfsvfs; - boolean_t exact; + matchtype_t mt = 0; uint64_t zoid; vnode_t *vp = NULL; int error = 0; @@ -131,15 +132,39 @@ zfs_dirent_lookup(znode_t *dzp, const ch * zfsvfs->z_case and zfsvfs->z_norm fields. These choices * affect how we perform zap lookups. * - * Decide if exact matches should be requested when performing - * a zap lookup on file systems supporting case-insensitive - * access. + * When matching we may need to normalize & change case according to + * FS settings. + * + * Note that a normalized match is necessary for a case insensitive + * filesystem when the lookup request is not exact because normalization + * can fold case independent of normalizing code point sequences. + * + * See the table above zfs_dropname(). + */ + if (zfsvfs->z_norm != 0) { + mt = MT_NORMALIZE; + + /* + * Determine if the match needs to honor the case specified in + * lookup, and if so keep track of that so that during + * normalization we don't fold case. + */ + if (zfsvfs->z_case == ZFS_CASE_MIXED) { + mt |= MT_MATCH_CASE; + } + } + + /* + * Only look in or update the DNLC if we are looking for the + * name on a file system that does not require normalization + * or case folding. We can also look there if we happen to be + * on a non-normalizing, mixed sensitivity file system IF we + * are looking for the exact name. * * NB: we do not need to worry about this flag for ZFS_CASE_SENSITIVE * because in that case MT_EXACT and MT_FIRST should produce exactly * the same result. */ - exact = zfsvfs->z_case == ZFS_CASE_MIXED; if (dzp->z_unlinked && !(flag & ZXATTR)) return (ENOENT); @@ -149,7 +174,7 @@ zfs_dirent_lookup(znode_t *dzp, const ch if (error == 0) error = (zoid == 0 ? ENOENT : 0); } else { - error = zfs_match_find(zfsvfs, dzp, name, exact, &zoid); + error = zfs_match_find(zfsvfs, dzp, name, mt, &zoid); } if (error) { if (error != ENOENT || (flag & ZEXISTS)) { @@ -566,6 +591,28 @@ zfs_link_create(znode_t *dzp, const char return (0); } +/* + * The match type in the code for this function should conform to: + * + * ------------------------------------------------------------------------ + * fs type | z_norm | lookup type | match type + * ---------|-------------|-------------|---------------------------------- + * CS !norm | 0 | 0 | 0 (exact) + * CS norm | formX | 0 | MT_NORMALIZE + * CI !norm | upper | !ZCIEXACT | MT_NORMALIZE + * CI !norm | upper | ZCIEXACT | MT_NORMALIZE | MT_MATCH_CASE + * CI norm | upper|formX | !ZCIEXACT | MT_NORMALIZE + * CI norm | upper|formX | ZCIEXACT | MT_NORMALIZE | MT_MATCH_CASE + * CM !norm | upper | !ZCILOOK | MT_NORMALIZE | MT_MATCH_CASE + * CM !norm | upper | ZCILOOK | MT_NORMALIZE + * CM norm | upper|formX | !ZCILOOK | MT_NORMALIZE | MT_MATCH_CASE + * CM norm | upper|formX | ZCILOOK | MT_NORMALIZE + * + * Abbreviations: + * CS = Case Sensitive, CI = Case Insensitive, CM = Case Mixed + * upper = case folding set by fs type on creation (U8_TEXTPREP_TOUPPER) + * formX = unicode normalization form set on fs creation + */ static int zfs_dropname(znode_t *dzp, const char *name, znode_t *zp, dmu_tx_t *tx, int flag) @@ -573,15 +620,16 @@ zfs_dropname(znode_t *dzp, const char *n int error; if (zp->z_zfsvfs->z_norm) { - if (zp->z_zfsvfs->z_case == ZFS_CASE_MIXED) - error = zap_remove_norm(zp->z_zfsvfs->z_os, - dzp->z_id, name, MT_EXACT, tx); - else - error = zap_remove_norm(zp->z_zfsvfs->z_os, - dzp->z_id, name, MT_FIRST, tx); + matchtype_t mt = MT_NORMALIZE; + + if (zp->z_zfsvfs->z_case == ZFS_CASE_MIXED) { + mt |= MT_MATCH_CASE; + } + + error = zap_remove_norm(zp->z_zfsvfs->z_os, dzp->z_id, + name, mt, tx); } else { - error = zap_remove(zp->z_zfsvfs->z_os, - dzp->z_id, name, tx); + error = zap_remove(zp->z_zfsvfs->z_os, dzp->z_id, name, tx); } return (error); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed May 24 21:18:13 2017 (r318817) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed May 24 21:29:31 2017 (r318818) @@ -18,11 +18,12 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2015 by Delphix. All rights reserved. - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Nexenta Systems, Inc. */ /* Portions Copyright 2007 Jeremy Teo */ @@ -1535,7 +1536,15 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode zfsvfs_t *zfsvfs = zdp->z_zfsvfs; int error = 0; - /* fast path (should be redundant with vfs namecache) */ + /* + * Fast path lookup, however we must skip DNLC lookup + * for case folding or normalizing lookups because the + * DNLC code only stores the passed in name. This means + * creating 'a' and removing 'A' on a case insensitive + * file system would work, but DNLC still thinks 'a' + * exists and won't let you create it again on the next + * pass through fast path. + */ if (!(flags & LOOKUP_XATTR)) { if (dvp->v_type != VDIR) { return (SET_ERROR(ENOTDIR)); From owner-svn-src-all@freebsd.org Wed May 24 21:32:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA1D4D7CD52; Wed, 24 May 2017 21:32:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 997971DF2; Wed, 24 May 2017 21:32:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLWZM4031908; Wed, 24 May 2017 21:32:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLWZUM031906; Wed, 24 May 2017 21:32:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242132.v4OLWZUM031906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 21:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318819 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:32:37 -0000 Author: avg Date: Wed May 24 21:32:35 2017 New Revision: 318819 URL: https://svnweb.freebsd.org/changeset/base/318819 Log: MFC r316908: 7541 zpool import/tryimport ioctl returns ENOMEM because provided buffer is too small for config illumos/illumos-gate@8b65a70b763232c90a91f31eb2010314c02ed338 https://github.com/illumos/illumos-gate/commit/8b65a70b763232c90a91f31eb2010314c02ed338 https://www.illumos.org/issues/7541 When calling zpool import, zpool does a few ioctls to ZFS. zpool allocates a buffer in userland and passes it to the kernel so that ZFS can copy info into it. ZFS will use it to put the nvlist that describes the pool configuration. If the allocated buffer is too small, ZFS will return ENOMEM and the call will have to be redone. This wastes CPU time and slows down the import process. This happens very often for the ZFS_IOC_POOL_TRYIMPORT call. Reviewed by: Matthew Ahrens Reviewed by: Dan Kimmel Approved by: Dan McDonald Author: Pavel Zakharov MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Wed May 24 21:29:31 2017 (r318818) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Wed May 24 21:32:35 2017 (r318819) @@ -132,6 +132,8 @@ typedef enum { SHARED_SMB = 0x4 } zfs_share_type_t; +#define CONFIG_BUF_MINSIZE 65536 + int zfs_error(libzfs_handle_t *, int, const char *); int zfs_error_fmt(libzfs_handle_t *, int, const char *, ...); void zfs_error_aux(libzfs_handle_t *, const char *, ...); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed May 24 21:29:31 2017 (r318818) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed May 24 21:32:35 2017 (r318819) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright 2015 RackTop Systems. * Copyright 2016 Nexenta Systems, Inc. */ @@ -379,13 +379,14 @@ refresh_config(libzfs_handle_t *hdl, nvl { nvlist_t *nvl; zfs_cmd_t zc = { 0 }; - int err; + int err, dstbuf_size; if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0) return (NULL); - if (zcmd_alloc_dst_nvlist(hdl, &zc, - zc.zc_nvlist_conf_size * 2) != 0) { + dstbuf_size = MAX(CONFIG_BUF_MINSIZE, zc.zc_nvlist_conf_size * 4); + + if (zcmd_alloc_dst_nvlist(hdl, &zc, dstbuf_size) != 0) { zcmd_free_nvlists(&zc); return (NULL); } From owner-svn-src-all@freebsd.org Wed May 24 21:42:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA7B9D800A4; Wed, 24 May 2017 21:42:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FF5014A2; Wed, 24 May 2017 21:42:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLgmwK036265; Wed, 24 May 2017 21:42:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLgm02036263; Wed, 24 May 2017 21:42:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705242142.v4OLgm02036263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 24 May 2017 21:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318820 - in head/sys: dev/sound/pcm tools/sound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:42:49 -0000 Author: hselasky Date: Wed May 24 21:42:48 2017 New Revision: 318820 URL: https://svnweb.freebsd.org/changeset/base/318820 Log: Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. MFC after: 3 days Modified: head/sys/dev/sound/pcm/feeder_mixer.c head/sys/tools/sound/snd_fxdiv_gen.awk Modified: head/sys/dev/sound/pcm/feeder_mixer.c ============================================================================== --- head/sys/dev/sound/pcm/feeder_mixer.c Wed May 24 21:32:35 2017 (r318819) +++ head/sys/dev/sound/pcm/feeder_mixer.c Wed May 24 21:42:48 2017 (r318820) @@ -131,10 +131,10 @@ static struct feed_mixer_info feed_mixer sizeof(feed_mixer_info_tab[0]))) #define FEEDMIXER_DATA(i, c) ((void *) \ - ((uintptr_t)((((i) & 0x1f) << 5) | \ - ((c) & 0x1f)))) -#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 5) & 0x1f) -#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x1f) + ((uintptr_t)((((i) & 0x1f) << 7) | \ + ((c) & 0x7f)))) +#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 7) & 0x1f) +#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x7f) static int feed_mixer_init(struct pcm_feeder *f) Modified: head/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- head/sys/tools/sound/snd_fxdiv_gen.awk Wed May 24 21:32:35 2017 (r318819) +++ head/sys/tools/sound/snd_fxdiv_gen.awk Wed May 24 21:42:48 2017 (r318820) @@ -74,7 +74,7 @@ BEGIN { FXSHIFT = 16; FXONE = shl(1, FXSHIFT); - SND_CHN_MAX = 18; + SND_CHN_MAX = 127; PCM_8_BPS = 1; PCM_16_BPS = 2; @@ -103,9 +103,9 @@ BEGIN { printf("/*\n"); printf(" * Fast unsigned 32bit integer division and rounding, accurate for\n"); printf(" * x = 1 - %d. This table should be enough to handle possible\n", FXONE); - printf(" * division for 1 - 72 (more can be generated though..).\n"); + printf(" * division for 1 - 508 (more can be generated though..).\n"); printf(" *\n"); - printf(" * 72 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); + printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); From owner-svn-src-all@freebsd.org Wed May 24 21:43:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03F23D8014B; Wed, 24 May 2017 21:43:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99E1916DA; Wed, 24 May 2017 21:43:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLhY57036341; Wed, 24 May 2017 21:43:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLhYkn036336; Wed, 24 May 2017 21:43:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242143.v4OLhYkn036336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 21:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318821 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:43:36 -0000 Author: avg Date: Wed May 24 21:43:34 2017 New Revision: 318821 URL: https://svnweb.freebsd.org/changeset/base/318821 Log: MFC r316912: 7793 ztest fails assertion in dmu_tx_willuse_space illumos/illumos-gate@61e255ce7267b52208af9daf434b77d37fb75622 https://github.com/illumos/illumos-gate/commit/61e255ce7267b52208af9daf434b77d37fb75622 https://www.illumos.org/issues/7793 Background information: This assertion about tx_space_* verifies that we are not dirtying more stuff than we thought we would. We “need” to know how much we will dirty so that we can check if we should fail this transaction with ENOSPC/EDQUOT, in dmu_tx_assign(). While the transaction is open (i.e. between dmu_tx_assign() and dmu_tx_commit() — typically less than a millisecond), we call dbuf_dirty() on the exact blocks that will be modified. Once this happens, the temporary accounting in tx_space_* is unnecessary, because we know exactly what blocks are newly dirtied; we call dnode_willuse_space() to track this more exact accounting. The fundamental problem causing this bug is that dmu_tx_hold_*() relies on the current state in the DMU (e.g. dn_nlevels) to predict how much will be dirtied by this transaction, but this state can change before we actually perform the transaction (i.e. call dbuf_dirty()). This bug will be fixed by removing the assertion that the tx_space_* accounting is perfectly accurate (i.e. we never dirty more than was predicted by dmu_tx_hold_*()). By removing the requirement that this accounting be perfectly accurate, we can also vastly simplify it, e.g. removing most of the logic in dmu_tx_count_*(). The new tx space accounting will be very approximate, and may be more or less than what is actually dirtied. It will still be used to determine if this transaction will put us over quota. Transactions that are marked by dmu_tx_mark_netfree() will be excepted from this check. We won’t make an attempt to determine how much space will be freed by the transaction — this was rarely accurate enough to determine if a transaction should be permitted when we are over quota, which is why dmu_tx_mark_netfree() was introduced in 2014. We also won’t attempt to give “credit” when overwriting existing blocks, if those blocks may be freed. This allows us to remove the do_free_accounting logic in dbuf_dirty(), and associated routines. This Reviewed by: Steve Gonczi Reviewed by: George Wilson Reviewed by: Pavel Zakharov Reviewed by: Brian Behlendorf Approved by: Robert Mustacchi Author: Matthew Ahrens MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed May 24 21:42:48 2017 (r318820) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed May 24 21:43:34 2017 (r318821) @@ -1346,41 +1346,6 @@ dbuf_free_range(dnode_t *dn, uint64_t st mutex_exit(&dn->dn_dbufs_mtx); } -static int -dbuf_block_freeable(dmu_buf_impl_t *db) -{ - dsl_dataset_t *ds = db->db_objset->os_dsl_dataset; - uint64_t birth_txg = 0; - - /* - * We don't need any locking to protect db_blkptr: - * If it's syncing, then db_last_dirty will be set - * so we'll ignore db_blkptr. - * - * This logic ensures that only block births for - * filled blocks are considered. - */ - ASSERT(MUTEX_HELD(&db->db_mtx)); - if (db->db_last_dirty && (db->db_blkptr == NULL || - !BP_IS_HOLE(db->db_blkptr))) { - birth_txg = db->db_last_dirty->dr_txg; - } else if (db->db_blkptr != NULL && !BP_IS_HOLE(db->db_blkptr)) { - birth_txg = db->db_blkptr->blk_birth; - } - - /* - * If this block don't exist or is in a snapshot, it can't be freed. - * Don't pass the bp to dsl_dataset_block_freeable() since we - * are holding the db_mtx lock and might deadlock if we are - * prefetching a dedup-ed block. - */ - if (birth_txg != 0) - return (ds == NULL || - dsl_dataset_block_freeable(ds, NULL, birth_txg)); - else - return (B_FALSE); -} - void dbuf_new_size(dmu_buf_impl_t *db, int size, dmu_tx_t *tx) { @@ -1430,7 +1395,7 @@ dbuf_new_size(dmu_buf_impl_t *db, int si } mutex_exit(&db->db_mtx); - dnode_willuse_space(dn, size-osize, tx); + dmu_objset_willuse_space(dn->dn_objset, size - osize, tx); DB_DNODE_EXIT(db); } @@ -1480,7 +1445,6 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t objset_t *os; dbuf_dirty_record_t **drp, *dr; int drop_struct_lock = FALSE; - boolean_t do_free_accounting = B_FALSE; int txgoff = tx->tx_txg & TXG_MASK; ASSERT(tx->tx_txg != 0); @@ -1602,15 +1566,7 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t dprintf_dbuf(db, "size=%llx\n", (u_longlong_t)db->db.db_size); if (db->db_blkid != DMU_BONUS_BLKID) { - /* - * Update the accounting. - * Note: we delay "free accounting" until after we drop - * the db_mtx. This keeps us from grabbing other locks - * (and possibly deadlocking) in bp_get_dsize() while - * also holding the db_mtx. - */ - dnode_willuse_space(dn, db->db.db_size, tx); - do_free_accounting = dbuf_block_freeable(db); + dmu_objset_willuse_space(os, db->db.db_size, tx); } /* @@ -1703,21 +1659,13 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t drop_struct_lock = TRUE; } - if (do_free_accounting) { - blkptr_t *bp = db->db_blkptr; - int64_t willfree = (bp && !BP_IS_HOLE(bp)) ? - bp_get_dsize(os->os_spa, bp) : db->db.db_size; - /* - * This is only a guess -- if the dbuf is dirty - * in a previous txg, we don't know how much - * space it will use on disk yet. We should - * really have the struct_rwlock to access - * db_blkptr, but since this is just a guess, - * it's OK if we get an odd answer. - */ - ddt_prefetch(os->os_spa, bp); - dnode_willuse_space(dn, -willfree, tx); - } + /* + * If we are overwriting a dedup BP, then unless it is snapshotted, + * when we get to syncing context we will need to decrement its + * refcount in the DDT. Prefetch the relevant DDT block so that + * syncing context won't have to wait for the i/o. + */ + ddt_prefetch(os->os_spa, db->db_blkptr); if (db->db_level == 0) { dnode_new_blkid(dn, db->db_blkid, tx, drop_struct_lock); @@ -2927,19 +2875,6 @@ dmu_buf_user_evict_wait() taskq_wait(dbu_evict_taskq); } -boolean_t -dmu_buf_freeable(dmu_buf_t *dbuf) -{ - boolean_t res = B_FALSE; - dmu_buf_impl_t *db = (dmu_buf_impl_t *)dbuf; - - if (db->db_blkptr) - res = dsl_dataset_block_freeable(db->db_objset->os_dsl_dataset, - db->db_blkptr, db->db_blkptr->blk_birth); - - return (res); -} - blkptr_t * dmu_buf_get_blkptr(dmu_buf_t *db) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed May 24 21:42:48 2017 (r318820) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed May 24 21:43:34 2017 (r318821) @@ -2103,3 +2103,20 @@ dmu_fsname(const char *snapname, char *b (void) strlcpy(buf, snapname, atp - snapname + 1); return (0); } + +/* + * Call when we think we're going to write/free space in open context to track + * the amount of dirty data in the open txg, which is also the amount + * of memory that can not be evicted until this txg syncs. + */ +void +dmu_objset_willuse_space(objset_t *os, int64_t space, dmu_tx_t *tx) +{ + dsl_dataset_t *ds = os->os_dsl_dataset; + int64_t aspace = spa_get_worst_case_asize(os->os_spa, space); + + if (ds != NULL) { + dsl_dir_willuse_space(ds->ds_dir, aspace, tx); + dsl_pool_dirty_space(dmu_tx_pool(tx), space, tx); + } +} Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed May 24 21:42:48 2017 (r318820) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed May 24 21:43:34 2017 (r318821) @@ -30,10 +30,10 @@ #include #include #include -#include /* for dsl_dataset_block_freeable() */ -#include /* for dsl_dir_tempreserve_*() */ +#include +#include #include -#include /* for fzap_default_block_shift */ +#include #include #include #include @@ -56,10 +56,6 @@ dmu_tx_create_dd(dsl_dir_t *dd) list_create(&tx->tx_callbacks, sizeof (dmu_tx_callback_t), offsetof(dmu_tx_callback_t, dcb_node)); tx->tx_start = gethrtime(); -#ifdef ZFS_DEBUG - refcount_create(&tx->tx_space_written); - refcount_create(&tx->tx_space_freed); -#endif return (tx); } @@ -68,7 +64,6 @@ dmu_tx_create(objset_t *os) { dmu_tx_t *tx = dmu_tx_create_dd(os->os_dsl_dataset->ds_dir); tx->tx_objset = os; - tx->tx_lastsnap_txg = dsl_dataset_prev_snap_txg(os->os_dsl_dataset); return (tx); } @@ -130,16 +125,10 @@ dmu_tx_hold_object_impl(dmu_tx_t *tx, ob txh->txh_tx = tx; txh->txh_dnode = dn; refcount_create(&txh->txh_space_towrite); - refcount_create(&txh->txh_space_tofree); - refcount_create(&txh->txh_space_tooverwrite); - refcount_create(&txh->txh_space_tounref); refcount_create(&txh->txh_memory_tohold); - refcount_create(&txh->txh_fudge); -#ifdef ZFS_DEBUG txh->txh_type = type; txh->txh_arg1 = arg1; txh->txh_arg2 = arg2; -#endif list_insert_tail(&tx->tx_holds, txh); return (txh); @@ -158,6 +147,34 @@ dmu_tx_add_new_object(dmu_tx_t *tx, objs } } +/* + * This function reads specified data from disk. The specified data will + * be needed to perform the transaction -- i.e, it will be read after + * we do dmu_tx_assign(). There are two reasons that we read the data now + * (before dmu_tx_assign()): + * + * 1. Reading it now has potentially better performance. The transaction + * has not yet been assigned, so the TXG is not held open, and also the + * caller typically has less locks held when calling dmu_tx_hold_*() than + * after the transaction has been assigned. This reduces the lock (and txg) + * hold times, thus reducing lock contention. + * + * 2. It is easier for callers (primarily the ZPL) to handle i/o errors + * that are detected before they start making changes to the DMU state + * (i.e. now). Once the transaction has been assigned, and some DMU + * state has been changed, it can be difficult to recover from an i/o + * error (e.g. to undo the changes already made in memory at the DMU + * layer). Typically code to do so does not exist in the caller -- it + * assumes that the data has already been cached and thus i/o errors are + * not possible. + * + * It has been observed that the i/o initiated here can be a performance + * problem, and it appears to be optional, because we don't look at the + * data which is read. However, removing this read would only serve to + * move the work elsewhere (after the dmu_tx_assign()), where it may + * have a greater impact on performance (in addition to the impact on + * fault tolerance noted above). + */ static int dmu_tx_check_ioerr(zio_t *zio, dnode_t *dn, int level, uint64_t blkid) { @@ -174,259 +191,84 @@ dmu_tx_check_ioerr(zio_t *zio, dnode_t * return (err); } -static void -dmu_tx_count_twig(dmu_tx_hold_t *txh, dnode_t *dn, dmu_buf_impl_t *db, - int level, uint64_t blkid, boolean_t freeable, uint64_t *history) -{ - objset_t *os = dn->dn_objset; - dsl_dataset_t *ds = os->os_dsl_dataset; - int epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; - dmu_buf_impl_t *parent = NULL; - blkptr_t *bp = NULL; - uint64_t space; - - if (level >= dn->dn_nlevels || history[level] == blkid) - return; - - history[level] = blkid; - - space = (level == 0) ? dn->dn_datablksz : (1ULL << dn->dn_indblkshift); - - if (db == NULL || db == dn->dn_dbuf) { - ASSERT(level != 0); - db = NULL; - } else { - ASSERT(DB_DNODE(db) == dn); - ASSERT(db->db_level == level); - ASSERT(db->db.db_size == space); - ASSERT(db->db_blkid == blkid); - bp = db->db_blkptr; - parent = db->db_parent; - } - - freeable = (bp && (freeable || - dsl_dataset_block_freeable(ds, bp, bp->blk_birth))); - - if (freeable) { - (void) refcount_add_many(&txh->txh_space_tooverwrite, - space, FTAG); - } else { - (void) refcount_add_many(&txh->txh_space_towrite, - space, FTAG); - } - - if (bp) { - (void) refcount_add_many(&txh->txh_space_tounref, - bp_get_dsize(os->os_spa, bp), FTAG); - } - - dmu_tx_count_twig(txh, dn, parent, level + 1, - blkid >> epbs, freeable, history); -} - /* ARGSUSED */ static void dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len) { dnode_t *dn = txh->txh_dnode; - uint64_t start, end, i; - int min_bs, max_bs, min_ibs, max_ibs, epbs, bits; int err = 0; if (len == 0) return; - min_bs = SPA_MINBLOCKSHIFT; - max_bs = highbit64(txh->txh_tx->tx_objset->os_recordsize) - 1; - min_ibs = DN_MIN_INDBLKSHIFT; - max_ibs = DN_MAX_INDBLKSHIFT; - - if (dn) { - uint64_t history[DN_MAX_LEVELS]; - int nlvls = dn->dn_nlevels; - int delta; + (void) refcount_add_many(&txh->txh_space_towrite, len, FTAG); - /* - * For i/o error checking, read the first and last level-0 - * blocks (if they are not aligned), and all the level-1 blocks. - */ - if (dn->dn_maxblkid == 0) { - delta = dn->dn_datablksz; - start = (off < dn->dn_datablksz) ? 0 : 1; - end = (off+len <= dn->dn_datablksz) ? 0 : 1; - if (start == 0 && (off > 0 || len < dn->dn_datablksz)) { - err = dmu_tx_check_ioerr(NULL, dn, 0, 0); - if (err) - goto out; - delta -= off; - } - } else { - zio_t *zio = zio_root(dn->dn_objset->os_spa, - NULL, NULL, ZIO_FLAG_CANFAIL); - - /* first level-0 block */ - start = off >> dn->dn_datablkshift; - if (P2PHASE(off, dn->dn_datablksz) || - len < dn->dn_datablksz) { - err = dmu_tx_check_ioerr(zio, dn, 0, start); - if (err) - goto out; - } + if (refcount_count(&txh->txh_space_towrite) > 2 * DMU_MAX_ACCESS) + err = SET_ERROR(EFBIG); - /* last level-0 block */ - end = (off+len-1) >> dn->dn_datablkshift; - if (end != start && end <= dn->dn_maxblkid && - P2PHASE(off+len, dn->dn_datablksz)) { - err = dmu_tx_check_ioerr(zio, dn, 0, end); - if (err) - goto out; - } + if (dn == NULL) + return; - /* level-1 blocks */ - if (nlvls > 1) { - int shft = dn->dn_indblkshift - SPA_BLKPTRSHIFT; - for (i = (start>>shft)+1; i < end>>shft; i++) { - err = dmu_tx_check_ioerr(zio, dn, 1, i); - if (err) - goto out; - } + /* + * For i/o error checking, read the blocks that will be needed + * to perform the write: the first and last level-0 blocks (if + * they are not aligned, i.e. if they are partial-block writes), + * and all the level-1 blocks. + */ + if (dn->dn_maxblkid == 0) { + if (off < dn->dn_datablksz && + (off > 0 || len < dn->dn_datablksz)) { + err = dmu_tx_check_ioerr(NULL, dn, 0, 0); + if (err != 0) { + txh->txh_tx->tx_err = err; } - - err = zio_wait(zio); - if (err) - goto out; - delta = P2NPHASE(off, dn->dn_datablksz); - } - - min_ibs = max_ibs = dn->dn_indblkshift; - if (dn->dn_maxblkid > 0) { - /* - * The blocksize can't change, - * so we can make a more precise estimate. - */ - ASSERT(dn->dn_datablkshift != 0); - min_bs = max_bs = dn->dn_datablkshift; - } else { - /* - * The blocksize can increase up to the recordsize, - * or if it is already more than the recordsize, - * up to the next power of 2. - */ - min_bs = highbit64(dn->dn_datablksz - 1); - max_bs = MAX(max_bs, highbit64(dn->dn_datablksz - 1)); } + } else { + zio_t *zio = zio_root(dn->dn_objset->os_spa, + NULL, NULL, ZIO_FLAG_CANFAIL); - /* - * If this write is not off the end of the file - * we need to account for overwrites/unref. - */ - if (start <= dn->dn_maxblkid) { - for (int l = 0; l < DN_MAX_LEVELS; l++) - history[l] = -1ULL; + /* first level-0 block */ + uint64_t start = off >> dn->dn_datablkshift; + if (P2PHASE(off, dn->dn_datablksz) || len < dn->dn_datablksz) { + err = dmu_tx_check_ioerr(zio, dn, 0, start); + if (err != 0) { + txh->txh_tx->tx_err = err; + } } - while (start <= dn->dn_maxblkid) { - dmu_buf_impl_t *db; - - rw_enter(&dn->dn_struct_rwlock, RW_READER); - err = dbuf_hold_impl(dn, 0, start, - FALSE, FALSE, FTAG, &db); - rw_exit(&dn->dn_struct_rwlock); - if (err) { + /* last level-0 block */ + uint64_t end = (off + len - 1) >> dn->dn_datablkshift; + if (end != start && end <= dn->dn_maxblkid && + P2PHASE(off + len, dn->dn_datablksz)) { + err = dmu_tx_check_ioerr(zio, dn, 0, end); + if (err != 0) { txh->txh_tx->tx_err = err; - return; } + } - dmu_tx_count_twig(txh, dn, db, 0, start, B_FALSE, - history); - dbuf_rele(db, FTAG); - if (++start > end) { - /* - * Account for new indirects appearing - * before this IO gets assigned into a txg. - */ - bits = 64 - min_bs; - epbs = min_ibs - SPA_BLKPTRSHIFT; - for (bits -= epbs * (nlvls - 1); - bits >= 0; bits -= epbs) { - (void) refcount_add_many( - &txh->txh_fudge, - 1ULL << max_ibs, FTAG); + /* level-1 blocks */ + if (dn->dn_nlevels > 1) { + int shft = dn->dn_indblkshift - SPA_BLKPTRSHIFT; + for (uint64_t i = (start >> shft) + 1; + i < end >> shft; i++) { + err = dmu_tx_check_ioerr(zio, dn, 1, i); + if (err != 0) { + txh->txh_tx->tx_err = err; } - goto out; } - off += delta; - if (len >= delta) - len -= delta; - delta = dn->dn_datablksz; } - } - - /* - * 'end' is the last thing we will access, not one past. - * This way we won't overflow when accessing the last byte. - */ - start = P2ALIGN(off, 1ULL << max_bs); - end = P2ROUNDUP(off + len, 1ULL << max_bs) - 1; - (void) refcount_add_many(&txh->txh_space_towrite, - end - start + 1, FTAG); - - start >>= min_bs; - end >>= min_bs; - epbs = min_ibs - SPA_BLKPTRSHIFT; - - /* - * The object contains at most 2^(64 - min_bs) blocks, - * and each indirect level maps 2^epbs. - */ - for (bits = 64 - min_bs; bits >= 0; bits -= epbs) { - start >>= epbs; - end >>= epbs; - ASSERT3U(end, >=, start); - (void) refcount_add_many(&txh->txh_space_towrite, - (end - start + 1) << max_ibs, FTAG); - if (start != 0) { - /* - * We also need a new blkid=0 indirect block - * to reference any existing file data. - */ - (void) refcount_add_many(&txh->txh_space_towrite, - 1ULL << max_ibs, FTAG); + err = zio_wait(zio); + if (err != 0) { + txh->txh_tx->tx_err = err; } } - -out: - if (refcount_count(&txh->txh_space_towrite) + - refcount_count(&txh->txh_space_tooverwrite) > - 2 * DMU_MAX_ACCESS) - err = SET_ERROR(EFBIG); - - if (err) - txh->txh_tx->tx_err = err; } static void dmu_tx_count_dnode(dmu_tx_hold_t *txh) { - dnode_t *dn = txh->txh_dnode; - dnode_t *mdn = DMU_META_DNODE(txh->txh_tx->tx_objset); - uint64_t space = mdn->dn_datablksz + - ((mdn->dn_nlevels-1) << mdn->dn_indblkshift); - - if (dn && dn->dn_dbuf->db_blkptr && - dsl_dataset_block_freeable(dn->dn_objset->os_dsl_dataset, - dn->dn_dbuf->db_blkptr, dn->dn_dbuf->db_blkptr->blk_birth)) { - (void) refcount_add_many(&txh->txh_space_tooverwrite, - space, FTAG); - (void) refcount_add_many(&txh->txh_space_tounref, space, FTAG); - } else { - (void) refcount_add_many(&txh->txh_space_towrite, space, FTAG); - if (dn && dn->dn_dbuf->db_blkptr) { - (void) refcount_add_many(&txh->txh_space_tounref, - space, FTAG); - } - } + (void) refcount_add_many(&txh->txh_space_towrite, DNODE_SIZE, FTAG); } void @@ -434,8 +276,8 @@ dmu_tx_hold_write(dmu_tx_t *tx, uint64_t { dmu_tx_hold_t *txh; - ASSERT(tx->tx_txg == 0); - ASSERT(len < DMU_MAX_ACCESS); + ASSERT0(tx->tx_txg); + ASSERT3U(len, <=, DMU_MAX_ACCESS); ASSERT(len == 0 || UINT64_MAX - off >= len - 1); txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, @@ -447,179 +289,6 @@ dmu_tx_hold_write(dmu_tx_t *tx, uint64_t dmu_tx_count_dnode(txh); } -static void -dmu_tx_count_free(dmu_tx_hold_t *txh, uint64_t off, uint64_t len) -{ - uint64_t blkid, nblks, lastblk; - uint64_t space = 0, unref = 0, skipped = 0; - dnode_t *dn = txh->txh_dnode; - dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; - spa_t *spa = txh->txh_tx->tx_pool->dp_spa; - int epbs; - uint64_t l0span = 0, nl1blks = 0; - - if (dn->dn_nlevels == 0) - return; - - /* - * The struct_rwlock protects us against dn_nlevels - * changing, in case (against all odds) we manage to dirty & - * sync out the changes after we check for being dirty. - * Also, dbuf_hold_impl() wants us to have the struct_rwlock. - */ - rw_enter(&dn->dn_struct_rwlock, RW_READER); - epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; - if (dn->dn_maxblkid == 0) { - if (off == 0 && len >= dn->dn_datablksz) { - blkid = 0; - nblks = 1; - } else { - rw_exit(&dn->dn_struct_rwlock); - return; - } - } else { - blkid = off >> dn->dn_datablkshift; - nblks = (len + dn->dn_datablksz - 1) >> dn->dn_datablkshift; - - if (blkid > dn->dn_maxblkid) { - rw_exit(&dn->dn_struct_rwlock); - return; - } - if (blkid + nblks > dn->dn_maxblkid) - nblks = dn->dn_maxblkid - blkid + 1; - - } - l0span = nblks; /* save for later use to calc level > 1 overhead */ - if (dn->dn_nlevels == 1) { - int i; - for (i = 0; i < nblks; i++) { - blkptr_t *bp = dn->dn_phys->dn_blkptr; - ASSERT3U(blkid + i, <, dn->dn_nblkptr); - bp += blkid + i; - if (dsl_dataset_block_freeable(ds, bp, bp->blk_birth)) { - dprintf_bp(bp, "can free old%s", ""); - space += bp_get_dsize(spa, bp); - } - unref += BP_GET_ASIZE(bp); - } - nl1blks = 1; - nblks = 0; - } - - lastblk = blkid + nblks - 1; - while (nblks) { - dmu_buf_impl_t *dbuf; - uint64_t ibyte, new_blkid; - int epb = 1 << epbs; - int err, i, blkoff, tochk; - blkptr_t *bp; - - ibyte = blkid << dn->dn_datablkshift; - err = dnode_next_offset(dn, - DNODE_FIND_HAVELOCK, &ibyte, 2, 1, 0); - new_blkid = ibyte >> dn->dn_datablkshift; - if (err == ESRCH) { - skipped += (lastblk >> epbs) - (blkid >> epbs) + 1; - break; - } - if (err) { - txh->txh_tx->tx_err = err; - break; - } - if (new_blkid > lastblk) { - skipped += (lastblk >> epbs) - (blkid >> epbs) + 1; - break; - } - - if (new_blkid > blkid) { - ASSERT((new_blkid >> epbs) > (blkid >> epbs)); - skipped += (new_blkid >> epbs) - (blkid >> epbs) - 1; - nblks -= new_blkid - blkid; - blkid = new_blkid; - } - blkoff = P2PHASE(blkid, epb); - tochk = MIN(epb - blkoff, nblks); - - err = dbuf_hold_impl(dn, 1, blkid >> epbs, - FALSE, FALSE, FTAG, &dbuf); - if (err) { - txh->txh_tx->tx_err = err; - break; - } - - (void) refcount_add_many(&txh->txh_memory_tohold, - dbuf->db.db_size, FTAG); - - /* - * We don't check memory_tohold against DMU_MAX_ACCESS because - * memory_tohold is an over-estimation (especially the >L1 - * indirect blocks), so it could fail. Callers should have - * already verified that they will not be holding too much - * memory. - */ - - err = dbuf_read(dbuf, NULL, DB_RF_HAVESTRUCT | DB_RF_CANFAIL); - if (err != 0) { - txh->txh_tx->tx_err = err; - dbuf_rele(dbuf, FTAG); - break; - } - - bp = dbuf->db.db_data; - bp += blkoff; - - for (i = 0; i < tochk; i++) { - if (dsl_dataset_block_freeable(ds, &bp[i], - bp[i].blk_birth)) { - dprintf_bp(&bp[i], "can free old%s", ""); - space += bp_get_dsize(spa, &bp[i]); - } - unref += BP_GET_ASIZE(bp); - } - dbuf_rele(dbuf, FTAG); - - ++nl1blks; - blkid += tochk; - nblks -= tochk; - } - rw_exit(&dn->dn_struct_rwlock); - - /* - * Add in memory requirements of higher-level indirects. - * This assumes a worst-possible scenario for dn_nlevels and a - * worst-possible distribution of l1-blocks over the region to free. - */ - { - uint64_t blkcnt = 1 + ((l0span >> epbs) >> epbs); - int level = 2; - /* - * Here we don't use DN_MAX_LEVEL, but calculate it with the - * given datablkshift and indblkshift. This makes the - * difference between 19 and 8 on large files. - */ - int maxlevel = 2 + (DN_MAX_OFFSET_SHIFT - dn->dn_datablkshift) / - (dn->dn_indblkshift - SPA_BLKPTRSHIFT); - - while (level++ < maxlevel) { - (void) refcount_add_many(&txh->txh_memory_tohold, - MAX(MIN(blkcnt, nl1blks), 1) << dn->dn_indblkshift, - FTAG); - blkcnt = 1 + (blkcnt >> epbs); - } - } - - /* account for new level 1 indirect blocks that might show up */ - if (skipped > 0) { - (void) refcount_add_many(&txh->txh_fudge, - skipped << dn->dn_indblkshift, FTAG); - skipped = MIN(skipped, DMU_MAX_DELETEBLKCNT >> epbs); - (void) refcount_add_many(&txh->txh_memory_tohold, - skipped << dn->dn_indblkshift, FTAG); - } - (void) refcount_add_many(&txh->txh_space_tofree, space, FTAG); - (void) refcount_add_many(&txh->txh_space_tounref, unref, FTAG); -} - /* * This function marks the transaction as being a "net free". The end * result is that refquotas will be disabled for this transaction, and @@ -631,45 +300,27 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui void dmu_tx_mark_netfree(dmu_tx_t *tx) { - dmu_tx_hold_t *txh; - - txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, - DMU_NEW_OBJECT, THT_FREE, 0, 0); - - /* - * Pretend that this operation will free 1GB of space. This - * should be large enough to cancel out the largest write. - * We don't want to use something like UINT64_MAX, because that would - * cause overflows when doing math with these values (e.g. in - * dmu_tx_try_assign()). - */ - (void) refcount_add_many(&txh->txh_space_tofree, - 1024 * 1024 * 1024, FTAG); - (void) refcount_add_many(&txh->txh_space_tounref, - 1024 * 1024 * 1024, FTAG); + tx->tx_netfree = B_TRUE; } void dmu_tx_hold_free(dmu_tx_t *tx, uint64_t object, uint64_t off, uint64_t len) { - dmu_tx_hold_t *txh; - dnode_t *dn; int err; - zio_t *zio; ASSERT(tx->tx_txg == 0); - txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, + dmu_tx_hold_t *txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, object, THT_FREE, off, len); if (txh == NULL) return; - dn = txh->txh_dnode; + dnode_t *dn = txh->txh_dnode; dmu_tx_count_dnode(txh); - if (off >= (dn->dn_maxblkid+1) * dn->dn_datablksz) + if (off >= (dn->dn_maxblkid + 1) * dn->dn_datablksz) return; if (len == DMU_OBJECT_END) - len = (dn->dn_maxblkid+1) * dn->dn_datablksz - off; + len = (dn->dn_maxblkid + 1) * dn->dn_datablksz - off; /* @@ -690,7 +341,7 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t dmu_tx_count_write(txh, off, 1); /* last block will be modified if it is not aligned */ if (!IS_P2ALIGNED(off + len, 1 << dn->dn_datablkshift)) - dmu_tx_count_write(txh, off+len, 1); + dmu_tx_count_write(txh, off + len, 1); } /* @@ -712,7 +363,7 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t if (dn->dn_datablkshift == 0) start = end = 0; - zio = zio_root(tx->tx_pool->dp_spa, + zio_t *zio = zio_root(tx->tx_pool->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); for (uint64_t i = start; i <= end; i++) { uint64_t ibyte = i << shift; @@ -720,127 +371,80 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t i = ibyte >> shift; if (err == ESRCH || i > end) break; - if (err) { + if (err != 0) { tx->tx_err = err; + (void) zio_wait(zio); return; } + (void) refcount_add_many(&txh->txh_memory_tohold, + 1 << dn->dn_indblkshift, FTAG); + err = dmu_tx_check_ioerr(zio, dn, 1, i); - if (err) { + if (err != 0) { tx->tx_err = err; + (void) zio_wait(zio); return; } } err = zio_wait(zio); - if (err) { + if (err != 0) { tx->tx_err = err; return; } } - - dmu_tx_count_free(txh, off, len); } void dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t object, int add, const char *name) { - dmu_tx_hold_t *txh; - dnode_t *dn; int err; ASSERT(tx->tx_txg == 0); - txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, + dmu_tx_hold_t *txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, object, THT_ZAP, add, (uintptr_t)name); if (txh == NULL) return; - dn = txh->txh_dnode; + dnode_t *dn = txh->txh_dnode; dmu_tx_count_dnode(txh); - if (dn == NULL) { - /* - * We will be able to fit a new object's entries into one leaf - * block. So there will be at most 2 blocks total, - * including the header block. - */ - dmu_tx_count_write(txh, 0, 2 << fzap_default_block_shift); + /* + * Modifying a almost-full microzap is around the worst case (128KB) + * + * If it is a fat zap, the worst case would be 7*16KB=112KB: + * - 3 blocks overwritten: target leaf, ptrtbl block, header block + * - 4 new blocks written if adding: + * - 2 blocks for possibly split leaves, + * - 2 grown ptrtbl blocks + */ + (void) refcount_add_many(&txh->txh_space_towrite, + MZAP_MAX_BLKSZ, FTAG); + + if (dn == NULL) return; - } ASSERT3P(DMU_OT_BYTESWAP(dn->dn_type), ==, DMU_BSWAP_ZAP); - if (dn->dn_maxblkid == 0 && !add) { - blkptr_t *bp; - + if (dn->dn_maxblkid == 0 || name == NULL) { /* - * If there is only one block (i.e. this is a micro-zap) - * and we are not adding anything, the accounting is simple. + * This is a microzap (only one block), or we don't know + * the name. Check the first block for i/o errors. */ err = dmu_tx_check_ioerr(NULL, dn, 0, 0); - if (err) { + if (err != 0) { tx->tx_err = err; - return; - } - - /* - * Use max block size here, since we don't know how much - * the size will change between now and the dbuf dirty call. - */ - bp = &dn->dn_phys->dn_blkptr[0]; - if (dsl_dataset_block_freeable(dn->dn_objset->os_dsl_dataset, - bp, bp->blk_birth)) { - (void) refcount_add_many(&txh->txh_space_tooverwrite, - MZAP_MAX_BLKSZ, FTAG); - } else { - (void) refcount_add_many(&txh->txh_space_towrite, - MZAP_MAX_BLKSZ, FTAG); } - if (!BP_IS_HOLE(bp)) { - (void) refcount_add_many(&txh->txh_space_tounref, - MZAP_MAX_BLKSZ, FTAG); - } - return; - } - - if (dn->dn_maxblkid > 0 && name) { + } else { /* - * access the name in this fat-zap so that we'll check - * for i/o errors to the leaf blocks, etc. + * Access the name so that we'll check for i/o errors to + * the leaf blocks, etc. We ignore ENOENT, as this name + * may not yet exist. */ err = zap_lookup_by_dnode(dn, name, 8, 0, NULL); - if (err == EIO) { + if (err == EIO || err == ECKSUM || err == ENXIO) { tx->tx_err = err; - return; - } - } - - err = zap_count_write_by_dnode(dn, name, add, - &txh->txh_space_towrite, &txh->txh_space_tooverwrite); - - /* - * If the modified blocks are scattered to the four winds, - * we'll have to modify an indirect twig for each. We can make - * modifications at up to 3 locations: - * - header block at the beginning of the object - * - target leaf block - * - end of the object, where we might need to write: - * - a new leaf block if the target block needs to be split - * - the new pointer table, if it is growing - * - the new cookie table, if it is growing - */ - int epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; - dsl_dataset_phys_t *ds_phys = - dsl_dataset_phys(dn->dn_objset->os_dsl_dataset); - for (int lvl = 1; lvl < dn->dn_nlevels; lvl++) { - uint64_t num_indirects = 1 + (dn->dn_maxblkid >> (epbs * lvl)); - uint64_t spc = MIN(3, num_indirects) << dn->dn_indblkshift; - if (ds_phys->ds_prev_snap_obj != 0) { - (void) refcount_add_many(&txh->txh_space_towrite, - spc, FTAG); - } else { - (void) refcount_add_many(&txh->txh_space_tooverwrite, - spc, FTAG); } } } @@ -870,42 +474,15 @@ dmu_tx_hold_space(dmu_tx_t *tx, uint64_t (void) refcount_add_many(&txh->txh_space_towrite, space, FTAG); } -int -dmu_tx_holds(dmu_tx_t *tx, uint64_t object) -{ - dmu_tx_hold_t *txh; - int holds = 0; - - /* - * By asserting that the tx is assigned, we're counting the - * number of dn_tx_holds, which is the same as the number of - * dn_holds. Otherwise, we'd be counting dn_holds, but - * dn_tx_holds could be 0. - */ - ASSERT(tx->tx_txg != 0); - - /* if (tx->tx_anyobj == TRUE) */ - /* return (0); */ - - for (txh = list_head(&tx->tx_holds); txh; - txh = list_next(&tx->tx_holds, txh)) { - if (txh->txh_dnode && txh->txh_dnode->dn_object == object) - holds++; - } - - return (holds); -} - #ifdef ZFS_DEBUG void dmu_tx_dirty_buf(dmu_tx_t *tx, dmu_buf_impl_t *db) { - dmu_tx_hold_t *txh; - int match_object = FALSE, match_offset = FALSE; - dnode_t *dn; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 24 21:45:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1820D80291; Wed, 24 May 2017 21:45:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A133A18DB; Wed, 24 May 2017 21:45:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLjqqF036519; Wed, 24 May 2017 21:45:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLjqPl036516; Wed, 24 May 2017 21:45:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242145.v4OLjqPl036516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 21:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318822 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:45:54 -0000 Author: avg Date: Wed May 24 21:45:52 2017 New Revision: 318822 URL: https://svnweb.freebsd.org/changeset/base/318822 Log: MFC r316913: 7869 panic in bpobj_space(): null pointer dereference illumos/illumos-gate@a3905a45920de250d181b66ac0b6b71bd200d9ef https://github.com/illumos/illumos-gate/commit/a3905a45920de250d181b66ac0b6b71bd200d9ef https://www.illumos.org/issues/7869 The issue fixed by this patch is a race condition in the deadlist code. A thread executing an administrative command that uses `dsl_deadlist_space_range()` holds the lock of the whole `deadlist_t` to protect the access of all its entries that the deadlist contains in an avl tree. Sync threads trying to insert a new entry in the deadlist (through `dsl_deadlist_insert()` -> `dle_enqueue()`) do not hold the deadlist lock at that moment. If the `dle_bpobj` is the empty bpobj (our sentinel value), we close and reopen it. Between these two operations, it is possible for the `dsl_deadlist_space_range()` thread to dereference that bpobj which is `NULL` during that window. Threads should hold the a deadlist's `dl_lock` when they manipulate its internal data so scenarios like the one above are avoided. In addition, threads should also hold the bpobj lock whenever they are allocating the subobj list of a bpobj, and not just when they actually insert the subobj to the list. This way we can avoid potential memory leaks. Reviewed by: Matt Ahrens Reviewed by: Dan Kimmel Reviewed by: Steve Gonczi Reviewed by: John Kennedy Reviewed by: George Melikov Reviewed by: Brian Behlendorf Approved by: Dan McDonald Author: Serapheim Dimitropoulos MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c Wed May 24 21:43:34 2017 (r318821) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c Wed May 24 21:45:52 2017 (r318822) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -395,6 +395,7 @@ bpobj_enqueue_subobj(bpobj_t *bpo, uint6 return; } + mutex_enter(&bpo->bpo_lock); dmu_buf_will_dirty(bpo->bpo_dbuf, tx); if (bpo->bpo_phys->bpo_subobjs == 0) { bpo->bpo_phys->bpo_subobjs = dmu_object_alloc(bpo->bpo_os, @@ -406,7 +407,6 @@ bpobj_enqueue_subobj(bpobj_t *bpo, uint6 ASSERT0(dmu_object_info(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs, &doi)); ASSERT3U(doi.doi_type, ==, DMU_OT_BPOBJ_SUBOBJ); - mutex_enter(&bpo->bpo_lock); dmu_write(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs, bpo->bpo_phys->bpo_num_subobjs * sizeof (subobj), sizeof (subobj), &subobj, tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c Wed May 24 21:43:34 2017 (r318821) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c Wed May 24 21:45:52 2017 (r318822) @@ -72,6 +72,8 @@ dsl_deadlist_load_tree(dsl_deadlist_t *d zap_cursor_t zc; zap_attribute_t za; + ASSERT(MUTEX_HELD(&dl->dl_lock)); + ASSERT(!dl->dl_oldfmt); if (dl->dl_havetree) return; @@ -182,6 +184,7 @@ static void dle_enqueue(dsl_deadlist_t *dl, dsl_deadlist_entry_t *dle, const blkptr_t *bp, dmu_tx_t *tx) { + ASSERT(MUTEX_HELD(&dl->dl_lock)); if (dle->dle_bpobj.bpo_object == dmu_objset_pool(dl->dl_os)->dp_empty_bpobj) { uint64_t obj = bpobj_alloc(dl->dl_os, SPA_OLD_MAXBLOCKSIZE, tx); @@ -198,6 +201,7 @@ static void dle_enqueue_subobj(dsl_deadlist_t *dl, dsl_deadlist_entry_t *dle, uint64_t obj, dmu_tx_t *tx) { + ASSERT(MUTEX_HELD(&dl->dl_lock)); if (dle->dle_bpobj.bpo_object != dmu_objset_pool(dl->dl_os)->dp_empty_bpobj) { bpobj_enqueue_subobj(&dle->dle_bpobj, obj, tx); @@ -222,15 +226,14 @@ dsl_deadlist_insert(dsl_deadlist_t *dl, return; } + mutex_enter(&dl->dl_lock); dsl_deadlist_load_tree(dl); dmu_buf_will_dirty(dl->dl_dbuf, tx); - mutex_enter(&dl->dl_lock); dl->dl_phys->dl_used += bp_get_dsize_sync(dmu_objset_spa(dl->dl_os), bp); dl->dl_phys->dl_comp += BP_GET_PSIZE(bp); dl->dl_phys->dl_uncomp += BP_GET_UCSIZE(bp); - mutex_exit(&dl->dl_lock); dle_tofind.dle_mintxg = bp->blk_birth; dle = avl_find(&dl->dl_tree, &dle_tofind, &where); @@ -239,6 +242,7 @@ dsl_deadlist_insert(dsl_deadlist_t *dl, else dle = AVL_PREV(&dl->dl_tree, dle); dle_enqueue(dl, dle, bp, tx); + mutex_exit(&dl->dl_lock); } /* @@ -254,16 +258,19 @@ dsl_deadlist_add_key(dsl_deadlist_t *dl, if (dl->dl_oldfmt) return; - dsl_deadlist_load_tree(dl); - dle = kmem_alloc(sizeof (*dle), KM_SLEEP); dle->dle_mintxg = mintxg; + + mutex_enter(&dl->dl_lock); + dsl_deadlist_load_tree(dl); + obj = bpobj_alloc_empty(dl->dl_os, SPA_OLD_MAXBLOCKSIZE, tx); VERIFY3U(0, ==, bpobj_open(&dle->dle_bpobj, dl->dl_os, obj)); avl_add(&dl->dl_tree, dle); VERIFY3U(0, ==, zap_add_int_key(dl->dl_os, dl->dl_object, mintxg, obj, tx)); + mutex_exit(&dl->dl_lock); } /* @@ -278,6 +285,7 @@ dsl_deadlist_remove_key(dsl_deadlist_t * if (dl->dl_oldfmt) return; + mutex_enter(&dl->dl_lock); dsl_deadlist_load_tree(dl); dle_tofind.dle_mintxg = mintxg; @@ -291,6 +299,7 @@ dsl_deadlist_remove_key(dsl_deadlist_t * kmem_free(dle, sizeof (*dle)); VERIFY3U(0, ==, zap_remove_int(dl->dl_os, dl->dl_object, mintxg, tx)); + mutex_exit(&dl->dl_lock); } /* @@ -334,6 +343,7 @@ dsl_deadlist_clone(dsl_deadlist_t *dl, u return (newobj); } + mutex_enter(&dl->dl_lock); dsl_deadlist_load_tree(dl); for (dle = avl_first(&dl->dl_tree); dle; @@ -347,6 +357,7 @@ dsl_deadlist_clone(dsl_deadlist_t *dl, u VERIFY3U(0, ==, zap_add_int_key(dl->dl_os, newobj, dle->dle_mintxg, obj, tx)); } + mutex_exit(&dl->dl_lock); return (newobj); } @@ -424,6 +435,8 @@ dsl_deadlist_insert_bpobj(dsl_deadlist_t uint64_t used, comp, uncomp; bpobj_t bpo; + ASSERT(MUTEX_HELD(&dl->dl_lock)); + VERIFY3U(0, ==, bpobj_open(&bpo, dl->dl_os, obj)); VERIFY3U(0, ==, bpobj_space(&bpo, &used, &comp, &uncomp)); bpobj_close(&bpo); @@ -431,11 +444,9 @@ dsl_deadlist_insert_bpobj(dsl_deadlist_t dsl_deadlist_load_tree(dl); dmu_buf_will_dirty(dl->dl_dbuf, tx); - mutex_enter(&dl->dl_lock); dl->dl_phys->dl_used += used; dl->dl_phys->dl_comp += comp; dl->dl_phys->dl_uncomp += uncomp; - mutex_exit(&dl->dl_lock); dle_tofind.dle_mintxg = birth; dle = avl_find(&dl->dl_tree, &dle_tofind, &where); @@ -475,6 +486,7 @@ dsl_deadlist_merge(dsl_deadlist_t *dl, u return; } + mutex_enter(&dl->dl_lock); for (zap_cursor_init(&zc, dl->dl_os, obj); zap_cursor_retrieve(&zc, &za) == 0; zap_cursor_advance(&zc)) { @@ -489,6 +501,7 @@ dsl_deadlist_merge(dsl_deadlist_t *dl, u dmu_buf_will_dirty(bonus, tx); bzero(dlp, sizeof (*dlp)); dmu_buf_rele(bonus, FTAG); + mutex_exit(&dl->dl_lock); } /* @@ -503,6 +516,8 @@ dsl_deadlist_move_bpobj(dsl_deadlist_t * avl_index_t where; ASSERT(!dl->dl_oldfmt); + + mutex_enter(&dl->dl_lock); dmu_buf_will_dirty(dl->dl_dbuf, tx); dsl_deadlist_load_tree(dl); @@ -518,14 +533,12 @@ dsl_deadlist_move_bpobj(dsl_deadlist_t * VERIFY3U(0, ==, bpobj_space(&dle->dle_bpobj, &used, &comp, &uncomp)); - mutex_enter(&dl->dl_lock); ASSERT3U(dl->dl_phys->dl_used, >=, used); ASSERT3U(dl->dl_phys->dl_comp, >=, comp); ASSERT3U(dl->dl_phys->dl_uncomp, >=, uncomp); dl->dl_phys->dl_used -= used; dl->dl_phys->dl_comp -= comp; dl->dl_phys->dl_uncomp -= uncomp; - mutex_exit(&dl->dl_lock); VERIFY3U(0, ==, zap_remove_int(dl->dl_os, dl->dl_object, dle->dle_mintxg, tx)); @@ -536,4 +549,5 @@ dsl_deadlist_move_bpobj(dsl_deadlist_t * kmem_free(dle, sizeof (*dle)); dle = dle_next; } + mutex_exit(&dl->dl_lock); } From owner-svn-src-all@freebsd.org Wed May 24 21:49:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0305D803E5; Wed, 24 May 2017 21:49:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C07F1B29; Wed, 24 May 2017 21:49:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLnMdi036705; Wed, 24 May 2017 21:49:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLnMTa036698; Wed, 24 May 2017 21:49:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242149.v4OLnMTa036698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 21:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318823 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:49:23 -0000 Author: avg Date: Wed May 24 21:49:21 2017 New Revision: 318823 URL: https://svnweb.freebsd.org/changeset/base/318823 Log: MFC r316914: 7801 add more by-dnode routines illumos/illumos-gate@b0c42cd4706ba01ce158bd2bb1004f7e59eca5fe https://github.com/illumos/illumos-gate/commit/b0c42cd4706ba01ce158bd2bb1004f7e59eca5fe https://www.illumos.org/issues/7801 Add *_by_dnode() routines for accessing objects given their dnode_t *, this is more efficient than accessing the object by (objset_t *, uint64_t object). This change converts some but not all of the existing consumers. As performance-sensitive code paths are discovered they should be converted to use these routines. Ported from: https://github.com/zfsonlinux/zfs/commit/0eef1bde31d67091d3deed23fe2394f5a8bf2276 Reviewed by: Matthew Ahrens Reviewed by: Brian Behlendorf Reviewed by: Pavel Zakharov Approved by: Robert Mustacchi Author: bzzz77 MFC after: 24 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed May 24 21:45:52 2017 (r318822) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed May 24 21:49:21 2017 (r318823) @@ -871,17 +871,12 @@ dmu_free_range(objset_t *os, uint64_t ob return (0); } -int -dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, +static int +dmu_read_impl(dnode_t *dn, uint64_t offset, uint64_t size, void *buf, uint32_t flags) { - dnode_t *dn; dmu_buf_t **dbp; - int numbufs, err; - - err = dnode_hold(os, object, FTAG, &dn); - if (err) - return (err); + int numbufs, err = 0; /* * Deal with odd block sizes, where there can't be data past the first @@ -926,22 +921,37 @@ dmu_read(objset_t *os, uint64_t object, } dmu_buf_rele_array(dbp, numbufs, FTAG); } - dnode_rele(dn, FTAG); return (err); } -void -dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, - const void *buf, dmu_tx_t *tx) +int +dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, + void *buf, uint32_t flags) { - dmu_buf_t **dbp; - int numbufs, i; + dnode_t *dn; + int err; - if (size == 0) - return; + err = dnode_hold(os, object, FTAG, &dn); + if (err != 0) + return (err); - VERIFY(0 == dmu_buf_hold_array(os, object, offset, size, - FALSE, FTAG, &numbufs, &dbp)); + err = dmu_read_impl(dn, offset, size, buf, flags); + dnode_rele(dn, FTAG); + return (err); +} + +int +dmu_read_by_dnode(dnode_t *dn, uint64_t offset, uint64_t size, void *buf, + uint32_t flags) +{ + return (dmu_read_impl(dn, offset, size, buf, flags)); +} + +static void +dmu_write_impl(dmu_buf_t **dbp, int numbufs, uint64_t offset, uint64_t size, + const void *buf, dmu_tx_t *tx) +{ + int i; for (i = 0; i < numbufs; i++) { int tocpy; @@ -969,6 +979,37 @@ dmu_write(objset_t *os, uint64_t object, size -= tocpy; buf = (char *)buf + tocpy; } +} + +void +dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, + const void *buf, dmu_tx_t *tx) +{ + dmu_buf_t **dbp; + int numbufs; + + if (size == 0) + return; + + VERIFY0(dmu_buf_hold_array(os, object, offset, size, + FALSE, FTAG, &numbufs, &dbp)); + dmu_write_impl(dbp, numbufs, offset, size, buf, tx); + dmu_buf_rele_array(dbp, numbufs, FTAG); +} + +void +dmu_write_by_dnode(dnode_t *dn, uint64_t offset, uint64_t size, + const void *buf, dmu_tx_t *tx) +{ + dmu_buf_t **dbp; + int numbufs; + + if (size == 0) + return; + + VERIFY0(dmu_buf_hold_array_by_dnode(dn, offset, size, + FALSE, FTAG, &numbufs, &dbp, DMU_READ_PREFETCH)); + dmu_write_impl(dbp, numbufs, offset, size, buf, tx); dmu_buf_rele_array(dbp, numbufs, FTAG); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Wed May 24 21:45:52 2017 (r318822) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Wed May 24 21:49:21 2017 (r318823) @@ -93,11 +93,11 @@ dmu_object_alloc(objset_t *os, dmu_objec } dnode_allocate(dn, ot, blocksize, 0, bonustype, bonuslen, tx); - dnode_rele(dn, FTAG); - mutex_exit(&os->os_obj_lock); - dmu_tx_add_new_object(tx, os, object); + dmu_tx_add_new_object(tx, dn); + dnode_rele(dn, FTAG); + return (object); } @@ -115,9 +115,10 @@ dmu_object_claim(objset_t *os, uint64_t if (err) return (err); dnode_allocate(dn, ot, blocksize, 0, bonustype, bonuslen, tx); + dmu_tx_add_new_object(tx, dn); + dnode_rele(dn, FTAG); - dmu_tx_add_new_object(tx, os, object); return (0); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed May 24 21:45:52 2017 (r318822) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed May 24 21:49:21 2017 (r318823) @@ -93,21 +93,14 @@ dmu_tx_private_ok(dmu_tx_t *tx) } static dmu_tx_hold_t * -dmu_tx_hold_object_impl(dmu_tx_t *tx, objset_t *os, uint64_t object, - enum dmu_tx_hold_type type, uint64_t arg1, uint64_t arg2) +dmu_tx_hold_dnode_impl(dmu_tx_t *tx, dnode_t *dn, enum dmu_tx_hold_type type, + uint64_t arg1, uint64_t arg2) { dmu_tx_hold_t *txh; - dnode_t *dn = NULL; - int err; - - if (object != DMU_NEW_OBJECT) { - err = dnode_hold(os, object, tx, &dn); - if (err) { - tx->tx_err = err; - return (NULL); - } - if (err == 0 && tx->tx_txg != 0) { + if (dn != NULL) { + (void) refcount_add(&dn->dn_holds, tx); + if (tx->tx_txg != 0) { mutex_enter(&dn->dn_mtx); /* * dn->dn_assigned_txg == tx->tx_txg doesn't pose a @@ -134,17 +127,36 @@ dmu_tx_hold_object_impl(dmu_tx_t *tx, ob return (txh); } +static dmu_tx_hold_t * +dmu_tx_hold_object_impl(dmu_tx_t *tx, objset_t *os, uint64_t object, + enum dmu_tx_hold_type type, uint64_t arg1, uint64_t arg2) +{ + dnode_t *dn = NULL; + dmu_tx_hold_t *txh; + int err; + + if (object != DMU_NEW_OBJECT) { + err = dnode_hold(os, object, FTAG, &dn); + if (err != 0) { + tx->tx_err = err; + return (NULL); + } + } + txh = dmu_tx_hold_dnode_impl(tx, dn, type, arg1, arg2); + if (dn != NULL) + dnode_rele(dn, FTAG); + return (txh); +} + void -dmu_tx_add_new_object(dmu_tx_t *tx, objset_t *os, uint64_t object) +dmu_tx_add_new_object(dmu_tx_t *tx, dnode_t *dn) { /* * If we're syncing, they can manipulate any object anyhow, and * the hold on the dnode_t can cause problems. */ - if (!dmu_tx_is_syncing(tx)) { - (void) dmu_tx_hold_object_impl(tx, os, - object, THT_NEWOBJECT, 0, 0); - } + if (!dmu_tx_is_syncing(tx)) + (void) dmu_tx_hold_dnode_impl(tx, dn, THT_NEWOBJECT, 0, 0); } /* @@ -282,11 +294,26 @@ dmu_tx_hold_write(dmu_tx_t *tx, uint64_t txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, object, THT_WRITE, off, len); - if (txh == NULL) - return; + if (txh != NULL) { + dmu_tx_count_write(txh, off, len); + dmu_tx_count_dnode(txh); + } +} - dmu_tx_count_write(txh, off, len); - dmu_tx_count_dnode(txh); +void +dmu_tx_hold_write_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off, int len) +{ + dmu_tx_hold_t *txh; + + ASSERT0(tx->tx_txg); + ASSERT3U(len, <=, DMU_MAX_ACCESS); + ASSERT(len == 0 || UINT64_MAX - off >= len - 1); + + txh = dmu_tx_hold_dnode_impl(tx, dn, THT_WRITE, off, len); + if (txh != NULL) { + dmu_tx_count_write(txh, off, len); + dmu_tx_count_dnode(txh); + } } /* @@ -303,18 +330,18 @@ dmu_tx_mark_netfree(dmu_tx_t *tx) tx->tx_netfree = B_TRUE; } -void -dmu_tx_hold_free(dmu_tx_t *tx, uint64_t object, uint64_t off, uint64_t len) +static void +dmu_tx_hold_free_impl(dmu_tx_hold_t *txh, uint64_t off, uint64_t len) { + dmu_tx_t *tx; + dnode_t *dn; int err; + zio_t *zio; + tx = txh->txh_tx; ASSERT(tx->tx_txg == 0); - dmu_tx_hold_t *txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, - object, THT_FREE, off, len); - if (txh == NULL) - return; - dnode_t *dn = txh->txh_dnode; + dn = txh->txh_dnode; dmu_tx_count_dnode(txh); if (off >= (dn->dn_maxblkid + 1) * dn->dn_datablksz) @@ -396,17 +423,36 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t } void -dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t object, int add, const char *name) +dmu_tx_hold_free(dmu_tx_t *tx, uint64_t object, uint64_t off, uint64_t len) +{ + dmu_tx_hold_t *txh; + + txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, + object, THT_FREE, off, len); + if (txh != NULL) + (void) dmu_tx_hold_free_impl(txh, off, len); +} + +void +dmu_tx_hold_free_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off, uint64_t len) +{ + dmu_tx_hold_t *txh; + + txh = dmu_tx_hold_dnode_impl(tx, dn, THT_FREE, off, len); + if (txh != NULL) + (void) dmu_tx_hold_free_impl(txh, off, len); +} + +static void +dmu_tx_hold_zap_impl(dmu_tx_hold_t *txh, int add, const char *name) { + dmu_tx_t *tx = txh->txh_tx; + dnode_t *dn; int err; ASSERT(tx->tx_txg == 0); - dmu_tx_hold_t *txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, - object, THT_ZAP, add, (uintptr_t)name); - if (txh == NULL) - return; - dnode_t *dn = txh->txh_dnode; + dn = txh->txh_dnode; dmu_tx_count_dnode(txh); @@ -450,6 +496,32 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o } void +dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t object, int add, const char *name) +{ + dmu_tx_hold_t *txh; + + ASSERT0(tx->tx_txg); + + txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, + object, THT_ZAP, add, (uintptr_t)name); + if (txh != NULL) + dmu_tx_hold_zap_impl(txh, add, name); +} + +void +dmu_tx_hold_zap_by_dnode(dmu_tx_t *tx, dnode_t *dn, int add, const char *name) +{ + dmu_tx_hold_t *txh; + + ASSERT0(tx->tx_txg); + ASSERT(dn != NULL); + + txh = dmu_tx_hold_dnode_impl(tx, dn, THT_ZAP, add, (uintptr_t)name); + if (txh != NULL) + dmu_tx_hold_zap_impl(txh, add, name); +} + +void dmu_tx_hold_bonus(dmu_tx_t *tx, uint64_t object) { dmu_tx_hold_t *txh; @@ -463,6 +535,18 @@ dmu_tx_hold_bonus(dmu_tx_t *tx, uint64_t } void +dmu_tx_hold_bonus_by_dnode(dmu_tx_t *tx, dnode_t *dn) +{ + dmu_tx_hold_t *txh; + + ASSERT0(tx->tx_txg); + + txh = dmu_tx_hold_dnode_impl(tx, dn, THT_BONUS, 0, 0); + if (txh) + dmu_tx_count_dnode(txh); +} + +void dmu_tx_hold_space(dmu_tx_t *tx, uint64_t space) { dmu_tx_hold_t *txh; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Wed May 24 21:45:52 2017 (r318822) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Wed May 24 21:49:21 2017 (r318823) @@ -669,10 +669,17 @@ void dmu_buf_will_dirty(dmu_buf_t *db, d dmu_tx_t *dmu_tx_create(objset_t *os); void dmu_tx_hold_write(dmu_tx_t *tx, uint64_t object, uint64_t off, int len); +void dmu_tx_hold_write_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off, + int len); void dmu_tx_hold_free(dmu_tx_t *tx, uint64_t object, uint64_t off, uint64_t len); +void dmu_tx_hold_free_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off, + uint64_t len); void dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t object, int add, const char *name); +void dmu_tx_hold_zap_by_dnode(dmu_tx_t *tx, dnode_t *dn, int add, + const char *name); void dmu_tx_hold_bonus(dmu_tx_t *tx, uint64_t object); +void dmu_tx_hold_bonus_by_dnode(dmu_tx_t *tx, dnode_t *dn); void dmu_tx_hold_spill(dmu_tx_t *tx, uint64_t object); void dmu_tx_hold_sa(dmu_tx_t *tx, struct sa_handle *hdl, boolean_t may_grow); void dmu_tx_hold_sa_create(dmu_tx_t *tx, int total_size); @@ -722,8 +729,12 @@ int dmu_free_long_object(objset_t *os, u #define DMU_READ_NO_PREFETCH 1 /* don't prefetch */ int dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, void *buf, uint32_t flags); +int dmu_read_by_dnode(dnode_t *dn, uint64_t offset, uint64_t size, void *buf, + uint32_t flags); void dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, const void *buf, dmu_tx_t *tx); +void dmu_write_by_dnode(dnode_t *dn, uint64_t offset, uint64_t size, + const void *buf, dmu_tx_t *tx); void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, dmu_tx_t *tx); int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h Wed May 24 21:45:52 2017 (r318822) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h Wed May 24 21:49:21 2017 (r318823) @@ -135,7 +135,7 @@ extern dmu_tx_t *dmu_tx_create_assigned( dmu_tx_t *dmu_tx_create_dd(dsl_dir_t *dd); int dmu_tx_is_syncing(dmu_tx_t *tx); int dmu_tx_private_ok(dmu_tx_t *tx); -void dmu_tx_add_new_object(dmu_tx_t *tx, objset_t *os, uint64_t object); +void dmu_tx_add_new_object(dmu_tx_t *tx, dnode_t *dn); void dmu_tx_dirty_buf(dmu_tx_t *tx, struct dmu_buf_impl *db); void dmu_tx_hold_space(dmu_tx_t *tx, uint64_t space); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h Wed May 24 21:45:52 2017 (r318822) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h Wed May 24 21:49:21 2017 (r318823) @@ -220,6 +220,9 @@ int zap_count_write_by_dnode(dnode_t *dn int zap_add(objset_t *ds, uint64_t zapobj, const char *key, int integer_size, uint64_t num_integers, const void *val, dmu_tx_t *tx); +int zap_add_by_dnode(dnode_t *dn, const char *key, + int integer_size, uint64_t num_integers, + const void *val, dmu_tx_t *tx); int zap_add_uint64(objset_t *ds, uint64_t zapobj, const uint64_t *key, int key_numints, int integer_size, uint64_t num_integers, const void *val, dmu_tx_t *tx); @@ -259,6 +262,7 @@ int zap_length_uint64(objset_t *os, uint int zap_remove(objset_t *ds, uint64_t zapobj, const char *name, dmu_tx_t *tx); int zap_remove_norm(objset_t *ds, uint64_t zapobj, const char *name, matchtype_t mt, dmu_tx_t *tx); +int zap_remove_by_dnode(dnode_t *dn, const char *name, dmu_tx_t *tx); int zap_remove_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key, int key_numints, dmu_tx_t *tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Wed May 24 21:45:52 2017 (r318822) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Wed May 24 21:49:21 2017 (r318823) @@ -1120,34 +1120,30 @@ again: ASSERT(!"out of entries!"); } -int -zap_add(objset_t *os, uint64_t zapobj, const char *key, +static int +zap_add_impl(zap_t *zap, const char *key, int integer_size, uint64_t num_integers, - const void *val, dmu_tx_t *tx) + const void *val, dmu_tx_t *tx, void *tag) { - zap_t *zap; - int err; + int err = 0; mzap_ent_t *mze; const uint64_t *intval = val; zap_name_t *zn; - err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap); - if (err) - return (err); zn = zap_name_alloc(zap, key, 0); if (zn == NULL) { - zap_unlockdir(zap, FTAG); + zap_unlockdir(zap, tag); return (SET_ERROR(ENOTSUP)); } if (!zap->zap_ismicro) { - err = fzap_add(zn, integer_size, num_integers, val, FTAG, tx); + err = fzap_add(zn, integer_size, num_integers, val, tag, tx); zap = zn->zn_zap; /* fzap_add() may change zap */ } else if (integer_size != 8 || num_integers != 1 || strlen(key) >= MZAP_NAME_LEN) { - err = mzap_upgrade(&zn->zn_zap, FTAG, tx, 0); + err = mzap_upgrade(&zn->zn_zap, tag, tx, 0); if (err == 0) { err = fzap_add(zn, integer_size, num_integers, val, - FTAG, tx); + tag, tx); } zap = zn->zn_zap; /* fzap_add() may change zap */ } else { @@ -1161,7 +1157,39 @@ zap_add(objset_t *os, uint64_t zapobj, c ASSERT(zap == zn->zn_zap); zap_name_free(zn); if (zap != NULL) /* may be NULL if fzap_add() failed */ - zap_unlockdir(zap, FTAG); + zap_unlockdir(zap, tag); + return (err); +} + +int +zap_add(objset_t *os, uint64_t zapobj, const char *key, + int integer_size, uint64_t num_integers, + const void *val, dmu_tx_t *tx) +{ + zap_t *zap; + int err; + + err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap); + if (err != 0) + return (err); + err = zap_add_impl(zap, key, integer_size, num_integers, val, tx, FTAG); + /* zap_add_impl() calls zap_unlockdir() */ + return (err); +} + +int +zap_add_by_dnode(dnode_t *dn, const char *key, + int integer_size, uint64_t num_integers, + const void *val, dmu_tx_t *tx) +{ + zap_t *zap; + int err; + + err = zap_lockdir_by_dnode(dn, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap); + if (err != 0) + return (err); + err = zap_add_impl(zap, key, integer_size, num_integers, val, tx, FTAG); + /* zap_add_impl() calls zap_unlockdir() */ return (err); } @@ -1279,23 +1307,17 @@ zap_remove(objset_t *os, uint64_t zapobj return (zap_remove_norm(os, zapobj, name, 0, tx)); } -int -zap_remove_norm(objset_t *os, uint64_t zapobj, const char *name, +static int +zap_remove_impl(zap_t *zap, const char *name, matchtype_t mt, dmu_tx_t *tx) { - zap_t *zap; - int err; mzap_ent_t *mze; zap_name_t *zn; + int err = 0; - err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, FALSE, FTAG, &zap); - if (err) - return (err); zn = zap_name_alloc(zap, name, mt); - if (zn == NULL) { - zap_unlockdir(zap, FTAG); + if (zn == NULL) return (SET_ERROR(ENOTSUP)); - } if (!zap->zap_ismicro) { err = fzap_remove(zn, tx); } else { @@ -1310,6 +1332,34 @@ zap_remove_norm(objset_t *os, uint64_t z } } zap_name_free(zn); + return (err); +} + +int +zap_remove_norm(objset_t *os, uint64_t zapobj, const char *name, + matchtype_t mt, dmu_tx_t *tx) +{ + zap_t *zap; + int err; + + err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, FALSE, FTAG, &zap); + if (err) + return (err); + err = zap_remove_impl(zap, name, mt, tx); + zap_unlockdir(zap, FTAG); + return (err); +} + +int +zap_remove_by_dnode(dnode_t *dn, const char *name, dmu_tx_t *tx) +{ + zap_t *zap; + int err; + + err = zap_lockdir_by_dnode(dn, tx, RW_WRITER, TRUE, FALSE, FTAG, &zap); + if (err) + return (err); + err = zap_remove_impl(zap, name, 0, tx); zap_unlockdir(zap, FTAG); return (err); } From owner-svn-src-all@freebsd.org Wed May 24 21:52:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 223B5D805CC; Wed, 24 May 2017 21:52:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6B901E2D; Wed, 24 May 2017 21:52:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLqKSi040483; Wed, 24 May 2017 21:52:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLqKsL040482; Wed, 24 May 2017 21:52:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242152.v4OLqKsL040482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 21:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318824 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:52:22 -0000 Author: avg Date: Wed May 24 21:52:20 2017 New Revision: 318824 URL: https://svnweb.freebsd.org/changeset/base/318824 Log: MFC r316915: 7801 add more by-dnode routines (lint) illumos/illumos-gate@411be58a6e030a3b606f1afcc7f2e2459ffda844 https://github.com/illumos/illumos-gate/commit/411be58a6e030a3b606f1afcc7f2e2459ffda844 MFC after: 24 days X-MFC with: r318823 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed May 24 21:49:21 2017 (r318823) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed May 24 21:52:20 2017 (r318824) @@ -336,7 +336,6 @@ dmu_tx_hold_free_impl(dmu_tx_hold_t *txh dmu_tx_t *tx; dnode_t *dn; int err; - zio_t *zio; tx = txh->txh_tx; ASSERT(tx->tx_txg == 0); @@ -444,7 +443,7 @@ dmu_tx_hold_free_by_dnode(dmu_tx_t *tx, } static void -dmu_tx_hold_zap_impl(dmu_tx_hold_t *txh, int add, const char *name) +dmu_tx_hold_zap_impl(dmu_tx_hold_t *txh, const char *name) { dmu_tx_t *tx = txh->txh_tx; dnode_t *dn; @@ -505,7 +504,7 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, object, THT_ZAP, add, (uintptr_t)name); if (txh != NULL) - dmu_tx_hold_zap_impl(txh, add, name); + dmu_tx_hold_zap_impl(txh, name); } void @@ -518,7 +517,7 @@ dmu_tx_hold_zap_by_dnode(dmu_tx_t *tx, d txh = dmu_tx_hold_dnode_impl(tx, dn, THT_ZAP, add, (uintptr_t)name); if (txh != NULL) - dmu_tx_hold_zap_impl(txh, add, name); + dmu_tx_hold_zap_impl(txh, name); } void From owner-svn-src-all@freebsd.org Wed May 24 21:53:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17222D8063D; Wed, 24 May 2017 21:53:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA49410FC; Wed, 24 May 2017 21:53:48 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLrlA7040593; Wed, 24 May 2017 21:53:47 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLrlSh040591; Wed, 24 May 2017 21:53:47 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242153.v4OLrlSh040591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 21:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318825 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:53:49 -0000 Author: np Date: Wed May 24 21:53:47 2017 New Revision: 318825 URL: https://svnweb.freebsd.org/changeset/base/318825 Log: MFC r309725: cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities any more (since r307394). Do it in the driver instead. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 21:52:20 2017 (r318824) +++ stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 21:53:47 2017 (r318825) @@ -1444,6 +1444,10 @@ cxgbe_vi_attach(device_t dev, struct vi_ if (vi->nofldrxq != 0) ifp->if_capabilities |= IFCAP_TOE; #endif +#ifdef DEV_NETMAP + if (vi->nnmrxq != 0) + ifp->if_capabilities |= IFCAP_NETMAP; +#endif ifp->if_capenable = T4_CAP_ENABLE; ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6; @@ -1462,7 +1466,7 @@ cxgbe_vi_attach(device_t dev, struct vi_ ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP - if (vi->nnmrxq != 0) + if (ifp->if_capabilities & IFCAP_NETMAP) cxgbe_nm_attach(vi); #endif sb = sbuf_new_auto(); Modified: stable/11/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:52:20 2017 (r318824) +++ stable/11/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:53:47 2017 (r318825) @@ -870,7 +870,7 @@ cxgbe_nm_attach(struct vi_info *vi) na.nm_register = cxgbe_netmap_reg; na.num_tx_rings = vi->nnmtxq; na.num_rx_rings = vi->nnmrxq; - netmap_attach(&na); /* This adds IFCAP_NETMAP to if_capabilities */ + netmap_attach(&na); } void From owner-svn-src-all@freebsd.org Wed May 24 21:54:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE59AD80698; Wed, 24 May 2017 21:54:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8658A123D; Wed, 24 May 2017 21:54:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLs4Jk040652; Wed, 24 May 2017 21:54:04 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLs4t1040650; Wed, 24 May 2017 21:54:04 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242154.v4OLs4t1040650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 21:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318826 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:54:05 -0000 Author: np Date: Wed May 24 21:54:04 2017 New Revision: 318826 URL: https://svnweb.freebsd.org/changeset/base/318826 Log: MFC r309725: cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities any more (since r307394). Do it in the driver instead. Modified: stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 21:53:47 2017 (r318825) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 21:54:04 2017 (r318826) @@ -1370,6 +1370,10 @@ cxgbe_vi_attach(device_t dev, struct vi_ if (vi->nofldrxq != 0) ifp->if_capabilities |= IFCAP_TOE; #endif +#ifdef DEV_NETMAP + if (vi->nnmrxq != 0) + ifp->if_capabilities |= IFCAP_NETMAP; +#endif ifp->if_capenable = T4_CAP_ENABLE; ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6; @@ -1388,7 +1392,7 @@ cxgbe_vi_attach(device_t dev, struct vi_ ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP - if (vi->nnmrxq != 0) + if (ifp->if_capabilities & IFCAP_NETMAP) cxgbe_nm_attach(vi); #endif sb = sbuf_new_auto(); Modified: stable/10/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:53:47 2017 (r318825) +++ stable/10/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:54:04 2017 (r318826) @@ -874,7 +874,7 @@ cxgbe_nm_attach(struct vi_info *vi) na.nm_register = cxgbe_netmap_reg; na.num_tx_rings = vi->nnmtxq; na.num_rx_rings = vi->nnmrxq; - netmap_attach(&na); /* This adds IFCAP_NETMAP to if_capabilities */ + netmap_attach(&na); } void From owner-svn-src-all@freebsd.org Wed May 24 22:15:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33D37D80ABE; Wed, 24 May 2017 22:15:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10A831CFE; Wed, 24 May 2017 22:15:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMFHFa049318; Wed, 24 May 2017 22:15:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMFG8d049313; Wed, 24 May 2017 22:15:16 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242215.v4OMFG8d049313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 22:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318827 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:15:18 -0000 Author: avg Date: Wed May 24 22:15:16 2017 New Revision: 318827 URL: https://svnweb.freebsd.org/changeset/base/318827 Log: MFV r316916: 7970 zfs_arc_num_sublists_per_state should be common to all multilists illumos/illumos-gate@10fbdecb05f411234920f8d3c92c148d39106d7e https://github.com/illumos/illumos-gate/commit/10fbdecb05f411234920f8d3c92c148d39106d7e https://www.illumos.org/issues/7970 The global tunable zfs_arc_num_sublists_per_state is used by the ARC and the dbuf cache, and other users are planned. We should change this tunable to be common to all multilists. Reviewed by: Pavel Zakharov Reviewed by: Brad Lewis Reviewed by: Saso Kiselkov Reviewed by: Brian Behlendorf Approved by: Dan McDonald Author: Matthew Ahrens MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed May 24 21:54:04 2017 (r318826) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed May 24 22:15:16 2017 (r318827) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 by Saso Kiselkov. All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ @@ -304,13 +304,6 @@ uint_t arc_reduce_dnlc_percent = 3; */ int zfs_arc_evict_batch_limit = 10; -/* - * The number of sublists used for each of the arc state lists. If this - * is not set to a suitable value by the user, it will be configured to - * the number of CPUs on the system in arc_init(). - */ -int zfs_arc_num_sublists_per_state = 0; - /* number of seconds before growing cache again */ static int arc_grow_retry = 60; @@ -6219,43 +6212,43 @@ arc_state_init(void) multilist_create(&arc_mru->arcs_list[ARC_BUFC_METADATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); multilist_create(&arc_mru->arcs_list[ARC_BUFC_DATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); multilist_create(&arc_mru_ghost->arcs_list[ARC_BUFC_METADATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); multilist_create(&arc_mru_ghost->arcs_list[ARC_BUFC_DATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); multilist_create(&arc_mfu->arcs_list[ARC_BUFC_METADATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); multilist_create(&arc_mfu->arcs_list[ARC_BUFC_DATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); multilist_create(&arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); multilist_create(&arc_mfu_ghost->arcs_list[ARC_BUFC_DATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); multilist_create(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); multilist_create(&arc_l2c_only->arcs_list[ARC_BUFC_DATA], sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), - zfs_arc_num_sublists_per_state, arc_state_multilist_index_func); + arc_state_multilist_index_func); refcount_create(&arc_anon->arcs_esize[ARC_BUFC_METADATA]); refcount_create(&arc_anon->arcs_esize[ARC_BUFC_DATA]); @@ -6412,9 +6405,6 @@ arc_init(void) if (zfs_arc_p_min_shift > 0) arc_p_min_shift = zfs_arc_p_min_shift; - if (zfs_arc_num_sublists_per_state < 1) - zfs_arc_num_sublists_per_state = MAX(max_ncpus, 1); - /* if kmem_flags are set, lets try to use less memory */ if (kmem_debugging()) arc_c = arc_c / 2; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed May 24 21:54:04 2017 (r318826) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed May 24 22:15:16 2017 (r318827) @@ -623,7 +623,6 @@ retry: multilist_create(&dbuf_cache, sizeof (dmu_buf_impl_t), offsetof(dmu_buf_impl_t, db_cache_link), - zfs_arc_num_sublists_per_state, dbuf_cache_multilist_index_func); refcount_create(&dbuf_cache_size); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c Wed May 24 21:54:04 2017 (r318826) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c Wed May 24 22:15:16 2017 (r318827) @@ -13,7 +13,7 @@ * CDDL HEADER END */ /* - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2017 by Delphix. All rights reserved. */ #include @@ -23,6 +23,12 @@ #include /* + * This overrides the number of sublists in each multilist_t, which defaults + * to the number of CPUs in the system (see multilist_create()). + */ +int zfs_multilist_num_sublists = 0; + +/* * Given the object contained on the list, return a pointer to the * object's multilist_node_t structure it contains. */ @@ -59,9 +65,9 @@ multilist_d2l(multilist_t *ml, void *obj * requirement, but a general rule of thumb in order to garner the * best multi-threaded performance out of the data structure. */ -void -multilist_create(multilist_t *ml, size_t size, size_t offset, unsigned int num, - multilist_sublist_index_func_t *index_func) +static void +multilist_create_impl(multilist_t *ml, size_t size, size_t offset, + unsigned int num, multilist_sublist_index_func_t *index_func) { ASSERT3P(ml, !=, NULL); ASSERT3U(size, >, 0); @@ -86,6 +92,26 @@ multilist_create(multilist_t *ml, size_t } /* + * Initialize a new sublist, using the default number of sublists + * (the number of CPUs, or at least 4, or the tunable + * zfs_multilist_num_sublists). + */ +void +multilist_create(multilist_t *ml, size_t size, size_t offset, + multilist_sublist_index_func_t *index_func) +{ + int num_sublists; + + if (zfs_multilist_num_sublists > 0) { + num_sublists = zfs_multilist_num_sublists; + } else { + num_sublists = MAX(max_ncpus, 4); + } + + multilist_create_impl(ml, size, offset, num_sublists, index_func); +} + +/* * Destroy the given multilist object, and free up any memory it holds. */ void Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Wed May 24 21:54:04 2017 (r318826) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Wed May 24 22:15:16 2017 (r318827) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -64,8 +64,6 @@ typedef void arc_done_func_t(zio_t *zio, arc_done_func_t arc_bcopy_func; arc_done_func_t arc_getbuf_func; -extern int zfs_arc_num_sublists_per_state; - typedef enum arc_flags { /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Wed May 24 21:54:04 2017 (r318826) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Wed May 24 22:15:16 2017 (r318827) @@ -13,7 +13,7 @@ * CDDL HEADER END */ /* - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2017 by Delphix. All rights reserved. */ #ifndef _SYS_MULTILIST_H @@ -73,7 +73,7 @@ struct multilist { }; void multilist_destroy(multilist_t *); -void multilist_create(multilist_t *, size_t, size_t, unsigned int, +void multilist_create(multilist_t *, size_t, size_t, multilist_sublist_index_func_t *); void multilist_insert(multilist_t *, void *); From owner-svn-src-all@freebsd.org Wed May 24 22:21:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8F88D80C9C; Wed, 24 May 2017 22:21:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 720AB1085; Wed, 24 May 2017 22:21:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMLQZp052468; Wed, 24 May 2017 22:21:26 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMLPFi052453; Wed, 24 May 2017 22:21:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242221.v4OMLPFi052453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 22:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318828 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:21:27 -0000 Author: avg Date: Wed May 24 22:21:24 2017 New Revision: 318828 URL: https://svnweb.freebsd.org/changeset/base/318828 Log: MFV r316917: 7968 multi-threaded spa_sync() illumos/illumos-gate@94c2d0eb22e9624151ee84a7edbf7178e1bf4087 https://github.com/illumos/illumos-gate/commit/94c2d0eb22e9624151ee84a7edbf7178e1bf4087 https://www.illumos.org/issues/7968 spa_sync() iterates over all the dirty dnodes and processes each of them by calling dnode_sync(). If there are many dirty dnodes (e.g. because we created or removed a lot of files), the single thread of spa_sync() calling dnode_sync() can become a bottleneck. Additionally, if many dnodes are dirtied concurrently in open context (e.g. due to concurrent file creation), the os_lock will experience lock contention via dnode_setdirty(). The solution is to track dirty dnodes on a multilist_t, and for spa_sync() to use separate threads to process each of the sublists in the multilist. On the concurrent file creation microbenchmark, the performance improvement from dnode_setdirty() is up to 7%. Additionally, the wall clock time spent in spa_sync() is reduced to 15%-40% of the single-threaded case. In terms of cost/ reward, once the other bottlenecks are addressed, fixing this bug will provide a medium-large performance gain and require a medium amount of effort to implement. Reviewed by: Pavel Zakharov Reviewed by: Brad Lewis Reviewed by: Saso Kiselkov Reviewed by: Brian Behlendorf Approved by: Dan McDonald Author: Matthew Ahrens MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed May 24 22:21:24 2017 (r318828) @@ -473,7 +473,7 @@ typedef struct arc_state { /* * list of evictable buffers */ - multilist_t arcs_list[ARC_BUFC_NUMTYPES]; + multilist_t *arcs_list[ARC_BUFC_NUMTYPES]; /* * total amount of evictable data in this state */ @@ -2359,7 +2359,7 @@ add_reference(arc_buf_hdr_t *hdr, void * (state != arc_anon)) { /* We don't use the L2-only state list. */ if (state != arc_l2c_only) { - multilist_remove(&state->arcs_list[arc_buf_type(hdr)], + multilist_remove(state->arcs_list[arc_buf_type(hdr)], hdr); arc_evictable_space_decrement(hdr, state); } @@ -2389,7 +2389,7 @@ remove_reference(arc_buf_hdr_t *hdr, kmu */ if (((cnt = refcount_remove(&hdr->b_l1hdr.b_refcnt, tag)) == 0) && (state != arc_anon)) { - multilist_insert(&state->arcs_list[arc_buf_type(hdr)], hdr); + multilist_insert(state->arcs_list[arc_buf_type(hdr)], hdr); ASSERT3U(hdr->b_l1hdr.b_bufcnt, >, 0); arc_evictable_space_increment(hdr, state); } @@ -2442,7 +2442,7 @@ arc_change_state(arc_state_t *new_state, if (refcnt == 0) { if (old_state != arc_anon && old_state != arc_l2c_only) { ASSERT(HDR_HAS_L1HDR(hdr)); - multilist_remove(&old_state->arcs_list[buftype], hdr); + multilist_remove(old_state->arcs_list[buftype], hdr); if (GHOST_STATE(old_state)) { ASSERT0(bufcnt); @@ -2460,7 +2460,7 @@ arc_change_state(arc_state_t *new_state, * beforehand. */ ASSERT(HDR_HAS_L1HDR(hdr)); - multilist_insert(&new_state->arcs_list[buftype], hdr); + multilist_insert(new_state->arcs_list[buftype], hdr); if (GHOST_STATE(new_state)) { ASSERT0(bufcnt); @@ -2586,8 +2586,8 @@ arc_change_state(arc_state_t *new_state, * L2 headers should never be on the L2 state list since they don't * have L1 headers allocated. */ - ASSERT(multilist_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_DATA]) && - multilist_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA])); + ASSERT(multilist_is_empty(arc_l2c_only->arcs_list[ARC_BUFC_DATA]) && + multilist_is_empty(arc_l2c_only->arcs_list[ARC_BUFC_METADATA])); } void @@ -3671,7 +3671,7 @@ arc_evict_state(arc_state_t *state, uint arc_buf_contents_t type) { uint64_t total_evicted = 0; - multilist_t *ml = &state->arcs_list[type]; + multilist_t *ml = state->arcs_list[type]; int num_sublists; arc_buf_hdr_t **markers; @@ -3875,8 +3875,8 @@ arc_adjust_meta(void) static arc_buf_contents_t arc_adjust_type(arc_state_t *state) { - multilist_t *data_ml = &state->arcs_list[ARC_BUFC_DATA]; - multilist_t *meta_ml = &state->arcs_list[ARC_BUFC_METADATA]; + multilist_t *data_ml = state->arcs_list[ARC_BUFC_DATA]; + multilist_t *meta_ml = state->arcs_list[ARC_BUFC_METADATA]; int data_idx = multilist_get_random_index(data_ml); int meta_idx = multilist_get_random_index(meta_ml); multilist_sublist_t *data_mls; @@ -6209,44 +6209,44 @@ arc_state_init(void) arc_mfu_ghost = &ARC_mfu_ghost; arc_l2c_only = &ARC_l2c_only; - multilist_create(&arc_mru->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), + arc_mru->arcs_list[ARC_BUFC_METADATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); - multilist_create(&arc_mru->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), + arc_mru->arcs_list[ARC_BUFC_DATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); - multilist_create(&arc_mru_ghost->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), + arc_mru_ghost->arcs_list[ARC_BUFC_METADATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); - multilist_create(&arc_mru_ghost->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), + arc_mru_ghost->arcs_list[ARC_BUFC_DATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); - multilist_create(&arc_mfu->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), + arc_mfu->arcs_list[ARC_BUFC_METADATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); - multilist_create(&arc_mfu->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), + arc_mfu->arcs_list[ARC_BUFC_DATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); - multilist_create(&arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), + arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); - multilist_create(&arc_mfu_ghost->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), + arc_mfu_ghost->arcs_list[ARC_BUFC_DATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); - multilist_create(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), + arc_l2c_only->arcs_list[ARC_BUFC_METADATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); - multilist_create(&arc_l2c_only->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), + arc_l2c_only->arcs_list[ARC_BUFC_DATA] = + multilist_create(sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_l1hdr.b_arc_node), arc_state_multilist_index_func); @@ -6294,14 +6294,14 @@ arc_state_fini(void) refcount_destroy(&arc_mfu_ghost->arcs_size); refcount_destroy(&arc_l2c_only->arcs_size); - multilist_destroy(&arc_mru->arcs_list[ARC_BUFC_METADATA]); - multilist_destroy(&arc_mru_ghost->arcs_list[ARC_BUFC_METADATA]); - multilist_destroy(&arc_mfu->arcs_list[ARC_BUFC_METADATA]); - multilist_destroy(&arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA]); - multilist_destroy(&arc_mru->arcs_list[ARC_BUFC_DATA]); - multilist_destroy(&arc_mru_ghost->arcs_list[ARC_BUFC_DATA]); - multilist_destroy(&arc_mfu->arcs_list[ARC_BUFC_DATA]); - multilist_destroy(&arc_mfu_ghost->arcs_list[ARC_BUFC_DATA]); + multilist_destroy(arc_mru->arcs_list[ARC_BUFC_METADATA]); + multilist_destroy(arc_mru_ghost->arcs_list[ARC_BUFC_METADATA]); + multilist_destroy(arc_mfu->arcs_list[ARC_BUFC_METADATA]); + multilist_destroy(arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA]); + multilist_destroy(arc_mru->arcs_list[ARC_BUFC_DATA]); + multilist_destroy(arc_mru_ghost->arcs_list[ARC_BUFC_DATA]); + multilist_destroy(arc_mfu->arcs_list[ARC_BUFC_DATA]); + multilist_destroy(arc_mfu_ghost->arcs_list[ARC_BUFC_DATA]); } uint64_t @@ -7098,16 +7098,16 @@ l2arc_sublist_lock(int list_num) switch (list_num) { case 0: - ml = &arc_mfu->arcs_list[ARC_BUFC_METADATA]; + ml = arc_mfu->arcs_list[ARC_BUFC_METADATA]; break; case 1: - ml = &arc_mru->arcs_list[ARC_BUFC_METADATA]; + ml = arc_mru->arcs_list[ARC_BUFC_METADATA]; break; case 2: - ml = &arc_mfu->arcs_list[ARC_BUFC_DATA]; + ml = arc_mfu->arcs_list[ARC_BUFC_DATA]; break; case 3: - ml = &arc_mru->arcs_list[ARC_BUFC_DATA]; + ml = arc_mru->arcs_list[ARC_BUFC_DATA]; break; } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed May 24 22:21:24 2017 (r318828) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. @@ -80,7 +80,7 @@ static boolean_t dbuf_evict_thread_exit; * Dbufs that are aged out of the cache will be immediately destroyed and * become eligible for arc eviction. */ -static multilist_t dbuf_cache; +static multilist_t *dbuf_cache; static refcount_t dbuf_cache_size; uint64_t dbuf_cache_max_bytes = 100 * 1024 * 1024; @@ -454,8 +454,8 @@ dbuf_cache_above_lowater(void) static void dbuf_evict_one(void) { - int idx = multilist_get_random_index(&dbuf_cache); - multilist_sublist_t *mls = multilist_sublist_lock(&dbuf_cache, idx); + int idx = multilist_get_random_index(dbuf_cache); + multilist_sublist_t *mls = multilist_sublist_lock(dbuf_cache, idx); ASSERT(!MUTEX_HELD(&dbuf_evict_lock)); @@ -621,7 +621,7 @@ retry: */ dbu_evict_taskq = taskq_create("dbu_evict", 1, minclsyspri, 0, 0, 0); - multilist_create(&dbuf_cache, sizeof (dmu_buf_impl_t), + dbuf_cache = multilist_create(sizeof (dmu_buf_impl_t), offsetof(dmu_buf_impl_t, db_cache_link), dbuf_cache_multilist_index_func); refcount_create(&dbuf_cache_size); @@ -659,7 +659,7 @@ dbuf_fini(void) cv_destroy(&dbuf_evict_cv); refcount_destroy(&dbuf_cache_size); - multilist_destroy(&dbuf_cache); + multilist_destroy(dbuf_cache); } /* @@ -2029,7 +2029,7 @@ dbuf_destroy(dmu_buf_impl_t *db) dbuf_clear_data(db); if (multilist_link_active(&db->db_cache_link)) { - multilist_remove(&dbuf_cache, db); + multilist_remove(dbuf_cache, db); (void) refcount_remove_many(&dbuf_cache_size, db->db.db_size, db); } @@ -2577,7 +2577,7 @@ top: if (multilist_link_active(&db->db_cache_link)) { ASSERT(refcount_is_zero(&db->db_holds)); - multilist_remove(&dbuf_cache, db); + multilist_remove(dbuf_cache, db); (void) refcount_remove_many(&dbuf_cache_size, db->db.db_size, db); } @@ -2796,7 +2796,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, db->db_pending_evict) { dbuf_destroy(db); } else if (!multilist_link_active(&db->db_cache_link)) { - multilist_insert(&dbuf_cache, db); + multilist_insert(dbuf_cache, db); (void) refcount_add_many(&dbuf_cache_size, db->db.db_size, db); mutex_exit(&db->db_mtx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed May 24 22:21:24 2017 (r318828) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. @@ -303,6 +303,42 @@ dmu_objset_byteswap(void *buf, size_t si } } +/* + * The hash is a CRC-based hash of the objset_t pointer and the object number. + */ +static uint64_t +dnode_hash(const objset_t *os, uint64_t obj) +{ + uintptr_t osv = (uintptr_t)os; + uint64_t crc = -1ULL; + + ASSERT(zfs_crc64_table[128] == ZFS_CRC64_POLY); + /* + * The low 6 bits of the pointer don't have much entropy, because + * the objset_t is larger than 2^6 bytes long. + */ + crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (osv >> 6)) & 0xFF]; + crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (obj >> 0)) & 0xFF]; + crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (obj >> 8)) & 0xFF]; + crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (obj >> 16)) & 0xFF]; + + crc ^= (osv>>14) ^ (obj>>24); + + return (crc); +} + +unsigned int +dnode_multilist_index_func(multilist_t *ml, void *obj) +{ + dnode_t *dn = obj; + return (dnode_hash(dn->dn_objset, dn->dn_object) % + multilist_get_num_sublists(ml)); +} + +/* + * Instantiates the objset_t in-memory structure corresponding to the + * objset_phys_t that's pointed to by the specified blkptr_t. + */ int dmu_objset_open_impl(spa_t *spa, dsl_dataset_t *ds, blkptr_t *bp, objset_t **osp) @@ -454,10 +490,9 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat os->os_zil = zil_alloc(os, &os->os_zil_header); for (i = 0; i < TXG_SIZE; i++) { - list_create(&os->os_dirty_dnodes[i], sizeof (dnode_t), - offsetof(dnode_t, dn_dirty_link[i])); - list_create(&os->os_free_dnodes[i], sizeof (dnode_t), - offsetof(dnode_t, dn_dirty_link[i])); + os->os_dirty_dnodes[i] = multilist_create(sizeof (dnode_t), + offsetof(dnode_t, dn_dirty_link[i]), + dnode_multilist_index_func); } list_create(&os->os_dnodes, sizeof (dnode_t), offsetof(dnode_t, dn_link)); @@ -465,6 +500,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat offsetof(dmu_buf_impl_t, db_link)); mutex_init(&os->os_lock, NULL, MUTEX_DEFAULT, NULL); + mutex_init(&os->os_userused_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&os->os_obj_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&os->os_user_ptr_lock, NULL, MUTEX_DEFAULT, NULL); @@ -748,8 +784,12 @@ dmu_objset_evict_done(objset_t *os) rw_exit(&os_lock); mutex_destroy(&os->os_lock); + mutex_destroy(&os->os_userused_lock); mutex_destroy(&os->os_obj_lock); mutex_destroy(&os->os_user_ptr_lock); + for (int i = 0; i < TXG_SIZE; i++) { + multilist_destroy(os->os_dirty_dnodes[i]); + } spa_evicting_os_deregister(os->os_spa, os); kmem_free(os, sizeof (objset_t)); } @@ -1027,11 +1067,11 @@ dmu_objset_snapshot_one(const char *fsna } static void -dmu_objset_sync_dnodes(list_t *list, list_t *newlist, dmu_tx_t *tx) +dmu_objset_sync_dnodes(multilist_sublist_t *list, dmu_tx_t *tx) { dnode_t *dn; - while (dn = list_head(list)) { + while ((dn = multilist_sublist_head(list)) != NULL) { ASSERT(dn->dn_object != DMU_META_DNODE_OBJECT); ASSERT(dn->dn_dbuf->db_data_pending); /* @@ -1042,11 +1082,12 @@ dmu_objset_sync_dnodes(list_t *list, lis ASSERT(dn->dn_zio); ASSERT3U(dn->dn_nlevels, <=, DN_MAX_LEVELS); - list_remove(list, dn); + multilist_sublist_remove(list, dn); - if (newlist) { + multilist_t *newlist = dn->dn_objset->os_synced_dnodes; + if (newlist != NULL) { (void) dnode_add_ref(dn, newlist); - list_insert_tail(newlist, dn); + multilist_insert(newlist, dn); } dnode_sync(dn, tx); @@ -1101,6 +1142,29 @@ dmu_objset_write_done(zio_t *zio, arc_bu kmem_free(bp, sizeof (*bp)); } +typedef struct sync_dnodes_arg { + multilist_t *sda_list; + int sda_sublist_idx; + multilist_t *sda_newlist; + dmu_tx_t *sda_tx; +} sync_dnodes_arg_t; + +static void +sync_dnodes_task(void *arg) +{ + sync_dnodes_arg_t *sda = arg; + + multilist_sublist_t *ms = + multilist_sublist_lock(sda->sda_list, sda->sda_sublist_idx); + + dmu_objset_sync_dnodes(ms, sda->sda_tx); + + multilist_sublist_unlock(ms); + + kmem_free(sda, sizeof (*sda)); +} + + /* called from dsl */ void dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx) @@ -1110,7 +1174,6 @@ dmu_objset_sync(objset_t *os, zio_t *pio zio_prop_t zp; zio_t *zio; list_t *list; - list_t *newlist = NULL; dbuf_dirty_record_t *dr; blkptr_t *blkptr_copy = kmem_alloc(sizeof (*os->os_rootbp), KM_SLEEP); *blkptr_copy = *os->os_rootbp; @@ -1164,20 +1227,36 @@ dmu_objset_sync(objset_t *os, zio_t *pio txgoff = tx->tx_txg & TXG_MASK; if (dmu_objset_userused_enabled(os)) { - newlist = &os->os_synced_dnodes; /* * We must create the list here because it uses the - * dn_dirty_link[] of this txg. + * dn_dirty_link[] of this txg. But it may already + * exist because we call dsl_dataset_sync() twice per txg. */ - list_create(newlist, sizeof (dnode_t), - offsetof(dnode_t, dn_dirty_link[txgoff])); + if (os->os_synced_dnodes == NULL) { + os->os_synced_dnodes = + multilist_create(sizeof (dnode_t), + offsetof(dnode_t, dn_dirty_link[txgoff]), + dnode_multilist_index_func); + } else { + ASSERT3U(os->os_synced_dnodes->ml_offset, ==, + offsetof(dnode_t, dn_dirty_link[txgoff])); + } } - dmu_objset_sync_dnodes(&os->os_free_dnodes[txgoff], newlist, tx); - dmu_objset_sync_dnodes(&os->os_dirty_dnodes[txgoff], newlist, tx); + for (int i = 0; + i < multilist_get_num_sublists(os->os_dirty_dnodes[txgoff]); i++) { + sync_dnodes_arg_t *sda = kmem_alloc(sizeof (*sda), KM_SLEEP); + sda->sda_list = os->os_dirty_dnodes[txgoff]; + sda->sda_sublist_idx = i; + sda->sda_tx = tx; + (void) taskq_dispatch(dmu_objset_pool(os)->dp_sync_taskq, + sync_dnodes_task, sda, 0); + /* callback frees sda */ + } + taskq_wait(dmu_objset_pool(os)->dp_sync_taskq); list = &DMU_META_DNODE(os)->dn_dirty_records[txgoff]; - while (dr = list_head(list)) { + while ((dr = list_head(list)) != NULL) { ASSERT0(dr->dr_dbuf->db_level); list_remove(list, dr); if (dr->dr_zio) @@ -1201,8 +1280,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio boolean_t dmu_objset_is_dirty(objset_t *os, uint64_t txg) { - return (!list_is_empty(&os->os_dirty_dnodes[txg & TXG_MASK]) || - !list_is_empty(&os->os_free_dnodes[txg & TXG_MASK])); + return (!multilist_is_empty(os->os_dirty_dnodes[txg & TXG_MASK])); } static objset_used_cb_t *used_cbs[DMU_OST_NUMTYPES]; @@ -1256,8 +1334,15 @@ do_userquota_cacheflush(objset_t *os, us cookie = NULL; while ((uqn = avl_destroy_nodes(&cache->uqc_user_deltas, &cookie)) != NULL) { + /* + * os_userused_lock protects against concurrent calls to + * zap_increment_int(). It's needed because zap_increment_int() + * is not thread-safe (i.e. not atomic). + */ + mutex_enter(&os->os_userused_lock); VERIFY0(zap_increment_int(os, DMU_USERUSED_OBJECT, uqn->uqn_id, uqn->uqn_delta, tx)); + mutex_exit(&os->os_userused_lock); kmem_free(uqn, sizeof (*uqn)); } avl_destroy(&cache->uqc_user_deltas); @@ -1265,8 +1350,10 @@ do_userquota_cacheflush(objset_t *os, us cookie = NULL; while ((uqn = avl_destroy_nodes(&cache->uqc_group_deltas, &cookie)) != NULL) { + mutex_enter(&os->os_userused_lock); VERIFY0(zap_increment_int(os, DMU_GROUPUSED_OBJECT, uqn->uqn_id, uqn->uqn_delta, tx)); + mutex_exit(&os->os_userused_lock); kmem_free(uqn, sizeof (*uqn)); } avl_destroy(&cache->uqc_group_deltas); @@ -1301,37 +1388,38 @@ do_userquota_update(userquota_cache_t *c } } -void -dmu_objset_do_userquota_updates(objset_t *os, dmu_tx_t *tx) +typedef struct userquota_updates_arg { + objset_t *uua_os; + int uua_sublist_idx; + dmu_tx_t *uua_tx; +} userquota_updates_arg_t; + +static void +userquota_updates_task(void *arg) { + userquota_updates_arg_t *uua = arg; + objset_t *os = uua->uua_os; + dmu_tx_t *tx = uua->uua_tx; dnode_t *dn; - list_t *list = &os->os_synced_dnodes; userquota_cache_t cache = { 0 }; - ASSERT(list_head(list) == NULL || dmu_objset_userused_enabled(os)); + multilist_sublist_t *list = + multilist_sublist_lock(os->os_synced_dnodes, uua->uua_sublist_idx); + ASSERT(multilist_sublist_head(list) == NULL || + dmu_objset_userused_enabled(os)); avl_create(&cache.uqc_user_deltas, userquota_compare, sizeof (userquota_node_t), offsetof(userquota_node_t, uqn_node)); avl_create(&cache.uqc_group_deltas, userquota_compare, sizeof (userquota_node_t), offsetof(userquota_node_t, uqn_node)); - while (dn = list_head(list)) { + while ((dn = multilist_sublist_head(list)) != NULL) { int flags; ASSERT(!DMU_OBJECT_IS_SPECIAL(dn->dn_object)); ASSERT(dn->dn_phys->dn_type == DMU_OT_NONE || dn->dn_phys->dn_flags & DNODE_FLAG_USERUSED_ACCOUNTED); - /* Allocate the user/groupused objects if necessary. */ - if (DMU_USERUSED_DNODE(os)->dn_type == DMU_OT_NONE) { - VERIFY0(zap_create_claim(os, - DMU_USERUSED_OBJECT, - DMU_OT_USERGROUP_USED, DMU_OT_NONE, 0, tx)); - VERIFY0(zap_create_claim(os, - DMU_GROUPUSED_OBJECT, - DMU_OT_USERGROUP_USED, DMU_OT_NONE, 0, tx)); - } - flags = dn->dn_id_flags; ASSERT(flags); if (flags & DN_ID_OLD_EXIST) { @@ -1361,10 +1449,42 @@ dmu_objset_do_userquota_updates(objset_t dn->dn_id_flags &= ~(DN_ID_NEW_EXIST); mutex_exit(&dn->dn_mtx); - list_remove(list, dn); - dnode_rele(dn, list); + multilist_sublist_remove(list, dn); + dnode_rele(dn, os->os_synced_dnodes); } do_userquota_cacheflush(os, &cache, tx); + multilist_sublist_unlock(list); + kmem_free(uua, sizeof (*uua)); +} + +void +dmu_objset_do_userquota_updates(objset_t *os, dmu_tx_t *tx) +{ + if (!dmu_objset_userused_enabled(os)) + return; + + /* Allocate the user/groupused objects if necessary. */ + if (DMU_USERUSED_DNODE(os)->dn_type == DMU_OT_NONE) { + VERIFY0(zap_create_claim(os, + DMU_USERUSED_OBJECT, + DMU_OT_USERGROUP_USED, DMU_OT_NONE, 0, tx)); + VERIFY0(zap_create_claim(os, + DMU_GROUPUSED_OBJECT, + DMU_OT_USERGROUP_USED, DMU_OT_NONE, 0, tx)); + } + + for (int i = 0; + i < multilist_get_num_sublists(os->os_synced_dnodes); i++) { + userquota_updates_arg_t *uua = + kmem_alloc(sizeof (*uua), KM_SLEEP); + uua->uua_os = os; + uua->uua_sublist_idx = i; + uua->uua_tx = tx; + /* note: caller does taskq_wait() */ + (void) taskq_dispatch(dmu_objset_pool(os)->dp_sync_taskq, + userquota_updates_task, uua, 0); + /* callback frees uua */ + } } /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Wed May 24 22:21:24 2017 (r318828) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -1287,13 +1287,14 @@ dnode_setdirty(dnode_t *dn, dmu_tx_t *tx */ dmu_objset_userquota_get_ids(dn, B_TRUE, tx); - mutex_enter(&os->os_lock); + multilist_t *dirtylist = os->os_dirty_dnodes[txg & TXG_MASK]; + multilist_sublist_t *mls = multilist_sublist_lock_obj(dirtylist, dn); /* * If we are already marked dirty, we're done. */ if (list_link_active(&dn->dn_dirty_link[txg & TXG_MASK])) { - mutex_exit(&os->os_lock); + multilist_sublist_unlock(mls); return; } @@ -1307,13 +1308,9 @@ dnode_setdirty(dnode_t *dn, dmu_tx_t *tx dprintf_ds(os->os_dsl_dataset, "obj=%llu txg=%llu\n", dn->dn_object, txg); - if (dn->dn_free_txg > 0 && dn->dn_free_txg <= txg) { - list_insert_tail(&os->os_free_dnodes[txg&TXG_MASK], dn); - } else { - list_insert_tail(&os->os_dirty_dnodes[txg&TXG_MASK], dn); - } + multilist_sublist_insert_head(mls, dn); - mutex_exit(&os->os_lock); + multilist_sublist_unlock(mls); /* * The dnode maintains a hold on its containing dbuf as @@ -1334,13 +1331,6 @@ dnode_setdirty(dnode_t *dn, dmu_tx_t *tx void dnode_free(dnode_t *dn, dmu_tx_t *tx) { - int txgoff = tx->tx_txg & TXG_MASK; - - dprintf("dn=%p txg=%llu\n", dn, tx->tx_txg); - - /* we should be the only holder... hopefully */ - /* ASSERT3U(refcount_count(&dn->dn_holds), ==, 1); */ - mutex_enter(&dn->dn_mtx); if (dn->dn_type == DMU_OT_NONE || dn->dn_free_txg) { mutex_exit(&dn->dn_mtx); @@ -1349,19 +1339,7 @@ dnode_free(dnode_t *dn, dmu_tx_t *tx) dn->dn_free_txg = tx->tx_txg; mutex_exit(&dn->dn_mtx); - /* - * If the dnode is already dirty, it needs to be moved from - * the dirty list to the free list. - */ - mutex_enter(&dn->dn_objset->os_lock); - if (list_link_active(&dn->dn_dirty_link[txgoff])) { - list_remove(&dn->dn_objset->os_dirty_dnodes[txgoff], dn); - list_insert_tail(&dn->dn_objset->os_free_dnodes[txgoff], dn); - mutex_exit(&dn->dn_objset->os_lock); - } else { - mutex_exit(&dn->dn_objset->os_lock); - dnode_setdirty(dn, tx); - } + dnode_setdirty(dn, tx); } /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Wed May 24 22:21:24 2017 (r318828) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed May 24 22:21:24 2017 (r318828) @@ -1740,6 +1740,11 @@ dsl_dataset_sync_done(dsl_dataset_t *ds, bplist_iterate(&ds->ds_pending_deadlist, deadlist_enqueue_cb, &ds->ds_deadlist, tx); + if (os->os_synced_dnodes != NULL) { + multilist_destroy(os->os_synced_dnodes); + os->os_synced_dnodes = NULL; + } + ASSERT(!dmu_objset_is_dirty(os, dmu_tx_get_txg(tx))); dmu_buf_rele(ds->ds_dbuf, ds); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed May 24 22:21:24 2017 (r318828) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -132,6 +132,10 @@ int zfs_delay_min_dirty_percent = 60; */ uint64_t zfs_delay_scale = 1000 * 1000 * 1000 / 2000; +/* + * This determines the number of threads used by the dp_sync_taskq. + */ +int zfs_sync_taskq_batch_pct = 75; #if defined(__FreeBSD__) && defined(_KERNEL) @@ -267,6 +271,10 @@ dsl_pool_open_impl(spa_t *spa, uint64_t txg_list_create(&dp->dp_sync_tasks, offsetof(dsl_sync_task_t, dst_node)); + dp->dp_sync_taskq = taskq_create("dp_sync_taskq", + zfs_sync_taskq_batch_pct, minclsyspri, 1, INT_MAX, + TASKQ_THREADS_CPU_PCT); + mutex_init(&dp->dp_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&dp->dp_spaceavail_cv, NULL, CV_DEFAULT, NULL); @@ -417,6 +425,8 @@ dsl_pool_close(dsl_pool_t *dp) txg_list_destroy(&dp->dp_sync_tasks); txg_list_destroy(&dp->dp_dirty_dirs); + taskq_destroy(dp->dp_sync_taskq); + /* * We can't set retry to TRUE since we're explicitly specifying * a spa to flush. This is good enough; any missed buffers for @@ -605,12 +615,15 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t t /* * After the data blocks have been written (ensured by the zio_wait() - * above), update the user/group space accounting. + * above), update the user/group space accounting. This happens + * in tasks dispatched to dp_sync_taskq, so wait for them before + * continuing. */ for (ds = list_head(&synced_datasets); ds != NULL; ds = list_next(&synced_datasets, ds)) { dmu_objset_do_userquota_updates(ds->ds_objset, tx); } + taskq_wait(dp->dp_sync_taskq); /* * Sync the datasets again to push out the changes due to @@ -657,8 +670,7 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t t dp->dp_mos_uncompressed_delta = 0; } - if (list_head(&mos->os_dirty_dnodes[txg & TXG_MASK]) != NULL || - list_head(&mos->os_free_dnodes[txg & TXG_MASK]) != NULL) { + if (!multilist_is_empty(mos->os_dirty_dnodes[txg & TXG_MASK])) { dsl_pool_sync_mos(dp, tx); } @@ -716,7 +728,8 @@ int dsl_pool_sync_context(dsl_pool_t *dp) { return (curthread == dp->dp_tx.tx_sync_thread || - spa_is_initializing(dp->dp_spa)); + spa_is_initializing(dp->dp_spa) || + taskq_member(dp->dp_sync_taskq, curthread)); } uint64_t Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c Wed May 24 22:21:24 2017 (r318828) @@ -65,16 +65,16 @@ multilist_d2l(multilist_t *ml, void *obj * requirement, but a general rule of thumb in order to garner the * best multi-threaded performance out of the data structure. */ -static void -multilist_create_impl(multilist_t *ml, size_t size, size_t offset, +static multilist_t * +multilist_create_impl(size_t size, size_t offset, unsigned int num, multilist_sublist_index_func_t *index_func) { - ASSERT3P(ml, !=, NULL); ASSERT3U(size, >, 0); ASSERT3U(size, >=, offset + sizeof (multilist_node_t)); ASSERT3U(num, >, 0); ASSERT3P(index_func, !=, NULL); + multilist_t *ml = kmem_alloc(sizeof (*ml), KM_SLEEP); ml->ml_offset = offset; ml->ml_num_sublists = num; ml->ml_index_func = index_func; @@ -89,15 +89,16 @@ multilist_create_impl(multilist_t *ml, s mutex_init(&mls->mls_lock, NULL, MUTEX_DEFAULT, NULL); list_create(&mls->mls_list, size, offset); } + return (ml); } /* - * Initialize a new sublist, using the default number of sublists + * Allocate a new multilist, using the default number of sublists * (the number of CPUs, or at least 4, or the tunable * zfs_multilist_num_sublists). */ -void -multilist_create(multilist_t *ml, size_t size, size_t offset, +multilist_t * +multilist_create(size_t size, size_t offset, multilist_sublist_index_func_t *index_func) { int num_sublists; @@ -108,7 +109,7 @@ multilist_create(multilist_t *ml, size_t num_sublists = MAX(max_ncpus, 4); } - multilist_create_impl(ml, size, offset, num_sublists, index_func); + return (multilist_create_impl(size, offset, num_sublists, index_func)); } /* @@ -134,6 +135,7 @@ multilist_destroy(multilist_t *ml) ml->ml_num_sublists = 0; ml->ml_offset = 0; + kmem_free(ml, sizeof (multilist_t)); } /* @@ -285,6 +287,13 @@ multilist_sublist_lock(multilist_t *ml, return (mls); } +/* Lock and return the sublist that would be used to store the specified obj */ +multilist_sublist_t * +multilist_sublist_lock_obj(multilist_t *ml, void *obj) +{ + return (multilist_sublist_lock(ml, ml->ml_index_func(ml, obj))); +} + void multilist_sublist_unlock(multilist_sublist_t *mls) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 22:21:24 2017 (r318828) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2015 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. @@ -740,7 +740,7 @@ spa_add(const char *name, nvlist_t *conf spa_active_count++; } - avl_create(&spa->spa_alloc_tree, zio_timestamp_compare, + avl_create(&spa->spa_alloc_tree, zio_bookmark_compare, sizeof (zio_t), offsetof(zio_t, io_alloc_node)); /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Wed May 24 22:21:24 2017 (r318828) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -110,7 +110,7 @@ struct objset { /* no lock needed: */ struct dmu_tx *os_synctx; /* XXX sketchy */ zil_header_t os_zil_header; - list_t os_synced_dnodes; + multilist_t *os_synced_dnodes; uint64_t os_flags; uint64_t os_freed_dnodes; boolean_t os_rescan_dnodes; @@ -121,11 +121,13 @@ struct objset { /* Protected by os_lock */ kmutex_t os_lock; - list_t os_dirty_dnodes[TXG_SIZE]; - list_t os_free_dnodes[TXG_SIZE]; + multilist_t *os_dirty_dnodes[TXG_SIZE]; list_t os_dnodes; list_t os_downgraded_dbufs; + /* Protects changes to DMU_{USER,GROUP}USED_OBJECT */ + kmutex_t os_userused_lock; + /* stuff we store for the user */ kmutex_t os_user_ptr_lock; void *os_user_ptr; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Wed May 24 22:21:24 2017 (r318828) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ @@ -35,6 +35,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -203,7 +204,7 @@ struct dnode { uint32_t dn_dbufs_count; /* count of dn_dbufs */ /* protected by os_lock: */ - list_node_t dn_dirty_link[TXG_SIZE]; /* next on dataset's dirty */ + multilist_node_t dn_dirty_link[TXG_SIZE]; /* next on dataset's dirty */ /* protected by dn_mtx: */ kmutex_t dn_mtx; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Wed May 24 22:21:24 2017 (r318828) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2017 by Delphix. All rights reserved. * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ @@ -121,6 +121,7 @@ typedef struct dsl_pool { txg_list_t dp_dirty_zilogs; txg_list_t dp_dirty_dirs; txg_list_t dp_sync_tasks; + taskq_t *dp_sync_taskq; /* * Protects administrative changes (properties, namespace) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Wed May 24 22:21:24 2017 (r318828) @@ -73,8 +73,7 @@ struct multilist { }; void multilist_destroy(multilist_t *); -void multilist_create(multilist_t *, size_t, size_t, - multilist_sublist_index_func_t *); +multilist_t *multilist_create(size_t, size_t, multilist_sublist_index_func_t *); void multilist_insert(multilist_t *, void *); void multilist_remove(multilist_t *, void *); @@ -84,6 +83,7 @@ unsigned int multilist_get_num_sublists( unsigned int multilist_get_random_index(multilist_t *); multilist_sublist_t *multilist_sublist_lock(multilist_t *, unsigned int); +multilist_sublist_t *multilist_sublist_lock_obj(multilist_t *, void *); void multilist_sublist_unlock(multilist_sublist_t *); void multilist_sublist_insert_head(multilist_sublist_t *, void *); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed May 24 22:15:16 2017 (r318827) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed May 24 22:21:24 2017 (r318828) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright 2016 Toomas Soome */ @@ -485,7 +485,7 @@ struct zio { list_node_t io_trim_link; }; -extern int zio_timestamp_compare(const void *, const void *); +extern int zio_bookmark_compare(const void *, const void *); extern zio_t *zio_null(zio_t *pio, spa_t *spa, vdev_t *vd, zio_done_func_t *done, void *priv, enum zio_flag flags); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed May 24 22:15:16 2017 (r318827) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 24 22:25:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42B03D80D80; Wed, 24 May 2017 22:25:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05E951453; Wed, 24 May 2017 22:25:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMPRGT053468; Wed, 24 May 2017 22:25:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMPQpk053463; Wed, 24 May 2017 22:25:26 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242225.v4OMPQpk053463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 22:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318829 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:25:28 -0000 Author: avg Date: Wed May 24 22:25:26 2017 New Revision: 318829 URL: https://svnweb.freebsd.org/changeset/base/318829 Log: MFV r316920: 8023 Panic destroying a metaslab deferred range tree illumos/illumos-gate@3991b535a8e990c0369be677746a87c259b13e9f https://github.com/illumos/illumos-gate/commit/3991b535a8e990c0369be677746a87c259b13e9f https://www.illumos.org/issues/8023 $C ffffff0011bc0970 vpanic() ffffff0011bc0a00 strlog() ffffff0011bc0a30 range_tree_destroy+0x72(ffffff043769ad00) ffffff0011bc0a70 metaslab_fini+0xd5(ffffff0449acf380) ffffff0011bc0ab0 vdev_metaslab_fini+0x56(ffffff0462bae800) ffffff0011bc0af0 spa_unload+0x9b(ffffff03e3dac000) ffffff0011bc0b70 spa_export_common+0x115(ffffff047f4b4000, 2, 0, 0, 0) ffffff0011bc0b90 spa_destroy+0x1d(ffffff047f4b4000) ffffff0011bc0bd0 zfs_ioc_pool_destroy+0x20(ffffff047f4b4000) ffffff0011bc0c80 zfsdev_ioctl+0x4d7(11400000000, 5a01, 8040190, 100003, ffffff03e1956b10, ffffff0011bc0e68) ffffff0011bc0cc0 cdev_ioctl+0x39(11400000000, 5a01, 8040190, 100003, ffffff03e1956b10, ffffff0011bc0e68) ffffff0011bc0d10 spec_ioctl+0x60(ffffff03d9153b00, 5a01, 8040190, 100003, ffffff03e1956b10, ffffff0011bc0e68, 0) ffffff0011bc0da0 fop_ioctl+0x55(ffffff03d9153b00, 5a01, 8040190, 100003, ffffff03e1956b10, ffffff0011bc0e68, 0) ffffff0011bc0ec0 ioctl+0x9b(3, 5a01, 8040190) ffffff0011bc0f10 _sys_sysenter_post_swapgs+0x149() Reviewed by: Brad Lewis Reviewed by: Matt Ahrens Reviewed by: Dan Kimmel Reviewed by: Saso Kiselkov Approved by: Dan McDonald Author: George Wilson MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed May 24 22:21:24 2017 (r318828) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed May 24 22:25:26 2017 (r318829) @@ -1552,6 +1552,7 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * this assertion only if we're not already dirty. */ os = dn->dn_objset; + VERIFY3U(tx->tx_txg, <=, spa_final_dirty_txg(os->os_spa)); #ifdef DEBUG if (dn->dn_objset->os_dsl_dataset != NULL) rrw_enter(&os->os_dsl_dataset->ds_bp_rwlock, RW_READER, FTAG); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed May 24 22:21:24 2017 (r318828) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed May 24 22:25:26 2017 (r318829) @@ -1652,11 +1652,19 @@ metaslab_set_fragmentation(metaslab_t *m uint64_t txg = spa_syncing_txg(spa); vdev_t *vd = msp->ms_group->mg_vd; - if (spa_writeable(spa)) { + /* + * If we've reached the final dirty txg, then we must + * be shutting down the pool. We don't want to dirty + * any data past this point so skip setting the condense + * flag. We can retry this action the next time the pool + * is imported. + */ + if (spa_writeable(spa) && txg < spa_final_dirty_txg(spa)) { msp->ms_condense_wanted = B_TRUE; vdev_dirty(vd, VDD_METASLAB, msp, txg + 1); spa_dbgmsg(spa, "txg %llu, requesting force condense: " - "msp %p, vd %p", txg, msp, vd); + "ms_id %llu, vdev_id %llu", txg, msp->ms_id, + vd->vdev_id); } msp->ms_fragmentation = ZFS_FRAG_INVALID; return; @@ -2278,13 +2286,17 @@ metaslab_sync(metaslab_t *msp, uint64_t /* * Normally, we don't want to process a metaslab if there * are no allocations or frees to perform. However, if the metaslab - * is being forced to condense we need to let it through. + * is being forced to condense and it's loaded, we need to let it + * through. */ if (range_tree_space(alloctree) == 0 && range_tree_space(msp->ms_freeingtree) == 0 && - !msp->ms_condense_wanted) + !(msp->ms_loaded && msp->ms_condense_wanted)) return; + + VERIFY(txg <= spa_final_dirty_txg(spa)); + /* * The only state that can actually be changing concurrently with * metaslab_sync() is the metaslab's ms_tree. No other thread can Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 22:21:24 2017 (r318828) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 22:25:26 2017 (r318829) @@ -1737,6 +1737,16 @@ spa_syncing_txg(spa_t *spa) return (spa->spa_syncing_txg); } +/* + * Return the last txg where data can be dirtied. The final txgs + * will be used to just clear out any deferred frees that remain. + */ +uint64_t +spa_final_dirty_txg(spa_t *spa) +{ + return (spa->spa_final_txg - TXG_DEFER_SIZE); +} + pool_state_t spa_state(spa_t *spa) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Wed May 24 22:21:24 2017 (r318828) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Wed May 24 22:25:26 2017 (r318829) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. */ #include @@ -407,6 +407,7 @@ space_map_truncate(space_map_t *sm, dmu_ ASSERT(dsl_pool_sync_context(dmu_objset_pool(os))); ASSERT(dmu_tx_is_syncing(tx)); + VERIFY3U(dmu_tx_get_txg(tx), <=, spa_final_dirty_txg(spa)); dmu_object_info_from_db(sm->sm_dbuf, &doi); @@ -421,9 +422,10 @@ space_map_truncate(space_map_t *sm, dmu_ if ((spa_feature_is_enabled(spa, SPA_FEATURE_SPACEMAP_HISTOGRAM) && doi.doi_bonus_size != sizeof (space_map_phys_t)) || doi.doi_data_block_size != space_map_blksz) { - zfs_dbgmsg("txg %llu, spa %s, reallocating: " - "old bonus %u, old blocksz %u", dmu_tx_get_txg(tx), - spa_name(spa), doi.doi_bonus_size, doi.doi_data_block_size); + zfs_dbgmsg("txg %llu, spa %s, sm %p, reallocating " + "object[%llu]: old bonus %u, old blocksz %u", + dmu_tx_get_txg(tx), spa_name(spa), sm, sm->sm_object, + doi.doi_bonus_size, doi.doi_data_block_size); space_map_free(sm, tx); dmu_buf_rele(sm->sm_dbuf, sm); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Wed May 24 22:21:24 2017 (r318828) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Wed May 24 22:25:26 2017 (r318829) @@ -791,6 +791,7 @@ extern uint64_t spa_load_guid(spa_t *spa extern uint64_t spa_last_synced_txg(spa_t *spa); extern uint64_t spa_first_txg(spa_t *spa); extern uint64_t spa_syncing_txg(spa_t *spa); +extern uint64_t spa_final_dirty_txg(spa_t *spa); extern uint64_t spa_version(spa_t *spa); extern pool_state_t spa_state(spa_t *spa); extern spa_load_state_t spa_load_state(spa_t *spa); From owner-svn-src-all@freebsd.org Wed May 24 22:27:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC79CD80DF2; Wed, 24 May 2017 22:27:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85F0B1629; Wed, 24 May 2017 22:27:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMRm21053612; Wed, 24 May 2017 22:27:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMRmQO053611; Wed, 24 May 2017 22:27:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242227.v4OMRmQO053611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 22:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318830 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:27:49 -0000 Author: avg Date: Wed May 24 22:27:48 2017 New Revision: 318830 URL: https://svnweb.freebsd.org/changeset/base/318830 Log: MFC r316921: 8027 tighten up dsl_pool_dirty_delta illumos/illumos-gate@313ae1e182df6e6a04b56c4b73ded33e11b75666 https://github.com/illumos/illumos-gate/commit/313ae1e182df6e6a04b56c4b73ded33e11b75666 https://www.illumos.org/issues/8027 dsl_pool_dirty_delta() should not wake up waiters when dp->dp_dirty_total == zfs_dirty_data_max, because they wait for dp_dirty_total to fall strictly below the threshold. It's probably very rare for that condition to occur, but it's better to have more accurate code. Reviewed by: Matt Ahrens Reviewed by: Serapheim Dimitropoulos Reviewed by: Paul Dagnelie Approved by: Dan McDonald Author: Andriy Gapon MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed May 24 22:25:26 2017 (r318829) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed May 24 22:27:48 2017 (r318830) @@ -559,7 +559,7 @@ dsl_pool_dirty_delta(dsl_pool_t *dp, int * Note: we signal even when increasing dp_dirty_total. * This ensures forward progress -- each thread wakes the next waiter. */ - if (dp->dp_dirty_total <= zfs_dirty_data_max) + if (dp->dp_dirty_total < zfs_dirty_data_max) cv_signal(&dp->dp_spaceavail_cv); } From owner-svn-src-all@freebsd.org Wed May 24 22:30:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAB38D80EA0; Wed, 24 May 2017 22:30:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E86B1899; Wed, 24 May 2017 22:30:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMULoS053901; Wed, 24 May 2017 22:30:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMULBb053900; Wed, 24 May 2017 22:30:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242230.v4OMULBb053900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 22:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318831 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:30:23 -0000 Author: avg Date: Wed May 24 22:30:21 2017 New Revision: 318831 URL: https://svnweb.freebsd.org/changeset/base/318831 Log: MFV r316922: 5380 receive of a send -p stream doesn't need to try renaming snapshots illumos/illumos-gate@471a88e499c660844f4590487ce7c4d5a7090294 https://github.com/illumos/illumos-gate/commit/471a88e499c660844f4590487ce7c4d5a7090294 https://www.illumos.org/issues/5380 A stream created with zfs send -p -I contains properties of all snapshots of a given dataset as opposed to only properties of snapshots in a given range. Not only this is suboptimal but the receive code also does not filter properties by the range. So, properties of earlier snapshots would be updated even though the snapshots themselves are not in the stream (just their properties). Given that modifying the snapshot properties requires a TXG sync and that the snapshots are updated one by one the described behavior may lead to a sever performance penalty. Reviewed by: Paul Dagnelie Reviewed by: Matt Ahrens Approved by: Dan McDonald Author: Andriy Gapon MFC after: 3 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Wed May 24 22:27:48 2017 (r318830) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Wed May 24 22:30:21 2017 (r318831) @@ -2800,7 +2800,7 @@ zfs_receive_package(libzfs_handle_t *hdl goto out; } - if (fromsnap != NULL) { + if (fromsnap != NULL && recursive) { nvlist_t *renamed = NULL; nvpair_t *pair = NULL; @@ -2827,7 +2827,7 @@ zfs_receive_package(libzfs_handle_t *hdl *strchr(tofs, '@') = '\0'; } - if (recursive && !flags->dryrun && !flags->nomount) { + if (!flags->dryrun && !flags->nomount) { VERIFY(0 == nvlist_alloc(&renamed, NV_UNIQUE_NAME, 0)); } @@ -2896,7 +2896,7 @@ zfs_receive_package(libzfs_handle_t *hdl anyerr |= error; } while (error == 0); - if (drr->drr_payloadlen != 0 && fromsnap != NULL) { + if (drr->drr_payloadlen != 0 && recursive && fromsnap != NULL) { /* * Now that we have the fs's they sent us, try the * renames again. From owner-svn-src-all@freebsd.org Wed May 24 22:32:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 528BFD80008; Wed, 24 May 2017 22:32:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 212901CA9; Wed, 24 May 2017 22:32:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMWvH9057637; Wed, 24 May 2017 22:32:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMWvbZ057636; Wed, 24 May 2017 22:32:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242232.v4OMWvbZ057636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 22:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318832 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:32:58 -0000 Author: avg Date: Wed May 24 22:32:56 2017 New Revision: 318832 URL: https://svnweb.freebsd.org/changeset/base/318832 Log: MFV r316923: 8026 retire zfs_throttle_delay and zfs_throttle_resolution illumos/illumos-gate@6b036259815954b7ad86d651af18efba672cb7a9 https://github.com/illumos/illumos-gate/commit/6b036259815954b7ad86d651af18efba672cb7a9 https://www.illumos.org/issues/8026 zfs_throttle_delay and zfs_throttle_resolution became disused since the new write throttling mechanism was introduced. Reviewed by: Matthew Ahrens Reviewed by: Serapheim Dimitropoulos Approved by: Richard Lowe Author: Andriy Gapon MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed May 24 22:30:21 2017 (r318831) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed May 24 22:32:56 2017 (r318832) @@ -232,9 +232,6 @@ sysctl_zfs_delay_scale(SYSCTL_HANDLER_AR } #endif -hrtime_t zfs_throttle_delay = MSEC2NSEC(10); -hrtime_t zfs_throttle_resolution = MSEC2NSEC(10); - int dsl_pool_open_special_dir(dsl_pool_t *dp, const char *name, dsl_dir_t **ddp) { From owner-svn-src-all@freebsd.org Wed May 24 22:34:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F5D2D80079; Wed, 24 May 2017 22:34:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3298F1DFB; Wed, 24 May 2017 22:34:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMYtnT057787; Wed, 24 May 2017 22:34:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMYtaK057785; Wed, 24 May 2017 22:34:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242234.v4OMYtaK057785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 22:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318833 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:34:56 -0000 Author: avg Date: Wed May 24 22:34:54 2017 New Revision: 318833 URL: https://svnweb.freebsd.org/changeset/base/318833 Log: MFV r316925: 6101 attempt to lzc_create() a filesystem under a volume results in a panic illumos/illumos-gate@b127fe3c059af7adf772735498680b4f2e1405ef https://github.com/illumos/illumos-gate/commit/b127fe3c059af7adf772735498680b4f2e1405ef https://www.illumos.org/issues/6101 lzc_create(), or more correctly, zfs_ioc_create() does not reject an attempt to create a filesystem as a child of a volume, instead it proceeds to a crash. A crash stack obtained on FreeBSD: page fault while in kernel mode zap_leaf_lookup() fzap_lookup() zap_lookup_norm() zap_lookup() zfs_get_zplprop() zfs_fill_zplprops_impl() zfs_ioc_create() zfsdev_ioctl() devfs_ioctl_f() kern_ioctl() sys_ioctl() This crash happened with a kernel without debugging assertions. The immediate cause of crash appears to an attempt to interpret a zvol object as a zap object. For filesystems: #define MASTER_NODE_OBJ 1 For zvols: #define ZVOL_OBJ 1ULL #define ZVOL_ZAP_OBJ 2ULL So, I see two problems here: 1. an attempt to create a filesystem under a zvol should be rejected as early as possible, maybe in zfs_fill_zplprops() 2. maybe zap_lookup / zap_lockdir should reject objects that are not of one of the zap object types Reviewed by: Matthew Ahrens Approved by: Dan McDonald Author: Andriy Gapon MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed May 24 22:32:56 2017 (r318832) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed May 24 22:34:54 2017 (r318833) @@ -3093,6 +3093,9 @@ zfs_fill_zplprops_impl(objset_t *os, uin ASSERT(zplprops != NULL); + if (os != NULL && os->os_phys->os_type != DMU_OST_ZFS) + return (SET_ERROR(EINVAL)); + /* * Pull out creator prop choices, if any. */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed May 24 22:32:56 2017 (r318832) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed May 24 22:34:54 2017 (r318833) @@ -2459,8 +2459,10 @@ zfs_get_zplprop(objset_t *os, zfs_prop_t else pname = zfs_prop_to_name(prop); - if (os != NULL) + if (os != NULL) { + ASSERT3U(os->os_phys->os_type, ==, DMU_OST_ZFS); error = zap_lookup(os, MASTER_NODE_OBJ, pname, 8, 1, value); + } if (error == ENOENT) { /* No value set, use the default value */ From owner-svn-src-all@freebsd.org Wed May 24 22:40:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46847D80146; Wed, 24 May 2017 22:40:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15D4310B9; Wed, 24 May 2017 22:40:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMevrn058776; Wed, 24 May 2017 22:40:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMevS0058775; Wed, 24 May 2017 22:40:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705242240.v4OMevS0058775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 22:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318834 - head/sys/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:40:58 -0000 Author: avg Date: Wed May 24 22:40:56 2017 New Revision: 318834 URL: https://svnweb.freebsd.org/changeset/base/318834 Log: MFV r316930: 5814 bpobj_iterate_impl(): Close a refcount leak iterating on a sublist. illumos/illumos-gate@b67dde11a73a9455d641403cbbb65ec2add41b41 https://github.com/illumos/illumos-gate/commit/b67dde11a73a9455d641403cbbb65ec2add41b41 https://www.illumos.org/issues/5814 Lets pull in this patch from freebsd: http://svnweb.freebsd.org/base?view=revision&revision=271781 bpobj_iterate_impl(): Close a refcount leak iterating on a sublist. If bpobj_space() returned non-zero here, the sublist would have been left open, along with the bonus buffer hold it requires. This call does not invoke any calls to bpobj_close() itself. This bug doesn't have any known vector, but was found on inspection. MFC after: 1 week Sponsored by: Spectra Logic Affects: All ZFS versions starting 21 May 2010 (illumos cde58dbc) MFSpectraBSD: r1050998 on 2014/03/26 Fix bpobj_iterate_impl() to properly call bpobj_close() if bpobj_space() returns an error. Reviewed by: Prakash Surya Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Simon Klinkert Approved by: Gordon Ross Author: Will Andrews FreeBSD note: this is a "record-only" commit as the actual change was directly committed to FreeBSD by (or on behalf of) the author. Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-all@freebsd.org Wed May 24 22:45:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A568AD803DD; Wed, 24 May 2017 22:45:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7048016D7; Wed, 24 May 2017 22:45:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id BAA01651; Thu, 25 May 2017 01:45:22 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1dDf1t-000GNp-Sd; Thu, 25 May 2017 01:45:21 +0300 Subject: Re: svn commit: r318814 - head/cddl/contrib/opensolaris/lib/libzfs_core/common To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201705242053.v4OKr1hK014752@repo.freebsd.org> From: Andriy Gapon Message-ID: <46c5fab5-baff-8ef1-3d89-d362c9bf5345@FreeBSD.org> Date: Thu, 25 May 2017 01:44:25 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <201705242053.v4OKr1hK014752@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:45:30 -0000 On 24/05/2017 23:53, Andriy Gapon wrote: > MFC r316904: 7729 libzfs_core`lzc_rollback() leaks result nvl This and a few other commits should have MFV instead of MFC in their description. Sorry for any confusion that this mistake of mine might cause. -- Andriy Gapon From owner-svn-src-all@freebsd.org Wed May 24 22:47:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0100AD80451; Wed, 24 May 2017 22:47:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C52691862; Wed, 24 May 2017 22:47:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMljN5062030; Wed, 24 May 2017 22:47:45 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMljXC062029; Wed, 24 May 2017 22:47:45 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242247.v4OMljXC062029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 22:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318835 - stable/11/sys/dev/cxgbe/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:47:47 -0000 Author: np Date: Wed May 24 22:47:45 2017 New Revision: 318835 URL: https://svnweb.freebsd.org/changeset/base/318835 Log: MFC r316172: cxgbe: Don't call t4_edc_err_read for errors not related to the EDCs. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Wed May 24 22:40:56 2017 (r318834) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Wed May 24 22:47:45 2017 (r318835) @@ -4332,7 +4332,8 @@ static void mem_intr_handler(struct adap if (v & F_ECC_CE_INT_CAUSE) { u32 cnt = G_ECC_CECNT(t4_read_reg(adapter, cnt_addr)); - t4_edc_err_read(adapter, idx); + if (idx <= MEM_EDC1) + t4_edc_err_read(adapter, idx); t4_write_reg(adapter, cnt_addr, V_ECC_CECNT(M_ECC_CECNT)); CH_WARN_RATELIMIT(adapter, From owner-svn-src-all@freebsd.org Wed May 24 22:48:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0510D804B0; Wed, 24 May 2017 22:48:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F92D19A5; Wed, 24 May 2017 22:48:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMmH9a062102; Wed, 24 May 2017 22:48:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMmHJF062101; Wed, 24 May 2017 22:48:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242248.v4OMmHJF062101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 22:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318836 - stable/10/sys/dev/cxgbe/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:48:18 -0000 Author: np Date: Wed May 24 22:48:17 2017 New Revision: 318836 URL: https://svnweb.freebsd.org/changeset/base/318836 Log: MFC r316172: cxgbe: Don't call t4_edc_err_read for errors not related to the EDCs. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Wed May 24 22:47:45 2017 (r318835) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Wed May 24 22:48:17 2017 (r318836) @@ -4329,7 +4329,8 @@ static void mem_intr_handler(struct adap if (v & F_ECC_CE_INT_CAUSE) { u32 cnt = G_ECC_CECNT(t4_read_reg(adapter, cnt_addr)); - t4_edc_err_read(adapter, idx); + if (idx <= MEM_EDC1) + t4_edc_err_read(adapter, idx); t4_write_reg(adapter, cnt_addr, V_ECC_CECNT(M_ECC_CECNT)); CH_WARN_RATELIMIT(adapter, From owner-svn-src-all@freebsd.org Wed May 24 23:08:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A53CCD809AA; Wed, 24 May 2017 23:08:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8CC1248; Wed, 24 May 2017 23:08:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ON8Hrm070620; Wed, 24 May 2017 23:08:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ON8HGm070619; Wed, 24 May 2017 23:08:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242308.v4ON8HGm070619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 23:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318837 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 23:08:18 -0000 Author: np Date: Wed May 24 23:08:17 2017 New Revision: 318837 URL: https://svnweb.freebsd.org/changeset/base/318837 Log: MFC r316506: cxgbe(4): Program the global RSS key once instead of once per ifnet. Modified: stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 22:48:17 2017 (r318836) +++ stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 23:08:17 2017 (r318837) @@ -4238,6 +4238,10 @@ int adapter_full_init(struct adapter *sc) { int rc, i; +#ifdef RSS + uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; + uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; +#endif ASSERT_SYNCHRONIZED_OP(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); @@ -4263,6 +4267,14 @@ adapter_full_init(struct adapter *sc) taskqueue_start_threads(&sc->tq[i], 1, PI_NET, "%s tq%d", device_get_nameunit(sc->dev), i); } +#ifdef RSS + MPASS(RSS_KEYSIZE == 40); + rss_getkey((void *)&raw_rss_key[0]); + for (i = 0; i < nitems(rss_key); i++) { + rss_key[i] = htobe32(raw_rss_key[nitems(rss_key) - 1 - i]); + } + t4_write_rss_key(sc, &rss_key[0], -1); +#endif if (!(sc->flags & IS_VF)) t4_intr_enable(sc); @@ -4370,8 +4382,6 @@ vi_full_init(struct vi_info *vi) int nbuckets = rss_getnumbuckets(); int hashconfig = rss_gethashconfig(); int extra; - uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; - uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; #endif ASSERT_SYNCHRONIZED_OP(sc); @@ -4401,17 +4411,10 @@ vi_full_init(struct vi_info *vi) vi->rss_size); } #ifdef RSS - MPASS(RSS_KEYSIZE == 40); if (vi->nrxq != nbuckets) { if_printf(ifp, "nrxq (%d) != kernel RSS buckets (%d);" "performance will be impacted.\n", vi->nrxq, nbuckets); } - - rss_getkey((void *)&raw_rss_key[0]); - for (i = 0; i < nitems(rss_key); i++) { - rss_key[i] = htobe32(raw_rss_key[nitems(rss_key) - 1 - i]); - } - t4_write_rss_key(sc, &rss_key[0], -1); #endif rss = malloc(vi->rss_size * sizeof (*rss), M_CXGBE, M_ZERO | M_WAITOK); for (i = 0; i < vi->rss_size;) { From owner-svn-src-all@freebsd.org Wed May 24 23:08:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A6F4D80A05; Wed, 24 May 2017 23:08:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22679137A; Wed, 24 May 2017 23:08:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ON8khv070686; Wed, 24 May 2017 23:08:46 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ON8kfF070685; Wed, 24 May 2017 23:08:46 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242308.v4ON8kfF070685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 23:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318838 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 23:08:47 -0000 Author: np Date: Wed May 24 23:08:45 2017 New Revision: 318838 URL: https://svnweb.freebsd.org/changeset/base/318838 Log: MFC r316506: cxgbe(4): Program the global RSS key once instead of once per ifnet. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 23:08:17 2017 (r318837) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 23:08:45 2017 (r318838) @@ -4042,6 +4042,10 @@ int adapter_full_init(struct adapter *sc) { int rc, i; +#ifdef RSS + uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; + uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; +#endif ASSERT_SYNCHRONIZED_OP(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); @@ -4067,6 +4071,14 @@ adapter_full_init(struct adapter *sc) taskqueue_start_threads(&sc->tq[i], 1, PI_NET, "%s tq%d", device_get_nameunit(sc->dev), i); } +#ifdef RSS + MPASS(RSS_KEYSIZE == 40); + rss_getkey((void *)&raw_rss_key[0]); + for (i = 0; i < nitems(rss_key); i++) { + rss_key[i] = htobe32(raw_rss_key[nitems(rss_key) - 1 - i]); + } + t4_write_rss_key(sc, &rss_key[0], -1); +#endif if (!(sc->flags & IS_VF)) t4_intr_enable(sc); @@ -4174,8 +4186,6 @@ vi_full_init(struct vi_info *vi) int nbuckets = rss_getnumbuckets(); int hashconfig = rss_gethashconfig(); int extra; - uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; - uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; #endif ASSERT_SYNCHRONIZED_OP(sc); @@ -4205,17 +4215,10 @@ vi_full_init(struct vi_info *vi) vi->rss_size); } #ifdef RSS - MPASS(RSS_KEYSIZE == 40); if (vi->nrxq != nbuckets) { if_printf(ifp, "nrxq (%d) != kernel RSS buckets (%d);" "performance will be impacted.\n", vi->nrxq, nbuckets); } - - rss_getkey((void *)&raw_rss_key[0]); - for (i = 0; i < nitems(rss_key); i++) { - rss_key[i] = htobe32(raw_rss_key[nitems(rss_key) - 1 - i]); - } - t4_write_rss_key(sc, &rss_key[0], -1); #endif rss = malloc(vi->rss_size * sizeof (*rss), M_CXGBE, M_ZERO | M_WAITOK); for (i = 0; i < vi->rss_size;) { From owner-svn-src-all@freebsd.org Thu May 25 00:16:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9C31D7BE71; Thu, 25 May 2017 00:16:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87C9211B1; Thu, 25 May 2017 00:16:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P0G1ar099476; Thu, 25 May 2017 00:16:01 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P0G1TW099473; Thu, 25 May 2017 00:16:01 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250016.v4P0G1TW099473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 00:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318839 - in stable/11/sys/dev/cxgbe: . common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 00:16:02 -0000 Author: np Date: Thu May 25 00:16:01 2017 New Revision: 318839 URL: https://svnweb.freebsd.org/changeset/base/318839 Log: MFC r316971: cxgbe: Add a tunable to configure the SGE time scaler, which is available starting with T6. The values in the timer holdoff registers are multiplied by the scaling factor before use. dev...holdoff_timers shows the final values of the timers in microseconds. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/common.h stable/11/sys/dev/cxgbe/common/t4_hw.c stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/common.h Wed May 24 23:08:45 2017 (r318838) +++ stable/11/sys/dev/cxgbe/common/common.h Thu May 25 00:16:01 2017 (r318839) @@ -210,7 +210,7 @@ struct tp_rdma_stats { }; struct sge_params { - int timer_val[SGE_NTIMERS]; + int timer_val[SGE_NTIMERS]; /* final, scaled values */ int counter_val[SGE_NCOUNTERS]; int fl_starve_threshold; int fl_starve_threshold2; Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Wed May 24 23:08:45 2017 (r318838) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Thu May 25 00:16:01 2017 (r318839) @@ -7907,7 +7907,7 @@ int t4_init_sge_params(struct adapter *a { u32 r; struct sge_params *sp = &adapter->params.sge; - unsigned i; + unsigned i, tscale = 1; r = t4_read_reg(adapter, A_SGE_INGRESS_RX_THRESHOLD); sp->counter_val[0] = G_THRESHOLD_0(r); @@ -7915,15 +7915,24 @@ int t4_init_sge_params(struct adapter *a sp->counter_val[2] = G_THRESHOLD_2(r); sp->counter_val[3] = G_THRESHOLD_3(r); + if (chip_id(adapter) >= CHELSIO_T6) { + r = t4_read_reg(adapter, A_SGE_ITP_CONTROL); + tscale = G_TSCALE(r); + if (tscale == 0) + tscale = 1; + else + tscale += 2; + } + r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_0_AND_1); - sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)); - sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)); + sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)) * tscale; + sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_2_AND_3); - sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)); - sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)); + sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)) * tscale; + sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_4_AND_5); - sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)); - sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)); + sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)) * tscale; + sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)) * tscale; r = t4_read_reg(adapter, A_SGE_CONM_CTRL); sp->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1; Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Wed May 24 23:08:45 2017 (r318838) +++ stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 00:16:01 2017 (r318839) @@ -150,6 +150,13 @@ TUNABLE_INT("hw.cxgbe.largest_rx_cluster static int safest_rx_cluster = PAGE_SIZE; TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); +/* + * The interrupt holdoff timers are multiplied by this value on T6+. + * 1 and 3-17 (both inclusive) are legal values. + */ +static int tscale = 1; +TUNABLE_INT("hw.cxgbe.tscale", &tscale); + struct txpkts { u_int wr_type; /* type 0 or type 1 */ u_int npkt; /* # of packets in this work request */ @@ -391,6 +398,12 @@ t4_sge_modload(void) cong_drop = 0; } + if (tscale != 1 && (tscale < 3 || tscale > 17)) { + printf("Invalid hw.cxgbe.tscale value (%d)," + " using 1 instead.\n", tscale); + tscale = 1; + } + extfree_refs = counter_u64_alloc(M_WAITOK); extfree_rels = counter_u64_alloc(M_WAITOK); counter_u64_zero(extfree_refs); @@ -583,6 +596,15 @@ t4_tweak_chip_settings(struct adapter *s V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5])); t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5, v); + if (chip_id(sc) >= CHELSIO_T6) { + m = V_TSCALE(M_TSCALE); + if (tscale == 1) + v = 0; + else + v = V_TSCALE(tscale - 2); + t4_set_reg_field(sc, A_SGE_ITP_CONTROL, m, v); + } + /* 4K, 16K, 64K, 256K DDP "page sizes" */ v = V_HPZ0(0) | V_HPZ1(2) | V_HPZ2(4) | V_HPZ3(6); t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, v); From owner-svn-src-all@freebsd.org Thu May 25 00:16:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01FE7D7BEF8; Thu, 25 May 2017 00:16:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B445F1346; Thu, 25 May 2017 00:16:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P0GffD099544; Thu, 25 May 2017 00:16:41 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P0GfcJ099541; Thu, 25 May 2017 00:16:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250016.v4P0GfcJ099541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 00:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318840 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 00:16:43 -0000 Author: np Date: Thu May 25 00:16:41 2017 New Revision: 318840 URL: https://svnweb.freebsd.org/changeset/base/318840 Log: MFC r316971: cxgbe: Add a tunable to configure the SGE time scaler, which is available starting with T6. The values in the timer holdoff registers are multiplied by the scaling factor before use. dev...holdoff_timers shows the final values of the timers in microseconds. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/common.h Thu May 25 00:16:01 2017 (r318839) +++ stable/10/sys/dev/cxgbe/common/common.h Thu May 25 00:16:41 2017 (r318840) @@ -210,7 +210,7 @@ struct tp_rdma_stats { }; struct sge_params { - int timer_val[SGE_NTIMERS]; + int timer_val[SGE_NTIMERS]; /* final, scaled values */ int counter_val[SGE_NCOUNTERS]; int fl_starve_threshold; int fl_starve_threshold2; Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Thu May 25 00:16:01 2017 (r318839) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Thu May 25 00:16:41 2017 (r318840) @@ -7904,7 +7904,7 @@ int t4_init_sge_params(struct adapter *a { u32 r; struct sge_params *sp = &adapter->params.sge; - unsigned i; + unsigned i, tscale = 1; r = t4_read_reg(adapter, A_SGE_INGRESS_RX_THRESHOLD); sp->counter_val[0] = G_THRESHOLD_0(r); @@ -7912,15 +7912,24 @@ int t4_init_sge_params(struct adapter *a sp->counter_val[2] = G_THRESHOLD_2(r); sp->counter_val[3] = G_THRESHOLD_3(r); + if (chip_id(adapter) >= CHELSIO_T6) { + r = t4_read_reg(adapter, A_SGE_ITP_CONTROL); + tscale = G_TSCALE(r); + if (tscale == 0) + tscale = 1; + else + tscale += 2; + } + r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_0_AND_1); - sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)); - sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)); + sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)) * tscale; + sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_2_AND_3); - sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)); - sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)); + sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)) * tscale; + sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_4_AND_5); - sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)); - sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)); + sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)) * tscale; + sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)) * tscale; r = t4_read_reg(adapter, A_SGE_CONM_CTRL); sp->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1; Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 00:16:01 2017 (r318839) +++ stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 00:16:41 2017 (r318840) @@ -149,6 +149,13 @@ TUNABLE_INT("hw.cxgbe.largest_rx_cluster static int safest_rx_cluster = PAGE_SIZE; TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); +/* + * The interrupt holdoff timers are multiplied by this value on T6+. + * 1 and 3-17 (both inclusive) are legal values. + */ +static int tscale = 1; +TUNABLE_INT("hw.cxgbe.tscale", &tscale); + struct txpkts { u_int wr_type; /* type 0 or type 1 */ u_int npkt; /* # of packets in this work request */ @@ -390,6 +397,12 @@ t4_sge_modload(void) cong_drop = 0; } + if (tscale != 1 && (tscale < 3 || tscale > 17)) { + printf("Invalid hw.cxgbe.tscale value (%d)," + " using 1 instead.\n", tscale); + tscale = 1; + } + extfree_refs = counter_u64_alloc(M_WAITOK); extfree_rels = counter_u64_alloc(M_WAITOK); counter_u64_zero(extfree_refs); @@ -582,6 +595,15 @@ t4_tweak_chip_settings(struct adapter *s V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5])); t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5, v); + if (chip_id(sc) >= CHELSIO_T6) { + m = V_TSCALE(M_TSCALE); + if (tscale == 1) + v = 0; + else + v = V_TSCALE(tscale - 2); + t4_set_reg_field(sc, A_SGE_ITP_CONTROL, m, v); + } + /* 4K, 16K, 64K, 256K DDP "page sizes" */ v = V_HPZ0(0) | V_HPZ1(2) | V_HPZ2(4) | V_HPZ3(6); t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, v); From owner-svn-src-all@freebsd.org Thu May 25 00:34:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90A7AD802FC; Thu, 25 May 2017 00:34:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54D661B38; Thu, 25 May 2017 00:34:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P0Y1hY007634; Thu, 25 May 2017 00:34:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P0Y1OI007633; Thu, 25 May 2017 00:34:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705250034.v4P0Y1OI007633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 25 May 2017 00:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318841 - stable/11/contrib/elftoolchain/nm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 00:34:02 -0000 Author: emaste Date: Thu May 25 00:34:01 2017 New Revision: 318841 URL: https://svnweb.freebsd.org/changeset/base/318841 Log: MFC r318603: nm: document 'r' symbol type PR: 219245 Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/elftoolchain/nm/nm.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/nm/nm.1 ============================================================================== --- stable/11/contrib/elftoolchain/nm/nm.1 Thu May 25 00:16:41 2017 (r318840) +++ stable/11/contrib/elftoolchain/nm/nm.1 Thu May 25 00:34:01 2017 (r318841) @@ -24,7 +24,7 @@ .\" .\" $Id: nm.1 3195 2015-05-12 17:22:19Z emaste $ .\" -.Dd February 15, 2015 +.Dd May 21, 2017 .Os .Dt NM 1 .Sh NAME @@ -304,6 +304,8 @@ A local (uninitialized data) symbol. .It d A local data symbol. +.It r +A local read-only data symbol. .It t A local text symbol. .It v From owner-svn-src-all@freebsd.org Thu May 25 00:43:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E947D80687; Thu, 25 May 2017 00:43:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C37B91223; Thu, 25 May 2017 00:43:57 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P0huJs011915; Thu, 25 May 2017 00:43:56 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P0huqS011913; Thu, 25 May 2017 00:43:56 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250043.v4P0huqS011913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 00:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318842 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 00:43:58 -0000 Author: np Date: Thu May 25 00:43:56 2017 New Revision: 318842 URL: https://svnweb.freebsd.org/changeset/base/318842 Log: MFC r317041: cxgbe: Add tunables to control the number of LRO entries and the number of rx mbufs that should be presorted before LRO. There is no change in default behavior. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Thu May 25 00:34:01 2017 (r318841) +++ stable/11/sys/dev/cxgbe/adapter.h Thu May 25 00:43:56 2017 (r318842) @@ -322,6 +322,7 @@ enum { IQ_HAS_FL = (1 << 1), /* iq associated with a freelist */ IQ_INTR = (1 << 2), /* iq takes direct interrupt */ IQ_LRO_ENABLED = (1 << 3), /* iq is an eth rxq with LRO enabled */ + IQ_ADJ_CREDIT = (1 << 4), /* hw is off by 1 credit for this iq */ /* iq state */ IQS_DISABLED = 0, Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 00:34:01 2017 (r318841) +++ stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 00:43:56 2017 (r318842) @@ -157,6 +157,18 @@ TUNABLE_INT("hw.cxgbe.safest_rx_cluster" static int tscale = 1; TUNABLE_INT("hw.cxgbe.tscale", &tscale); +/* + * Number of LRO entries in the lro_ctrl structure per rx queue. + */ +static int lro_entries = TCP_LRO_ENTRIES; +TUNABLE_INT("hw.cxgbe.lro_entries", &lro_entries); + +/* + * This enables presorting of frames before they're fed into tcp_lro_rx. + */ +static int lro_mbufs = 0; +TUNABLE_INT("hw.cxgbe.lro_mbufs", &lro_mbufs); + struct txpkts { u_int wr_type; /* type 0 or type 1 */ u_int npkt; /* # of packets in this work request */ @@ -1371,6 +1383,13 @@ t4_vi_intr(void *arg) t4_intr(irq->rxq); } +static inline int +sort_before_lro(struct lro_ctrl *lro) +{ + + return (lro->lro_mbuf_max != 0); +} + /* * Deals with anything and everything on the given ingress queue. */ @@ -1390,6 +1409,7 @@ service_iq(struct sge_iq *iq, int budget STAILQ_HEAD(, sge_iq) iql = STAILQ_HEAD_INITIALIZER(iql); #if defined(INET) || defined(INET6) const struct timeval lro_timeout = {0, sc->lro_timeout}; + struct lro_ctrl *lro = &rxq->lro; #endif KASSERT(iq->state == IQS_BUSY, ("%s: iq %p not BUSY", __func__, iq)); @@ -1404,6 +1424,23 @@ service_iq(struct sge_iq *iq, int budget fl_hw_cidx = 0; /* to silence gcc warning */ } +#if defined(INET) || defined(INET6) + if (iq->flags & IQ_ADJ_CREDIT) { + MPASS(sort_before_lro(lro)); + iq->flags &= ~IQ_ADJ_CREDIT; + if ((d->rsp.u.type_gen & F_RSPD_GEN) != iq->gen) { + tcp_lro_flush_all(lro); + t4_write_reg(sc, sc->sge_gts_reg, V_CIDXINC(1) | + V_INGRESSQID((u32)iq->cntxt_id) | + V_SEINTARM(iq->intr_params)); + return (0); + } + ndescs = 1; + } +#else + MPASS((iq->flags & IQ_ADJ_CREDIT) == 0); +#endif + /* * We always come back and check the descriptor ring for new indirect * interrupts and other responses after running a single handler. @@ -1515,8 +1552,9 @@ service_iq(struct sge_iq *iq, int budget #if defined(INET) || defined(INET6) if (iq->flags & IQ_LRO_ENABLED && + !sort_before_lro(lro) && sc->lro_timeout != 0) { - tcp_lro_flush_inactive(&rxq->lro, + tcp_lro_flush_inactive(lro, &lro_timeout); } #endif @@ -1556,9 +1594,14 @@ process_iql: #if defined(INET) || defined(INET6) if (iq->flags & IQ_LRO_ENABLED) { - struct lro_ctrl *lro = &rxq->lro; - - tcp_lro_flush_all(lro); + if (ndescs > 0 && lro->lro_mbuf_count > 8) { + MPASS(sort_before_lro(lro)); + /* hold back one credit and don't flush LRO state */ + iq->flags |= IQ_ADJ_CREDIT; + ndescs--; + } else { + tcp_lro_flush_all(lro); + } } #endif @@ -1847,10 +1890,14 @@ t4_eth_rx(struct sge_iq *iq, const struc } #if defined(INET) || defined(INET6) - if (iq->flags & IQ_LRO_ENABLED && - tcp_lro_rx(lro, m0, 0) == 0) { - /* queued for LRO */ - } else + if (iq->flags & IQ_LRO_ENABLED) { + if (sort_before_lro(lro)) { + tcp_lro_queue_mbuf(lro, m0); + return (0); /* queued for sort, then LRO */ + } + if (tcp_lro_rx(lro, m0, 0) == 0) + return (0); /* queued for LRO */ + } #endif ifp->if_input(ifp, m0); @@ -3041,10 +3088,10 @@ alloc_rxq(struct vi_info *vi, struct sge FL_UNLOCK(&rxq->fl); #if defined(INET) || defined(INET6) - rc = tcp_lro_init(&rxq->lro); + rc = tcp_lro_init_args(&rxq->lro, vi->ifp, lro_entries, lro_mbufs); if (rc != 0) return (rc); - rxq->lro.ifp = vi->ifp; /* also indicates LRO init'ed */ + MPASS(rxq->lro.ifp == vi->ifp); /* also indicates LRO init'ed */ if (vi->ifp->if_capenable & IFCAP_LRO) rxq->iq.flags |= IQ_LRO_ENABLED; From owner-svn-src-all@freebsd.org Thu May 25 01:00:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 115A8D80B63; Thu, 25 May 2017 01:00:59 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6E601A2A; Thu, 25 May 2017 01:00:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P10vKJ017120; Thu, 25 May 2017 01:00:57 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P10v0I017117; Thu, 25 May 2017 01:00:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250100.v4P10v0I017117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318843 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:00:59 -0000 Author: np Date: Thu May 25 01:00:57 2017 New Revision: 318843 URL: https://svnweb.freebsd.org/changeset/base/318843 Log: MFC r317820 and r317837. r317820: cxgbe(4): Update the list of PCIe devices claimed by the driver. At this point any board with a T6 should just work. r317837: cxgbe(4): Update the VF device ids too. This should have been part of r317820. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_iov.c stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_iov.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_iov.c Thu May 25 00:43:56 2017 (r318842) +++ stable/11/sys/dev/cxgbe/t4_iov.c Thu May 25 01:00:57 2017 (r318843) @@ -92,11 +92,25 @@ struct { {0x5013, "Chelsio T580-CHR"}, #endif }, t6iov_pciids[] = { + {0x6000, "Chelsio T6-DBG-25"}, /* 2 x 10/25G, debug */ {0x6001, "Chelsio T6225-CR"}, /* 2 x 10/25G */ {0x6002, "Chelsio T6225-SO-CR"}, /* 2 x 10/25G, nomem */ + {0x6003, "Chelsio T6425-CR"}, /* 4 x 10/25G */ + {0x6004, "Chelsio T6425-SO-CR"}, /* 4 x 10/25G, nomem */ + {0x6005, "Chelsio T6225-OCP-SO"}, /* 2 x 10/25G, nomem */ + {0x6006, "Chelsio T62100-OCP-SO"}, /* 2 x 40/50/100G, nomem */ {0x6007, "Chelsio T62100-LP-CR"}, /* 2 x 40/50/100G */ {0x6008, "Chelsio T62100-SO-CR"}, /* 2 x 40/50/100G, nomem */ + {0x6009, "Chelsio T6210-BT"}, /* 2 x 10GBASE-T */ {0x600d, "Chelsio T62100-CR"}, /* 2 x 40/50/100G */ + {0x6010, "Chelsio T6-DBG-100"}, /* 2 x 40/50/100G, debug */ + {0x6011, "Chelsio T6225-LL-CR"}, /* 2 x 10/25G */ + {0x6014, "Chelsio T61100-OCP-SO"}, /* 1 x 40/50/100G, nomem */ + {0x6015, "Chelsio T6201-BT"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6080, "Chelsio T6225 80"}, + {0x6081, "Chelsio T62100 81"}, }; static int t4iov_attach_child(device_t dev); Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 00:43:56 2017 (r318842) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:00:57 2017 (r318843) @@ -623,13 +623,25 @@ struct { #endif }, t6_pciids[] = { {0xc006, "Chelsio Terminator 6 FPGA"}, /* T6 PE10K6 FPGA (PF0) */ - {0x6400, "Chelsio T6225-DBG"}, /* 2 x 10/25G, debug */ + {0x6400, "Chelsio T6-DBG-25"}, /* 2 x 10/25G, debug */ {0x6401, "Chelsio T6225-CR"}, /* 2 x 10/25G */ {0x6402, "Chelsio T6225-SO-CR"}, /* 2 x 10/25G, nomem */ + {0x6403, "Chelsio T6425-CR"}, /* 4 x 10/25G */ + {0x6404, "Chelsio T6425-SO-CR"}, /* 4 x 10/25G, nomem */ + {0x6405, "Chelsio T6225-OCP-SO"}, /* 2 x 10/25G, nomem */ + {0x6406, "Chelsio T62100-OCP-SO"}, /* 2 x 40/50/100G, nomem */ {0x6407, "Chelsio T62100-LP-CR"}, /* 2 x 40/50/100G */ {0x6408, "Chelsio T62100-SO-CR"}, /* 2 x 40/50/100G, nomem */ + {0x6409, "Chelsio T6210-BT"}, /* 2 x 10GBASE-T */ {0x640d, "Chelsio T62100-CR"}, /* 2 x 40/50/100G */ - {0x6410, "Chelsio T62100-DBG"}, /* 2 x 40/50/100G, debug */ + {0x6410, "Chelsio T6-DBG-100"}, /* 2 x 40/50/100G, debug */ + {0x6411, "Chelsio T6225-LL-CR"}, /* 2 x 10/25G */ + {0x6414, "Chelsio T61100-OCP-SO"}, /* 1 x 40/50/100G, nomem */ + {0x6415, "Chelsio T6201-BT"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6480, "Chelsio T6225 80"}, + {0x6481, "Chelsio T62100 81"}, }; #ifdef TCP_OFFLOAD Modified: stable/11/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_vf.c Thu May 25 00:43:56 2017 (r318842) +++ stable/11/sys/dev/cxgbe/t4_vf.c Thu May 25 01:00:57 2017 (r318843) @@ -112,11 +112,25 @@ struct { {0x5813, "Chelsio T580-CHR VF"}, #endif }, t6vf_pciids[] = { + {0x6800, "Chelsio T6-DBG-25 VF"}, /* 2 x 10/25G, debug */ {0x6801, "Chelsio T6225-CR VF"}, /* 2 x 10/25G */ {0x6802, "Chelsio T6225-SO-CR VF"}, /* 2 x 10/25G, nomem */ + {0x6803, "Chelsio T6425-CR VF"}, /* 4 x 10/25G */ + {0x6804, "Chelsio T6425-SO-CR VF"}, /* 4 x 10/25G, nomem */ + {0x6805, "Chelsio T6225-OCP-SO VF"}, /* 2 x 10/25G, nomem */ + {0x6806, "Chelsio T62100-OCP-SO VF"}, /* 2 x 40/50/100G, nomem */ {0x6807, "Chelsio T62100-LP-CR VF"}, /* 2 x 40/50/100G */ {0x6808, "Chelsio T62100-SO-CR VF"}, /* 2 x 40/50/100G, nomem */ + {0x6809, "Chelsio T6210-BT VF"}, /* 2 x 10GBASE-T */ {0x680d, "Chelsio T62100-CR VF"}, /* 2 x 40/50/100G */ + {0x6810, "Chelsio T6-DBG-100 VF"}, /* 2 x 40/50/100G, debug */ + {0x6811, "Chelsio T6225-LL-CR VF"}, /* 2 x 10/25G */ + {0x6814, "Chelsio T61100-OCP-SO VF"}, /* 1 x 40/50/100G, nomem */ + {0x6815, "Chelsio T6201-BT VF"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6880, "Chelsio T6225 80 VF"}, + {0x6881, "Chelsio T62100 81 VF"}, }; static d_ioctl_t t4vf_ioctl; From owner-svn-src-all@freebsd.org Thu May 25 01:01:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B5F6D80BCD; Thu, 25 May 2017 01:01:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46C681CFE; Thu, 25 May 2017 01:01:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P11atF017199; Thu, 25 May 2017 01:01:36 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P11aNn017197; Thu, 25 May 2017 01:01:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250101.v4P11aNn017197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318844 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:01:37 -0000 Author: np Date: Thu May 25 01:01:35 2017 New Revision: 318844 URL: https://svnweb.freebsd.org/changeset/base/318844 Log: MFC r317820 and r317837. r317820: cxgbe(4): Update the list of PCIe devices claimed by the driver. At this point any board with a T6 should just work. r317837: cxgbe(4): Update the VF device ids too. This should have been part of r317820. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:00:57 2017 (r318843) +++ stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:01:35 2017 (r318844) @@ -611,13 +611,25 @@ struct { #endif }, t6_pciids[] = { {0xc006, "Chelsio Terminator 6 FPGA"}, /* T6 PE10K6 FPGA (PF0) */ - {0x6400, "Chelsio T6225-DBG"}, /* 2 x 10/25G, debug */ + {0x6400, "Chelsio T6-DBG-25"}, /* 2 x 10/25G, debug */ {0x6401, "Chelsio T6225-CR"}, /* 2 x 10/25G */ {0x6402, "Chelsio T6225-SO-CR"}, /* 2 x 10/25G, nomem */ + {0x6403, "Chelsio T6425-CR"}, /* 4 x 10/25G */ + {0x6404, "Chelsio T6425-SO-CR"}, /* 4 x 10/25G, nomem */ + {0x6405, "Chelsio T6225-OCP-SO"}, /* 2 x 10/25G, nomem */ + {0x6406, "Chelsio T62100-OCP-SO"}, /* 2 x 40/50/100G, nomem */ {0x6407, "Chelsio T62100-LP-CR"}, /* 2 x 40/50/100G */ {0x6408, "Chelsio T62100-SO-CR"}, /* 2 x 40/50/100G, nomem */ + {0x6409, "Chelsio T6210-BT"}, /* 2 x 10GBASE-T */ {0x640d, "Chelsio T62100-CR"}, /* 2 x 40/50/100G */ - {0x6410, "Chelsio T62100-DBG"}, /* 2 x 40/50/100G, debug */ + {0x6410, "Chelsio T6-DBG-100"}, /* 2 x 40/50/100G, debug */ + {0x6411, "Chelsio T6225-LL-CR"}, /* 2 x 10/25G */ + {0x6414, "Chelsio T61100-OCP-SO"}, /* 1 x 40/50/100G, nomem */ + {0x6415, "Chelsio T6201-BT"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6480, "Chelsio T6225 80"}, + {0x6481, "Chelsio T62100 81"}, }; #ifdef TCP_OFFLOAD Modified: stable/10/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_vf.c Thu May 25 01:00:57 2017 (r318843) +++ stable/10/sys/dev/cxgbe/t4_vf.c Thu May 25 01:01:35 2017 (r318844) @@ -114,11 +114,25 @@ struct { {0x5813, "Chelsio T580-CHR VF"}, #endif }, t6vf_pciids[] = { + {0x6800, "Chelsio T6-DBG-25 VF"}, /* 2 x 10/25G, debug */ {0x6801, "Chelsio T6225-CR VF"}, /* 2 x 10/25G */ {0x6802, "Chelsio T6225-SO-CR VF"}, /* 2 x 10/25G, nomem */ + {0x6803, "Chelsio T6425-CR VF"}, /* 4 x 10/25G */ + {0x6804, "Chelsio T6425-SO-CR VF"}, /* 4 x 10/25G, nomem */ + {0x6805, "Chelsio T6225-OCP-SO VF"}, /* 2 x 10/25G, nomem */ + {0x6806, "Chelsio T62100-OCP-SO VF"}, /* 2 x 40/50/100G, nomem */ {0x6807, "Chelsio T62100-LP-CR VF"}, /* 2 x 40/50/100G */ {0x6808, "Chelsio T62100-SO-CR VF"}, /* 2 x 40/50/100G, nomem */ + {0x6809, "Chelsio T6210-BT VF"}, /* 2 x 10GBASE-T */ {0x680d, "Chelsio T62100-CR VF"}, /* 2 x 40/50/100G */ + {0x6810, "Chelsio T6-DBG-100 VF"}, /* 2 x 40/50/100G, debug */ + {0x6811, "Chelsio T6225-LL-CR VF"}, /* 2 x 10/25G */ + {0x6814, "Chelsio T61100-OCP-SO VF"}, /* 1 x 40/50/100G, nomem */ + {0x6815, "Chelsio T6201-BT VF"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6880, "Chelsio T6225 80 VF"}, + {0x6881, "Chelsio T62100 81 VF"}, }; static d_ioctl_t t4vf_ioctl; From owner-svn-src-all@freebsd.org Thu May 25 01:09:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3EF2D80E71; Thu, 25 May 2017 01:09:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C32F41154; Thu, 25 May 2017 01:09:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P19j7p020395; Thu, 25 May 2017 01:09:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P19j2r020394; Thu, 25 May 2017 01:09:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705250109.v4P19j2r020394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 May 2017 01:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318845 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:09:47 -0000 Author: markj Date: Thu May 25 01:09:45 2017 New Revision: 318845 URL: https://svnweb.freebsd.org/changeset/base/318845 Log: MFC r318191: Let ptracestop() suspend threads sleeping in an SBDRY section. Modified: stable/11/sys/kern/kern_sig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Thu May 25 01:01:35 2017 (r318844) +++ stable/11/sys/kern/kern_sig.c Thu May 25 01:09:45 2017 (r318845) @@ -2495,6 +2495,7 @@ sig_suspend_threads(struct thread *td, s PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); + MPASS(sending || td == curthread); wakeup_swapper = 0; FOREACH_THREAD_IN_PROC(p, td2) { @@ -2511,10 +2512,9 @@ sig_suspend_threads(struct thread *td, s */ KASSERT(!TD_IS_SUSPENDED(td2), ("thread with deferred stops suspended")); - if (TD_SBDRY_INTR(td2) && sending) { + if (TD_SBDRY_INTR(td2)) wakeup_swapper |= sleepq_abort(td2, TD_SBDRY_ERRNO(td2)); - } } else if (!TD_IS_SUSPENDED(td2)) { thread_suspend_one(td2); } From owner-svn-src-all@freebsd.org Thu May 25 01:14:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87C43D804A6; Thu, 25 May 2017 01:14:35 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57EA41869; Thu, 25 May 2017 01:14:35 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1EYLb024412; Thu, 25 May 2017 01:14:34 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1EYkO024410; Thu, 25 May 2017 01:14:34 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250114.v4P1EYkO024410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318846 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:14:35 -0000 Author: np Date: Thu May 25 01:14:34 2017 New Revision: 318846 URL: https://svnweb.freebsd.org/changeset/base/318846 Log: MFC r318124: ip6_output runs with the inp lock held, just like ip_output. Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Thu May 25 01:09:45 2017 (r318845) +++ stable/11/sys/netinet6/ip6_output.c Thu May 25 01:14:34 2017 (r318846) @@ -324,6 +324,7 @@ ip6_output(struct mbuf *m0, struct ip6_p uint32_t id; if (inp != NULL) { + INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); if ((flags & IP_NODEFAULTFLOWID) == 0) { /* unconditionally set flowid */ From owner-svn-src-all@freebsd.org Thu May 25 01:17:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 869E5D80771; Thu, 25 May 2017 01:17:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 557D01C54; Thu, 25 May 2017 01:17:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1H7di024773; Thu, 25 May 2017 01:17:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1H7EJ024772; Thu, 25 May 2017 01:17:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705250117.v4P1H7EJ024772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 May 2017 01:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318848 - stable/11/sys/dev/drm2/ttm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:17:08 -0000 Author: markj Date: Thu May 25 01:17:07 2017 New Revision: 318848 URL: https://svnweb.freebsd.org/changeset/base/318848 Log: MFC r318479: Don't bother enqueuing a page immediately before freeing it. Modified: stable/11/sys/dev/drm2/ttm/ttm_page_alloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/drm2/ttm/ttm_page_alloc.c ============================================================================== --- stable/11/sys/dev/drm2/ttm/ttm_page_alloc.c Thu May 25 01:15:53 2017 (r318847) +++ stable/11/sys/dev/drm2/ttm/ttm_page_alloc.c Thu May 25 01:17:07 2017 (r318848) @@ -136,7 +136,7 @@ ttm_vm_page_free(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("ttm got unmanaged %p", m)); m->flags &= ~PG_FICTITIOUS; m->oflags |= VPO_UNMANAGED; - vm_page_unwire(m, PQ_INACTIVE); + vm_page_unwire(m, PQ_NONE); vm_page_free(m); } From owner-svn-src-all@freebsd.org Thu May 25 01:15:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5094D80618; Thu, 25 May 2017 01:15:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6B0E1AF0; Thu, 25 May 2017 01:15:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1Frie024642; Thu, 25 May 2017 01:15:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1FrNd024640; Thu, 25 May 2017 01:15:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705250115.v4P1FrNd024640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 May 2017 01:15:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318847 - in stable/11/sys: dev/drm2/ttm kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:15:54 -0000 Author: markj Date: Thu May 25 01:15:53 2017 New Revision: 318847 URL: https://svnweb.freebsd.org/changeset/base/318847 Log: MFC r318476, r318478: Fix up some kern_yield() usages. Modified: stable/11/sys/dev/drm2/ttm/ttm_bo_vm.c stable/11/sys/kern/kern_fail.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- stable/11/sys/dev/drm2/ttm/ttm_bo_vm.c Thu May 25 01:14:34 2017 (r318846) +++ stable/11/sys/dev/drm2/ttm/ttm_bo_vm.c Thu May 25 01:15:53 2017 (r318847) @@ -126,7 +126,7 @@ reserve: ret = ttm_bo_reserve(bo, false, false, false, 0); if (unlikely(ret != 0)) { if (ret == -EBUSY) { - kern_yield(0); + kern_yield(PRI_USER); goto reserve; } } @@ -139,7 +139,7 @@ reserve: case -EBUSY: case -ERESTARTSYS: case -EINTR: - kern_yield(0); + kern_yield(PRI_USER); goto reserve; default: retval = VM_PAGER_ERROR; Modified: stable/11/sys/kern/kern_fail.c ============================================================================== --- stable/11/sys/kern/kern_fail.c Thu May 25 01:14:34 2017 (r318846) +++ stable/11/sys/kern/kern_fail.c Thu May 25 01:15:53 2017 (r318847) @@ -612,7 +612,7 @@ fail_point_eval_nontrivial(struct fail_p break; case FAIL_POINT_YIELD: - kern_yield(-1); + kern_yield(PRI_UNCHANGED); break; case FAIL_POINT_DELAY: From owner-svn-src-all@freebsd.org Thu May 25 01:31:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DB59D7C794; Thu, 25 May 2017 01:31:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE933199D; Thu, 25 May 2017 01:31:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1VCkn031788; Thu, 25 May 2017 01:31:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1VCX3031787; Thu, 25 May 2017 01:31:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250131.v4P1VCX3031787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318849 - in stable: 10/release 11/release X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:31:14 -0000 Author: gjb Date: Thu May 25 01:31:12 2017 New Revision: 318849 URL: https://svnweb.freebsd.org/changeset/base/318849 Log: MFC r308737, r308779: r308737: Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwise mkimg(1) does not create the second partition after r307008. r308779: Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh for the vm-image target, missed in r308737. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/Makefile.vm Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/Makefile.vm Directory Properties: stable/10/ (props changed) Modified: stable/11/release/Makefile.vm ============================================================================== --- stable/11/release/Makefile.vm Thu May 25 01:17:07 2017 (r318848) +++ stable/11/release/Makefile.vm Thu May 25 01:31:12 2017 (r318849) @@ -55,7 +55,7 @@ ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:t cw-${_CW:tl}: mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ @@ -89,7 +89,7 @@ vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . for FORMAT in ${VMFORMATS} mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ From owner-svn-src-all@freebsd.org Thu May 25 01:31:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED1E7D7C790; Thu, 25 May 2017 01:31:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9C38199C; Thu, 25 May 2017 01:31:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1VChe031782; Thu, 25 May 2017 01:31:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1VCIP031781; Thu, 25 May 2017 01:31:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250131.v4P1VCIP031781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318849 - in stable: 10/release 11/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:31:14 -0000 Author: gjb Date: Thu May 25 01:31:12 2017 New Revision: 318849 URL: https://svnweb.freebsd.org/changeset/base/318849 Log: MFC r308737, r308779: r308737: Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwise mkimg(1) does not create the second partition after r307008. r308779: Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh for the vm-image target, missed in r308737. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile.vm Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/Makefile.vm Directory Properties: stable/11/ (props changed) Modified: stable/10/release/Makefile.vm ============================================================================== --- stable/10/release/Makefile.vm Thu May 25 01:17:07 2017 (r318848) +++ stable/10/release/Makefile.vm Thu May 25 01:31:12 2017 (r318849) @@ -58,7 +58,7 @@ ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:t cw-${_CW:tl}: mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW}_FORMAT} \ @@ -101,7 +101,7 @@ vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . for FORMAT in ${VMFORMATS} mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ From owner-svn-src-all@freebsd.org Thu May 25 01:32:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F59D7C91F; Thu, 25 May 2017 01:32:55 +0000 (UTC) (envelope-from jbtakk@iherebuywisely.com) Received: from aibo.runbox.com (aibo.runbox.com [91.220.196.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB9801F0A; Thu, 25 May 2017 01:32:54 +0000 (UTC) (envelope-from jbtakk@iherebuywisely.com) Received: from [10.9.9.127] (helo=rmmprod05.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1dDh3M-0000Oi-3P; Thu, 25 May 2017 02:55:00 +0200 Received: from mail by rmmprod05.runbox with local (Exim 4.86_2) (envelope-from ) id 1dDh3M-0004V1-1G; Thu, 25 May 2017 02:55:00 +0200 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received: from [Authenticated user (846156)] by runbox.com with http (RMM6); Thu, 25 May 2017 00:54:59 GMT From: "Jeffrey Bouquet" To: "O. Hartmann" CC: "Larry Rosenman" , "O. Hartmann" , "src-committers" , "Ed Maste" , "svn-src-all" , "svn-src-head" , "freebsd-current@freebsd.org" , "Konstantin Belousov" Subject: Re: svn commit: r318757 - head Date: Wed, 24 May 2017 17:54:59 -0700 (PDT) X-Mailer: RMM6 In-Reply-To: <20170524201000.5bfc736f@thor.intern.walstatt.dynvpn.de> Message-Id: X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:32:55 -0000 On Wed, 24 May 2017 20:10:00 +0200, "O. Hartmann" = wrote: > Am Wed, 24 May 2017 13:04:30 -0500 > Larry Rosenman schrieb: >=20 > > On 5/24/17, 1:01 PM, "O. Hartmann" wrote: > >=20 > > Am Wed, 24 May 2017 19:40:46 +0200 > > "O. Hartmann" schrieb: > >=20=20=20=20=20 > > > Am Wed, 24 May 2017 12:28:51 -0500 > > > Larry Rosenman schrieb: > > >=20=20=20 > > > > I fixed my issues by force-rebuilding perl and all installed p5= -* ports.=20 > > > >=20 > > > >=20=20=20=20=20 > > >=20 > > >=20 > > > This isn't possible in my case :-( > > >=20 > > > lang/perl rebuilds all right, but every p5-* ports fails with > > >=20 > > > [...] > > > Checking if your kit is complete... > > > ListUtil.c: loadable library and perl binaries are mismatched (go= t handshake key > > > 0xd200080, needed 0xdf00080)=20 > > > *** Error code 1 > > >=20 > > > I tried to rebuild also via portmaster -f, no success. Now, I gro= wing bunch of > > > ports showing up with this mysterious error. > > >=20 > > > To which port "ListUtil.c" might belong to? > > >=20 > > > Rebuilding autotools (which I suspected first) also fails ... > > >=20 > > >=20=20=20 > >=20=20=20=20=20 > > ... it seems, as K. belousov mentioned prior regarding different AB= I, all p5-* > > ports need to be deleted by force ... They rebuild properly afterwards. > >=20=20=20=20=20 > > Which is essentially what I did re: Poudriere (poudriere bulk =E2=80=93= C =E2=80=93j -p > > -f ) >=20 > I use the traditional "make" way (via portmaster) >=20 > --=20 > O. Hartmann >=20 > Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr > Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Ab= s. 4 BDSG). Would it be worthwhile to have say weeks 1-3 of each month usual, then the = fourth week a 'fix poudriere run of current totally [ or synth ] so that snapshots can be= had monthly of the CURRENT with ALL ports working as packages? And a freeze on CURRENT du= ring that time? so poudriere and/or synth takes precedence over CURRENT? For the sak= e of=20 persons using CURRENT as their principal desktop/dev box?= From owner-svn-src-all@freebsd.org Thu May 25 01:40:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23240D800EF; Thu, 25 May 2017 01:40:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E127116AF; Thu, 25 May 2017 01:40:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1egnr033930; Thu, 25 May 2017 01:40:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1ef4t033921; Thu, 25 May 2017 01:40:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250140.v4P1ef4t033921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318850 - in stable/11/sys: conf dev/cxgbe dev/cxgbe/common modules/cxgbe/if_cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:40:43 -0000 Author: np Date: Thu May 25 01:40:40 2017 New Revision: 318850 URL: https://svnweb.freebsd.org/changeset/base/318850 Log: MFC r317702, r317847, r318307 r317702: cxgbe(4): Support routines for Tx traffic scheduling. - Create a new file, t4_sched.c, and move all of the code related to traffic management from t4_main.c and t4_sge.c to this file. - Track both Channel Rate Limiter (ch_rl) and Class Rate Limiter (cl_rl) parameters in the PF driver. - Initialize all the cl_rl limiters with somewhat arbitrary default rates and provide routines to update them on the fly. - Provide routines to reserve and release traffic classes. r317847: cxgbe(4): The Tx scheduler initialization either works or doesn't. It doesn't need a refresh in either case. r318307: cxgbe(4): Avoid an out of bounds access when an attempt to unbind a tx queue from a traffic class fails. Sponsored by: Chelsio Communications Added: stable/11/sys/dev/cxgbe/t4_sched.c - copied, changed from r317702, head/sys/dev/cxgbe/t4_sched.c Modified: stable/11/sys/conf/files stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/common/common.h stable/11/sys/dev/cxgbe/common/t4_hw.c stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_sge.c stable/11/sys/dev/cxgbe/t4_vf.c stable/11/sys/modules/cxgbe/if_cxgbe/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/conf/files Thu May 25 01:40:40 2017 (r318850) @@ -1269,6 +1269,8 @@ dev/cxgbe/t4_main.c optional cxgbe pci compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/t4_sched.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sge.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_l2t.c optional cxgbe pci \ Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/adapter.h Thu May 25 01:40:40 2017 (r318850) @@ -231,15 +231,36 @@ struct vi_info { uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ }; +struct tx_ch_rl_params { + enum fw_sched_params_rate ratemode; /* %port (REL) or kbps (ABS) */ + uint32_t maxrate; +}; + enum { - /* tx_sched_class flags */ - TX_SC_OK = (1 << 0), /* Set up in hardware, active. */ + TX_CLRL_REFRESH = (1 << 0), /* Need to update hardware state. */ + TX_CLRL_ERROR = (1 << 1), /* Error, hardware state unknown. */ }; -struct tx_sched_class { +struct tx_cl_rl_params { int refcount; - int flags; - struct t4_sched_class_params params; + u_int flags; + enum fw_sched_params_rate ratemode; /* %port REL or ABS value */ + enum fw_sched_params_unit rateunit; /* kbps or pps (when ABS) */ + enum fw_sched_params_mode mode; /* aggr or per-flow */ + uint32_t maxrate; + uint16_t pktsize; +}; + +/* Tx scheduler parameters for a channel/port */ +struct tx_sched_params { + /* Channel Rate Limiter */ + struct tx_ch_rl_params ch_rl; + + /* Class WRR */ + /* XXX */ + + /* Class Rate Limiter */ + struct tx_cl_rl_params cl_rl[]; }; struct port_info { @@ -251,7 +272,7 @@ struct port_info { int up_vis; int uld_vis; - struct tx_sched_class *tc; /* traffic classes for this channel */ + struct tx_sched_params *sched_params; struct mtx pi_lock; char lockname[16]; @@ -825,6 +846,9 @@ struct adapter { struct memwin memwin[NUM_MEMWIN]; /* memory windows */ + struct mtx tc_lock; + struct task tc_task; + const char *last_op; const void *last_op_thr; int last_op_flags; @@ -1106,8 +1130,6 @@ int t4_detach_common(device_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int t4_map_bars_0_and_4(struct adapter *); int t4_map_bar_2(struct adapter *); -int t4_set_sched_class(struct adapter *, struct t4_sched_params *); -int t4_set_sched_queue(struct adapter *, struct t4_sched_queue *); int t4_setup_intr_handlers(struct adapter *); void t4_sysctls(struct adapter *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); @@ -1168,6 +1190,15 @@ int t4_set_tracer(struct adapter *, stru int t4_trace_pkt(struct sge_iq *, const struct rss_header *, struct mbuf *); int t5_trace_pkt(struct sge_iq *, const struct rss_header *, struct mbuf *); +/* t4_sched.c */ +int t4_set_sched_class(struct adapter *, struct t4_sched_params *); +int t4_set_sched_queue(struct adapter *, struct t4_sched_queue *); +int t4_init_tx_sched(struct adapter *); +int t4_free_tx_sched(struct adapter *); +void t4_update_tx_sched(struct adapter *); +int t4_reserve_cl_rl_kbps(struct adapter *, int, u_int, int *); +void t4_release_cl_rl_kbps(struct adapter *, int, int); + static inline struct wrqe * alloc_wrqe(int wr_len, struct sge_wrq *wrq) { Modified: stable/11/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/common.h Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/common/common.h Thu May 25 01:40:40 2017 (r318850) @@ -774,6 +774,13 @@ int t4_sched_params(struct adapter *adap int rateunit, int ratemode, int channel, int cl, int minrate, int maxrate, int weight, int pktsize, int sleep_ok); +int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode, + unsigned int maxrate, int sleep_ok); +int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl, + int weight, int sleep_ok); +int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl, + int mode, unsigned int maxrate, int pktsize, + int sleep_ok); int t4_config_watchdog(struct adapter *adapter, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int timeout, unsigned int action); Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Thu May 25 01:40:40 2017 (r318850) @@ -9396,6 +9396,79 @@ int t4_sched_params(struct adapter *adap NULL, sleep_ok); } +int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode, + unsigned int maxrate, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CH_RL; + cmd.u.params.ch = channel; + cmd.u.params.rate = ratemode; /* REL or ABS */ + cmd.u.params.max = cpu_to_be32(maxrate);/* % or kbps */ + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + +int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl, + int weight, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + if (weight < 0 || weight > 100) + return -EINVAL; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CL_WRR; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.weight = cpu_to_be16(weight); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + +int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl, + int mode, unsigned int maxrate, int pktsize, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CL_RL; + cmd.u.params.mode = mode; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.unit = FW_SCHED_PARAMS_UNIT_BITRATE; + cmd.u.params.rate = FW_SCHED_PARAMS_RATE_ABS; + cmd.u.params.max = cpu_to_be32(maxrate); + cmd.u.params.pktsize = cpu_to_be16(pktsize); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + /* * t4_config_watchdog - configure (enable/disable) a watchdog timer * @adapter: the adapter Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:40:40 2017 (r318850) @@ -1010,9 +1010,6 @@ t4_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - pi->tc = malloc(sizeof(struct tx_sched_class) * - sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (port_top_speed(pi) >= 10) { n10g++; } else { @@ -1100,6 +1097,7 @@ t4_attach(device_t dev) M_ZERO | M_WAITOK); t4_init_l2t(sc, M_WAITOK); + t4_init_tx_sched(sc); /* * Second pass over the ports. This time we know the number of rx and @@ -1324,6 +1322,9 @@ t4_detach_common(device_t dev) for (i = 0; i < sc->intr_count; i++) t4_free_irq(sc, &sc->irq[i]); + if ((sc->flags & (IS_VF | FW_OK)) == FW_OK) + t4_free_tx_sched(sc); + for (i = 0; i < MAX_NPORTS; i++) { pi = sc->port[i]; if (pi) { @@ -1333,7 +1334,6 @@ t4_detach_common(device_t dev) mtx_destroy(&pi->pi_lock); free(pi->vi, M_CXGBE); - free(pi->tc, M_CXGBE); free(pi, M_CXGBE); } } @@ -5350,9 +5350,9 @@ cxgbe_sysctls(struct port_info *pi) * dev.(cxgbe|cxl).X.tc. */ oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "tc", CTLFLAG_RD, NULL, - "Tx scheduler traffic classes"); + "Tx scheduler traffic classes (cl_rl)"); for (i = 0; i < sc->chip_params->nsched_cls; i++) { - struct tx_sched_class *tc = &pi->tc[i]; + struct tx_cl_rl_params *tc = &pi->sched_params->cl_rl[i]; snprintf(name, sizeof(name), "%d", i); children2 = SYSCTL_CHILDREN(SYSCTL_ADD_NODE(ctx, @@ -7867,10 +7867,9 @@ static int sysctl_tc_params(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; - struct tx_sched_class *tc; - struct t4_sched_class_params p; + struct tx_cl_rl_params tc; struct sbuf *sb; - int i, rc, port_id, flags, mbps, gbps; + int i, rc, port_id, mbps, gbps; rc = sysctl_wire_old_buffer(req, 0); if (rc != 0) @@ -7885,52 +7884,34 @@ sysctl_tc_params(SYSCTL_HANDLER_ARGS) MPASS(sc->port[port_id] != NULL); i = arg2 & 0xffff; MPASS(i < sc->chip_params->nsched_cls); - tc = &sc->port[port_id]->tc[i]; - - rc = begin_synchronized_op(sc, NULL, HOLD_LOCK | SLEEP_OK | INTR_OK, - "t4tc_p"); - if (rc) - goto done; - flags = tc->flags; - p = tc->params; - end_synchronized_op(sc, LOCK_HELD); - if ((flags & TX_SC_OK) == 0) { - sbuf_printf(sb, "none"); - goto done; - } + mtx_lock(&sc->tc_lock); + tc = sc->port[port_id]->sched_params->cl_rl[i]; + mtx_unlock(&sc->tc_lock); - if (p.level == SCHED_CLASS_LEVEL_CL_WRR) { - sbuf_printf(sb, "cl-wrr weight %u", p.weight); - goto done; - } else if (p.level == SCHED_CLASS_LEVEL_CL_RL) - sbuf_printf(sb, "cl-rl"); - else if (p.level == SCHED_CLASS_LEVEL_CH_RL) - sbuf_printf(sb, "ch-rl"); - else { - rc = ENXIO; + if (tc.flags & TX_CLRL_ERROR) { + sbuf_printf(sb, "error"); goto done; } - if (p.ratemode == SCHED_CLASS_RATEMODE_REL) { + if (tc.ratemode == SCHED_CLASS_RATEMODE_REL) { /* XXX: top speed or actual link speed? */ gbps = port_top_speed(sc->port[port_id]); - sbuf_printf(sb, " %u%% of %uGbps", p.maxrate, gbps); - } - else if (p.ratemode == SCHED_CLASS_RATEMODE_ABS) { - switch (p.rateunit) { + sbuf_printf(sb, " %u%% of %uGbps", tc.maxrate, gbps); + } else if (tc.ratemode == SCHED_CLASS_RATEMODE_ABS) { + switch (tc.rateunit) { case SCHED_CLASS_RATEUNIT_BITS: - mbps = p.maxrate / 1000; - gbps = p.maxrate / 1000000; - if (p.maxrate == gbps * 1000000) + mbps = tc.maxrate / 1000; + gbps = tc.maxrate / 1000000; + if (tc.maxrate == gbps * 1000000) sbuf_printf(sb, " %uGbps", gbps); - else if (p.maxrate == mbps * 1000) + else if (tc.maxrate == mbps * 1000) sbuf_printf(sb, " %uMbps", mbps); else - sbuf_printf(sb, " %uKbps", p.maxrate); + sbuf_printf(sb, " %uKbps", tc.maxrate); break; case SCHED_CLASS_RATEUNIT_PKTS: - sbuf_printf(sb, " %upps", p.maxrate); + sbuf_printf(sb, " %upps", tc.maxrate); break; default: rc = ENXIO; @@ -7938,7 +7919,7 @@ sysctl_tc_params(SYSCTL_HANDLER_ARGS) } } - switch (p.mode) { + switch (tc.mode) { case SCHED_CLASS_MODE_CLASS: sbuf_printf(sb, " aggregate"); break; @@ -8840,225 +8821,6 @@ read_i2c(struct adapter *sc, struct t4_i return (rc); } -static int -in_range(int val, int lo, int hi) -{ - - return (val < 0 || (val <= hi && val >= lo)); -} - -static int -set_sched_class_config(struct adapter *sc, int minmax) -{ - int rc; - - if (minmax < 0) - return (EINVAL); - - rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4sscc"); - if (rc) - return (rc); - rc = -t4_sched_config(sc, FW_SCHED_TYPE_PKTSCHED, minmax, 1); - end_synchronized_op(sc, 0); - - return (rc); -} - -static int -set_sched_class_params(struct adapter *sc, struct t4_sched_class_params *p, - int sleep_ok) -{ - int rc, top_speed, fw_level, fw_mode, fw_rateunit, fw_ratemode; - struct port_info *pi; - struct tx_sched_class *tc; - - if (p->level == SCHED_CLASS_LEVEL_CL_RL) - fw_level = FW_SCHED_PARAMS_LEVEL_CL_RL; - else if (p->level == SCHED_CLASS_LEVEL_CL_WRR) - fw_level = FW_SCHED_PARAMS_LEVEL_CL_WRR; - else if (p->level == SCHED_CLASS_LEVEL_CH_RL) - fw_level = FW_SCHED_PARAMS_LEVEL_CH_RL; - else - return (EINVAL); - - if (p->mode == SCHED_CLASS_MODE_CLASS) - fw_mode = FW_SCHED_PARAMS_MODE_CLASS; - else if (p->mode == SCHED_CLASS_MODE_FLOW) - fw_mode = FW_SCHED_PARAMS_MODE_FLOW; - else - return (EINVAL); - - if (p->rateunit == SCHED_CLASS_RATEUNIT_BITS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; - else if (p->rateunit == SCHED_CLASS_RATEUNIT_PKTS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE; - else - return (EINVAL); - - if (p->ratemode == SCHED_CLASS_RATEMODE_REL) - fw_ratemode = FW_SCHED_PARAMS_RATE_REL; - else if (p->ratemode == SCHED_CLASS_RATEMODE_ABS) - fw_ratemode = FW_SCHED_PARAMS_RATE_ABS; - else - return (EINVAL); - - /* Vet our parameters ... */ - if (!in_range(p->channel, 0, sc->chip_params->nchan - 1)) - return (ERANGE); - - pi = sc->port[sc->chan_map[p->channel]]; - if (pi == NULL) - return (ENXIO); - MPASS(pi->tx_chan == p->channel); - top_speed = port_top_speed(pi) * 1000000; /* Gbps -> Kbps */ - - if (!in_range(p->cl, 0, sc->chip_params->nsched_cls) || - !in_range(p->minrate, 0, top_speed) || - !in_range(p->maxrate, 0, top_speed) || - !in_range(p->weight, 0, 100)) - return (ERANGE); - - /* - * Translate any unset parameters into the firmware's - * nomenclature and/or fail the call if the parameters - * are required ... - */ - if (p->rateunit < 0 || p->ratemode < 0 || p->channel < 0 || p->cl < 0) - return (EINVAL); - - if (p->minrate < 0) - p->minrate = 0; - if (p->maxrate < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) - return (EINVAL); - else - p->maxrate = 0; - } - if (p->weight < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_WRR) - return (EINVAL); - else - p->weight = 0; - } - if (p->pktsize < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) - return (EINVAL); - else - p->pktsize = 0; - } - - rc = begin_synchronized_op(sc, NULL, - sleep_ok ? (SLEEP_OK | INTR_OK) : HOLD_LOCK, "t4sscp"); - if (rc) - return (rc); - tc = &pi->tc[p->cl]; - tc->params = *p; - rc = -t4_sched_params(sc, FW_SCHED_TYPE_PKTSCHED, fw_level, fw_mode, - fw_rateunit, fw_ratemode, p->channel, p->cl, p->minrate, p->maxrate, - p->weight, p->pktsize, sleep_ok); - if (rc == 0) - tc->flags |= TX_SC_OK; - else { - /* - * Unknown state at this point, see tc->params for what was - * attempted. - */ - tc->flags &= ~TX_SC_OK; - } - end_synchronized_op(sc, sleep_ok ? 0 : LOCK_HELD); - - return (rc); -} - -int -t4_set_sched_class(struct adapter *sc, struct t4_sched_params *p) -{ - - if (p->type != SCHED_CLASS_TYPE_PACKET) - return (EINVAL); - - if (p->subcmd == SCHED_CLASS_SUBCMD_CONFIG) - return (set_sched_class_config(sc, p->u.config.minmax)); - - if (p->subcmd == SCHED_CLASS_SUBCMD_PARAMS) - return (set_sched_class_params(sc, &p->u.params, 1)); - - return (EINVAL); -} - -int -t4_set_sched_queue(struct adapter *sc, struct t4_sched_queue *p) -{ - struct port_info *pi = NULL; - struct vi_info *vi; - struct sge_txq *txq; - uint32_t fw_mnem, fw_queue, fw_class; - int i, rc; - - rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4setsq"); - if (rc) - return (rc); - - if (p->port >= sc->params.nports) { - rc = EINVAL; - goto done; - } - - /* XXX: Only supported for the main VI. */ - pi = sc->port[p->port]; - vi = &pi->vi[0]; - if (!(vi->flags & VI_INIT_DONE)) { - /* tx queues not set up yet */ - rc = EAGAIN; - goto done; - } - - if (!in_range(p->queue, 0, vi->ntxq - 1) || - !in_range(p->cl, 0, sc->chip_params->nsched_cls - 1)) { - rc = EINVAL; - goto done; - } - - /* - * Create a template for the FW_PARAMS_CMD mnemonic and value (TX - * Scheduling Class in this case). - */ - fw_mnem = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | - V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH)); - fw_class = p->cl < 0 ? 0xffffffff : p->cl; - - /* - * If op.queue is non-negative, then we're only changing the scheduling - * on a single specified TX queue. - */ - if (p->queue >= 0) { - txq = &sc->sge.txq[vi->first_txq + p->queue]; - fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); - rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, - &fw_class); - goto done; - } - - /* - * Change the scheduling on all the TX queues for the - * interface. - */ - for_each_txq(vi, i, txq) { - fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); - rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, - &fw_class); - if (rc) - goto done; - } - - rc = 0; -done: - end_synchronized_op(sc, 0); - return (rc); -} - int t4_os_find_pci_capability(struct adapter *sc, int cap) { Copied and modified: stable/11/sys/dev/cxgbe/t4_sched.c (from r317702, head/sys/dev/cxgbe/t4_sched.c) ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Tue May 2 20:38:10 2017 (r317702, copy source) +++ stable/11/sys/dev/cxgbe/t4_sched.c Thu May 25 01:40:40 2017 (r318850) @@ -357,7 +357,6 @@ t4_init_tx_sched(struct adapter *sc) n * sizeof(*tc), M_CXGBE, M_ZERO | M_WAITOK); tc = &pi->sched_params->cl_rl[0]; for (j = 0; j < n; j++, tc++) { - tc->flags = TX_CLRL_REFRESH; tc->refcount = 0; tc->ratemode = FW_SCHED_PARAMS_RATE_ABS; tc->rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; @@ -365,8 +364,11 @@ t4_init_tx_sched(struct adapter *sc) tc->maxrate = init_kbps[min(j, nitems(init_kbps) - 1)]; tc->pktsize = ETHERMTU; /* XXX */ - t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, tc->mode, - tc->maxrate, tc->pktsize, 1); + if (t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, + tc->mode, tc->maxrate, tc->pktsize, 1) == 0) + tc->flags = 0; + else + tc->flags = TX_CLRL_ERROR; } } Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 01:40:40 2017 (r318850) @@ -5234,7 +5234,7 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) struct port_info *pi; struct adapter *sc; struct sge_txq *txq; - struct tx_sched_class *tc; + struct tx_cl_rl_params *tc; int qidx = arg2, rc, tc_idx; uint32_t fw_queue, fw_class; @@ -5248,14 +5248,14 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) if (rc != 0 || req->newptr == NULL) return (rc); + if (sc->flags & IS_VF) + return (EPERM); + /* Note that -1 is legitimate input (it means unbind). */ if (tc_idx < -1 || tc_idx >= sc->chip_params->nsched_cls) return (EINVAL); - rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4stc"); - if (rc) - return (rc); - + mtx_lock(&sc->tc_lock); if (tc_idx == txq->tc_idx) { rc = 0; /* No change, nothing to do. */ goto done; @@ -5269,35 +5269,45 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) fw_class = 0xffffffff; /* Unbind. */ else { /* - * Bind to a different class. Ethernet txq's are only allowed - * to bind to cl-rl mode-class for now. XXX: too restrictive. + * Bind to a different class. */ - tc = &pi->tc[tc_idx]; - if (tc->flags & TX_SC_OK && - tc->params.level == SCHED_CLASS_LEVEL_CL_RL && - tc->params.mode == SCHED_CLASS_MODE_CLASS) { - /* Ok to proceed. */ - fw_class = tc_idx; - } else { - rc = tc->flags & TX_SC_OK ? EBUSY : ENXIO; + tc = &pi->sched_params->cl_rl[tc_idx]; + if (tc->flags & TX_CLRL_ERROR) { + /* Previous attempt to set the cl-rl params failed. */ + rc = EIO; goto done; + } else { + /* + * Ok to proceed. Place a reference on the new class + * while still holding on to the reference on the + * previous class, if any. + */ + fw_class = tc_idx; + tc->refcount++; } } + mtx_unlock(&sc->tc_lock); + rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4stc"); + if (rc) + return (rc); rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, &fw_class); + end_synchronized_op(sc, 0); + + mtx_lock(&sc->tc_lock); if (rc == 0) { if (txq->tc_idx != -1) { - tc = &pi->tc[txq->tc_idx]; + tc = &pi->sched_params->cl_rl[txq->tc_idx]; MPASS(tc->refcount > 0); tc->refcount--; } - if (tc_idx != -1) { - tc = &pi->tc[tc_idx]; - tc->refcount++; - } txq->tc_idx = tc_idx; + } else if (tc_idx != -1) { + tc = &pi->sched_params->cl_rl[tc_idx]; + MPASS(tc->refcount > 0); + tc->refcount--; } done: - end_synchronized_op(sc, 0); + mtx_unlock(&sc->tc_lock); return (rc); } Modified: stable/11/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_vf.c Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/t4_vf.c Thu May 25 01:40:40 2017 (r318850) @@ -673,9 +673,6 @@ t4vf_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - pi->tc = malloc(sizeof(struct tx_sched_class) * - sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (port_top_speed(pi) >= 10) { n10g++; } else { Modified: stable/11/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- stable/11/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 25 01:40:40 2017 (r318850) @@ -21,6 +21,7 @@ SRCS+= t4_l2t.c SRCS+= t4_main.c SRCS+= t4_mp_ring.c SRCS+= t4_netmap.c +SRCS+= t4_sched.c SRCS+= t4_sge.c SRCS+= t4_tracer.c From owner-svn-src-all@freebsd.org Thu May 25 01:43:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39917D8042C; Thu, 25 May 2017 01:43:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A6001C28; Thu, 25 May 2017 01:43:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1hTQX037730; Thu, 25 May 2017 01:43:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1hS67037721; Thu, 25 May 2017 01:43:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250143.v4P1hS67037721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318851 - in stable/10/sys: conf dev/cxgbe dev/cxgbe/common modules/cxgbe/if_cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:43:30 -0000 Author: np Date: Thu May 25 01:43:28 2017 New Revision: 318851 URL: https://svnweb.freebsd.org/changeset/base/318851 Log: MFC r317702, r317847, r318307 r317702: cxgbe(4): Support routines for Tx traffic scheduling. - Create a new file, t4_sched.c, and move all of the code related to traffic management from t4_main.c and t4_sge.c to this file. - Track both Channel Rate Limiter (ch_rl) and Class Rate Limiter (cl_rl) parameters in the PF driver. - Initialize all the cl_rl limiters with somewhat arbitrary default rates and provide routines to update them on the fly. - Provide routines to reserve and release traffic classes. r317847: cxgbe(4): The Tx scheduler initialization either works or doesn't. It doesn't need a refresh in either case. r318307: cxgbe(4): Avoid an out of bounds access when an attempt to unbind a tx queue from a traffic class fails. Sponsored by: Chelsio Communications Added: stable/10/sys/dev/cxgbe/t4_sched.c - copied, changed from r317702, head/sys/dev/cxgbe/t4_sched.c Modified: stable/10/sys/conf/files stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/dev/cxgbe/t4_vf.c stable/10/sys/modules/cxgbe/if_cxgbe/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/conf/files Thu May 25 01:43:28 2017 (r318851) @@ -1151,6 +1151,8 @@ dev/cxgbe/t4_main.c optional cxgbe pci compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/t4_sched.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sge.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_l2t.c optional cxgbe pci \ Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/adapter.h Thu May 25 01:43:28 2017 (r318851) @@ -225,15 +225,36 @@ struct vi_info { uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ }; +struct tx_ch_rl_params { + enum fw_sched_params_rate ratemode; /* %port (REL) or kbps (ABS) */ + uint32_t maxrate; +}; + enum { - /* tx_sched_class flags */ - TX_SC_OK = (1 << 0), /* Set up in hardware, active. */ + TX_CLRL_REFRESH = (1 << 0), /* Need to update hardware state. */ + TX_CLRL_ERROR = (1 << 1), /* Error, hardware state unknown. */ }; -struct tx_sched_class { +struct tx_cl_rl_params { int refcount; - int flags; - struct t4_sched_class_params params; + u_int flags; + enum fw_sched_params_rate ratemode; /* %port REL or ABS value */ + enum fw_sched_params_unit rateunit; /* kbps or pps (when ABS) */ + enum fw_sched_params_mode mode; /* aggr or per-flow */ + uint32_t maxrate; + uint16_t pktsize; +}; + +/* Tx scheduler parameters for a channel/port */ +struct tx_sched_params { + /* Channel Rate Limiter */ + struct tx_ch_rl_params ch_rl; + + /* Class WRR */ + /* XXX */ + + /* Class Rate Limiter */ + struct tx_cl_rl_params cl_rl[]; }; struct port_info { @@ -245,7 +266,7 @@ struct port_info { int up_vis; int uld_vis; - struct tx_sched_class *tc; /* traffic classes for this channel */ + struct tx_sched_params *sched_params; struct mtx pi_lock; char lockname[16]; @@ -817,6 +838,9 @@ struct adapter { struct memwin memwin[NUM_MEMWIN]; /* memory windows */ + struct mtx tc_lock; + struct task tc_task; + const char *last_op; const void *last_op_thr; int last_op_flags; @@ -1098,8 +1122,6 @@ int t4_detach_common(device_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int t4_map_bars_0_and_4(struct adapter *); int t4_map_bar_2(struct adapter *); -int t4_set_sched_class(struct adapter *, struct t4_sched_params *); -int t4_set_sched_queue(struct adapter *, struct t4_sched_queue *); int t4_setup_intr_handlers(struct adapter *); void t4_sysctls(struct adapter *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); @@ -1160,6 +1182,15 @@ int t4_set_tracer(struct adapter *, stru int t4_trace_pkt(struct sge_iq *, const struct rss_header *, struct mbuf *); int t5_trace_pkt(struct sge_iq *, const struct rss_header *, struct mbuf *); +/* t4_sched.c */ +int t4_set_sched_class(struct adapter *, struct t4_sched_params *); +int t4_set_sched_queue(struct adapter *, struct t4_sched_queue *); +int t4_init_tx_sched(struct adapter *); +int t4_free_tx_sched(struct adapter *); +void t4_update_tx_sched(struct adapter *); +int t4_reserve_cl_rl_kbps(struct adapter *, int, u_int, int *); +void t4_release_cl_rl_kbps(struct adapter *, int, int); + static inline struct wrqe * alloc_wrqe(int wr_len, struct sge_wrq *wrq) { Modified: stable/10/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/common.h Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/common/common.h Thu May 25 01:43:28 2017 (r318851) @@ -774,6 +774,13 @@ int t4_sched_params(struct adapter *adap int rateunit, int ratemode, int channel, int cl, int minrate, int maxrate, int weight, int pktsize, int sleep_ok); +int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode, + unsigned int maxrate, int sleep_ok); +int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl, + int weight, int sleep_ok); +int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl, + int mode, unsigned int maxrate, int pktsize, + int sleep_ok); int t4_config_watchdog(struct adapter *adapter, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int timeout, unsigned int action); Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Thu May 25 01:43:28 2017 (r318851) @@ -9393,6 +9393,79 @@ int t4_sched_params(struct adapter *adap NULL, sleep_ok); } +int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode, + unsigned int maxrate, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CH_RL; + cmd.u.params.ch = channel; + cmd.u.params.rate = ratemode; /* REL or ABS */ + cmd.u.params.max = cpu_to_be32(maxrate);/* % or kbps */ + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + +int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl, + int weight, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + if (weight < 0 || weight > 100) + return -EINVAL; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CL_WRR; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.weight = cpu_to_be16(weight); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + +int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl, + int mode, unsigned int maxrate, int pktsize, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CL_RL; + cmd.u.params.mode = mode; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.unit = FW_SCHED_PARAMS_UNIT_BITRATE; + cmd.u.params.rate = FW_SCHED_PARAMS_RATE_ABS; + cmd.u.params.max = cpu_to_be32(maxrate); + cmd.u.params.pktsize = cpu_to_be16(pktsize); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + /* * t4_config_watchdog - configure (enable/disable) a watchdog timer * @adapter: the adapter Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:43:28 2017 (r318851) @@ -998,9 +998,6 @@ t4_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - pi->tc = malloc(sizeof(struct tx_sched_class) * - sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (port_top_speed(pi) >= 10) { n10g++; } else { @@ -1088,6 +1085,7 @@ t4_attach(device_t dev) M_ZERO | M_WAITOK); t4_init_l2t(sc, M_WAITOK); + t4_init_tx_sched(sc); /* * Second pass over the ports. This time we know the number of rx and @@ -1251,6 +1249,9 @@ t4_detach_common(device_t dev) for (i = 0; i < sc->intr_count; i++) t4_free_irq(sc, &sc->irq[i]); + if ((sc->flags & (IS_VF | FW_OK)) == FW_OK) + t4_free_tx_sched(sc); + for (i = 0; i < MAX_NPORTS; i++) { pi = sc->port[i]; if (pi) { @@ -1260,7 +1261,6 @@ t4_detach_common(device_t dev) mtx_destroy(&pi->pi_lock); free(pi->vi, M_CXGBE); - free(pi->tc, M_CXGBE); free(pi, M_CXGBE); } } @@ -5204,9 +5204,9 @@ cxgbe_sysctls(struct port_info *pi) * dev.(cxgbe|cxl).X.tc. */ oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "tc", CTLFLAG_RD, NULL, - "Tx scheduler traffic classes"); + "Tx scheduler traffic classes (cl_rl)"); for (i = 0; i < sc->chip_params->nsched_cls; i++) { - struct tx_sched_class *tc = &pi->tc[i]; + struct tx_cl_rl_params *tc = &pi->sched_params->cl_rl[i]; snprintf(name, sizeof(name), "%d", i); children2 = SYSCTL_CHILDREN(SYSCTL_ADD_NODE(ctx, @@ -7722,10 +7722,9 @@ static int sysctl_tc_params(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; - struct tx_sched_class *tc; - struct t4_sched_class_params p; + struct tx_cl_rl_params tc; struct sbuf *sb; - int i, rc, port_id, flags, mbps, gbps; + int i, rc, port_id, mbps, gbps; rc = sysctl_wire_old_buffer(req, 0); if (rc != 0) @@ -7740,52 +7739,34 @@ sysctl_tc_params(SYSCTL_HANDLER_ARGS) MPASS(sc->port[port_id] != NULL); i = arg2 & 0xffff; MPASS(i < sc->chip_params->nsched_cls); - tc = &sc->port[port_id]->tc[i]; - - rc = begin_synchronized_op(sc, NULL, HOLD_LOCK | SLEEP_OK | INTR_OK, - "t4tc_p"); - if (rc) - goto done; - flags = tc->flags; - p = tc->params; - end_synchronized_op(sc, LOCK_HELD); - if ((flags & TX_SC_OK) == 0) { - sbuf_printf(sb, "none"); - goto done; - } + mtx_lock(&sc->tc_lock); + tc = sc->port[port_id]->sched_params->cl_rl[i]; + mtx_unlock(&sc->tc_lock); - if (p.level == SCHED_CLASS_LEVEL_CL_WRR) { - sbuf_printf(sb, "cl-wrr weight %u", p.weight); - goto done; - } else if (p.level == SCHED_CLASS_LEVEL_CL_RL) - sbuf_printf(sb, "cl-rl"); - else if (p.level == SCHED_CLASS_LEVEL_CH_RL) - sbuf_printf(sb, "ch-rl"); - else { - rc = ENXIO; + if (tc.flags & TX_CLRL_ERROR) { + sbuf_printf(sb, "error"); goto done; } - if (p.ratemode == SCHED_CLASS_RATEMODE_REL) { + if (tc.ratemode == SCHED_CLASS_RATEMODE_REL) { /* XXX: top speed or actual link speed? */ gbps = port_top_speed(sc->port[port_id]); - sbuf_printf(sb, " %u%% of %uGbps", p.maxrate, gbps); - } - else if (p.ratemode == SCHED_CLASS_RATEMODE_ABS) { - switch (p.rateunit) { + sbuf_printf(sb, " %u%% of %uGbps", tc.maxrate, gbps); + } else if (tc.ratemode == SCHED_CLASS_RATEMODE_ABS) { + switch (tc.rateunit) { case SCHED_CLASS_RATEUNIT_BITS: - mbps = p.maxrate / 1000; - gbps = p.maxrate / 1000000; - if (p.maxrate == gbps * 1000000) + mbps = tc.maxrate / 1000; + gbps = tc.maxrate / 1000000; + if (tc.maxrate == gbps * 1000000) sbuf_printf(sb, " %uGbps", gbps); - else if (p.maxrate == mbps * 1000) + else if (tc.maxrate == mbps * 1000) sbuf_printf(sb, " %uMbps", mbps); else - sbuf_printf(sb, " %uKbps", p.maxrate); + sbuf_printf(sb, " %uKbps", tc.maxrate); break; case SCHED_CLASS_RATEUNIT_PKTS: - sbuf_printf(sb, " %upps", p.maxrate); + sbuf_printf(sb, " %upps", tc.maxrate); break; default: rc = ENXIO; @@ -7793,7 +7774,7 @@ sysctl_tc_params(SYSCTL_HANDLER_ARGS) } } - switch (p.mode) { + switch (tc.mode) { case SCHED_CLASS_MODE_CLASS: sbuf_printf(sb, " aggregate"); break; @@ -8695,225 +8676,6 @@ read_i2c(struct adapter *sc, struct t4_i return (rc); } -static int -in_range(int val, int lo, int hi) -{ - - return (val < 0 || (val <= hi && val >= lo)); -} - -static int -set_sched_class_config(struct adapter *sc, int minmax) -{ - int rc; - - if (minmax < 0) - return (EINVAL); - - rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4sscc"); - if (rc) - return (rc); - rc = -t4_sched_config(sc, FW_SCHED_TYPE_PKTSCHED, minmax, 1); - end_synchronized_op(sc, 0); - - return (rc); -} - -static int -set_sched_class_params(struct adapter *sc, struct t4_sched_class_params *p, - int sleep_ok) -{ - int rc, top_speed, fw_level, fw_mode, fw_rateunit, fw_ratemode; - struct port_info *pi; - struct tx_sched_class *tc; - - if (p->level == SCHED_CLASS_LEVEL_CL_RL) - fw_level = FW_SCHED_PARAMS_LEVEL_CL_RL; - else if (p->level == SCHED_CLASS_LEVEL_CL_WRR) - fw_level = FW_SCHED_PARAMS_LEVEL_CL_WRR; - else if (p->level == SCHED_CLASS_LEVEL_CH_RL) - fw_level = FW_SCHED_PARAMS_LEVEL_CH_RL; - else - return (EINVAL); - - if (p->mode == SCHED_CLASS_MODE_CLASS) - fw_mode = FW_SCHED_PARAMS_MODE_CLASS; - else if (p->mode == SCHED_CLASS_MODE_FLOW) - fw_mode = FW_SCHED_PARAMS_MODE_FLOW; - else - return (EINVAL); - - if (p->rateunit == SCHED_CLASS_RATEUNIT_BITS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; - else if (p->rateunit == SCHED_CLASS_RATEUNIT_PKTS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE; - else - return (EINVAL); - - if (p->ratemode == SCHED_CLASS_RATEMODE_REL) - fw_ratemode = FW_SCHED_PARAMS_RATE_REL; - else if (p->ratemode == SCHED_CLASS_RATEMODE_ABS) - fw_ratemode = FW_SCHED_PARAMS_RATE_ABS; - else - return (EINVAL); - - /* Vet our parameters ... */ - if (!in_range(p->channel, 0, sc->chip_params->nchan - 1)) - return (ERANGE); - - pi = sc->port[sc->chan_map[p->channel]]; - if (pi == NULL) - return (ENXIO); - MPASS(pi->tx_chan == p->channel); - top_speed = port_top_speed(pi) * 1000000; /* Gbps -> Kbps */ - - if (!in_range(p->cl, 0, sc->chip_params->nsched_cls) || - !in_range(p->minrate, 0, top_speed) || - !in_range(p->maxrate, 0, top_speed) || - !in_range(p->weight, 0, 100)) - return (ERANGE); - - /* - * Translate any unset parameters into the firmware's - * nomenclature and/or fail the call if the parameters - * are required ... - */ - if (p->rateunit < 0 || p->ratemode < 0 || p->channel < 0 || p->cl < 0) - return (EINVAL); - - if (p->minrate < 0) - p->minrate = 0; - if (p->maxrate < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) - return (EINVAL); - else - p->maxrate = 0; - } - if (p->weight < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_WRR) - return (EINVAL); - else - p->weight = 0; - } - if (p->pktsize < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) - return (EINVAL); - else - p->pktsize = 0; - } - - rc = begin_synchronized_op(sc, NULL, - sleep_ok ? (SLEEP_OK | INTR_OK) : HOLD_LOCK, "t4sscp"); - if (rc) - return (rc); - tc = &pi->tc[p->cl]; - tc->params = *p; - rc = -t4_sched_params(sc, FW_SCHED_TYPE_PKTSCHED, fw_level, fw_mode, - fw_rateunit, fw_ratemode, p->channel, p->cl, p->minrate, p->maxrate, - p->weight, p->pktsize, sleep_ok); - if (rc == 0) - tc->flags |= TX_SC_OK; - else { - /* - * Unknown state at this point, see tc->params for what was - * attempted. - */ - tc->flags &= ~TX_SC_OK; - } - end_synchronized_op(sc, sleep_ok ? 0 : LOCK_HELD); - - return (rc); -} - -int -t4_set_sched_class(struct adapter *sc, struct t4_sched_params *p) -{ - - if (p->type != SCHED_CLASS_TYPE_PACKET) - return (EINVAL); - - if (p->subcmd == SCHED_CLASS_SUBCMD_CONFIG) - return (set_sched_class_config(sc, p->u.config.minmax)); - - if (p->subcmd == SCHED_CLASS_SUBCMD_PARAMS) - return (set_sched_class_params(sc, &p->u.params, 1)); - - return (EINVAL); -} - -int -t4_set_sched_queue(struct adapter *sc, struct t4_sched_queue *p) -{ - struct port_info *pi = NULL; - struct vi_info *vi; - struct sge_txq *txq; - uint32_t fw_mnem, fw_queue, fw_class; - int i, rc; - - rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4setsq"); - if (rc) - return (rc); - - if (p->port >= sc->params.nports) { - rc = EINVAL; - goto done; - } - - /* XXX: Only supported for the main VI. */ - pi = sc->port[p->port]; - vi = &pi->vi[0]; - if (!(vi->flags & VI_INIT_DONE)) { - /* tx queues not set up yet */ - rc = EAGAIN; - goto done; - } - - if (!in_range(p->queue, 0, vi->ntxq - 1) || - !in_range(p->cl, 0, sc->chip_params->nsched_cls - 1)) { - rc = EINVAL; - goto done; - } - - /* - * Create a template for the FW_PARAMS_CMD mnemonic and value (TX - * Scheduling Class in this case). - */ - fw_mnem = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | - V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH)); - fw_class = p->cl < 0 ? 0xffffffff : p->cl; - - /* - * If op.queue is non-negative, then we're only changing the scheduling - * on a single specified TX queue. - */ - if (p->queue >= 0) { - txq = &sc->sge.txq[vi->first_txq + p->queue]; - fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); - rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, - &fw_class); - goto done; - } - - /* - * Change the scheduling on all the TX queues for the - * interface. - */ - for_each_txq(vi, i, txq) { - fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); - rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, - &fw_class); - if (rc) - goto done; - } - - rc = 0; -done: - end_synchronized_op(sc, 0); - return (rc); -} - int t4_os_find_pci_capability(struct adapter *sc, int cap) { Copied and modified: stable/10/sys/dev/cxgbe/t4_sched.c (from r317702, head/sys/dev/cxgbe/t4_sched.c) ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Tue May 2 20:38:10 2017 (r317702, copy source) +++ stable/10/sys/dev/cxgbe/t4_sched.c Thu May 25 01:43:28 2017 (r318851) @@ -357,7 +357,6 @@ t4_init_tx_sched(struct adapter *sc) n * sizeof(*tc), M_CXGBE, M_ZERO | M_WAITOK); tc = &pi->sched_params->cl_rl[0]; for (j = 0; j < n; j++, tc++) { - tc->flags = TX_CLRL_REFRESH; tc->refcount = 0; tc->ratemode = FW_SCHED_PARAMS_RATE_ABS; tc->rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; @@ -365,8 +364,11 @@ t4_init_tx_sched(struct adapter *sc) tc->maxrate = init_kbps[min(j, nitems(init_kbps) - 1)]; tc->pktsize = ETHERMTU; /* XXX */ - t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, tc->mode, - tc->maxrate, tc->pktsize, 1); + if (t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, + tc->mode, tc->maxrate, tc->pktsize, 1) == 0) + tc->flags = 0; + else + tc->flags = TX_CLRL_ERROR; } } Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 01:43:28 2017 (r318851) @@ -5187,7 +5187,7 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) struct port_info *pi; struct adapter *sc; struct sge_txq *txq; - struct tx_sched_class *tc; + struct tx_cl_rl_params *tc; int qidx = arg2, rc, tc_idx; uint32_t fw_queue, fw_class; @@ -5201,14 +5201,14 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) if (rc != 0 || req->newptr == NULL) return (rc); + if (sc->flags & IS_VF) + return (EPERM); + /* Note that -1 is legitimate input (it means unbind). */ if (tc_idx < -1 || tc_idx >= sc->chip_params->nsched_cls) return (EINVAL); - rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4stc"); - if (rc) - return (rc); - + mtx_lock(&sc->tc_lock); if (tc_idx == txq->tc_idx) { rc = 0; /* No change, nothing to do. */ goto done; @@ -5222,35 +5222,45 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) fw_class = 0xffffffff; /* Unbind. */ else { /* - * Bind to a different class. Ethernet txq's are only allowed - * to bind to cl-rl mode-class for now. XXX: too restrictive. + * Bind to a different class. */ - tc = &pi->tc[tc_idx]; - if (tc->flags & TX_SC_OK && - tc->params.level == SCHED_CLASS_LEVEL_CL_RL && - tc->params.mode == SCHED_CLASS_MODE_CLASS) { - /* Ok to proceed. */ - fw_class = tc_idx; - } else { - rc = tc->flags & TX_SC_OK ? EBUSY : ENXIO; + tc = &pi->sched_params->cl_rl[tc_idx]; + if (tc->flags & TX_CLRL_ERROR) { + /* Previous attempt to set the cl-rl params failed. */ + rc = EIO; goto done; + } else { + /* + * Ok to proceed. Place a reference on the new class + * while still holding on to the reference on the + * previous class, if any. + */ + fw_class = tc_idx; + tc->refcount++; } } + mtx_unlock(&sc->tc_lock); + rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4stc"); + if (rc) + return (rc); rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, &fw_class); + end_synchronized_op(sc, 0); + + mtx_lock(&sc->tc_lock); if (rc == 0) { if (txq->tc_idx != -1) { - tc = &pi->tc[txq->tc_idx]; + tc = &pi->sched_params->cl_rl[txq->tc_idx]; MPASS(tc->refcount > 0); tc->refcount--; } - if (tc_idx != -1) { - tc = &pi->tc[tc_idx]; - tc->refcount++; - } txq->tc_idx = tc_idx; + } else if (tc_idx != -1) { + tc = &pi->sched_params->cl_rl[tc_idx]; + MPASS(tc->refcount > 0); + tc->refcount--; } done: - end_synchronized_op(sc, 0); + mtx_unlock(&sc->tc_lock); return (rc); } Modified: stable/10/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_vf.c Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/t4_vf.c Thu May 25 01:43:28 2017 (r318851) @@ -675,9 +675,6 @@ t4vf_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - pi->tc = malloc(sizeof(struct tx_sched_class) * - sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (port_top_speed(pi) >= 10) { n10g++; } else { Modified: stable/10/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- stable/10/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 25 01:43:28 2017 (r318851) @@ -20,6 +20,7 @@ SRCS+= t4_l2t.c SRCS+= t4_main.c SRCS+= t4_mp_ring.c SRCS+= t4_netmap.c +SRCS+= t4_sched.c SRCS+= t4_sge.c SRCS+= t4_tracer.c From owner-svn-src-all@freebsd.org Thu May 25 01:43:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D48AD80480; Thu, 25 May 2017 01:43:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B421C90; Thu, 25 May 2017 01:43:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1hdGc037911; Thu, 25 May 2017 01:43:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1hdtq037910; Thu, 25 May 2017 01:43:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250143.v4P1hdtq037910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318852 - stable/11/usr.sbin/efivar X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:43:40 -0000 Author: gjb Date: Thu May 25 01:43:39 2017 New Revision: 318852 URL: https://svnweb.freebsd.org/changeset/base/318852 Log: MFC r318599, r318643: r318599 (bjk): Updates for efivar.8 Fix spelling, appease igor and mandoc -Tlint, and adopt the language style to be more consistent with our corpus. r318643: Correct the "first appeared in" version for efivar(8). Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/efivar/efivar.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/efivar/efivar.8 ============================================================================== --- stable/11/usr.sbin/efivar/efivar.8 Thu May 25 01:43:28 2017 (r318851) +++ stable/11/usr.sbin/efivar/efivar.8 Thu May 25 01:43:39 2017 (r318852) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2017 +.Dd May 22, 2017 .Dt EFIVAR 8 .Os .Sh NAME .Nm efivar -.Nd UEFI environemnt variable interaction +.Nd UEFI environment variable interaction .Sh SYNOPSIS .Nm .Op Fl abdDHlLNpRtw @@ -58,7 +58,7 @@ This program manages .Pq UEFI environment variables. UEFI variables have three part: A namespace, a name and a value. -The namespace is a GUID that's self assigned by the group defining the +The namespace is a GUID that is self assigned by the group defining the variables. The name is a Unicode name for the variable. The value is binary data. @@ -70,7 +70,7 @@ The following options are available: Specify the name of the variable to operate on. The .Ar name -argument is the GUID of variable, followed by a dash, followed by the +argument is the GUID of the variable, followed by a dash, followed by the UEFI variable name. The GUID may be in numeric format, or may be one of the well known symbolic name (see @@ -86,19 +86,19 @@ This flag implies unless the .Fl -append flag is given. -This is not well understood and currently unimplemented. +This behavior is not well understood and is currently unimplemented. .It Fl a Fl -append Append the specified value to the UEFI variable rather than replacing -it.p +it. .It Fl t Ar attr Fl -attributes Ar attr -Specify, in user hostile hexidecimal, the attributes for this +Specify, in hexadecimal, the attributes for this variable. See section 7.2 (GetVariable subsection, Related Definitions) of the UEFI Specification for hex values to use. .It Fl A Fl -ascii Display the variable data as modified ascii: All printable characters are printed, while unprintable characters are rendered as a two-digit -hexadecimal number preceeded by a % character. +hexadecimal number preceded by a % character. .It Fl b Fl -binary Display the variable data as binary data. Usually will be used with the @@ -155,31 +155,29 @@ can be used to specify simple strings. Display the .Ar name environment variable. +.El .Sh COMPATIBILITY The .Nm -program is intended to be compatible (strict superset) with a progam -of the same name included in the Red Hat libefivar package. -.Pp -Except the +program is intended to be compatible (strict superset) with a program +of the same name included in the Red Hat libefivar package, +but the .Fl d and .Fl -print-decimal -flags are not implmenented and never will be. +flags are not implemented and never will be. +.Pp The .Fl d -flag is a short-hand for +flag is short for .Fl -device-path . .Sh SEE ALSO Appendix A of the UEFI specification has the format for GUIDs. All GUIDs .Dq Globally Unique Identifiers have the format described in RFC 4122. -.El -.Pp -.Xr efivar 8 .Sh HISTORY The .Nm utility first appeared in -.Fx 12.0 . +.Fx 11.1 . From owner-svn-src-all@freebsd.org Thu May 25 01:45:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B39B6D806DB; Thu, 25 May 2017 01:45:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65D681208; Thu, 25 May 2017 01:45:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1jh8Q038228; Thu, 25 May 2017 01:45:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1jhi5038226; Thu, 25 May 2017 01:45:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250145.v4P1jhi5038226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318853 - in stable: 10/release 10/release/scripts 11/release 11/release/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:45:44 -0000 Author: gjb Date: Thu May 25 01:45:43 2017 New Revision: 318853 URL: https://svnweb.freebsd.org/changeset/base/318853 Log: MFC r318646: Allow PORTSDIR to be overridden in the pkg-stage target. PR: 218393 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile stable/10/release/scripts/pkg-stage.sh Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/Makefile stable/11/release/scripts/pkg-stage.sh Directory Properties: stable/11/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Thu May 25 01:43:39 2017 (r318852) +++ stable/10/release/Makefile Thu May 25 01:45:43 2017 (r318853) @@ -307,7 +307,7 @@ packagesystem: base.txz kernel.txz ${EXT pkg-stage: .if !defined(NOPKG) - env REPOS_DIR=${.CURDIR}/pkg_repos/ \ + env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ sh ${.CURDIR}/scripts/pkg-stage.sh mkdir -p ${.OBJDIR}/dvd/packages/repos/ cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ Modified: stable/10/release/scripts/pkg-stage.sh ============================================================================== --- stable/10/release/scripts/pkg-stage.sh Thu May 25 01:43:39 2017 (r318852) +++ stable/10/release/scripts/pkg-stage.sh Thu May 25 01:45:43 2017 (r318853) @@ -10,6 +10,7 @@ export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" +export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES="archivers/unzip devel/subversion @@ -32,8 +33,8 @@ x11/kde4 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). -if [ ! -f /usr/ports/Makefile ]; then - echo "*** /usr/ports is missing! ***" +if [ ! -f ${PORTSDIR}/Makefile ]; then + echo "*** ${PORTSDIR} is missing! ***" echo "*** Skipping pkg-stage.sh ***" echo "*** Unset NOPORTS to fix this ***" exit 0 @@ -41,7 +42,7 @@ fi if [ ! -x /usr/local/sbin/pkg ]; then /etc/rc.d/ldconfig restart - /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean + /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean fi export DVD_DIR="dvd/packages" @@ -57,7 +58,7 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "/usr/ports/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else echo "*** Skipping nonexistent port: ${_P}" From owner-svn-src-all@freebsd.org Thu May 25 01:45:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09B0BD806DF; Thu, 25 May 2017 01:45:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B43691213; Thu, 25 May 2017 01:45:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1jhiD038235; Thu, 25 May 2017 01:45:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1jhP1038233; Thu, 25 May 2017 01:45:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250145.v4P1jhP1038233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318853 - in stable: 10/release 10/release/scripts 11/release 11/release/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:45:45 -0000 Author: gjb Date: Thu May 25 01:45:43 2017 New Revision: 318853 URL: https://svnweb.freebsd.org/changeset/base/318853 Log: MFC r318646: Allow PORTSDIR to be overridden in the pkg-stage target. PR: 218393 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/Makefile stable/11/release/scripts/pkg-stage.sh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/Makefile stable/10/release/scripts/pkg-stage.sh Directory Properties: stable/10/ (props changed) Modified: stable/11/release/Makefile ============================================================================== --- stable/11/release/Makefile Thu May 25 01:43:39 2017 (r318852) +++ stable/11/release/Makefile Thu May 25 01:45:43 2017 (r318853) @@ -266,7 +266,7 @@ packagesystem: base.txz kernel.txz ${EXT pkg-stage: .if !defined(NOPKG) - env REPOS_DIR=${.CURDIR}/pkg_repos/ \ + env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ sh ${.CURDIR}/scripts/pkg-stage.sh mkdir -p ${.OBJDIR}/dvd/packages/repos/ cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ Modified: stable/11/release/scripts/pkg-stage.sh ============================================================================== --- stable/11/release/scripts/pkg-stage.sh Thu May 25 01:43:39 2017 (r318852) +++ stable/11/release/scripts/pkg-stage.sh Thu May 25 01:45:43 2017 (r318853) @@ -10,6 +10,7 @@ export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" +export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES="archivers/unzip devel/subversion @@ -33,8 +34,8 @@ x11/kde4 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). -if [ ! -f /usr/ports/Makefile ]; then - echo "*** /usr/ports is missing! ***" +if [ ! -f ${PORTSDIR}/Makefile ]; then + echo "*** ${PORTSDIR} is missing! ***" echo "*** Skipping pkg-stage.sh ***" echo "*** Unset NOPORTS to fix this ***" exit 0 @@ -42,7 +43,7 @@ fi if [ ! -x /usr/local/sbin/pkg ]; then /etc/rc.d/ldconfig restart - /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean + /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean fi export DVD_DIR="dvd/packages" @@ -58,7 +59,7 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "/usr/ports/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else echo "*** Skipping nonexistent port: ${_P}" From owner-svn-src-all@freebsd.org Thu May 25 02:00:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86779D8011B; Thu, 25 May 2017 02:00:00 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60E891236; Thu, 25 May 2017 02:00:00 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1xxi6043558; Thu, 25 May 2017 01:59:59 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1xxDK043555; Thu, 25 May 2017 01:59:59 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250159.v4P1xxDK043555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318854 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 02:00:00 -0000 Author: np Date: Thu May 25 01:59:58 2017 New Revision: 318854 URL: https://svnweb.freebsd.org/changeset/base/318854 Log: MFC r318014, r318091, r318125, and r318263. r318014: cxgbe(4): Fixes related to the knob that controls link autonegotiation. - Do not leak the adapter lock in sysctl_autoneg. - Accept only 0 or 1 as valid settings for autonegotiation. - A fixed speed must be requested by the driver when autonegotiation is disabled otherwise the firmware will reject the l1cfg command. Use the top speed supported by the port for now. r318091: cxgbe(4): Do not assume that if_qflush is always followed by inteface-down. r318125: Adjust whitespace and fix a comment. No functional change. r318263: cxgbe(4): netmap-only interrupts for a VI do not have an associated rxq or ofld_rxq and should be ignored by vi_intr_iq. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Thu May 25 01:45:43 2017 (r318853) +++ stable/11/sys/dev/cxgbe/adapter.h Thu May 25 01:59:58 2017 (r318854) @@ -204,11 +204,11 @@ struct vi_info { int first_intr; /* These need to be int as they are used in sysctl */ - int ntxq; /* # of tx queues */ - int first_txq; /* index of first tx queue */ - int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ - int nrxq; /* # of rx queues */ - int first_rxq; /* index of first rx queue */ + int ntxq; /* # of tx queues */ + int first_txq; /* index of first tx queue */ + int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ + int nrxq; /* # of rx queues */ + int first_rxq; /* index of first rx queue */ int nofldtxq; /* # of offload tx queues */ int first_ofld_txq; /* index of first offload tx queue */ int nofldrxq; /* # of offload rx queues */ @@ -399,6 +399,7 @@ enum { EQ_TYPEMASK = 0x3, /* 2 lsbits hold the type (see above) */ EQ_ALLOCATED = (1 << 2), /* firmware resources allocated */ EQ_ENABLED = (1 << 3), /* open for business */ + EQ_QFLUSH = (1 << 4), /* if_qflush in progress */ }; /* Listed in order of preference. Update t4_sysctls too if you change these */ @@ -704,7 +705,7 @@ struct sge_nm_txq { struct sge { int nrxq; /* total # of Ethernet rx queues */ - int ntxq; /* total # of Ethernet tx tx queues */ + int ntxq; /* total # of Ethernet tx queues */ int nofldrxq; /* total # of TOE rx queues */ int nofldtxq; /* total # of TOE tx queues */ int nnmrxq; /* total # of netmap rx queues */ @@ -1086,6 +1087,24 @@ port_top_speed(const struct port_info *p } static inline int +port_top_speed_raw(const struct port_info *pi) +{ + + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) + return (FW_PORT_CAP_SPEED_100G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) + return (FW_PORT_CAP_SPEED_40G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) + return (FW_PORT_CAP_SPEED_25G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) + return (FW_PORT_CAP_SPEED_10G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) + return (FW_PORT_CAP_SPEED_1G); + + return (0); +} + +static inline int tx_resume_threshold(struct sge_eq *eq) { Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:45:43 2017 (r318853) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:59:58 2017 (r318854) @@ -995,6 +995,7 @@ t4_attach(device_t dev) lc->autoneg = t4_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE; } + lc->requested_speed = port_top_speed_raw(pi); rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) { @@ -1868,12 +1869,15 @@ cxgbe_qflush(struct ifnet *ifp) if (vi->flags & VI_INIT_DONE) { for_each_txq(vi, i, txq) { TXQ_LOCK(txq); - txq->eq.flags &= ~EQ_ENABLED; + txq->eq.flags |= EQ_QFLUSH; TXQ_UNLOCK(txq); while (!mp_ring_is_idle(txq->r)) { mp_ring_check_drainage(txq->r, 0); pause("qflush", 1); } + TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_QFLUSH; + TXQ_UNLOCK(txq); } } if_qflush(ifp); @@ -5883,7 +5887,12 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) if ((lc->supported & FW_PORT_CAP_ANEG) == 0) return (ENOTSUP); - val = val ? AUTONEG_ENABLE : AUTONEG_DISABLE; + if (val == 0) + val = AUTONEG_DISABLE; + else if (val == 1) + val = AUTONEG_ENABLE; + else + return (EINVAL); if (lc->autoneg == val) return (0); /* no change */ @@ -5896,6 +5905,7 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) lc->autoneg = old; + end_synchronized_op(sc, 0); return (rc); } Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 01:45:43 2017 (r318853) +++ stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 01:59:58 2017 (r318854) @@ -960,6 +960,11 @@ vi_intr_iq(struct vi_info *vi, int idx) return (&sc->sge.fwq); nintr = vi->nintr; +#ifdef DEV_NETMAP + /* Do not consider any netmap-only interrupts */ + if (vi->flags & INTR_RXQ && vi->nnmrxq > vi->nrxq) + nintr -= vi->nnmrxq - vi->nrxq; +#endif KASSERT(nintr != 0, ("%s: vi %p has no exclusive interrupts, total interrupts = %d", __func__, vi, sc->intr_count)); @@ -2443,6 +2448,13 @@ cannot_use_txpkts(struct mbuf *m) return (needs_tso(m)); } +static inline int +discard_tx(struct sge_eq *eq) +{ + + return ((eq->flags & (EQ_ENABLED | EQ_QFLUSH)) != EQ_ENABLED); +} + /* * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to * be consumed. Return the actual number consumed. 0 indicates a stall. @@ -2468,7 +2480,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_ total = 0; TXQ_LOCK(txq); - if (__predict_false((eq->flags & EQ_ENABLED) == 0)) { + if (__predict_false(discard_tx(eq))) { while (cidx != pidx) { m0 = r->items[cidx]; m_freem(m0); From owner-svn-src-all@freebsd.org Thu May 25 02:00:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C277D801E8; Thu, 25 May 2017 02:00:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 692F413C0; Thu, 25 May 2017 02:00:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P20b3K043692; Thu, 25 May 2017 02:00:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P20bsZ043689; Thu, 25 May 2017 02:00:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250200.v4P20bsZ043689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 02:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318855 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 02:00:38 -0000 Author: np Date: Thu May 25 02:00:37 2017 New Revision: 318855 URL: https://svnweb.freebsd.org/changeset/base/318855 Log: MFC r318014, r318091, r318125, and r318263. r318014: cxgbe(4): Fixes related to the knob that controls link autonegotiation. - Do not leak the adapter lock in sysctl_autoneg. - Accept only 0 or 1 as valid settings for autonegotiation. - A fixed speed must be requested by the driver when autonegotiation is disabled otherwise the firmware will reject the l1cfg command. Use the top speed supported by the port for now. r318091: cxgbe(4): Do not assume that if_qflush is always followed by inteface-down. r318125: Adjust whitespace and fix a comment. No functional change. r318263: cxgbe(4): netmap-only interrupts for a VI do not have an associated rxq or ofld_rxq and should be ignored by vi_intr_iq. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Thu May 25 01:59:58 2017 (r318854) +++ stable/10/sys/dev/cxgbe/adapter.h Thu May 25 02:00:37 2017 (r318855) @@ -198,11 +198,11 @@ struct vi_info { int first_intr; /* These need to be int as they are used in sysctl */ - int ntxq; /* # of tx queues */ - int first_txq; /* index of first tx queue */ - int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ - int nrxq; /* # of rx queues */ - int first_rxq; /* index of first rx queue */ + int ntxq; /* # of tx queues */ + int first_txq; /* index of first tx queue */ + int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ + int nrxq; /* # of rx queues */ + int first_rxq; /* index of first rx queue */ int nofldtxq; /* # of offload tx queues */ int first_ofld_txq; /* index of first offload tx queue */ int nofldrxq; /* # of offload rx queues */ @@ -391,6 +391,7 @@ enum { EQ_TYPEMASK = 0x3, /* 2 lsbits hold the type (see above) */ EQ_ALLOCATED = (1 << 2), /* firmware resources allocated */ EQ_ENABLED = (1 << 3), /* open for business */ + EQ_QFLUSH = (1 << 4), /* if_qflush in progress */ }; /* Listed in order of preference. Update t4_sysctls too if you change these */ @@ -696,7 +697,7 @@ struct sge_nm_txq { struct sge { int nrxq; /* total # of Ethernet rx queues */ - int ntxq; /* total # of Ethernet tx tx queues */ + int ntxq; /* total # of Ethernet tx queues */ int nofldrxq; /* total # of TOE rx queues */ int nofldtxq; /* total # of TOE tx queues */ int nnmrxq; /* total # of netmap rx queues */ @@ -1078,6 +1079,24 @@ port_top_speed(const struct port_info *p } static inline int +port_top_speed_raw(const struct port_info *pi) +{ + + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) + return (FW_PORT_CAP_SPEED_100G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) + return (FW_PORT_CAP_SPEED_40G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) + return (FW_PORT_CAP_SPEED_25G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) + return (FW_PORT_CAP_SPEED_10G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) + return (FW_PORT_CAP_SPEED_1G); + + return (0); +} + +static inline int tx_resume_threshold(struct sge_eq *eq) { Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:59:58 2017 (r318854) +++ stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 02:00:37 2017 (r318855) @@ -983,6 +983,7 @@ t4_attach(device_t dev) lc->autoneg = t4_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE; } + lc->requested_speed = port_top_speed_raw(pi); rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) { @@ -1794,12 +1795,15 @@ cxgbe_qflush(struct ifnet *ifp) if (vi->flags & VI_INIT_DONE) { for_each_txq(vi, i, txq) { TXQ_LOCK(txq); - txq->eq.flags &= ~EQ_ENABLED; + txq->eq.flags |= EQ_QFLUSH; TXQ_UNLOCK(txq); while (!mp_ring_is_idle(txq->r)) { mp_ring_check_drainage(txq->r, 0); pause("qflush", 1); } + TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_QFLUSH; + TXQ_UNLOCK(txq); } } if_qflush(ifp); @@ -5738,7 +5742,12 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) if ((lc->supported & FW_PORT_CAP_ANEG) == 0) return (ENOTSUP); - val = val ? AUTONEG_ENABLE : AUTONEG_DISABLE; + if (val == 0) + val = AUTONEG_DISABLE; + else if (val == 1) + val = AUTONEG_ENABLE; + else + return (EINVAL); if (lc->autoneg == val) return (0); /* no change */ @@ -5751,6 +5760,7 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) lc->autoneg = old; + end_synchronized_op(sc, 0); return (rc); } Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 01:59:58 2017 (r318854) +++ stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 02:00:37 2017 (r318855) @@ -947,6 +947,11 @@ vi_intr_iq(struct vi_info *vi, int idx) return (&sc->sge.fwq); nintr = vi->nintr; +#ifdef DEV_NETMAP + /* Do not consider any netmap-only interrupts */ + if (vi->flags & INTR_RXQ && vi->nnmrxq > vi->nrxq) + nintr -= vi->nnmrxq - vi->nrxq; +#endif KASSERT(nintr != 0, ("%s: vi %p has no exclusive interrupts, total interrupts = %d", __func__, vi, sc->intr_count)); @@ -2396,6 +2401,13 @@ cannot_use_txpkts(struct mbuf *m) return (needs_tso(m)); } +static inline int +discard_tx(struct sge_eq *eq) +{ + + return ((eq->flags & (EQ_ENABLED | EQ_QFLUSH)) != EQ_ENABLED); +} + /* * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to * be consumed. Return the actual number consumed. 0 indicates a stall. @@ -2421,7 +2433,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_ total = 0; TXQ_LOCK(txq); - if (__predict_false((eq->flags & EQ_ENABLED) == 0)) { + if (__predict_false(discard_tx(eq))) { while (cidx != pidx) { m0 = r->items[cidx]; m_freem(m0); From owner-svn-src-all@freebsd.org Thu May 25 04:18:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90DF4D81C0B; Thu, 25 May 2017 04:18:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 299EE1F89; Thu, 25 May 2017 04:18:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P4Imw9004247; Thu, 25 May 2017 04:18:48 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P4IkbT004230; Thu, 25 May 2017 04:18:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705250418.v4P4IkbT004230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 25 May 2017 04:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318856 - in head/sys: dev/ath dev/ath/ath_dfs/null dev/ath/ath_hal dev/ath/ath_rate/sample modules modules/ath modules/ath_dfs modules/ath_hal modules/ath_hal_ar5210 modules/ath_hal_ar... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 04:18:49 -0000 Author: adrian Date: Thu May 25 04:18:46 2017 New Revision: 318856 URL: https://svnweb.freebsd.org/changeset/base/318856 Log: [ath] [ath_hal] (etc, etc) - begin the task of re-modularising the HAL. In the deep past, when this code compiled as a binary module, ath_hal built as a module. This allowed custom, smaller HAL modules to be built. This was especially beneficial for small embedded platforms where you didn't require /everything/ just to run. However, sometime around the HAL opening fanfare, the HAL landed here as one big driver+HAL thing, and a lot of the (dirty) infrastructure (ie, #ifdef AH_SUPPORT_XXX) to build specific subsets of the HAL went away. This was retained in sys/conf/files as "ath_hal_XXX" but it wasn't really floated up to the modules themselves. I'm now in a position where for the reaaaaaly embedded boards (both the really old and the last couple generation of QCA MIPS boards) having a cut down HAL module and driver loaded at runtime is /actually/ beneficial. This reduces the kernel size down by quite a bit. The MIPS modules look like this: adrian@gertrude:~/work/freebsd/head-embedded/src % ls -l ../root/mips_ap/boot/kernel.CARAMBOLA2/ath*ko -r-xr-xr-x 1 adrian adrian 5076 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_dfs.ko -r-xr-xr-x 1 adrian adrian 100588 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_hal.ko -r-xr-xr-x 1 adrian adrian 627324 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_hal_ar9300.ko -r-xr-xr-x 1 adrian adrian 314588 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_main.ko -r-xr-xr-x 1 adrian adrian 23472 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_rate.ko And the x86 versions, like this: root@gertrude:/home/adrian # ls -l /boot/kernel/ath*ko -r-xr-xr-x 1 root wheel 36632 May 24 18:32 /boot/kernel/ath_dfs.ko -r-xr-xr-x 1 root wheel 134440 May 24 18:32 /boot/kernel/ath_hal.ko -r-xr-xr-x 1 root wheel 82320 May 24 18:32 /boot/kernel/ath_hal_ar5210.ko -r-xr-xr-x 1 root wheel 104976 May 24 18:32 /boot/kernel/ath_hal_ar5211.ko -r-xr-xr-x 1 root wheel 236144 May 24 18:32 /boot/kernel/ath_hal_ar5212.ko -r-xr-xr-x 1 root wheel 336104 May 24 18:32 /boot/kernel/ath_hal_ar5416.ko -r-xr-xr-x 1 root wheel 598336 May 24 18:32 /boot/kernel/ath_hal_ar9300.ko -r-xr-xr-x 1 root wheel 406144 May 24 18:32 /boot/kernel/ath_main.ko -r-xr-xr-x 1 root wheel 55352 May 24 18:32 /boot/kernel/ath_rate.ko .. so you can see, not building the whole HAL can save quite a bit. For example, if you don't need AR9300 support, you can actually avoid wasting half a megabyte of RAM. On embedded routers this is quite a big deal. The AR9300 HAL can be later further shrunk because, hilariously, it indeed supports AH_SUPPORT_ for optionally adding chipset support. (I'll chase that down later as it's quite a big savings if you're only building for a single embedded target.) So: * Create a very hackish way to load/unload HAL modules * Create module metadata for each HAL subtype - ah_osdep_arXXXX.c * Create module metadata for ath_rate and ath_dfs (bluetooth is currently just built as part of it) * .. yes, this means we could actually build multiple rate control modules and pick one at load time, but I'd rather just glue this into net80211's rate control code. Oh well, baby steps. * Main driver is now "ath_main" * Create an "if_ath" module that does what the ye olde one did - load PCI glue, main driver, HAL and all child modules. In this way, if you have "if_ath_load=YES" in /boot/modules.conf it will load everything the old way and stuff should still work. * For module autoloading purposes, I actually /did/ fix up the name of the modules in if_ath_pci and if_ath_ahb. If you want to selectively load things (eg on ye cheape ARM/MIPS platforms where RAM is at a premium) you should: * load ath_hal * load the chip modules in question * load ath_rate, ath_dfs * load ath_main * load if_ath_pci and/or if_ath_ahb depending upon your particular bus bind type - this is where probe/attach is done. TODO: * AR5312 module and associated pieces - yes, we have the SoC side support now so the wifi support would be good to "round things out"; * Just nuke AH_SUPPORT_AR5416 for now and always bloat the packet structures; this'll simplify other things. * Should add a simple refcnt thing to the HAL RF/chip modules so you can't unload them whilst you're using them. * Manpage updates, UPDATING if appropriate, etc. Added: head/sys/dev/ath/ah_osdep_ar5210.c (contents, props changed) head/sys/dev/ath/ah_osdep_ar5211.c (contents, props changed) head/sys/dev/ath/ah_osdep_ar5212.c (contents, props changed) head/sys/dev/ath/ah_osdep_ar5416.c (contents, props changed) head/sys/dev/ath/ah_osdep_ar9300.c (contents, props changed) head/sys/dev/ath/if_ath_dfs.c (contents, props changed) head/sys/dev/ath/if_ath_drv.c (contents, props changed) head/sys/dev/ath/if_ath_rate.c (contents, props changed) head/sys/modules/ath_dfs/ head/sys/modules/ath_dfs/Makefile (contents, props changed) head/sys/modules/ath_hal/ head/sys/modules/ath_hal/Makefile (contents, props changed) head/sys/modules/ath_hal_ar5210/ head/sys/modules/ath_hal_ar5210/Makefile (contents, props changed) head/sys/modules/ath_hal_ar5211/ head/sys/modules/ath_hal_ar5211/Makefile (contents, props changed) head/sys/modules/ath_hal_ar5212/ head/sys/modules/ath_hal_ar5212/Makefile (contents, props changed) head/sys/modules/ath_hal_ar5416/ head/sys/modules/ath_hal_ar5416/Makefile (contents, props changed) head/sys/modules/ath_hal_ar9300/ head/sys/modules/ath_hal_ar9300/Makefile (contents, props changed) head/sys/modules/ath_main/ head/sys/modules/ath_main/Makefile (contents, props changed) head/sys/modules/ath_rate/ head/sys/modules/ath_rate/Makefile (contents, props changed) Modified: head/sys/dev/ath/ah_osdep.c head/sys/dev/ath/ath_dfs/null/dfs_null.c head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_rate/sample/sample.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_ahb.c head/sys/dev/ath/if_ath_pci.c head/sys/modules/Makefile head/sys/modules/ath/Makefile Modified: head/sys/dev/ath/ah_osdep.c ============================================================================== --- head/sys/dev/ath/ah_osdep.c Thu May 25 02:00:37 2017 (r318855) +++ head/sys/dev/ath/ah_osdep.c Thu May 25 04:18:46 2017 (r318856) @@ -41,6 +41,7 @@ #include #include #include +#include #include @@ -420,3 +421,31 @@ ath_hal_assert_failed(const char* filena panic("ath_hal_assert"); } #endif /* AH_ASSERT */ + +static int +ath_hal_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + printf("[ath_hal] loaded\n"); + break; + + case MOD_UNLOAD: + printf("[ath_hal] unloaded\n"); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + return (error); +} + +DEV_MODULE(ath_hal, ath_hal_modevent, NULL); +MODULE_VERSION(ath_hal, 1); Added: head/sys/dev/ath/ah_osdep_ar5210.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ah_osdep_ar5210.c Thu May 25 04:18:46 2017 (r318856) @@ -0,0 +1,74 @@ +/*- + * Copyright 2017 Adrian Chadd . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include "opt_ah.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +extern struct ath_hal_chip AR5210_chip; + +static int +ath_hal_ar5210_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + ath_hal_add_chip(&AR5210_chip); + printf("[ar5210] loaded\n"); + break; + + case MOD_UNLOAD: + ath_hal_remove_chip(&AR5210_chip); + printf("[ar5210] unloaded\n"); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + return (error); +} + +DEV_MODULE(ath_hal_ar5210, ath_hal_ar5210_modevent, NULL); +MODULE_VERSION(ath_hal_ar5210, 1); +MODULE_DEPEND(ath_hal_ar5210, ath_hal, 1, 1, 1); Added: head/sys/dev/ath/ah_osdep_ar5211.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ah_osdep_ar5211.c Thu May 25 04:18:46 2017 (r318856) @@ -0,0 +1,74 @@ +/*- + * Copyright 2017 Adrian Chadd . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include "opt_ah.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +extern struct ath_hal_chip AR5211_chip; + +static int +ath_hal_ar5211_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + ath_hal_add_chip(&AR5211_chip); + printf("[ar5211] loaded\n"); + break; + + case MOD_UNLOAD: + ath_hal_remove_chip(&AR5211_chip); + printf("[ar5211] unloaded\n"); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + return (error); +} + +DEV_MODULE(ath_hal_ar5211, ath_hal_ar5211_modevent, NULL); +MODULE_VERSION(ath_hal_ar5211, 1); +MODULE_DEPEND(ath_hal_ar5211, ath_hal, 1, 1, 1); Added: head/sys/dev/ath/ah_osdep_ar5212.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ah_osdep_ar5212.c Thu May 25 04:18:46 2017 (r318856) @@ -0,0 +1,95 @@ +/*- + * Copyright 2017 Adrian Chadd . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include "opt_ah.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +extern struct ath_hal_chip AR5212_chip; +//extern struct ath_hal_rf RF2316_rf; +//extern struct ath_hal_rf RF2317_rf; +extern struct ath_hal_rf RF2413_rf; +extern struct ath_hal_rf RF2425_rf; +extern struct ath_hal_rf RF5111_rf; +extern struct ath_hal_rf RF5112_rf; +extern struct ath_hal_rf RF5413_rf; + +static int +ath_hal_ar5212_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + ath_hal_add_chip(&AR5212_chip); +// ath_hal_add_rf(&RF2316_rf); +// ath_hal_add_rf(&RF2317_rf); + ath_hal_add_rf(&RF2413_rf); + ath_hal_add_rf(&RF2425_rf); + ath_hal_add_rf(&RF5111_rf); + ath_hal_add_rf(&RF5112_rf); + ath_hal_add_rf(&RF5413_rf); + printf("[ar5212] loaded\n"); + break; + + case MOD_UNLOAD: + ath_hal_remove_chip(&AR5212_chip); +// ath_hal_remove_rf(&RF2316_rf); +// ath_hal_remove_rf(&RF2317_rf); + ath_hal_remove_rf(&RF2413_rf); + ath_hal_remove_rf(&RF2425_rf); + ath_hal_remove_rf(&RF5111_rf); + ath_hal_remove_rf(&RF5112_rf); + ath_hal_remove_rf(&RF5413_rf); + printf("[ar5212] unloaded\n"); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + return (error); +} + +DEV_MODULE(ath_hal_ar5212, ath_hal_ar5212_modevent, NULL); +MODULE_VERSION(ath_hal_ar5212, 1); +MODULE_DEPEND(ath_hal_ar5212, ath_hal, 1, 1, 1); Added: head/sys/dev/ath/ah_osdep_ar5416.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ah_osdep_ar5416.c Thu May 25 04:18:46 2017 (r318856) @@ -0,0 +1,103 @@ +/*- + * Copyright 2017 Adrian Chadd . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include "opt_ah.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +extern struct ath_hal_chip AR5416_chip; +extern struct ath_hal_chip AR9130_chip; +extern struct ath_hal_chip AR9160_chip; +extern struct ath_hal_chip AR9280_chip; +extern struct ath_hal_chip AR9285_chip; +extern struct ath_hal_chip AR9287_chip; + +extern struct ath_hal_rf RF2133_rf; +extern struct ath_hal_rf RF9280_rf; +extern struct ath_hal_rf RF9285_rf; +extern struct ath_hal_rf RF9287_rf; + +static int +ath_hal_ar5416_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + ath_hal_add_chip(&AR5416_chip); + ath_hal_add_chip(&AR9130_chip); + ath_hal_add_chip(&AR9160_chip); + ath_hal_add_chip(&AR9280_chip); + ath_hal_add_chip(&AR9285_chip); + ath_hal_add_chip(&AR9287_chip); + ath_hal_add_rf(&RF2133_rf); + ath_hal_add_rf(&RF9280_rf); + ath_hal_add_rf(&RF9285_rf); + ath_hal_add_rf(&RF9287_rf); + printf("[ar5416] loaded\n"); + break; + + case MOD_UNLOAD: + ath_hal_remove_chip(&AR5416_chip); + ath_hal_remove_chip(&AR9130_chip); + ath_hal_remove_chip(&AR9160_chip); + ath_hal_remove_chip(&AR9280_chip); + ath_hal_remove_chip(&AR9285_chip); + ath_hal_remove_chip(&AR9287_chip); + ath_hal_remove_rf(&RF2133_rf); + ath_hal_remove_rf(&RF9280_rf); + ath_hal_remove_rf(&RF9285_rf); + ath_hal_remove_rf(&RF9287_rf); + printf("[ar5416] unloaded\n"); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + return (error); +} + +DEV_MODULE(ath_hal_ar5416, ath_hal_ar5416_modevent, NULL); +MODULE_VERSION(ath_hal_ar5416, 1); +MODULE_DEPEND(ath_hal_ar5416, ath_hal, 1, 1, 1); +MODULE_DEPEND(ath_hal_ar5416, ath_hal_ar5212, 1, 1, 1); Added: head/sys/dev/ath/ah_osdep_ar9300.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ah_osdep_ar9300.c Thu May 25 04:18:46 2017 (r318856) @@ -0,0 +1,74 @@ +/*- + * Copyright 2017 Adrian Chadd . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include "opt_ah.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +extern struct ath_hal_chip AR9300_chip; + +static int +ath_hal_ar9300_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + ath_hal_add_chip(&AR9300_chip); + printf("[ar9300] loaded\n"); + break; + + case MOD_UNLOAD: + ath_hal_remove_chip(&AR9300_chip); + printf("[ar9300] unloaded\n"); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + return (error); +} + +DEV_MODULE(ath_hal_ar9300, ath_hal_ar9300_modevent, NULL); +MODULE_VERSION(ath_hal_ar9300, 1); +MODULE_DEPEND(ath_hal_ar9300, ath_hal, 1, 1, 1); Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c ============================================================================== --- head/sys/dev/ath/ath_dfs/null/dfs_null.c Thu May 25 02:00:37 2017 (r318855) +++ head/sys/dev/ath/ath_dfs/null/dfs_null.c Thu May 25 04:18:46 2017 (r318856) @@ -102,7 +102,7 @@ ath_dfs_detach(struct ath_softc *sc) int ath_dfs_radar_enable(struct ath_softc *sc, struct ieee80211_channel *chan) { -#if 0 +#if 1 HAL_PHYERR_PARAM pe; /* Check if the hardware supports radar reporting */ @@ -155,7 +155,7 @@ ath_dfs_radar_enable(struct ath_softc *s int ath_dfs_radar_disable(struct ath_softc *sc) { -#if 0 +#if 1 HAL_PHYERR_PARAM pe; (void) ath_hal_getdfsthresh(sc->sc_ah, &pe); Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Thu May 25 02:00:37 2017 (r318855) +++ head/sys/dev/ath/ath_hal/ah.c Thu May 25 04:18:46 2017 (r318856) @@ -28,6 +28,23 @@ /* linker set of registered chips */ OS_SET_DECLARE(ah_chips, struct ath_hal_chip); +TAILQ_HEAD(, ath_hal_chip) ah_chip_list = TAILQ_HEAD_INITIALIZER(ah_chip_list); + +int +ath_hal_add_chip(struct ath_hal_chip *ahc) +{ + + TAILQ_INSERT_TAIL(&ah_chip_list, ahc, node); + return (0); +} + +int +ath_hal_remove_chip(struct ath_hal_chip *ahc) +{ + + TAILQ_REMOVE(&ah_chip_list, ahc, node); + return (0); +} /* * Check the set of registered chips to see if any recognize @@ -37,12 +54,22 @@ const char* ath_hal_probe(uint16_t vendorid, uint16_t devid) { struct ath_hal_chip * const *pchip; + struct ath_hal_chip *pc; + /* Linker set */ OS_SET_FOREACH(pchip, ah_chips) { const char *name = (*pchip)->probe(vendorid, devid); if (name != AH_NULL) return name; } + + /* List */ + TAILQ_FOREACH(pc, &ah_chip_list, node) { + const char *name = pc->probe(vendorid, devid); + if (name != AH_NULL) + return name; + } + return AH_NULL; } @@ -60,6 +87,7 @@ ath_hal_attach(uint16_t devid, HAL_SOFTC HAL_STATUS *error) { struct ath_hal_chip * const *pchip; + struct ath_hal_chip *pc; OS_SET_FOREACH(pchip, ah_chips) { struct ath_hal_chip *chip = *pchip; @@ -82,6 +110,30 @@ ath_hal_attach(uint16_t devid, HAL_SOFTC return ah; } } + + /* List */ + TAILQ_FOREACH(pc, &ah_chip_list, node) { + struct ath_hal_chip *chip = pc; + struct ath_hal *ah; + + /* XXX don't have vendorid, assume atheros one works */ + if (chip->probe(ATHEROS_VENDOR_ID, devid) == AH_NULL) + continue; + ah = chip->attach(devid, sc, st, sh, eepromdata, ah_config, + error); + if (ah != AH_NULL) { + /* copy back private state to public area */ + ah->ah_devid = AH_PRIVATE(ah)->ah_devid; + ah->ah_subvendorid = AH_PRIVATE(ah)->ah_subvendorid; + ah->ah_macVersion = AH_PRIVATE(ah)->ah_macVersion; + ah->ah_macRev = AH_PRIVATE(ah)->ah_macRev; + ah->ah_phyRev = AH_PRIVATE(ah)->ah_phyRev; + ah->ah_analog5GhzRev = AH_PRIVATE(ah)->ah_analog5GhzRev; + ah->ah_analog2GhzRev = AH_PRIVATE(ah)->ah_analog2GhzRev; + return ah; + } + } + return AH_NULL; } @@ -160,6 +212,23 @@ ath_hal_getwirelessmodes(struct ath_hal* /* linker set of registered RF backends */ OS_SET_DECLARE(ah_rfs, struct ath_hal_rf); +TAILQ_HEAD(, ath_hal_rf) ah_rf_list = TAILQ_HEAD_INITIALIZER(ah_rf_list); + +int +ath_hal_add_rf(struct ath_hal_rf *arf) +{ + + TAILQ_INSERT_TAIL(&ah_rf_list, arf, node); + return (0); +} + +int +ath_hal_remove_rf(struct ath_hal_rf *arf) +{ + + TAILQ_REMOVE(&ah_rf_list, arf, node); + return (0); +} /* * Check the set of registered RF backends to see if @@ -169,12 +238,18 @@ struct ath_hal_rf * ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode) { struct ath_hal_rf * const *prf; + struct ath_hal_rf * rf; OS_SET_FOREACH(prf, ah_rfs) { struct ath_hal_rf *rf = *prf; if (rf->probe(ah)) return rf; } + + TAILQ_FOREACH(rf, &ah_rf_list, node) { + if (rf->probe(ah)) + return rf; + } *ecode = HAL_ENOTSUPP; return AH_NULL; } Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Thu May 25 02:00:37 2017 (r318855) +++ head/sys/dev/ath/ath_hal/ah_internal.h Thu May 25 04:18:46 2017 (r318856) @@ -28,6 +28,7 @@ #define AH_MAX(a,b) ((a)>(b)?(a):(b)) #include +#include /* XXX for reasons */ #include "opt_ah.h" /* needed for AH_SUPPORT_AR5416 */ #ifndef AH_SUPPORT_AR5416 @@ -85,6 +86,11 @@ typedef enum { /* * Each chip or class of chips registers to offer support. + * + * Compiled-in versions will include a linker set to iterate through the + * linked in code. + * + * Modules will have to register HAL backends separately. */ struct ath_hal_chip { const char *name; @@ -93,13 +99,14 @@ struct ath_hal_chip { HAL_BUS_TAG, HAL_BUS_HANDLE, uint16_t *eepromdata, HAL_OPS_CONFIG *ah, HAL_STATUS *error); + TAILQ_ENTRY(ath_hal_chip) node; }; #ifndef AH_CHIP #define AH_CHIP(_name, _probe, _attach) \ -static struct ath_hal_chip _name##_chip = { \ +struct ath_hal_chip _name##_chip = { \ .name = #_name, \ .probe = _probe, \ - .attach = _attach \ + .attach = _attach, \ }; \ OS_DATA_SET(ah_chips, _name##_chip) #endif @@ -108,18 +115,24 @@ OS_DATA_SET(ah_chips, _name##_chip) * Each RF backend registers to offer support; this is mostly * used by multi-chip 5212 solutions. Single-chip solutions * have a fixed idea about which RF to use. + * + * Compiled in versions will include this linker set to iterate through + * the linked in code. + * + * Modules will have to register RF backends separately. */ struct ath_hal_rf { const char *name; HAL_BOOL (*probe)(struct ath_hal *ah); HAL_BOOL (*attach)(struct ath_hal *ah, HAL_STATUS *ecode); + TAILQ_ENTRY(ath_hal_rf) node; }; #ifndef AH_RF #define AH_RF(_name, _probe, _attach) \ -static struct ath_hal_rf _name##_rf = { \ +struct ath_hal_rf _name##_rf = { \ .name = __STRING(_name), \ .probe = _probe, \ - .attach = _attach \ + .attach = _attach, \ }; \ OS_DATA_SET(ah_rfs, _name##_rf) #endif @@ -1038,4 +1051,12 @@ extern void ath_hal_survey_clear(struct extern void ath_hal_survey_add_sample(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hs); +/* + * Chip registration - for modules. + */ +extern int ath_hal_add_chip(struct ath_hal_chip *ahc); +extern int ath_hal_remove_chip(struct ath_hal_chip *ahc); +extern int ath_hal_add_rf(struct ath_hal_rf *arf); +extern int ath_hal_remove_rf(struct ath_hal_rf *arf); + #endif /* _ATH_AH_INTERAL_H_ */ Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Thu May 25 02:00:37 2017 (r318855) +++ head/sys/dev/ath/ath_rate/sample/sample.c Thu May 25 04:18:46 2017 (r318856) @@ -775,6 +775,10 @@ update_stats(struct ath_softc *sc, struc * XXX Don't mark the higher bit rates as also having failed; as this * unfortunately stops those rates from being tasted when trying to * TX. This happens with 11n aggregation. + * + * This is valid for higher CCK rates, higher OFDM rates, and higher + * HT rates within the current number of streams (eg MCS0..7, 8..15, + * etc.) */ if (nframes == nbad) { #if 0 Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu May 25 02:00:37 2017 (r318855) +++ head/sys/dev/ath/if_ath.c Thu May 25 04:18:46 2017 (r318856) @@ -6989,8 +6989,11 @@ ath_node_recv_pspoll(struct ieee80211_no #endif /* ATH_SW_PSQ */ } -MODULE_VERSION(if_ath, 1); -MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */ +MODULE_VERSION(ath_main, 1); +MODULE_DEPEND(ath_main, wlan, 1, 1, 1); /* 802.11 media layer */ +MODULE_DEPEND(ath_main, ath_rate, 1, 1, 1); +MODULE_DEPEND(ath_main, ath_dfs, 1, 1, 1); +MODULE_DEPEND(ath_main, ath_hal, 1, 1, 1); #if defined(IEEE80211_ALQ) || defined(AH_DEBUG_ALQ) || defined(ATH_DEBUG_ALQ) -MODULE_DEPEND(if_ath, alq, 1, 1, 1); +MODULE_DEPEND(ath_main, alq, 1, 1, 1); #endif Modified: head/sys/dev/ath/if_ath_ahb.c ============================================================================== --- head/sys/dev/ath/if_ath_ahb.c Thu May 25 02:00:37 2017 (r318855) +++ head/sys/dev/ath/if_ath_ahb.c Thu May 25 04:18:46 2017 (r318856) @@ -343,8 +343,9 @@ static driver_t ath_ahb_driver = { sizeof (struct ath_ahb_softc) }; static devclass_t ath_devclass; -DRIVER_MODULE(ath, nexus, ath_ahb_driver, ath_devclass, 0, 0); -DRIVER_MODULE(ath, apb, ath_ahb_driver, ath_devclass, 0, 0); -MODULE_VERSION(ath, 1); -MODULE_DEPEND(ath, wlan, 1, 1, 1); /* 802.11 media layer */ -MODULE_DEPEND(ath, if_ath, 1, 1, 1); /* if_ath driver */ +DRIVER_MODULE(if_ath_ahb, nexus, ath_ahb_driver, ath_devclass, 0, 0); +DRIVER_MODULE(if_ath_ahb, apb, ath_ahb_driver, ath_devclass, 0, 0); +MODULE_VERSION(if_ath_ahb, 1); +MODULE_DEPEND(if_ath_ahb, wlan, 1, 1, 1); /* 802.11 media layer */ +MODULE_DEPEND(if_ath_ahb, ath_main, 1, 1, 1); /* if_ath driver */ +MODULE_DEPEND(if_ath_ahb, ath_hal, 1, 1, 1); /* ath HAL */ Added: head/sys/dev/ath/if_ath_dfs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_dfs.c Thu May 25 04:18:46 2017 (r318856) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2017 Adrian Chadd . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ +#include "opt_ah.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int +ath_dfs_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + printf("[ath_dfs] loaded\n"); + break; + + case MOD_UNLOAD: + printf("[ath_dfs] unloaded\n"); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + return (error); +} + +DEV_MODULE(ath_dfs, ath_dfs_modevent, NULL); +MODULE_VERSION(ath_dfs, 1); +MODULE_DEPEND(ath_dfs, ath_hal, 1, 1, 1); +MODULE_DEPEND(ath_dfs, wlan, 1, 1, 1); Added: head/sys/dev/ath/if_ath_drv.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_drv.c Thu May 25 04:18:46 2017 (r318856) @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2017 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ +#include "opt_ah.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This implements the "old" style ath(4) module behaviour, which loaded the + * driver, HAL and PCI glue. + */ + +static int +ath_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + printf("[ath] loaded\n"); + break; + + case MOD_UNLOAD: + printf("[ath] unloaded\n"); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + return (error); +} + +DEV_MODULE(if_ath, ath_modevent, NULL); + +MODULE_VERSION(if_ath, 1); +MODULE_DEPEND(if_ath, ath_hal, 1, 1, 1); +MODULE_DEPEND(if_ath, ath_hal_ar5210, 1, 1, 1); +MODULE_DEPEND(if_ath, ath_hal_ar5211, 1, 1, 1); +MODULE_DEPEND(if_ath, ath_hal_ar5212, 1, 1, 1); +MODULE_DEPEND(if_ath, ath_hal_ar5416, 1, 1, 1); +MODULE_DEPEND(if_ath, ath_hal_ar9300, 1, 1, 1); +MODULE_DEPEND(if_ath, ath_rate, 1, 1, 1); +MODULE_DEPEND(if_ath, ath_dfs, 1, 1, 1); +MODULE_DEPEND(if_ath, wlan, 1, 1, 1); +MODULE_DEPEND(if_ath, ath_main, 1, 1, 1); +MODULE_DEPEND(if_ath, if_ath_pci, 1, 1, 1); Modified: head/sys/dev/ath/if_ath_pci.c ============================================================================== --- head/sys/dev/ath/if_ath_pci.c Thu May 25 02:00:37 2017 (r318855) +++ head/sys/dev/ath/if_ath_pci.c Thu May 25 04:18:46 2017 (r318856) @@ -463,7 +463,8 @@ static driver_t ath_pci_driver = { sizeof (struct ath_pci_softc) }; static devclass_t ath_devclass; -DRIVER_MODULE(ath_pci, pci, ath_pci_driver, ath_devclass, 0, 0); -MODULE_VERSION(ath_pci, 1); -MODULE_DEPEND(ath_pci, wlan, 1, 1, 1); /* 802.11 media layer */ -MODULE_DEPEND(ath_pci, if_ath, 1, 1, 1); /* if_ath driver */ +DRIVER_MODULE(if_ath_pci, pci, ath_pci_driver, ath_devclass, 0, 0); +MODULE_VERSION(if_ath_pci, 1); +MODULE_DEPEND(if_ath_pci, wlan, 1, 1, 1); /* 802.11 media layer */ +MODULE_DEPEND(if_ath_pci, ath_main, 1, 1, 1); /* if_ath driver */ +MODULE_DEPEND(if_ath_pci, ath_hal, 1, 1, 1); /* ath HAL */ Added: head/sys/dev/ath/if_ath_rate.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_rate.c Thu May 25 04:18:46 2017 (r318856) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2017 Adrian Chadd . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ +#include "opt_ah.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int +ath_rate_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + printf("[ath_rate] loaded\n"); + break; + + case MOD_UNLOAD: + printf("[ath_rate] unloaded\n"); + break; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 25 04:26:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 972BCD81F11; Thu, 25 May 2017 04:26:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73BCA14C1; Thu, 25 May 2017 04:26:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P4QRqi008334; Thu, 25 May 2017 04:26:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P4QRqZ008330; Thu, 25 May 2017 04:26:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705250426.v4P4QRqZ008330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 25 May 2017 04:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318857 - in head/sys/dev/ath: . ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 04:26:28 -0000 Author: adrian Date: Thu May 25 04:26:26 2017 New Revision: 318857 URL: https://svnweb.freebsd.org/changeset/base/318857 Log: [ath] [ath_hal] retire AH_SUPPORT_AR5416 changing anything. Yes, the memory bloat is large, but it's 2017 and I'll fix it later by making it runtime configurable / per-chip configurable if I ever need to. Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah_desc.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/if_ath_rx.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Thu May 25 04:18:46 2017 (r318856) +++ head/sys/dev/ath/ath_hal/ah.c Thu May 25 04:26:26 2017 (r318857) @@ -1188,7 +1188,6 @@ ath_hal_get_mimo_chan_noise(struct ath_h const struct ieee80211_channel *chan, int16_t *nf_ctl, int16_t *nf_ext) { -#ifdef AH_SUPPORT_AR5416 HAL_CHANNEL_INTERNAL *ichan; int i; @@ -1243,9 +1242,6 @@ ath_hal_get_mimo_chan_noise(struct ath_h } return 1; } -#else - return 0; -#endif /* AH_SUPPORT_AR5416 */ } /* Modified: head/sys/dev/ath/ath_hal/ah_desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_desc.h Thu May 25 04:18:46 2017 (r318856) +++ head/sys/dev/ath/ath_hal/ah_desc.h Thu May 25 04:26:26 2017 (r318857) @@ -20,21 +20,6 @@ #ifndef _DEV_ATH_DESC_H #define _DEV_ATH_DESC_H -#include "opt_ah.h" /* NB: required for AH_SUPPORT_AR5416 */ - -/* - * For now, define this for the structure definitions. - * Because of how the HAL / driver module currently builds, - * it's not very feasible to build the module without - * this defined. The rest of the code (eg in the driver - * body) can work fine with these fields being uninitialised; - * they'll be initialised to 0 anyway. - */ - -#ifndef AH_SUPPORT_AR5416 -#define AH_SUPPORT_AR5416 1 -#endif - /* * Transmit descriptor status. This structure is filled * in only after the tx descriptor process method finds a @@ -56,7 +41,6 @@ struct ath_tx_status { uint8_t ts_virtcol; /* virtual collision count */ uint8_t ts_antenna; /* antenna information */ uint8_t ts_finaltsi; /* final transmit series index */ -#ifdef AH_SUPPORT_AR5416 /* 802.11n status */ uint8_t ts_flags; /* misc flags */ uint8_t ts_queue_id; /* AR9300: TX queue id */ @@ -71,7 +55,6 @@ struct ath_tx_status { int8_t ts_rssi_ctl[3]; /* tx ack RSSI [ctl, chain 0-2] */ int8_t ts_rssi_ext[3]; /* tx ack RSSI [ext, chain 0-2] */ uint8_t ts_pad[2]; -#endif /* AH_SUPPORT_AR5416 */ }; /* bits found in ts_status */ @@ -121,7 +104,6 @@ struct ath_rx_status { uint8_t rs_more; /* more descriptors follow */ uint32_t rs_tstamp; /* h/w assigned timestamp */ uint32_t rs_antenna; /* antenna information */ -#ifdef AH_SUPPORT_AR5416 /* 802.11n status */ int8_t rs_rssi_ctl[3]; /* rx frame RSSI [ctl, chain 0-2] */ int8_t rs_rssi_ext[3]; /* rx frame RSSI [ext, chain 0-2] */ @@ -138,7 +120,6 @@ struct ath_rx_status { uint32_t rs_evm2; uint32_t rs_evm3; /* needed for ar9300 and later */ uint32_t rs_evm4; /* needed for ar9300 and later */ -#endif /* AH_SUPPORT_AR5416 */ }; /* bits found in rs_status */ @@ -241,11 +222,7 @@ enum { * to complete the work. Status for completed frames is returned * in a device-independent format. */ -#ifdef AH_SUPPORT_AR5416 #define HAL_DESC_HW_SIZE 20 -#else -#define HAL_DESC_HW_SIZE 4 -#endif /* AH_SUPPORT_AR5416 */ struct ath_desc { /* Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Thu May 25 04:18:46 2017 (r318856) +++ head/sys/dev/ath/ath_hal/ah_internal.h Thu May 25 04:26:26 2017 (r318857) @@ -29,11 +29,6 @@ #include #include /* XXX for reasons */ -#include "opt_ah.h" /* needed for AH_SUPPORT_AR5416 */ - -#ifndef AH_SUPPORT_AR5416 -#define AH_SUPPORT_AR5416 1 -#endif #ifndef NBBY #define NBBY 8 /* number of bits/byte */ @@ -201,10 +196,8 @@ typedef struct { int8_t qCoff; int16_t rawNoiseFloor; int16_t noiseFloorAdjust; -#ifdef AH_SUPPORT_AR5416 int16_t noiseFloorCtl[AH_MAX_CHAINS]; int16_t noiseFloorExt[AH_MAX_CHAINS]; -#endif /* AH_SUPPORT_AR5416 */ uint16_t mainSpur; /* cached spur value for this channel */ /*XXX TODO: make these part of privFlags */ Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Thu May 25 04:18:46 2017 (r318856) +++ head/sys/dev/ath/if_ath_rx.c Thu May 25 04:26:26 2017 (r318857) @@ -569,7 +569,8 @@ ath_rx_tap(struct ath_softc *sc, struct rix = rt->rateCodeToIndex[rs->rs_rate]; sc->sc_rx_th.wr_rate = sc->sc_hwmap[rix].ieeerate; sc->sc_rx_th.wr_flags = sc->sc_hwmap[rix].rxflags; -#ifdef AH_SUPPORT_AR5416 + + /* 802.11 specific flags */ sc->sc_rx_th.wr_chan_flags &= ~CHAN_HT; if (rs->rs_status & HAL_RXERR_PHY) { /* @@ -596,7 +597,6 @@ ath_rx_tap(struct ath_softc *sc, struct sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_SHORTGI; } -#endif sc->sc_rx_th.wr_tsf = htole64(ath_extend_tsf(sc, rs->rs_tstamp, tsf)); if (rs->rs_status & HAL_RXERR_CRC) sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_BADFCS; @@ -654,8 +654,7 @@ ath_rx_pkt(struct ath_softc *sc, struct */ rstamp = ath_extend_tsf(sc, rs->rs_tstamp, tsf); - /* These aren't specifically errors */ -#ifdef AH_SUPPORT_AR5416 + /* 802.11 return codes - These aren't specifically errors */ if (rs->rs_flags & HAL_RX_GI) sc->sc_stats.ast_rx_halfgi++; if (rs->rs_flags & HAL_RX_2040) @@ -670,7 +669,6 @@ ath_rx_pkt(struct ath_softc *sc, struct sc->sc_stats.ast_rx_hi_rx_chain++; if (rs->rs_flags & HAL_RX_STBC) sc->sc_stats.ast_rx_stbc++; -#endif /* AH_SUPPORT_AR5416 */ if (rs->rs_status != 0) { if (rs->rs_status & HAL_RXERR_CRC) @@ -906,11 +904,8 @@ rx_accept: IEEE80211_KEYIX_NONE : rs->rs_keyix); sc->sc_lastrs = rs; -#ifdef AH_SUPPORT_AR5416 if (rs->rs_isaggr) sc->sc_stats.ast_rx_agg++; -#endif /* AH_SUPPORT_AR5416 */ - /* * Populate the per-chain RSSI values where appropriate. From owner-svn-src-all@freebsd.org Thu May 25 05:01:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFEA1D81214; Thu, 25 May 2017 05:01:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B06C91579; Thu, 25 May 2017 05:01:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P51iCc023540; Thu, 25 May 2017 05:01:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P51idC023539; Thu, 25 May 2017 05:01:44 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705250501.v4P51idC023539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 25 May 2017 05:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318858 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 05:01:46 -0000 Author: adrian Date: Thu May 25 05:01:44 2017 New Revision: 318858 URL: https://svnweb.freebsd.org/changeset/base/318858 Log: Bump UPDATING to cover the ath shuffle. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu May 25 04:26:26 2017 (r318857) +++ head/UPDATING Thu May 25 05:01:44 2017 (r318858) @@ -51,6 +51,31 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20170524: + The ath(4) and ath_hal(4) modules now build piecemeal to allow for + smaller runtime footprint builds. This is useful for embedded systems + which only require one chipset support. + + If you load it as a module, make sure this is in /boot/loader.conf: + + if_ath_load="YES" + + This will load the HAL, all chip/RF backends and if_ath_pci. + If you have if_ath_pci in /boot/loader.conf, ensure it is after + if_ath or it will not load any HAL chipset support. + + If you want to selectively load things (eg on ye cheape ARM/MIPS + platforms where RAM is at a premium) you should: + + * load ath_hal + * load the chip modules in question + * load ath_rate, ath_dfs + * load ath_main + * load if_ath_pci and/or if_ath_ahb depending upon your particular + bus bind type - this is where probe/attach is done. + + For further comments/feedback, poke adrian@ . + 20170523: The "ino64" 64-bit inode project has been committed, which extends a number of types to 64 bits. Upgrading in place requires care and From owner-svn-src-all@freebsd.org Thu May 25 05:02:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53E5FD812CE; Thu, 25 May 2017 05:02:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25F1018AF; Thu, 25 May 2017 05:02:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P52hVt024457; Thu, 25 May 2017 05:02:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P52hxs024455; Thu, 25 May 2017 05:02:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705250502.v4P52hxs024455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 25 May 2017 05:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318859 - head/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 05:02:44 -0000 Author: adrian Date: Thu May 25 05:02:43 2017 New Revision: 318859 URL: https://svnweb.freebsd.org/changeset/base/318859 Log: [lib] disable libc++experimental on mips platforms for now. This breaks at least mips32 platform builds. Reviewed by: dim Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu May 25 05:01:44 2017 (r318858) +++ head/lib/Makefile Thu May 25 05:02:43 2017 (r318859) @@ -157,7 +157,7 @@ _libclang_rt= libclang_rt .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt _libcplusplus= libc++ -.if ${MACHINE_CPUARCH} != "arm" +.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" _libcplusplus+= libc++experimental .endif .endif From owner-svn-src-all@freebsd.org Thu May 25 05:23:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8647D81A72; Thu, 25 May 2017 05:23:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7787B1471; Thu, 25 May 2017 05:23:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P5Nl5T032457; Thu, 25 May 2017 05:23:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P5NlJg032455; Thu, 25 May 2017 05:23:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705250523.v4P5NlJg032455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 May 2017 05:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318860 - in head/sys: dev/sound/pcm tools/sound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 05:23:48 -0000 Author: hselasky Date: Thu May 25 05:23:47 2017 New Revision: 318860 URL: https://svnweb.freebsd.org/changeset/base/318860 Log: Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel. MFC after: 3 days Modified: head/sys/dev/sound/pcm/buffer.c head/sys/tools/sound/snd_fxdiv_gen.awk Modified: head/sys/dev/sound/pcm/buffer.c ============================================================================== --- head/sys/dev/sound/pcm/buffer.c Thu May 25 05:02:43 2017 (r318859) +++ head/sys/dev/sound/pcm/buffer.c Thu May 25 05:23:47 2017 (r318860) @@ -35,6 +35,7 @@ #include "feeder_if.h" #define SND_USE_FXDIV +#define SND_DECLARE_FXDIV #include "snd_fxdiv_gen.h" SND_DECLARE_FILE("$FreeBSD$"); Modified: head/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- head/sys/tools/sound/snd_fxdiv_gen.awk Thu May 25 05:02:43 2017 (r318859) +++ head/sys/tools/sound/snd_fxdiv_gen.awk Thu May 25 05:23:47 2017 (r318860) @@ -108,7 +108,10 @@ BEGIN { printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); - printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); + printf("extern const uint32_t snd_fxdiv_table[%d][2];\n\n", SND_MAX_ALIGN + 1); + + printf("#ifdef SND_DECLARE_FXDIV\n"); + printf("const uint32_t snd_fxdiv_table[%d][2] = {\n", SND_MAX_ALIGN + 1); for (i = 1; i <= SND_MAX_ALIGN; i++) { if (aligns[i] != 1) @@ -120,7 +123,7 @@ BEGIN { i, r["mul"], r["shift"]); } - printf("};\n\n"); + printf("};\n#endif\n\n"); printf("#define SND_FXDIV_MAX\t\t0x%08x\n", FXONE); printf("#define SND_FXDIV(x, y)\t\t(((uint32_t)(x) *\t\t\t\\\n"); From owner-svn-src-all@freebsd.org Thu May 25 08:34:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36A6AD725BE; Thu, 25 May 2017 08:34:26 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 088D41A0E; Thu, 25 May 2017 08:34:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P8YP9r008614; Thu, 25 May 2017 08:34:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P8YPIC008613; Thu, 25 May 2017 08:34:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705250834.v4P8YPIC008613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 25 May 2017 08:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318861 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 08:34:26 -0000 Author: trasz Date: Thu May 25 08:34:24 2017 New Revision: 318861 URL: https://svnweb.freebsd.org/changeset/base/318861 Log: Create /net by default, for autofs. MFC after: 2 weeks Modified: head/etc/mtree/BSD.root.dist Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Thu May 25 05:23:47 2017 (r318860) +++ head/etc/mtree/BSD.root.dist Thu May 25 08:34:24 2017 (r318861) @@ -97,6 +97,8 @@ .. mnt .. + net + .. proc mode=0555 .. rescue From owner-svn-src-all@freebsd.org Thu May 25 09:21:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D602DD81819; Thu, 25 May 2017 09:21:22 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A844B1248; Thu, 25 May 2017 09:21:22 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P9LLaA026246; Thu, 25 May 2017 09:21:21 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P9LL5G026245; Thu, 25 May 2017 09:21:21 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201705250921.v4P9LL5G026245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Thu, 25 May 2017 09:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318863 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 09:21:22 -0000 Author: jlh Date: Thu May 25 09:21:21 2017 New Revision: 318863 URL: https://svnweb.freebsd.org/changeset/base/318863 Log: Replace stale handbook URL with the proper on. MFC after: 0 days Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu May 25 08:53:55 2017 (r318862) +++ head/UPDATING Thu May 25 09:21:21 2017 (r318863) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. basically know what you are doing. If not, then please consult the FreeBSD handbook: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-all@freebsd.org Thu May 25 09:27:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E96CDD81A1A; Thu, 25 May 2017 09:27:34 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B96F81547; Thu, 25 May 2017 09:27:34 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P9RXgE029263; Thu, 25 May 2017 09:27:33 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P9RXPO029262; Thu, 25 May 2017 09:27:33 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201705250927.v4P9RXPO029262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Thu, 25 May 2017 09:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318864 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 09:27:35 -0000 Author: jlh Date: Thu May 25 09:27:33 2017 New Revision: 318864 URL: https://svnweb.freebsd.org/changeset/base/318864 Log: MFC r318863: Replace stale handbook URL with the proper one. Modified: stable/11/UPDATING Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Thu May 25 09:21:21 2017 (r318863) +++ stable/11/UPDATING Thu May 25 09:27:33 2017 (r318864) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. basically know what you are doing. If not, then please consult the FreeBSD handbook: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-all@freebsd.org Thu May 25 09:34:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABCADD81D46; Thu, 25 May 2017 09:34:30 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D50D1A62; Thu, 25 May 2017 09:34:30 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P9YTWB033058; Thu, 25 May 2017 09:34:29 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P9YT6S033057; Thu, 25 May 2017 09:34:29 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201705250934.v4P9YT6S033057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Thu, 25 May 2017 09:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318865 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 09:34:30 -0000 Author: jlh Date: Thu May 25 09:34:29 2017 New Revision: 318865 URL: https://svnweb.freebsd.org/changeset/base/318865 Log: MFC r318863: Replace stale handbook URL with the proper oneb. Modified: stable/10/UPDATING Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Thu May 25 09:27:33 2017 (r318864) +++ stable/10/UPDATING Thu May 25 09:34:29 2017 (r318865) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. basically know what you are doing. If not, then please consult the FreeBSD handbook: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-all@freebsd.org Thu May 25 10:47:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E775BD809DB; Thu, 25 May 2017 10:47:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B01B81FC4; Thu, 25 May 2017 10:47:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PAlIZa062260; Thu, 25 May 2017 10:47:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PAlIAi062259; Thu, 25 May 2017 10:47:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251047.v4PAlIAi062259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 10:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318866 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 10:47:20 -0000 Author: gjb Date: Thu May 25 10:47:18 2017 New Revision: 318866 URL: https://svnweb.freebsd.org/changeset/base/318866 Log: Document r318785, vfs.zfs.debug_flags -> vfs.zfs.debugflags rename. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 09:34:29 2017 (r318865) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 10:47:18 2017 (r318866) @@ -719,7 +719,10 @@ ZFS -   + The + vfs.zfs.debug_flags &man.sysctl.8; has been + deprecated in favor of + vfs.zfs.debugflags. From owner-svn-src-all@freebsd.org Thu May 25 10:49:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CFC4D80B10; Thu, 25 May 2017 10:49:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE1DD113D; Thu, 25 May 2017 10:49:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PAnuc3062388; Thu, 25 May 2017 10:49:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PAnuEX062387; Thu, 25 May 2017 10:49:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705251049.v4PAnuEX062387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 25 May 2017 10:49:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318867 - head/sys/dev/vmware/vmxnet3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 10:49:58 -0000 Author: avg Date: Thu May 25 10:49:56 2017 New Revision: 318867 URL: https://svnweb.freebsd.org/changeset/base/318867 Log: fix vmxnet3 crash when LRO is enabled The crash can occur when all of the following conditions are true: - a packet consists of multiple segements (requires LRO enabled) - there has been a failure to allocate an mbuf for the packet and the packet has to be dropped - a host (vmware) still owned at least one segment of the packet, so the driver had to wait for another interrupt to proceed to discarding the remaning segment(s) Reviewed by: rstone MFC after: 2 weeks Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D10874 Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmx.c Thu May 25 10:47:18 2017 (r318866) +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Thu May 25 10:49:56 2017 (r318867) @@ -2194,6 +2194,20 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue * } else { KASSERT(rxd->btype == VMXNET3_BTYPE_BODY, ("%s: non start of frame w/o body buffer", __func__)); + + if (m_head == NULL && m_tail == NULL) { + /* + * This is a continuation of a packet that we + * started to drop, but could not drop entirely + * because this segment was still owned by the + * host. So, drop the remainder now. + */ + vmxnet3_rxq_eof_discard(rxq, rxr, idx); + if (!rxcd->eop) + vmxnet3_rxq_discard_chain(rxq); + goto nextp; + } + KASSERT(m_head != NULL, ("%s: frame not started?", __func__)); From owner-svn-src-all@freebsd.org Thu May 25 10:56:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90A1DD80D27; Thu, 25 May 2017 10:56:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 606BD167B; Thu, 25 May 2017 10:56:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PAuXgM066357; Thu, 25 May 2017 10:56:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PAuXAH066356; Thu, 25 May 2017 10:56:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251056.v4PAuXAH066356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 10:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318868 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 10:56:34 -0000 Author: gjb Date: Thu May 25 10:56:33 2017 New Revision: 318868 URL: https://svnweb.freebsd.org/changeset/base/318868 Log: Document r318660, various NFS client fixes. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 10:49:56 2017 (r318867) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 10:56:33 2017 (r318868) @@ -713,7 +713,13 @@ Networked Storage -   + The NFS client now + properly handles NFS4ERR_BAD_SESSION errors + received from an NFS server. Additionally, + the kernel RPC client has been updated to + prevent creating new TCP connections when + ERESTART is received from + &man.sosend.9;. From owner-svn-src-all@freebsd.org Thu May 25 11:05:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68745D81156; Thu, 25 May 2017 11:05:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 317D61BFA; Thu, 25 May 2017 11:05:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PB5J2W070207; Thu, 25 May 2017 11:05:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PB5Juv070206; Thu, 25 May 2017 11:05:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251105.v4PB5Juv070206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 11:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318869 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 11:05:20 -0000 Author: gjb Date: Thu May 25 11:05:19 2017 New Revision: 318869 URL: https://svnweb.freebsd.org/changeset/base/318869 Log: Document r318660, Amazon EFS support in the NFS client. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 10:56:33 2017 (r318868) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 11:05:19 2017 (r318869) @@ -720,6 +720,10 @@ prevent creating new TCP connections when ERESTART is received from &man.sosend.9;. + + The NFS client now + supports the Amazon® Elastic File System™ + (EFS). From owner-svn-src-all@freebsd.org Thu May 25 11:05:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 503EFD8115C; Thu, 25 May 2017 11:05:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F6B01BFB; Thu, 25 May 2017 11:05:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PB5K6t070250; Thu, 25 May 2017 11:05:20 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PB5K8s070249; Thu, 25 May 2017 11:05:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251105.v4PB5K8s070249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 11:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318870 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 11:05:21 -0000 Author: gjb Date: Thu May 25 11:05:19 2017 New Revision: 318870 URL: https://svnweb.freebsd.org/changeset/base/318870 Log: Document r312790, EC2 IPv6 by default. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 11:05:19 2017 (r318869) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 11:05:19 2017 (r318870) @@ -688,6 +688,10 @@ Support for synthetic keyboards has been added for virtual machines running on Microsoft® Hyper-V™. + + The &os; virtual machines provided on + Amazon® EC2™ now enable IPv6 by + default. From owner-svn-src-all@freebsd.org Thu May 25 12:04:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 012EAD78D72; Thu, 25 May 2017 12:04:25 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6C251E30; Thu, 25 May 2017 12:04:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PC4NFi094759; Thu, 25 May 2017 12:04:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PC4Nv7094758; Thu, 25 May 2017 12:04:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251204.v4PC4Nv7094758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 12:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318871 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 12:04:25 -0000 Author: gjb Date: Thu May 25 12:04:23 2017 New Revision: 318871 URL: https://svnweb.freebsd.org/changeset/base/318871 Log: Further expand the r318785 entry, noting vfs.zfs.debugflags can be set in loader.conf(5), whereas vfs.zfs.debug_flags could not. Submitted by: avg Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 11:05:19 2017 (r318870) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 12:04:23 2017 (r318871) @@ -736,7 +736,10 @@ The vfs.zfs.debug_flags &man.sysctl.8; has been deprecated in favor of - vfs.zfs.debugflags. + vfs.zfs.debugflags. Additionally, + vfs.zfs.debugflags can now be configured in + &man.loader.conf.5;, whereas + vfs.zfs.debug_flags could not. From owner-svn-src-all@freebsd.org Thu May 25 12:53:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8C1BD815C3; Thu, 25 May 2017 12:53:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 789C31F9D; Thu, 25 May 2017 12:53:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PCrn4b014937; Thu, 25 May 2017 12:53:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PCrnfP014936; Thu, 25 May 2017 12:53:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251253.v4PCrnfP014936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 12:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318872 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 12:53:50 -0000 Author: gjb Date: Thu May 25 12:53:49 2017 New Revision: 318872 URL: https://svnweb.freebsd.org/changeset/base/318872 Log: Enable DHCP and IPv6 autoconfig on non-cloud VM images. PR: 203653 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Thu May 25 12:04:23 2017 (r318871) +++ head/release/tools/vmimage.subr Thu May 25 12:53:49 2017 (r318872) @@ -157,6 +157,11 @@ vm_extra_enable_services() { done fi + if [ -z "${VMCONFIG}" -o -c "${VMCONFIG}" ]; then + echo 'ifconfig_DEFAULT="DHCP inet6 accept_rtadv"' >> \ + ${DESTDIR}/etc/rc.conf + fi + return 0 } From owner-svn-src-all@freebsd.org Thu May 25 12:57:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC1B1D81675; Thu, 25 May 2017 12:57:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 733D91194; Thu, 25 May 2017 12:57:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PCvFM1015132; Thu, 25 May 2017 12:57:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PCvFeB015131; Thu, 25 May 2017 12:57:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705251257.v4PCvFeB015131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 May 2017 12:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318873 - head/share/doc/papers/timecounter X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 12:57:16 -0000 Author: bapt Date: Thu May 25 12:57:15 2017 New Revision: 318873 URL: https://svnweb.freebsd.org/changeset/base/318873 Log: Fix rendering with modern groff Reported by: tj Modified: head/share/doc/papers/timecounter/timecounter.ms Modified: head/share/doc/papers/timecounter/timecounter.ms ============================================================================== --- head/share/doc/papers/timecounter/timecounter.ms Thu May 25 12:53:49 2017 (r318872) +++ head/share/doc/papers/timecounter/timecounter.ms Thu May 25 12:57:15 2017 (r318873) @@ -17,7 +17,6 @@ Timecounters: Efficient and precise time .AA .A "Poul-Henning Kamp" "The FreeBSD Project" .AB -.PP The FreeBSD timecounters are an architecture-independent implementation of a binary timescale using whatever hardware support is at hand for tracking time. The binary timescale converts using simple @@ -31,6 +30,7 @@ be detailed as well as the mechanisms us .FS This paper was presented at the EuroBSDcon 2002 conference in Amsterdam. .FE +.1C .SH Introduction .PP From owner-svn-src-all@freebsd.org Thu May 25 14:16:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40960D814E2; Thu, 25 May 2017 14:16:45 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12D231577; Thu, 25 May 2017 14:16:45 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PEGioG048625; Thu, 25 May 2017 14:16:44 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PEGiD2048624; Thu, 25 May 2017 14:16:44 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705251416.v4PEGiD2048624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 25 May 2017 14:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318874 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 14:16:45 -0000 Author: zbb Date: Thu May 25 14:16:43 2017 New Revision: 318874 URL: https://svnweb.freebsd.org/changeset/base/318874 Log: Fix memory corruption while configuring CPU windows on Marvell SoCs Resolving CPU windows from localbus entry caused buffer overflow and memory corruption. Fix wrong indexing and ensure the index does not exceed table size. Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D10720 Modified: head/sys/arm/mv/mv_common.c Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Thu May 25 12:57:15 2017 (r318873) +++ head/sys/arm/mv/mv_common.c Thu May 25 14:16:43 2017 (r318874) @@ -2269,6 +2269,12 @@ win_cpu_from_dt(void) entry_size = tuple_size / sizeof(pcell_t); cpu_wins_no = tuples; + /* Check range */ + if (tuples > nitems(cpu_win_tbl)) { + debugf("too many tuples to fit into cpu_win_tbl\n"); + return (ENOMEM); + } + for (i = 0, t = 0; t < tuples; i += entry_size, t++) { cpu_win_tbl[t].target = 1; cpu_win_tbl[t].attr = fdt32_to_cpu(ranges[i + 1]); @@ -2301,6 +2307,12 @@ moveon: if (fdt_regsize(node, &sram_base, &sram_size) != 0) return (EINVAL); + /* Check range */ + if (t >= nitems(cpu_win_tbl)) { + debugf("cannot fit CESA tuple into cpu_win_tbl\n"); + return (ENOMEM); + } + cpu_win_tbl[t].target = MV_WIN_CESA_TARGET; #ifdef SOC_MV_ARMADA38X cpu_win_tbl[t].attr = MV_WIN_CESA_ATTR(0); From owner-svn-src-all@freebsd.org Thu May 25 14:19:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8B1AD81599; Thu, 25 May 2017 14:19:21 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88BB81749; Thu, 25 May 2017 14:19:21 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PEJK1E048765; Thu, 25 May 2017 14:19:20 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PEJKfU048763; Thu, 25 May 2017 14:19:20 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705251419.v4PEJKfU048763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 25 May 2017 14:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318875 - in head/sys/arm/mv: . armada38x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 14:19:21 -0000 Author: zbb Date: Thu May 25 14:19:20 2017 New Revision: 318875 URL: https://svnweb.freebsd.org/changeset/base/318875 Log: Enable SCU Speculative linefills to L2 on Armada 38x Submitted by: Marcin Wojtas Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D10709 Modified: head/sys/arm/mv/armada38x/armada38x.c head/sys/arm/mv/mvreg.h Modified: head/sys/arm/mv/armada38x/armada38x.c ============================================================================== --- head/sys/arm/mv/armada38x/armada38x.c Thu May 25 14:16:43 2017 (r318874) +++ head/sys/arm/mv/armada38x/armada38x.c Thu May 25 14:19:20 2017 (r318875) @@ -173,9 +173,13 @@ armada38x_scu_enable(void) /* Enable SCU */ val = bus_space_read_4(fdtbus_bs_tag, vaddr_scu, MV_SCU_REG_CTRL); - if (!(val & MV_SCU_ENABLE)) + if (!(val & MV_SCU_ENABLE)) { + /* Enable SCU Speculative linefills to L2 */ + val |= MV_SCU_SL_L2_ENABLE; + bus_space_write_4(fdtbus_bs_tag, vaddr_scu, 0, val | MV_SCU_ENABLE); + } bus_space_unmap(fdtbus_bs_tag, vaddr_scu, MV_SCU_REGS_LEN); return (0); Modified: head/sys/arm/mv/mvreg.h ============================================================================== --- head/sys/arm/mv/mvreg.h Thu May 25 14:16:43 2017 (r318874) +++ head/sys/arm/mv/mvreg.h Thu May 25 14:19:20 2017 (r318875) @@ -424,7 +424,8 @@ #define MV_SCU_REGS_LEN 0x100 #define MV_SCU_REG_CTRL 0x00 #define MV_SCU_REG_CONFIG 0x04 -#define MV_SCU_ENABLE 1 +#define MV_SCU_ENABLE (1 << 0) +#define MV_SCU_SL_L2_ENABLE (1 << 3) #define SCU_CFG_REG_NCPU_MASK 0x3 #endif From owner-svn-src-all@freebsd.org Thu May 25 14:22:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92CBCD8191F; Thu, 25 May 2017 14:22:02 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63D811C98; Thu, 25 May 2017 14:22:02 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PEM1Q4051945; Thu, 25 May 2017 14:22:01 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PEM1SH051942; Thu, 25 May 2017 14:22:01 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705251422.v4PEM1SH051942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 25 May 2017 14:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318876 - in head/sys/arm/mv: . armada armada38x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 14:22:02 -0000 Author: zbb Date: Thu May 25 14:22:00 2017 New Revision: 318876 URL: https://svnweb.freebsd.org/changeset/base/318876 Log: Introduce separate watchdog driver for Armada to fix phony DELAY DELAY is a problematic routine called all over the kernel. Armada38x using CA-9 CPUs are using mpcore timer to count events and measure time but DELAY in the mpcore timer code is a weak function reference and therefore will be replaced by the platform implementation if the one is introduced. Since Armada38x uses on-chip watchdog to which the driver is merged with the on-chip timer driver there will be a platform DELAY implementation. The latter however will not use any HW timers as it will not attempt to configure any. Phony busy loop will be used instead. To fix that we introduce a separate watchdog driver for Armada platforms, (currently only A38X) and stop using Marvell timer driver. That switches DELAY to the desired implementation. Submitted by: Zbigniew Bodek Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D10710 Added: head/sys/arm/mv/armada/wdt.c (contents, props changed) Modified: head/sys/arm/mv/armada38x/files.armada38x head/sys/arm/mv/files.mv Added: head/sys/arm/mv/armada/wdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/armada/wdt.c Thu May 25 14:22:00 2017 (r318876) @@ -0,0 +1,285 @@ +/*- + * Copyright (c) 2006 Benno Rice. + * Copyright (C) 2007-2008 MARVELL INTERNATIONAL LTD. + * All rights reserved. + * + * Adapted to Marvell SoC by Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * from: FreeBSD: //depot/projects/arm/src/sys/arm/xscale/pxa2x0/pxa2x0_timer.c, rev 1 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define INITIAL_TIMECOUNTER (0xffffffff) +#define MAX_WATCHDOG_TICKS (0xffffffff) + +#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X) +#define MV_CLOCK_SRC 25000000 /* Timers' 25MHz mode */ +#else +#define MV_CLOCK_SRC get_tclk() +#endif + +#if defined(SOC_MV_ARMADA38X) +#define WATCHDOG_TIMER 4 +#else +#define WATCHDOG_TIMER 2 +#endif + +struct mv_wdt_softc { + struct resource * wdt_res; + struct mtx wdt_mtx; +}; + +static struct resource_spec mv_wdt_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static struct ofw_compat_data mv_wdt_compat[] = { + {"marvell,armada-380-wdt", true}, + {NULL, false} +}; + +static struct mv_wdt_softc *wdt_softc = NULL; +int timers_initialized = 0; + +static int mv_wdt_probe(device_t); +static int mv_wdt_attach(device_t); + +static uint32_t mv_get_timer_control(void); +static void mv_set_timer_control(uint32_t); +static void mv_set_timer(uint32_t, uint32_t); + +static void mv_watchdog_enable(void); +static void mv_watchdog_disable(void); +static void mv_watchdog_event(void *, unsigned int, int *); + +static device_method_t mv_wdt_methods[] = { + DEVMETHOD(device_probe, mv_wdt_probe), + DEVMETHOD(device_attach, mv_wdt_attach), + + { 0, 0 } +}; + +static driver_t mv_wdt_driver = { + "wdt", + mv_wdt_methods, + sizeof(struct mv_wdt_softc), +}; + +static devclass_t mv_wdt_devclass; + +DRIVER_MODULE(wdt, simplebus, mv_wdt_driver, mv_wdt_devclass, 0, 0); +static int +mv_wdt_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, mv_wdt_compat)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Marvell Watchdog Timer"); + return (0); +} + +static int +mv_wdt_attach(device_t dev) +{ + struct mv_wdt_softc *sc; + int error; + + if (wdt_softc != NULL) + return (ENXIO); + + sc = device_get_softc(dev); + wdt_softc = sc; + + error = bus_alloc_resources(dev, mv_wdt_spec, &sc->wdt_res); + if (error) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + mtx_init(&sc->wdt_mtx, "watchdog", NULL, MTX_DEF); + + mv_watchdog_disable(); + EVENTHANDLER_REGISTER(watchdog_list, mv_watchdog_event, sc, 0); + + return (0); +} + +static __inline uint32_t +mv_get_timer_control(void) +{ + + return (bus_read_4(wdt_softc->wdt_res, CPU_TIMER_CONTROL)); +} + +static __inline void +mv_set_timer_control(uint32_t val) +{ + + bus_write_4(wdt_softc->wdt_res, CPU_TIMER_CONTROL, val); +} + +static __inline void +mv_set_timer(uint32_t timer, uint32_t val) +{ + + bus_write_4(wdt_softc->wdt_res, CPU_TIMER0 + timer * 0x8, val); +} + +static void +mv_watchdog_enable(void) +{ + uint32_t val, irq_cause; +#if !defined(SOC_MV_ARMADAXP) && !defined(SOC_MV_ARMADA38X) + uint32_t irq_mask; +#endif + + irq_cause = read_cpu_ctrl(BRIDGE_IRQ_CAUSE); + irq_cause &= IRQ_TIMER_WD_CLR; + write_cpu_ctrl(BRIDGE_IRQ_CAUSE, irq_cause); + +#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X) + val = read_cpu_mp_clocks(WD_RSTOUTn_MASK); + val |= (WD_GLOBAL_MASK | WD_CPU0_MASK); + write_cpu_mp_clocks(WD_RSTOUTn_MASK, val); + + val = read_cpu_misc(RSTOUTn_MASK); + val &= ~RSTOUTn_MASK_WD; + write_cpu_misc(RSTOUTn_MASK, val); +#else + irq_mask = read_cpu_ctrl(BRIDGE_IRQ_MASK); + irq_mask |= IRQ_TIMER_WD_MASK; + write_cpu_ctrl(BRIDGE_IRQ_MASK, irq_mask); + + val = read_cpu_ctrl(RSTOUTn_MASK); + val |= WD_RST_OUT_EN; + write_cpu_ctrl(RSTOUTn_MASK, val); +#endif + + val = mv_get_timer_control(); +#if defined(SOC_MV_ARMADA38X) + val |= CPU_TIMER_WD_EN | CPU_TIMER_WD_AUTO | CPU_TIMER_WD_25MHZ_EN; +#elif defined(SOC_MV_ARMADAXP) + val |= CPU_TIMER2_EN | CPU_TIMER2_AUTO | CPU_TIMER_WD_25MHZ_EN; +#else + val |= CPU_TIMER2_EN | CPU_TIMER2_AUTO; +#endif + mv_set_timer_control(val); +} + +static void +mv_watchdog_disable(void) +{ + uint32_t val, irq_cause; +#if !defined(SOC_MV_ARMADAXP) && !defined(SOC_MV_ARMADA38X) + uint32_t irq_mask; +#endif + + val = mv_get_timer_control(); +#if defined(SOC_MV_ARMADA38X) + val &= ~(CPU_TIMER_WD_EN | CPU_TIMER_WD_AUTO); +#else + val &= ~(CPU_TIMER2_EN | CPU_TIMER2_AUTO); +#endif + mv_set_timer_control(val); + +#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X) + val = read_cpu_mp_clocks(WD_RSTOUTn_MASK); + val &= ~(WD_GLOBAL_MASK | WD_CPU0_MASK); + write_cpu_mp_clocks(WD_RSTOUTn_MASK, val); + + val = read_cpu_misc(RSTOUTn_MASK); + val |= RSTOUTn_MASK_WD; + write_cpu_misc(RSTOUTn_MASK, RSTOUTn_MASK_WD); +#else + val = read_cpu_ctrl(RSTOUTn_MASK); + val &= ~WD_RST_OUT_EN; + write_cpu_ctrl(RSTOUTn_MASK, val); + + irq_mask = read_cpu_ctrl(BRIDGE_IRQ_MASK); + irq_mask &= ~(IRQ_TIMER_WD_MASK); + write_cpu_ctrl(BRIDGE_IRQ_MASK, irq_mask); +#endif + + irq_cause = read_cpu_ctrl(BRIDGE_IRQ_CAUSE); + irq_cause &= IRQ_TIMER_WD_CLR; + write_cpu_ctrl(BRIDGE_IRQ_CAUSE, irq_cause); +} + +/* + * Watchdog event handler. + */ +static void +mv_watchdog_event(void *arg, unsigned int cmd, int *error) +{ + struct mv_wdt_softc *sc; + uint64_t ns; + uint64_t ticks; + + sc = arg; + mtx_lock(&sc->wdt_mtx); + if (cmd == 0) + mv_watchdog_disable(); + else { + /* + * Watchdog timeout is in nanosecs, calculation according to + * watchdog(9) + */ + ns = (uint64_t)1 << (cmd & WD_INTERVAL); + ticks = (uint64_t)(ns * MV_CLOCK_SRC) / 1000000000; + if (ticks > MAX_WATCHDOG_TICKS) + mv_watchdog_disable(); + else { + mv_set_timer(WATCHDOG_TIMER, ticks); + mv_watchdog_enable(); + *error = 0; + } + } + mtx_unlock(&sc->wdt_mtx); +} Modified: head/sys/arm/mv/armada38x/files.armada38x ============================================================================== --- head/sys/arm/mv/armada38x/files.armada38x Thu May 25 14:19:20 2017 (r318875) +++ head/sys/arm/mv/armada38x/files.armada38x Thu May 25 14:22:00 2017 (r318876) @@ -2,6 +2,7 @@ arm/mv/mpic.c standard arm/mv/armada/thermal.c optional fdt +arm/mv/armada/wdt.c optional fdt arm/mv/armada38x/armada38x.c standard arm/mv/armada38x/armada38x_mp.c optional smp Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Thu May 25 14:19:20 2017 (r318875) +++ head/sys/arm/mv/files.mv Thu May 25 14:22:00 2017 (r318876) @@ -18,7 +18,7 @@ arm/mv/mv_localbus.c standard arm/mv/mv_machdep.c standard arm/mv/mv_pci.c optional pci arm/mv/mv_ts.c standard -arm/mv/timer.c standard +arm/mv/timer.c optional !soc_mv_armada38x dev/cesa/cesa.c optional cesa dev/iicbus/twsi/mv_twsi.c optional twsi From owner-svn-src-all@freebsd.org Thu May 25 14:23:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D866D81A48; Thu, 25 May 2017 14:23:51 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E14FE1FAC; Thu, 25 May 2017 14:23:50 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PENnbp053100; Thu, 25 May 2017 14:23:49 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PENn1w053099; Thu, 25 May 2017 14:23:49 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705251423.v4PENn1w053099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 25 May 2017 14:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318877 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 14:23:51 -0000 Author: zbb Date: Thu May 25 14:23:49 2017 New Revision: 318877 URL: https://svnweb.freebsd.org/changeset/base/318877 Log: Fix PM recognition on recent Marvell boards PM status is only supported on Kirkwood and Disvovery. Cleanup the code to properly report its state on other platforms. Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D10718 Modified: head/sys/arm/mv/mv_common.c Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Thu May 25 14:22:00 2017 (r318876) +++ head/sys/arm/mv/mv_common.c Thu May 25 14:23:49 2017 (r318877) @@ -133,6 +133,16 @@ const struct decode_win *cpu_wins = cpu_ typedef void (*decode_win_setup_t)(u_long); typedef void (*dump_win_t)(u_long); +/* + * The power status of device feature is only supported on + * Kirkwood and Discovery SoCs. + */ +#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +#define SOC_MV_POWER_STAT_SUPPORTED 1 +#else +#define SOC_MV_POWER_STAT_SUPPORTED 0 +#endif + struct soc_node_spec { const char *compat; decode_win_setup_t decode_handler; @@ -174,10 +184,10 @@ static struct fdt_pm_mask_entry fdt_pm_m static __inline int pm_is_disabled(uint32_t mask) { -#if defined(SOC_MV_KIRKWOOD) - return (soc_power_ctrl_get(mask) == mask); -#else +#if SOC_MV_POWER_STAT_SUPPORTED return (soc_power_ctrl_get(mask) == mask ? 0 : 1); +#else + return (0); #endif } @@ -364,7 +374,7 @@ uint32_t soc_power_ctrl_get(uint32_t mask) { -#if !defined(SOC_MV_ORION) +#if SOC_MV_POWER_STAT_SUPPORTED if (mask != CPU_PM_CTRL_NONE) mask &= read_cpu_ctrl(CPU_PM_CTRL); @@ -1168,7 +1178,6 @@ decode_win_usb_setup(u_long base) uint32_t br, cr; int i, j; - if (pm_is_disabled(CPU_PM_CTRL_USB(usb_port))) return; From owner-svn-src-all@freebsd.org Thu May 25 14:25:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55641D81B9F; Thu, 25 May 2017 14:25:06 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27B6112A0; Thu, 25 May 2017 14:25:06 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PEP56k053191; Thu, 25 May 2017 14:25:05 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PEP5SO053190; Thu, 25 May 2017 14:25:05 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705251425.v4PEP5SO053190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 25 May 2017 14:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318878 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 14:25:06 -0000 Author: zbb Date: Thu May 25 14:25:05 2017 New Revision: 318878 URL: https://svnweb.freebsd.org/changeset/base/318878 Log: Add workaround for CESA MBUS windows with 4GB DRAM Armada 38x SoC's equipped with 4GB DRAM suffer freeze during CESA operation, if MBUS window opened at given DRAM CS reaches end of the address space. Apply a workaround by setting the window size to the closest possible value, i.e. divide it by 2 (it has to be power-of-2). Submitted by: Marcin Wojtas Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D10724 Modified: head/sys/arm/mv/mv_common.c Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Thu May 25 14:23:49 2017 (r318877) +++ head/sys/arm/mv/mv_common.c Thu May 25 14:25:05 2017 (r318878) @@ -1116,6 +1116,7 @@ static void decode_win_cesa_setup(u_long base) { uint32_t br, cr; + uint64_t size; int i, j; for (i = 0; i < MV_WIN_CESA_MAX; i++) { @@ -1128,7 +1129,21 @@ decode_win_cesa_setup(u_long base) if (ddr_is_active(i)) { br = ddr_base(i); - cr = (((ddr_size(i) - 1) & 0xffff0000) | + size = ddr_size(i); +#ifdef SOC_MV_ARMADA38X + /* + * Armada 38x SoC's equipped with 4GB DRAM + * suffer freeze during CESA operation, if + * MBUS window opened at given DRAM CS reaches + * end of the address space. Apply a workaround + * by setting the window size to the closest possible + * value, i.e. divide it by 2. + */ + if (size + ddr_base(i) == 0x100000000ULL) + size /= 2; +#endif + + cr = (((size - 1) & 0xffff0000) | (ddr_attr(i) << IO_WIN_ATTR_SHIFT) | (ddr_target(i) << IO_WIN_TGT_SHIFT) | IO_WIN_ENA_MASK); From owner-svn-src-all@freebsd.org Thu May 25 14:27:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E7FAD81E82; Thu, 25 May 2017 14:27:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E59E71713; Thu, 25 May 2017 14:27:55 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PERsZX053454; Thu, 25 May 2017 14:27:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PERsWK053449; Thu, 25 May 2017 14:27:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201705251427.v4PERsWK053449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 25 May 2017 14:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318879 - in head: lib/libsysdecode usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 14:27:56 -0000 Author: tuexen Date: Thu May 25 14:27:54 2017 New Revision: 318879 URL: https://svnweb.freebsd.org/changeset/base/318879 Log: Improve the decoding of the third argument of the socket() call. Decoding of the third argument depends on the first one. For doing this, add a corresponding function to libsysdecode. Thanks to jhb@ for suggesting this. Added: head/lib/libsysdecode/sysdecode_socket_protocol.3 (contents, props changed) Modified: head/lib/libsysdecode/Makefile head/lib/libsysdecode/flags.c head/lib/libsysdecode/sysdecode.h head/usr.bin/truss/syscalls.c Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Thu May 25 14:25:05 2017 (r318878) +++ head/lib/libsysdecode/Makefile Thu May 25 14:27:54 2017 (r318879) @@ -22,6 +22,7 @@ MAN= sysdecode.3 \ sysdecode_quotactl_cmd.3 \ sysdecode_sigcode.3 \ sysdecode_sockopt_name.3 \ + sysdecode_socket_protocol.3 \ sysdecode_syscallnames.3 \ sysdecode_utrace.3 MLINKS= sysdecode_abi_to_freebsd_errno.3 sysdecode_freebsd_to_abi_errno.3 Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Thu May 25 14:25:05 2017 (r318878) +++ head/lib/libsysdecode/flags.c Thu May 25 14:27:54 2017 (r318879) @@ -730,6 +730,19 @@ sysdecode_socketdomain(int domain) } const char * +sysdecode_socket_protocol(int domain, int protocol) +{ + + switch (domain) { + case PF_INET: + case PF_INET6: + return (lookup_value(sockipproto, protocol)); + default: + return (NULL); + } +} + +const char * sysdecode_sockaddr_family(int sa_family) { Modified: head/lib/libsysdecode/sysdecode.h ============================================================================== --- head/lib/libsysdecode/sysdecode.h Thu May 25 14:25:05 2017 (r318878) +++ head/lib/libsysdecode/sysdecode.h Thu May 25 14:27:54 2017 (r318879) @@ -99,6 +99,7 @@ const char *sysdecode_sigsegv_code(int _ const char *sysdecode_sigtrap_code(int _si_code); const char *sysdecode_sockaddr_family(int _sa_family); const char *sysdecode_socketdomain(int _domain); +const char *sysdecode_socket_protocol(int _domain, int _protocol); bool sysdecode_socket_type(FILE *_fp, int _type, int *_rem); const char *sysdecode_sockopt_level(int _level); const char *sysdecode_sockopt_name(int _level, int _optname); Added: head/lib/libsysdecode/sysdecode_socket_protocol.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libsysdecode/sysdecode_socket_protocol.3 Thu May 25 14:27:54 2017 (r318879) @@ -0,0 +1,54 @@ +.\" +.\" Copyright (c) 2016 John Baldwin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 25, 2017 +.Dt sysdecode_socket_protocol 3 +.Os +.Sh NAME +.Nm sysdecode_socket_protocol +.Nd lookup name of socket protocol +.Sh LIBRARY +.Lb libsysdecode +.Sh SYNOPSIS +.In sys/types.h +.In stdbool.h +.In sysdecode.h +.Ft const char * +.Fn sysdecode_socket_protocol "int domain" "int protocol" +.Sh DESCRIPTION +The +.Fn sysdecode_socket_protocol +function returns a text description of the protocol passed in the +.Fa protocol +argument to +.Xr socket 2 . +.Fn sysdecode_socket_protocol +takes the +.Fa protocol +as well as the +.Fa domain +to uniquely identify the protocol. Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Thu May 25 14:25:05 2017 (r318878) +++ head/usr.bin/truss/syscalls.c Thu May 25 14:27:54 2017 (r318879) @@ -1938,13 +1938,20 @@ print_arg(struct syscall_args *sc, unsig fprintf(fp, "%u", (socklen_t)args[sc->offset]); break; case Sockprotocol: { - int protocol; + const char *temp; + int domain, protocol; + domain = args[sc->offset - 2]; protocol = args[sc->offset]; if (protocol == 0) { fputs("0", fp); } else { - print_integer_arg(sysdecode_ipproto, fp, protocol); + temp = sysdecode_socket_protocol(domain, protocol); + if (temp) { + fputs(temp, fp); + } else { + fprintf(fp, "%d", protocol); + } } break; } From owner-svn-src-all@freebsd.org Thu May 25 14:34:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D178D811D7; Thu, 25 May 2017 14:34:23 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A4AD1C28; Thu, 25 May 2017 14:34:22 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PEYL8q057350; Thu, 25 May 2017 14:34:21 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PEYLRb057349; Thu, 25 May 2017 14:34:21 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705251434.v4PEYLRb057349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 25 May 2017 14:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318880 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 14:34:23 -0000 Author: zbb Date: Thu May 25 14:34:21 2017 New Revision: 318880 URL: https://svnweb.freebsd.org/changeset/base/318880 Log: Unmask legacy interrupts on Marvell PCIE controller This patch fixes a bug introduced with commit: r294510 "Remove an extra '!' found by clang 3.8." '!' was removed without inverting the logic, which broke PCIe legacy interrupts operation for Marvell controllers. Submitted by: Michal Mazur Obtained from: Semihalf Sponsored by: Netgate Modified: head/sys/arm/mv/mv_pci.c Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Thu May 25 14:27:54 2017 (r318879) +++ head/sys/arm/mv/mv_pci.c Thu May 25 14:34:21 2017 (r318880) @@ -918,7 +918,7 @@ static inline void pcib_write_irq_mask(struct mv_pcib_softc *sc, uint32_t mask) { - if (sc->sc_type != MV_TYPE_PCI) + if (sc->sc_type != MV_TYPE_PCIE) return; bus_space_write_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_IRQ_MASK, mask); From owner-svn-src-all@freebsd.org Thu May 25 14:54:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0323D8194C; Thu, 25 May 2017 14:54:23 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CFAD1A75; Thu, 25 May 2017 14:54:23 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PEsMKp065923; Thu, 25 May 2017 14:54:22 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PEsMBT065920; Thu, 25 May 2017 14:54:22 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705251454.v4PEsMBT065920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 May 2017 14:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318881 - in head: . share/doc tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 14:54:23 -0000 Author: bapt Date: Thu May 25 14:54:22 2017 New Revision: 318881 URL: https://svnweb.freebsd.org/changeset/base/318881 Log: In preparation for the removal of the roff toolchain, disconnect the roff documentation from the build. Those documents will be added to the doc tree and distributed as PDF from the documentation website. As they are valuable has history, but do not match current FreeBSD Further more, the ascii format we were using to distribute them is not really accurate for such documents. more details: https://lists.freebsd.org/pipermail/freebsd-arch/2017-May/018211.html Modified: head/ObsoleteFiles.inc head/share/doc/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu May 25 14:34:21 2017 (r318880) +++ head/ObsoleteFiles.inc Thu May 25 14:54:22 2017 (r318881) @@ -38,6 +38,76 @@ # xargs -n1 | sort | uniq -d; # done +# 20170525: disconnect the roff docs from the build +OLD_FILES+=usr/share/doc/papers/beyond43.ascii.gz +OLD_FILES+=usr/share/doc/papers/bio.ascii.gz +OLD_FILES+=usr/share/doc/papers/contents.ascii.gz +OLD_FILES+=usr/share/doc/papers/devfs.ascii.gz +OLD_FILES+=usr/share/doc/papers/diskperf.ascii.gz +OLD_FILES+=usr/share/doc/papers/fsinterface.ascii.gz +OLD_FILES+=usr/share/doc/papers/hwpmc.ascii.gz +OLD_FILES+=usr/share/doc/papers/jail.ascii.gz +OLD_FILES+=usr/share/doc/papers/kernmalloc.ascii.gz +OLD_FILES+=usr/share/doc/papers/kerntune.ascii.gz +OLD_FILES+=usr/share/doc/papers/malloc.ascii.gz +OLD_FILES+=usr/share/doc/papers/newvm.ascii.gz +OLD_FILES+=usr/share/doc/papers/releng.ascii.gz +OLD_FILES+=usr/share/doc/papers/sysperf.ascii.gz +OLD_FILES+=usr/share/doc/papers/timecounter.ascii.gz +OLD_FILES+=usr/share/doc/psd/01.cacm/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/02.implement/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/03.iosys/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/04.uprog/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/05.sysman/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/06.Clang/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/12.make/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/13.rcs/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/13.rcs/rcs_func.ascii.gz +OLD_FILES+=usr/share/doc/psd/15.yacc/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/16.lex/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/17.m4/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/18.gprof/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/20.ipctut/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/21.ipc/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/22.rpcgen/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/23.rpc/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/24.xdr/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/25.xdrrfc/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/26.rpcrfc/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/27.nfsrfc/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/Title.ascii.gz +OLD_FILES+=usr/share/doc/psd/contents.ascii.gz +OLD_FILES+=usr/share/doc/smm/01.setup/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/02.config/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/03.fsck/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/04.quotas/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/05.fastfs/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/06.nfs/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/07.lpd/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/08.sendmailop/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/11.timedop/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/12.timed/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/18.net/paper.ascii.gz +OLD_FILES+=usr/share/doc/smm/Title.ascii.gz +OLD_FILES+=usr/share/doc/smm/contents.ascii.gz +OLD_FILES+=usr/share/doc/usd/04.csh/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/05.dc/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/06.bc/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/07.mail/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/10.exref/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/10.exref/summary.ascii.gz +OLD_FILES+=usr/share/doc/usd/11.edit/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/12.vi/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/12.vi/summary.ascii.gz +OLD_FILES+=usr/share/doc/usd/12.vi/viapwh.ascii.gz +OLD_FILES+=usr/share/doc/usd/13.viref/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/18.msdiffs/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/19.memacros/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/20.meref/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/21.troff/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/22.trofftut/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/Title.ascii.gz +OLD_FILES+=usr/share/doc/usd/contents.ascii.gz # 20170427: NATM configuration support removed OLD_FILES+=etc/rc.d/atm1 OLD_FILES+=etc/rc.d/atm2 Modified: head/share/doc/Makefile ============================================================================== --- head/share/doc/Makefile Thu May 25 14:34:21 2017 (r318880) +++ head/share/doc/Makefile Thu May 25 14:54:22 2017 (r318881) @@ -23,11 +23,6 @@ _llvm= llvm _IPv6= IPv6 .endif -# FIXME this is not a real solution ... -.if ${MK_GROFF} != "no" -_roffdocs= papers psd smm usd -.endif - SUBDIR_PARALLEL= # Default output format for troff documents is ascii. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 25 14:34:21 2017 (r318880) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 25 14:54:22 2017 (r318881) @@ -2526,75 +2526,6 @@ OLD_FILES+=usr/bin/troff OLD_FILES+=usr/bin/vgrind OLD_FILES+=usr/libexec/vfontedpr OLD_FILES+=usr/share/dict/eign -OLD_FILES+=usr/share/doc/papers/beyond43.ascii.gz -OLD_FILES+=usr/share/doc/papers/bio.ascii.gz -OLD_FILES+=usr/share/doc/papers/contents.ascii.gz -OLD_FILES+=usr/share/doc/papers/devfs.ascii.gz -OLD_FILES+=usr/share/doc/papers/diskperf.ascii.gz -OLD_FILES+=usr/share/doc/papers/fsinterface.ascii.gz -OLD_FILES+=usr/share/doc/papers/hwpmc.ascii.gz -OLD_FILES+=usr/share/doc/papers/jail.ascii.gz -OLD_FILES+=usr/share/doc/papers/kernmalloc.ascii.gz -OLD_FILES+=usr/share/doc/papers/kerntune.ascii.gz -OLD_FILES+=usr/share/doc/papers/malloc.ascii.gz -OLD_FILES+=usr/share/doc/papers/newvm.ascii.gz -OLD_FILES+=usr/share/doc/papers/releng.ascii.gz -OLD_FILES+=usr/share/doc/papers/sysperf.ascii.gz -OLD_FILES+=usr/share/doc/papers/timecounter.ascii.gz -OLD_FILES+=usr/share/doc/psd/01.cacm/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/02.implement/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/03.iosys/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/04.uprog/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/05.sysman/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/06.Clang/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/12.make/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/13.rcs/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/13.rcs/rcs_func.ascii.gz -OLD_FILES+=usr/share/doc/psd/15.yacc/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/16.lex/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/17.m4/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/18.gprof/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/20.ipctut/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/21.ipc/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/22.rpcgen/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/23.rpc/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/24.xdr/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/25.xdrrfc/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/26.rpcrfc/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/27.nfsrfc/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/Title.ascii.gz -OLD_FILES+=usr/share/doc/psd/contents.ascii.gz -OLD_FILES+=usr/share/doc/smm/01.setup/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/02.config/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/03.fsck/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/04.quotas/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/05.fastfs/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/06.nfs/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/07.lpd/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/08.sendmailop/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/11.timedop/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/12.timed/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/18.net/paper.ascii.gz -OLD_FILES+=usr/share/doc/smm/Title.ascii.gz -OLD_FILES+=usr/share/doc/smm/contents.ascii.gz -OLD_FILES+=usr/share/doc/usd/04.csh/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/05.dc/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/06.bc/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/07.mail/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/10.exref/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/10.exref/summary.ascii.gz -OLD_FILES+=usr/share/doc/usd/11.edit/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/12.vi/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/12.vi/summary.ascii.gz -OLD_FILES+=usr/share/doc/usd/12.vi/viapwh.ascii.gz -OLD_FILES+=usr/share/doc/usd/13.viref/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/18.msdiffs/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/19.memacros/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/20.meref/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/21.troff/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/22.trofftut/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/Title.ascii.gz -OLD_FILES+=usr/share/doc/usd/contents.ascii.gz OLD_FILES+=usr/share/groff_font/devX100-12/CB OLD_FILES+=usr/share/groff_font/devX100-12/CBI OLD_FILES+=usr/share/groff_font/devX100-12/CI From owner-svn-src-all@freebsd.org Thu May 25 16:15:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99469D81905; Thu, 25 May 2017 16:15:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 754D012E0; Thu, 25 May 2017 16:15:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PGFJbd098567; Thu, 25 May 2017 16:15:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PGFJZN098563; Thu, 25 May 2017 16:15:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705251615.v4PGFJZN098563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 25 May 2017 16:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318882 - in stable/11/contrib/llvm: include/llvm/MC lib/MC lib/Target/ARM/MCTargetDesc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 16:15:20 -0000 Author: dim Date: Thu May 25 16:15:19 2017 New Revision: 318882 URL: https://svnweb.freebsd.org/changeset/base/318882 Log: MFC r318655: Pull in r302416 from upstream llvm trunk (by Martin Storsjö): [ARM] Clear the constant pool cache on explicit .ltorg directives Multiple ldr pseudoinstructions with the same constant value will reuse the same constant pool entry. However, if the constant pool is explicitly flushed with a .ltorg directive, we should not try to reference constants in the previous pool any longer, since they may be out of range. This fixes assembling hand-written assembler source which repeatedly loads the same constant value, across a binary size larger than the pc-relative fixup range for ldr instructions (4096 bytes). Such assembler source already uses explicit .ltorg instructions to emit constant pools with regular intervals. However if we try to reuse constants emitted in earlier pools, they end up out of range. This makes the output of the testcase match what binutils gas does (prior to this patch, it would fail to assemble). Differential Revision: https://reviews.llvm.org/D32847 This should fix "out of range pc-relative fixup value" errors, when compiling certain ARM inline assembly for www/webkit-gtk[23]. Reported by: mmel Modified: stable/11/contrib/llvm/include/llvm/MC/ConstantPools.h stable/11/contrib/llvm/lib/MC/ConstantPools.cpp stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/include/llvm/MC/ConstantPools.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/MC/ConstantPools.h Thu May 25 14:54:22 2017 (r318881) +++ stable/11/contrib/llvm/include/llvm/MC/ConstantPools.h Thu May 25 16:15:19 2017 (r318882) @@ -60,6 +60,8 @@ public: // Return true if the constant pool is empty bool empty(); + + void clearCache(); }; class AssemblerConstantPools { @@ -83,6 +85,7 @@ class AssemblerConstantPools { public: void emitAll(MCStreamer &Streamer); void emitForCurrentSection(MCStreamer &Streamer); + void clearCacheForCurrentSection(MCStreamer &Streamer); const MCExpr *addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc); Modified: stable/11/contrib/llvm/lib/MC/ConstantPools.cpp ============================================================================== --- stable/11/contrib/llvm/lib/MC/ConstantPools.cpp Thu May 25 14:54:22 2017 (r318881) +++ stable/11/contrib/llvm/lib/MC/ConstantPools.cpp Thu May 25 16:15:19 2017 (r318882) @@ -54,6 +54,10 @@ const MCExpr *ConstantPool::addEntry(con bool ConstantPool::empty() { return Entries.empty(); } +void ConstantPool::clearCache() { + CachedEntries.clear(); +} + // // AssemblerConstantPools implementation // @@ -95,6 +99,13 @@ void AssemblerConstantPools::emitForCurr } } +void AssemblerConstantPools::clearCacheForCurrentSection(MCStreamer &Streamer) { + MCSection *Section = Streamer.getCurrentSectionOnly(); + if (ConstantPool *CP = getConstantPool(Section)) { + CP->clearCache(); + } +} + const MCExpr *AssemblerConstantPools::addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc) { Modified: stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Thu May 25 14:54:22 2017 (r318881) +++ stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Thu May 25 16:15:19 2017 (r318882) @@ -33,6 +33,7 @@ const MCExpr *ARMTargetStreamer::addCons void ARMTargetStreamer::emitCurrentConstantPool() { ConstantPools->emitForCurrentSection(Streamer); + ConstantPools->clearCacheForCurrentSection(Streamer); } // finish() - write out any non-empty assembler constant pools. From owner-svn-src-all@freebsd.org Thu May 25 16:31:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A90DCD821DE; Thu, 25 May 2017 16:31:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FA0E1F87; Thu, 25 May 2017 16:31:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PGVrsl007056; Thu, 25 May 2017 16:31:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PGVrG5007055; Thu, 25 May 2017 16:31:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705251631.v4PGVrG5007055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 May 2017 16:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318883 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 16:31:54 -0000 Author: bapt Date: Thu May 25 16:31:53 2017 New Revision: 318883 URL: https://svnweb.freebsd.org/changeset/base/318883 Log: Now that roff documentation has been disconnected from the build, it is no longer necessary to have groff(1) as a bootstrap tool Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu May 25 16:15:19 2017 (r318882) +++ head/Makefile.inc1 Thu May 25 16:31:53 2017 (r318883) @@ -505,11 +505,6 @@ CROSSENV+= MAKEOBJDIRPREFIX=${OBJTREE} \ # Don't rebuild build-tools targets during normal build. CROSSENV+= BUILD_TOOLS_META=.NOMETA .endif -.if ${MK_GROFF} != "no" -CROSSENV+= GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \ - GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \ - GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac -.endif .if defined(TARGET_CFLAGS) CROSSENV+= ${TARGET_CFLAGS} .endif @@ -718,10 +713,6 @@ _worldtmp: .PHONY .endfor mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${WORLDTMP}/legacy/usr >/dev/null -.if ${MK_GROFF} != "no" - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.groff.dist \ - -p ${WORLDTMP}/legacy/usr >/dev/null -.endif mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${WORLDTMP}/legacy/usr/include >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ @@ -1654,11 +1645,6 @@ _strfile= usr.bin/fortune/strfile _gperf= gnu/usr.bin/gperf .endif -.if ${MK_SHAREDOCS} != "no" && ${MK_GROFF} != "no" -_groff= gnu/usr.bin/groff \ - usr.bin/soelim -.endif - .if ${MK_VT} != "no" _vtfontcvt= usr.bin/vtfontcvt .endif @@ -1765,7 +1751,6 @@ bootstrap-tools: .PHONY ${_kerberos5_bootstrap_tools} \ ${_strfile} \ ${_gperf} \ - ${_groff} \ ${_dtc} \ ${_cat} \ ${_kbdcontrol} \ From owner-svn-src-all@freebsd.org Thu May 25 16:41:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BFB0D8248B; Thu, 25 May 2017 16:41:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F002513E3; Thu, 25 May 2017 16:41:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PGf7NE007519; Thu, 25 May 2017 16:41:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PGf7bI007518; Thu, 25 May 2017 16:41:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705251641.v4PGf7bI007518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 25 May 2017 16:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318884 - head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 16:41:09 -0000 Author: emaste Date: Thu May 25 16:41:07 2017 New Revision: 318884 URL: https://svnweb.freebsd.org/changeset/base/318884 Log: lldb: map TRAP_CAP to a trace trap In the absense of a more specific handler for TRAP_CAP (generated by ENOTCAPABLE or ECAPMODE while in capability mode) treat it as a trace trap. Example usage (testing the bug in PR219173): % proccontrol -m trapcap lldb usr.bin/hexdump/obj/hexdump -- -Cv -s 1 /bin/ls ... (lldb) run Process 12980 launching Process 12980 launched: '.../usr.bin/hexdump/obj/hexdump' (x86_64) Process 12980 stopped * thread #1, stop reason = trace frame #0: 0x0000004b80c65f1a libc.so.7`__sys_lseek + 10 ... In the future we should have LLDB control the trapcap procctl itself (as it does with ASLR), as well as report a specific stop reason. This change eliminates an assertion failure from LLDB for now. Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Thu May 25 16:31:53 2017 (r318883) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Thu May 25 16:41:07 2017 (r318884) @@ -1132,6 +1132,8 @@ ProcessMessage ProcessMonitor::MonitorSI case 0: case TRAP_TRACE: + // Map TRAP_CAP to a trace trap in the absense of a more specific handler. + case TRAP_CAP: if (log) log->Printf("ProcessMonitor::%s() received trace event, tid = %" PRIu64 " : si_code = %d", From owner-svn-src-all@freebsd.org Thu May 25 17:22:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43AF0D812DB; Thu, 25 May 2017 17:22:15 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B7F15FE; Thu, 25 May 2017 17:22:15 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PHMETK027218; Thu, 25 May 2017 17:22:14 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PHME9h027216; Thu, 25 May 2017 17:22:14 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705251722.v4PHME9h027216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 25 May 2017 17:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318885 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 17:22:15 -0000 Author: truckman Date: Thu May 25 17:22:13 2017 New Revision: 318885 URL: https://svnweb.freebsd.org/changeset/base/318885 Log: MFC r318511 The result of right shifting a negative signed value is implementation defined. On machines without arithmetic shift instructions, zero bits may be shifted in from the left, giving a large positive result instead of the desired divide-by power-of-2. Fix this by operating on the absolute value and compensating for the possible negation later. Reverse the order of the underflow/overflow tests and the exponential decay calculation to avoid the possibility of an erroneous overflow detection if p is a sufficiently small non-negative value. Also check for negative values of prob before doing the exponential decay to avoid another instance of of right shifting a negative value. Tested by: Rasool Al-Saadi Modified: stable/11/sys/netpfil/ipfw/dn_aqm_pie.c stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 16:41:07 2017 (r318884) +++ stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 17:22:13 2017 (r318885) @@ -206,6 +206,7 @@ calculate_drop_prob(void *x) int64_t p, prob, oldprob; struct dn_aqm_pie_parms *pprms; struct pie_status *pst = (struct pie_status *) x; + int p_isneg; pprms = pst->parms; prob = pst->drop_prob; @@ -221,6 +222,12 @@ calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -243,37 +250,47 @@ calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication overflow/underflow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; Modified: stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 16:41:07 2017 (r318884) +++ stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 17:22:13 2017 (r318885) @@ -377,6 +377,7 @@ fq_calculate_drop_prob(void *x) struct dn_aqm_pie_parms *pprms; int64_t p, prob, oldprob; aqm_time_t now; + int p_isneg; now = AQM_UNOW; pprms = pst->parms; @@ -393,6 +394,12 @@ fq_calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -415,37 +422,47 @@ fq_calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication over/under flow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; From owner-svn-src-all@freebsd.org Thu May 25 17:23:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C41AD814B2; Thu, 25 May 2017 17:23:28 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8DCE18BB; Thu, 25 May 2017 17:23:27 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PHNQjw028044; Thu, 25 May 2017 17:23:26 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PHNQb0028042; Thu, 25 May 2017 17:23:26 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705251723.v4PHNQb0028042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 25 May 2017 17:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318886 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 17:23:28 -0000 Author: truckman Date: Thu May 25 17:23:26 2017 New Revision: 318886 URL: https://svnweb.freebsd.org/changeset/base/318886 Log: MFC r318511 The result of right shifting a negative signed value is implementation defined. On machines without arithmetic shift instructions, zero bits may be shifted in from the left, giving a large positive result instead of the desired divide-by power-of-2. Fix this by operating on the absolute value and compensating for the possible negation later. Reverse the order of the underflow/overflow tests and the exponential decay calculation to avoid the possibility of an erroneous overflow detection if p is a sufficiently small non-negative value. Also check for negative values of prob before doing the exponential decay to avoid another instance of of right shifting a negative value. Tested by: Rasool Al-Saadi Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 17:22:13 2017 (r318885) +++ stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 17:23:26 2017 (r318886) @@ -206,6 +206,7 @@ calculate_drop_prob(void *x) int64_t p, prob, oldprob; struct dn_aqm_pie_parms *pprms; struct pie_status *pst = (struct pie_status *) x; + int p_isneg; pprms = pst->parms; prob = pst->drop_prob; @@ -221,6 +222,12 @@ calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -243,37 +250,47 @@ calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication overflow/underflow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; Modified: stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 17:22:13 2017 (r318885) +++ stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 17:23:26 2017 (r318886) @@ -377,6 +377,7 @@ fq_calculate_drop_prob(void *x) struct dn_aqm_pie_parms *pprms; int64_t p, prob, oldprob; aqm_time_t now; + int p_isneg; now = AQM_UNOW; pprms = pst->parms; @@ -393,6 +394,12 @@ fq_calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -415,37 +422,47 @@ fq_calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication over/under flow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; From owner-svn-src-all@freebsd.org Thu May 25 17:45:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F671D81D31; Thu, 25 May 2017 17:45:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B3C31757; Thu, 25 May 2017 17:45:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PHjp2k036987; Thu, 25 May 2017 17:45:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PHjpZt036983; Thu, 25 May 2017 17:45:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705251745.v4PHjpZt036983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 May 2017 17:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318888 - in head/usr.bin/diff3: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 17:45:52 -0000 Author: bapt Date: Thu May 25 17:45:50 2017 New Revision: 318888 URL: https://svnweb.freebsd.org/changeset/base/318888 Log: Import working progress BSD diff3 import bsd diff3 from OpenBSD. Differences with OpenBSD: - lots of warning fixed - no shell wrapper with diff3 actually living in libexec - capsicumized Keep it disconnected as it is not yet good enough to replace GNU diff The motivation to import it now it to allow other people to jump in and also to have an open development on it Obtained from: OpenBSD Added: head/usr.bin/diff3/ head/usr.bin/diff3/Makefile (contents, props changed) head/usr.bin/diff3/diff3.1 (contents, props changed) head/usr.bin/diff3/diff3.c (contents, props changed) head/usr.bin/diff3/tests/ head/usr.bin/diff3/tests/1.out (contents, props changed) head/usr.bin/diff3/tests/1.txt (contents, props changed) head/usr.bin/diff3/tests/2.out (contents, props changed) head/usr.bin/diff3/tests/2.txt (contents, props changed) head/usr.bin/diff3/tests/3.out (contents, props changed) head/usr.bin/diff3/tests/3.txt (contents, props changed) head/usr.bin/diff3/tests/4.out (contents, props changed) head/usr.bin/diff3/tests/5.out (contents, props changed) head/usr.bin/diff3/tests/6.out (contents, props changed) head/usr.bin/diff3/tests/7.out (contents, props changed) head/usr.bin/diff3/tests/8.out (contents, props changed) head/usr.bin/diff3/tests/9.out (contents, props changed) head/usr.bin/diff3/tests/Makefile (contents, props changed) head/usr.bin/diff3/tests/diff3_test.sh (contents, props changed) Added: head/usr.bin/diff3/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/diff3/Makefile Thu May 25 17:45:50 2017 (r318888) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.include + +PROG= diff3 + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + +.include Added: head/usr.bin/diff3/diff3.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/diff3/diff3.1 Thu May 25 17:45:50 2017 (r318888) @@ -0,0 +1,202 @@ +.\" $OpenBSD: diff3.1,v 1.7 2007/05/31 19:20:09 jmc Exp $ +.\" +.\" Copyright (c) 1990, 1993, 1994 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)diff3.1 8.2 (Berkeley) 4/18/94 +.\" $FreeBSD$ +.\" +.Dd $Mdocdate: May 31 2007 $ +.Dt DIFF3 1 +.Os +.Sh NAME +.Nm diff3 +.Nd 3-way differential file comparison +.Sh SYNOPSIS +.Nm diff3 +.Op Fl 3aEeXx +.Ar file1 file2 file3 +.Sh DESCRIPTION +The +.Nm +utility compares the contents of three different versions of a file, +.Ar file1 , +.Ar file2 +and +.Ar file3 , +writing the result to the standard output. +The options describe different methods of merging and +purging +the separate versions into a new file. +.Nm +is used by +.Xr rcs 1 +to merge specific versions or create +new versions. +.Pp +The options are as follows: +.Bl -tag -width "-E, -X" +.It Fl 3 +Produces an output script suitable for +.Xr ed 1 +with changes +specific only to +.Ar file3 . +.It Fl a +Treat all files as ASCII. +.It Fl E , X +Similar to +.Fl e +and +.Fl x , +respectively, but treat overlapping changes (i.e., changes that would +be noted with ==== in the normal listing) differently. +The overlapping lines from both files will be inserted by the edit script, +bracketed by "<<<<<<" and ">>>>>>" lines. +.It Fl e +Produces output in a form suitable as an input script for the +.Xr ed 1 +utility. +The script may then be used to merge differences common between all +three files and differences specific to +.Ar file1 +and +.Ar file3 . +In other words, the +.Fl e +option ignores differences specific to +.Ar file1 +and +.Ar file2 , +and those specific to +.Ar file2 +and +.Ar file3 . +It is useful for backing out changes specific to +.Ar file2 +only. +.It Fl x +Produces an output script suitable for +.Xr ed 1 +with changes +specific only to all three versions. +.El +.Pp +The +.Fl E +option is used by +.Tn RCS +.Xr merge 1 +to ensure that overlapping changes in the merged files are preserved +and brought to someone's attention. +.Pp +For example, suppose lines 7-8 are changed in both +.Ar file1 +and +.Ar file2 . +Applying the edit script generated by the command +.Pp +.Dl $ diff3 -E file1 file2 file3 +.Pp +to +.Ar file1 +results in the file: +.Bd -literal -offset indent +lines 1-6 +of file1 +<<<<<<< file1 +lines 7-8 +of file1 +======= +lines 7-8 +of file3 +>>>>>>> file3 +rest of file1 +.Ed +.Pp +The default output of +.Nm +makes notation of the differences between all files, and those +differences specific to each pair of files. +The changes are described by the commands necessary for +.Xr ed 1 +to create the desired target from the different versions. +See +.Xr diff 1 +for a description of the commands. +.Bl -tag -width "=====" +.It Li \&==== +The lines beneath this notation are ranges of lines which are different +between all files. +.It \&==== Ns Va n +The lines beneath this notation are ranges of lines which are exclusively +different in file +.Va n . +.El +.Sh ENVIRONMENT +.Bl -tag -width TMPDIR +.It Ev TMPDIR +If the environment variable +.Ev TMPDIR +exists, +.Nm +will use the directory specified by +.Ev TMPDIR +as the temporary directory. +.El +.Sh FILES +.Bl -tag -width /usr/libexec/diff3 -compact +.It Pa /tmp/d3a.XXXXXXXXXX +temporary file +.It Pa /tmp/d3b.XXXXXXXXXX +temporary file +.It Pa /usr/libexec/diff3 +the actual executable +.El +.Sh SEE ALSO +.Xr diff 1 , +.Xr ed 1 , +.Xr merge 1 , +.Xr rcs 1 , +.Xr sdiff 1 +.Sh HISTORY +A +.Nm +command appeared in +.At v7 . +.Sh BUGS +The +.Fl e +option cannot catch and change lines which have +.Ql \&. +as the first and only character on the line. +The resulting script will fail on that line +as +.Ql \&. +is an +.Xr ed 1 +editing command. Added: head/usr.bin/diff3/diff3.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/diff3/diff3.c Thu May 25 17:45:50 2017 (r318888) @@ -0,0 +1,787 @@ +/* $OpenBSD: diff3prog.c,v 1.11 2009/10/27 23:59:37 deraadt Exp $ */ + +/* + * Copyright (C) Caldera International Inc. 2001-2002. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code and documentation must retain the above + * copyright notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed or owned by Caldera + * International, Inc. + * 4. Neither the name of Caldera International, Inc. nor the names of other + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA + * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, + * INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)diff3.c 8.1 (Berkeley) 6/6/93 + */ + +#if 0 +#ifndef lint +static char sccsid[] = "@(#)diff3.c 8.1 (Berkeley) 6/6/93"; +#endif +#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * "from" is first in range of changed lines; "to" is last+1 + * from=to=line after point of insertion for added lines. + */ +struct range { + int from; + int to; +}; + +struct diff { + struct range old; + struct range new; +}; + +static size_t szchanges; + +static struct diff *d13; +static struct diff *d23; +/* + * "de" is used to gather editing scripts. These are later spewed out in + * reverse order. Its first element must be all zero, the "new" component + * of "de" contains line positions or byte positions depending on when you + * look (!?). Array overlap indicates which sections in "de" correspond to + * lines that are different in all three files. + */ +static struct diff *de; +static char *overlap; +static int overlapcnt; +static FILE *fp[3]; +static int cline[3]; /* # of the last-read line in each file (0-2) */ +/* + * The latest known correspondence between line numbers of the 3 files + * is stored in last[1-3]; + */ +static int last[4]; +static int Aflag, eflag, iflag, mflag, Tflag; +static int oflag; /* indicates whether to mark overlaps (-E or -X)*/ +static int strip_cr; +static char *f1mark, *f2mark, *f3mark; + +static bool duplicate(struct range *, struct range *); +static int edit(struct diff *, bool, int); +static char *getchange(FILE *); +static char *get_line(FILE *, size_t *); +static int number(char **); +static int readin(int fd, struct diff **); +static int skip(int, int, const char *); +static void change(int, struct range *, bool); +static void keep(int, struct range *); +static void merge(int, int); +static void prange(struct range *); +static void repos(int); +static void edscript(int) __dead2; +static void increase(void); +static void usage(void) __dead2; + +enum { + DIFFPROG_OPT, + STRIPCR_OPT, +}; + +#define MAX_CHECK 768 /* 3 kb of chars */ +#define DIFF_PATH "/usr/bin/diff" + + +#define OPTIONS "3aAeEiL:mTxX" +static struct option longopts[] = { + { "ed", no_argument, NULL, 'e' }, + { "show-overlap", no_argument, NULL, 'E' }, + { "overlap-only", no_argument, NULL, 'x' }, + { "initial-tab", no_argument, NULL, 'T' }, + { "text", no_argument, NULL, 'a' }, + { "strip-trailing-cr", no_argument, NULL, STRIPCR_OPT }, + { "show-all", no_argument, NULL, 'A' }, + { "easy-only", no_argument, NULL, '3' }, + { "merge", no_argument, NULL, 'm' }, + { "label", required_argument, NULL, 'L' }, + { "diff-program", required_argument, NULL, DIFFPROG_OPT }, +}; + +static void +usage(void) +{ + fprintf(stderr, "usage: diff3 [-3aAeEimTxX] [-L lable1] [-L label2] " + "[ -L label3] file1 file2 file3\n"); + exit (2); +} + +static int +readin(int fd, struct diff **dd) +{ + int a, b, c, d; + size_t i; + char kind, *p; + FILE *f; + + f = fdopen(fd, "r"); + if (f == NULL) + err(2, "fdopen"); + for (i=0; (p = getchange(f)); i++) { + if (i >= szchanges - 1) + increase(); + a = b = number(&p); + if (*p == ',') { + p++; + b = number(&p); + } + kind = *p++; + c = d = number(&p); + if (*p==',') { + p++; + d = number(&p); + } + if (kind == 'a') + a++; + if (kind == 'd') + c++; + b++; + d++; + (*dd)[i].old.from = a; + (*dd)[i].old.to = b; + (*dd)[i].new.from = c; + (*dd)[i].new.to = d; + } + if (i) { + (*dd)[i].old.from = (*dd)[i-1].old.to; + (*dd)[i].new.from = (*dd)[i-1].new.to; + } + fclose(f); + return (i); +} + +static int +diffexec(const char *diffprog, char **diffargv, int fd[]) +{ + int pid, pd; + + switch (pid = pdfork(&pd, PD_CLOEXEC)) { + case 0: + close(fd[0]); + if (dup2(fd[1], STDOUT_FILENO) == -1) + err(2, "child could not duplicate descriptor"); + close(fd[1]); + execvp(diffprog, diffargv); + err(2, "could not execute diff: %s", diffprog); + break; + case -1: + err(2, "could not fork"); + break; + } + close(fd[1]); + return (pd); +} + +static int +number(char **lc) +{ + int nn; + + nn = 0; + while (isdigit((unsigned char)(**lc))) + nn = nn*10 + *(*lc)++ - '0'; + return (nn); +} + +static char * +getchange(FILE *b) +{ + char *line; + + while ((line = get_line(b, NULL))) { + if (isdigit((unsigned char)line[0])) + return (line); + } + return (NULL); +} + + +static char * +get_line(FILE *b, size_t *n) +{ + char *cp; + size_t len; + static char *buf; + static size_t bufsize; + + if ((cp = fgetln(b, &len)) == NULL) + return (NULL); + + if (cp[len - 1] != '\n') + len++; + if (len + 1 > bufsize) { + do { + bufsize += 1024; + } while (len + 1 > bufsize); + if ((buf = realloc(buf, bufsize)) == NULL) + err(EXIT_FAILURE, NULL); + } + memcpy(buf, cp, len - 1); + buf[len - 1] = '\n'; + buf[len] = '\0'; + if (n != NULL) + *n = len; + return (buf); +} + +static void +merge(int m1, int m2) +{ + struct diff *d1, *d2, *d3; + int j, t1, t2; + bool dup = false; + + d1 = d13; + d2 = d23; + j = 0; + + while ((t1 = d1 < d13 + m1) | (t2 = d2 < d23 + m2)) { + /* first file is different from the others */ + if (!t2 || (t1 && d1->new.to < d2->new.from)) { + /* stuff peculiar to 1st file */ + if (eflag == 0) { + printf("====1\n"); + change(1, &d1->old, false); + keep(2, &d1->new); + change(3, &d1->new, false); + } + d1++; + continue; + } + /* second file is different from others */ + if (!t1 || (t2 && d2->new.to < d1->new.from)) { + if (eflag == 0) { + printf("====2\n"); + keep(1, &d2->new); + change(3, &d2->new, false); + change(2, &d2->old, false); + } + d2++; + continue; + } + /* + * Merge overlapping changes in first file + * this happens after extension (see below). + */ + if (d1 + 1 < d13 + m1 && d1->new.to >= d1[1].new.from) { + d1[1].old.from = d1->old.from; + d1[1].new.from = d1->new.from; + d1++; + continue; + } + + /* merge overlapping changes in second */ + if (d2 + 1 < d23 + m2 && d2->new.to >= d2[1].new.from) { + d2[1].old.from = d2->old.from; + d2[1].new.from = d2->new.from; + d2++; + continue; + } + /* stuff peculiar to third file or different in all */ + if (d1->new.from == d2->new.from && d1->new.to == d2->new.to) { + dup = duplicate(&d1->old, &d2->old); + /* + * dup = 0 means all files differ + * dup = 1 means files 1 and 2 identical + */ + if (eflag == 0) { + printf("====%s\n", dup ? "3" : ""); + change(1, &d1->old, dup); + change(2, &d2->old, false); + d3 = d1->old.to > d1->old.from ? d1 : d2; + change(3, &d3->new, false); + } else + j = edit(d1, dup, j); + d1++; + d2++; + continue; + } + /* + * Overlapping changes from file 1 and 2; extend changes + * appropriately to make them coincide. + */ + if (d1->new.from < d2->new.from) { + d2->old.from -= d2->new.from - d1->new.from; + d2->new.from = d1->new.from; + } else if (d2->new.from < d1->new.from) { + d1->old.from -= d1->new.from - d2->new.from; + d1->new.from = d2->new.from; + } + if (d1->new.to > d2->new.to) { + d2->old.to += d1->new.to - d2->new.to; + d2->new.to = d1->new.to; + } else if (d2->new.to > d1->new.to) { + d1->old.to += d2->new.to - d1->new.to; + d1->new.to = d2->new.to; + } + } + if (eflag) + edscript(j); +} + +/* + * The range of lines rold.from thru rold.to in file i is to be changed. + * It is to be printed only if it does not duplicate something to be + * printed later. + */ +static void +change(int i, struct range *rold, bool dup) +{ + + printf("%d:", i); + last[i] = rold->to; + prange(rold); + if (dup) + return; + i--; + skip(i, rold->from, NULL); + skip(i, rold->to, " "); +} + +/* + * Print the range of line numbers, rold.from thru rold.to, as n1,n2 or + * n1. + */ +static void +prange(struct range *rold) +{ + + if (rold->to <= rold->from) + printf("%da\n", rold->from - 1); + else { + printf("%d", rold->from); + if (rold->to > rold->from+1) + printf(",%d", rold->to - 1); + printf("c\n"); + } +} + +/* + * No difference was reported by diff between file 1 (or 2) and file 3, + * and an artificial dummy difference (trange) must be ginned up to + * correspond to the change reported in the other file. + */ +static void +keep(int i, struct range *rnew) +{ + int delta; + struct range trange; + + delta = last[3] - last[i]; + trange.from = rnew->from - delta; + trange.to = rnew->to - delta; + change(i, &trange, true); +} + +/* + * skip to just before line number from in file "i". If "pr" is non-NULL, + * print all skipped stuff with string pr as a prefix. + */ +static int +skip(int i, int from, const char *pr) +{ + size_t j, n; + char *line; + + for (n = 0; cline[i] < from - 1; n += j) { + if ((line = get_line(fp[i], &j)) == NULL) + errx(EXIT_FAILURE, "logic error"); + if (pr != NULL) + printf("%s%s", Tflag == 1? "\t" : pr, line); + cline[i]++; + } + return ((int) n); +} + +/* + * Return 1 or 0 according as the old range (in file 1) contains exactly + * the same data as the new range (in file 2). + */ +static bool +duplicate(struct range *r1, struct range *r2) +{ + int c, d; + int nchar; + int nline; + + if (r1->to-r1->from != r2->to-r2->from) + return (0); + skip(0, r1->from, NULL); + skip(1, r2->from, NULL); + nchar = 0; + for (nline=0; nline < r1->to - r1->from; nline++) { + do { + c = getc(fp[0]); + d = getc(fp[1]); + if (c == -1 || d== -1) + errx(EXIT_FAILURE, "logic error"); + nchar++; + if (c != d) { + repos(nchar); + return (0); + } + } while (c != '\n'); + } + repos(nchar); + return (1); +} + +static void +repos(int nchar) +{ + int i; + + for (i = 0; i < 2; i++) + (void)fseek(fp[i], (long)-nchar, SEEK_CUR); +} +/* + * collect an editing script for later regurgitation + */ +static int +edit(struct diff *diff, bool dup, int j) +{ + + if (((dup + 1) & eflag) == 0) + return (j); + j++; + overlap[j] = !dup; + if (!dup) + overlapcnt++; + de[j].old.from = diff->old.from; + de[j].old.to = diff->old.to; + de[j].new.from = de[j-1].new.to + skip(2, diff->new.from, NULL); + de[j].new.to = de[j].new.from + skip(2, diff->new.to, NULL); + return (j); +} + +/* regurgitate */ +static void +edscript(int n) +{ + int k; + size_t j; + char block[BUFSIZ]; + + for (; n > 0; n--) { + if (!oflag || !overlap[n]) { + prange(&de[n].old); + } else { + printf("%da\n", de[n].old.to -1); + if (Aflag) { + printf("%s\n", f2mark); + fseek(fp[1], de[n].old.from, SEEK_SET); + for (k = de[n].old.to - de[n].old.from; k > 0; k -= j) { + j = k > BUFSIZ ? BUFSIZ : k; + if (fread(block, 1, j, fp[1]) != j) + errx(2, "logic error"); + fwrite(block, 1, j, stdout); + } + printf("\n"); + } + printf("=======\n"); + } + fseek(fp[2], (long)de[n].new.from, SEEK_SET); + for (k = de[n].new.to - de[n].new.from; k > 0; k-= j) { + j = k > BUFSIZ ? BUFSIZ : k; + if (fread(block, 1, j, fp[2]) != j) + errx(2, "logic error"); + fwrite(block, 1, j, stdout); + } + if (!oflag || !overlap[n]) + printf(".\n"); + else { + printf("%s\n.\n", f3mark); + printf("%da\n%s\n.\n", de[n].old.from - 1, f1mark); + } + } + if (iflag) + printf("w\nq\n"); + + exit(eflag == 0 ? overlapcnt : 0); +} + +static void +increase(void) +{ + struct diff *p; + char *q; + size_t newsz, incr; + + /* are the memset(3) calls needed? */ + newsz = szchanges == 0 ? 64 : 2 * szchanges; + incr = newsz - szchanges; + + p = realloc(d13, newsz * sizeof(struct diff)); + if (p == NULL) + err(1, NULL); + memset(p + szchanges, 0, incr * sizeof(struct diff)); + d13 = p; + p = realloc(d23, newsz * sizeof(struct diff)); + if (p == NULL) + err(1, NULL); + memset(p + szchanges, 0, incr * sizeof(struct diff)); + d23 = p; + p = realloc(de, newsz * sizeof(struct diff)); + if (p == NULL) + err(1, NULL); + memset(p + szchanges, 0, incr * sizeof(struct diff)); + de = p; + q = realloc(overlap, newsz * sizeof(char)); + if (q == NULL) + err(1, NULL); + memset(q + szchanges, 0, incr * sizeof(char)); + overlap = q; + szchanges = newsz; +} + + +int +main(int argc, char **argv) +{ + int ch, nblabels, status, m, n, kq, nke, nleft, i; + char *labels[] = { NULL, NULL, NULL }; + const char *diffprog = DIFF_PATH; + char *file1, *file2, *file3; + char *diffargv[6]; + int diffargc = 0; + int fd13[2], fd23[2]; + int pd13, pd23; + cap_rights_t rights_ro; + struct kevent *e; + + nblabels = 0; + eflag = 0; + oflag = 0; + diffargv[diffargc++] = __DECONST(char *, diffprog); + while ((ch = getopt_long(argc, argv, OPTIONS, longopts, NULL)) != -1) { + switch (ch) { + case '3': + eflag = 2; + break; + case 'a': + diffargv[diffargc++] = __DECONST(char *, "-a"); + break; + case 'A': + Aflag = 1; + break; + case 'e': + eflag = 3; + break; + case 'E': + eflag = 3; + oflag = 1; + break; + case 'i': + iflag = 1; + break; + case 'L': + oflag = 1; + if (nblabels >= 3) + errx(2, "too many file label options"); + labels[nblabels++] = optarg; + break; + case 'm': + Aflag = 1; + oflag = 1; + mflag = 1; + break; + case 'T': + Tflag = 1; + break; + case 'x': + eflag = 1; + break; + case 'X': + oflag = 1; + eflag = 1; + break; + case DIFFPROG_OPT: + diffprog = optarg; + break; + case STRIPCR_OPT: + strip_cr = 1; + break; + } + } + argc -= optind; + argv += optind; + + if (Aflag) { + eflag = 3; + oflag = 1; + } + + if (argc != 3) + usage(); + + if (caph_limit_stdio() == -1) + err(2, "unable to limit stdio"); + + cap_rights_init(&rights_ro, CAP_READ, CAP_FSTAT, CAP_SEEK); + + kq = kqueue(); + if (kq == -1) + err(2, "kqueue"); + + e = malloc(2 * sizeof(struct kevent)); + if (e == NULL) + err(2, "malloc"); + + /* TODO stdio */ + file1 = argv[0]; + file2 = argv[1]; + file3 = argv[2]; + + if (oflag) { + asprintf(&f1mark, "<<<<<<< %s", + labels[0] != NULL ? labels[0] : file1); + if (f1mark == NULL) + err(2, "asprintf"); + asprintf(&f2mark, "||||||| %s", + labels[1] != NULL ? labels[1] : file2); + if (f2mark == NULL) + err(2, "asprintf"); + asprintf(&f3mark, ">>>>>>> %s", + labels[2] != NULL ? labels[2] : file3); + if (f3mark == NULL) + err(2, "asprintf"); + } + fp[0] = fopen(file1, "r"); + if (fp[0] == NULL) + err(2, "Can't open %s", file1); + if (cap_rights_limit(fileno(fp[0]), &rights_ro) < 0) + err(2, "unable to limit rights on: %s", file1); + + fp[1] = fopen(file2, "r"); + if (fp[1] == NULL) + err(2, "Can't open %s", file2); + if (cap_rights_limit(fileno(fp[1]), &rights_ro) < 0) + err(2, "unable to limit rights on: %s", file2); + + fp[2] = fopen(file3, "r"); + if (fp[2] == NULL) + err(2, "Can't open %s", file3); + if (cap_rights_limit(fileno(fp[2]), &rights_ro) < 0) + err(2, "unable to limit rights on: %s", file3); + + if (pipe(fd13)) + err(2, "pipe"); + if (pipe(fd23)) + err(2, "pipe"); + + diffargv[diffargc] = file1; + diffargv[diffargc + 1] = file3; + diffargv[diffargc + 2] = NULL; + + nleft = 0; + pd13 = diffexec(diffprog, diffargv, fd13); + EV_SET(e + nleft , pd13, EVFILT_PROCDESC, EV_ADD, NOTE_EXIT, 0, NULL); + if (kevent(kq, e + nleft, 1, NULL, 0, NULL) == -1) + err(2, "kevent1"); + nleft++; + + diffargv[diffargc] = file2; + pd23 = diffexec(diffprog, diffargv, fd23); + EV_SET(e + nleft , pd23, EVFILT_PROCDESC, EV_ADD, NOTE_EXIT, 0, NULL); + if (kevent(kq, e + nleft, 1, NULL, 0, NULL) == -1) + err(2, "kevent2"); + nleft++; + + caph_cache_catpages(); + if (cap_enter() < 0 && errno != ENOSYS) + err(2, "unable to enter capability mode"); + + /* parse diffs */ + increase(); + m = readin(fd13[0], &d13); + n = readin(fd23[0], &d23); + + /* waitpid cooked over pdforks */ + while (nleft > 0) { + nke = kevent(kq, NULL, 0, e, nleft, NULL); + if (nke == -1) + err(2, "kevent"); + for (i = 0; i < nke; i++) { + status = e[i].data; + if (WIFEXITED(status) && WEXITSTATUS(status) >= 2) + errx(2, "diff exited abormally"); + else if (WIFSIGNALED(status)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 25 17:55:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2A23D81FC5; Thu, 25 May 2017 17:55:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5B2C1CEA; Thu, 25 May 2017 17:55:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PHte5V041201; Thu, 25 May 2017 17:55:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PHteJ0041200; Thu, 25 May 2017 17:55:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705251755.v4PHteJ0041200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 May 2017 17:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318889 - head/usr.bin/diff3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 17:55:42 -0000 Author: bapt Date: Thu May 25 17:55:40 2017 New Revision: 318889 URL: https://svnweb.freebsd.org/changeset/base/318889 Log: Remove the MAX_CHECK macro, it was initially used to test if a file was a text file or not. The check is not done by diff3 but by diff (the argument -a is directly passed to diff(1)) Modified: head/usr.bin/diff3/diff3.c Modified: head/usr.bin/diff3/diff3.c ============================================================================== --- head/usr.bin/diff3/diff3.c Thu May 25 17:45:50 2017 (r318888) +++ head/usr.bin/diff3/diff3.c Thu May 25 17:55:40 2017 (r318889) @@ -149,10 +149,8 @@ enum { STRIPCR_OPT, }; -#define MAX_CHECK 768 /* 3 kb of chars */ #define DIFF_PATH "/usr/bin/diff" - #define OPTIONS "3aAeEiL:mTxX" static struct option longopts[] = { { "ed", no_argument, NULL, 'e' }, From owner-svn-src-all@freebsd.org Thu May 25 17:58:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00DF5D82079; Thu, 25 May 2017 17:58:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C53DC1E8B; Thu, 25 May 2017 17:58:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PHw1o0041359; Thu, 25 May 2017 17:58:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PHw1BH041358; Thu, 25 May 2017 17:58:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705251758.v4PHw1BH041358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 May 2017 17:58:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318890 - head/usr.bin/diff3/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 17:58:03 -0000 Author: bapt Date: Thu May 25 17:58:01 2017 New Revision: 318890 URL: https://svnweb.freebsd.org/changeset/base/318890 Log: For now comment tests for arguments which are not in par with GNU diff3 yet Modified: head/usr.bin/diff3/tests/diff3_test.sh Modified: head/usr.bin/diff3/tests/diff3_test.sh ============================================================================== --- head/usr.bin/diff3/tests/diff3_test.sh Thu May 25 17:55:40 2017 (r318889) +++ head/usr.bin/diff3/tests/diff3_test.sh Thu May 25 17:58:01 2017 (r318890) @@ -26,11 +26,11 @@ diff3_body() atf_check -o file:$(atf_get_srcdir)/7.out \ diff3 -i $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt - atf_check -o file:$(atf_get_srcdir)/8.out \ - diff3 -A -L 1 -L 2 -L 3 $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt +# atf_check -o file:$(atf_get_srcdir)/8.out \ +# diff3 -A -L 1 -L 2 -L 3 $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt - atf_check -s exit:1 -o file:$(atf_get_srcdir)/9.out \ - diff3 -m -L 1 -L 2 -L 3 $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt +# atf_check -s exit:1 -o file:$(atf_get_srcdir)/9.out \ +# diff3 -m -L 1 -L 2 -L 3 $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt } diff3_lesssimple_body() @@ -42,5 +42,5 @@ diff3_lesssimple_body() atf_init_test_cases() { atf_add_test_case diff3 - atf_add_test_case diff3_lesssimple +# atf_add_test_case diff3_lesssimple } From owner-svn-src-all@freebsd.org Thu May 25 18:16:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8199FD8268C; Thu, 25 May 2017 18:16:19 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 432621AE9; Thu, 25 May 2017 18:16:19 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PIGIil049729; Thu, 25 May 2017 18:16:18 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PIGIdJ049727; Thu, 25 May 2017 18:16:18 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201705251816.v4PIGIdJ049727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 25 May 2017 18:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318891 - in head/usr.sbin/bsdconfig: console share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 18:16:19 -0000 Author: dteske Date: Thu May 25 18:16:17 2017 New Revision: 318891 URL: https://svnweb.freebsd.org/changeset/base/318891 Log: Fix long standing issue in bsdconfig's keymap selection Since the translation to vt as terminal emulator, the keymaps files path has changed and this change does not get followed in bsdconfig. This implicates boot time warnings about a wrong keymap file, what is very confusing for the new users and for me too, so initialize the default keymaps search path depending on terminal type. Differential Revision: https://reviews.freebsd.org/D8734 Submitted by: Oliver Pinter Reviewed by: ed, jilles, dteske MFC after: 3 days X-MFC-to: stable/11 Sponsored by: HardenedBSD Signed-off-by: Oliver Pinter Modified: head/usr.sbin/bsdconfig/console/keymap head/usr.sbin/bsdconfig/share/keymap.subr Modified: head/usr.sbin/bsdconfig/console/keymap ============================================================================== --- head/usr.sbin/bsdconfig/console/keymap Thu May 25 17:58:01 2017 (r318890) +++ head/usr.sbin/bsdconfig/console/keymap Thu May 25 18:16:17 2017 (r318891) @@ -172,6 +172,7 @@ dialog_menu_main() uk.iso) defaultitem="$msg_uk_iso" ;; ua.koi8-u) defaultitem="$msg_ukrainian_koi8_u" ;; ua.koi8-u.shift.alt) defaultitem="$msg_ukrainian_koi8_u_koi8_r" ;; + us.ctrl) defaultitem="$msg_usa_capslock_ctrl" ;; us.pc-ctrl) defaultitem="$msg_usa_capslock_ctrl" ;; us.dvorak) defaultitem="$msg_usa_dvorak" ;; us.dvorakl) defaultitem="$msg_usa_dvorak_left" ;; @@ -307,7 +308,12 @@ while :; do uk_iso) keymap_to_set="uk.iso" ;; ukrainian_koi8_u) keymap_to_set="ua.koi8-u" ;; ukrainian_koi8_u_koi8_r) keymap_to_set="ua.koi8-u.shift.alt" ;; - usa_capslock_ctrl) keymap_to_set="us.pc-ctrl" ;; + usa_capslock_ctrl) + case "$( sysctl -n kern.vty )" in + vt) keymap_to_set="us.ctrl" ;; + *) keymap_to_set="us.pc-ctrl" ;; + esac + ;; usa_dvorak) keymap_to_set="us.dvorak" ;; usa_dvorak_left) keymap_to_set="us.dvorakl" ;; usa_dvorak_right) keymap_to_set="us.dvorakr" ;; Modified: head/usr.sbin/bsdconfig/share/keymap.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/keymap.subr Thu May 25 17:58:01 2017 (r318890) +++ head/usr.sbin/bsdconfig/share/keymap.subr Thu May 25 18:16:17 2017 (r318891) @@ -39,7 +39,10 @@ f_include $BSDCFG_SHARE/struct.subr # Defaults taken from usr.sbin/kbdmap/kbdmap.h # : ${DEFAULT_LANG:=en} -: ${DEFAULT_KEYMAP_DIR:=/usr/share/syscons/keymaps} +case "$( sysctl -n kern.vty )" in +vt) : ${DEFAULT_KEYMAP_DIR:=/usr/share/vt/keymaps} ;; +*) : ${DEFAULT_KEYMAP_DIR:=/usr/share/syscons/keymaps} ;; +esac ############################################################ GLOBALS From owner-svn-src-all@freebsd.org Thu May 25 18:46:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D497D8228E; Thu, 25 May 2017 18:46:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1C081CFF; Thu, 25 May 2017 18:46:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PIkDGt062097; Thu, 25 May 2017 18:46:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PIkDrv062096; Thu, 25 May 2017 18:46:13 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705251846.v4PIkDrv062096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 May 2017 18:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318892 - head/usr.bin/diff3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 18:46:15 -0000 Author: bapt Date: Thu May 25 18:46:13 2017 New Revision: 318892 URL: https://svnweb.freebsd.org/changeset/base/318892 Log: Update the diff3 manpage to reflect the fact the version in freebsd does not use temporary files nor uses a /usr/libexec/diff3prog Modified: head/usr.bin/diff3/diff3.1 Modified: head/usr.bin/diff3/diff3.1 ============================================================================== --- head/usr.bin/diff3/diff3.1 Thu May 25 18:16:17 2017 (r318891) +++ head/usr.bin/diff3/diff3.1 Thu May 25 18:46:13 2017 (r318892) @@ -30,7 +30,7 @@ .\" @(#)diff3.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd May 25, 2017 .Dt DIFF3 1 .Os .Sh NAME @@ -157,26 +157,6 @@ The lines beneath this notation are rang different in file .Va n . .El -.Sh ENVIRONMENT -.Bl -tag -width TMPDIR -.It Ev TMPDIR -If the environment variable -.Ev TMPDIR -exists, -.Nm -will use the directory specified by -.Ev TMPDIR -as the temporary directory. -.El -.Sh FILES -.Bl -tag -width /usr/libexec/diff3 -compact -.It Pa /tmp/d3a.XXXXXXXXXX -temporary file -.It Pa /tmp/d3b.XXXXXXXXXX -temporary file -.It Pa /usr/libexec/diff3 -the actual executable -.El .Sh SEE ALSO .Xr diff 1 , .Xr ed 1 , From owner-svn-src-all@freebsd.org Thu May 25 18:55:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFBD3D8267E; Thu, 25 May 2017 18:55:11 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97189164C; Thu, 25 May 2017 18:55:11 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PItA1h066511; Thu, 25 May 2017 18:55:10 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PItAwY066510; Thu, 25 May 2017 18:55:10 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201705251855.v4PItAwY066510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Thu, 25 May 2017 18:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318893 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 18:55:11 -0000 Author: stevek Date: Thu May 25 18:55:10 2017 New Revision: 318893 URL: https://svnweb.freebsd.org/changeset/base/318893 Log: MFC r318314 Add information to open(2) man page about the O_VERIFY flag. PR: 219262 Reviewed by: bjk wblock Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Modified: stable/11/lib/libc/sys/open.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/open.2 ============================================================================== --- stable/11/lib/libc/sys/open.2 Thu May 25 18:46:13 2017 (r318892) +++ stable/11/lib/libc/sys/open.2 Thu May 25 18:55:10 2017 (r318893) @@ -119,6 +119,7 @@ O_NOCTTY ignored O_TTY_INIT ignored O_DIRECTORY error if file is not a directory O_CLOEXEC set FD_CLOEXEC upon open +O_VERIFY verify the contents of the file .Ed .Pp Opening a file with @@ -237,6 +238,15 @@ may be used to set .Dv FD_CLOEXEC flag for the newly returned file descriptor. .Pp +.Dv O_VERIFY +may be used to indicate to the kernel that the contents of the file should +be verified before allowing the open to proceed. +The details of what +.Dq verified +means is implementation specific. +The run-time linker (rtld) uses this flag to ensure shared objects have +been verified before operating on them. +.Pp If successful, .Fn open returns a non-negative integer, termed a file descriptor. From owner-svn-src-all@freebsd.org Thu May 25 19:02:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFA1ED82A3B; Thu, 25 May 2017 19:02:55 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EE521D87; Thu, 25 May 2017 19:02:55 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PJ2s53070762; Thu, 25 May 2017 19:02:54 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PJ2s1q070760; Thu, 25 May 2017 19:02:54 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201705251902.v4PJ2s1q070760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 25 May 2017 19:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318894 - in head/release: . tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 19:02:55 -0000 Author: cperciva Date: Thu May 25 19:02:54 2017 New Revision: 318894 URL: https://svnweb.freebsd.org/changeset/base/318894 Log: Turn on support for the Amazon "Elastic Network Adapter" in EC2 AMIs. X-MFC-after: 318647 + fixes for some lock ordering warnings Modified: head/release/Makefile.ec2 head/release/tools/ec2.conf Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Thu May 25 18:55:10 2017 (r318893) +++ head/release/Makefile.ec2 Thu May 25 19:02:54 2017 (r318894) @@ -51,7 +51,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} @echo "--------------------------------------------------------------" @false .endif - /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov \ + /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov --ena \ ${.OBJDIR}/ec2.raw \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Thu May 25 18:55:10 2017 (r318893) +++ head/release/tools/ec2.conf Thu May 25 19:02:54 2017 (r318894) @@ -78,6 +78,9 @@ vm_extra_pre_umount() { # nodes, but apply the workaround just in case. echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf + # Load the kernel module for the Amazon "Elastic Network Adapter" + echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf + # The first time the AMI boots, the installed "first boot" scripts # should be allowed to run: # * ec2_configinit (download and process EC2 user-data) From owner-svn-src-all@freebsd.org Thu May 25 19:14:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD785D82D66; Thu, 25 May 2017 19:14:45 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 770421591; Thu, 25 May 2017 19:14:45 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PJEiKs075187; Thu, 25 May 2017 19:14:44 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PJEi3l075183; Thu, 25 May 2017 19:14:44 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201705251914.v4PJEi3l075183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Thu, 25 May 2017 19:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318895 - in head: share/man/man4 sys/dev/mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 19:14:45 -0000 Author: slm Date: Thu May 25 19:14:44 2017 New Revision: 318895 URL: https://svnweb.freebsd.org/changeset/base/318895 Log: Fix several problems with mapping code. Reviewed by: ken, scottl, asomers, ambrisko, mav Approved by: ken, mav MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10878 Modified: head/share/man/man4/mps.4 head/sys/dev/mps/mps.c head/sys/dev/mps/mps_mapping.c head/sys/dev/mps/mps_sas.c head/sys/dev/mps/mps_sas_lsi.c head/sys/dev/mps/mps_user.c head/sys/dev/mps/mpsvar.h Modified: head/share/man/man4/mps.4 ============================================================================== --- head/share/man/man4/mps.4 Thu May 25 19:02:54 2017 (r318894) +++ head/share/man/man4/mps.4 Thu May 25 19:14:44 2017 (r318895) @@ -1,8 +1,8 @@ .\" .\" Copyright (c) 2010 Spectra Logic Corporation .\" Copyright (c) 2014 LSI Corp -.\" Copyright (c) 2016 Avago Technologies -.\" Copyright (c) 2016 Broadcom Ltd. +.\" Copyright (c) 2015-2017 Avago Technologies +.\" Copyright (c) 2015-2017 Broadcom Ltd. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ .\" $FreeBSD$ .\" -.Dd July 5, 2016 +.Dd May 25, 2017 .Dt MPS 4 .Os .Sh NAME @@ -241,13 +241,13 @@ Send SSU to HDDs, but not to SSDs. Send SSU to both HDDs and SSDs. .El .Pp -To control the feature for a specific adapter, set this tunable value in +To control this feature for a specific adapter, set this tunable value in .Xr loader.conf 5 : .Bd -literal -offset indent dev.mps.X.enable_ssu .Ed .Pp -The same set of values are valid when setting this tunable for all adapters. +The same set of values are valid as when setting this tunable for all adapters. .Pp SATA disks that take several seconds to spin up and fail the SATA Identify command might not be discovered by the driver. @@ -273,6 +273,45 @@ dev.mps.X.spinup_wait_time=NNNN tunable. NNNN is the number of seconds to wait for SATA devices to spin up when they fail the initial SATA Identify command. +.Pp +The driver can map devices discovered by the adapter so that target IDs +corresponding to a specific device persist across resets and reboots. +In some cases it is possible for devices to lose their mapped IDs due to +unexpected behavior from certain hardware, such as some types of enclosures. +To overcome this problem, a tunable is provided that will force the driver to +map devices using the Phy number associated with the device. +This feature is not recommended if the topology includes multiple +enclosures/expanders. +If multiple enclosures/expanders are present in the topology, Phy numbers are +repeated, causing all devices at these Phy numbers except the first device to +fail enumeration. +To control this feature for all adapters, set the +.Bd -literal -offset indent +hw.mps.use_phy_num +.Ed +.Pp +tunable in +.Xr loader.conf 5 +to one of these values: +.Bl -tag -width 6n -offset indent +.It -1 +Only use Phy numbers to map devices and bypass the driver's mapping logic. +.It 0 +Never use Phy numbers to map devices. +.It 1 +Use Phy numbers to map devices, but only if the driver's mapping logic fails +to map the device that is being enumerated. +This is the default value. +.El +.Pp +To control this feature for a specific adapter, set this tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mps.X.use_phy_num +.Ed +.Pp +The same set of values are valid as when setting this tunable for all adapters. +.Pp .Sh DEBUGGING To enable debugging prints from the .Nm Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Thu May 25 19:02:54 2017 (r318894) +++ head/sys/dev/mps/mps.c Thu May 25 19:14:44 2017 (r318895) @@ -505,7 +505,8 @@ mps_iocfacts_allocate(struct mps_softc * */ if (reallocating) { mps_iocfacts_free(sc); - mpssas_realloc_targets(sc, saved_facts.MaxTargets); + mpssas_realloc_targets(sc, saved_facts.MaxTargets + + saved_facts.MaxVolumes); } /* @@ -1518,6 +1519,7 @@ mps_attach(struct mps_softc *sc) mtx_init(&sc->mps_mtx, "MPT2SAS lock", NULL, MTX_DEF); callout_init_mtx(&sc->periodic, &sc->mps_mtx, 0); + callout_init_mtx(&sc->device_check_callout, &sc->mps_mtx, 0); TAILQ_INIT(&sc->event_list); timevalclear(&sc->lastfail); @@ -1682,6 +1684,7 @@ mps_free(struct mps_softc *sc) mps_unlock(sc); /* Lock must not be held for this */ callout_drain(&sc->periodic); + callout_drain(&sc->device_check_callout); if (((error = mps_detach_log(sc)) != 0) || ((error = mps_detach_sas(sc)) != 0)) Modified: head/sys/dev/mps/mps_mapping.c ============================================================================== --- head/sys/dev/mps/mps_mapping.c Thu May 25 19:02:54 2017 (r318894) +++ head/sys/dev/mps/mps_mapping.c Thu May 25 19:14:44 2017 (r318895) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include /** - * _mapping_clear_entry - Clear a particular mapping entry. + * _mapping_clear_map_entry - Clear a particular mapping entry. * @map_entry: map table entry * * Returns nothing. @@ -73,7 +73,6 @@ _mapping_clear_map_entry(struct dev_mapp map_entry->phy_bits = 0; map_entry->dpm_entry_num = MPS_DPM_BAD_IDX; map_entry->dev_handle = 0; - map_entry->channel = -1; map_entry->id = -1; map_entry->missing_count = 0; map_entry->init_complete = 0; @@ -140,12 +139,15 @@ _mapping_commit_enc_entry(struct mps_sof dpm_entry->PhysicalBitsMapping = htole32(et_entry->phy_bits); dpm_entry->Reserved1 = 0; + mps_dprint(sc, MPS_MAPPING, "%s: Writing DPM entry %d for enclosure.\n", + __func__, et_entry->dpm_entry_num); memcpy(&config_page.Entry, (u8 *)dpm_entry, sizeof(Mpi2DriverMap0Entry_t)); if (mps_config_set_dpm_pg0(sc, &mpi_reply, &config_page, et_entry->dpm_entry_num)) { - printf("%s: write of dpm entry %d for enclosure failed\n", - __func__, et_entry->dpm_entry_num); + mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: Write of DPM " + "entry %d for enclosure failed.\n", __func__, + et_entry->dpm_entry_num); dpm_entry->MappingInformation = le16toh(dpm_entry-> MappingInformation); dpm_entry->DeviceIndex = le16toh(dpm_entry->DeviceIndex); @@ -164,7 +166,7 @@ _mapping_commit_enc_entry(struct mps_sof /** * _mapping_commit_map_entry - write a particular map table entry in DPM page0. * @sc: per adapter object - * @enc_entry: enclosure table entry + * @mt_entry: mapping table entry * * Returns 0 for success, non-zero for failure. */ @@ -180,6 +182,19 @@ _mapping_commit_map_entry(struct mps_sof if (!sc->is_dpm_enable) return 0; + /* + * It's possible that this Map Entry points to a BAD DPM index. This + * can happen if the Map Entry is a for a missing device and the DPM + * entry that was being used by this device is now being used by some + * new device. So, check for a BAD DPM index and just return if so. + */ + if (mt_entry->dpm_entry_num == MPS_DPM_BAD_IDX) { + mps_dprint(sc, MPS_MAPPING, "%s: DPM entry location for target " + "%d is invalid. DPM will not be written.\n", __func__, + mt_entry->id); + return 0; + } + memset(&config_page, 0, sizeof(Mpi2DriverMappingPage0_t)); memcpy(&config_page.Header, (u8 *)sc->dpm_pg0, sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -193,13 +208,16 @@ _mapping_commit_map_entry(struct mps_sof dpm_entry->MappingInformation = htole16(mt_entry->missing_count); dpm_entry->PhysicalBitsMapping = 0; dpm_entry->Reserved1 = 0; - dpm_entry->MappingInformation = htole16(dpm_entry->MappingInformation); memcpy(&config_page.Entry, (u8 *)dpm_entry, sizeof(Mpi2DriverMap0Entry_t)); + + mps_dprint(sc, MPS_MAPPING, "%s: Writing DPM entry %d for target %d.\n", + __func__, mt_entry->dpm_entry_num, mt_entry->id); if (mps_config_set_dpm_pg0(sc, &mpi_reply, &config_page, mt_entry->dpm_entry_num)) { - printf("%s: write of dpm entry %d for device failed\n", - __func__, mt_entry->dpm_entry_num); + mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: Write of DPM " + "entry %d for target %d failed.\n", __func__, + mt_entry->dpm_entry_num, mt_entry->id); dpm_entry->MappingInformation = le16toh(dpm_entry-> MappingInformation); dpm_entry->DeviceIndex = le16toh(dpm_entry->DeviceIndex); @@ -307,7 +325,7 @@ _mapping_get_high_missing_et_idx(struct et_entry = &sc->enclosure_table[enc_idx]; if ((et_entry->missing_count > high_missing_count) && !et_entry->skip_search) { - high_missing_count = et_entry->missing_count; + high_missing_count = et_entry->missing_count; high_idx = enc_idx; } } @@ -326,7 +344,7 @@ _mapping_get_high_missing_et_idx(struct static u32 _mapping_get_high_missing_mt_idx(struct mps_softc *sc) { - u32 map_idx, high_idx = MPS_ENCTABLE_BAD_IDX; + u32 map_idx, high_idx = MPS_MAPTABLE_BAD_IDX; u8 high_missing_count = 0; u32 start_idx, end_idx, start_idx_ir, end_idx_ir; struct dev_mapping_table *mt_entry; @@ -370,7 +388,7 @@ _mapping_get_ir_mt_idx_from_wwid(struct _mapping_get_ir_maprange(sc, &start_idx, &end_idx); mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) + for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) if (mt_entry->physical_id == wwid) return map_idx; @@ -458,20 +476,32 @@ _mapping_get_free_ir_mt_idx(struct mps_s u32 high_idx = MPS_MAPTABLE_BAD_IDX; struct dev_mapping_table *mt_entry; + /* + * The IN_USE flag should be clear if the entry is available to use. + * This flag is cleared on initialization and and when a volume is + * deleted. All other times this flag should be set. If, for some + * reason, a free entry cannot be found, look for the entry with the + * highest missing count just in case there is one. + */ _mapping_get_ir_maprange(sc, &start_idx, &end_idx); mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) + for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) { if (!(mt_entry->device_info & MPS_MAP_IN_USE)) return map_idx; - mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) { if (mt_entry->missing_count > high_missing_count) { high_missing_count = mt_entry->missing_count; high_idx = map_idx; } } + + if (high_idx == MPS_MAPTABLE_BAD_IDX) { + mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: Could not find a " + "free entry in the mapping table for a Volume. The mapping " + "table is probably corrupt.\n", __func__); + } + return high_idx; } @@ -494,6 +524,7 @@ _mapping_get_free_mt_idx(struct mps_soft if (sc->ir_firmware && (volume_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_HIGH_VOLUME_MAPPING)) max_idx -= sc->max_volumes; + for (map_idx = start_idx; map_idx < max_idx; map_idx++, mt_entry++) if (!(mt_entry->device_info & (MPS_MAP_IN_USE | MPS_DEV_RESERVED))) @@ -542,12 +573,66 @@ static u32 _mapping_get_free_dpm_idx(struct mps_softc *sc) { u16 entry_num; + Mpi2DriverMap0Entry_t *dpm_entry; + u16 current_entry = MPS_DPM_BAD_IDX, missing_cnt, high_missing_cnt = 0; + u64 physical_id; + struct dev_mapping_table *mt_entry; + u32 map_idx; - for (entry_num = 0; entry_num < sc->max_dpm_entries; entry_num++) { - if (!sc->dpm_entry_used[entry_num]) - return entry_num; + for (entry_num = 0; entry_num < sc->max_dpm_entries; entry_num++) { + dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); + dpm_entry += entry_num; + missing_cnt = dpm_entry->MappingInformation & + MPI2_DRVMAP0_MAPINFO_MISSING_MASK; + + /* + * If entry is used and not missing, then this entry can't be + * used. Look at next one. + */ + if (sc->dpm_entry_used[entry_num] && !missing_cnt) + continue; + + /* + * If this entry is not used at all, then the missing count + * doesn't matter. Just use this one. Otherwise, keep looking + * and make sure the entry with the highest missing count is + * used. + */ + if (!sc->dpm_entry_used[entry_num]) { + current_entry = entry_num; + break; + } + if ((current_entry == MPS_DPM_BAD_IDX) || + (missing_cnt > high_missing_cnt)) { + current_entry = entry_num; + high_missing_cnt = missing_cnt; + } + } + + /* + * If an entry has been found to use and it's already marked as used + * it means that some device was already using this entry but it's + * missing, and that means that the connection between the missing + * device's DPM entry and the mapping table needs to be cleared. To do + * this, use the Physical ID of the old device still in the DPM entry + * to find its mapping table entry, then mark its DPM entry as BAD. + */ + if ((current_entry != MPS_DPM_BAD_IDX) && + sc->dpm_entry_used[current_entry]) { + dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); + dpm_entry += current_entry; + physical_id = dpm_entry->PhysicalIdentifier.High; + physical_id = (physical_id << 32) | + dpm_entry->PhysicalIdentifier.Low; + map_idx = _mapping_get_mt_idx_from_id(sc, physical_id); + if (map_idx != MPS_MAPTABLE_BAD_IDX) { + mt_entry = &sc->mapping_table[map_idx]; + mt_entry->dpm_entry_num = MPS_DPM_BAD_IDX; + } } - return MPS_DPM_BAD_IDX; + return current_entry; } /** @@ -566,40 +651,57 @@ _mapping_update_ir_missing_cnt(struct mp Mpi2EventIrConfigElement_t *element, u64 wwid) { struct dev_mapping_table *mt_entry; - u8 missing_cnt, reason = element->ReasonCode; + u8 missing_cnt, reason = element->ReasonCode, update_dpm = 1; u16 dpm_idx; Mpi2DriverMap0Entry_t *dpm_entry; - if (!sc->is_dpm_enable) - return; + /* + * Depending on the reason code, update the missing count. Always set + * the init_complete flag when here, so just do it first. That flag is + * used for volumes to make sure that the DPM entry has been updated. + * When a volume is deleted, clear the map entry's IN_USE flag so that + * the entry can be used again if another volume is created. Also clear + * its dev_handle entry so that other functions can't find this volume + * by the handle, since it's not defined any longer. + */ mt_entry = &sc->mapping_table[map_idx]; - if (reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) { + mt_entry->init_complete = 1; + if ((reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) || + (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED)) { mt_entry->missing_count = 0; - } else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED) { - mt_entry->missing_count = 0; - mt_entry->init_complete = 0; - } else if ((reason == MPI2_EVENT_IR_CHANGE_RC_REMOVED) || - (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED)) { - if (!mt_entry->init_complete) { - if (mt_entry->missing_count < MPS_MAX_MISSING_COUNT) - mt_entry->missing_count++; - else - mt_entry->init_complete = 1; - } - if (!mt_entry->missing_count) + } else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) { + if (mt_entry->missing_count < MPS_MAX_MISSING_COUNT) mt_entry->missing_count++; + + mt_entry->device_info &= ~MPS_MAP_IN_USE; mt_entry->dev_handle = 0; } + /* + * If persistent mapping is enabled, update the DPM with the new missing + * count for the volume. If the DPM index is bad, get a free one. If + * it's bad for a volume that's being deleted do nothing because that + * volume doesn't have a DPM entry. + */ + if (!sc->is_dpm_enable) + return; dpm_idx = mt_entry->dpm_entry_num; if (dpm_idx == MPS_DPM_BAD_IDX) { - if ((reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) || - (reason == MPI2_EVENT_IR_CHANGE_RC_REMOVED)) - dpm_idx = _mapping_get_dpm_idx_from_id(sc, - mt_entry->physical_id, 0); - else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) + if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) + { + mps_dprint(sc, MPS_MAPPING, "%s: Volume being deleted " + "is not in DPM so DPM missing count will not be " + "updated.\n", __func__); return; + } } + if (dpm_idx == MPS_DPM_BAD_IDX) + dpm_idx = _mapping_get_free_dpm_idx(sc); + + /* + * Got the DPM entry for the volume or found a free DPM entry if this is + * a new volume. Check if the current information is outdated. + */ if (dpm_idx != MPS_DPM_BAD_IDX) { dpm_entry = (Mpi2DriverMap0Entry_t *)((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -607,17 +709,25 @@ _mapping_update_ir_missing_cnt(struct mp missing_cnt = dpm_entry->MappingInformation & MPI2_DRVMAP0_MAPINFO_MISSING_MASK; if ((mt_entry->physical_id == - le64toh((u64)dpm_entry->PhysicalIdentifier.High | - dpm_entry->PhysicalIdentifier.Low)) && (missing_cnt == - mt_entry->missing_count)) - mt_entry->init_complete = 1; - } else { - dpm_idx = _mapping_get_free_dpm_idx(sc); - mt_entry->init_complete = 0; + le64toh(((u64)dpm_entry->PhysicalIdentifier.High << 32) | + (u64)dpm_entry->PhysicalIdentifier.Low)) && (missing_cnt == + mt_entry->missing_count)) { + mps_dprint(sc, MPS_MAPPING, "%s: DPM entry for volume " + "with target ID %d does not require an update.\n", + __func__, mt_entry->id); + update_dpm = 0; + } } - if ((dpm_idx != MPS_DPM_BAD_IDX) && !mt_entry->init_complete) { - mt_entry->init_complete = 1; + /* + * Update the volume's persistent info if it's new or the ID or missing + * count has changed. If a good DPM index has not been found by now, + * there is no space left in the DPM table. + */ + if ((dpm_idx != MPS_DPM_BAD_IDX) && update_dpm) { + mps_dprint(sc, MPS_MAPPING, "%s: Update DPM entry for volume " + "with target ID %d.\n", __func__, mt_entry->id); + mt_entry->dpm_entry_num = dpm_idx; dpm_entry = (Mpi2DriverMap0Entry_t *)((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -633,44 +743,47 @@ _mapping_update_ir_missing_cnt(struct mp sc->dpm_flush_entry[dpm_idx] = 1; sc->dpm_entry_used[dpm_idx] = 1; } else if (dpm_idx == MPS_DPM_BAD_IDX) { - printf("%s: no space to add entry in DPM table\n", __func__); - mt_entry->init_complete = 1; + mps_dprint(sc, MPS_INFO | MPS_MAPPING, "%s: No space to add an " + "entry in the DPM table for volume with target ID %d.\n", + __func__, mt_entry->id); } } /** - * _mapping_add_to_removal_table - mark an entry for removal + * _mapping_add_to_removal_table - add DPM index to the removal table * @sc: per adapter object - * @handle: Handle of enclosures/device/volume + * @dpm_idx: Index of DPM entry to remove * - * Adds the handle or DPM entry number in removal table. + * Adds a DPM entry number to the removal table. * * Returns nothing. */ static void -_mapping_add_to_removal_table(struct mps_softc *sc, u16 handle, - u16 dpm_idx) +_mapping_add_to_removal_table(struct mps_softc *sc, u16 dpm_idx) { struct map_removal_table *remove_entry; u32 i; - u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); + /* + * This is only used to remove entries from the DPM in the controller. + * If DPM is not enabled, just return. + */ + if (!sc->is_dpm_enable) + return; + + /* + * Find the first available removal_table entry and add the new entry + * there. + */ remove_entry = sc->removal_table; for (i = 0; i < sc->max_devices; i++, remove_entry++) { - if (remove_entry->dev_handle || remove_entry->dpm_entry_num != - MPS_DPM_BAD_IDX) + if (remove_entry->dpm_entry_num != MPS_DPM_BAD_IDX) continue; - if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { - if (dpm_idx) - remove_entry->dpm_entry_num = dpm_idx; - if (remove_entry->dpm_entry_num == MPS_DPM_BAD_IDX) - remove_entry->dev_handle = handle; - } else if ((ioc_pg8_flags & - MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) - remove_entry->dev_handle = handle; + + mps_dprint(sc, MPS_MAPPING, "%s: Adding DPM entry %d to table " + "for removal.\n", __func__, dpm_idx); + remove_entry->dpm_entry_num = dpm_idx; break; } @@ -681,8 +794,13 @@ _mapping_add_to_removal_table(struct mps * @sc: per adapter object * @topo_change: Topology change event entry * - * Search through the topology change list and if any device is found not - * responding it's associated map table entry and DPM entry is updated + * Increment the missing count in the mapping table for a device that is not + * responding. If Persitent Mapping is used, increment the DPM entry as well. + * Currently, this function only increments the missing count if the device + * goes missing, so after initialization has completed. This means that the + * missing count can only go from 0 to 1 here. The missing count is incremented + * during initialization as well, so that's where a target's missing count can + * go past 1. * * Returns nothing. */ @@ -706,34 +824,45 @@ _mapping_update_missing_count(struct mps dev_handle); phy_change->is_processed = 1; if (map_idx == MPS_MAPTABLE_BAD_IDX) { - printf("%s: device is already removed from mapping " - "table\n", __func__); + mps_dprint(sc, MPS_INFO | MPS_MAPPING, "%s: device is " + "already removed from mapping table\n", __func__); continue; } mt_entry = &sc->mapping_table[map_idx]; - if (!mt_entry->init_complete) { - if (mt_entry->missing_count < MPS_MAX_MISSING_COUNT) - mt_entry->missing_count++; - else - mt_entry->init_complete = 1; - } - if (!mt_entry->missing_count) + if (mt_entry->missing_count < MPS_MAX_MISSING_COUNT) mt_entry->missing_count++; - _mapping_add_to_removal_table(sc, mt_entry->dev_handle, 0); - mt_entry->dev_handle = 0; + /* + * When using Enc/Slot mapping, when a device is removed, it's + * mapping table information should be cleared. Otherwise, the + * target ID will be incorrect if this same device is re-added + * to a different slot. + */ + if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == + MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + _mapping_clear_map_entry(mt_entry); + } + + /* + * When using device mapping, update the missing count in the + * DPM entry, but only if the missing count has changed. + */ if (((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) && - sc->is_dpm_enable && !mt_entry->init_complete && + sc->is_dpm_enable && mt_entry->dpm_entry_num != MPS_DPM_BAD_IDX) { dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); dpm_entry += mt_entry->dpm_entry_num; - dpm_entry->MappingInformation = mt_entry->missing_count; - sc->dpm_flush_entry[mt_entry->dpm_entry_num] = 1; + if (dpm_entry->MappingInformation != + mt_entry->missing_count) { + dpm_entry->MappingInformation = + mt_entry->missing_count; + sc->dpm_flush_entry[mt_entry->dpm_entry_num] = + 1; + } } - mt_entry->init_complete = 1; } } @@ -766,6 +895,10 @@ _mapping_find_enc_map_space(struct mps_s vol_mapping_flags = le16toh(sc->ioc_pg8.IRVolumeMappingFlags) & MPI2_IOCPAGE8_IRFLAGS_MASK_VOLUME_MAPPING_MODE; + /* + * The end of the mapping table depends on where volumes are kept, if + * IR is enabled. + */ if (!sc->ir_firmware) end_of_table = sc->max_devices; else if (vol_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_LOW_VOLUME_MAPPING) @@ -773,6 +906,17 @@ _mapping_find_enc_map_space(struct mps_s else end_of_table = sc->max_devices - sc->max_volumes; + /* + * The skip_count is the number of entries that are reserved at the + * beginning of the mapping table. But, it does not include the number + * of Physical IDs that are reserved for direct attached devices. Look + * through the mapping table after these reserved entries to see if + * the devices for this enclosure are already mapped. The PHY bit check + * is used to make sure that at least one PHY bit is common between the + * enclosure and the device that is already mapped. + */ + mps_dprint(sc, MPS_MAPPING, "%s: Looking for space in the mapping " + "table for added enclosure.\n", __func__); for (map_idx = (max_num_phy_ids + skip_count); map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; @@ -782,11 +926,21 @@ _mapping_find_enc_map_space(struct mps_s num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; + mps_dprint(sc, MPS_MAPPING, "%s: Found space " + "in the mapping for enclosure at map index " + "%d.\n", __func__, start_idx); return start_idx; } } else num_found = 0; } + + /* + * If the enclosure's devices are not mapped already, look for + * contiguous entries in the mapping table that are not reserved. If + * enough entries are found, return the starting index for that space. + */ + num_found = 0; for (map_idx = (max_num_phy_ids + skip_count); map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; @@ -794,40 +948,91 @@ _mapping_find_enc_map_space(struct mps_s num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; + mps_dprint(sc, MPS_MAPPING, "%s: Found space " + "in the mapping for enclosure at map index " + "%d.\n", __func__, start_idx); return start_idx; } } else num_found = 0; } + /* + * If here, it means that not enough space in the mapping table was + * found to support this enclosure, so go through the enclosure table to + * see if any enclosure entries have a missing count. If so, get the + * enclosure with the highest missing count and check it to see if there + * is enough space for the new enclosure. + */ while (!done_flag) { enc_idx = _mapping_get_high_missing_et_idx(sc); - if (enc_idx == MPS_ENCTABLE_BAD_IDX) + if (enc_idx == MPS_ENCTABLE_BAD_IDX) { + mps_dprint(sc, MPS_MAPPING, "%s: Not enough space was " + "found in the mapping for the added enclosure.\n", + __func__); return MPS_MAPTABLE_BAD_IDX; + } + + /* + * Found a missing enclosure. Set the skip_search flag so this + * enclosure is not checked again for a high missing count if + * the loop continues. This way, all missing enclosures can + * have their space added together to find enough space in the + * mapping table for the added enclosure. The space must be + * contiguous. + */ + mps_dprint(sc, MPS_MAPPING, "%s: Space from a missing " + "enclosure was found.\n", __func__); enc_entry = &sc->enclosure_table[enc_idx]; - /*VSP FIXME*/ enc_entry->skip_search = 1; + + /* + * Unmark all of the missing enclosure's device's reserved + * space. These will be remarked as reserved if this missing + * enclosure's space is not used. + */ + mps_dprint(sc, MPS_MAPPING, "%s: Clear the reserved flag for " + "all of the map entries for the enclosure.\n", __func__); mt_entry = &sc->mapping_table[enc_entry->start_index]; for (map_idx = enc_entry->start_index; map_idx < (enc_entry->start_index + enc_entry->num_slots); map_idx++, mt_entry++) - mt_entry->device_info &= ~MPS_DEV_RESERVED; + mt_entry->device_info &= ~MPS_DEV_RESERVED; + + /* + * Now that space has been unreserved, check again to see if + * enough space is available for the new enclosure. + */ + mps_dprint(sc, MPS_MAPPING, "%s: Check if new mapping space is " + "enough for the new enclosure.\n", __func__); found_space = 0; - for (map_idx = (max_num_phy_ids + - skip_count); map_idx < end_of_table; map_idx++) { + num_found = 0; + for (map_idx = (max_num_phy_ids + skip_count); + map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; if (!(mt_entry->device_info & MPS_DEV_RESERVED)) { num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; found_space = 1; + break; } } else num_found = 0; } - if (!found_space) continue; + + /* + * If enough space was found, all of the missing enclosures that + * will be used for the new enclosure must be added to the + * removal table. Then all mappings for the enclosure's devices + * and for the enclosure itself need to be cleared. There may be + * more than one enclosure to add to the removal table and + * clear. + */ + mps_dprint(sc, MPS_MAPPING, "%s: Found space in the mapping " + "for enclosure at map index %d.\n", __func__, start_idx); for (map_idx = start_idx; map_idx < (start_idx + num_found); map_idx++) { enc_entry = sc->enclosure_table; @@ -838,26 +1043,38 @@ _mapping_find_enc_map_space(struct mps_s enc_entry->num_slots)) continue; if (!enc_entry->removal_flag) { + mps_dprint(sc, MPS_MAPPING, "%s: " + "Enclosure %d will be removed from " + "the mapping table.\n", __func__, + enc_idx); enc_entry->removal_flag = 1; - _mapping_add_to_removal_table(sc, 0, + _mapping_add_to_removal_table(sc, enc_entry->dpm_entry_num); } mt_entry = &sc->mapping_table[map_idx]; - if (mt_entry->device_info & - MPS_MAP_IN_USE) { - _mapping_add_to_removal_table(sc, - mt_entry->dev_handle, 0); - _mapping_clear_map_entry(mt_entry); - } + _mapping_clear_map_entry(mt_entry); if (map_idx == (enc_entry->start_index + enc_entry->num_slots - 1)) _mapping_clear_enc_entry(et_entry); } } + + /* + * During the search for space for this enclosure, some entries + * in the mapping table may have been unreserved. Go back and + * change all of these to reserved again. Only the enclosures + * with the removal_flag set should be left as unreserved. The + * skip_search flag needs to be cleared as well so that the + * enclosure's space will be looked at the next time space is + * needed. + */ enc_entry = sc->enclosure_table; for (enc_idx = 0; enc_idx < sc->num_enc_table_entries; enc_idx++, enc_entry++) { if (!enc_entry->removal_flag) { + mps_dprint(sc, MPS_MAPPING, "%s: Reset the " + "reserved flag for all of the map entries " + "for enclosure %d.\n", __func__, enc_idx); mt_entry = &sc->mapping_table[enc_entry-> start_index]; for (map_idx = enc_entry->start_index; map_idx < @@ -905,6 +1122,7 @@ _mapping_get_dev_info(struct mps_softc * if (phy_change->is_processed || !phy_change->dev_handle || phy_change->reason != MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED) continue; + if (mps_config_get_sas_device_pg0(sc, &mpi_reply, &sas_device_pg0, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, phy_change->dev_handle)) { @@ -918,9 +1136,9 @@ _mapping_get_dev_info(struct mps_softc * * when the system is shutdown. */ device_info = le32toh(sas_device_pg0.DeviceInfo); - sas_address = sas_device_pg0.SASAddress.High; + sas_address = le32toh(sas_device_pg0.SASAddress.High); sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; + le32toh(sas_device_pg0.SASAddress.Low); if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { rc = mpssas_get_sas_address_for_sata_disk(sc, @@ -939,18 +1157,29 @@ _mapping_get_dev_info(struct mps_softc * phy_change->physical_id = sas_address; phy_change->slot = le16toh(sas_device_pg0.Slot); - phy_change->device_info = le32toh(sas_device_pg0.DeviceInfo); + phy_change->device_info = device_info; + /* + * When using Enc/Slot mapping, if this device is an enclosure + * make sure that all of its slots can fit into the mapping + * table. + */ if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + /* + * The enclosure should already be in the enclosure + * table due to the Enclosure Add event. If not, just + * continue, nothing can be done. + */ enc_idx = _mapping_get_enc_idx_from_handle(sc, topo_change->enc_handle); if (enc_idx == MPS_ENCTABLE_BAD_IDX) { phy_change->is_processed = 1; - mps_dprint(sc, MPS_MAPPING, "%s: failed to add " - "the device with handle 0x%04x because the " - "enclosure is not in the mapping table\n", - __func__, phy_change->dev_handle); + mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because the enclosure is not in " + "the mapping table\n", __func__, + phy_change->dev_handle); continue; } if (!((phy_change->device_info & @@ -963,8 +1192,20 @@ _mapping_get_dev_info(struct mps_softc * continue; } et_entry = &sc->enclosure_table[enc_idx]; + + /* + * If the enclosure already has a start_index, it's been + * mapped, so go to the next Topo change. + */ if (et_entry->start_index != MPS_MAPTABLE_BAD_IDX) continue; + + /* + * If the Expander Handle is 0, the devices are direct + * attached. In that case, the start_index must be just + * after the reserved entries. Otherwise, find space in + * the mapping table for the enclosure's devices. + */ if (!topo_change->exp_handle) { map_idx = sc->num_rsvd_entries; et_entry->start_index = map_idx; @@ -972,8 +1213,26 @@ _mapping_get_dev_info(struct mps_softc * map_idx = _mapping_find_enc_map_space(sc, et_entry); et_entry->start_index = map_idx; + + /* + * If space cannot be found to hold all of the + * enclosure's devices in the mapping table, + * there's no need to continue checking the + * other devices in this event. Set all of the + * phy_details for this event (if the change is + * for an add) as already processed because none + * of these devices can be added to the mapping + * table. + */ if (et_entry->start_index == MPS_MAPTABLE_BAD_IDX) { + mps_dprint(sc, MPS_ERROR | MPS_MAPPING, + "%s: failed to add the enclosure " + "with ID 0x%016jx because there is " + "no free space available in the " + "mapping table for all of the " + "enclosure's devices.\n", __func__, + (uintmax_t)et_entry->enclosure_id); phy_change->is_processed = 1; for (phy_idx = 0; phy_idx < topo_change->num_entries; @@ -989,12 +1248,22 @@ _mapping_get_dev_info(struct mps_softc * break; } } + + /* + * Found space in the mapping table for this enclosure. + * Initialize each mapping table entry for the + * enclosure. + */ + mps_dprint(sc, MPS_MAPPING, "%s: Initialize %d map " + "entries for the enclosure, starting at map index " + " %d.\n", __func__, et_entry->num_slots, map_idx); mt_entry = &sc->mapping_table[map_idx]; for (index = map_idx; index < (et_entry->num_slots + map_idx); index++, mt_entry++) { mt_entry->device_info = MPS_DEV_RESERVED; mt_entry->physical_id = et_entry->enclosure_id; mt_entry->phy_bits = et_entry->phy_bits; + mt_entry->missing_count = 0; } } } @@ -1014,6 +1283,7 @@ _mapping_set_mid_to_eid(struct mps_softc struct dev_mapping_table *mt_entry; u16 slots = et_entry->num_slots, map_idx; u32 start_idx = et_entry->start_index; + if (start_idx != MPS_MAPTABLE_BAD_IDX) { mt_entry = &sc->mapping_table[start_idx]; for (map_idx = 0; map_idx < slots; map_idx++, mt_entry++) @@ -1063,6 +1333,13 @@ _mapping_clear_removed_entries(struct mp } } } + + /* + * When using Enc/Slot mapping, if a new enclosure was added and old + * enclosure space was needed, the enclosure table may now have gaps + * that need to be closed. All enclosure mappings need to be contiguous + * so that space can be reused correctly if available. + */ if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { num_entries = sc->num_enc_table_entries; @@ -1105,8 +1382,8 @@ _mapping_clear_removed_entries(struct mp * @sc: per adapter object * @topo_change: Topology change event entry * - * Search through the topology change event list and updates map table, - * enclosure table and DPM pages for for the newly added devices. + * Search through the topology change event list and update map table, + * enclosure table and DPM pages for the newly added devices. * * Returns nothing */ @@ -1143,30 +1420,41 @@ _mapping_add_new_device(struct mps_softc (sc, topo_change->enc_handle); if (enc_idx == MPS_ENCTABLE_BAD_IDX) { phy_change->is_processed = 1; - printf("%s: failed to add the device with " - "handle 0x%04x because the enclosure is " - "not in the mapping table\n", __func__, + mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because the enclosure is not in " + "the mapping table\n", __func__, phy_change->dev_handle); continue; } + + /* + * If the enclosure's start_index is BAD here, it means + * that there is no room in the mapping table to cover + * all of the devices that could be in the enclosure. + * There's no reason to process any of the devices for + * this enclosure since they can't be mapped. + */ et_entry = &sc->enclosure_table[enc_idx]; if (et_entry->start_index == MPS_MAPTABLE_BAD_IDX) { phy_change->is_processed = 1; - if (!sc->mt_full_retry) { - sc->mt_add_device_failed = 1; - continue; - } - printf("%s: failed to add the device with " - "handle 0x%04x because there is no free " - "space available in the mapping table\n", + mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because there is no free space " + "available in the mapping table\n", __func__, phy_change->dev_handle); continue; } + + /* + * Add this device to the mapping table at the correct + * offset where space was found to map the enclosure. + * Then setup the DPM entry information if being used. + */ map_idx = et_entry->start_index + phy_change->slot - et_entry->start_slot; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 25 19:17:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F3ADD82EC8; Thu, 25 May 2017 19:17:03 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71BFF1846; Thu, 25 May 2017 19:17:03 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 98188493E; Thu, 25 May 2017 19:17:02 +0000 (UTC) Date: Thu, 25 May 2017 19:17:02 +0000 From: Alexey Dokuchaev To: Stephen McConnell Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318895 - in head: share/man/man4 sys/dev/mps Message-ID: <20170525191702.GB27521@FreeBSD.org> References: <201705251914.v4PJEi3l075183@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705251914.v4PJEi3l075183@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 19:17:03 -0000 On Thu, May 25, 2017 at 07:14:44PM +0000, Stephen McConnell wrote: > New Revision: 318895 > URL: https://svnweb.freebsd.org/changeset/base/318895 > > Log: > Fix several problems with mapping code. > > Reviewed by: ken, scottl, asomers, ambrisko, mav > Approved by: ken, mav > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D10878 It would be nice to mention, at least briefly, what were those problems in the commit log. ./danfe From owner-svn-src-all@freebsd.org Thu May 25 19:20:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BDB1D82087; Thu, 25 May 2017 19:20:07 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 551AB1AC1; Thu, 25 May 2017 19:20:07 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PJK6bF075434; Thu, 25 May 2017 19:20:06 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PJK6AL075430; Thu, 25 May 2017 19:20:06 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201705251920.v4PJK6AL075430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Thu, 25 May 2017 19:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318896 - in head: share/man/man4 sys/dev/mpr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 19:20:07 -0000 Author: slm Date: Thu May 25 19:20:06 2017 New Revision: 318896 URL: https://svnweb.freebsd.org/changeset/base/318896 Log: Fix several problems with mapping code. Reviewed by: ken, scottl, asomers, ambrisko, mav Approved by: ken, mav MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10861 Modified: head/share/man/man4/mpr.4 head/sys/dev/mpr/mpr.c head/sys/dev/mpr/mpr_mapping.c head/sys/dev/mpr/mpr_sas.c head/sys/dev/mpr/mpr_sas_lsi.c head/sys/dev/mpr/mpr_user.c head/sys/dev/mpr/mprvar.h Modified: head/share/man/man4/mpr.4 ============================================================================== --- head/share/man/man4/mpr.4 Thu May 25 19:14:44 2017 (r318895) +++ head/share/man/man4/mpr.4 Thu May 25 19:20:06 2017 (r318896) @@ -1,8 +1,8 @@ .\" .\" Copyright (c) 2010 Spectra Logic Corporation .\" Copyright (c) 2014 LSI Corp -.\" Copyright (c) 2017 Avago Technologies -.\" Copyright (c) 2017 Broadcom Ltd. +.\" Copyright (c) 2015-2017 Avago Technologies +.\" Copyright (c) 2015-2017 Broadcom Ltd. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ .\" $Id$ .\" $FreeBSD$ .\" -.Dd May 17, 2017 +.Dd May 25, 2017 .Dt MPR 4 .Os .Sh NAME Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Thu May 25 19:14:44 2017 (r318895) +++ head/sys/dev/mpr/mpr.c Thu May 25 19:20:06 2017 (r318896) @@ -520,7 +520,8 @@ mpr_iocfacts_allocate(struct mpr_softc * */ if (reallocating) { mpr_iocfacts_free(sc); - mprsas_realloc_targets(sc, saved_facts.MaxTargets); + mprsas_realloc_targets(sc, saved_facts.MaxTargets + + saved_facts.MaxVolumes); } /* @@ -1663,6 +1664,7 @@ mpr_attach(struct mpr_softc *sc) mtx_init(&sc->mpr_mtx, "MPR lock", NULL, MTX_DEF); callout_init_mtx(&sc->periodic, &sc->mpr_mtx, 0); + callout_init_mtx(&sc->device_check_callout, &sc->mpr_mtx, 0); TAILQ_INIT(&sc->event_list); timevalclear(&sc->lastfail); @@ -1832,6 +1834,7 @@ mpr_free(struct mpr_softc *sc) mpr_unlock(sc); /* Lock must not be held for this */ callout_drain(&sc->periodic); + callout_drain(&sc->device_check_callout); if (((error = mpr_detach_log(sc)) != 0) || ((error = mpr_detach_sas(sc)) != 0)) Modified: head/sys/dev/mpr/mpr_mapping.c ============================================================================== --- head/sys/dev/mpr/mpr_mapping.c Thu May 25 19:14:44 2017 (r318895) +++ head/sys/dev/mpr/mpr_mapping.c Thu May 25 19:20:06 2017 (r318896) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include /** - * _mapping_clear_entry - Clear a particular mapping entry. + * _mapping_clear_map_entry - Clear a particular mapping entry. * @map_entry: map table entry * * Returns nothing. @@ -73,7 +73,6 @@ _mapping_clear_map_entry(struct dev_mapp map_entry->phy_bits = 0; map_entry->dpm_entry_num = MPR_DPM_BAD_IDX; map_entry->dev_handle = 0; - map_entry->channel = -1; map_entry->id = -1; map_entry->missing_count = 0; map_entry->init_complete = 0; @@ -140,12 +139,15 @@ _mapping_commit_enc_entry(struct mpr_sof dpm_entry->PhysicalBitsMapping = htole32(et_entry->phy_bits); dpm_entry->Reserved1 = 0; + mpr_dprint(sc, MPR_MAPPING, "%s: Writing DPM entry %d for enclosure.\n", + __func__, et_entry->dpm_entry_num); memcpy(&config_page.Entry, (u8 *)dpm_entry, sizeof(Mpi2DriverMap0Entry_t)); if (mpr_config_set_dpm_pg0(sc, &mpi_reply, &config_page, et_entry->dpm_entry_num)) { - printf("%s: write of dpm entry %d for enclosure failed\n", - __func__, et_entry->dpm_entry_num); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Write of DPM " + "entry %d for enclosure failed.\n", __func__, + et_entry->dpm_entry_num); dpm_entry->MappingInformation = le16toh(dpm_entry-> MappingInformation); dpm_entry->DeviceIndex = le16toh(dpm_entry->DeviceIndex); @@ -164,7 +166,7 @@ _mapping_commit_enc_entry(struct mpr_sof /** * _mapping_commit_map_entry - write a particular map table entry in DPM page0. * @sc: per adapter object - * @enc_entry: enclosure table entry + * @mt_entry: mapping table entry * * Returns 0 for success, non-zero for failure. */ @@ -180,6 +182,19 @@ _mapping_commit_map_entry(struct mpr_sof if (!sc->is_dpm_enable) return 0; + /* + * It's possible that this Map Entry points to a BAD DPM index. This + * can happen if the Map Entry is a for a missing device and the DPM + * entry that was being used by this device is now being used by some + * new device. So, check for a BAD DPM index and just return if so. + */ + if (mt_entry->dpm_entry_num == MPR_DPM_BAD_IDX) { + mpr_dprint(sc, MPR_MAPPING, "%s: DPM entry location for target " + "%d is invalid. DPM will not be written.\n", __func__, + mt_entry->id); + return 0; + } + memset(&config_page, 0, sizeof(Mpi2DriverMappingPage0_t)); memcpy(&config_page.Header, (u8 *)sc->dpm_pg0, sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -193,13 +208,16 @@ _mapping_commit_map_entry(struct mpr_sof dpm_entry->MappingInformation = htole16(mt_entry->missing_count); dpm_entry->PhysicalBitsMapping = 0; dpm_entry->Reserved1 = 0; - dpm_entry->MappingInformation = htole16(dpm_entry->MappingInformation); memcpy(&config_page.Entry, (u8 *)dpm_entry, sizeof(Mpi2DriverMap0Entry_t)); + + mpr_dprint(sc, MPR_MAPPING, "%s: Writing DPM entry %d for target %d.\n", + __func__, mt_entry->dpm_entry_num, mt_entry->id); if (mpr_config_set_dpm_pg0(sc, &mpi_reply, &config_page, mt_entry->dpm_entry_num)) { - printf("%s: write of dpm entry %d for device failed\n", - __func__, mt_entry->dpm_entry_num); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Write of DPM " + "entry %d for target %d failed.\n", __func__, + mt_entry->dpm_entry_num, mt_entry->id); dpm_entry->MappingInformation = le16toh(dpm_entry-> MappingInformation); dpm_entry->DeviceIndex = le16toh(dpm_entry->DeviceIndex); @@ -307,7 +325,7 @@ _mapping_get_high_missing_et_idx(struct et_entry = &sc->enclosure_table[enc_idx]; if ((et_entry->missing_count > high_missing_count) && !et_entry->skip_search) { - high_missing_count = et_entry->missing_count; + high_missing_count = et_entry->missing_count; high_idx = enc_idx; } } @@ -326,7 +344,7 @@ _mapping_get_high_missing_et_idx(struct static u32 _mapping_get_high_missing_mt_idx(struct mpr_softc *sc) { - u32 map_idx, high_idx = MPR_ENCTABLE_BAD_IDX; + u32 map_idx, high_idx = MPR_MAPTABLE_BAD_IDX; u8 high_missing_count = 0; u32 start_idx, end_idx, start_idx_ir, end_idx_ir; struct dev_mapping_table *mt_entry; @@ -370,7 +388,7 @@ _mapping_get_ir_mt_idx_from_wwid(struct _mapping_get_ir_maprange(sc, &start_idx, &end_idx); mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) + for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) if (mt_entry->physical_id == wwid) return map_idx; @@ -458,20 +476,31 @@ _mapping_get_free_ir_mt_idx(struct mpr_s u32 high_idx = MPR_MAPTABLE_BAD_IDX; struct dev_mapping_table *mt_entry; + /* + * The IN_USE flag should be clear if the entry is available to use. + * This flag is cleared on initialization and and when a volume is + * deleted. All other times this flag should be set. If, for some + * reason, a free entry cannot be found, look for the entry with the + * highest missing count just in case there is one. + */ _mapping_get_ir_maprange(sc, &start_idx, &end_idx); - mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) + for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) { if (!(mt_entry->device_info & MPR_MAP_IN_USE)) return map_idx; - mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) { if (mt_entry->missing_count > high_missing_count) { high_missing_count = mt_entry->missing_count; high_idx = map_idx; } } + + if (high_idx == MPR_MAPTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Could not find a " + "free entry in the mapping table for a Volume. The mapping " + "table is probably corrupt.\n", __func__); + } + return high_idx; } @@ -494,6 +523,7 @@ _mapping_get_free_mt_idx(struct mpr_soft if (sc->ir_firmware && (volume_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_HIGH_VOLUME_MAPPING)) max_idx -= sc->max_volumes; + for (map_idx = start_idx; map_idx < max_idx; map_idx++, mt_entry++) if (!(mt_entry->device_info & (MPR_MAP_IN_USE | MPR_DEV_RESERVED))) @@ -542,12 +572,66 @@ static u32 _mapping_get_free_dpm_idx(struct mpr_softc *sc) { u16 entry_num; + Mpi2DriverMap0Entry_t *dpm_entry; + u16 current_entry = MPR_DPM_BAD_IDX, missing_cnt, high_missing_cnt = 0; + u64 physical_id; + struct dev_mapping_table *mt_entry; + u32 map_idx; for (entry_num = 0; entry_num < sc->max_dpm_entries; entry_num++) { - if (!sc->dpm_entry_used[entry_num]) - return entry_num; + dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); + dpm_entry += entry_num; + missing_cnt = dpm_entry->MappingInformation & + MPI2_DRVMAP0_MAPINFO_MISSING_MASK; + + /* + * If entry is used and not missing, then this entry can't be + * used. Look at next one. + */ + if (sc->dpm_entry_used[entry_num] && !missing_cnt) + continue; + + /* + * If this entry is not used at all, then the missing count + * doesn't matter. Just use this one. Otherwise, keep looking + * and make sure the entry with the highest missing count is + * used. + */ + if (!sc->dpm_entry_used[entry_num]) { + current_entry = entry_num; + break; + } + if ((current_entry == MPR_DPM_BAD_IDX) || + (missing_cnt > high_missing_cnt)) { + current_entry = entry_num; + high_missing_cnt = missing_cnt; + } } - return MPR_DPM_BAD_IDX; + + /* + * If an entry has been found to use and it's already marked as used + * it means that some device was already using this entry but it's + * missing, and that means that the connection between the missing + * device's DPM entry and the mapping table needs to be cleared. To do + * this, use the Physical ID of the old device still in the DPM entry + * to find its mapping table entry, then mark its DPM entry as BAD. + */ + if ((current_entry != MPR_DPM_BAD_IDX) && + sc->dpm_entry_used[current_entry]) { + dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); + dpm_entry += current_entry; + physical_id = dpm_entry->PhysicalIdentifier.High; + physical_id = (physical_id << 32) | + dpm_entry->PhysicalIdentifier.Low; + map_idx = _mapping_get_mt_idx_from_id(sc, physical_id); + if (map_idx != MPR_MAPTABLE_BAD_IDX) { + mt_entry = &sc->mapping_table[map_idx]; + mt_entry->dpm_entry_num = MPR_DPM_BAD_IDX; + } + } + return current_entry; } /** @@ -566,40 +650,57 @@ _mapping_update_ir_missing_cnt(struct mp Mpi2EventIrConfigElement_t *element, u64 wwid) { struct dev_mapping_table *mt_entry; - u8 missing_cnt, reason = element->ReasonCode; + u8 missing_cnt, reason = element->ReasonCode, update_dpm = 1; u16 dpm_idx; Mpi2DriverMap0Entry_t *dpm_entry; - if (!sc->is_dpm_enable) - return; + /* + * Depending on the reason code, update the missing count. Always set + * the init_complete flag when here, so just do it first. That flag is + * used for volumes to make sure that the DPM entry has been updated. + * When a volume is deleted, clear the map entry's IN_USE flag so that + * the entry can be used again if another volume is created. Also clear + * its dev_handle entry so that other functions can't find this volume + * by the handle, since it's not defined any longer. + */ mt_entry = &sc->mapping_table[map_idx]; - if (reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) { - mt_entry->missing_count = 0; - } else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED) { + mt_entry->init_complete = 1; + if ((reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) || + (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED)) { mt_entry->missing_count = 0; - mt_entry->init_complete = 0; - } else if ((reason == MPI2_EVENT_IR_CHANGE_RC_REMOVED) || - (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED)) { - if (!mt_entry->init_complete) { - if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) - mt_entry->missing_count++; - else - mt_entry->init_complete = 1; - } - if (!mt_entry->missing_count) + } else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) { + if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) mt_entry->missing_count++; + + mt_entry->device_info &= ~MPR_MAP_IN_USE; mt_entry->dev_handle = 0; } + /* + * If persistent mapping is enabled, update the DPM with the new missing + * count for the volume. If the DPM index is bad, get a free one. If + * it's bad for a volume that's being deleted do nothing because that + * volume doesn't have a DPM entry. + */ + if (!sc->is_dpm_enable) + return; dpm_idx = mt_entry->dpm_entry_num; if (dpm_idx == MPR_DPM_BAD_IDX) { - if ((reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) || - (reason == MPI2_EVENT_IR_CHANGE_RC_REMOVED)) - dpm_idx = _mapping_get_dpm_idx_from_id(sc, - mt_entry->physical_id, 0); - else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) + if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) + { + mpr_dprint(sc, MPR_MAPPING, "%s: Volume being deleted " + "is not in DPM so DPM missing count will not be " + "updated.\n", __func__); return; + } } + if (dpm_idx == MPR_DPM_BAD_IDX) + dpm_idx = _mapping_get_free_dpm_idx(sc); + + /* + * Got the DPM entry for the volume or found a free DPM entry if this is + * a new volume. Check if the current information is outdated. + */ if (dpm_idx != MPR_DPM_BAD_IDX) { dpm_entry = (Mpi2DriverMap0Entry_t *)((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -607,17 +708,24 @@ _mapping_update_ir_missing_cnt(struct mp missing_cnt = dpm_entry->MappingInformation & MPI2_DRVMAP0_MAPINFO_MISSING_MASK; if ((mt_entry->physical_id == - le64toh((u64)dpm_entry->PhysicalIdentifier.High | - dpm_entry->PhysicalIdentifier.Low)) && (missing_cnt == - mt_entry->missing_count)) - mt_entry->init_complete = 1; - } else { - dpm_idx = _mapping_get_free_dpm_idx(sc); - mt_entry->init_complete = 0; + le64toh(((u64)dpm_entry->PhysicalIdentifier.High << 32) | + (u64)dpm_entry->PhysicalIdentifier.Low)) && (missing_cnt == + mt_entry->missing_count)) { + mpr_dprint(sc, MPR_MAPPING, "%s: DPM entry for volume " + "with target ID %d does not require an update.\n", + __func__, mt_entry->id); + update_dpm = 0; + } } - if ((dpm_idx != MPR_DPM_BAD_IDX) && !mt_entry->init_complete) { - mt_entry->init_complete = 1; + /* + * Update the volume's persistent info if it's new or the ID or missing + * count has changed. If a good DPM index has not been found by now, + * there is no space left in the DPM table. + */ + if ((dpm_idx != MPR_DPM_BAD_IDX) && update_dpm) { + mpr_dprint(sc, MPR_MAPPING, "%s: Update DPM entry for volume " + "with target ID %d.\n", __func__, mt_entry->id); mt_entry->dpm_entry_num = dpm_idx; dpm_entry = (Mpi2DriverMap0Entry_t *)((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -633,44 +741,46 @@ _mapping_update_ir_missing_cnt(struct mp sc->dpm_flush_entry[dpm_idx] = 1; sc->dpm_entry_used[dpm_idx] = 1; } else if (dpm_idx == MPR_DPM_BAD_IDX) { - printf("%s: no space to add entry in DPM table\n", __func__); - mt_entry->init_complete = 1; + mpr_dprint(sc, MPR_INFO | MPR_MAPPING, "%s: No space to add an " + "entry in the DPM table for volume with target ID %d.\n", + __func__, mt_entry->id); } } /** - * _mapping_add_to_removal_table - mark an entry for removal + * _mapping_add_to_removal_table - add DPM index to the removal table * @sc: per adapter object - * @handle: Handle of enclosures/device/volume + * @dpm_idx: Index of DPM entry to remove * - * Adds the handle or DPM entry number in removal table. + * Adds a DPM entry number to the removal table. * * Returns nothing. */ static void -_mapping_add_to_removal_table(struct mpr_softc *sc, u16 handle, - u16 dpm_idx) +_mapping_add_to_removal_table(struct mpr_softc *sc, u16 dpm_idx) { struct map_removal_table *remove_entry; u32 i; - u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); - remove_entry = sc->removal_table; + /* + * This is only used to remove entries from the DPM in the controller. + * If DPM is not enabled, just return. + */ + if (!sc->is_dpm_enable) + return; + /* + * Find the first available removal_table entry and add the new entry + * there. + */ + remove_entry = sc->removal_table; for (i = 0; i < sc->max_devices; i++, remove_entry++) { - if (remove_entry->dev_handle || remove_entry->dpm_entry_num != - MPR_DPM_BAD_IDX) + if (remove_entry->dpm_entry_num != MPR_DPM_BAD_IDX) continue; - if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { - if (dpm_idx) - remove_entry->dpm_entry_num = dpm_idx; - if (remove_entry->dpm_entry_num == MPR_DPM_BAD_IDX) - remove_entry->dev_handle = handle; - } else if ((ioc_pg8_flags & - MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) - remove_entry->dev_handle = handle; + + mpr_dprint(sc, MPR_MAPPING, "%s: Adding DPM entry %d to table " + "for removal.\n", __func__, dpm_idx); + remove_entry->dpm_entry_num = dpm_idx; break; } @@ -683,8 +793,11 @@ _mapping_add_to_removal_table(struct mpr * * Increment the missing count in the mapping table for a SAS, SATA, or PCIe * device that is not responding. If Persitent Mapping is used, increment the - * DPM entry as well. Also, add this device to the removal table for possible - * removal if a new device is added. + * DPM entry as well. Currently, this function is only called if the target + * goes missing, so after initialization has completed. This means that the + * missing count can only go from 0 to 1 here. The missing count is incremented + * during initialization as well, so that's where a target's missing count can + * go past 1. * * Returns nothing. */ @@ -696,33 +809,40 @@ _mapping_inc_missing_count(struct mpr_so Mpi2DriverMap0Entry_t *dpm_entry; if (map_idx == MPR_MAPTABLE_BAD_IDX) { - mpr_dprint(sc, MPR_INFO, "%s: device is already removed from " - "mapping table\n", __func__); + mpr_dprint(sc, MPR_INFO | MPR_MAPPING, "%s: device is already " + "removed from mapping table\n", __func__); return; } mt_entry = &sc->mapping_table[map_idx]; - if (!mt_entry->init_complete) { - if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) - mt_entry->missing_count++; - else - mt_entry->init_complete = 1; - } - if (!mt_entry->missing_count) + if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) mt_entry->missing_count++; - _mapping_add_to_removal_table(sc, mt_entry->dev_handle, 0); - mt_entry->dev_handle = 0; + /* + * When using Enc/Slot mapping, when a device is removed, it's mapping + * table information should be cleared. Otherwise, the target ID will + * be incorrect if this same device is re-added to a different slot. + */ + if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == + MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + _mapping_clear_map_entry(mt_entry); + } + + /* + * When using device mapping, update the missing count in the DPM entry, + * but only if the missing count has changed. + */ if (((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) && - sc->is_dpm_enable && !mt_entry->init_complete && + sc->is_dpm_enable && mt_entry->dpm_entry_num != MPR_DPM_BAD_IDX) { dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); dpm_entry += mt_entry->dpm_entry_num; - dpm_entry->MappingInformation = mt_entry->missing_count; - sc->dpm_flush_entry[mt_entry->dpm_entry_num] = 1; + if (dpm_entry->MappingInformation != mt_entry->missing_count) { + dpm_entry->MappingInformation = mt_entry->missing_count; + sc->dpm_flush_entry[mt_entry->dpm_entry_num] = 1; + } } - mt_entry->init_complete = 1; } /** @@ -814,6 +934,10 @@ _mapping_find_enc_map_space(struct mpr_s vol_mapping_flags = le16toh(sc->ioc_pg8.IRVolumeMappingFlags) & MPI2_IOCPAGE8_IRFLAGS_MASK_VOLUME_MAPPING_MODE; + /* + * The end of the mapping table depends on where volumes are kept, if + * IR is enabled. + */ if (!sc->ir_firmware) end_of_table = sc->max_devices; else if (vol_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_LOW_VOLUME_MAPPING) @@ -821,6 +945,17 @@ _mapping_find_enc_map_space(struct mpr_s else end_of_table = sc->max_devices - sc->max_volumes; + /* + * The skip_count is the number of entries that are reserved at the + * beginning of the mapping table. But, it does not include the number + * of Physical IDs that are reserved for direct attached devices. Look + * through the mapping table after these reserved entries to see if + * the devices for this enclosure are already mapped. The PHY bit check + * is used to make sure that at least one PHY bit is common between the + * enclosure and the device that is already mapped. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Looking for space in the mapping " + "table for added enclosure.\n", __func__); for (map_idx = (max_num_phy_ids + skip_count); map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; @@ -830,11 +965,21 @@ _mapping_find_enc_map_space(struct mpr_s num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; + mpr_dprint(sc, MPR_MAPPING, "%s: Found space " + "in the mapping for enclosure at map index " + "%d.\n", __func__, start_idx); return start_idx; } } else num_found = 0; } + + /* + * If the enclosure's devices are not mapped already, look for + * contiguous entries in the mapping table that are not reserved. If + * enough entries are found, return the starting index for that space. + */ + num_found = 0; for (map_idx = (max_num_phy_ids + skip_count); map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; @@ -842,40 +987,91 @@ _mapping_find_enc_map_space(struct mpr_s num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; + mpr_dprint(sc, MPR_MAPPING, "%s: Found space " + "in the mapping for enclosure at map index " + "%d.\n", __func__, start_idx); return start_idx; } } else num_found = 0; } + /* + * If here, it means that not enough space in the mapping table was + * found to support this enclosure, so go through the enclosure table to + * see if any enclosure entries have a missing count. If so, get the + * enclosure with the highest missing count and check it to see if there + * is enough space for the new enclosure. + */ while (!done_flag) { enc_idx = _mapping_get_high_missing_et_idx(sc); - if (enc_idx == MPR_ENCTABLE_BAD_IDX) + if (enc_idx == MPR_ENCTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_MAPPING, "%s: Not enough space was " + "found in the mapping for the added enclosure.\n", + __func__); return MPR_MAPTABLE_BAD_IDX; + } + + /* + * Found a missing enclosure. Set the skip_search flag so this + * enclosure is not checked again for a high missing count if + * the loop continues. This way, all missing enclosures can + * have their space added together to find enough space in the + * mapping table for the added enclosure. The space must be + * contiguous. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Space from a missing " + "enclosure was found.\n", __func__); enc_entry = &sc->enclosure_table[enc_idx]; - /*VSP FIXME*/ enc_entry->skip_search = 1; + + /* + * Unmark all of the missing enclosure's device's reserved + * space. These will be remarked as reserved if this missing + * enclosure's space is not used. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Clear the reserved flag for " + "all of the map entries for the enclosure.\n", __func__); mt_entry = &sc->mapping_table[enc_entry->start_index]; for (map_idx = enc_entry->start_index; map_idx < (enc_entry->start_index + enc_entry->num_slots); map_idx++, mt_entry++) - mt_entry->device_info &= ~MPR_DEV_RESERVED; + mt_entry->device_info &= ~MPR_DEV_RESERVED; + + /* + * Now that space has been unreserved, check again to see if + * enough space is available for the new enclosure. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Check if new mapping space is " + "enough for the new enclosure.\n", __func__); found_space = 0; - for (map_idx = (max_num_phy_ids + - skip_count); map_idx < end_of_table; map_idx++) { + num_found = 0; + for (map_idx = (max_num_phy_ids + skip_count); + map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; if (!(mt_entry->device_info & MPR_DEV_RESERVED)) { num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; found_space = 1; + break; } } else num_found = 0; } - if (!found_space) continue; + + /* + * If enough space was found, all of the missing enclosures that + * will be used for the new enclosure must be added to the + * removal table. Then all mappings for the enclosure's devices + * and for the enclosure itself need to be cleared. There may be + * more than one enclosure to add to the removal table and + * clear. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Found space in the mapping " + "for enclosure at map index %d.\n", __func__, start_idx); for (map_idx = start_idx; map_idx < (start_idx + num_found); map_idx++) { enc_entry = sc->enclosure_table; @@ -886,26 +1082,38 @@ _mapping_find_enc_map_space(struct mpr_s enc_entry->num_slots)) continue; if (!enc_entry->removal_flag) { + mpr_dprint(sc, MPR_MAPPING, "%s: " + "Enclosure %d will be removed from " + "the mapping table.\n", __func__, + enc_idx); enc_entry->removal_flag = 1; - _mapping_add_to_removal_table(sc, 0, + _mapping_add_to_removal_table(sc, enc_entry->dpm_entry_num); } mt_entry = &sc->mapping_table[map_idx]; - if (mt_entry->device_info & - MPR_MAP_IN_USE) { - _mapping_add_to_removal_table(sc, - mt_entry->dev_handle, 0); - _mapping_clear_map_entry(mt_entry); - } + _mapping_clear_map_entry(mt_entry); if (map_idx == (enc_entry->start_index + enc_entry->num_slots - 1)) _mapping_clear_enc_entry(et_entry); } } + + /* + * During the search for space for this enclosure, some entries + * in the mapping table may have been unreserved. Go back and + * change all of these to reserved again. Only the enclosures + * with the removal_flag set should be left as unreserved. The + * skip_search flag needs to be cleared as well so that the + * enclosure's space will be looked at the next time space is + * needed. + */ enc_entry = sc->enclosure_table; for (enc_idx = 0; enc_idx < sc->num_enc_table_entries; enc_idx++, enc_entry++) { if (!enc_entry->removal_flag) { + mpr_dprint(sc, MPR_MAPPING, "%s: Reset the " + "reserved flag for all of the map entries " + "for enclosure %d.\n", __func__, enc_idx); mt_entry = &sc->mapping_table[enc_entry-> start_index]; for (map_idx = enc_entry->start_index; map_idx < @@ -939,7 +1147,7 @@ _mapping_get_dev_info(struct mpr_softc * u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); Mpi2ConfigReply_t mpi_reply; Mpi2SasDevicePage0_t sas_device_pg0; - u8 entry, enc_idx, phy_idx, sata_end_device; + u8 entry, enc_idx, phy_idx; u32 map_idx, index, device_info; struct _map_phy_change *phy_change, *tmp_phy_change; uint64_t sas_address; @@ -953,6 +1161,7 @@ _mapping_get_dev_info(struct mpr_softc * if (phy_change->is_processed || !phy_change->dev_handle || phy_change->reason != MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED) continue; + if (mpr_config_get_sas_device_pg0(sc, &mpi_reply, &sas_device_pg0, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, phy_change->dev_handle)) { @@ -966,13 +1175,11 @@ _mapping_get_dev_info(struct mpr_softc * * when the system is shutdown. */ device_info = le32toh(sas_device_pg0.DeviceInfo); - sas_address = sas_device_pg0.SASAddress.High; + sas_address = le32toh(sas_device_pg0.SASAddress.High); sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; - sata_end_device = 0; + le32toh(sas_device_pg0.SASAddress.Low); if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { - sata_end_device = 1; rc = mprsas_get_sas_address_for_sata_disk(sc, &sas_address, phy_change->dev_handle, device_info, &phy_change->is_SATA_SSD); @@ -991,16 +1198,27 @@ _mapping_get_dev_info(struct mpr_softc * phy_change->slot = le16toh(sas_device_pg0.Slot); phy_change->device_info = device_info; + /* + * When using Enc/Slot mapping, if this device is an enclosure + * make sure that all of its slots can fit into the mapping + * table. + */ if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + /* + * The enclosure should already be in the enclosure + * table due to the Enclosure Add event. If not, just + * continue, nothing can be done. + */ enc_idx = _mapping_get_enc_idx_from_handle(sc, topo_change->enc_handle); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { phy_change->is_processed = 1; - mpr_dprint(sc, MPR_MAPPING, "%s: failed to add " - "the device with handle 0x%04x because the " - "enclosure is not in the mapping table\n", - __func__, phy_change->dev_handle); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because the enclosure is not in " + "the mapping table\n", __func__, + phy_change->dev_handle); continue; } if (!((phy_change->device_info & @@ -1013,8 +1231,20 @@ _mapping_get_dev_info(struct mpr_softc * continue; } et_entry = &sc->enclosure_table[enc_idx]; + + /* + * If the enclosure already has a start_index, it's been + * mapped, so go to the next Topo change. + */ if (et_entry->start_index != MPR_MAPTABLE_BAD_IDX) continue; + + /* + * If the Expander Handle is 0, the devices are direct + * attached. In that case, the start_index must be just + * after the reserved entries. Otherwise, find space in + * the mapping table for the enclosure's devices. + */ if (!topo_change->exp_handle) { map_idx = sc->num_rsvd_entries; et_entry->start_index = map_idx; @@ -1022,8 +1252,26 @@ _mapping_get_dev_info(struct mpr_softc * map_idx = _mapping_find_enc_map_space(sc, et_entry); et_entry->start_index = map_idx; + + /* + * If space cannot be found to hold all of the + * enclosure's devices in the mapping table, + * there's no need to continue checking the + * other devices in this event. Set all of the + * phy_details for this event (if the change is + * for an add) as already processed because none + * of these devices can be added to the mapping + * table. + */ if (et_entry->start_index == MPR_MAPTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, + "%s: failed to add the enclosure " + "with ID 0x%016jx because there is " + "no free space available in the " + "mapping table for all of the " + "enclosure's devices.\n", __func__, + (uintmax_t)et_entry->enclosure_id); phy_change->is_processed = 1; for (phy_idx = 0; phy_idx < topo_change->num_entries; @@ -1040,7 +1288,14 @@ _mapping_get_dev_info(struct mpr_softc * } } - /* Found space in enclosure for mapping entry */ + /* + * Found space in the mapping table for this enclosure. + * Initialize each mapping table entry for the + * enclosure. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Initialize %d map " + "entries for the enclosure, starting at map index " + " %d.\n", __func__, et_entry->num_slots, map_idx); mt_entry = &sc->mapping_table[map_idx]; for (index = map_idx; index < (et_entry->num_slots + map_idx); index++, mt_entry++) { @@ -1098,16 +1353,27 @@ _mapping_get_pcie_dev_info(struct mpr_so port_change->slot = le16toh(pcie_device_pg0.Slot); port_change->device_info = le32toh(pcie_device_pg0.DeviceInfo); + /* + * When using Enc/Slot mapping, if this device is an enclosure + * make sure that all of its slots can fit into the mapping + * table. + */ if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + /* + * The enclosure should already be in the enclosure + * table due to the Enclosure Add event. If not, just + * continue, nothing can be done. + */ enc_idx = _mapping_get_enc_idx_from_handle(sc, topo_change->enc_handle); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { port_change->is_processed = 1; - mpr_dprint(sc, MPR_MAPPING, "%s: failed to add " - "the device with handle 0x%04x because the " - "enclosure is not in the mapping table\n", - __func__, port_change->dev_handle); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because the enclosure is not in " + "the mapping table\n", __func__, + port_change->dev_handle); continue; } if (!(port_change->device_info & @@ -1116,8 +1382,20 @@ _mapping_get_pcie_dev_info(struct mpr_so continue; } et_entry = &sc->enclosure_table[enc_idx]; + + /* + * If the enclosure already has a start_index, it's been + * mapped, so go to the next Topo change. + */ if (et_entry->start_index != MPR_MAPTABLE_BAD_IDX) continue; + + /* + * If the Switch Handle is 0, the devices are direct + * attached. In that case, the start_index must be just + * after the reserved entries. Otherwise, find space in + * the mapping table for the enclosure's devices. + */ if (!topo_change->switch_dev_handle) { map_idx = sc->num_rsvd_entries; et_entry->start_index = map_idx; @@ -1125,8 +1403,26 @@ _mapping_get_pcie_dev_info(struct mpr_so map_idx = _mapping_find_enc_map_space(sc, et_entry); et_entry->start_index = map_idx; + + /* + * If space cannot be found to hold all of the + * enclosure's devices in the mapping table, + * there's no need to continue checking the + * other devices in this event. Set all of the + * port_details for this event (if the change is + * for an add) as already processed because none + * of these devices can be added to the mapping + * table. + */ if (et_entry->start_index == MPR_MAPTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, + "%s: failed to add the enclosure " + "with ID 0x%016jx because there is " + "no free space available in the " + "mapping table for all of the " + "enclosure's devices.\n", __func__, + (uintmax_t)et_entry->enclosure_id); port_change->is_processed = 1; for (port_idx = 0; port_idx < topo_change->num_entries; @@ -1143,7 +1439,14 @@ _mapping_get_pcie_dev_info(struct mpr_so } } - /* Found space in enclosure for mapping entry */ + /* + * Found space in the mapping table for this enclosure. + * Initialize each mapping table entry for the + * enclosure. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Initialize %d map " + "entries for the enclosure, starting at map index " + " %d.\n", __func__, et_entry->num_slots, map_idx); mt_entry = &sc->mapping_table[map_idx]; for (index = map_idx; index < (et_entry->num_slots + map_idx); index++, mt_entry++) { @@ -1170,6 +1473,7 @@ _mapping_set_mid_to_eid(struct mpr_softc struct dev_mapping_table *mt_entry; u16 slots = et_entry->num_slots, map_idx; u32 start_idx = et_entry->start_index; + if (start_idx != MPR_MAPTABLE_BAD_IDX) { mt_entry = &sc->mapping_table[start_idx]; for (map_idx = 0; map_idx < slots; map_idx++, mt_entry++) @@ -1219,6 +1523,13 @@ _mapping_clear_removed_entries(struct mp } } } + + /* + * When using Enc/Slot mapping, if a new enclosure was added and old + * enclosure space was needed, the enclosure table may now have gaps + * that need to be closed. All enclosure mappings need to be contiguous + * so that space can be reused correctly if available. + */ if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { num_entries = sc->num_enc_table_entries; @@ -1299,31 +1610,41 @@ _mapping_add_new_device(struct mpr_softc (sc, topo_change->enc_handle); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { phy_change->is_processed = 1; - mpr_dprint(sc, MPR_ERROR, "%s: failed to add " - "the device with handle 0x%04x because the " - "enclosure is not in the mapping table\n", - __func__, phy_change->dev_handle); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because the enclosure is not in " + "the mapping table\n", __func__, + phy_change->dev_handle); continue; } + + /* + * If the enclosure's start_index is BAD here, it means + * that there is no room in the mapping table to cover + * all of the devices that could be in the enclosure. + * There's no reason to process any of the devices for + * this enclosure since they can't be mapped. + */ et_entry = &sc->enclosure_table[enc_idx]; if (et_entry->start_index == MPR_MAPTABLE_BAD_IDX) { phy_change->is_processed = 1; - if (!sc->mt_full_retry) { - sc->mt_add_device_failed = 1; - continue; - } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 25 19:38:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6988FD824AD; Thu, 25 May 2017 19:38:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21006138B; Thu, 25 May 2017 19:38:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PJchQo083565; Thu, 25 May 2017 19:38:43 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PJccxA083522; Thu, 25 May 2017 19:38:38 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705251938.v4PJccxA083522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 25 May 2017 19:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318897 - in vendor-crypto/openssl/dist: . apps crypto crypto/aes crypto/aes/asm crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/comp crypto/conf crypto/des crypto/dh crypto/ec cr... X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 19:38:44 -0000 Author: jkim Date: Thu May 25 19:38:38 2017 New Revision: 318897 URL: https://svnweb.freebsd.org/changeset/base/318897 Log: Import OpenSSL 1.0.2l. Added: vendor-crypto/openssl/dist/doc/man3/ vendor-crypto/openssl/dist/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/Configure vendor-crypto/openssl/dist/FREEBSD-Xlist vendor-crypto/openssl/dist/FREEBSD-upgrade vendor-crypto/openssl/dist/LICENSE vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/Makefile.org vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/apps/ca.c vendor-crypto/openssl/dist/apps/dhparam.c vendor-crypto/openssl/dist/apps/enc.c vendor-crypto/openssl/dist/apps/engine.c vendor-crypto/openssl/dist/apps/pkeyutl.c vendor-crypto/openssl/dist/apps/prime.c vendor-crypto/openssl/dist/apps/progs.h vendor-crypto/openssl/dist/apps/progs.pl vendor-crypto/openssl/dist/apps/req.c vendor-crypto/openssl/dist/apps/s_client.c vendor-crypto/openssl/dist/apps/s_server.c vendor-crypto/openssl/dist/apps/srp.c vendor-crypto/openssl/dist/appveyor.yml vendor-crypto/openssl/dist/config vendor-crypto/openssl/dist/crypto/aes/Makefile vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha256-x86_64.pl vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-armv7.pl vendor-crypto/openssl/dist/crypto/asn1/a_bitstr.c vendor-crypto/openssl/dist/crypto/asn1/a_digest.c vendor-crypto/openssl/dist/crypto/asn1/a_gentm.c vendor-crypto/openssl/dist/crypto/asn1/a_strnid.c vendor-crypto/openssl/dist/crypto/asn1/a_time.c vendor-crypto/openssl/dist/crypto/asn1/a_utctm.c vendor-crypto/openssl/dist/crypto/asn1/f_enum.c vendor-crypto/openssl/dist/crypto/asn1/f_int.c vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c vendor-crypto/openssl/dist/crypto/asn1/tasn_new.c vendor-crypto/openssl/dist/crypto/asn1/x_long.c vendor-crypto/openssl/dist/crypto/asn1/x_name.c vendor-crypto/openssl/dist/crypto/bio/b_print.c vendor-crypto/openssl/dist/crypto/bio/bio_cb.c vendor-crypto/openssl/dist/crypto/bio/bss_file.c vendor-crypto/openssl/dist/crypto/bn/Makefile vendor-crypto/openssl/dist/crypto/bn/asm/sparcv9-mont.pl vendor-crypto/openssl/dist/crypto/bn/bn_prime.c vendor-crypto/openssl/dist/crypto/bn/bn_prime.h vendor-crypto/openssl/dist/crypto/bn/bn_prime.pl vendor-crypto/openssl/dist/crypto/bn/bn_print.c vendor-crypto/openssl/dist/crypto/comp/c_rle.c vendor-crypto/openssl/dist/crypto/conf/conf.h vendor-crypto/openssl/dist/crypto/conf/conf_def.c vendor-crypto/openssl/dist/crypto/conf/conf_err.c vendor-crypto/openssl/dist/crypto/des/Makefile vendor-crypto/openssl/dist/crypto/des/set_key.c vendor-crypto/openssl/dist/crypto/dh/dh.h vendor-crypto/openssl/dist/crypto/ec/ec_ameth.c vendor-crypto/openssl/dist/crypto/ec/ec_asn1.c vendor-crypto/openssl/dist/crypto/ec/ec_mult.c vendor-crypto/openssl/dist/crypto/ec/eck_prn.c vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c vendor-crypto/openssl/dist/crypto/err/err.c vendor-crypto/openssl/dist/crypto/err/err.h vendor-crypto/openssl/dist/crypto/evp/e_aes.c vendor-crypto/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha1.c vendor-crypto/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha256.c vendor-crypto/openssl/dist/crypto/evp/e_des3.c vendor-crypto/openssl/dist/crypto/evp/evp_enc.c vendor-crypto/openssl/dist/crypto/evp/pmeth_lib.c vendor-crypto/openssl/dist/crypto/ex_data.c vendor-crypto/openssl/dist/crypto/hmac/hm_pmeth.c vendor-crypto/openssl/dist/crypto/md5/Makefile vendor-crypto/openssl/dist/crypto/mem.c vendor-crypto/openssl/dist/crypto/modes/Makefile vendor-crypto/openssl/dist/crypto/o_dir.c vendor-crypto/openssl/dist/crypto/o_time.c vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/perlasm/x86_64-xlate.pl vendor-crypto/openssl/dist/crypto/pkcs12/p12_mutl.c vendor-crypto/openssl/dist/crypto/ppccap.c vendor-crypto/openssl/dist/crypto/rand/md_rand.c vendor-crypto/openssl/dist/crypto/rc4/Makefile vendor-crypto/openssl/dist/crypto/rsa/rsa_pmeth.c vendor-crypto/openssl/dist/crypto/rsa/rsa_pss.c vendor-crypto/openssl/dist/crypto/sha/Makefile vendor-crypto/openssl/dist/crypto/srp/srp_vfy.c vendor-crypto/openssl/dist/crypto/txt_db/txt_db.c vendor-crypto/openssl/dist/crypto/ui/ui_lib.c vendor-crypto/openssl/dist/crypto/x509/x509_lu.c vendor-crypto/openssl/dist/crypto/x509v3/v3_alt.c vendor-crypto/openssl/dist/crypto/x509v3/v3_cpols.c vendor-crypto/openssl/dist/crypto/x509v3/v3_info.c vendor-crypto/openssl/dist/crypto/x509v3/v3_purp.c vendor-crypto/openssl/dist/crypto/x86_64cpuid.pl vendor-crypto/openssl/dist/crypto/x86cpuid.pl vendor-crypto/openssl/dist/doc/apps/ciphers.pod vendor-crypto/openssl/dist/doc/apps/config.pod vendor-crypto/openssl/dist/doc/apps/genrsa.pod vendor-crypto/openssl/dist/doc/apps/req.pod vendor-crypto/openssl/dist/doc/apps/s_client.pod vendor-crypto/openssl/dist/doc/apps/s_server.pod vendor-crypto/openssl/dist/doc/crypto/EVP_EncryptInit.pod vendor-crypto/openssl/dist/doc/crypto/RSA_private_encrypt.pod vendor-crypto/openssl/dist/doc/crypto/RSA_public_encrypt.pod vendor-crypto/openssl/dist/doc/crypto/X509_STORE_CTX_new.pod vendor-crypto/openssl/dist/doc/crypto/des.pod vendor-crypto/openssl/dist/ssl/d1_both.c vendor-crypto/openssl/dist/ssl/d1_clnt.c vendor-crypto/openssl/dist/ssl/d1_pkt.c vendor-crypto/openssl/dist/ssl/d1_srvr.c vendor-crypto/openssl/dist/ssl/s23_clnt.c vendor-crypto/openssl/dist/ssl/s23_srvr.c vendor-crypto/openssl/dist/ssl/s3_clnt.c vendor-crypto/openssl/dist/ssl/s3_enc.c vendor-crypto/openssl/dist/ssl/s3_lib.c vendor-crypto/openssl/dist/ssl/s3_pkt.c vendor-crypto/openssl/dist/ssl/s3_srvr.c vendor-crypto/openssl/dist/ssl/ssl_cert.c vendor-crypto/openssl/dist/ssl/ssl_ciph.c vendor-crypto/openssl/dist/ssl/ssl_lib.c vendor-crypto/openssl/dist/ssl/ssl_locl.h vendor-crypto/openssl/dist/ssl/ssl_rsa.c vendor-crypto/openssl/dist/ssl/ssl_sess.c vendor-crypto/openssl/dist/ssl/ssltest.c vendor-crypto/openssl/dist/ssl/t1_ext.c vendor-crypto/openssl/dist/ssl/t1_lib.c vendor-crypto/openssl/dist/util/domd vendor-crypto/openssl/dist/util/mk1mf.pl Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/CHANGES Thu May 25 19:38:38 2017 (r318897) @@ -2,6 +2,12 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2k and 1.0.2l [25 May 2017] + + *) Have 'config' recognise 64-bit mingw and choose 'mingw64' as the target + platform rather than 'mingw'. + [Richard Levitte] + Changes between 1.0.2j and 1.0.2k [26 Jan 2017] *) Truncated packet could crash via OOB read Modified: vendor-crypto/openssl/dist/Configure ============================================================================== --- vendor-crypto/openssl/dist/Configure Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/Configure Thu May 25 19:38:38 2017 (r318897) @@ -109,7 +109,7 @@ my $usage="Usage: Configure [no- # Minimum warning options... any contributions to OpenSSL should at least get # past these. -my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; +my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wundef -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; # TODO(openssl-team): fix problems and investigate if (at least) the following # warnings can also be enabled: @@ -2041,12 +2041,13 @@ EOF close(OUT); } else { my $make_command = "$make PERL=\'$perl\'"; - my $make_targets = ""; - $make_targets .= " links" if $symlink; - $make_targets .= " depend" if $depflags ne $default_depflags && $make_depend; - $make_targets .= " gentests" if $symlink; - (system $make_command.$make_targets) == 0 or exit $? - if $make_targets ne ""; + my @make_targets = (); + push @make_targets, "links" if $symlink; + push @make_targets, "depend" if $depflags ne $default_depflags && $make_depend; + push @make_targets, "gentests" if $symlink; + foreach my $make_target (@make_targets) { + (system "$make_command $make_target") == 0 or exit $?; + } if ( $perl =~ m@^/@) { &dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";', '^my \$prefix;$', 'my $prefix = "' . $prefix . '";'); &dofile("apps/CA.pl",$perl,'^#!/', '#!%s'); @@ -2056,8 +2057,8 @@ EOF &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s'); } if ($depflags ne $default_depflags && !$make_depend) { - $warn_make_depend++; - } + $warn_make_depend++; + } } # create the ms/version32.rc file if needed Modified: vendor-crypto/openssl/dist/FREEBSD-Xlist ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-Xlist Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/FREEBSD-Xlist Thu May 25 19:38:38 2017 (r318897) @@ -57,9 +57,11 @@ openssl-*/crypto/rand/rand_vms.c openssl-*/crypto/rand/rand_win.c openssl-*/crypto/threads/solaris.sh openssl-*/demos +openssl-*/doc-nits openssl-*/engines/*.ec openssl-*/engines/*.opt openssl-*/engines/ccgost/e_gost_err.proto +openssl-*/fuzz openssl-*/include openssl-*/ms openssl-*/op Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-upgrade Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/FREEBSD-upgrade Thu May 25 19:38:38 2017 (r318897) @@ -11,8 +11,8 @@ First, read http://wiki.freebsd.org/Subv # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://repo.freebsd.org/base" -setenv OSSLVER 1.0.2j -# OSSLTAG format: v1_0_2j +setenv OSSLVER 1.0.2l +# OSSLTAG format: v1_0_2l ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` Modified: vendor-crypto/openssl/dist/LICENSE ============================================================================== --- vendor-crypto/openssl/dist/LICENSE Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/LICENSE Thu May 25 19:38:38 2017 (r318897) @@ -2,7 +2,7 @@ LICENSE ISSUES ============== - The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + The OpenSSL toolkit stays under a double license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit. See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: vendor-crypto/openssl/dist/Makefile ============================================================================== --- vendor-crypto/openssl/dist/Makefile Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/Makefile Thu May 25 19:38:38 2017 (r318897) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2k +VERSION=1.0.2l MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 @@ -426,6 +426,14 @@ clean: libclean rm -fr $$i/*; \ done +distclean: clean + -$(RM) `find . -name .git -prune -o -type l -print` + $(RM) apps/CA.pl + $(RM) test/evptests.txt test/newkey.pem test/testkey.pem test/testreq.pem + $(RM) tools/c_rehash + $(RM) crypto/opensslconf.h + $(RM) Makefile Makefile.bak + makefile.one: files $(PERL) util/mk1mf.pl >makefile.one; \ sh util/do_ms.sh Modified: vendor-crypto/openssl/dist/Makefile.org ============================================================================== --- vendor-crypto/openssl/dist/Makefile.org Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/Makefile.org Thu May 25 19:38:38 2017 (r318897) @@ -424,6 +424,14 @@ clean: libclean rm -fr $$i/*; \ done +distclean: clean + -$(RM) `find . -name .git -prune -o -type l -print` + $(RM) apps/CA.pl + $(RM) test/evptests.txt test/newkey.pem test/testkey.pem test/testreq.pem + $(RM) tools/c_rehash + $(RM) crypto/opensslconf.h + $(RM) Makefile Makefile.bak + makefile.one: files $(PERL) util/mk1mf.pl >makefile.one; \ sh util/do_ms.sh Modified: vendor-crypto/openssl/dist/NEWS ============================================================================== --- vendor-crypto/openssl/dist/NEWS Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/NEWS Thu May 25 19:38:38 2017 (r318897) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2k and OpenSSL 1.0.2l [25 May 2017] + + o config now recognises 64-bit mingw and chooses mingw64 instead of mingw + Major changes between OpenSSL 1.0.2j and OpenSSL 1.0.2k [26 Jan 2017] o Truncated packet could crash via OOB read (CVE-2017-3731) Modified: vendor-crypto/openssl/dist/README ============================================================================== --- vendor-crypto/openssl/dist/README Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/README Thu May 25 19:38:38 2017 (r318897) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2k 26 Jan 2017 + OpenSSL 1.0.2l 25 May 2017 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist/apps/ca.c ============================================================================== --- vendor-crypto/openssl/dist/apps/ca.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/ca.c Thu May 25 19:38:38 2017 (r318897) @@ -2126,10 +2126,8 @@ static int do_body(X509 **xret, EVP_PKEY goto err; } - for (i = 0; i < DB_NUMBER; i++) { + for (i = 0; i < DB_NUMBER; i++) irow[i] = row[i]; - row[i] = NULL; - } irow[DB_NUMBER] = NULL; if (!TXT_DB_insert(db->db, irow)) { @@ -2137,11 +2135,14 @@ static int do_body(X509 **xret, EVP_PKEY BIO_printf(bio_err, "TXT_DB error number %ld\n", db->db->error); goto err; } + irow = NULL; ok = 1; err: - for (i = 0; i < DB_NUMBER; i++) - if (row[i] != NULL) + if (irow != NULL) { + for (i = 0; i < DB_NUMBER; i++) OPENSSL_free(row[i]); + OPENSSL_free(irow); + } if (CAname != NULL) X509_NAME_free(CAname); @@ -2396,18 +2397,20 @@ static int do_revoke(X509 *x509, CA_DB * goto err; } - for (i = 0; i < DB_NUMBER; i++) { + for (i = 0; i < DB_NUMBER; i++) irow[i] = row[i]; - row[i] = NULL; - } irow[DB_NUMBER] = NULL; if (!TXT_DB_insert(db->db, irow)) { BIO_printf(bio_err, "failed to update database\n"); BIO_printf(bio_err, "TXT_DB error number %ld\n", db->db->error); + OPENSSL_free(irow); goto err; } + for (i = 0; i < DB_NUMBER; i++) + row[i] = NULL; + /* Revoke Certificate */ if (type == -1) ok = 1; Modified: vendor-crypto/openssl/dist/apps/dhparam.c ============================================================================== --- vendor-crypto/openssl/dist/apps/dhparam.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/dhparam.c Thu May 25 19:38:38 2017 (r318897) @@ -381,10 +381,19 @@ int MAIN(int argc, char **argv) } else # endif { - if (informat == FORMAT_ASN1) + if (informat == FORMAT_ASN1) { + /* + * We have no PEM header to determine what type of DH params it + * is. We'll just try both. + */ dh = d2i_DHparams_bio(in, NULL); - else /* informat == FORMAT_PEM */ + /* BIO_reset() returns 0 for success for file BIOs only!!! */ + if (dh == NULL && BIO_reset(in) == 0) + dh = d2i_DHxparams_bio(in, NULL); + } else { + /* informat == FORMAT_PEM */ dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL); + } if (dh == NULL) { BIO_printf(bio_err, "unable to load DH parameters\n"); @@ -484,10 +493,13 @@ int MAIN(int argc, char **argv) } if (!noout) { - if (outformat == FORMAT_ASN1) - i = i2d_DHparams_bio(out, dh); - else if (outformat == FORMAT_PEM) { - if (dh->q) + if (outformat == FORMAT_ASN1) { + if (dh->q != NULL) + i = i2d_DHxparams_bio(out, dh); + else + i = i2d_DHparams_bio(out, dh); + } else if (outformat == FORMAT_PEM) { + if (dh->q != NULL) i = PEM_write_bio_DHxparams(out, dh); else i = PEM_write_bio_DHparams(out, dh); Modified: vendor-crypto/openssl/dist/apps/enc.c ============================================================================== --- vendor-crypto/openssl/dist/apps/enc.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/enc.c Thu May 25 19:38:38 2017 (r318897) @@ -81,20 +81,32 @@ int set_hex(char *in, unsigned char *out #define BSIZE (8*1024) #define PROG enc_main -static void show_ciphers(const OBJ_NAME *name, void *bio_) +struct doall_enc_ciphers { + BIO *bio; + int n; +}; + +static void show_ciphers(const OBJ_NAME *name, void *arg) { - BIO *bio = bio_; - static int n; + struct doall_enc_ciphers *dec = (struct doall_enc_ciphers *)arg; + const EVP_CIPHER *cipher; if (!islower((unsigned char)*name->name)) return; - BIO_printf(bio, "-%-25s", name->name); - if (++n == 3) { - BIO_printf(bio, "\n"); - n = 0; + /* Filter out ciphers that we cannot use */ + cipher = EVP_get_cipherbyname(name->name); + if (cipher == NULL || + (EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0 || + EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE) + return; + + BIO_printf(dec->bio, "-%-25s", name->name); + if (++dec->n == 3) { + BIO_printf(dec->bio, "\n"); + dec->n = 0; } else - BIO_printf(bio, " "); + BIO_printf(dec->bio, " "); } int MAIN(int, char **); @@ -130,6 +142,7 @@ int MAIN(int argc, char **argv) ENGINE *e = NULL; const EVP_MD *dgst = NULL; int non_fips_allow = 0; + struct doall_enc_ciphers dec; apps_startup(); @@ -311,8 +324,10 @@ int MAIN(int argc, char **argv) #endif BIO_printf(bio_err, "Cipher Types\n"); + dec.n = 0; + dec.bio = bio_err; OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, - show_ciphers, bio_err); + show_ciphers, &dec); BIO_printf(bio_err, "\n"); goto end; Modified: vendor-crypto/openssl/dist/apps/engine.c ============================================================================== --- vendor-crypto/openssl/dist/apps/engine.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/engine.c Thu May 25 19:38:38 2017 (r318897) @@ -108,13 +108,16 @@ static int append_buf(char **buf, const } if (strlen(*buf) + strlen(s) >= (unsigned int)*size) { + char *p = *buf; + *size += step; *buf = OPENSSL_realloc(*buf, *size); + if (*buf == NULL) { + OPENSSL_free(p); + return 0; + } } - if (*buf == NULL) - return 0; - if (**buf != '\0') BUF_strlcat(*buf, ", ", *size); BUF_strlcat(*buf, s, *size); Modified: vendor-crypto/openssl/dist/apps/pkeyutl.c ============================================================================== --- vendor-crypto/openssl/dist/apps/pkeyutl.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/pkeyutl.c Thu May 25 19:38:38 2017 (r318897) @@ -322,8 +322,10 @@ int MAIN(int argc, char **argv) buf_in, (size_t)buf_inlen); if (rv == 0) BIO_puts(out, "Signature Verification Failure\n"); - else if (rv == 1) + else if (rv == 1) { BIO_puts(out, "Signature Verified Successfully\n"); + ret = 0; + } if (rv >= 0) goto end; } else { Modified: vendor-crypto/openssl/dist/apps/prime.c ============================================================================== --- vendor-crypto/openssl/dist/apps/prime.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/prime.c Thu May 25 19:38:38 2017 (r318897) @@ -155,5 +155,8 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "options are\n"); BIO_printf(bio_err, "%-14s hex\n", "-hex"); BIO_printf(bio_err, "%-14s number of checks\n", "-checks "); + BIO_printf(bio_err, "%-14s generate prime\n", "-generate"); + BIO_printf(bio_err, "%-14s number of bits\n", "-bits "); + BIO_printf(bio_err, "%-14s safe prime\n", "-safe"); return 1; } Modified: vendor-crypto/openssl/dist/apps/progs.h ============================================================================== --- vendor-crypto/openssl/dist/apps/progs.h Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/progs.h Thu May 25 19:38:38 2017 (r318897) @@ -58,7 +58,7 @@ extern int srp_main(int argc, char *argv typedef struct { int type; const char *name; - int (*func) (int argc, char *argv[]); + int (*func)(int argc, char *argv[]); } FUNCTION; DECLARE_LHASH_OF(FUNCTION); Modified: vendor-crypto/openssl/dist/apps/progs.pl ============================================================================== --- vendor-crypto/openssl/dist/apps/progs.pl Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/progs.pl Thu May 25 19:38:38 2017 (r318897) @@ -6,22 +6,22 @@ print "/* automatically generated by pro grep(s/^asn1pars$/asn1parse/,@ARGV); foreach (@ARGV) - { printf "extern int %s_main(int argc,char *argv[]);\n",$_; } + { printf "extern int %s_main(int argc, char *argv[]);\n",$_; } print <<'EOF'; -#define FUNC_TYPE_GENERAL 1 -#define FUNC_TYPE_MD 2 -#define FUNC_TYPE_CIPHER 3 -#define FUNC_TYPE_PKEY 4 -#define FUNC_TYPE_MD_ALG 5 -#define FUNC_TYPE_CIPHER_ALG 6 +#define FUNC_TYPE_GENERAL 1 +#define FUNC_TYPE_MD 2 +#define FUNC_TYPE_CIPHER 3 +#define FUNC_TYPE_PKEY 4 +#define FUNC_TYPE_MD_ALG 5 +#define FUNC_TYPE_CIPHER_ALG 6 typedef struct { - int type; - const char *name; - int (*func)(int argc,char *argv[]); - } FUNCTION; + int type; + const char *name; + int (*func)(int argc, char *argv[]); +} FUNCTION; DECLARE_LHASH_OF(FUNCTION); FUNCTION functions[] = { @@ -30,7 +30,7 @@ EOF foreach (@ARGV) { push(@files,$_); - $str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n"; + $str=" {FUNC_TYPE_GENERAL, \"$_\", ${_}_main},\n"; if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/)) { print "#if !defined(OPENSSL_NO_SOCK)\n${str}#endif\n"; } elsif ( ($_ =~ /^speed$/)) @@ -60,7 +60,7 @@ foreach (@ARGV) foreach ("md2","md4","md5","sha","sha1","mdc2","rmd160") { push(@files,$_); - printf "#ifndef OPENSSL_NO_".uc($_)."\n\t{FUNC_TYPE_MD,\"".$_."\",dgst_main},\n#endif\n"; + printf "#ifndef OPENSSL_NO_".uc($_)."\n {FUNC_TYPE_MD, \"".$_."\", dgst_main},\n#endif\n"; } foreach ( @@ -86,7 +86,7 @@ foreach ( { push(@files,$_); - $t=sprintf("\t{FUNC_TYPE_CIPHER,\"%s\",enc_main},\n",$_); + $t=sprintf(" {FUNC_TYPE_CIPHER, \"%s\", enc_main},\n",$_); if ($_ =~ /des/) { $t="#ifndef OPENSSL_NO_DES\n${t}#endif\n"; } elsif ($_ =~ /aes/) { $t="#ifndef OPENSSL_NO_AES\n${t}#endif\n"; } elsif ($_ =~ /camellia/) { $t="#ifndef OPENSSL_NO_CAMELLIA\n${t}#endif\n"; } @@ -101,4 +101,4 @@ foreach ( print $t; } -print "\t{0,NULL,NULL}\n\t};\n"; +print " {0, NULL, NULL}\n};\n"; Modified: vendor-crypto/openssl/dist/apps/req.c ============================================================================== --- vendor-crypto/openssl/dist/apps/req.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/req.c Thu May 25 19:38:38 2017 (r318897) @@ -331,7 +331,6 @@ int MAIN(int argc, char **argv) else if (strcmp(*argv, "-text") == 0) text = 1; else if (strcmp(*argv, "-x509") == 0) { - newreq = 1; x509 = 1; } else if (strcmp(*argv, "-asn1-kludge") == 0) kludge = 1; @@ -447,6 +446,9 @@ int MAIN(int argc, char **argv) goto end; } + if (x509 && infile == NULL) + newreq = 1; + ERR_load_crypto_strings(); if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { BIO_printf(bio_err, "Error getting passwords\n"); @@ -753,7 +755,7 @@ int MAIN(int argc, char **argv) } } - if (newreq) { + if (newreq || x509) { if (pkey == NULL) { BIO_printf(bio_err, "you need to specify a private key\n"); goto end; Modified: vendor-crypto/openssl/dist/apps/s_client.c ============================================================================== --- vendor-crypto/openssl/dist/apps/s_client.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/s_client.c Thu May 25 19:38:38 2017 (r318897) @@ -2132,6 +2132,7 @@ int MAIN(int argc, char **argv) BIO_free(bio_c_msg); bio_c_msg = NULL; } + SSL_COMP_free_compression_methods(); apps_shutdown(); OPENSSL_EXIT(ret); } Modified: vendor-crypto/openssl/dist/apps/s_server.c ============================================================================== --- vendor-crypto/openssl/dist/apps/s_server.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/s_server.c Thu May 25 19:38:38 2017 (r318897) @@ -2132,6 +2132,7 @@ int MAIN(int argc, char *argv[]) BIO_free(bio_s_msg); bio_s_msg = NULL; } + SSL_COMP_free_compression_methods(); apps_shutdown(); OPENSSL_EXIT(ret); } Modified: vendor-crypto/openssl/dist/apps/srp.c ============================================================================== --- vendor-crypto/openssl/dist/apps/srp.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/apps/srp.c Thu May 25 19:38:38 2017 (r318897) @@ -183,10 +183,8 @@ static int update_index(CA_DB *db, BIO * return 0; } - for (i = 0; i < DB_NUMBER; i++) { + for (i = 0; i < DB_NUMBER; i++) irow[i] = row[i]; - row[i] = NULL; - } irow[DB_NUMBER] = NULL; if (!TXT_DB_insert(db->db, irow)) { Modified: vendor-crypto/openssl/dist/appveyor.yml ============================================================================== --- vendor-crypto/openssl/dist/appveyor.yml Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/appveyor.yml Thu May 25 19:38:38 2017 (r318897) @@ -50,11 +50,3 @@ build_script: test_script: - nmake /f ms\%MAK% test - -notifications: - - provider: Email - to: - - openssl-commits@openssl.org - on_build_success: false - on_build_failure: true - on_build_status_changed: true Modified: vendor-crypto/openssl/dist/config ============================================================================== --- vendor-crypto/openssl/dist/config Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/config Thu May 25 19:38:38 2017 (r318897) @@ -344,6 +344,15 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${ echo "mips-sony-newsos4"; exit 0; ;; + # The following combinations are supported + # MINGW64* on x86_64 => mingw64 + # MINGW32* on x86_64 => mingw + # MINGW32* on i?86 => mingw + # + # MINGW64* on i?86 isn't expected to work... + MINGW64*:*:*:x86_64) + echo "${MACHINE}-whatever-mingw64"; exit 0; + ;; MINGW*) echo "${MACHINE}-whatever-mingw"; exit 0; ;; Modified: vendor-crypto/openssl/dist/crypto/aes/Makefile ============================================================================== --- vendor-crypto/openssl/dist/crypto/aes/Makefile Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/aes/Makefile Thu May 25 19:38:38 2017 (r318897) @@ -133,7 +133,7 @@ dclean: mv -f Makefile.new $(MAKEFILE) clean: - rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + rm -f *.s *.S *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff # DO NOT DELETE THIS LINE -- make depend depends on it. Modified: vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl Thu May 25 19:38:38 2017 (r318897) @@ -1702,6 +1702,7 @@ $code.=<<___; mov 240($key),$rounds sub $in0,$out movups ($key),$rndkey0 # $key[0] + movups ($ivp),$iv # load IV movups 16($key),$rndkey[0] # forward reference lea 112($key),$key # size optimization Modified: vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha256-x86_64.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha256-x86_64.pl Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha256-x86_64.pl Thu May 25 19:38:38 2017 (r318897) @@ -1299,6 +1299,7 @@ $code.=<<___; mov 240($key),$rounds sub $in0,$out movups ($key),$rndkey0 # $key[0] + movups ($ivp),$iv # load IV movups 16($key),$rndkey[0] # forward reference lea 112($key),$key # size optimization Modified: vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-armv7.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-armv7.pl Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-armv7.pl Thu May 25 19:38:38 2017 (r318897) @@ -1333,7 +1333,7 @@ bsaes_cbc_encrypt: vmov @XMM[4],@XMM[15] @ just in case ensure that IV vmov @XMM[5],@XMM[0] @ and input are preserved bl AES_decrypt - vld1.8 {@XMM[0]}, [$fp,:64] @ load result + vld1.8 {@XMM[0]}, [$fp] @ load result veor @XMM[0], @XMM[0], @XMM[4] @ ^= IV vmov @XMM[15], @XMM[5] @ @XMM[5] holds input vst1.8 {@XMM[0]}, [$rounds] @ write output Modified: vendor-crypto/openssl/dist/crypto/asn1/a_bitstr.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/a_bitstr.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/a_bitstr.c Thu May 25 19:38:38 2017 (r318897) @@ -114,10 +114,11 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *(p++) = (unsigned char)bits; d = a->data; - memcpy(p, d, len); - p += len; - if (len > 0) + if (len > 0) { + memcpy(p, d, len); + p += len; p[-1] &= (0xff << bits); + } *pp = p; return (ret); } Modified: vendor-crypto/openssl/dist/crypto/asn1/a_digest.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/a_digest.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/a_digest.c Thu May 25 19:38:38 2017 (r318897) @@ -86,8 +86,10 @@ int ASN1_digest(i2d_of_void *i2d, const p = str; i2d(data, &p); - if (!EVP_Digest(str, i, md, len, type, NULL)) + if (!EVP_Digest(str, i, md, len, type, NULL)) { + OPENSSL_free(str); return 0; + } OPENSSL_free(str); return (1); } @@ -104,8 +106,10 @@ int ASN1_item_digest(const ASN1_ITEM *it if (!str) return (0); - if (!EVP_Digest(str, i, md, len, type, NULL)) + if (!EVP_Digest(str, i, md, len, type, NULL)) { + OPENSSL_free(str); return 0; + } OPENSSL_free(str); return (1); } Modified: vendor-crypto/openssl/dist/crypto/asn1/a_gentm.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/a_gentm.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/a_gentm.c Thu May 25 19:38:38 2017 (r318897) @@ -202,7 +202,7 @@ int asn1_generalizedtime_to_tm(struct tm if (a[o] == 'Z') o++; else if ((a[o] == '+') || (a[o] == '-')) { - int offsign = a[o] == '-' ? -1 : 1, offset = 0; + int offsign = a[o] == '-' ? 1 : -1, offset = 0; o++; if (o + 4 > l) goto err; Modified: vendor-crypto/openssl/dist/crypto/asn1/a_strnid.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/a_strnid.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/a_strnid.c Thu May 25 19:38:38 2017 (r318897) @@ -192,7 +192,8 @@ static const ASN1_STRING_TABLE tbl_stand {NID_name, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK}, {NID_domainComponent, 1, -1, B_ASN1_IA5STRING, STABLE_NO_MASK}, - {NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK} + {NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}, + {NID_jurisdictionCountryName, 2, 2, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK} }; static int sk_table_cmp(const ASN1_STRING_TABLE *const *a, Modified: vendor-crypto/openssl/dist/crypto/asn1/a_time.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/a_time.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/a_time.c Thu May 25 19:38:38 2017 (r318897) @@ -137,7 +137,7 @@ int ASN1_TIME_check(ASN1_TIME *t) ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out) { - ASN1_GENERALIZEDTIME *ret; + ASN1_GENERALIZEDTIME *ret = NULL; char *str; int newlen; @@ -146,22 +146,21 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_gener if (!out || !*out) { if (!(ret = ASN1_GENERALIZEDTIME_new())) - return NULL; - if (out) - *out = ret; - } else + goto err; + } else { ret = *out; + } /* If already GeneralizedTime just copy across */ if (t->type == V_ASN1_GENERALIZEDTIME) { if (!ASN1_STRING_set(ret, t->data, t->length)) - return NULL; - return ret; + goto err; + goto done; } /* grow the string */ if (!ASN1_STRING_set(ret, NULL, t->length + 2)) - return NULL; + goto err; /* ASN1_STRING_set() allocated 'len + 1' bytes. */ newlen = t->length + 2 + 1; str = (char *)ret->data; @@ -173,9 +172,18 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_gener BUF_strlcat(str, (char *)t->data, newlen); - return ret; + done: + if (out != NULL && *out == NULL) + *out = ret; + return ret; + + err: + if (out == NULL || *out != ret) + ASN1_GENERALIZEDTIME_free(ret); + return NULL; } + int ASN1_TIME_set_string(ASN1_TIME *s, const char *str) { ASN1_TIME t; Modified: vendor-crypto/openssl/dist/crypto/asn1/a_utctm.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/a_utctm.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/a_utctm.c Thu May 25 19:38:38 2017 (r318897) @@ -172,7 +172,7 @@ int asn1_utctime_to_tm(struct tm *tm, co if (a[o] == 'Z') o++; else if ((a[o] == '+') || (a[o] == '-')) { - int offsign = a[o] == '-' ? -1 : 1, offset = 0; + int offsign = a[o] == '-' ? 1 : -1, offset = 0; o++; if (o + 4 > l) goto err; Modified: vendor-crypto/openssl/dist/crypto/asn1/f_enum.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/f_enum.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/f_enum.c Thu May 25 19:38:38 2017 (r318897) @@ -138,7 +138,7 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_EN bufp = (unsigned char *)buf; if (first) { first = 0; - if ((bufp[0] == '0') && (buf[1] == '0')) { + if ((bufp[0] == '0') && (bufp[1] == '0')) { bufp += 2; i -= 2; } Modified: vendor-crypto/openssl/dist/crypto/asn1/f_int.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/f_int.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/f_int.c Thu May 25 19:38:38 2017 (r318897) @@ -152,7 +152,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEG bufp = (unsigned char *)buf; if (first) { first = 0; - if ((bufp[0] == '0') && (buf[1] == '0')) { + if ((bufp[0] == '0') && (bufp[1] == '0')) { bufp += 2; i -= 2; } Modified: vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c Thu May 25 19:38:38 2017 (r318897) @@ -673,6 +673,7 @@ static int asn1_template_noexp_d2i(ASN1_ } len -= p - q; if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val, skfield)) { + ASN1_item_ex_free(&skfield, ASN1_ITEM_ptr(tt->item)); ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, ERR_R_MALLOC_FAILURE); goto err; } Modified: vendor-crypto/openssl/dist/crypto/asn1/tasn_new.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/tasn_new.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/tasn_new.c Thu May 25 19:38:38 2017 (r318897) @@ -158,7 +158,7 @@ static int asn1_item_ex_combine_new(ASN1 } asn1_set_choice_selector(pval, -1, it); if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL)) - goto auxerr; + goto auxerr2; break; case ASN1_ITYPE_NDEF_SEQUENCE: @@ -186,10 +186,10 @@ static int asn1_item_ex_combine_new(ASN1 for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) { pseqval = asn1_get_field_ptr(pval, tt); if (!ASN1_template_new(pseqval, tt)) - goto memerr; + goto memerr2; } if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL)) - goto auxerr; + goto auxerr2; break; } #ifdef CRYPTO_MDEBUG @@ -198,6 +198,8 @@ static int asn1_item_ex_combine_new(ASN1 #endif return 1; + memerr2: + ASN1_item_ex_free(pval, it); memerr: ASN1err(ASN1_F_ASN1_ITEM_EX_COMBINE_NEW, ERR_R_MALLOC_FAILURE); #ifdef CRYPTO_MDEBUG @@ -206,9 +208,10 @@ static int asn1_item_ex_combine_new(ASN1 #endif return 0; + auxerr2: + ASN1_item_ex_free(pval, it); auxerr: ASN1err(ASN1_F_ASN1_ITEM_EX_COMBINE_NEW, ASN1_R_AUX_ERROR); - ASN1_item_ex_free(pval, it); #ifdef CRYPTO_MDEBUG if (it->sname) CRYPTO_pop_info(); Modified: vendor-crypto/openssl/dist/crypto/asn1/x_long.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/x_long.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/x_long.c Thu May 25 19:38:38 2017 (r318897) @@ -126,7 +126,7 @@ static int long_i2c(ASN1_VALUE **pval, u * set. */ if (ltmp < 0) - utmp = -ltmp - 1; + utmp = 0 - (unsigned long)ltmp - 1; else utmp = ltmp; clen = BN_num_bits_word(utmp); @@ -155,19 +155,41 @@ static int long_i2c(ASN1_VALUE **pval, u static int long_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) { - int neg, i; + int neg = -1, i; long ltmp; unsigned long utmp = 0; char *cp = (char *)pval; + + if (len) { + /* + * Check possible pad byte. Worst case, we're skipping past actual + * content, but since that's only with 0x00 and 0xff and we set neg + * accordingly, the result will be correct in the end anyway. + */ + switch (cont[0]) { + case 0xff: + cont++; + len--; + neg = 1; + break; + case 0: + cont++; + len--; + neg = 0; + break; + } + } if (len > (int)sizeof(long)) { ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); return 0; } - /* Is it negative? */ - if (len && (cont[0] & 0x80)) - neg = 1; - else - neg = 0; + if (neg == -1) { + /* Is it negative? */ + if (len && (cont[0] & 0x80)) + neg = 1; + else + neg = 0; + } utmp = 0; for (i = 0; i < len; i++) { utmp <<= 8; @@ -178,8 +200,8 @@ static int long_c2i(ASN1_VALUE **pval, c } ltmp = (long)utmp; if (neg) { - ltmp++; ltmp = -ltmp; + ltmp--; } if (ltmp == it->size) { ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); Modified: vendor-crypto/openssl/dist/crypto/asn1/x_name.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/x_name.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/asn1/x_name.c Thu May 25 19:38:38 2017 (r318897) @@ -178,6 +178,16 @@ static void x509_name_ex_free(ASN1_VALUE *pval = NULL; } +static void local_sk_X509_NAME_ENTRY_free(STACK_OF(X509_NAME_ENTRY) *ne) +{ + sk_X509_NAME_ENTRY_free(ne); +} + +static void local_sk_X509_NAME_ENTRY_pop_free(STACK_OF(X509_NAME_ENTRY) *ne) +{ + sk_X509_NAME_ENTRY_pop_free(ne, X509_NAME_ENTRY_free); +} + static int x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, @@ -228,13 +238,14 @@ static int x509_name_ex_d2i(ASN1_VALUE * entry->set = i; if (!sk_X509_NAME_ENTRY_push(nm.x->entries, entry)) goto err; + sk_X509_NAME_ENTRY_set(entries, j, NULL); } - sk_X509_NAME_ENTRY_free(entries); } - sk_STACK_OF_X509_NAME_ENTRY_free(intname.s); ret = x509_name_canon(nm.x); if (!ret) goto err; + sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s, + local_sk_X509_NAME_ENTRY_free); nm.x->modified = 0; *val = nm.a; *in = p; @@ -242,6 +253,8 @@ static int x509_name_ex_d2i(ASN1_VALUE * err: if (nm.x != NULL) X509_NAME_free(nm.x); + sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s, + local_sk_X509_NAME_ENTRY_pop_free); ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR); return 0; } @@ -267,16 +280,6 @@ static int x509_name_ex_i2d(ASN1_VALUE * return ret; } -static void local_sk_X509_NAME_ENTRY_free(STACK_OF(X509_NAME_ENTRY) *ne) -{ - sk_X509_NAME_ENTRY_free(ne); -} - -static void local_sk_X509_NAME_ENTRY_pop_free(STACK_OF(X509_NAME_ENTRY) *ne) -{ - sk_X509_NAME_ENTRY_pop_free(ne, X509_NAME_ENTRY_free); -} - static int x509_name_encode(X509_NAME *a) { union { @@ -299,8 +302,10 @@ static int x509_name_encode(X509_NAME *a entries = sk_X509_NAME_ENTRY_new_null(); if (!entries) goto memerr; - if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname.s, entries)) + if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname.s, entries)) { + sk_X509_NAME_ENTRY_free(entries); goto memerr; + } set = entry->set; } if (!sk_X509_NAME_ENTRY_push(entries, entry)) @@ -370,8 +375,10 @@ static int x509_name_canon(X509_NAME *a) entries = sk_X509_NAME_ENTRY_new_null(); if (!entries) goto err; - if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)) + if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)) { + sk_X509_NAME_ENTRY_free(entries); goto err; + } set = entry->set; } tmpentry = X509_NAME_ENTRY_new(); Modified: vendor-crypto/openssl/dist/crypto/bio/b_print.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bio/b_print.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/bio/b_print.c Thu May 25 19:38:38 2017 (r318897) @@ -502,7 +502,7 @@ fmtint(char **sbuffer, if (!(flags & DP_F_UNSIGNED)) { if (value < 0) { signvalue = '-'; - uvalue = -value; + uvalue = -(unsigned LLONG)value; } else if (flags & DP_F_PLUS) signvalue = '+'; else if (flags & DP_F_SPACE) Modified: vendor-crypto/openssl/dist/crypto/bio/bio_cb.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bio/bio_cb.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/bio/bio_cb.c Thu May 25 19:38:38 2017 (r318897) @@ -78,6 +78,9 @@ long MS_CALLBACK BIO_debug_callback(BIO len = BIO_snprintf(buf,sizeof buf,"BIO[%p]: ",(void *)bio); + /* Ignore errors and continue printing the other information. */ + if (len < 0) + len = 0; p = buf + len; p_maxlen = sizeof(buf) - len; Modified: vendor-crypto/openssl/dist/crypto/bio/bss_file.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bio/bss_file.c Thu May 25 19:20:06 2017 (r318896) +++ vendor-crypto/openssl/dist/crypto/bio/bss_file.c Thu May 25 19:38:38 2017 (r318897) @@ -251,7 +251,7 @@ static int MS_CALLBACK file_read(BIO *b, ret = fread(out, 1, (int)outl, (FILE *)b->ptr); if (ret == 0 && (b->flags & BIO_FLAGS_UPLINK) ? UP_ferror((FILE *)b->ptr) : - ferror((FILE *)b->ptr)) { + ferror((FILE *)b->ptr)) { SYSerr(SYS_F_FREAD, get_last_sys_error()); BIOerr(BIO_F_FILE_READ, ERR_R_SYS_LIB); ret = -1; @@ -287,6 +287,7 @@ static long MS_CALLBACK file_ctrl(BIO *b FILE *fp = (FILE *)b->ptr; FILE **fpp; char p[4]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 25 19:39:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02EF8D824FF; Thu, 25 May 2017 19:39:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF0371537; Thu, 25 May 2017 19:39:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PJdG6G083628; Thu, 25 May 2017 19:39:16 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PJdG7h083627; Thu, 25 May 2017 19:39:16 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705251939.v4PJdG7h083627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 25 May 2017 19:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318898 - vendor-crypto/openssl/1.0.2l X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 19:39:18 -0000 Author: jkim Date: Thu May 25 19:39:16 2017 New Revision: 318898 URL: https://svnweb.freebsd.org/changeset/base/318898 Log: Tag OpenSSL 1.0.2l. Added: vendor-crypto/openssl/1.0.2l/ - copied from r318897, vendor-crypto/openssl/dist/ From owner-svn-src-all@freebsd.org Thu May 25 20:52:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F5C6D82264; Thu, 25 May 2017 20:52:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2549B1953; Thu, 25 May 2017 20:52:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PKqLDr016300; Thu, 25 May 2017 20:52:21 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PKqG5W016258; Thu, 25 May 2017 20:52:16 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705252052.v4PKqG5W016258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 25 May 2017 20:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318899 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 20:52:22 -0000 Author: jkim Date: Thu May 25 20:52:16 2017 New Revision: 318899 URL: https://svnweb.freebsd.org/changeset/base/318899 Log: Merge OpenSSL 1.0.2l. Added: head/crypto/openssl/doc/man3/ - copied from r318897, vendor-crypto/openssl/dist/doc/man3/ head/secure/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3 (contents, props changed) Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/LICENSE head/crypto/openssl/Makefile head/crypto/openssl/Makefile.org head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/ca.c head/crypto/openssl/apps/dhparam.c head/crypto/openssl/apps/enc.c head/crypto/openssl/apps/engine.c head/crypto/openssl/apps/pkeyutl.c head/crypto/openssl/apps/prime.c head/crypto/openssl/apps/progs.h head/crypto/openssl/apps/progs.pl head/crypto/openssl/apps/req.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/s_server.c head/crypto/openssl/apps/srp.c head/crypto/openssl/appveyor.yml head/crypto/openssl/config head/crypto/openssl/crypto/aes/Makefile head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl head/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl head/crypto/openssl/crypto/asn1/a_bitstr.c head/crypto/openssl/crypto/asn1/a_digest.c head/crypto/openssl/crypto/asn1/a_gentm.c head/crypto/openssl/crypto/asn1/a_strnid.c head/crypto/openssl/crypto/asn1/a_time.c head/crypto/openssl/crypto/asn1/a_utctm.c head/crypto/openssl/crypto/asn1/f_enum.c head/crypto/openssl/crypto/asn1/f_int.c head/crypto/openssl/crypto/asn1/tasn_dec.c head/crypto/openssl/crypto/asn1/tasn_new.c head/crypto/openssl/crypto/asn1/x_long.c head/crypto/openssl/crypto/asn1/x_name.c head/crypto/openssl/crypto/bio/b_print.c head/crypto/openssl/crypto/bio/bio_cb.c head/crypto/openssl/crypto/bio/bss_file.c head/crypto/openssl/crypto/bn/Makefile head/crypto/openssl/crypto/bn/asm/sparcv9-mont.pl head/crypto/openssl/crypto/bn/bn_prime.c head/crypto/openssl/crypto/bn/bn_prime.h head/crypto/openssl/crypto/bn/bn_prime.pl head/crypto/openssl/crypto/bn/bn_print.c head/crypto/openssl/crypto/comp/c_rle.c head/crypto/openssl/crypto/conf/conf.h head/crypto/openssl/crypto/conf/conf_def.c head/crypto/openssl/crypto/conf/conf_err.c head/crypto/openssl/crypto/des/Makefile head/crypto/openssl/crypto/des/set_key.c head/crypto/openssl/crypto/dh/dh.h head/crypto/openssl/crypto/ec/ec_ameth.c head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ec_mult.c head/crypto/openssl/crypto/ec/eck_prn.c head/crypto/openssl/crypto/engine/eng_cryptodev.c head/crypto/openssl/crypto/err/err.c head/crypto/openssl/crypto/err/err.h head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c head/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha256.c head/crypto/openssl/crypto/evp/e_des3.c head/crypto/openssl/crypto/evp/evp_enc.c head/crypto/openssl/crypto/evp/pmeth_lib.c head/crypto/openssl/crypto/ex_data.c head/crypto/openssl/crypto/hmac/hm_pmeth.c head/crypto/openssl/crypto/md5/Makefile head/crypto/openssl/crypto/mem.c head/crypto/openssl/crypto/modes/Makefile head/crypto/openssl/crypto/o_dir.c head/crypto/openssl/crypto/o_time.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/perlasm/x86_64-xlate.pl head/crypto/openssl/crypto/pkcs12/p12_mutl.c head/crypto/openssl/crypto/ppccap.c head/crypto/openssl/crypto/rand/md_rand.c head/crypto/openssl/crypto/rc4/Makefile head/crypto/openssl/crypto/rsa/rsa_pmeth.c head/crypto/openssl/crypto/rsa/rsa_pss.c head/crypto/openssl/crypto/sha/Makefile head/crypto/openssl/crypto/srp/srp_vfy.c head/crypto/openssl/crypto/txt_db/txt_db.c head/crypto/openssl/crypto/ui/ui_lib.c head/crypto/openssl/crypto/x509/x509_lu.c head/crypto/openssl/crypto/x509v3/v3_alt.c head/crypto/openssl/crypto/x509v3/v3_cpols.c head/crypto/openssl/crypto/x509v3/v3_info.c head/crypto/openssl/crypto/x509v3/v3_purp.c head/crypto/openssl/crypto/x86_64cpuid.pl head/crypto/openssl/crypto/x86cpuid.pl head/crypto/openssl/doc/apps/ciphers.pod head/crypto/openssl/doc/apps/config.pod head/crypto/openssl/doc/apps/genrsa.pod head/crypto/openssl/doc/apps/req.pod head/crypto/openssl/doc/apps/s_client.pod head/crypto/openssl/doc/apps/s_server.pod head/crypto/openssl/doc/crypto/EVP_EncryptInit.pod head/crypto/openssl/doc/crypto/RSA_private_encrypt.pod head/crypto/openssl/doc/crypto/RSA_public_encrypt.pod head/crypto/openssl/doc/crypto/X509_STORE_CTX_new.pod head/crypto/openssl/doc/crypto/des.pod head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_clnt.c head/crypto/openssl/ssl/d1_pkt.c head/crypto/openssl/ssl/d1_srvr.c head/crypto/openssl/ssl/s23_clnt.c head/crypto/openssl/ssl/s23_srvr.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_enc.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssl_cert.c head/crypto/openssl/ssl/ssl_ciph.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/ssl_rsa.c head/crypto/openssl/ssl/ssl_sess.c head/crypto/openssl/ssl/ssltest.c head/crypto/openssl/ssl/t1_ext.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/util/domd head/crypto/openssl/util/mk1mf.pl head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/Makefile.man head/secure/lib/libcrypto/amd64/aesni-sha1-x86_64.S head/secure/lib/libcrypto/amd64/aesni-sha256-x86_64.S head/secure/lib/libcrypto/amd64/x86_64cpuid.S head/secure/lib/libcrypto/arm/bsaes-armv7.S head/secure/lib/libcrypto/i386/x86cpuid.S head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/EC_GROUP_new.3 head/secure/lib/libcrypto/man/EC_KEY_new.3 head/secure/lib/libcrypto/man/EC_POINT_add.3 head/secure/lib/libcrypto/man/EC_POINT_new.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_check_host.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_ECPKParameters.3 head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ec.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/Makefile.man head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CONF_CTX_new.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libssl/man/SSL_CONF_cmd.3 head/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 head/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get0_param.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set1_curves.3 head/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_check_chain.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/Makefile.man head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/CHANGES Thu May 25 20:52:16 2017 (r318899) @@ -2,6 +2,12 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2k and 1.0.2l [25 May 2017] + + *) Have 'config' recognise 64-bit mingw and choose 'mingw64' as the target + platform rather than 'mingw'. + [Richard Levitte] + Changes between 1.0.2j and 1.0.2k [26 Jan 2017] *) Truncated packet could crash via OOB read Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/Configure Thu May 25 20:52:16 2017 (r318899) @@ -109,7 +109,7 @@ my $usage="Usage: Configure [no- # Minimum warning options... any contributions to OpenSSL should at least get # past these. -my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; +my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wundef -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; # TODO(openssl-team): fix problems and investigate if (at least) the following # warnings can also be enabled: @@ -2041,12 +2041,13 @@ EOF close(OUT); } else { my $make_command = "$make PERL=\'$perl\'"; - my $make_targets = ""; - $make_targets .= " links" if $symlink; - $make_targets .= " depend" if $depflags ne $default_depflags && $make_depend; - $make_targets .= " gentests" if $symlink; - (system $make_command.$make_targets) == 0 or exit $? - if $make_targets ne ""; + my @make_targets = (); + push @make_targets, "links" if $symlink; + push @make_targets, "depend" if $depflags ne $default_depflags && $make_depend; + push @make_targets, "gentests" if $symlink; + foreach my $make_target (@make_targets) { + (system "$make_command $make_target") == 0 or exit $?; + } if ( $perl =~ m@^/@) { &dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";', '^my \$prefix;$', 'my $prefix = "' . $prefix . '";'); &dofile("apps/CA.pl",$perl,'^#!/', '#!%s'); @@ -2056,8 +2057,8 @@ EOF &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s'); } if ($depflags ne $default_depflags && !$make_depend) { - $warn_make_depend++; - } + $warn_make_depend++; + } } # create the ms/version32.rc file if needed Modified: head/crypto/openssl/LICENSE ============================================================================== --- head/crypto/openssl/LICENSE Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/LICENSE Thu May 25 20:52:16 2017 (r318899) @@ -2,7 +2,7 @@ LICENSE ISSUES ============== - The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + The OpenSSL toolkit stays under a double license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit. See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/Makefile Thu May 25 20:52:16 2017 (r318899) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2k +VERSION=1.0.2l MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 @@ -426,6 +426,14 @@ clean: libclean rm -fr $$i/*; \ done +distclean: clean + -$(RM) `find . -name .git -prune -o -type l -print` + $(RM) apps/CA.pl + $(RM) test/evptests.txt test/newkey.pem test/testkey.pem test/testreq.pem + $(RM) tools/c_rehash + $(RM) crypto/opensslconf.h + $(RM) Makefile Makefile.bak + makefile.one: files $(PERL) util/mk1mf.pl >makefile.one; \ sh util/do_ms.sh Modified: head/crypto/openssl/Makefile.org ============================================================================== --- head/crypto/openssl/Makefile.org Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/Makefile.org Thu May 25 20:52:16 2017 (r318899) @@ -424,6 +424,14 @@ clean: libclean rm -fr $$i/*; \ done +distclean: clean + -$(RM) `find . -name .git -prune -o -type l -print` + $(RM) apps/CA.pl + $(RM) test/evptests.txt test/newkey.pem test/testkey.pem test/testreq.pem + $(RM) tools/c_rehash + $(RM) crypto/opensslconf.h + $(RM) Makefile Makefile.bak + makefile.one: files $(PERL) util/mk1mf.pl >makefile.one; \ sh util/do_ms.sh Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/NEWS Thu May 25 20:52:16 2017 (r318899) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2k and OpenSSL 1.0.2l [25 May 2017] + + o config now recognises 64-bit mingw and chooses mingw64 instead of mingw + Major changes between OpenSSL 1.0.2j and OpenSSL 1.0.2k [26 Jan 2017] o Truncated packet could crash via OOB read (CVE-2017-3731) Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/README Thu May 25 20:52:16 2017 (r318899) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2k 26 Jan 2017 + OpenSSL 1.0.2l 25 May 2017 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/ca.c ============================================================================== --- head/crypto/openssl/apps/ca.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/ca.c Thu May 25 20:52:16 2017 (r318899) @@ -2126,10 +2126,8 @@ static int do_body(X509 **xret, EVP_PKEY goto err; } - for (i = 0; i < DB_NUMBER; i++) { + for (i = 0; i < DB_NUMBER; i++) irow[i] = row[i]; - row[i] = NULL; - } irow[DB_NUMBER] = NULL; if (!TXT_DB_insert(db->db, irow)) { @@ -2137,11 +2135,14 @@ static int do_body(X509 **xret, EVP_PKEY BIO_printf(bio_err, "TXT_DB error number %ld\n", db->db->error); goto err; } + irow = NULL; ok = 1; err: - for (i = 0; i < DB_NUMBER; i++) - if (row[i] != NULL) + if (irow != NULL) { + for (i = 0; i < DB_NUMBER; i++) OPENSSL_free(row[i]); + OPENSSL_free(irow); + } if (CAname != NULL) X509_NAME_free(CAname); @@ -2396,18 +2397,20 @@ static int do_revoke(X509 *x509, CA_DB * goto err; } - for (i = 0; i < DB_NUMBER; i++) { + for (i = 0; i < DB_NUMBER; i++) irow[i] = row[i]; - row[i] = NULL; - } irow[DB_NUMBER] = NULL; if (!TXT_DB_insert(db->db, irow)) { BIO_printf(bio_err, "failed to update database\n"); BIO_printf(bio_err, "TXT_DB error number %ld\n", db->db->error); + OPENSSL_free(irow); goto err; } + for (i = 0; i < DB_NUMBER; i++) + row[i] = NULL; + /* Revoke Certificate */ if (type == -1) ok = 1; Modified: head/crypto/openssl/apps/dhparam.c ============================================================================== --- head/crypto/openssl/apps/dhparam.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/dhparam.c Thu May 25 20:52:16 2017 (r318899) @@ -381,10 +381,19 @@ int MAIN(int argc, char **argv) } else # endif { - if (informat == FORMAT_ASN1) + if (informat == FORMAT_ASN1) { + /* + * We have no PEM header to determine what type of DH params it + * is. We'll just try both. + */ dh = d2i_DHparams_bio(in, NULL); - else /* informat == FORMAT_PEM */ + /* BIO_reset() returns 0 for success for file BIOs only!!! */ + if (dh == NULL && BIO_reset(in) == 0) + dh = d2i_DHxparams_bio(in, NULL); + } else { + /* informat == FORMAT_PEM */ dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL); + } if (dh == NULL) { BIO_printf(bio_err, "unable to load DH parameters\n"); @@ -484,10 +493,13 @@ int MAIN(int argc, char **argv) } if (!noout) { - if (outformat == FORMAT_ASN1) - i = i2d_DHparams_bio(out, dh); - else if (outformat == FORMAT_PEM) { - if (dh->q) + if (outformat == FORMAT_ASN1) { + if (dh->q != NULL) + i = i2d_DHxparams_bio(out, dh); + else + i = i2d_DHparams_bio(out, dh); + } else if (outformat == FORMAT_PEM) { + if (dh->q != NULL) i = PEM_write_bio_DHxparams(out, dh); else i = PEM_write_bio_DHparams(out, dh); Modified: head/crypto/openssl/apps/enc.c ============================================================================== --- head/crypto/openssl/apps/enc.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/enc.c Thu May 25 20:52:16 2017 (r318899) @@ -81,20 +81,32 @@ int set_hex(char *in, unsigned char *out #define BSIZE (8*1024) #define PROG enc_main -static void show_ciphers(const OBJ_NAME *name, void *bio_) +struct doall_enc_ciphers { + BIO *bio; + int n; +}; + +static void show_ciphers(const OBJ_NAME *name, void *arg) { - BIO *bio = bio_; - static int n; + struct doall_enc_ciphers *dec = (struct doall_enc_ciphers *)arg; + const EVP_CIPHER *cipher; if (!islower((unsigned char)*name->name)) return; - BIO_printf(bio, "-%-25s", name->name); - if (++n == 3) { - BIO_printf(bio, "\n"); - n = 0; + /* Filter out ciphers that we cannot use */ + cipher = EVP_get_cipherbyname(name->name); + if (cipher == NULL || + (EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0 || + EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE) + return; + + BIO_printf(dec->bio, "-%-25s", name->name); + if (++dec->n == 3) { + BIO_printf(dec->bio, "\n"); + dec->n = 0; } else - BIO_printf(bio, " "); + BIO_printf(dec->bio, " "); } int MAIN(int, char **); @@ -130,6 +142,7 @@ int MAIN(int argc, char **argv) ENGINE *e = NULL; const EVP_MD *dgst = NULL; int non_fips_allow = 0; + struct doall_enc_ciphers dec; apps_startup(); @@ -311,8 +324,10 @@ int MAIN(int argc, char **argv) #endif BIO_printf(bio_err, "Cipher Types\n"); + dec.n = 0; + dec.bio = bio_err; OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, - show_ciphers, bio_err); + show_ciphers, &dec); BIO_printf(bio_err, "\n"); goto end; Modified: head/crypto/openssl/apps/engine.c ============================================================================== --- head/crypto/openssl/apps/engine.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/engine.c Thu May 25 20:52:16 2017 (r318899) @@ -108,13 +108,16 @@ static int append_buf(char **buf, const } if (strlen(*buf) + strlen(s) >= (unsigned int)*size) { + char *p = *buf; + *size += step; *buf = OPENSSL_realloc(*buf, *size); + if (*buf == NULL) { + OPENSSL_free(p); + return 0; + } } - if (*buf == NULL) - return 0; - if (**buf != '\0') BUF_strlcat(*buf, ", ", *size); BUF_strlcat(*buf, s, *size); Modified: head/crypto/openssl/apps/pkeyutl.c ============================================================================== --- head/crypto/openssl/apps/pkeyutl.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/pkeyutl.c Thu May 25 20:52:16 2017 (r318899) @@ -322,8 +322,10 @@ int MAIN(int argc, char **argv) buf_in, (size_t)buf_inlen); if (rv == 0) BIO_puts(out, "Signature Verification Failure\n"); - else if (rv == 1) + else if (rv == 1) { BIO_puts(out, "Signature Verified Successfully\n"); + ret = 0; + } if (rv >= 0) goto end; } else { Modified: head/crypto/openssl/apps/prime.c ============================================================================== --- head/crypto/openssl/apps/prime.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/prime.c Thu May 25 20:52:16 2017 (r318899) @@ -155,5 +155,8 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "options are\n"); BIO_printf(bio_err, "%-14s hex\n", "-hex"); BIO_printf(bio_err, "%-14s number of checks\n", "-checks "); + BIO_printf(bio_err, "%-14s generate prime\n", "-generate"); + BIO_printf(bio_err, "%-14s number of bits\n", "-bits "); + BIO_printf(bio_err, "%-14s safe prime\n", "-safe"); return 1; } Modified: head/crypto/openssl/apps/progs.h ============================================================================== --- head/crypto/openssl/apps/progs.h Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/progs.h Thu May 25 20:52:16 2017 (r318899) @@ -58,7 +58,7 @@ extern int srp_main(int argc, char *argv typedef struct { int type; const char *name; - int (*func) (int argc, char *argv[]); + int (*func)(int argc, char *argv[]); } FUNCTION; DECLARE_LHASH_OF(FUNCTION); Modified: head/crypto/openssl/apps/progs.pl ============================================================================== --- head/crypto/openssl/apps/progs.pl Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/progs.pl Thu May 25 20:52:16 2017 (r318899) @@ -6,22 +6,22 @@ print "/* automatically generated by pro grep(s/^asn1pars$/asn1parse/,@ARGV); foreach (@ARGV) - { printf "extern int %s_main(int argc,char *argv[]);\n",$_; } + { printf "extern int %s_main(int argc, char *argv[]);\n",$_; } print <<'EOF'; -#define FUNC_TYPE_GENERAL 1 -#define FUNC_TYPE_MD 2 -#define FUNC_TYPE_CIPHER 3 -#define FUNC_TYPE_PKEY 4 -#define FUNC_TYPE_MD_ALG 5 -#define FUNC_TYPE_CIPHER_ALG 6 +#define FUNC_TYPE_GENERAL 1 +#define FUNC_TYPE_MD 2 +#define FUNC_TYPE_CIPHER 3 +#define FUNC_TYPE_PKEY 4 +#define FUNC_TYPE_MD_ALG 5 +#define FUNC_TYPE_CIPHER_ALG 6 typedef struct { - int type; - const char *name; - int (*func)(int argc,char *argv[]); - } FUNCTION; + int type; + const char *name; + int (*func)(int argc, char *argv[]); +} FUNCTION; DECLARE_LHASH_OF(FUNCTION); FUNCTION functions[] = { @@ -30,7 +30,7 @@ EOF foreach (@ARGV) { push(@files,$_); - $str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n"; + $str=" {FUNC_TYPE_GENERAL, \"$_\", ${_}_main},\n"; if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/)) { print "#if !defined(OPENSSL_NO_SOCK)\n${str}#endif\n"; } elsif ( ($_ =~ /^speed$/)) @@ -60,7 +60,7 @@ foreach (@ARGV) foreach ("md2","md4","md5","sha","sha1","mdc2","rmd160") { push(@files,$_); - printf "#ifndef OPENSSL_NO_".uc($_)."\n\t{FUNC_TYPE_MD,\"".$_."\",dgst_main},\n#endif\n"; + printf "#ifndef OPENSSL_NO_".uc($_)."\n {FUNC_TYPE_MD, \"".$_."\", dgst_main},\n#endif\n"; } foreach ( @@ -86,7 +86,7 @@ foreach ( { push(@files,$_); - $t=sprintf("\t{FUNC_TYPE_CIPHER,\"%s\",enc_main},\n",$_); + $t=sprintf(" {FUNC_TYPE_CIPHER, \"%s\", enc_main},\n",$_); if ($_ =~ /des/) { $t="#ifndef OPENSSL_NO_DES\n${t}#endif\n"; } elsif ($_ =~ /aes/) { $t="#ifndef OPENSSL_NO_AES\n${t}#endif\n"; } elsif ($_ =~ /camellia/) { $t="#ifndef OPENSSL_NO_CAMELLIA\n${t}#endif\n"; } @@ -101,4 +101,4 @@ foreach ( print $t; } -print "\t{0,NULL,NULL}\n\t};\n"; +print " {0, NULL, NULL}\n};\n"; Modified: head/crypto/openssl/apps/req.c ============================================================================== --- head/crypto/openssl/apps/req.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/req.c Thu May 25 20:52:16 2017 (r318899) @@ -331,7 +331,6 @@ int MAIN(int argc, char **argv) else if (strcmp(*argv, "-text") == 0) text = 1; else if (strcmp(*argv, "-x509") == 0) { - newreq = 1; x509 = 1; } else if (strcmp(*argv, "-asn1-kludge") == 0) kludge = 1; @@ -447,6 +446,9 @@ int MAIN(int argc, char **argv) goto end; } + if (x509 && infile == NULL) + newreq = 1; + ERR_load_crypto_strings(); if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { BIO_printf(bio_err, "Error getting passwords\n"); @@ -753,7 +755,7 @@ int MAIN(int argc, char **argv) } } - if (newreq) { + if (newreq || x509) { if (pkey == NULL) { BIO_printf(bio_err, "you need to specify a private key\n"); goto end; Modified: head/crypto/openssl/apps/s_client.c ============================================================================== --- head/crypto/openssl/apps/s_client.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/s_client.c Thu May 25 20:52:16 2017 (r318899) @@ -2132,6 +2132,7 @@ int MAIN(int argc, char **argv) BIO_free(bio_c_msg); bio_c_msg = NULL; } + SSL_COMP_free_compression_methods(); apps_shutdown(); OPENSSL_EXIT(ret); } Modified: head/crypto/openssl/apps/s_server.c ============================================================================== --- head/crypto/openssl/apps/s_server.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/s_server.c Thu May 25 20:52:16 2017 (r318899) @@ -2132,6 +2132,7 @@ int MAIN(int argc, char *argv[]) BIO_free(bio_s_msg); bio_s_msg = NULL; } + SSL_COMP_free_compression_methods(); apps_shutdown(); OPENSSL_EXIT(ret); } Modified: head/crypto/openssl/apps/srp.c ============================================================================== --- head/crypto/openssl/apps/srp.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/apps/srp.c Thu May 25 20:52:16 2017 (r318899) @@ -183,10 +183,8 @@ static int update_index(CA_DB *db, BIO * return 0; } - for (i = 0; i < DB_NUMBER; i++) { + for (i = 0; i < DB_NUMBER; i++) irow[i] = row[i]; - row[i] = NULL; - } irow[DB_NUMBER] = NULL; if (!TXT_DB_insert(db->db, irow)) { Modified: head/crypto/openssl/appveyor.yml ============================================================================== --- head/crypto/openssl/appveyor.yml Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/appveyor.yml Thu May 25 20:52:16 2017 (r318899) @@ -50,11 +50,3 @@ build_script: test_script: - nmake /f ms\%MAK% test - -notifications: - - provider: Email - to: - - openssl-commits@openssl.org - on_build_success: false - on_build_failure: true - on_build_status_changed: true Modified: head/crypto/openssl/config ============================================================================== --- head/crypto/openssl/config Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/config Thu May 25 20:52:16 2017 (r318899) @@ -344,6 +344,15 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${ echo "mips-sony-newsos4"; exit 0; ;; + # The following combinations are supported + # MINGW64* on x86_64 => mingw64 + # MINGW32* on x86_64 => mingw + # MINGW32* on i?86 => mingw + # + # MINGW64* on i?86 isn't expected to work... + MINGW64*:*:*:x86_64) + echo "${MACHINE}-whatever-mingw64"; exit 0; + ;; MINGW*) echo "${MACHINE}-whatever-mingw"; exit 0; ;; Modified: head/crypto/openssl/crypto/aes/Makefile ============================================================================== --- head/crypto/openssl/crypto/aes/Makefile Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/aes/Makefile Thu May 25 20:52:16 2017 (r318899) @@ -133,7 +133,7 @@ dclean: mv -f Makefile.new $(MAKEFILE) clean: - rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + rm -f *.s *.S *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff # DO NOT DELETE THIS LINE -- make depend depends on it. Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Thu May 25 20:52:16 2017 (r318899) @@ -1702,6 +1702,7 @@ $code.=<<___; mov 240($key),$rounds sub $in0,$out movups ($key),$rndkey0 # $key[0] + movups ($ivp),$iv # load IV movups 16($key),$rndkey[0] # forward reference lea 112($key),$key # size optimization Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Thu May 25 20:52:16 2017 (r318899) @@ -1299,6 +1299,7 @@ $code.=<<___; mov 240($key),$rounds sub $in0,$out movups ($key),$rndkey0 # $key[0] + movups ($ivp),$iv # load IV movups 16($key),$rndkey[0] # forward reference lea 112($key),$key # size optimization Modified: head/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl Thu May 25 20:52:16 2017 (r318899) @@ -1333,7 +1333,7 @@ bsaes_cbc_encrypt: vmov @XMM[4],@XMM[15] @ just in case ensure that IV vmov @XMM[5],@XMM[0] @ and input are preserved bl AES_decrypt - vld1.8 {@XMM[0]}, [$fp,:64] @ load result + vld1.8 {@XMM[0]}, [$fp] @ load result veor @XMM[0], @XMM[0], @XMM[4] @ ^= IV vmov @XMM[15], @XMM[5] @ @XMM[5] holds input vst1.8 {@XMM[0]}, [$rounds] @ write output Modified: head/crypto/openssl/crypto/asn1/a_bitstr.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_bitstr.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/a_bitstr.c Thu May 25 20:52:16 2017 (r318899) @@ -114,10 +114,11 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *(p++) = (unsigned char)bits; d = a->data; - memcpy(p, d, len); - p += len; - if (len > 0) + if (len > 0) { + memcpy(p, d, len); + p += len; p[-1] &= (0xff << bits); + } *pp = p; return (ret); } Modified: head/crypto/openssl/crypto/asn1/a_digest.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_digest.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/a_digest.c Thu May 25 20:52:16 2017 (r318899) @@ -86,8 +86,10 @@ int ASN1_digest(i2d_of_void *i2d, const p = str; i2d(data, &p); - if (!EVP_Digest(str, i, md, len, type, NULL)) + if (!EVP_Digest(str, i, md, len, type, NULL)) { + OPENSSL_free(str); return 0; + } OPENSSL_free(str); return (1); } @@ -104,8 +106,10 @@ int ASN1_item_digest(const ASN1_ITEM *it if (!str) return (0); - if (!EVP_Digest(str, i, md, len, type, NULL)) + if (!EVP_Digest(str, i, md, len, type, NULL)) { + OPENSSL_free(str); return 0; + } OPENSSL_free(str); return (1); } Modified: head/crypto/openssl/crypto/asn1/a_gentm.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_gentm.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/a_gentm.c Thu May 25 20:52:16 2017 (r318899) @@ -202,7 +202,7 @@ int asn1_generalizedtime_to_tm(struct tm if (a[o] == 'Z') o++; else if ((a[o] == '+') || (a[o] == '-')) { - int offsign = a[o] == '-' ? -1 : 1, offset = 0; + int offsign = a[o] == '-' ? 1 : -1, offset = 0; o++; if (o + 4 > l) goto err; Modified: head/crypto/openssl/crypto/asn1/a_strnid.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_strnid.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/a_strnid.c Thu May 25 20:52:16 2017 (r318899) @@ -192,7 +192,8 @@ static const ASN1_STRING_TABLE tbl_stand {NID_name, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK}, {NID_domainComponent, 1, -1, B_ASN1_IA5STRING, STABLE_NO_MASK}, - {NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK} + {NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}, + {NID_jurisdictionCountryName, 2, 2, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK} }; static int sk_table_cmp(const ASN1_STRING_TABLE *const *a, Modified: head/crypto/openssl/crypto/asn1/a_time.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_time.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/a_time.c Thu May 25 20:52:16 2017 (r318899) @@ -137,7 +137,7 @@ int ASN1_TIME_check(ASN1_TIME *t) ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out) { - ASN1_GENERALIZEDTIME *ret; + ASN1_GENERALIZEDTIME *ret = NULL; char *str; int newlen; @@ -146,22 +146,21 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_gener if (!out || !*out) { if (!(ret = ASN1_GENERALIZEDTIME_new())) - return NULL; - if (out) - *out = ret; - } else + goto err; + } else { ret = *out; + } /* If already GeneralizedTime just copy across */ if (t->type == V_ASN1_GENERALIZEDTIME) { if (!ASN1_STRING_set(ret, t->data, t->length)) - return NULL; - return ret; + goto err; + goto done; } /* grow the string */ if (!ASN1_STRING_set(ret, NULL, t->length + 2)) - return NULL; + goto err; /* ASN1_STRING_set() allocated 'len + 1' bytes. */ newlen = t->length + 2 + 1; str = (char *)ret->data; @@ -173,9 +172,18 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_gener BUF_strlcat(str, (char *)t->data, newlen); - return ret; + done: + if (out != NULL && *out == NULL) + *out = ret; + return ret; + + err: + if (out == NULL || *out != ret) + ASN1_GENERALIZEDTIME_free(ret); + return NULL; } + int ASN1_TIME_set_string(ASN1_TIME *s, const char *str) { ASN1_TIME t; Modified: head/crypto/openssl/crypto/asn1/a_utctm.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_utctm.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/a_utctm.c Thu May 25 20:52:16 2017 (r318899) @@ -172,7 +172,7 @@ int asn1_utctime_to_tm(struct tm *tm, co if (a[o] == 'Z') o++; else if ((a[o] == '+') || (a[o] == '-')) { - int offsign = a[o] == '-' ? -1 : 1, offset = 0; + int offsign = a[o] == '-' ? 1 : -1, offset = 0; o++; if (o + 4 > l) goto err; Modified: head/crypto/openssl/crypto/asn1/f_enum.c ============================================================================== --- head/crypto/openssl/crypto/asn1/f_enum.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/f_enum.c Thu May 25 20:52:16 2017 (r318899) @@ -138,7 +138,7 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_EN bufp = (unsigned char *)buf; if (first) { first = 0; - if ((bufp[0] == '0') && (buf[1] == '0')) { + if ((bufp[0] == '0') && (bufp[1] == '0')) { bufp += 2; i -= 2; } Modified: head/crypto/openssl/crypto/asn1/f_int.c ============================================================================== --- head/crypto/openssl/crypto/asn1/f_int.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/f_int.c Thu May 25 20:52:16 2017 (r318899) @@ -152,7 +152,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEG bufp = (unsigned char *)buf; if (first) { first = 0; - if ((bufp[0] == '0') && (buf[1] == '0')) { + if ((bufp[0] == '0') && (bufp[1] == '0')) { bufp += 2; i -= 2; } Modified: head/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- head/crypto/openssl/crypto/asn1/tasn_dec.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/tasn_dec.c Thu May 25 20:52:16 2017 (r318899) @@ -673,6 +673,7 @@ static int asn1_template_noexp_d2i(ASN1_ } len -= p - q; if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val, skfield)) { + ASN1_item_ex_free(&skfield, ASN1_ITEM_ptr(tt->item)); ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, ERR_R_MALLOC_FAILURE); goto err; } Modified: head/crypto/openssl/crypto/asn1/tasn_new.c ============================================================================== --- head/crypto/openssl/crypto/asn1/tasn_new.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/tasn_new.c Thu May 25 20:52:16 2017 (r318899) @@ -158,7 +158,7 @@ static int asn1_item_ex_combine_new(ASN1 } asn1_set_choice_selector(pval, -1, it); if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL)) - goto auxerr; + goto auxerr2; break; case ASN1_ITYPE_NDEF_SEQUENCE: @@ -186,10 +186,10 @@ static int asn1_item_ex_combine_new(ASN1 for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) { pseqval = asn1_get_field_ptr(pval, tt); if (!ASN1_template_new(pseqval, tt)) - goto memerr; + goto memerr2; } if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL)) - goto auxerr; + goto auxerr2; break; } #ifdef CRYPTO_MDEBUG @@ -198,6 +198,8 @@ static int asn1_item_ex_combine_new(ASN1 #endif return 1; + memerr2: + ASN1_item_ex_free(pval, it); memerr: ASN1err(ASN1_F_ASN1_ITEM_EX_COMBINE_NEW, ERR_R_MALLOC_FAILURE); #ifdef CRYPTO_MDEBUG @@ -206,9 +208,10 @@ static int asn1_item_ex_combine_new(ASN1 #endif return 0; + auxerr2: + ASN1_item_ex_free(pval, it); auxerr: ASN1err(ASN1_F_ASN1_ITEM_EX_COMBINE_NEW, ASN1_R_AUX_ERROR); - ASN1_item_ex_free(pval, it); #ifdef CRYPTO_MDEBUG if (it->sname) CRYPTO_pop_info(); Modified: head/crypto/openssl/crypto/asn1/x_long.c ============================================================================== --- head/crypto/openssl/crypto/asn1/x_long.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/x_long.c Thu May 25 20:52:16 2017 (r318899) @@ -126,7 +126,7 @@ static int long_i2c(ASN1_VALUE **pval, u * set. */ if (ltmp < 0) - utmp = -ltmp - 1; + utmp = 0 - (unsigned long)ltmp - 1; else utmp = ltmp; clen = BN_num_bits_word(utmp); @@ -155,19 +155,41 @@ static int long_i2c(ASN1_VALUE **pval, u static int long_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) { - int neg, i; + int neg = -1, i; long ltmp; unsigned long utmp = 0; char *cp = (char *)pval; + + if (len) { + /* + * Check possible pad byte. Worst case, we're skipping past actual + * content, but since that's only with 0x00 and 0xff and we set neg + * accordingly, the result will be correct in the end anyway. + */ + switch (cont[0]) { + case 0xff: + cont++; + len--; + neg = 1; + break; + case 0: + cont++; + len--; + neg = 0; + break; + } + } if (len > (int)sizeof(long)) { ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); return 0; } - /* Is it negative? */ - if (len && (cont[0] & 0x80)) - neg = 1; - else - neg = 0; + if (neg == -1) { + /* Is it negative? */ + if (len && (cont[0] & 0x80)) + neg = 1; + else + neg = 0; + } utmp = 0; for (i = 0; i < len; i++) { utmp <<= 8; @@ -178,8 +200,8 @@ static int long_c2i(ASN1_VALUE **pval, c } ltmp = (long)utmp; if (neg) { - ltmp++; ltmp = -ltmp; + ltmp--; } if (ltmp == it->size) { ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); Modified: head/crypto/openssl/crypto/asn1/x_name.c ============================================================================== --- head/crypto/openssl/crypto/asn1/x_name.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/asn1/x_name.c Thu May 25 20:52:16 2017 (r318899) @@ -178,6 +178,16 @@ static void x509_name_ex_free(ASN1_VALUE *pval = NULL; } +static void local_sk_X509_NAME_ENTRY_free(STACK_OF(X509_NAME_ENTRY) *ne) +{ + sk_X509_NAME_ENTRY_free(ne); +} + +static void local_sk_X509_NAME_ENTRY_pop_free(STACK_OF(X509_NAME_ENTRY) *ne) +{ + sk_X509_NAME_ENTRY_pop_free(ne, X509_NAME_ENTRY_free); +} + static int x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, @@ -228,13 +238,14 @@ static int x509_name_ex_d2i(ASN1_VALUE * entry->set = i; if (!sk_X509_NAME_ENTRY_push(nm.x->entries, entry)) goto err; + sk_X509_NAME_ENTRY_set(entries, j, NULL); } - sk_X509_NAME_ENTRY_free(entries); } - sk_STACK_OF_X509_NAME_ENTRY_free(intname.s); ret = x509_name_canon(nm.x); if (!ret) goto err; + sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s, + local_sk_X509_NAME_ENTRY_free); nm.x->modified = 0; *val = nm.a; *in = p; @@ -242,6 +253,8 @@ static int x509_name_ex_d2i(ASN1_VALUE * err: if (nm.x != NULL) X509_NAME_free(nm.x); + sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s, + local_sk_X509_NAME_ENTRY_pop_free); ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR); return 0; } @@ -267,16 +280,6 @@ static int x509_name_ex_i2d(ASN1_VALUE * return ret; } -static void local_sk_X509_NAME_ENTRY_free(STACK_OF(X509_NAME_ENTRY) *ne) -{ - sk_X509_NAME_ENTRY_free(ne); -} - -static void local_sk_X509_NAME_ENTRY_pop_free(STACK_OF(X509_NAME_ENTRY) *ne) -{ - sk_X509_NAME_ENTRY_pop_free(ne, X509_NAME_ENTRY_free); -} - static int x509_name_encode(X509_NAME *a) { union { @@ -299,8 +302,10 @@ static int x509_name_encode(X509_NAME *a entries = sk_X509_NAME_ENTRY_new_null(); if (!entries) goto memerr; - if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname.s, entries)) + if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname.s, entries)) { + sk_X509_NAME_ENTRY_free(entries); goto memerr; + } set = entry->set; } if (!sk_X509_NAME_ENTRY_push(entries, entry)) @@ -370,8 +375,10 @@ static int x509_name_canon(X509_NAME *a) entries = sk_X509_NAME_ENTRY_new_null(); if (!entries) goto err; - if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)) + if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)) { + sk_X509_NAME_ENTRY_free(entries); goto err; + } set = entry->set; } tmpentry = X509_NAME_ENTRY_new(); Modified: head/crypto/openssl/crypto/bio/b_print.c ============================================================================== --- head/crypto/openssl/crypto/bio/b_print.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/bio/b_print.c Thu May 25 20:52:16 2017 (r318899) @@ -502,7 +502,7 @@ fmtint(char **sbuffer, if (!(flags & DP_F_UNSIGNED)) { if (value < 0) { signvalue = '-'; - uvalue = -value; + uvalue = -(unsigned LLONG)value; } else if (flags & DP_F_PLUS) signvalue = '+'; else if (flags & DP_F_SPACE) Modified: head/crypto/openssl/crypto/bio/bio_cb.c ============================================================================== --- head/crypto/openssl/crypto/bio/bio_cb.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/bio/bio_cb.c Thu May 25 20:52:16 2017 (r318899) @@ -78,6 +78,9 @@ long MS_CALLBACK BIO_debug_callback(BIO len = BIO_snprintf(buf,sizeof buf,"BIO[%p]: ",(void *)bio); + /* Ignore errors and continue printing the other information. */ + if (len < 0) + len = 0; p = buf + len; p_maxlen = sizeof(buf) - len; Modified: head/crypto/openssl/crypto/bio/bss_file.c ============================================================================== --- head/crypto/openssl/crypto/bio/bss_file.c Thu May 25 19:39:16 2017 (r318898) +++ head/crypto/openssl/crypto/bio/bss_file.c Thu May 25 20:52:16 2017 (r318899) @@ -251,7 +251,7 @@ static int MS_CALLBACK file_read(BIO *b, ret = fread(out, 1, (int)outl, (FILE *)b->ptr); if (ret == 0 && (b->flags & BIO_FLAGS_UPLINK) ? UP_ferror((FILE *)b->ptr) : - ferror((FILE *)b->ptr)) { + ferror((FILE *)b->ptr)) { SYSerr(SYS_F_FREAD, get_last_sys_error()); BIOerr(BIO_F_FILE_READ, ERR_R_SYS_LIB); ret = -1; @@ -287,6 +287,7 @@ static long MS_CALLBACK file_ctrl(BIO *b FILE *fp = (FILE *)b->ptr; FILE **fpp; char p[4]; + int st; switch (cmd) { case BIO_C_FILE_SEEK: @@ -318,8 +319,11 @@ static long MS_CALLBACK file_ctrl(BIO *b # if defined(__MINGW32__) && defined(__MSVCRT__) && !defined(_IOB_ENTRIES) # define _IOB_ENTRIES 20 # endif -# if defined(_IOB_ENTRIES) /* Safety net to catch purely internal BIO_set_fp calls */ +# if defined(_MSC_VER) && _MSC_VER>=1900 + if (ptr == stdin || ptr == stdout || ptr == stderr) + BIO_clear_flags(b, BIO_FLAGS_UPLINK); +# elif defined(_IOB_ENTRIES) if ((size_t)ptr >= (size_t)stdin && (size_t)ptr < (size_t)(stdin + _IOB_ENTRIES)) BIO_clear_flags(b, BIO_FLAGS_UPLINK); @@ -424,10 +428,14 @@ static long MS_CALLBACK file_ctrl(BIO *b b->shutdown = (int)num; break; case BIO_CTRL_FLUSH: - if (b->flags & BIO_FLAGS_UPLINK) - UP_fflush(b->ptr); - else - fflush((FILE *)b->ptr); + st = b->flags & BIO_FLAGS_UPLINK + ? UP_fflush(b->ptr) : fflush((FILE *)b->ptr); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 25 21:11:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5C74D82E17; Thu, 25 May 2017 21:11:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A3281A18; Thu, 25 May 2017 21:11:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PLBPpU023931; Thu, 25 May 2017 21:11:25 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PLBPPq023930; Thu, 25 May 2017 21:11:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705252111.v4PLBPPq023930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 May 2017 21:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318900 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 21:11:26 -0000 Author: bapt Date: Thu May 25 21:11:25 2017 New Revision: 318900 URL: https://svnweb.freebsd.org/changeset/base/318900 Log: update to 2017.05.25 MFC after: 2 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Thu May 25 20:52:16 2017 (r318899) +++ head/share/misc/pci_vendors Thu May 25 21:11:25 2017 (r318900) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.04.03 -# Date: 2017-04-03 03:15:02 +# Version: 2017.05.25 +# Date: 2017-05-25 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -76,16 +76,16 @@ 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. - 0105 Rhino R1T1 - 0205 Rhino R4FXO + 0105 R1T1 + 0205 R4FXO 0206 RCB4FXO 4-channel FXO analog telphony card - 0305 Rhino R4T1 - 0405 Rhino R8FXX + 0305 R4T1 + 0405 R8FXX 0406 RCB8FXX 8-channel modular analog telphony card - 0505 Rhino R24FXX + 0505 R24FXX 0506 RCB24FXS 24-Channel FXS analog telphony card - 0605 Rhino R2T1 - 0705 Rhino R24FXS + 0605 R2T1 + 0705 R24FXS 0706 RCB24FXO 24-Channel FXO analog telphony card 0905 R1T3 Single T3 Digital Telephony Card 0906 RCB24FXX 24-channel modular analog telphony card @@ -249,6 +249,7 @@ 0014 MegaRAID Tri-Mode SAS3516 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter + 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 0015 MegaRAID Tri-Mode SAS3416 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -430,6 +431,7 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 30c0 SAS 9201-16i 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] @@ -544,6 +546,7 @@ 0097 SAS3008 PCI-Express Fusion-MPT SAS-3 1000 3090 SAS9311-8i 1000 30e0 SAS9300-8i + 1000 3130 SAS 9300-16i 1028 1f45 HBA330 Adapter 1028 1f46 12Gbps HBA 1028 1f53 HBA330 Mini @@ -1100,7 +1103,7 @@ 1028 0085 Rage 3D LT Pro 4c46 Rage Mobility 128 AGP 2X/Mobility M3 1002 0155 IBM Thinkpad A22p - 1014 0155 IBM Thinkpad A22p + 1014 0155 Thinkpad A22p 1028 00b1 Latitude C600 4c47 3D Rage IIC PCI / Mobility Radeon 7500/7500C 4c49 3D Rage LT PRO PCI @@ -2213,6 +2216,7 @@ 1043 04a8 Radeon RX 480 1043 04b0 Radeon RX 470 1043 04fb Radeon RX 480 + 1043 04fd Radeon RX 480 8GB 1462 3411 Radeon RX 470 1462 3413 Radeon RX 480 148c 2372 Radeon RX 480 @@ -2939,7 +2943,7 @@ 6985 Polaris12 6986 Polaris12 6987 Polaris12 - 699f Polaris12 + 699f Lexa PRO [Radeon RX 550] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -3955,6 +3959,7 @@ 1438 Liverpool Processor Root Port 1439 Family 16h Processor Functions 5:1 145b Zeppelin Non-Transparent Bridge + 145c USB3 Host Controller 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4039,6 +4044,7 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) + 43bb USB 3.1 XHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -6025,9 +6031,9 @@ 1077 e4f8 FastLinQ QL45611H 100GbE Adapter (SR-IOV VF) 2020 ISP2020A Fast!SCSI Basic Adapter 2031 ISP8324-based 16Gb Fibre Channel to PCI Express Adapter - 103c 17e7 HP SN1000Q 16Gb Single Port Fibre Channel Adapter - 103c 17e8 HP SN1000Q 16Gb Dual Port Fibre Channel Adapter - 103c 1939 HP QMH2672 16Gb Dual Port Fibre Channel Adapter + 103c 17e7 SN1000Q 16Gb Single Port Fibre Channel Adapter + 103c 17e8 SN1000Q 16Gb Dual Port Fibre Channel Adapter + 103c 1939 QMH2672 16Gb Dual Port Fibre Channel Adapter 103c 8002 3830C 16G Fibre Channel Host Bus Adapter 2071 ISP2714-based 16/32Gb Fibre Channel to PCIe Adapter 1077 0283 QLE2764 Quad Port 32Gb Fibre Channel to PCIe Adapter @@ -6047,10 +6053,10 @@ 1077 02a8 QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter 1077 02ab QLE2740 Single Port 32Gb FC to PCIe Gen3 x8 Adapter 1077 02ac QLE2742 Dual Port 32Gb FC to PCIe Gen3 x8 Adapter - 1590 00f9 HPE StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter - 1590 00fa HPE StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter - 1590 0203 HPE StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter - 1590 0204 HPE StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter + 1590 00f9 StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter + 1590 00fa StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter + 1590 0203 StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter + 1590 0204 StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter 2300 QLA2300 64-bit Fibre Channel Adapter 2312 ISP2312-based 2Gb Fibre Channel to PCI-X HBA 103c 0131 2Gb Fibre Channel - Single port [A7538A] @@ -6065,7 +6071,7 @@ 103c 3262 StorageWorks 81Q 103c 3263 StorageWorks 82Q 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine - 1590 00fc HPE StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter + 1590 00fc StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter 3022 ISP4022-based Ethernet NIC 3032 ISP4032-based Ethernet IPv6 NIC 4010 ISP4010-based iSCSI TOE HBA @@ -8954,7 +8960,7 @@ 0396 G73 0397 G73M [GeForce Go 7700] 0398 G73M [GeForce Go 7600] - 1025 006c Acer 9814 WKMI + 1025 006c Aspire 9814WKMi 0399 G73M [GeForce Go 7600 GT] 039a G73M [Quadro NVS 300M] 039b G73M [GeForce Go 7900 SE] @@ -9912,6 +9918,7 @@ 0dfa GF108GLM [Quadro 1000M] 0dfc GF108GLM [NVS 5200M] 0e08 GF119 HDMI Audio Controller + 1043 83a0 ENGT520 SILENT # 1024MB with passive cooling (heatsink) 10b0 104a Gainward GeForce GT 610 0e09 GF110 High Definition Audio Controller @@ -10045,6 +10052,7 @@ 103a GK110GL [Quadro K6000] 103c GK110GL [Quadro K5200] 1040 GF119 [GeForce GT 520] + 1043 83a0 ENGT520 SILENT 1042 GF119 [GeForce 510] 1048 GF119 [GeForce 605] 1049 GF119 [GeForce GT 620 OEM] @@ -10694,6 +10702,7 @@ 17fd GM200GL [Tesla M40] 1b00 GP102 [TITAN X] 1b01 GP102 + 1b02 GP102 [TITAN Xp] 1b06 GP102 [GeForce GTX 1080 Ti] 1b30 GP102GL [Quadro P6000] 1b38 GP102GL [Tesla P40] @@ -10738,7 +10747,7 @@ 1cb1 GP107GL [Quardo P1000] 1cb2 GP107GL [Quardo P600] 1cb3 GP107GL [Quardo P400] - 1d01 GP108 + 1d01 GP108 [GeForce GT 1030] 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -10771,6 +10780,12 @@ e260 OneConnect FCoE Initiator (Lancer) e268 OneConnect 10Gb FCoE Converged Network Adapter (Lancer-VF) e300 Lancer Gen6: LPe32000 Fibre Channel Host Adapter + 10df e310 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e311 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e312 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e322 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e323 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e325 Lancer Gen6: LPe31000 Fibre Channel Host Adapter f011 Saturn: LightPulse Fibre Channel Host Adapter f015 Saturn: LightPulse Fibre Channel Host Adapter f085 LP850 Fibre Channel Host Adapter @@ -11562,8 +11577,8 @@ 1043 8095 A7V8X Motherboard (Realtek ALC650 codec) 1043 80a1 A7V8X-X Motherboard 1043 80b0 A7V600/K8V-X/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX]) - 1043 80f3 ASUSTek SK8V motherboard - 1043 810d Asus P5VD1-X (AD1888 codec [SoundMax]) + 1043 80f3 SK8V motherboard + 1043 810d P5VD1-X (AD1888 codec [SoundMax]) 1043 812a A8V Deluxe motherboard (Realtek ALC850 codec) 10ec 8168 High Definition Audio 1106 3059 L7VMM2 Motherboard @@ -12248,7 +12263,7 @@ 0070 6701 WinTV HVR-1110 1019 4cb5 Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) 1043 0210 FlyTV mini Asus Digimatrix - 1043 4843 ASUS TV-FM 7133 + 1043 4843 TV-FM 7133 1043 4845 TV-FM 7135 1043 4862 P7131 Dual 1043 4876 My Cinema-P7131 Hybrid @@ -12322,7 +12337,7 @@ 0000 4071 Behold TV 407 FM 1019 4cb4 Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) 1043 0210 Digimatrix TV - 1043 4840 ASUS TV-FM 7134 + 1043 4840 TV-FM 7134 1043 4842 TV-FM 7134 1131 0000 SAA713x-based TV tuner card 1131 2004 EUROPA V3 reference design @@ -13039,7 +13054,7 @@ 103c 30c1 Compaq 6910p 1043 1237 A6J-Q008 1043 1967 V6800V - 1043 1987 Asus A4K and Z81K notebooks, possibly others ( mid-2005 machines ) + 1043 1987 A4K and Z81K notebooks, possibly others ( mid-2005 machines ) 104d 80df Vaio PCG-FX403 104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP 104d 814e VAIO GRZ390Z @@ -13048,7 +13063,7 @@ 144d c00c P30/P35 notebook 14ef 0220 PCD-RP-220S 17aa 201c ThinkPad X60/X60s - 17aa 20c4 ThinkPad T61 + 17aa 20c4 ThinkPad T61/R61 17aa 20c6 ThinkPad R61 0477 RL5c477 0478 RL5c478 @@ -13098,7 +13113,7 @@ 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop 1043 1237 A6J-Q008 - 1043 1967 ASUS V6800V + 1043 1967 V6800V 10f7 8338 Panasonic CF-Y5 laptop 144d c018 X20 IV 17aa 201d ThinkPad X60/X60s @@ -13114,14 +13129,15 @@ 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop + 17aa 20c5 ThinkPad R61 17aa 20c7 ThinkPad R61 0841 R5C841 CardBus/SD/SDIO/MMC/MS/MSPro/xD/IEEE1394 0843 R5C843 MMC Host Controller 1025 0121 Aspire 5920G 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 - 1028 01f5 Dell Inspiron 1501 - 1028 024f Dell Latitude e6500 + 1028 01f5 Inspiron 1501 + 1028 024f Latitude e6500 103c 03b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cf Pavilion dv9500/9600/9700 series @@ -13144,9 +13160,11 @@ 1028 040a Latitude E6410 1028 040b Latitude E6510 e823 PCIe SDXC/MMC Host Controller + 17aa 21cf ThinkPad T520 e832 R5C832 PCIe IEEE 1394 Controller 1028 040a Latitude E6410 1028 040b Latitude E6510 + 17aa 21cf ThinkPad T520 e852 PCIe xD-Picture Card Controller 1181 Telmatics International 1183 Fujikura Ltd @@ -15143,7 +15161,7 @@ 0206 GPS180PEX GPS Receiver (PCI Express) 0207 GLN180PEX GPS/GLONASS receiver (PCI Express) 0208 GPS180AMC GPS Receiver (PCI Express / MicroTCA / AdvancedMC) - 0209 GRC181PEX GPS/GLONASS/BEIDOU receiver (PCI Express) + 0209 GNS181PEX GPS/Galileo/GLONASS/BEIDOU receiver (PCI Express) 0301 TCR510PCI IRIG Timecode Reader 0302 TCR167PCI IRIG Timecode Reader 0303 TCR511PCI IRIG Timecode Reader @@ -15746,8 +15764,8 @@ 1409 0103 PAR4008A 1409 0104 PAR4018A 140a DSP Research Inc -# Formerly RAMiX, Inc. -140b GE Intelligent Platforms +# Formerly RAMiX, GE Fanuc, GE Intelligent Platforms +140b Abaco Systems, Inc. 140c Elmic Systems Inc 140d Matsushita Electric Works Ltd 140e Goepel Electronic GmbH @@ -16062,6 +16080,7 @@ 509e T520-509E Unified Wire Ethernet Controller 509f T540-509F Unified Wire Ethernet Controller 50a0 T540-50A0 Unified Wire Ethernet Controller + 50a1 T540-50A1 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16113,6 +16132,7 @@ 549e T520-509E Unified Wire Ethernet Controller 549f T540-509F Unified Wire Ethernet Controller 54a0 T540-50A0 Unified Wire Ethernet Controller + 54a1 T540-50A1 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16164,6 +16184,7 @@ 559e T520-509E Unified Wire Storage Controller 559f T540-509F Unified Wire Storage Controller 55a0 T540-50A0 Unified Wire Storage Controller + 55a1 T540-50A1 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16215,6 +16236,7 @@ 569e T520-509E Unified Wire Storage Controller 569f T540-509F Unified Wire Storage Controller 56a0 T540-50A0 Unified Wire Storage Controller + 56a1 T540-50A1 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16305,6 +16327,7 @@ 589e T520-509E Unified Wire Ethernet Controller [VF] 589f T540-509F Unified Wire Ethernet Controller [VF] 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] + 58a1 T540-50A1 Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16470,6 +16493,8 @@ 1028 1fc2 Express Flash NVMe PM1725 1.6TB SFF 1028 1fc4 Express Flash NVMe PM1725 1.6TB AIC a822 NVMe SSD Controller 172Xa + 1014 0621 PCIe3 1.6TB NVMe Flash Adapter II x8 + 1014 0622 PCIe3 3.2TB NVMe Flash Adapter II x8 1028 1fd9 Express Flash PM1725a 800GB SFF 1028 1fda Express Flash PM1725a 1.6TB SFF 1028 1fdb Express Flash PM1725a 3.2TB SFF @@ -16663,7 +16688,10 @@ 14ca PE Logic Corp. 14cb Billionton Systems Inc 14cc NAKAYO Telecommunications Inc -14cd Universal Scientific Ind. +14cd Universal Global Scientific Industrial Co.,Ltd + 0001 USI-1514-1GbaseT [OCP1] + 0002 USI-4227-SFP [OCP2] + 0003 USI-X557-10GbaseT [OCP3] 14ce Whistle Communications 14cf TEK Microsystems Inc. 14d0 Ericsson Axe R & D @@ -16767,6 +16795,7 @@ 1028 02f1 PowerEdge R510 BCM5716 Gigabit Ethernet 163c NetXtreme II BCM5716S Gigabit Ethernet 163d NetXtreme II BCM57811 10-Gigabit Ethernet + 1043 858a PEB-10G/57811-1S 163e NetXtreme II BCM57811 10 Gigabit Ethernet Multi Function 163f NetXtreme II BCM57811 10-Gigabit Ethernet Virtual Function 1641 NetXtreme BCM57787 Gigabit Ethernet PCIe @@ -16892,7 +16921,7 @@ 1734 1061 PRIMERGY RX/TX S2 series onboard LAN 165a NetXtreme BCM5722 Gigabit Ethernet PCI Express # Dual NIC server - 1014 0378 IBM System x3350 (Machine type 4192) + 1014 0378 System x3350 (Machine type 4192) 1028 020f PowerEdge R300 Broadcom NetXtreme 5722 1028 0210 PowerEdge T300 Broadcom NetXtreme 5722 1028 0225 PowerEdge T105 Broadcom NetXtreme 5722 @@ -16992,6 +17021,7 @@ 1693 NetLink BCM5787M Gigabit Ethernet PCI Express 1025 0121 Aspire 5920G 103c 30c0 6710b + 17aa 20d5 ThinkPad R61 1694 NetLink BCM57790 Gigabit Ethernet PCIe 1696 NetXtreme BCM5782 Gigabit Ethernet 103c 12bc d530 CMT (DG746A) @@ -17128,6 +17158,8 @@ 16d5 BCM57407 NetXtreme-E 10GBase-T Ethernet Controller 16d6 BCM57412 NetXtreme-E 10Gb RDMA Ethernet Controller 16d7 BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller + 14e4 1202 BCM957412M4122 OCP 1x25G Type1 wRoCE + 14e4 1404 BCM957414M4142 OCP 2x25G Type1 wRoCE 1590 020e Ethernet 25Gb 2-port 631SFP28 Adapter 1590 0211 Ethernet 25Gb 2-port 631FLR-SFP28 Adapter 16d8 BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller @@ -17622,7 +17654,7 @@ 1002 00f8 ATI TV Wonder Pro 1002 00f9 ATI TV Wonder 1002 a101 HDTV Wonder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 6611 Winfast TV 2000XP Expert 107d 6613 Leadtek Winfast 2000XP Expert 107d 6620 Leadtek Winfast DV2000 @@ -17668,7 +17700,7 @@ 0070 9002 Nova-T DVB-T Model 909 0070 9402 WinTV-HVR1100 DVB-T/Hybrid 0070 9600 WinTV 88x MPEG Encoder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 663c Leadtek PVR 2000 107d 665f WinFast DTV1000-T 14f1 0187 Conexant DVB-T reference design @@ -18099,6 +18131,18 @@ 103c 18ce InfiniBand QDR/EN 10Gb Dual Port 544M Adapter 103c 18cf InfiniBand FDR/EN 10/40Gb Dual Port 544M Adapter 103c 18d6 InfiniBand FDR/EN 10/40Gb Dual Port 544QSFP Adapter + 15b3 0025 ConnectX-3 IB QDR Dual Port Mezzanine Card + 15b3 0026 ConnectX-3 IB FDR Dual Port Mezzanine Card + 15b3 0059 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Mezzanine Card + 15b3 0065 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Adapter + 15b3 0066 ConnectX-3 IB FDR10 Dual Port Mezzanine Card + 15b3 0067 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Adapter + 15b3 0071 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Mezzanine Card +# SVID = 15B3 SSID = 0078 + 15b3 0078 ConnectX-3 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 40 GbE Dual Port QSFP+ Adapter +# SVID = 15B3 SSID = 0080 + 15b3 0080 ConnectX-3 10 GbE Dual Port SFP+ Adapter 1004 MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] 1005 MT27510 Family 1006 MT27511 Family @@ -18111,6 +18155,9 @@ 117c 0091 FastFrame NQ42 117c 0092 FastFrame NQ11 117c 0093 FastFrame NQ12 + 15b3 0078 ConnectX-3 Pro 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 Pro 40 GbE Dual Port QSFP+ Adapter + 15b3 0080 ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter 1009 MT27530 Family 100a MT27531 Family 100b MT27540 Family @@ -18122,8 +18169,16 @@ 1011 MT27600 [Connect-IB] 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] + 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 + 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter + 15b3 0034 ConnectX-4 VPI IB EDR/100 GbE Dual Port QSFP28 Adapter + 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter + 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb + 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G + 15b3 0025 ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC 1016 MT27710 Family [ConnectX-4 Lx Virtual Function] 1017 MT27800 Family [ConnectX-5] 1018 MT27800 Family [ConnectX-5 Virtual Function] @@ -18711,6 +18766,7 @@ 0033 AR958x 802.11abgn Wireless Network Adapter 168c a120 AR9582 802.11a/n WLAN Mini-PCIe Adapter 0034 AR9462 Wireless Network Adapter + 1028 020b Wireless 1601 802.11abgn Adapter 1028 0300 Wireless 1802 802.11abgn Adapter 1a56 2003 Killer Wireless-N 1202 Half-size Mini PCIe Card 0036 QCA9565 / AR9565 Wireless Network Adapter @@ -20220,7 +20276,12 @@ 1af4 1100 QEMU Virtual Machine 0006 PCI Rocker Ethernet switch device 0007 PCI SD Card Host Controller Interface + 0008 QEMU PCIe Host bridge + 0009 QEMU PCI Expander bridge 000a PCI-PCI bridge (multiseat) + 000b QEMU PCIe Expander bridge + 000c QEMU PCIe Root port + 000d QEMU XHCI Host Controller 0100 QXL paravirtual graphic card 1af4 1100 QEMU Virtual Machine 1b37 Signal Processing Devices Sweden AB @@ -20446,6 +20507,8 @@ 0006 ExaNIC X10-HPT 1cf7 Subspace Dynamics 1d00 Pure Storage +1d18 RME + 0001 Fireface UFX+ 1d1d CNEX Labs 1f1f QEMU NVM Express LightNVM Controller 2807 8800 series NVMe SSD @@ -20460,6 +20523,7 @@ 1d44 DPT a400 PM2x24/PM3224 1d49 Lenovo +1d4c Diamanti, Inc. 1d5c Fantasia Trading LLC 1d61 Technobox, Inc. 1d62 Nebbiolo Technologies @@ -21148,10 +21212,13 @@ 0001 I-30xx Scanner Interface 5555 Genroco, Inc 0003 TURBOstor HFP-832 [HiPPI NIC] + 3b00 Epiphan DVI2PCIe video capture card 5646 Vector Fabrics BV 5654 VoiceTronix Pty Ltd 5678 Dawicontrol Computersysteme GmbH 5700 Netpower +# alternately Extreme Engineering Solutions, Inc. +5845 X-ES, Inc. 584d AuzenTech Co., Ltd. 5851 Exacq Technologies 8008 tDVR8008 8-port video capture card @@ -21261,7 +21328,7 @@ 8086 1315 Centrino Wireless-N 1000 BGN 8086 1316 Centrino Wireless-N 1000 BG 0085 Centrino Advanced-N 6205 [Taylor Peak] - 8086 1311 Centrino Advanced-N 6205 AGN + 8086 1311 Centrino Advanced-N 6205 (802.11a/b/g/n) 8086 1316 Centrino Advanced-N 6205 ABG 0087 Centrino Advanced-N + WiMAX 6250 [Kilmer Peak] 8086 1301 Centrino Advanced-N + WiMAX 6250 2x2 AGN @@ -21307,6 +21374,7 @@ 1028 04da Vostro 3750 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 144d c652 NP300E5C series laptop + 17aa 21cf ThinkPad T520 0105 Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 0106 2nd Generation Core Processor Family Integrated Graphics Controller @@ -21324,6 +21392,7 @@ 0122 2nd Generation Core Processor Family Integrated Graphics Controller 0126 2nd Generation Core Processor Family Integrated Graphics Controller 1028 04cc Vostro 3350 + 17aa 21cf ThinkPad T520 0150 Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller 1043 84ca P8 series motherboard 15d9 0624 X9SCM-F Motherboard @@ -22821,8 +22890,9 @@ 4c53 1090 Cx9/Vx9 mainboard 1462 82870P2 P64H2 Hot Plug Controller 1501 82567V-3 Gigabit Network Connection - 1502 82579LM Gigabit Network Connection + 1502 82579LM Gigabit Network Connection (Lewisville) 1028 04a3 Precision M4600 + 17aa 21ce ThinkPad T520 8086 357a Server Board S1200BTS 1503 82579V Gigabit Network Connection 1043 849c P8P67 Deluxe Motherboard @@ -22961,6 +23031,8 @@ 1059 0111 T4007 1GbE interface 1059 0120 T4008 1GbE interface 1059 0130 T4009 1GbE interface + 1059 0140 T2035 1GbE interface + 1059 0150 RD-01068 1GbE interface 1538 I210 Gigabit Network Connection 1539 I211 Gigabit Network Connection 153a Ethernet Connection I217-LM @@ -23021,8 +23093,8 @@ 1028 1f99 Ethernet 10G 4P X710/I350 rNDC 1028 1f9c Ethernet 10G 4P X710 SFP+ rNDC 103c 0000 Ethernet 10Gb 562SFP+ Adapter - 103c 22fc HP Ethernet 10Gb 2-port 562FLR-SFP+ Adapter - 103c 22fd HP Ethernet 10Gb 2-port 562SFP+ Adapter + 103c 22fc Ethernet 10Gb 2-port 562FLR-SFP+ Adapter + 103c 22fd Ethernet 10Gb 2-port 562SFP+ Adapter 1137 0000 Ethernet Converged NIC X710-DA 1137 013b Ethernet Converged NIC X710-DA4 1137 020a Ethernet Converged NIC X710-DA2 @@ -23044,9 +23116,11 @@ 8086 000a Ethernet Controller X710 for 10GbE SFP+ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ + 8086 000e Ethernet Server Adapter OCP X710-2 8086 0010 Ethernet Converged Network Adapter X710 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ + 8086 4007 Ethernet Controller X710 for 10GbE SFP+ 1575 DSL6340 Thunderbolt 3 NHI [Alpine Ridge 2C 2015] 1576 DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015] 1577 DSL6540 Thunderbolt 3 NHI [Alpine Ridge 4C 2015] @@ -23060,6 +23134,7 @@ 1028 0000 Ethernet 10G X710-k bNDC 1028 1f98 Ethernet 10G 4P X710-k bNDC 1028 1f9e Ethernet 10G 2P X710-k bNDC + 1059 0150 RD-01068 10GbE-KR interface 1590 0000 Ethernet 2-port 563i Adapter 1590 00f8 Ethernet 2-port 563i Adapter 8086 0000 Ethernet Converged Network Adapter XL710-Q2 @@ -23087,8 +23162,8 @@ 108e 0000 Ethernet Controller X710 for 10GBASE-T 108e 4857 Ethernet Controller X710 for 10GBASE-T 1587 Ethernet Controller XL710 for 20GbE backplane - 103c 0000 HPE Ethernet 10/20Gb 2-port 660FLB Adapter - 103c 22fe HPE Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 0000 Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 22fe Ethernet 10/20Gb 2-port 660FLB Adapter 1588 Ethernet Controller XL710 for 20GbE backplane 103c 0000 Ethernet 10/20Gb 2-port 660M Adapter 103c 22ff Ethernet 10/20Gb 2-port 660M Adapter @@ -23099,6 +23174,7 @@ 8086 0001 Ethernet Converged Network Adapter X710-T4 8086 0002 Ethernet Converged Network Adapter X710-T4 8086 0003 Ethernet Converged Network Adapter X710-T + 8086 00a0 Ethernet Converged Network Adapter X710-T4 8086 1003 Ethernet Converged Network Adapter X710-T 158a Ethernet Controller XXV710 for 25GbE backplane 158b Ethernet Controller XXV710 for 25GbE SFP28 @@ -23111,6 +23187,7 @@ 8086 0006 Ethernet Network Adapter OCP XXV710-2 8086 0007 Ethernet Network Adapter OCP XXV710-1 8086 0008 Ethernet Network Adapter OCP XXV710-1 + 8086 4001 Ethernet Network Adapter XXV710-2 15a0 Ethernet Connection (2) I218-LM 15a1 Ethernet Connection (2) I218-V 15a2 Ethernet Connection (3) I218-LM @@ -23121,6 +23198,7 @@ 15a9 X552 Virtual Function 15aa Ethernet Connection X552 10 GbE Backplane 1059 0120 T4008 10GbE interface + 1059 0150 RD-01068 10GbE interface 15ab Ethernet Connection X552 10 GbE Backplane 15ac Ethernet Connection X552 10 GbE SFP+ 15ad Ethernet Connection X552/X557-AT 10GBASE-T @@ -23192,6 +23270,7 @@ 163b Broadwell-U Integrated Graphics 163d Broadwell-U Integrated Graphics 163e Broadwell-U Integrated Graphics + 1889 Ethernet Adaptive Virtual Function 1900 Skylake Host Bridge/DRAM Registers 1901 Skylake PCIe Controller (x16) 1902 HD Graphics 510 @@ -23294,37 +23373,43 @@ 1b48 82597EX 10GbE Ethernet Controller 8086 a01f PRO/10GbE LR Server Adapter 8086 a11f PRO/10GbE LR Server Adapter - 1c00 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c01 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c02 6 Series/C200 Series Chipset Family SATA AHCI Controller + 1c00 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 0-3) + 1c01 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 0-3) + 1c02 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller 1028 04aa XPS 8300 1043 844d P8 series motherboard 8086 7270 Server Board S1200BTS - 1c03 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller + 1c03 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller 1028 04a3 Precision M4600 1028 04b2 Vostro 3350 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] - 1c04 6 Series/C200 Series Chipset Family SATA RAID Controller + 1c04 6 Series/C200 Series Desktop SATA RAID Controller 103c 3118 Smart Array B110i SATA RAID Controller - 1c05 6 Series/C200 Series Chipset Family SATA RAID Controller - 1c08 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller - 1c09 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller + 1c05 6 Series/C200 Series Mobile SATA RAID Controller + 1c06 Z68 Express Chipset SATA RAID Controller + 1c08 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 4-5) + 1c09 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 4-5) 1c10 6 Series/C200 Series Chipset Family PCI Express Root Port 1 1028 04aa XPS 8300 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c12 6 Series/C200 Series Chipset Family PCI Express Root Port 2 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c14 6 Series/C200 Series Chipset Family PCI Express Root Port 3 1028 04da Vostro 3750 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c16 6 Series/C200 Series Chipset Family PCI Express Root Port 4 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 1c18 6 Series/C200 Series Chipset Family PCI Express Root Port 5 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS 1c1a 6 Series/C200 Series Chipset Family PCI Express Root Port 6 1028 04da Vostro 3750 @@ -23340,6 +23425,7 @@ 1028 04da Vostro 3750 1043 8418 P8P67 Deluxe Motherboard 1043 841b P8H67 Series Motherboard + 17aa 21cf ThinkPad T520 # Realtek ALC888 audio codec 8086 2008 DQ67SW board 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23349,6 +23435,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c24 6 Series/C200 Series Chipset Family Thermal Management Controller 1c25 6 Series/C200 Series Chipset Family DMI to PCI Bridge @@ -23358,6 +23445,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c27 6 Series/C200 Series Chipset Family USB Universal Host Controller #1 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23369,6 +23457,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c33 6 Series/C200 Series Chipset Family LAN Controller 1c35 6 Series/C200 Series Chipset Family VECI Controller @@ -23378,6 +23467,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c3b 6 Series/C200 Series Chipset Family MEI Controller #2 1c3c 6 Series/C200 Series Chipset Family IDE-r Controller @@ -23405,6 +23495,7 @@ 1c4e Q67 Express Chipset Family LPC Controller 1c4f QM67 Express Chipset Family LPC Controller 1028 04a3 Precision M4600 + 17aa 21cf ThinkPad T520 1c50 B65 Express Chipset Family LPC Controller 1c51 6 Series/C200 Series Chipset Family LPC Controller 1c52 C202 Chipset Family LPC Controller @@ -23532,12 +23623,12 @@ 1e1e 7 Series/C210 Series Chipset Family PCI Express Root Port 8 1849 1e1e Motherboard 1e20 7 Series/C216 Chipset Family High Definition Audio Controller - 1028 054b Dell XPS One 2710 + 1028 054b XPS One 2710 1043 108d VivoBook X202EV 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A 1043 8415 P8H77-I Motherboard - 1043 8445 ASUS P8Z77-V LX Motherboard + 1043 8445 P8Z77-V LX Motherboard 144d c652 NP300E5C series laptop 1849 1898 Z77 Extreme4 motherboard 1e22 7 Series/C216 Chipset Family SMBus Controller @@ -23685,10 +23776,10 @@ 201c Sky Lake-E Non-Transparent Bridge Registers 2021 Sky Lake-E CBDMA Registers 2024 Sky Lake-E MM/Vt-d Configuration Registers - 2030 Sky Lake-E PCI Express Root Port 1A - 2031 Sky Lake-E PCI Express Root Port 1B - 2032 Sky Lake-E PCI Express Root Port 1C - 2033 Sky Lake-E PCI Express Root Port 1D + 2030 Sky Lake-E PCI Express Root Port A + 2031 Sky Lake-E PCI Express Root Port B + 2032 Sky Lake-E PCI Express Root Port C + 2033 Sky Lake-E PCI Express Root Port D 2035 Sky Lake-E RAS Configuration Registers 204c Sky Lake-E M3KTI Registers 204d Sky Lake-E M3KTI Registers @@ -24533,7 +24624,7 @@ 258a E7221 Integrated Graphics Controller 2590 Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller 1014 0575 ThinkPad X41 / Z60t - 1028 0182 Dell Latitude C610 + 1028 0182 Latitude C610 103c 0934 Compaq nw8240/nx8220 103c 099c NX6110/NC6120 104d 81b7 Vaio VGN-S3XP @@ -24822,7 +24913,7 @@ 1014 05b7 ThinkPad Z60t # based on the PTGD1-LA motherboard 103c 2a09 PufferM-UL8E - 1043 1173 Asus A6VC + 1043 1173 A6VC 1043 814e P5GD1-VW Mainboard 1462 7028 915P/G Neo2 1af4 1100 QEMU Virtual Machine @@ -24848,7 +24939,7 @@ 1028 0177 Dimension 8400 1028 0179 Optiplex GX280 1028 0182 Latitude D610 Laptop - 1028 0187 Dell Precision M70 Laptop + 1028 0187 Precision M70 Laptop 1028 0188 Inspiron 6000 laptop 103c 0934 Compaq nw8240/nx8220 103c 0944 Compaq NC6220 @@ -25222,7 +25313,7 @@ 103c 30a3 Compaq nw8440 103c 30d5 530 Laptop 1043 1123 A6J-Q008 - 1043 13c4 Asus G2P + 1043 13c4 G2P 1043 817f P5LD2-VM Mainboard (Realtek ALC 882 codec) 1043 8290 P5KPL-VM Motherboard 1043 82ea P5KPL-CM Motherboard @@ -25240,7 +25331,7 @@ 152d 0753 Softmodem 1734 10ad Conexant softmodem SmartCP 17aa 2010 ThinkPad R60/T60/X60 series - 17aa 3802 Lenovo 3000 C200 audio [Realtek ALC861VD] + 17aa 3802 3000 C200 audio [Realtek ALC861VD] 8086 1112 DeskTop Board D945GTP 8086 27d8 DeskTop Board D945GTP 8086 d618 DeskTop Board D510MO @@ -25311,6 +25402,7 @@ 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E + 17aa 20a5 ThinkPad R61 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2820 82801H (ICH8 Family) 4 port SATA Controller [IDE mode] 1028 01da OptiPlex 745 @@ -25337,6 +25429,7 @@ 2828 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [IDE mode] 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b + 17aa 20a8 ThinkPad R61 e4bf cc47 CCG-RUMBA 2829 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] 1025 0121 Aspire 5920G @@ -25353,7 +25446,7 @@ 1028 040b Latitude E6510 e4bf 50c1 PC1-GROOVE 2830 82801H (ICH8 Family) USB UHCI Controller #1 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25413,7 +25506,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2835 82801H (ICH8 Family) USB UHCI Controller #5 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25441,7 +25534,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 283a 82801H (ICH8 Family) USB2 EHCI Controller #2 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25496,14 +25589,14 @@ 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theather) 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 - 1028 01f9 Dell Latitude D630 - 1028 01ff Dell Precision M4300 + 1028 01f9 Latitude D630 + 1028 01ff Precision M4300 1028 0256 Studio 1735 103c 2802 Compaq dc7700p 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 - 1043 1339 Asus M51S series + 1043 1339 M51S series 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E 104d 9008 Vaio VGN-SZ79SN_C @@ -25843,7 +25936,7 @@ 29f7 3200/3210 Chipset Serial KT Controller 29f9 3210 Chipset Host-Secondary PCI Express Bridge 2a00 Mobile PM965/GM965/GL960 Memory Controller Hub - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p @@ -25862,16 +25955,16 @@ 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a03 Mobile GM965/GL960 Integrated Graphics Controller (secondary) 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a04 Mobile PM965/GM965 MEI Controller 103c 30c1 Compaq 6910p @@ -26074,7 +26167,7 @@ 2e16 4 Series Chipset PT IDER Controller 2e17 4 Series Chipset Serial KT Controller 2e20 4 Series Chipset DRAM Controller - 1028 0283 Dell Vostro 220 + 1028 0283 Vostro 220 1043 82d3 P5Q Deluxe Motherboard 1458 5000 GA-EP45-DS5/GA-EG45M-DS2H Motherboard 2e21 4 Series Chipset PCI Express Root Port @@ -26585,16 +26678,20 @@ 37d1 Ethernet Connection X722 for 1GbE 1590 0216 Ethernet 1Gb 2-port 368i Adapter 1590 0217 Ethernet 1Gb 2-port 368FLR-MMT Adapter + 1590 0247 Ethernet 1Gb 4-port 369i Adapter 17aa 4020 Intel Ethernet Connection X722 for 1GbE 17aa 4021 Intel Ethernet Connection X722 for 1GbE 17aa 4022 Intel Ethernet Connection X722 for 1GbE 37d2 Ethernet Connection X722 for 10GBASE-T + 14cd 0030 Ethernet OCP 2x10G RJ45 Phy Card [USI-X557-10GbaseT] 1590 0218 Ethernet 10Gb 2-port 568FLR-MMT Adapter - 17aa 4020 Intel Ethernet Connection X722 for 10GBASE - 17aa 4021 Intel Ethernet Connection X722 for 10GBASE + 17aa 4020 Ethernet Connection X722 for 10GBASE-T + 17aa 4021 Ethernet Connection X722 for 10GBASE-T 17aa 4022 Ethernet Connection X722 for 10GBASE-T 37d3 Ethernet Connection X722 for 10GbE SFP+ 1590 0219 Ethernet 10Gb 2-port 568FLR-MMSFP+ Adapter + 17aa 4020 Ethernet Connection X722 for 10GbE SFP+ + 17aa 4021 Ethernet Connection X722 for 10GbE SFP+ 37d4 Ethernet Connection X722 for 10GbE QSFP+ 37d9 X722 Hyper-V Virtual Function 3a00 82801JD/DO (ICH10 Family) 4-port SATA IDE Controller @@ -26865,7 +26962,7 @@ 1028 02da OptiPlex 980 1028 040a Latitude E6410 1028 040b Latitude E6510 - 1043 1373 ASUSTek G73-series gaming laptop + 1043 1373 G73-series gaming laptop 144d c06a R730 Laptop 15d9 060d C7SIM-Q Motherboard 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] @@ -27013,7 +27110,7 @@ 4224 PRO/Wireless 2915ABG [Calexico2] Network Connection 4227 PRO/Wireless 3945ABG [Golan] Network Connection 8086 1010 ThinkPad R60e - 8086 1011 ThinkPad T60/R60e/X60s + 8086 1011 ThinkPad T60/R60e/X60s/R61 8086 1014 PRO/Wireless 3945BG Network Connection 4229 PRO/Wireless 4965 AG or AGN [Kedron] Network Connection 8086 1100 Vaio VGN-SZ79SN_C @@ -27132,6 +27229,8 @@ 5845 QEMU NVM Express Controller 1af4 1100 QEMU Virtual Machine 5902 HD Graphics 610 + 590f Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers + 5910 Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers 5912 HD Graphics 630 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit @@ -28223,7 +28322,7 @@ 9004 7888 AHA-2930UW SCSI Controller 8b78 ABA-1030 ec78 AHA-4944W/UW -# acquired by PMC-Sierra +# acquired by Microsemi 9005 Adaptec 0010 AHA-2940U2/U2W 9005 2180 AHA-2940U2 SCSI Controller @@ -28835,9 +28934,11 @@ f1d0 AJA Video cafe Kona SD cfee Xena LS/SD-22-DA/SD-DA daff KONA LHi + db01 Corvid22 db09 Corvid 24 dcaf Kona HD dfee Xena HD-DA + eb0e Corvid 44 efac Xena SD-MM/SD-22-MM facd Xena HD-MM f5f5 F5 Networks, Inc. From owner-svn-src-all@freebsd.org Thu May 25 21:16:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82D33D82076; Thu, 25 May 2017 21:16:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54D101ED6; Thu, 25 May 2017 21:16:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PLGdCp027598; Thu, 25 May 2017 21:16:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PLGdbC027596; Thu, 25 May 2017 21:16:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705252116.v4PLGdbC027596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 May 2017 21:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318901 - in head: . share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 21:16:40 -0000 Author: bapt Date: Thu May 25 21:16:39 2017 New Revision: 318901 URL: https://svnweb.freebsd.org/changeset/base/318901 Log: Remove the old man.template In FreeBSD we only use mdoc(7) format. A template is available as mdoc.template The usage of man(7) format is discouraged and this file was driving people into the front direction as a template to use. Deleted: head/share/misc/man.template Modified: head/ObsoleteFiles.inc head/share/misc/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu May 25 21:11:25 2017 (r318900) +++ head/ObsoleteFiles.inc Thu May 25 21:16:39 2017 (r318901) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170525: remove misleading template +OLD_FILES+=usr/share/misc/man.template # 20170525: disconnect the roff docs from the build OLD_FILES+=usr/share/doc/papers/beyond43.ascii.gz OLD_FILES+=usr/share/doc/papers/bio.ascii.gz Modified: head/share/misc/Makefile ============================================================================== --- head/share/misc/Makefile Thu May 25 21:11:25 2017 (r318900) +++ head/share/misc/Makefile Thu May 25 21:16:39 2017 (r318901) @@ -7,7 +7,7 @@ FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \ committers-src.dot eqnchar flowers init.ee \ - iso3166 iso639 latin1 man.template mdoc.template operator pci_vendors \ + iso3166 iso639 latin1 mdoc.template operator pci_vendors \ scsi_modes \ organization.dot From owner-svn-src-all@freebsd.org Thu May 25 21:41:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A29F1D826DE; Thu, 25 May 2017 21:41:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 723BB1C53; Thu, 25 May 2017 21:41:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PLf7Mb038185; Thu, 25 May 2017 21:41:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PLf6xk038179; Thu, 25 May 2017 21:41:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705252141.v4PLf6xk038179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 25 May 2017 21:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318902 - in head/usr.sbin/makefs: . ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 21:41:08 -0000 Author: emaste Date: Thu May 25 21:41:06 2017 New Revision: 318902 URL: https://svnweb.freebsd.org/changeset/base/318902 Log: makefs: make buf generic it has nothing to do with ffs and will eventually be moved. gc sectorsize. This is a corrected version of r317744. NetBSD versions: ffs.c 1.58 ffs/buf.c 1.14 1.18 ffs/buf.h 1.8 Submitted by: Siva Mahadevan Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10803 Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/buf.c head/usr.sbin/makefs/ffs/buf.h head/usr.sbin/makefs/ffs/ffs_alloc.c head/usr.sbin/makefs/ffs/ffs_balloc.c head/usr.sbin/makefs/ffs/ufs_inode.h Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Thu May 25 21:16:39 2017 (r318901) +++ head/usr.sbin/makefs/ffs.c Thu May 25 21:41:06 2017 (r318902) @@ -143,7 +143,6 @@ static void *ffs_build_dinode2(struct u fsnode *, fsinfo_t *); -int sectorsize; /* XXX: for buf.c::getblk() */ /* publicly visible functions */ void @@ -429,8 +428,6 @@ ffs_validate(const char *dir, fsnode *ro printf("ffs_validate: dir %s; %lld bytes, %lld inodes\n", dir, (long long)fsopts->size, (long long)fsopts->inodes); } - sectorsize = fsopts->sectorsize; /* XXX - see earlier */ - /* now check calculated sizes vs requested sizes */ if (fsopts->maxsize > 0 && fsopts->size > fsopts->maxsize) { errx(1, "`%s' size of %lld is larger than the maxsize of %lld.", @@ -480,13 +477,13 @@ ffs_create_image(const char *image, fsin int i, bufsize; off_t bufrem; time_t tstamp; + int oflags = O_RDWR | O_CREAT | O_TRUNC; assert (image != NULL); assert (fsopts != NULL); /* create image */ - if ((fsopts->fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0666)) - == -1) { + if ((fsopts->fd = open(image, oflags, 0666)) == -1) { warn("Can't open `%s' for writing", image); return (-1); } @@ -878,6 +875,7 @@ ffs_write_file(union dinode *din, uint32 struct inode in; struct buf * bp; ffs_opt_t *ffs_opts = fsopts->fs_specific; + struct vnode vp = { fsopts, NULL }; assert (din != NULL); assert (buf != NULL); @@ -890,6 +888,7 @@ ffs_write_file(union dinode *din, uint32 p = NULL; in.i_fs = (struct fs *)fsopts->superblock; + in.i_devvp = &vp; if (debug & DEBUG_FS_WRITE_FILE) { printf( @@ -910,7 +909,6 @@ ffs_write_file(union dinode *din, uint32 else memcpy(&in.i_din.ffs2_din, &din->ffs2_din, sizeof(in.i_din.ffs2_din)); - in.i_fd = fsopts->fd; if (DIP(din, size) == 0) goto write_inode_and_leave; /* mmm, cheating */ Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Thu May 25 21:16:39 2017 (r318901) +++ head/usr.sbin/makefs/ffs/buf.c Thu May 25 21:41:06 2017 (r318902) @@ -52,8 +52,6 @@ __FBSDID("$FreeBSD$"); #include "makefs.h" #include "buf.h" -extern int sectorsize; /* XXX: from ffs.c & mkfs.c */ - static TAILQ_HEAD(buftailhead,buf) buftail; int @@ -62,6 +60,7 @@ bread(struct vnode *vp, daddr_t blkno, i { off_t offset; ssize_t rv; + fsinfo_t *fsinfo = vp->fs; assert (bpp != NULL); @@ -69,15 +68,15 @@ bread(struct vnode *vp, daddr_t blkno, i printf("%s: blkno %lld size %d\n", __func__, (long long)blkno, size); *bpp = getblk(vp, blkno, size, 0, 0, 0); - offset = (*bpp)->b_blkno * sectorsize; /* XXX */ + offset = (*bpp)->b_blkno * fsinfo->sectorsize; if (debug & DEBUG_BUF_BREAD) printf("%s: blkno %lld offset %lld bcount %ld\n", __func__, (long long)(*bpp)->b_blkno, (long long) offset, (*bpp)->b_bcount); - if (lseek((*bpp)->b_fd, offset, SEEK_SET) == -1) + if (lseek((*bpp)->b_fs->fd, offset, SEEK_SET) == -1) err(1, "%s: lseek %lld (%lld)", __func__, (long long)(*bpp)->b_blkno, (long long)offset); - rv = read((*bpp)->b_fd, (*bpp)->b_data, (*bpp)->b_bcount); + rv = read((*bpp)->b_fs->fd, (*bpp)->b_data, (*bpp)->b_bcount); if (debug & DEBUG_BUF_BREAD) printf("%s: read %ld (%lld) returned %d\n", __func__, (*bpp)->b_bcount, (long long)offset, (int)rv); @@ -126,16 +125,17 @@ bwrite(struct buf *bp) { off_t offset; ssize_t rv; + fsinfo_t *fs = bp->b_fs; assert (bp != NULL); - offset = bp->b_blkno * sectorsize; /* XXX */ + offset = bp->b_blkno * fs->sectorsize; if (debug & DEBUG_BUF_BWRITE) printf("bwrite: blkno %lld offset %lld bcount %ld\n", (long long)bp->b_blkno, (long long) offset, bp->b_bcount); - if (lseek(bp->b_fd, offset, SEEK_SET) == -1) + if (lseek(bp->b_fs->fd, offset, SEEK_SET) == -1) return (errno); - rv = write(bp->b_fd, bp->b_data, bp->b_bcount); + rv = write(bp->b_fs->fd, bp->b_data, bp->b_bcount); if (debug & DEBUG_BUF_BWRITE) printf("bwrite: write %ld (offset %lld) returned %lld\n", bp->b_bcount, (long long)offset, (long long)rv); @@ -198,7 +198,6 @@ getblk(struct vnode *vp, daddr_t blkno, bp = ecalloc(1, sizeof(*bp)); bp->b_bufsize = 0; bp->b_blkno = bp->b_lblkno = blkno; - bp->b_fd = vp->fd; bp->b_fs = vp->fs; bp->b_data = NULL; TAILQ_INSERT_HEAD(&buftail, bp, b_tailq); Modified: head/usr.sbin/makefs/ffs/buf.h ============================================================================== --- head/usr.sbin/makefs/ffs/buf.h Thu May 25 21:16:39 2017 (r318901) +++ head/usr.sbin/makefs/ffs/buf.h Thu May 25 21:41:06 2017 (r318902) @@ -43,13 +43,12 @@ #include #include +struct makefs_fsinfo; struct ucred; struct vnode { - int fd; - void *fs; + struct makefs_fsinfo *fs; void *v_data; - int offset; }; struct buf { @@ -58,8 +57,7 @@ struct buf { long b_bcount; daddr_t b_blkno; daddr_t b_lblkno; - int b_fd; - void * b_fs; + struct makefs_fsinfo *b_fs; TAILQ_ENTRY(buf) b_tailq; }; Modified: head/usr.sbin/makefs/ffs/ffs_alloc.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_alloc.c Thu May 25 21:16:39 2017 (r318901) +++ head/usr.sbin/makefs/ffs/ffs_alloc.c Thu May 25 21:41:06 2017 (r318902) @@ -297,11 +297,10 @@ ffs_alloccg(struct inode *ip, int cg, da int error, frags, allocsiz, i; struct fs *fs = ip->i_fs; const int needswap = UFS_FSNEEDSWAP(fs); - struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; if (fs->fs_cs(fs, cg).cs_nbfree == 0 && size == fs->fs_bsize) return (0); - error = bread(&vp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, + error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, NULL, &bp); if (error) { brelse(bp, 0); @@ -433,7 +432,6 @@ ffs_blkfree(struct inode *ip, daddr_t bn int i, error, cg, blk, frags, bbase; struct fs *fs = ip->i_fs; const int needswap = UFS_FSNEEDSWAP(fs); - struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; if (size > fs->fs_bsize || fragoff(fs, size) != 0 || fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) { @@ -446,7 +444,7 @@ ffs_blkfree(struct inode *ip, daddr_t bn (uintmax_t)ip->i_number); return; } - error = bread(&vp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, + error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, NULL, &bp); if (error) { brelse(bp, 0); Modified: head/usr.sbin/makefs/ffs/ffs_balloc.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_balloc.c Thu May 25 21:16:39 2017 (r318901) +++ head/usr.sbin/makefs/ffs/ffs_balloc.c Thu May 25 21:41:06 2017 (r318902) @@ -89,7 +89,6 @@ ffs_balloc_ufs1(struct inode *ip, off_t int32_t *allocblk, allociblk[UFS_NIADDR + 1]; int32_t *allocib; const int needswap = UFS_FSNEEDSWAP(fs); - struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; lbn = lblkno(fs, offset); size = blkoff(fs, offset) + bufsize; @@ -134,8 +133,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(&vp, lbn, fs->fs_bsize, NULL, - bpp); + error = bread(ip->i_devvp, lbn, fs->fs_bsize, + NULL, bpp); if (error) { brelse(*bpp, 0); return (error); @@ -160,8 +159,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(&vp, lbn, osize, NULL, - bpp); + error = bread(ip->i_devvp, lbn, osize, + NULL, bpp); if (error) { brelse(*bpp, 0); return (error); @@ -190,7 +189,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t if (error) return (error); if (bpp != NULL) { - bp = getblk(&vp, lbn, nsize, 0, 0, 0); + bp = getblk(ip->i_devvp, lbn, nsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); clrbuf(bp); *bpp = bp; @@ -228,7 +227,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t return error; nb = newb; *allocblk++ = nb; - bp = getblk(&vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); + bp = getblk(ip->i_devvp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, nb); clrbuf(bp); /* @@ -246,7 +245,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ for (i = 1;;) { - error = bread(&vp, indirs[i].in_lbn, fs->fs_bsize, NULL, &bp); + error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, + NULL, &bp); if (error) { brelse(bp, 0); return error; @@ -269,7 +269,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t } nb = newb; *allocblk++ = nb; - nbp = getblk(&vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); + nbp = getblk(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); /* @@ -300,7 +300,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t nb = newb; *allocblk++ = nb; if (bpp != NULL) { - nbp = getblk(&vp, lbn, fs->fs_bsize, 0, 0, 0); + nbp = getblk(ip->i_devvp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); *bpp = nbp; @@ -316,7 +316,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t } brelse(bp, 0); if (bpp != NULL) { - error = bread(&vp, lbn, (int)fs->fs_bsize, NULL, &nbp); + error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, NULL, &nbp); if (error) { brelse(nbp, 0); return error; @@ -340,7 +340,6 @@ ffs_balloc_ufs2(struct inode *ip, off_t int64_t *allocblk, allociblk[UFS_NIADDR + 1]; int64_t *allocib; const int needswap = UFS_FSNEEDSWAP(fs); - struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; lbn = lblkno(fs, offset); size = blkoff(fs, offset) + bufsize; @@ -385,8 +384,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(&vp, lbn, fs->fs_bsize, NULL, - bpp); + error = bread(ip->i_devvp, lbn, fs->fs_bsize, + NULL, bpp); if (error) { brelse(*bpp, 0); return (error); @@ -411,8 +410,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(&vp, lbn, osize, NULL, - bpp); + error = bread(ip->i_devvp, lbn, osize, + NULL, bpp); if (error) { brelse(*bpp, 0); return (error); @@ -441,7 +440,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t if (error) return (error); if (bpp != NULL) { - bp = getblk(&vp, lbn, nsize, 0, 0, 0); + bp = getblk(ip->i_devvp, lbn, nsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); clrbuf(bp); *bpp = bp; @@ -479,7 +478,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t return error; nb = newb; *allocblk++ = nb; - bp = getblk(&vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); + bp = getblk(ip->i_devvp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, nb); clrbuf(bp); /* @@ -497,7 +496,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ for (i = 1;;) { - error = bread(&vp, indirs[i].in_lbn, fs->fs_bsize, NULL, &bp); + error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, + NULL, &bp); if (error) { brelse(bp, 0); return error; @@ -520,7 +520,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t } nb = newb; *allocblk++ = nb; - nbp = getblk(&vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); + nbp = getblk(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); /* @@ -551,7 +551,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t nb = newb; *allocblk++ = nb; if (bpp != NULL) { - nbp = getblk(&vp, lbn, fs->fs_bsize, 0, 0, 0); + nbp = getblk(ip->i_devvp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); *bpp = nbp; @@ -567,7 +567,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t } brelse(bp, 0); if (bpp != NULL) { - error = bread(&vp, lbn, (int)fs->fs_bsize, NULL, &nbp); + error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, NULL, &nbp); if (error) { brelse(nbp, 0); return error; Modified: head/usr.sbin/makefs/ffs/ufs_inode.h ============================================================================== --- head/usr.sbin/makefs/ffs/ufs_inode.h Thu May 25 21:16:39 2017 (r318901) +++ head/usr.sbin/makefs/ffs/ufs_inode.h Thu May 25 21:41:06 2017 (r318902) @@ -45,9 +45,9 @@ union dinode { struct inode { ino_t i_number; /* The identity of the inode. */ + struct vnode *i_devvp; /* vnode pointer (contains fsopts) */ struct fs *i_fs; /* File system */ union dinode i_din; - int i_fd; /* File descriptor */ uint64_t i_size; }; From owner-svn-src-all@freebsd.org Thu May 25 21:59:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 784DED82A6B; Thu, 25 May 2017 21:59:20 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5555415F1; Thu, 25 May 2017 21:59:20 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PLxJDQ044262; Thu, 25 May 2017 21:59:19 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PLxJ2a044261; Thu, 25 May 2017 21:59:19 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201705252159.v4PLxJ2a044261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Thu, 25 May 2017 21:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318903 - head/tools/tools/sysbuild X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 21:59:20 -0000 Author: phk Date: Thu May 25 21:59:19 2017 New Revision: 318903 URL: https://svnweb.freebsd.org/changeset/base/318903 Log: Try to keep up with the ports system Makefiles. Modified: head/tools/tools/sysbuild/sysbuild.sh Modified: head/tools/tools/sysbuild/sysbuild.sh ============================================================================== --- head/tools/tools/sysbuild/sysbuild.sh Thu May 25 21:41:06 2017 (r318902) +++ head/tools/tools/sysbuild/sysbuild.sh Thu May 25 21:59:19 2017 (r318903) @@ -95,6 +95,9 @@ PORTS_WE_WANT=' PORTS_OPTS="BATCH=YES A4=yes" +PORTS_WITHOUT="" +PORTS_WITH="" + CONFIGFILES=' ' @@ -174,6 +177,9 @@ log_it() ( ####################################################################### +ports_make() { + make $* WITH="${PORTS_WITH}" WITHOUT="${PORTS_WITHOUT}" ${PORTS_OPTS} +} ports_recurse() ( cd /usr/ports @@ -191,7 +197,7 @@ ports_recurse() ( for d do if [ ! -d $d ] ; then - echo "Missing port $d" 1>&2 + echo "Missing port $d ($t)" 1>&2 continue fi d=`cd /usr/ports && cd $d && /bin/pwd` @@ -210,15 +216,12 @@ ports_recurse() ( ( cd $d l="" - for a in `make -V _UNIFIED_DEPENDS ${PORTS_OPTS}` + for a in `ports_make -V _UNIFIED_DEPENDS` do x=`expr "$a" : '.*:\(.*\)'` l="${l} ${x}" done ports_recurse $d $l - # -> _UNIFIED_DEPENDS - #ports_recurse $d `make -V _DEPEND_DIRS ${PORTS_OPTS}` - #ports_recurse $d `make all-depends-list` ) echo "$d" >> /tmp/_.plist fi @@ -242,14 +245,14 @@ ports_build() ( do b=`echo $p | tr / _` t=`echo $p | sed "s,${pd},,"` - pn=`cd $p && make package-name ${PORTS_OPTS}` + pn=`cd $p && ports_make package-name` if [ "x`basename $p`" == "xpkg" ] ; then log_it "Very Special: $t ($pn)" ( cd $p - make clean all install ${PORTS_OPTS} + ports_make clean all install ) > _.$b 2>&1 < /dev/null continue fi @@ -270,7 +273,7 @@ ports_build() ( fi fi - miss=`(cd $p ; make missing ${PORTS_OPTS}) || true` + miss=`(cd $p ; ports_make missing) || true` if [ "x${miss}" != "x" ] ; then log_it "NB: MISSING for $p:" $miss @@ -280,15 +283,16 @@ ports_build() ( ( set +e cd $p - make clean ${PORTS_OPTS} - if make install ${PORTS_OPTS} ; then + ports_make clean + if ports_make install ; then if [ "x${PKG_DIR}" != "x" ] ; then - make package ${PORTS_OPTS} + ports_make package fi else log_it FAIL build $p fi - make clean ${PORTS_OPTS} + ports_make clean + ) > _.$b 2>&1 < /dev/null done ) @@ -309,15 +313,15 @@ ports_prefetch() ( b=`echo $p | tr / _` ( cd $p - if make checksum $PORTS_OPTS ; then + if ports_make checksum ; then rm -f /${ldir}/_.prefetch.$b echo "OK $p" >> /${ldir}/_.prefetch exit 0 fi - make distclean - make checksum $PORTS_OPTS || true + ports_make distclean + ports_make checksum || true - if make checksum $PORTS_OPTS > /dev/null 2>&1 ; then + if ports_make checksum > /dev/null 2>&1 ; then rm -f /${ldir}/_.prefetch.$b echo "OK $p" >> /${ldir}/_.prefetch else @@ -472,8 +476,7 @@ ln -s /freebsd/${SRC_PATH} /usr/src if $do_world ; then if [ "x${OBJ_PATH}" != "x" ] ; then rm -rf /usr/obj - mkdir -p /freebsd/${OBJ_PATH} - ln -s /freebsd/${OBJ_PATH} /usr/obj + (cd /freebsd && mkdir -p ${OBJ_PATH} && ln -s ${OBJ_PATH} /usr/obj) else rm -rf /usr/obj mkdir -p /usr/obj @@ -493,8 +496,8 @@ do ) done -export PORTS_WE_WANT -export PORTS_OPTS +#export PORTS_WE_WANT +#export PORTS_OPTS ####################################################################### @@ -548,7 +551,7 @@ log_it Installkernel if [ "x${OBJ_PATH}" != "x" ] ; then rmdir ${SBMNT}/usr/obj - ln -s /freebsd/${OBJ_PATH} ${SBMNT}/usr/obj + ( cd /freebsd && mkdir -p ${OBJ_PATH} && ln -s ${OBJ_PATH} ${SBMNT}/usr/obj ) fi log_it Wait for ports prefetch From owner-svn-src-all@freebsd.org Thu May 25 22:39:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDE2AD8076A; Thu, 25 May 2017 22:39:49 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 811321948; Thu, 25 May 2017 22:39:49 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PMdmn9060333; Thu, 25 May 2017 22:39:48 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PMdmQh060331; Thu, 25 May 2017 22:39:48 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705252239.v4PMdmQh060331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 25 May 2017 22:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318904 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 22:39:49 -0000 Author: truckman Date: Thu May 25 22:39:48 2017 New Revision: 318904 URL: https://svnweb.freebsd.org/changeset/base/318904 Log: MFC r318527 Fix the queue delay estimation in PIE/FQ-PIE when the timestamp (TS) method is used. When packet timestamp is used, the "current_qdelay" keeps storing the last queue delay value calculated in the dequeue function. Therefore, when a burst of packets arrives followed by a pause, the "current_qdelay" will store a high value caused by the burst and stick to that value during the pause because the queue delay measurement is done inside the dequeue function. This causes the drop probability calculation function to calculate high drop probability value instead of zero and prevents the burst allowance mechanism from working properly. Fix this problem by resetting "current_qdelay" inside the drop probability calculation function when the queue length is zero and TS option is used. Submitted by: Rasool Al-Saadi Modified: stable/11/sys/netpfil/ipfw/dn_aqm_pie.c stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 21:59:19 2017 (r318903) +++ stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 22:39:48 2017 (r318904) @@ -211,11 +211,16 @@ calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)pst->pq->ni.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!pst->pq->ni.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * Modified: stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 21:59:19 2017 (r318903) +++ stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 22:39:48 2017 (r318904) @@ -383,11 +383,16 @@ fq_calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)q->stats.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!q->stats.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * From owner-svn-src-all@freebsd.org Thu May 25 22:41:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FABCD8099C; Thu, 25 May 2017 22:41:36 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FF961B79; Thu, 25 May 2017 22:41:36 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PMfZjg063287; Thu, 25 May 2017 22:41:35 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PMfZcv063285; Thu, 25 May 2017 22:41:35 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705252241.v4PMfZcv063285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 25 May 2017 22:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318905 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 22:41:36 -0000 Author: truckman Date: Thu May 25 22:41:34 2017 New Revision: 318905 URL: https://svnweb.freebsd.org/changeset/base/318905 Log: MFC r318527 Fix the queue delay estimation in PIE/FQ-PIE when the timestamp (TS) method is used. When packet timestamp is used, the "current_qdelay" keeps storing the last queue delay value calculated in the dequeue function. Therefore, when a burst of packets arrives followed by a pause, the "current_qdelay" will store a high value caused by the burst and stick to that value during the pause because the queue delay measurement is done inside the dequeue function. This causes the drop probability calculation function to calculate high drop probability value instead of zero and prevents the burst allowance mechanism from working properly. Fix this problem by resetting "current_qdelay" inside the drop probability calculation function when the queue length is zero and TS option is used. Submitted by: Rasool Al-Saadi Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 22:39:48 2017 (r318904) +++ stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 22:41:34 2017 (r318905) @@ -211,11 +211,16 @@ calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)pst->pq->ni.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!pst->pq->ni.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * Modified: stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 22:39:48 2017 (r318904) +++ stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 22:41:34 2017 (r318905) @@ -383,11 +383,16 @@ fq_calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)q->stats.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!q->stats.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * From owner-svn-src-all@freebsd.org Thu May 25 23:14:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1815D810FE; Thu, 25 May 2017 23:14:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89E89197D; Thu, 25 May 2017 23:14:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PNEpW5076249; Thu, 25 May 2017 23:14:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PNEpi9076248; Thu, 25 May 2017 23:14:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705252314.v4PNEpi9076248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 25 May 2017 23:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318906 - head/contrib/llvm/lib/Target/PowerPC X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 23:14:53 -0000 Author: dim Date: Thu May 25 23:14:51 2017 New Revision: 318906 URL: https://svnweb.freebsd.org/changeset/base/318906 Log: Pull in r303257 from upstream llvm trunk (by Krzysztof Parzyszek) [PPC] Properly update register save area offsets The variables MinGPR/MinG8R were not updated properly when resetting the offsets, which in the included testcase lead to saving the CR register in the same location as R30. This fixes another issue reported in PR26519. Differential Revision: https://reviews.llvm.org/D33017 Reported by: Mark Millard PR: 206990 MFC after: 3 days Modified: head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Modified: head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Thu May 25 22:41:34 2017 (r318905) +++ head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Thu May 25 23:14:51 2017 (r318906) @@ -1775,32 +1775,37 @@ void PPCFrameLowering::processFunctionBe // Check whether the frame pointer register is allocated. If so, make sure it // is spilled to the correct offset. if (needsFP(MF)) { - HasGPSaveArea = true; - int FI = PFI->getFramePointerSaveIndex(); assert(FI && "No Frame Pointer Save Slot!"); - MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); + // FP is R31/X31, so no need to update MinGPR/MinG8R. + HasGPSaveArea = true; } if (PFI->usesPICBase()) { - HasGPSaveArea = true; - int FI = PFI->getPICBasePointerSaveIndex(); assert(FI && "No PIC Base Pointer Save Slot!"); - MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); + + MinGPR = std::min(MinGPR, PPC::R30); + HasGPSaveArea = true; } const PPCRegisterInfo *RegInfo = static_cast(Subtarget.getRegisterInfo()); if (RegInfo->hasBasePointer(MF)) { - HasGPSaveArea = true; - int FI = PFI->getBasePointerSaveIndex(); assert(FI && "No Base Pointer Save Slot!"); - MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); + + unsigned BP = RegInfo->getBaseRegister(MF); + if (PPC::G8RCRegClass.contains(BP)) { + MinG8R = std::min(MinG8R, BP); + HasG8SaveArea = true; + } else if (PPC::GPRCRegClass.contains(BP)) { + MinGPR = std::min(MinGPR, BP); + HasGPSaveArea = true; + } } // General register save area starts right below the Floating-point From owner-svn-src-all@freebsd.org Thu May 25 23:19:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B20DFD8130B; Thu, 25 May 2017 23:19:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B47B1BF6; Thu, 25 May 2017 23:19:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PNJ9pv076448; Thu, 25 May 2017 23:19:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PNJ9Ps076446; Thu, 25 May 2017 23:19:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705252319.v4PNJ9Ps076446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 25 May 2017 23:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318907 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 23:19:10 -0000 Author: mav Date: Thu May 25 23:19:09 2017 New Revision: 318907 URL: https://svnweb.freebsd.org/changeset/base/318907 Log: Remove some code, dead from the day one. Modified: head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Thu May 25 23:14:51 2017 (r318906) +++ head/sys/net/if_lagg.c Thu May 25 23:19:09 2017 (r318907) @@ -1773,7 +1773,6 @@ struct lagg_port * lagg_link_active(struct lagg_softc *sc, struct lagg_port *lp) { struct lagg_port *lp_next, *rval = NULL; - // int new_link = LINK_STATE_DOWN; /* * Search a port which reports an active link state. @@ -1800,22 +1799,6 @@ search: } found: - if (rval != NULL) { - /* - * The IEEE 802.1D standard assumes that a lagg with - * multiple ports is always full duplex. This is valid - * for load sharing laggs and if at least two links - * are active. Unfortunately, checking the latter would - * be too expensive at this point. - XXX - if ((sc->sc_capabilities & IFCAP_LAGG_FULLDUPLEX) && - (sc->sc_count > 1)) - new_link = LINK_STATE_FULL_DUPLEX; - else - new_link = rval->lp_link_state; - */ - } - return (rval); } @@ -1832,7 +1815,6 @@ lagg_enqueue(struct ifnet *ifp, struct m static void lagg_rr_attach(struct lagg_softc *sc) { - sc->sc_capabilities = IFCAP_LAGG_FULLDUPLEX; sc->sc_seq = 0; sc->sc_bkt_count = sc->sc_bkt; } @@ -2001,9 +1983,6 @@ lagg_lb_attach(struct lagg_softc *sc) struct lagg_lb *lb; lb = malloc(sizeof(struct lagg_lb), M_DEVBUF, M_WAITOK | M_ZERO); - - sc->sc_capabilities = IFCAP_LAGG_FULLDUPLEX; - lb->lb_key = m_ether_tcpip_hash_init(); sc->sc_psc = lb; Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Thu May 25 23:14:51 2017 (r318906) +++ head/sys/net/if_lagg.h Thu May 25 23:19:09 2017 (r318907) @@ -185,10 +185,6 @@ struct lagg_ifreq { #define sc_ifflags sc_ifp->if_flags /* flags */ #define sc_ifname sc_ifp->if_xname /* name */ -#define sc_capabilities sc_ifp->if_capabilities /* capabilities */ - -#define IFCAP_LAGG_MASK 0xffff0000 /* private capabilities */ -#define IFCAP_LAGG_FULLDUPLEX 0x00010000 /* full duplex with >1 ports */ /* Private data used by the loadbalancing protocol */ struct lagg_lb { From owner-svn-src-all@freebsd.org Fri May 26 00:19:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00311D7A711; Fri, 26 May 2017 00:19:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8D0E17CF; Fri, 26 May 2017 00:19:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q0Joua000731; Fri, 26 May 2017 00:19:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q0JoOw000730; Fri, 26 May 2017 00:19:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705260019.v4Q0JoOw000730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 26 May 2017 00:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318908 - head/contrib/netbsd-tests/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 00:19:52 -0000 Author: emaste Date: Fri May 26 00:19:50 2017 New Revision: 318908 URL: https://svnweb.freebsd.org/changeset/base/318908 Log: bsdgrep: add --mmap tests Basic sanity tests as well as coverage for the bug fixed in r318565. Submitted by: Kyle Evans Reviewed by: bapt, ngie Differential Revision: https://reviews.freebsd.org/D10827 Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Thu May 25 23:19:09 2017 (r318907) +++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Fri May 26 00:19:50 2017 (r318908) @@ -627,6 +627,46 @@ binary_flags_body() atf_check -o inline:"A\000B\000C\n" grep --binary-files=text 'B' test1 atf_check -s exit:1 grep --binary-files=without-match 'B' test2 } + +atf_test_case mmap +mmap_head() +{ + atf_set "descr" "Check basic matching with --mmap flag" +} +mmap_body() +{ + grep_type + if [ $? -eq $GREP_TYPE_GNU ]; then + atf_expect_fail "gnu grep from ports has no --mmap option" + fi + + printf "A\nB\nC\n" > test1 + + atf_check -s exit:0 -o inline:"B\n" grep --mmap -oe "B" test1 + atf_check -s exit:1 grep --mmap -e "Z" test1 +} + +atf_test_case mmap_eof_not_eol +mmap_eof_not_eol_head() +{ + atf_set "descr" "Check --mmap flag handling of encountering EOF without EOL (PR 165471, 219402)" +} +mmap_eof_not_eol_body() +{ + grep_type + if [ $? -eq $GREP_TYPE_GNU ]; then + atf_expect_fail "gnu grep from ports has no --mmap option" + fi + + printf "ABC" > test1 + jot -b " " -s "" 4096 >> test2 + + atf_check -s exit:0 -o inline:"B\n" grep --mmap -oe "B" test1 + # Dependency on jemalloc(3) to detect buffer overflow, otherwise this + # unreliably produces a SIGSEGV or SIGBUS + atf_check -s exit:0 -o not-empty \ + env MALLOC_CONF="redzone:true" grep --mmap -e " " test2 +} # End FreeBSD atf_init_test_cases() @@ -665,5 +705,7 @@ atf_init_test_cases() atf_add_test_case grep_nomatch_flags atf_add_test_case binary_flags atf_add_test_case badcontext + atf_add_test_case mmap + atf_add_test_case mmap_eof_not_eol # End FreeBSD } From owner-svn-src-all@freebsd.org Fri May 26 00:25:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E813D7ADE3; Fri, 26 May 2017 00:25:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D20381EA0; Fri, 26 May 2017 00:25:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q0P8c4004703; Fri, 26 May 2017 00:25:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q0P8DU004702; Fri, 26 May 2017 00:25:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705260025.v4Q0P8DU004702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 May 2017 00:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318909 - stable/11/cddl/contrib/opensolaris/lib/libzpool/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 00:25:10 -0000 Author: mav Date: Fri May 26 00:25:08 2017 New Revision: 318909 URL: https://svnweb.freebsd.org/changeset/base/318909 Log: MFC r318516: Fix time handling in cv_timedwait_hires(). pthread_cond_timedwait() receives absolute time, not relative. Passing wrong time there caused two threads of zdb to spin in a tight loop. Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 26 00:19:50 2017 (r318908) +++ stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 26 00:25:08 2017 (r318909) @@ -363,7 +363,7 @@ cv_timedwait_hires(kcondvar_t *cv, kmute int flag) { int error; - timestruc_t ts; + timespec_t ts; hrtime_t delta; ASSERT(flag == 0 || flag == CALLOUT_FLAG_ABSOLUTE); @@ -376,8 +376,13 @@ top: if (delta <= 0) return (-1); - ts.tv_sec = delta / NANOSEC; - ts.tv_nsec = delta % NANOSEC; + clock_gettime(CLOCK_REALTIME, &ts); + ts.tv_sec += delta / NANOSEC; + ts.tv_nsec += delta % NANOSEC; + if (ts.tv_nsec >= NANOSEC) { + ts.tv_sec++; + ts.tv_nsec -= NANOSEC; + } ASSERT(mutex_owner(mp) == curthread); mp->m_owner = NULL; From owner-svn-src-all@freebsd.org Fri May 26 00:26:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5987FD7AE67; Fri, 26 May 2017 00:26:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 294F61FE2; Fri, 26 May 2017 00:26:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q0Q9VI004792; Fri, 26 May 2017 00:26:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q0Q9ol004791; Fri, 26 May 2017 00:26:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705260026.v4Q0Q9ol004791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 May 2017 00:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318910 - stable/10/cddl/contrib/opensolaris/lib/libzpool/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 00:26:10 -0000 Author: mav Date: Fri May 26 00:26:08 2017 New Revision: 318910 URL: https://svnweb.freebsd.org/changeset/base/318910 Log: MFC r318516: Fix time handling in cv_timedwait_hires(). pthread_cond_timedwait() receives absolute time, not relative. Passing wrong time there caused two threads of zdb to spin in a tight loop. Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 26 00:25:08 2017 (r318909) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 26 00:26:08 2017 (r318910) @@ -363,7 +363,7 @@ cv_timedwait_hires(kcondvar_t *cv, kmute int flag) { int error; - timestruc_t ts; + timespec_t ts; hrtime_t delta; ASSERT(flag == 0 || flag == CALLOUT_FLAG_ABSOLUTE); @@ -376,8 +376,13 @@ top: if (delta <= 0) return (-1); - ts.tv_sec = delta / NANOSEC; - ts.tv_nsec = delta % NANOSEC; + clock_gettime(CLOCK_REALTIME, &ts); + ts.tv_sec += delta / NANOSEC; + ts.tv_nsec += delta % NANOSEC; + if (ts.tv_nsec >= NANOSEC) { + ts.tv_sec++; + ts.tv_nsec -= NANOSEC; + } ASSERT(mutex_owner(mp) == curthread); mp->m_owner = NULL; From owner-svn-src-all@freebsd.org Fri May 26 00:48:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11C55D824AC; Fri, 26 May 2017 00:48:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D624B1956; Fri, 26 May 2017 00:48:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q0mLWU013150; Fri, 26 May 2017 00:48:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q0mLTL013149; Fri, 26 May 2017 00:48:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705260048.v4Q0mLTL013149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 26 May 2017 00:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318911 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 00:48:23 -0000 Author: adrian Date: Fri May 26 00:48:21 2017 New Revision: 318911 URL: https://svnweb.freebsd.org/changeset/base/318911 Log: [ath] fix short-GI wireshark flag. Yes, HAL_RX_GI means "short guard interval." Modified: head/sys/dev/ath/if_ath_rx.c Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Fri May 26 00:26:08 2017 (r318910) +++ head/sys/dev/ath/if_ath_rx.c Fri May 26 00:48:21 2017 (r318911) @@ -593,7 +593,8 @@ ath_rx_tap(struct ath_softc *sc, struct sc->sc_rx_th.wr_chan_flags |= CHAN_HT40U; else sc->sc_rx_th.wr_chan_flags |= CHAN_HT40D; - if ((rs->rs_flags & HAL_RX_GI) == 0) + + if (rs->rs_flags & HAL_RX_GI) sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_SHORTGI; } From owner-svn-src-all@freebsd.org Fri May 26 00:51:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F253D82595; Fri, 26 May 2017 00:51:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 311B31B44; Fri, 26 May 2017 00:51:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q0p5uR013301; Fri, 26 May 2017 00:51:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q0p5XM013300; Fri, 26 May 2017 00:51:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705260051.v4Q0p5XM013300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 26 May 2017 00:51:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318912 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 00:51:06 -0000 Author: emaste Date: Fri May 26 00:51:05 2017 New Revision: 318912 URL: https://svnweb.freebsd.org/changeset/base/318912 Log: libc: rm stale generated files which are no longer syscalls This is an attempt to help -DNO_CLEAN builds after r302092 (which removed the pipe libc syscall wrapper) and r318736 (which removed getdents, lstat, mknod, and stat). Dependencies cannot cope with certain source tree changes, particularly with respect to removing source files and replacing generated files. Handle these cases from _worldtmp in an ad-hoc fashion. Reviewed by: bdrewery, cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10876 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri May 26 00:48:21 2017 (r318911) +++ head/Makefile.inc1 Fri May 26 00:51:05 2017 (r318912) @@ -707,6 +707,21 @@ _worldtmp: .PHONY .else rm -rf ${WORLDTMP}/legacy/usr/include .endif +# Dependencies cannot cope with certain source tree changes, particularly +# with respect to removing source files and replacing generated files. +# Handle these cases here in an ad-hoc fashion. +# 20170523 remove stale generated asm files for functions which are no longer +# syscalls after r302092 (pipe) and r318736 (others) +.for f in getdents lstat mknod pipe stat +.if exists(${OBJTREE}${.CURDIR}/lib/libc/${f}.s) || \ + exists(${OBJTREE}${.CURDIR}/lib/libc/${f}.S) + @echo Removing stale generated ${f} syscall files + @rm -f ${OBJTREE}${.CURDIR}/lib/libc/${f}.* \ + ${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.* \ + ${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/${f}.* \ + ${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/.depend.${f}.* +.endif +.endfor .for _dir in \ lib lib/casper usr legacy/bin legacy/usr mkdir -p ${WORLDTMP}/${_dir} From owner-svn-src-all@freebsd.org Fri May 26 01:15:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1752BD82BE0; Fri, 26 May 2017 01:15:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEF7E16B7; Fri, 26 May 2017 01:14:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q1Ewb6025185; Fri, 26 May 2017 01:14:58 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q1Ewcp025182; Fri, 26 May 2017 01:14:58 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705260114.v4Q1Ewcp025182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 26 May 2017 01:14:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318913 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 01:15:00 -0000 Author: pfg Date: Fri May 26 01:14:58 2017 New Revision: 318913 URL: https://svnweb.freebsd.org/changeset/base/318913 Log: fts_open: move bogus initialization further below, before it is used. Move an unneeded initialization, introduced in r54770 to quiet down GCC, to a place nearer to its first use. This has no practical effect, it just keeps the garbage better sorted. Hinted by: OpenBSD (CVS rev. 1.56, without obfuscations) Modified: head/lib/libc/gen/fts-compat.c head/lib/libc/gen/fts-compat11.c head/lib/libc/gen/fts.c Modified: head/lib/libc/gen/fts-compat.c ============================================================================== --- head/lib/libc/gen/fts-compat.c Fri May 26 00:51:05 2017 (r318912) +++ head/lib/libc/gen/fts-compat.c Fri May 26 01:14:58 2017 (r318913) @@ -146,9 +146,6 @@ __fts_open_44bsd(char * const *argv, int sp->fts_compar = compar; sp->fts_options = options; - /* Shush, GCC. */ - tmp = NULL; - /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ if (ISSET(FTS_LOGICAL)) SET(FTS_NOCHDIR); @@ -165,6 +162,9 @@ __fts_open_44bsd(char * const *argv, int goto mem2; parent->fts_level = FTS_ROOTPARENTLEVEL; + /* Shush, GCC. */ + tmp = NULL; + /* Allocate/initialize root(s). */ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { /* Don't allow zero-length paths. */ Modified: head/lib/libc/gen/fts-compat11.c ============================================================================== --- head/lib/libc/gen/fts-compat11.c Fri May 26 00:51:05 2017 (r318912) +++ head/lib/libc/gen/fts-compat11.c Fri May 26 01:14:58 2017 (r318913) @@ -142,9 +142,6 @@ freebsd11_fts_open(char * const *argv, i sp->fts_compar = compar; sp->fts_options = options; - /* Shush, GCC. */ - tmp = NULL; - /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ if (ISSET(FTS_LOGICAL)) SET(FTS_NOCHDIR); @@ -161,6 +158,9 @@ freebsd11_fts_open(char * const *argv, i goto mem2; parent->fts_level = FTS_ROOTPARENTLEVEL; + /* Shush, GCC. */ + tmp = NULL; + /* Allocate/initialize root(s). */ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { len = strlen(*argv); Modified: head/lib/libc/gen/fts.c ============================================================================== --- head/lib/libc/gen/fts.c Fri May 26 00:51:05 2017 (r318912) +++ head/lib/libc/gen/fts.c Fri May 26 01:14:58 2017 (r318913) @@ -137,9 +137,6 @@ fts_open(char * const *argv, int options sp->fts_compar = compar; sp->fts_options = options; - /* Shush, GCC. */ - tmp = NULL; - /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ if (ISSET(FTS_LOGICAL)) SET(FTS_NOCHDIR); @@ -156,6 +153,9 @@ fts_open(char * const *argv, int options goto mem2; parent->fts_level = FTS_ROOTPARENTLEVEL; + /* Shush, GCC. */ + tmp = NULL; + /* Allocate/initialize root(s). */ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { len = strlen(*argv); From owner-svn-src-all@freebsd.org Fri May 26 02:30:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F183DD82DD2; Fri, 26 May 2017 02:30:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B14311487; Fri, 26 May 2017 02:30:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q2UQK7053437; Fri, 26 May 2017 02:30:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q2UQGr053434; Fri, 26 May 2017 02:30:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705260230.v4Q2UQGr053434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 26 May 2017 02:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318914 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 02:30:28 -0000 Author: emaste Date: Fri May 26 02:30:26 2017 New Revision: 318914 URL: https://svnweb.freebsd.org/changeset/base/318914 Log: bsdgrep: correct assumptions to prepare for chunking Correct a couple of minor BSD grep assumptions that are valid for line processing but not future chunk-based processing. Submitted by: Kyle Evans Reviewed by: bapt, cem Differential Revision: https://reviews.freebsd.org/D10824 Modified: head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/util.c Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Fri May 26 01:14:58 2017 (r318913) +++ head/usr.bin/grep/grep.c Fri May 26 02:30:26 2017 (r318914) @@ -78,7 +78,7 @@ const char *errstr[] = { }; /* Flags passed to regcomp() and regexec() */ -int cflags = REG_NOSUB; +int cflags = REG_NOSUB | REG_NEWLINE; int eflags = REG_STARTEND; /* XXX TODO: Get rid of this flag. Modified: head/usr.bin/grep/grep.h ============================================================================== --- head/usr.bin/grep/grep.h Fri May 26 01:14:58 2017 (r318913) +++ head/usr.bin/grep/grep.h Fri May 26 02:30:26 2017 (r318914) @@ -82,7 +82,7 @@ extern const char *errstr[]; #define EXCL_PAT 0 #define INCL_PAT 1 -#define MAX_LINE_MATCHES 32 +#define MAX_MATCHES 32 struct file { int fd; Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Fri May 26 01:14:58 2017 (r318913) +++ head/usr.bin/grep/util.c Fri May 26 02:30:26 2017 (r318914) @@ -61,7 +61,7 @@ static bool first_match = true; * other useful bits */ struct parsec { - regmatch_t matches[MAX_LINE_MATCHES]; /* Matches made */ + regmatch_t matches[MAX_MATCHES]; /* Matches made */ struct str ln; /* Current line */ size_t lnstart; /* Position in line */ size_t matchidx; /* Latest match index */ @@ -295,7 +295,7 @@ procfile(const char *fn) /* Print the matching line, but only if not quiet/binary */ if (t == 0 && printmatch) { printline(&pc, ':'); - while (pc.matchidx >= MAX_LINE_MATCHES) { + while (pc.matchidx >= MAX_MATCHES) { /* Reset matchidx and try again */ pc.matchidx = 0; if (procline(&pc) == 0) @@ -401,7 +401,7 @@ procline(struct parsec *pc) lastmatches = 0; startm = matchidx; retry = 0; - if (st > 0) + if (st > 0 && pc->ln.dat[st - 1] != fileeol) leflags |= REG_NOTBOL; /* Loop to compare with all the patterns */ for (i = 0; i < patterns; i++) { @@ -483,7 +483,7 @@ procline(struct parsec *pc) } /* avoid excessive matching - skip further patterns */ if ((color == NULL && !oflag) || qflag || lflag || - matchidx >= MAX_LINE_MATCHES) { + matchidx >= MAX_MATCHES) { pc->lnstart = nst; lastmatches = 0; break; From owner-svn-src-all@freebsd.org Fri May 26 03:27:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 995ABD82137; Fri, 26 May 2017 03:27:07 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6984E1483; Fri, 26 May 2017 03:27:07 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q3R6qo078366; Fri, 26 May 2017 03:27:06 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q3R6Uw078365; Fri, 26 May 2017 03:27:06 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201705260327.v4Q3R6Uw078365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 26 May 2017 03:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318915 - head/usr.sbin/ypldap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 03:27:07 -0000 Author: araujo Date: Fri May 26 03:27:06 2017 New Revision: 318915 URL: https://svnweb.freebsd.org/changeset/base/318915 Log: Simplify parseval() by allocating a buffer the size of the input string, which will always be big enough to hold the output string. Obtained from: OpenBSD (revision 1.36) Modified: head/usr.sbin/ypldap/aldap.c Modified: head/usr.sbin/ypldap/aldap.c ============================================================================== --- head/usr.sbin/ypldap/aldap.c Fri May 26 02:30:26 2017 (r318914) +++ head/usr.sbin/ypldap/aldap.c Fri May 26 03:27:06 2017 (r318915) @@ -1212,30 +1212,19 @@ char * parseval(char *p, size_t len) { char hex[3]; - char *cp = p, *buffer, *newbuffer; - size_t size, newsize, i, j; + char *buffer; + size_t i, j; - size = 50; - if ((buffer = calloc(1, size)) == NULL) + if ((buffer = calloc(1, len + 1)) == NULL) return NULL; for (i = j = 0; j < len; i++) { - if (i >= size) { - newsize = size + 1024; - if ((newbuffer = realloc(buffer, newsize)) == NULL) { - free(buffer); - return (NULL); - } - buffer = newbuffer; - size = newsize; - } - - if (cp[j] == '\\') { - strlcpy(hex, cp + j + 1, sizeof(hex)); + if (p[j] == '\\') { + strlcpy(hex, p + j + 1, sizeof(hex)); buffer[i] = (char)strtoumax(hex, NULL, 16); j += 3; } else { - buffer[i] = cp[j]; + buffer[i] = p[j]; j++; } } From owner-svn-src-all@freebsd.org Fri May 26 03:36:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D5FAD8236B; Fri, 26 May 2017 03:36:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DA811922; Fri, 26 May 2017 03:36:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q3Zxex082426; Fri, 26 May 2017 03:35:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q3ZxAL082425; Fri, 26 May 2017 03:35:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705260335.v4Q3ZxAL082425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 26 May 2017 03:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318916 - head/usr.bin/grep/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 03:36:00 -0000 Author: emaste Date: Fri May 26 03:35:59 2017 New Revision: 318916 URL: https://svnweb.freebsd.org/changeset/base/318916 Log: bsdgrep: use safer sizeof() construct Submitted by: Kyle Evans Modified: head/usr.bin/grep/regex/tre-fastmatch.c Modified: head/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- head/usr.bin/grep/regex/tre-fastmatch.c Fri May 26 03:27:06 2017 (r318915) +++ head/usr.bin/grep/regex/tre-fastmatch.c Fri May 26 03:35:59 2017 (r318916) @@ -351,7 +351,7 @@ static int fastcmp(const fastmatch_t *fg #define FILL_BMGS \ if (fg->len > 0 && !fg->hasdot) \ { \ - fg->sbmGs = malloc(fg->len * sizeof(int)); \ + fg->sbmGs = malloc(fg->len * sizeof(*fg->sbmGs)); \ if (!fg->sbmGs) \ return REG_ESPACE; \ if (fg->len == 1) \ @@ -367,7 +367,7 @@ static int fastcmp(const fastmatch_t *fg #define FILL_BMGS_WIDE \ if (fg->wlen > 0 && !fg->hasdot) \ { \ - fg->bmGs = malloc(fg->wlen * sizeof(int)); \ + fg->bmGs = malloc(fg->wlen * sizeof(*fg->bmGs)); \ if (!fg->bmGs) \ return REG_ESPACE; \ if (fg->wlen == 1) \ From owner-svn-src-all@freebsd.org Fri May 26 06:09:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B97AED826D3; Fri, 26 May 2017 06:09:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 899661796; Fri, 26 May 2017 06:09:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q69BHh042945; Fri, 26 May 2017 06:09:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q69Bqp042944; Fri, 26 May 2017 06:09:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705260609.v4Q69Bqp042944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 26 May 2017 06:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318917 - head/kerberos5/lib/libroken X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 06:09:12 -0000 Author: delphij Date: Fri May 26 06:09:11 2017 New Revision: 318917 URL: https://svnweb.freebsd.org/changeset/base/318917 Log: Disconnect heimdal version of qsort.c from build because we are already using libc's version of qsort. PR: bin/213922 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10814 Modified: head/kerberos5/lib/libroken/Makefile Modified: head/kerberos5/lib/libroken/Makefile ============================================================================== --- head/kerberos5/lib/libroken/Makefile Fri May 26 03:35:59 2017 (r318916) +++ head/kerberos5/lib/libroken/Makefile Fri May 26 06:09:11 2017 (r318917) @@ -52,7 +52,6 @@ SRCS= base64.c \ parse_bytes.c \ parse_time.c \ parse_units.c \ - qsort.c \ rand.c \ realloc.c \ resolve.c \ From owner-svn-src-all@freebsd.org Fri May 26 08:57:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03AA6D8255B; Fri, 26 May 2017 08:57:02 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C76A01BEC; Fri, 26 May 2017 08:57:01 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q8v0bi013629; Fri, 26 May 2017 08:57:00 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q8v0fv013628; Fri, 26 May 2017 08:57:00 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705260857.v4Q8v0fv013628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 26 May 2017 08:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318918 - stable/11/sys/dev/xen/blkfront X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 08:57:02 -0000 Author: royger Date: Fri May 26 08:57:00 2017 New Revision: 318918 URL: https://svnweb.freebsd.org/changeset/base/318918 Log: MFC r318520: xen/blkfront: correctly detach a disk with active users Modified: stable/11/sys/dev/xen/blkfront/blkfront.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/11/sys/dev/xen/blkfront/blkfront.c Fri May 26 06:09:11 2017 (r318917) +++ stable/11/sys/dev/xen/blkfront/blkfront.c Fri May 26 08:57:00 2017 (r318918) @@ -1578,11 +1578,14 @@ xbd_backend_changed(device_t dev, Xenbus break; case XenbusStateClosing: - if (sc->xbd_users > 0) - xenbus_dev_error(dev, -EBUSY, - "Device in use; refusing to close"); - else + if (sc->xbd_users > 0) { + device_printf(dev, "detaching with pending users\n"); + KASSERT(sc->xbd_disk != NULL, + ("NULL disk with pending users\n")); + disk_gone(sc->xbd_disk); + } else { xbd_closing(dev); + } break; } } From owner-svn-src-all@freebsd.org Fri May 26 08:59:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B99CD82653; Fri, 26 May 2017 08:59:17 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38A061D4F; Fri, 26 May 2017 08:59:17 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q8xGJS013766; Fri, 26 May 2017 08:59:16 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q8xGha013765; Fri, 26 May 2017 08:59:16 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705260859.v4Q8xGha013765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 26 May 2017 08:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318919 - stable/11/sys/dev/xen/netfront X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 08:59:17 -0000 Author: royger Date: Fri May 26 08:59:16 2017 New Revision: 318919 URL: https://svnweb.freebsd.org/changeset/base/318919 Log: MFC r318523, r318631: xen/netfront: don't drop the ring RX lock with inconsistent ring state xen/netfront: don't drop the RX lock in xn_rxeof Modified: stable/11/sys/dev/xen/netfront/netfront.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/11/sys/dev/xen/netfront/netfront.c Fri May 26 08:57:00 2017 (r318918) +++ stable/11/sys/dev/xen/netfront/netfront.c Fri May 26 08:59:16 2017 (r318919) @@ -1161,17 +1161,18 @@ xn_rxeof(struct netfront_rxq *rxq) struct mbufq mbufq_rxq, mbufq_errq; int err, work_to_do; - do { - XN_RX_LOCK_ASSERT(rxq); - if (!netfront_carrier_ok(np)) - return; - - /* XXX: there should be some sane limit. */ - mbufq_init(&mbufq_errq, INT_MAX); - mbufq_init(&mbufq_rxq, INT_MAX); + XN_RX_LOCK_ASSERT(rxq); + + if (!netfront_carrier_ok(np)) + return; + + /* XXX: there should be some sane limit. */ + mbufq_init(&mbufq_errq, INT_MAX); + mbufq_init(&mbufq_rxq, INT_MAX); - ifp = np->xn_ifp; + ifp = np->xn_ifp; + do { rp = rxq->ring.sring->rsp_prod; rmb(); /* Ensure we see queued responses up to 'rp'. */ @@ -1191,7 +1192,7 @@ xn_rxeof(struct netfront_rxq *rxq) } m->m_pkthdr.rcvif = ifp; - if ( rx->flags & NETRXF_data_validated ) { + if (rx->flags & NETRXF_data_validated) { /* * According to mbuf(9) the correct way to tell * the stack that the checksum of an inbound @@ -1214,50 +1215,43 @@ xn_rxeof(struct netfront_rxq *rxq) } (void )mbufq_enqueue(&mbufq_rxq, m); - rxq->ring.rsp_cons = i; } - mbufq_drain(&mbufq_errq); + rxq->ring.rsp_cons = i; - /* - * Process all the mbufs after the remapping is complete. - * Break the mbuf chain first though. - */ - while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + xn_alloc_rx_buffers(rxq); - /* XXX: Do we really need to drop the rx lock? */ - XN_RX_UNLOCK(rxq); + RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); + } while (work_to_do); + + mbufq_drain(&mbufq_errq); + /* + * Process all the mbufs after the remapping is complete. + * Break the mbuf chain first though. + */ + while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); #if (defined(INET) || defined(INET6)) - /* Use LRO if possible */ - if ((ifp->if_capenable & IFCAP_LRO) == 0 || - lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { - /* - * If LRO fails, pass up to the stack - * directly. - */ - (*ifp->if_input)(ifp, m); - } -#else + /* Use LRO if possible */ + if ((ifp->if_capenable & IFCAP_LRO) == 0 || + lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { + /* + * If LRO fails, pass up to the stack + * directly. + */ (*ifp->if_input)(ifp, m); -#endif - - XN_RX_LOCK(rxq); } - - rxq->ring.rsp_cons = i; +#else + (*ifp->if_input)(ifp, m); +#endif + } #if (defined(INET) || defined(INET6)) - /* - * Flush any outstanding LRO work - */ - tcp_lro_flush_all(lro); + /* + * Flush any outstanding LRO work + */ + tcp_lro_flush_all(lro); #endif - - xn_alloc_rx_buffers(rxq); - - RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); - } while (work_to_do); } static void From owner-svn-src-all@freebsd.org Fri May 26 10:27:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69044D8136E; Fri, 26 May 2017 10:27:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2142E18A2; Fri, 26 May 2017 10:27:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QARaGd051027; Fri, 26 May 2017 10:27:36 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QARaeH051026; Fri, 26 May 2017 10:27:36 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261027.v4QARaeH051026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 10:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318920 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 10:27:37 -0000 Author: avg Date: Fri May 26 10:27:35 2017 New Revision: 318920 URL: https://svnweb.freebsd.org/changeset/base/318920 Log: MFC r316924: 8061 sa_find_idx_tab can be declared more type-safely illumos/illumos-gate@7f0bdb4257bb4f1f76390b72665961e411da24c6 https://github.com/illumos/illumos-gate/commit/7f0bdb4257bb4f1f76390b72665961e411da24c6 https://www.illumos.org/issues/8061 sa_find_idx_tab() is declared as taking and returning "void *" parameters. These can be declared to be the specific types. Reviewed by: George Wilson Reviewed by: Chris Williamson Approved by: Dan McDonald Author: Matthew Ahrens MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Fri May 26 08:59:16 2017 (r318919) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Fri May 26 10:27:35 2017 (r318920) @@ -22,7 +22,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 iXsystems, Inc - * Copyright (c) 2013, 2016 by Delphix. All rights reserved. + * Copyright (c) 2013, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -131,8 +131,8 @@ typedef void (sa_iterfunc_t)(void *hdr, static int sa_build_index(sa_handle_t *hdl, sa_buf_type_t buftype); static void sa_idx_tab_hold(objset_t *os, sa_idx_tab_t *idx_tab); -static void *sa_find_idx_tab(objset_t *os, dmu_object_type_t bonustype, - void *data); +static sa_idx_tab_t *sa_find_idx_tab(objset_t *os, dmu_object_type_t bonustype, + sa_hdr_phys_t *hdr); static void sa_idx_tab_rele(objset_t *os, void *arg); static void sa_copy_data(sa_data_locator_t *func, void *start, void *target, int buflen); @@ -1486,11 +1486,10 @@ sa_lookup_uio(sa_handle_t *hdl, sa_attr_ } #endif -void * -sa_find_idx_tab(objset_t *os, dmu_object_type_t bonustype, void *data) +static sa_idx_tab_t * +sa_find_idx_tab(objset_t *os, dmu_object_type_t bonustype, sa_hdr_phys_t *hdr) { sa_idx_tab_t *idx_tab; - sa_hdr_phys_t *hdr = (sa_hdr_phys_t *)data; sa_os_t *sa = os->os_sa; sa_lot_t *tb, search; avl_index_t loc; From owner-svn-src-all@freebsd.org Fri May 26 10:31:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7298D81582; Fri, 26 May 2017 10:31:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B2CC1BE8; Fri, 26 May 2017 10:31:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QAV5Nw054192; Fri, 26 May 2017 10:31:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QAV5pf054191; Fri, 26 May 2017 10:31:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261031.v4QAV5pf054191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 10:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318921 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 10:31:06 -0000 Author: avg Date: Fri May 26 10:31:05 2017 New Revision: 318921 URL: https://svnweb.freebsd.org/changeset/base/318921 Log: MFV r316928: 7256 low probability race in zfs_get_data illumos/illumos-gate@0c94e1af6784c69a1dea25e0e35dd13b2b91e2e5 https://github.com/illumos/illumos-gate/commit/0c94e1af6784c69a1dea25e0e35dd13b2b91e2e5 https://www.illumos.org/issues/7256 error = dmu_sync(zio, lr->lr_common.lrc_txg, zfs_get_done, zgd); ASSERT(error || lr->lr_length <= zp->z_blksz); It's possible, although extremely rare, that the zfs_get_done() callback is executed before dmu_sync() returns. In that case the znode's range lock is dropped and the znode is unreferenced. Thus, the assertion can access some invalid or wrong data via the zp pointer. size variable caches the correct value of z_blksz and can be safely used here. Reviewed by: Matt Ahrens Reviewed by: Pavel Zakharov Approved by: Dan McDonald Author: Andriy Gapon MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri May 26 10:27:35 2017 (r318920) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri May 26 10:31:05 2017 (r318921) @@ -1386,7 +1386,7 @@ zfs_get_data(void *arg, lr_write_t *lr, error = dmu_sync(zio, lr->lr_common.lrc_txg, zfs_get_done, zgd); - ASSERT(error || lr->lr_length <= zp->z_blksz); + ASSERT(error || lr->lr_length <= size); /* * On success, we need to wait for the write I/O From owner-svn-src-all@freebsd.org Fri May 26 10:34:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85172D8175F; Fri, 26 May 2017 10:34:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 569981F8B; Fri, 26 May 2017 10:34:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QAYXtl055126; Fri, 26 May 2017 10:34:33 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QAYX02055125; Fri, 26 May 2017 10:34:33 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261034.v4QAYX02055125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 10:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318922 - head/sys/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 10:34:34 -0000 Author: avg Date: Fri May 26 10:34:33 2017 New Revision: 318922 URL: https://svnweb.freebsd.org/changeset/base/318922 Log: MFV r316927: 5379 modifying a mmap()-ed file does not update its timestamps FreeBSD note: this is a record-only merge as the FreeBSD putpages code is quite different from the upstream. illumos/illumos-gate@80e10fd0d22bbf0d18bfdae035e06f44c68ae8e6 https://github.com/illumos/illumos-gate/commit/80e10fd0d22bbf0d18bfdae035e06f44c68ae8e6 https://www.illumos.org/issues/5379 The following is based on a review of the illumos code and on a similar problem reported for FreeBSD where the relevant code is different. Looking at this block of code http://src.illumos.org/source/xref/illumos-gate/ usr/src/uts/common/fs/zfs/zfs_vnops.c#4187 I see code to set up an sa_bulk_attr_t object, I see code to set up mtime and ctime values, but I do not see code to actually apply the attributes... I would expect there to be a call to sa_bulk_update(), there is such a call in zfs_write() for instance. mmap_write.c [Magnifier] - demo (1.42 KB) Andriy Gapon, 2015-11-11 01:53 PM Reviewed by: Matthew Ahrens Reviewed by: Prashanth Sreenivasa Reviewed by: Dan McDonald Approved by: Gordon Ross Author: Andriy Gapon Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-all@freebsd.org Fri May 26 10:37:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6353D81885; Fri, 26 May 2017 10:37:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9586E11A6; Fri, 26 May 2017 10:37:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QAbtGw055294; Fri, 26 May 2017 10:37:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QAbtak055293; Fri, 26 May 2017 10:37:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261037.v4QAbtak055293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 10:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318923 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 10:37:56 -0000 Author: avg Date: Fri May 26 10:37:55 2017 New Revision: 318923 URL: https://svnweb.freebsd.org/changeset/base/318923 Log: zfs_putpages: assert that sa_bulk_update() must succeed Same as the upstream does in r316927. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri May 26 10:34:33 2017 (r318922) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri May 26 10:37:55 2017 (r318923) @@ -4758,7 +4758,8 @@ zfs_putpages(struct vnode *vp, vm_page_t &zp->z_pflags, 8); zfs_tstamp_update_setup(zp, CONTENT_MODIFIED, mtime, ctime, B_TRUE); - (void)sa_bulk_update(zp->z_sa_hdl, bulk, count, tx); + err = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx); + ASSERT0(err); zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, len, 0); zfs_vmobject_wlock(object); From owner-svn-src-all@freebsd.org Fri May 26 11:05:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B881D7B821; Fri, 26 May 2017 11:05:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D13E01432; Fri, 26 May 2017 11:05:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QB5uMF067673; Fri, 26 May 2017 11:05:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QB5ui3067672; Fri, 26 May 2017 11:05:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261105.v4QB5ui3067672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318924 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:05:58 -0000 Author: avg Date: Fri May 26 11:05:56 2017 New Revision: 318924 URL: https://svnweb.freebsd.org/changeset/base/318924 Log: arc_init: make code closer to upstream by introducing 'allmem' variable All the differences in calculations are kept. A comment about arc_max being 1/2 of all memory is fixed to reflect the actual code that uses 5/8 as a factor. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri May 26 10:37:55 2017 (r318923) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri May 26 11:05:56 2017 (r318924) @@ -6315,6 +6315,20 @@ arc_init(void) { int i, prefetch_tunable_set = 0; + /* + * allmem is "all memory that we could possibly use". + */ +#ifdef illumos +#ifdef _KERNEL + uint64_t allmem = ptob(physmem - swapfs_minfree); +#else + uint64_t allmem = (physmem * PAGESIZE) / 2; +#endif +#else + uint64_t allmem = kmem_size(); +#endif + + mutex_init(&arc_reclaim_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&arc_reclaim_thread_cv, NULL, CV_DEFAULT, NULL); cv_init(&arc_reclaim_waiters_cv, NULL, CV_DEFAULT, NULL); @@ -6326,7 +6340,7 @@ arc_init(void) arc_min_prefetch_lifespan = 1 * hz; /* Start out with 1/8 of all memory */ - arc_c = kmem_size() / 8; + arc_c = allmem / 8; #ifdef illumos #ifdef _KERNEL @@ -6339,13 +6353,13 @@ arc_init(void) #endif #endif /* illumos */ /* set min cache to 1/32 of all memory, or arc_abs_min, whichever is more */ - arc_c_min = MAX(arc_c / 4, arc_abs_min); - /* set max to 1/2 of all memory, or all but 1GB, whichever is more */ - if (arc_c * 8 >= 1 << 30) - arc_c_max = (arc_c * 8) - (1 << 30); + arc_c_min = MAX(allmem / 32, arc_abs_min); + /* set max to 5/8 of all memory, or all but 1GB, whichever is more */ + if (allmem >= 1 << 30) + arc_c_max = allmem - (1 << 30); else arc_c_max = arc_c_min; - arc_c_max = MAX(arc_c * 5, arc_c_max); + arc_c_max = MAX(allmem * 5 / 8, arc_c_max); /* * In userland, there's only the memory pressure that we artificially @@ -6362,7 +6376,7 @@ arc_init(void) * Allow the tunables to override our calculations if they are * reasonable. */ - if (zfs_arc_max > arc_abs_min && zfs_arc_max < kmem_size()) { + if (zfs_arc_max > arc_abs_min && zfs_arc_max < allmem) { arc_c_max = zfs_arc_max; arc_c_min = MIN(arc_c_min, arc_c_max); } @@ -6485,7 +6499,7 @@ arc_init(void) printf("ZFS WARNING: Recommended minimum RAM size is 512MB; " "expect unstable behavior.\n"); } - if (kmem_size() < 512 * (1 << 20)) { + if (allmem < 512 * (1 << 20)) { printf("ZFS WARNING: Recommended minimum kmem_size is 512MB; " "expect unstable behavior.\n"); printf(" Consider tuning vm.kmem_size and " From owner-svn-src-all@freebsd.org Fri May 26 11:23:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ABEFD82169; Fri, 26 May 2017 11:23:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3DDD1EE6; Fri, 26 May 2017 11:23:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBNHZJ075651; Fri, 26 May 2017 11:23:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBNHWR075650; Fri, 26 May 2017 11:23:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261123.v4QBNHWR075650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318925 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:23:18 -0000 Author: avg Date: Fri May 26 11:23:16 2017 New Revision: 318925 URL: https://svnweb.freebsd.org/changeset/base/318925 Log: MFV r316929: 6914 kernel virtual memory fragmentation leads to hang illumos/illumos-gate@af868f46a5b794687741d5424de9e3a2d684a84a https://github.com/illumos/illumos-gate/commit/af868f46a5b794687741d5424de9e3a2d684a84a https://www.illumos.org/issues/6914 FreeBSD note: only a ZFS part of the change is merged, changes to the VM subsystem are not ported (obviously). Also, now that FreeBSD has vmem(9) we don't have to ifdef-out the code that uses it. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri May 26 11:05:56 2017 (r318924) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri May 26 11:23:16 2017 (r318925) @@ -6339,19 +6339,6 @@ arc_init(void) /* Convert seconds to clock ticks */ arc_min_prefetch_lifespan = 1 * hz; - /* Start out with 1/8 of all memory */ - arc_c = allmem / 8; - -#ifdef illumos -#ifdef _KERNEL - /* - * On architectures where the physical memory can be larger - * than the addressable space (intel in 32-bit mode), we may - * need to limit the cache to 1/8 of VM size. - */ - arc_c = MIN(arc_c, vmem_size(heap_arena, VMEM_ALLOC | VMEM_FREE) / 8); -#endif -#endif /* illumos */ /* set min cache to 1/32 of all memory, or arc_abs_min, whichever is more */ arc_c_min = MAX(allmem / 32, arc_abs_min); /* set max to 5/8 of all memory, or all but 1GB, whichever is more */ @@ -6391,6 +6378,15 @@ arc_init(void) /* limit meta-data to 1/4 of the arc capacity */ arc_meta_limit = arc_c_max / 4; +#ifdef _KERNEL + /* + * Metadata is stored in the kernel's heap. Don't let us + * use more than half the heap for the ARC. + */ + arc_meta_limit = MIN(arc_meta_limit, + vmem_size(heap_arena, VMEM_ALLOC | VMEM_FREE) / 2); +#endif + /* Allow the tunable to override if it is reasonable */ if (zfs_arc_meta_limit > 0 && zfs_arc_meta_limit <= arc_c_max) arc_meta_limit = zfs_arc_meta_limit; From owner-svn-src-all@freebsd.org Fri May 26 11:25:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC6BAD82288; Fri, 26 May 2017 11:25:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CDE511A3; Fri, 26 May 2017 11:25:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBPixx075908; Fri, 26 May 2017 11:25:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBPivJ075907; Fri, 26 May 2017 11:25:44 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261125.v4QBPivJ075907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318926 - head/sys/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:25:45 -0000 Author: avg Date: Fri May 26 11:25:44 2017 New Revision: 318926 URL: https://svnweb.freebsd.org/changeset/base/318926 Log: MFV r316919: 7885 zpool list can report 16.0e for expandsz FreeBSD note: this is a record-only change, the actual change was directly committed by smh. illumos/illumos-gate@c040c10cdd1e4eab0fc88203758367dd81e057b7 https://github.com/illumos/illumos-gate/commit/c040c10cdd1e4eab0fc88203758367dd81e057b7 https://www.illumos.org/issues/7885 When a member of a RAIDZ has been replaced with a device smaller than the original, then the top level vdev can report its expand size as 16.0E. The reduced child asize causes the RAIDZ to have a vdev_asize lower than its vdev_max_asize which then results in an underflow during the calculation of the parents expand size. Also for RAIDZ vdevs the sum of their child vdev_min_asize could be smaller than the parents vdev_min_size. Fixed by: https://github.com/openzfs/openzfs/pull/296 Reviewed by: Matthew Ahrens Reviewed by: George Wilson Approved by: Gordon Ross Author: Steven Hartland Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-all@freebsd.org Fri May 26 11:29:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3225D823FA; Fri, 26 May 2017 11:29:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AACB1483; Fri, 26 May 2017 11:29:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBTVng076156; Fri, 26 May 2017 11:29:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBTVl9076155; Fri, 26 May 2017 11:29:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261129.v4QBTVl9076155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318927 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:29:32 -0000 Author: avg Date: Fri May 26 11:29:31 2017 New Revision: 318927 URL: https://svnweb.freebsd.org/changeset/base/318927 Log: 8025 dbuf_read() creates unnecessary zio_root() for bonus buf illumos/illumos-gate@def4fac5882b4ca67bd0f4a53509b6d1fa8ae14e https://github.com/illumos/illumos-gate/commit/def4fac5882b4ca67bd0f4a53509b6d1fa8ae14e https://www.illumos.org/issues/8025 dbuf_read() creates a zio_root() to track and wait for all the zio's that may happen as part of this call. However, if the blkptr_t for this buffer is NULL or a hole, we will not create any more zio's, so this zio_root() is unnecessary. This is always the case when calling dbuf_read() on a bonus buffer, because it has no blkptr (it's part of the containing dnode). For workloads that read a lot of bonus buffers (e.g. file creation and removal), creating and destroying these unnecessary zio's can decrease performance by around 3%. Reviewed by: Dan Kimmel Reviewed by: Pavel Zakharov Reviewed by: Prashanth Sreenivasa Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri May 26 11:25:44 2017 (r318926) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri May 26 11:29:31 2017 (r318927) @@ -1088,7 +1088,6 @@ int dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags) { int err = 0; - boolean_t havepzio = (zio != NULL); boolean_t prefetch; dnode_t *dn; @@ -1132,9 +1131,13 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio DB_DNODE_EXIT(db); } else if (db->db_state == DB_UNCACHED) { spa_t *spa = dn->dn_objset->os_spa; + boolean_t need_wait = B_FALSE; - if (zio == NULL) + if (zio == NULL && + db->db_blkptr != NULL && !BP_IS_HOLE(db->db_blkptr)) { zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL); + need_wait = B_TRUE; + } dbuf_read_impl(db, zio, flags); /* dbuf_read_impl has dropped db_mtx for us */ @@ -1146,7 +1149,7 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio rw_exit(&dn->dn_struct_rwlock); DB_DNODE_EXIT(db); - if (!havepzio) + if (need_wait) err = zio_wait(zio); } else { /* @@ -1181,7 +1184,6 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio mutex_exit(&db->db_mtx); } - ASSERT(err || havepzio || db->db_state == DB_CACHED); return (err); } From owner-svn-src-all@freebsd.org Fri May 26 11:30:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D909D824AF; Fri, 26 May 2017 11:30:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E82EE170A; Fri, 26 May 2017 11:30:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBUtj3076389; Fri, 26 May 2017 11:30:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBUt8S076388; Fri, 26 May 2017 11:30:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261130.v4QBUt8S076388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318928 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:30:57 -0000 Author: avg Date: Fri May 26 11:30:55 2017 New Revision: 318928 URL: https://svnweb.freebsd.org/changeset/base/318928 Log: MFV r318927: 8025 dbuf_read() creates unnecessary zio_root() for bonus buf illumos/illumos-gate@def4fac5882b4ca67bd0f4a53509b6d1fa8ae14e https://github.com/illumos/illumos-gate/commit/def4fac5882b4ca67bd0f4a53509b6d1fa8ae14e https://www.illumos.org/issues/8025 dbuf_read() creates a zio_root() to track and wait for all the zio's that may happen as part of this call. However, if the blkptr_t for this buffer is NULL or a hole, we will not create any more zio's, so this zio_root() is unnecessary. This is always the case when calling dbuf_read() on a bonus buffer, because it has no blkptr (it's part of the containing dnode). For workloads that read a lot of bonus buffers (e.g. file creation and removal), creating and destroying these unnecessary zio's can decrease performance by around 3%. Reviewed by: Dan Kimmel Reviewed by: Pavel Zakharov Reviewed by: Prashanth Sreenivasa Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri May 26 11:29:31 2017 (r318927) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri May 26 11:30:55 2017 (r318928) @@ -1088,7 +1088,6 @@ int dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags) { int err = 0; - boolean_t havepzio = (zio != NULL); boolean_t prefetch; dnode_t *dn; @@ -1132,9 +1131,13 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio DB_DNODE_EXIT(db); } else if (db->db_state == DB_UNCACHED) { spa_t *spa = dn->dn_objset->os_spa; + boolean_t need_wait = B_FALSE; - if (zio == NULL) + if (zio == NULL && + db->db_blkptr != NULL && !BP_IS_HOLE(db->db_blkptr)) { zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL); + need_wait = B_TRUE; + } dbuf_read_impl(db, zio, flags); /* dbuf_read_impl has dropped db_mtx for us */ @@ -1146,7 +1149,7 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio rw_exit(&dn->dn_struct_rwlock); DB_DNODE_EXIT(db); - if (!havepzio) + if (need_wait) err = zio_wait(zio); } else { /* @@ -1181,7 +1184,6 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio mutex_exit(&db->db_mtx); } - ASSERT(err || havepzio || db->db_state == DB_CACHED); return (err); } From owner-svn-src-all@freebsd.org Fri May 26 11:32:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DCACD825D5; Fri, 26 May 2017 11:32:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6BCE1A80; Fri, 26 May 2017 11:32:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBW5oQ079970; Fri, 26 May 2017 11:32:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBW5bb079969; Fri, 26 May 2017 11:32:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261132.v4QBW5bb079969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318929 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:32:07 -0000 Author: avg Date: Fri May 26 11:32:05 2017 New Revision: 318929 URL: https://svnweb.freebsd.org/changeset/base/318929 Log: 7786 zfs`vdev_online() needs better notification about state changes illumos/illumos-gate@5f368aef86387d6ef4eda84030ae9b402313ee4c https://github.com/illumos/illumos-gate/commit/5f368aef86387d6ef4eda84030ae9b402313ee4c https://www.illumos.org/issues/7786 Currently, vdev_online() will only post sysevent if previous state was "offline". It should also post the event when the state changes from "removed" or "faulted" to "healthy" or "degraded". This will fix the following scenario: - pull disk from slot A - check that hotspare has taken its place (if available) - insert disk into slot B - check that hotspare moved back to "avail" state (if spare was used) The problem here is that we don't get any ESC_ZFS_VDEV_* notification and fail to update the vdev FRU. Reviewed by: Matthew Ahrens mahrens@delphix.com Reviewed by: George Wilson george.wilson@delphix.com Approved by: Albert Lee Author: Yuri Pankov Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri May 26 11:30:55 2017 (r318928) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri May 26 11:32:05 2017 (r318929) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2015 by Delphix. All rights reserved. - * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2017 Nexenta Systems, Inc. * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Toomas Soome */ @@ -2449,7 +2449,8 @@ int vdev_online(spa_t *spa, uint64_t guid, uint64_t flags, vdev_state_t *newstate) { vdev_t *vd, *tvd, *pvd, *rvd = spa->spa_root_vdev; - boolean_t postevent = B_FALSE; + boolean_t wasoffline; + vdev_state_t oldstate; spa_vdev_state_enter(spa, SCL_NONE); @@ -2459,9 +2460,8 @@ vdev_online(spa_t *spa, uint64_t guid, u if (!vd->vdev_ops->vdev_op_leaf) return (spa_vdev_state_exit(spa, NULL, ENOTSUP)); - postevent = - (vd->vdev_offline == B_TRUE || vd->vdev_tmpoffline == B_TRUE) ? - B_TRUE : B_FALSE; + wasoffline = (vd->vdev_offline || vd->vdev_tmpoffline); + oldstate = vd->vdev_state; tvd = vd->vdev_top; vd->vdev_offline = B_FALSE; @@ -2499,7 +2499,9 @@ vdev_online(spa_t *spa, uint64_t guid, u spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); } - if (postevent) + if (wasoffline || + (oldstate < VDEV_STATE_DEGRADED && + vd->vdev_state >= VDEV_STATE_DEGRADED)) spa_event_notify(spa, vd, ESC_ZFS_VDEV_ONLINE); return (spa_vdev_state_exit(spa, vd, 0)); From owner-svn-src-all@freebsd.org Fri May 26 11:33:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1BFFD82896; Fri, 26 May 2017 11:33:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B02581C60; Fri, 26 May 2017 11:33:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBXYHx080088; Fri, 26 May 2017 11:33:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBXYG4080087; Fri, 26 May 2017 11:33:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261133.v4QBXYG4080087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318930 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:33:36 -0000 Author: avg Date: Fri May 26 11:33:34 2017 New Revision: 318930 URL: https://svnweb.freebsd.org/changeset/base/318930 Log: MFV r318929: 7786 zfs`vdev_online() needs better notification about state changes illumos/illumos-gate@5f368aef86387d6ef4eda84030ae9b402313ee4c https://github.com/illumos/illumos-gate/commit/5f368aef86387d6ef4eda84030ae9b402313ee4c https://www.illumos.org/issues/7786 Currently, vdev_online() will only post sysevent if previous state was "offline". It should also post the event when the state changes from "removed" or "faulted" to "healthy" or "degraded". This will fix the following scenario: - pull disk from slot A - check that hotspare has taken its place (if available) - insert disk into slot B - check that hotspare moved back to "avail" state (if spare was used) The problem here is that we don't get any ESC_ZFS_VDEV_* notification and fail to update the vdev FRU. Reviewed by: Matthew Ahrens mahrens@delphix.com Reviewed by: George Wilson george.wilson@delphix.com Approved by: Albert Lee Author: Yuri Pankov MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 26 11:32:05 2017 (r318929) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 26 11:33:34 2017 (r318930) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2015 by Delphix. All rights reserved. - * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2017 Nexenta Systems, Inc. * Copyright 2013 Martin Matuska . All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Toomas Soome @@ -2595,7 +2595,8 @@ int vdev_online(spa_t *spa, uint64_t guid, uint64_t flags, vdev_state_t *newstate) { vdev_t *vd, *tvd, *pvd, *rvd = spa->spa_root_vdev; - boolean_t postevent = B_FALSE; + boolean_t wasoffline; + vdev_state_t oldstate; spa_vdev_state_enter(spa, SCL_NONE); @@ -2605,9 +2606,8 @@ vdev_online(spa_t *spa, uint64_t guid, u if (!vd->vdev_ops->vdev_op_leaf) return (spa_vdev_state_exit(spa, NULL, ENOTSUP)); - postevent = - (vd->vdev_offline == B_TRUE || vd->vdev_tmpoffline == B_TRUE) ? - B_TRUE : B_FALSE; + wasoffline = (vd->vdev_offline || vd->vdev_tmpoffline); + oldstate = vd->vdev_state; tvd = vd->vdev_top; vd->vdev_offline = B_FALSE; @@ -2645,7 +2645,9 @@ vdev_online(spa_t *spa, uint64_t guid, u spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); } - if (postevent) + if (wasoffline || + (oldstate < VDEV_STATE_DEGRADED && + vd->vdev_state >= VDEV_STATE_DEGRADED)) spa_event_notify(spa, vd, ESC_ZFS_VDEV_ONLINE); return (spa_vdev_state_exit(spa, vd, 0)); From owner-svn-src-all@freebsd.org Fri May 26 11:35:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6183ED829CB; Fri, 26 May 2017 11:35:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BEC11DEF; Fri, 26 May 2017 11:35:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBZZ4c080230; Fri, 26 May 2017 11:35:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBZYRB080222; Fri, 26 May 2017 11:35:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261135.v4QBZYRB080222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318931 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:35:36 -0000 Author: avg Date: Fri May 26 11:35:34 2017 New Revision: 318931 URL: https://svnweb.freebsd.org/changeset/base/318931 Log: 8063 verify that we do not attempt to access inactive txg illumos/illumos-gate@b7b2590dd9f11b12a0b4878db3886068cce176af https://github.com/illumos/illumos-gate/commit/b7b2590dd9f11b12a0b4878db3886068cce176af https://www.illumos.org/issues/8063 A standard practice in ZFS is to keep track of "per-txg" state. Any of the 3 active TXG's (open, quiescing, syncing) can have different values for this state. We should assert that we do not attempt to modify other (inactive) TXG's. Reviewed by: Serapheim Dimitropoulos Reviewed by: Pavel Zakharov Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/txg.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Fri May 26 11:33:34 2017 (r318930) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Fri May 26 11:35:34 2017 (r318931) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -72,7 +72,7 @@ dmu_tx_create_assigned(struct dsl_pool * { dmu_tx_t *tx = dmu_tx_create_dd(NULL); - ASSERT3U(txg, <=, dp->dp_tx.tx_open_txg); + txg_verify(dp->dp_spa, txg); tx->tx_pool = dp; tx->tx_txg = txg; tx->tx_anyobj = TRUE; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c Fri May 26 11:33:34 2017 (r318930) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c Fri May 26 11:35:34 2017 (r318931) @@ -159,13 +159,13 @@ dsl_pool_open_impl(spa_t *spa, uint64_t rrw_init(&dp->dp_config_rwlock, B_TRUE); txg_init(dp, txg); - txg_list_create(&dp->dp_dirty_datasets, + txg_list_create(&dp->dp_dirty_datasets, spa, offsetof(dsl_dataset_t, ds_dirty_link)); - txg_list_create(&dp->dp_dirty_zilogs, + txg_list_create(&dp->dp_dirty_zilogs, spa, offsetof(zilog_t, zl_dirty_link)); - txg_list_create(&dp->dp_dirty_dirs, + txg_list_create(&dp->dp_dirty_dirs, spa, offsetof(dsl_dir_t, dd_dirty_link)); - txg_list_create(&dp->dp_sync_tasks, + txg_list_create(&dp->dp_sync_tasks, spa, offsetof(dsl_sync_task_t, dst_node)); dp->dp_sync_taskq = taskq_create("dp_sync_taskq", Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Fri May 26 11:33:34 2017 (r318930) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Fri May 26 11:35:34 2017 (r318931) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2015, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright 2013 Saso Kiselkov. All rights reserved. @@ -1090,7 +1090,7 @@ spa_activate(spa_t *spa, int mode) list_create(&spa->spa_state_dirty_list, sizeof (vdev_t), offsetof(vdev_t, vdev_state_dirty_node)); - txg_list_create(&spa->spa_vdev_txg_list, + txg_list_create(&spa->spa_vdev_txg_list, spa, offsetof(struct vdev, vdev_txg_node)); avl_create(&spa->spa_errlist_scrub, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/txg.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/txg.h Fri May 26 11:33:34 2017 (r318930) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/txg.h Fri May 26 11:35:34 2017 (r318931) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. */ #ifndef _SYS_TXG_H @@ -60,6 +60,7 @@ typedef struct txg_node { typedef struct txg_list { kmutex_t tl_lock; size_t tl_offset; + spa_t *tl_spa; txg_node_t *tl_head[TXG_SIZE]; } txg_list_t; @@ -103,13 +104,15 @@ extern boolean_t txg_stalled(struct dsl_ /* returns TRUE if someone is waiting for the next txg to sync */ extern boolean_t txg_sync_waiting(struct dsl_pool *dp); +extern void txg_verify(spa_t *spa, uint64_t txg); + /* * Per-txg object lists. */ #define TXG_CLEAN(txg) ((txg) - 1) -extern void txg_list_create(txg_list_t *tl, size_t offset); +extern void txg_list_create(txg_list_t *tl, spa_t *spa, size_t offset); extern void txg_list_destroy(txg_list_t *tl); extern boolean_t txg_list_empty(txg_list_t *tl, uint64_t txg); extern boolean_t txg_all_lists_empty(txg_list_t *tl); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h Fri May 26 11:33:34 2017 (r318930) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h Fri May 26 11:35:34 2017 (r318931) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -96,6 +96,15 @@ typedef struct zil_chain { #define ZIL_MIN_BLKSZ 4096ULL /* + * ziltest is by and large an ugly hack, but very useful in + * checking replay without tedious work. + * When running ziltest we want to keep all itx's and so maintain + * a single list in the zl_itxg[] that uses a high txg: ZILTEST_TXG + * We subtract TXG_CONCURRENT_STATES to allow for common code. + */ +#define ZILTEST_TXG (UINT64_MAX - TXG_CONCURRENT_STATES) + +/* * The words of a log block checksum. */ #define ZIL_ZC_GUID_0 0 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c Fri May 26 11:33:34 2017 (r318930) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c Fri May 26 11:35:34 2017 (r318931) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. */ #include @@ -30,6 +30,7 @@ #include #include #include +#include #include /* @@ -685,16 +686,32 @@ txg_sync_waiting(dsl_pool_t *dp) } /* + * Verify that this txg is active (open, quiescing, syncing). Non-active + * txg's should not be manipulated. + */ +void +txg_verify(spa_t *spa, uint64_t txg) +{ + dsl_pool_t *dp = spa_get_dsl(spa); + if (txg <= TXG_INITIAL || txg == ZILTEST_TXG) + return; + ASSERT3U(txg, <=, dp->dp_tx.tx_open_txg); + ASSERT3U(txg, >=, dp->dp_tx.tx_synced_txg); + ASSERT3U(txg, >=, dp->dp_tx.tx_open_txg - TXG_CONCURRENT_STATES); +} + +/* * Per-txg object lists. */ void -txg_list_create(txg_list_t *tl, size_t offset) +txg_list_create(txg_list_t *tl, spa_t *spa, size_t offset) { int t; mutex_init(&tl->tl_lock, NULL, MUTEX_DEFAULT, NULL); tl->tl_offset = offset; + tl->tl_spa = spa; for (t = 0; t < TXG_SIZE; t++) tl->tl_head[t] = NULL; @@ -714,15 +731,16 @@ txg_list_destroy(txg_list_t *tl) boolean_t txg_list_empty(txg_list_t *tl, uint64_t txg) { + txg_verify(tl->tl_spa, txg); return (tl->tl_head[txg & TXG_MASK] == NULL); } /* * Returns true if all txg lists are empty. * - * Warning: this is inherently racy (an item could be added immediately after this - * function returns). We don't bother with the lock because it wouldn't change the - * semantics. + * Warning: this is inherently racy (an item could be added immediately + * after this function returns). We don't bother with the lock because + * it wouldn't change the semantics. */ boolean_t txg_all_lists_empty(txg_list_t *tl) @@ -746,6 +764,7 @@ txg_list_add(txg_list_t *tl, void *p, ui txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); boolean_t add; + txg_verify(tl->tl_spa, txg); mutex_enter(&tl->tl_lock); add = (tn->tn_member[t] == 0); if (add) { @@ -770,6 +789,7 @@ txg_list_add_tail(txg_list_t *tl, void * txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); boolean_t add; + txg_verify(tl->tl_spa, txg); mutex_enter(&tl->tl_lock); add = (tn->tn_member[t] == 0); if (add) { @@ -797,6 +817,7 @@ txg_list_remove(txg_list_t *tl, uint64_t txg_node_t *tn; void *p = NULL; + txg_verify(tl->tl_spa, txg); mutex_enter(&tl->tl_lock); if ((tn = tl->tl_head[t]) != NULL) { p = (char *)tn - tl->tl_offset; @@ -818,6 +839,7 @@ txg_list_remove_this(txg_list_t *tl, voi int t = txg & TXG_MASK; txg_node_t *tn, **tp; + txg_verify(tl->tl_spa, txg); mutex_enter(&tl->tl_lock); for (tp = &tl->tl_head[t]; (tn = *tp) != NULL; tp = &tn->tn_next[t]) { @@ -841,6 +863,7 @@ txg_list_member(txg_list_t *tl, void *p, int t = txg & TXG_MASK; txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); + txg_verify(tl->tl_spa, txg); return (tn->tn_member[t] != 0); } @@ -853,6 +876,7 @@ txg_list_head(txg_list_t *tl, uint64_t t int t = txg & TXG_MASK; txg_node_t *tn = tl->tl_head[t]; + txg_verify(tl->tl_spa, txg); return (tn == NULL ? NULL : (char *)tn - tl->tl_offset); } @@ -862,6 +886,7 @@ txg_list_next(txg_list_t *tl, void *p, u int t = txg & TXG_MASK; txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); + txg_verify(tl->tl_spa, txg); tn = tn->tn_next[t]; return (tn == NULL ? NULL : (char *)tn - tl->tl_offset); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri May 26 11:33:34 2017 (r318930) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri May 26 11:35:34 2017 (r318931) @@ -354,9 +354,9 @@ vdev_alloc_common(spa_t *spa, uint_t id, vd->vdev_dtl[t] = range_tree_create(NULL, NULL, &vd->vdev_dtl_lock); } - txg_list_create(&vd->vdev_ms_list, + txg_list_create(&vd->vdev_ms_list, spa, offsetof(struct metaslab, ms_txg_node)); - txg_list_create(&vd->vdev_dtl_list, + txg_list_create(&vd->vdev_dtl_list, spa, offsetof(struct vdev, vdev_dtl_node)); vd->vdev_stat.vs_timestamp = gethrtime(); vdev_queue_init(vd); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Fri May 26 11:33:34 2017 (r318930) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Fri May 26 11:35:34 2017 (r318931) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -85,16 +85,6 @@ static void zil_async_to_sync(zilog_t *z #define LWB_EMPTY(lwb) ((BP_GET_LSIZE(&lwb->lwb_blk) - \ sizeof (zil_chain_t)) == (lwb->lwb_sz - lwb->lwb_nused)) - -/* - * ziltest is by and large an ugly hack, but very useful in - * checking replay without tedious work. - * When running ziltest we want to keep all itx's and so maintain - * a single list in the zl_itxg[] that uses a high txg: ZILTEST_TXG - * We subtract TXG_CONCURRENT_STATES to allow for common code. - */ -#define ZILTEST_TXG (UINT64_MAX - TXG_CONCURRENT_STATES) - static int zil_bp_compare(const void *x1, const void *x2) { From owner-svn-src-all@freebsd.org Fri May 26 11:37:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78C84D82A5C; Fri, 26 May 2017 11:37:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 481BB1F3B; Fri, 26 May 2017 11:37:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBbCje080341; Fri, 26 May 2017 11:37:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBbBwZ080333; Fri, 26 May 2017 11:37:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261137.v4QBbBwZ080333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318932 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:37:13 -0000 Author: avg Date: Fri May 26 11:37:11 2017 New Revision: 318932 URL: https://svnweb.freebsd.org/changeset/base/318932 Log: MFV r318931: 8063 verify that we do not attempt to access inactive txg illumos/illumos-gate@b7b2590dd9f11b12a0b4878db3886068cce176af https://github.com/illumos/illumos-gate/commit/b7b2590dd9f11b12a0b4878db3886068cce176af https://www.illumos.org/issues/8063 A standard practice in ZFS is to keep track of "per-txg" state. Any of the 3 active TXG's (open, quiescing, syncing) can have different values for this state. We should assert that we do not attempt to modify other (inactive) TXG's. Reviewed by: Serapheim Dimitropoulos Reviewed by: Pavel Zakharov Approved by: Robert Mustacchi Author: Matthew Ahrens MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Fri May 26 11:35:34 2017 (r318931) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Fri May 26 11:37:11 2017 (r318932) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -72,7 +72,7 @@ dmu_tx_create_assigned(struct dsl_pool * { dmu_tx_t *tx = dmu_tx_create_dd(NULL); - ASSERT3U(txg, <=, dp->dp_tx.tx_open_txg); + txg_verify(dp->dp_spa, txg); tx->tx_pool = dp; tx->tx_txg = txg; tx->tx_anyobj = TRUE; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri May 26 11:35:34 2017 (r318931) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri May 26 11:37:11 2017 (r318932) @@ -259,13 +259,13 @@ dsl_pool_open_impl(spa_t *spa, uint64_t rrw_init(&dp->dp_config_rwlock, B_TRUE); txg_init(dp, txg); - txg_list_create(&dp->dp_dirty_datasets, + txg_list_create(&dp->dp_dirty_datasets, spa, offsetof(dsl_dataset_t, ds_dirty_link)); - txg_list_create(&dp->dp_dirty_zilogs, + txg_list_create(&dp->dp_dirty_zilogs, spa, offsetof(zilog_t, zl_dirty_link)); - txg_list_create(&dp->dp_dirty_dirs, + txg_list_create(&dp->dp_dirty_dirs, spa, offsetof(dsl_dir_t, dd_dirty_link)); - txg_list_create(&dp->dp_sync_tasks, + txg_list_create(&dp->dp_sync_tasks, spa, offsetof(dsl_sync_task_t, dst_node)); dp->dp_sync_taskq = taskq_create("dp_sync_taskq", Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri May 26 11:35:34 2017 (r318931) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri May 26 11:37:11 2017 (r318932) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2015, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Martin Matuska . All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. @@ -1136,7 +1136,7 @@ spa_activate(spa_t *spa, int mode) list_create(&spa->spa_state_dirty_list, sizeof (vdev_t), offsetof(vdev_t, vdev_state_dirty_node)); - txg_list_create(&spa->spa_vdev_txg_list, + txg_list_create(&spa->spa_vdev_txg_list, spa, offsetof(struct vdev, vdev_txg_node)); avl_create(&spa->spa_errlist_scrub, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h Fri May 26 11:35:34 2017 (r318931) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h Fri May 26 11:37:11 2017 (r318932) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. */ #ifndef _SYS_TXG_H @@ -60,6 +60,7 @@ typedef struct txg_node { typedef struct txg_list { kmutex_t tl_lock; size_t tl_offset; + spa_t *tl_spa; txg_node_t *tl_head[TXG_SIZE]; } txg_list_t; @@ -103,13 +104,15 @@ extern boolean_t txg_stalled(struct dsl_ /* returns TRUE if someone is waiting for the next txg to sync */ extern boolean_t txg_sync_waiting(struct dsl_pool *dp); +extern void txg_verify(spa_t *spa, uint64_t txg); + /* * Per-txg object lists. */ #define TXG_CLEAN(txg) ((txg) - 1) -extern void txg_list_create(txg_list_t *tl, size_t offset); +extern void txg_list_create(txg_list_t *tl, spa_t *spa, size_t offset); extern void txg_list_destroy(txg_list_t *tl); extern boolean_t txg_list_empty(txg_list_t *tl, uint64_t txg); extern boolean_t txg_all_lists_empty(txg_list_t *tl); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h Fri May 26 11:35:34 2017 (r318931) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h Fri May 26 11:37:11 2017 (r318932) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -96,6 +96,15 @@ typedef struct zil_chain { #define ZIL_MIN_BLKSZ 4096ULL /* + * ziltest is by and large an ugly hack, but very useful in + * checking replay without tedious work. + * When running ziltest we want to keep all itx's and so maintain + * a single list in the zl_itxg[] that uses a high txg: ZILTEST_TXG + * We subtract TXG_CONCURRENT_STATES to allow for common code. + */ +#define ZILTEST_TXG (UINT64_MAX - TXG_CONCURRENT_STATES) + +/* * The words of a log block checksum. */ #define ZIL_ZC_GUID_0 0 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Fri May 26 11:35:34 2017 (r318931) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Fri May 26 11:37:11 2017 (r318932) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. */ #include @@ -30,6 +30,7 @@ #include #include #include +#include #include /* @@ -693,16 +694,32 @@ txg_sync_waiting(dsl_pool_t *dp) } /* + * Verify that this txg is active (open, quiescing, syncing). Non-active + * txg's should not be manipulated. + */ +void +txg_verify(spa_t *spa, uint64_t txg) +{ + dsl_pool_t *dp = spa_get_dsl(spa); + if (txg <= TXG_INITIAL || txg == ZILTEST_TXG) + return; + ASSERT3U(txg, <=, dp->dp_tx.tx_open_txg); + ASSERT3U(txg, >=, dp->dp_tx.tx_synced_txg); + ASSERT3U(txg, >=, dp->dp_tx.tx_open_txg - TXG_CONCURRENT_STATES); +} + +/* * Per-txg object lists. */ void -txg_list_create(txg_list_t *tl, size_t offset) +txg_list_create(txg_list_t *tl, spa_t *spa, size_t offset) { int t; mutex_init(&tl->tl_lock, NULL, MUTEX_DEFAULT, NULL); tl->tl_offset = offset; + tl->tl_spa = spa; for (t = 0; t < TXG_SIZE; t++) tl->tl_head[t] = NULL; @@ -722,15 +739,16 @@ txg_list_destroy(txg_list_t *tl) boolean_t txg_list_empty(txg_list_t *tl, uint64_t txg) { + txg_verify(tl->tl_spa, txg); return (tl->tl_head[txg & TXG_MASK] == NULL); } /* * Returns true if all txg lists are empty. * - * Warning: this is inherently racy (an item could be added immediately after this - * function returns). We don't bother with the lock because it wouldn't change the - * semantics. + * Warning: this is inherently racy (an item could be added immediately + * after this function returns). We don't bother with the lock because + * it wouldn't change the semantics. */ boolean_t txg_all_lists_empty(txg_list_t *tl) @@ -754,6 +772,7 @@ txg_list_add(txg_list_t *tl, void *p, ui txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); boolean_t add; + txg_verify(tl->tl_spa, txg); mutex_enter(&tl->tl_lock); add = (tn->tn_member[t] == 0); if (add) { @@ -778,6 +797,7 @@ txg_list_add_tail(txg_list_t *tl, void * txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); boolean_t add; + txg_verify(tl->tl_spa, txg); mutex_enter(&tl->tl_lock); add = (tn->tn_member[t] == 0); if (add) { @@ -805,6 +825,7 @@ txg_list_remove(txg_list_t *tl, uint64_t txg_node_t *tn; void *p = NULL; + txg_verify(tl->tl_spa, txg); mutex_enter(&tl->tl_lock); if ((tn = tl->tl_head[t]) != NULL) { p = (char *)tn - tl->tl_offset; @@ -826,6 +847,7 @@ txg_list_remove_this(txg_list_t *tl, voi int t = txg & TXG_MASK; txg_node_t *tn, **tp; + txg_verify(tl->tl_spa, txg); mutex_enter(&tl->tl_lock); for (tp = &tl->tl_head[t]; (tn = *tp) != NULL; tp = &tn->tn_next[t]) { @@ -849,6 +871,7 @@ txg_list_member(txg_list_t *tl, void *p, int t = txg & TXG_MASK; txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); + txg_verify(tl->tl_spa, txg); return (tn->tn_member[t] != 0); } @@ -861,6 +884,7 @@ txg_list_head(txg_list_t *tl, uint64_t t int t = txg & TXG_MASK; txg_node_t *tn = tl->tl_head[t]; + txg_verify(tl->tl_spa, txg); return (tn == NULL ? NULL : (char *)tn - tl->tl_offset); } @@ -870,6 +894,7 @@ txg_list_next(txg_list_t *tl, void *p, u int t = txg & TXG_MASK; txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); + txg_verify(tl->tl_spa, txg); tn = tn->tn_next[t]; return (tn == NULL ? NULL : (char *)tn - tl->tl_offset); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 26 11:35:34 2017 (r318931) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 26 11:37:11 2017 (r318932) @@ -448,9 +448,9 @@ vdev_alloc_common(spa_t *spa, uint_t id, vd->vdev_dtl[t] = range_tree_create(NULL, NULL, &vd->vdev_dtl_lock); } - txg_list_create(&vd->vdev_ms_list, + txg_list_create(&vd->vdev_ms_list, spa, offsetof(struct metaslab, ms_txg_node)); - txg_list_create(&vd->vdev_dtl_list, + txg_list_create(&vd->vdev_dtl_list, spa, offsetof(struct vdev, vdev_dtl_node)); vd->vdev_stat.vs_timestamp = gethrtime(); vdev_queue_init(vd); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Fri May 26 11:35:34 2017 (r318931) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Fri May 26 11:37:11 2017 (r318932) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -101,16 +101,6 @@ static kmem_cache_t *zil_lwb_cache; #define LWB_EMPTY(lwb) ((BP_GET_LSIZE(&lwb->lwb_blk) - \ sizeof (zil_chain_t)) == (lwb->lwb_sz - lwb->lwb_nused)) - -/* - * ziltest is by and large an ugly hack, but very useful in - * checking replay without tedious work. - * When running ziltest we want to keep all itx's and so maintain - * a single list in the zl_itxg[] that uses a high txg: ZILTEST_TXG - * We subtract TXG_CONCURRENT_STATES to allow for common code. - */ -#define ZILTEST_TXG (UINT64_MAX - TXG_CONCURRENT_STATES) - static int zil_bp_compare(const void *x1, const void *x2) { From owner-svn-src-all@freebsd.org Fri May 26 11:39:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2954AD82B33; Fri, 26 May 2017 11:39:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00DE310D0; Fri, 26 May 2017 11:39:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBdYr4080469; Fri, 26 May 2017 11:39:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBdY1w080462; Fri, 26 May 2017 11:39:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261139.v4QBdY1w080462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318933 - in vendor-sys/illumos/dist/uts/common: fs fs/zfs sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:39:36 -0000 Author: avg Date: Fri May 26 11:39:34 2017 New Revision: 318933 URL: https://svnweb.freebsd.org/changeset/base/318933 Log: 8064 need a static DTrace probe in VN_HOLD illumos/illumos-gate@ade42b557a6e29c3d17a61b1535d99af10e379be https://github.com/illumos/illumos-gate/commit/ade42b557a6e29c3d17a61b1535d99af10e379be https://www.illumos.org/issues/8064 It's currently nearly impossible to trace what process places a hold on a vnode, as the only ways holds are place is via the `VN_HOLD()` and `VN_HOLD_CALLER()` macros, which inline the bumping of `v_count`. Adding static DTrace probes to these macros would enable tracing of where specific vnode references come from. For completeness and symmetry, a similar static probe should be added to `vn_rele()` and `vn_rele_dnlc()`. Reviewed by: Pavel Zakharov Reviewed by: Prakash Surya Reviewed by: Prashanth Sreenivasa Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Sebastien Roy Modified: vendor-sys/illumos/dist/uts/common/fs/gfs.c vendor-sys/illumos/dist/uts/common/fs/vnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c vendor-sys/illumos/dist/uts/common/sys/vnode.h Modified: vendor-sys/illumos/dist/uts/common/fs/gfs.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/gfs.c Fri May 26 11:37:11 2017 (r318932) +++ vendor-sys/illumos/dist/uts/common/fs/gfs.c Fri May 26 11:39:34 2017 (r318933) @@ -23,8 +23,9 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2017 by Delphix. All rights reserved. + */ #include #include @@ -671,7 +672,7 @@ found: } vn_free(vp); } else { - vp->v_count--; + VN_RELE_LOCKED(vp); data = NULL; mutex_exit(&vp->v_lock); if (vp->v_flag & V_XATTRDIR) { Modified: vendor-sys/illumos/dist/uts/common/fs/vnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/vnode.c Fri May 26 11:37:11 2017 (r318932) +++ vendor-sys/illumos/dist/uts/common/fs/vnode.c Fri May 26 11:39:34 2017 (r318933) @@ -22,6 +22,8 @@ /* * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ @@ -836,7 +838,7 @@ vn_rele(vnode_t *vp) VOP_INACTIVE(vp, CRED(), NULL); return; } - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); } @@ -857,15 +859,15 @@ vn_rele_dnlc(vnode_t *vp) VOP_INACTIVE(vp, CRED(), NULL); return; } - vp->v_count--; + VN_RELE_LOCKED(vp); } mutex_exit(&vp->v_lock); } /* * Like vn_rele() except that it clears v_stream under v_lock. - * This is used by sockfs when it dismantels the association between - * the sockfs node and the vnode in the underlaying file system. + * This is used by sockfs when it dismantles the association between + * the sockfs node and the vnode in the underlying file system. * v_lock has to be held to prevent a thread coming through the lookupname * path from accessing a stream head that is going away. */ @@ -880,7 +882,7 @@ vn_rele_stream(vnode_t *vp) VOP_INACTIVE(vp, CRED(), NULL); return; } - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); } @@ -911,7 +913,7 @@ vn_rele_async(vnode_t *vp, taskq_t *task vp, TQ_SLEEP) != NULL); return; } - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c Fri May 26 11:37:11 2017 (r318932) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c Fri May 26 11:39:34 2017 (r318933) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. */ @@ -1210,7 +1210,7 @@ zfsctl_snapshot_inactive(vnode_t *vp, cr mutex_enter(&vp->v_lock); if (vp->v_count > 1) { - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); mutex_exit(&sdp->sd_lock); VN_RELE(dvp); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Fri May 26 11:37:11 2017 (r318932) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Fri May 26 11:39:34 2017 (r318933) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2015 Joyent, Inc. * Copyright 2017 Nexenta Systems, Inc. @@ -1819,7 +1819,7 @@ top: ASSERT0(error); } mutex_enter(&vp->v_lock); - vp->v_count--; + VN_RELE_LOCKED(vp); ASSERT0(vp->v_count); mutex_exit(&vp->v_lock); mutex_exit(&zp->z_lock); @@ -4411,7 +4411,7 @@ zfs_inactive(vnode_t *vp, cred_t *cr, ca mutex_enter(&zp->z_lock); mutex_enter(&vp->v_lock); ASSERT(vp->v_count == 1); - vp->v_count = 0; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); mutex_exit(&zp->z_lock); rw_exit(&zfsvfs->z_teardown_inactive_lock); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c Fri May 26 11:37:11 2017 (r318932) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c Fri May 26 11:39:34 2017 (r318933) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -1293,7 +1293,7 @@ zfs_zinactive(znode_t *zp) mutex_enter(&zp->z_lock); mutex_enter(&vp->v_lock); - vp->v_count--; + VN_RELE_LOCKED(vp); if (vp->v_count > 0 || vn_has_cached_data(vp)) { /* * If the hold count is greater than zero, somebody has Modified: vendor-sys/illumos/dist/uts/common/sys/vnode.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/vnode.h Fri May 26 11:37:11 2017 (r318932) +++ vendor-sys/illumos/dist/uts/common/sys/vnode.h Fri May 26 11:39:34 2017 (r318933) @@ -22,6 +22,7 @@ /* * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ @@ -53,6 +54,7 @@ #include #ifdef _KERNEL #include +#include #endif /* _KERNEL */ #ifdef __cplusplus @@ -1342,10 +1344,32 @@ int vn_vmpss_usepageio(vnode_t *); */ extern uint_t pvn_vmodsort_supported; -#define VN_HOLD(vp) { \ - mutex_enter(&(vp)->v_lock); \ - (vp)->v_count++; \ - mutex_exit(&(vp)->v_lock); \ +/* + * All changes to v_count should be done through VN_HOLD() or VN_RELE(), or + * one of their variants. This makes it possible to ensure proper locking, + * and to guarantee that all modifications are accompanied by a firing of + * the vn-hold or vn-rele SDT DTrace probe. + * + * Example DTrace command for tracing vnode references using these probes: + * + * dtrace -q -n 'sdt:::vn-hold,sdt:::vn-rele + * { + * this->vp = (vnode_t *)arg0; + * printf("%s %s(%p[%s]) %d\n", execname, probename, this->vp, + * this->vp->v_path == NULL ? "NULL" : stringof(this->vp->v_path), + * this->vp->v_count) + * }' + */ +#define VN_HOLD_LOCKED(vp) { \ + ASSERT(mutex_owned(&(vp)->v_lock)); \ + (vp)->v_count++; \ + DTRACE_PROBE1(vn__hold, vnode_t *, vp); \ +} + +#define VN_HOLD(vp) { \ + mutex_enter(&(vp)->v_lock); \ + VN_HOLD_LOCKED(vp); \ + mutex_exit(&(vp)->v_lock); \ } #define VN_RELE(vp) { \ @@ -1356,6 +1380,13 @@ extern uint_t pvn_vmodsort_supported; vn_rele_async(vp, taskq); \ } +#define VN_RELE_LOCKED(vp) { \ + ASSERT(mutex_owned(&(vp)->v_lock)); \ + ASSERT((vp)->v_count >= 1); \ + (vp)->v_count--; \ + DTRACE_PROBE1(vn__rele, vnode_t *, vp); \ +} + #define VN_SET_VFS_TYPE_DEV(vp, vfsp, type, dev) { \ (vp)->v_vfsp = (vfsp); \ (vp)->v_type = (type); \ From owner-svn-src-all@freebsd.org Fri May 26 11:48:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF24ED82DF8; Fri, 26 May 2017 11:48:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 750AA17A8; Fri, 26 May 2017 11:48:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBmThw085091; Fri, 26 May 2017 11:48:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBmTkV085089; Fri, 26 May 2017 11:48:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261148.v4QBmTkV085089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318934 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:48:30 -0000 Author: avg Date: Fri May 26 11:48:29 2017 New Revision: 318934 URL: https://svnweb.freebsd.org/changeset/base/318934 Log: 8070 Add some ZFS comments illumos/illumos-gate@40713f2b249d289022c715107b3951055a63aef0 https://github.com/illumos/illumos-gate/commit/40713f2b249d289022c715107b3951055a63aef0 https://www.illumos.org/issues/8070 Add some ZFS comments left by various developers at different times Reviewed by: Yuri Pankov Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Alan Somers Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri May 26 11:39:34 2017 (r318933) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri May 26 11:48:29 2017 (r318934) @@ -1219,6 +1219,11 @@ dbuf_unoverride(dbuf_dirty_record_t *dr) uint64_t txg = dr->dr_txg; ASSERT(MUTEX_HELD(&db->db_mtx)); + /* + * This assert is valid because dmu_sync() expects to be called by + * a zilog's get_data while holding a range lock. This call only + * comes from dbuf_dirty() callers who must also hold a range lock. + */ ASSERT(dr->dt.dl.dr_override_state != DR_IN_DMU_SYNC); ASSERT(db->db_level == 0); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Fri May 26 11:39:34 2017 (r318933) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Fri May 26 11:48:29 2017 (r318934) @@ -779,7 +779,7 @@ dsl_scan_visitbp(blkptr_t *bp, const zbo return; /* - * If dsl_scan_ddt() has aready visited this block, it will have + * If dsl_scan_ddt() has already visited this block, it will have * already done any translations or scrubbing, so don't call the * callback again. */ @@ -1446,6 +1446,7 @@ dsl_scan_active(dsl_scan_t *scn) return (used != 0); } +/* Called whenever a txg syncs. */ void dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) { @@ -1863,6 +1864,7 @@ dsl_scan_scrub_cb(dsl_pool_t *dp, return (0); } +/* Called by the ZFS_IOC_POOL_SCAN ioctl to start a scrub or resilver */ int dsl_scan(dsl_pool_t *dp, pool_scan_func_t func) { From owner-svn-src-all@freebsd.org Fri May 26 11:49:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1505FD82E6B; Fri, 26 May 2017 11:49:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0AA31903; Fri, 26 May 2017 11:49:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBngvf085187; Fri, 26 May 2017 11:49:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBngfn085185; Fri, 26 May 2017 11:49:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261149.v4QBngfn085185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318935 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:49:44 -0000 Author: avg Date: Fri May 26 11:49:42 2017 New Revision: 318935 URL: https://svnweb.freebsd.org/changeset/base/318935 Log: MFV r318934: 8070 Add some ZFS comments illumos/illumos-gate@40713f2b249d289022c715107b3951055a63aef0 https://github.com/illumos/illumos-gate/commit/40713f2b249d289022c715107b3951055a63aef0 https://www.illumos.org/issues/8070 Add some ZFS comments left by various developers at different times Reviewed by: Yuri Pankov Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Alan Somers MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri May 26 11:48:29 2017 (r318934) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri May 26 11:49:42 2017 (r318935) @@ -1219,6 +1219,11 @@ dbuf_unoverride(dbuf_dirty_record_t *dr) uint64_t txg = dr->dr_txg; ASSERT(MUTEX_HELD(&db->db_mtx)); + /* + * This assert is valid because dmu_sync() expects to be called by + * a zilog's get_data while holding a range lock. This call only + * comes from dbuf_dirty() callers who must also hold a range lock. + */ ASSERT(dr->dt.dl.dr_override_state != DR_IN_DMU_SYNC); ASSERT(db->db_level == 0); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri May 26 11:48:29 2017 (r318934) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri May 26 11:49:42 2017 (r318935) @@ -807,7 +807,7 @@ dsl_scan_visitbp(blkptr_t *bp, const zbo return; /* - * If dsl_scan_ddt() has aready visited this block, it will have + * If dsl_scan_ddt() has already visited this block, it will have * already done any translations or scrubbing, so don't call the * callback again. */ @@ -1474,6 +1474,7 @@ dsl_scan_active(dsl_scan_t *scn) return (used != 0); } +/* Called whenever a txg syncs. */ void dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) { @@ -1892,6 +1893,7 @@ dsl_scan_scrub_cb(dsl_pool_t *dp, return (0); } +/* Called by the ZFS_IOC_POOL_SCAN ioctl to start a scrub or resilver */ int dsl_scan(dsl_pool_t *dp, pool_scan_func_t func) { From owner-svn-src-all@freebsd.org Fri May 26 11:54:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06E79D83078; Fri, 26 May 2017 11:54:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B71431D67; Fri, 26 May 2017 11:54:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBsgLA089026; Fri, 26 May 2017 11:54:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBsguB089025; Fri, 26 May 2017 11:54:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261154.v4QBsguB089025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318936 - vendor/illumos/dist/man/man1m X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:54:44 -0000 Author: avg Date: Fri May 26 11:54:42 2017 New Revision: 318936 URL: https://svnweb.freebsd.org/changeset/base/318936 Log: 4465 zpool(1M) is able to offline cache vdevs despite what man page says 5659 in the manual page for zpool(1M), one misuse of the word 'zpool' to describe a pool illumos/illumos-gate@c8323d4323a565676ba44883bfeb289d9ed8813e https://github.com/illumos/illumos-gate/commit/c8323d4323a565676ba44883bfeb289d9ed8813e https://www.illumos.org/issues/4465 zpool(1M) is able to offline cache vdevs despite man page saying that it isn't: zpool offline [-t] pool device ... Takes the specified physical device offline. While the device is offline, no attempt is made to read or write to the device. This command is not applicable to spares or cache devices. altair:root:~# zpool create testoff c9t67d0 cache c9t71d0 altair:root:~# zpool status testoff pool: testoff state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM testoff ONLINE 0 0 0 c9t67d0 ONLINE 0 0 0 cache c9t71d0 ONLINE 0 0 0 errors: No known data errors altair:root:~# zpool offline testoff c9t71d0 altair:root:~# zpool status testoff pool: testoff state: ONLINE status: One or more devices has been taken offline by the administrator. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Online the device using 'zpool online' or replace the device with 'zpool replace'. scan: none requested https://www.illumos.org/issues/5659 At https://github.com/illumos/illumos-gate/blob/master/usr/src/man/man1m/ zpool.1m#L931 Do not add a disk that is currently configured as a quorum device to a zpool. – should be: Do not add a disk that is currently configured as a quorum device to a pool. Reviewed by: Matthew Ahrens Approved by: Hans Rosenfeld Author: Yuri Pankov Modified: vendor/illumos/dist/man/man1m/zpool.1m Modified: vendor/illumos/dist/man/man1m/zpool.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 11:49:42 2017 (r318935) +++ vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 11:54:42 2017 (r318936) @@ -1,747 +1,535 @@ -'\" te +.\" +.\" CDDL HEADER START +.\" +.\" The contents of this file are subject to the terms of the +.\" Common Development and Distribution License (the "License"). +.\" You may not use this file except in compliance with the License. +.\" +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +.\" or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions +.\" and limitations under the License. +.\" +.\" When distributing Covered Code, include this CDDL HEADER in each +.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. +.\" If applicable, add the following below this CDDL HEADER, with the +.\" fields enclosed by brackets "[]" replaced with your own identifying +.\" information: Portions Copyright [yyyy] [name of copyright owner] +.\" +.\" CDDL HEADER END +.\" +.\" .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. -.\" Copyright 2011, Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2013 by Delphix. All rights reserved. -.\" The contents of this file are subject to the terms of the Common Development -.\" and Distribution License (the "License"). You may not use this file except -.\" in compliance with the License. You can obtain a copy of the license at -.\" usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" Copyright 2016 Nexenta Systems, Inc. .\" -.\" See the License for the specific language governing permissions and -.\" limitations under the License. When distributing Covered Code, include this -.\" CDDL HEADER in each file and include the License file at -.\" usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this -.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your -.\" own identifying information: -.\" Portions Copyright [yyyy] [name of copyright owner] -.TH ZPOOL 1M "Mar 6, 2014" -.SH NAME -zpool \- configures ZFS storage pools -.SH SYNOPSIS -.LP -.nf -\fBzpool\fR [\fB-?\fR] -.fi - -.LP -.nf -\fBzpool add\fR [\fB-fn\fR] \fIpool\fR \fIvdev\fR ... -.fi - -.LP -.nf -\fBzpool attach\fR [\fB-f\fR] \fIpool\fR \fIdevice\fR \fInew_device\fR -.fi - -.LP -.nf -\fBzpool clear\fR \fIpool\fR [\fIdevice\fR] -.fi - -.LP -.nf -\fBzpool create\fR [\fB-fnd\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-O\fR \fIfile-system-property=value\fR] - ... [\fB-m\fR \fImountpoint\fR] [\fB-R\fR \fIroot\fR] \fIpool\fR \fIvdev\fR ... -.fi - -.LP -.nf -\fBzpool destroy\fR [\fB-f\fR] \fIpool\fR -.fi - -.LP -.nf -\fBzpool detach\fR \fIpool\fR \fIdevice\fR -.fi - -.LP -.nf -\fBzpool export\fR [\fB-f\fR] \fIpool\fR ... -.fi - -.LP -.nf -\fBzpool get\fR [\fB-Hp\fR] [\fB-o \fR\fIfield\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] \fIpool\fR ... -.fi - -.LP -.nf -\fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ... -.fi - -.LP -.nf -\fBzpool import\fR [\fB-d\fR \fIdir\fR] [\fB-D\fR] -.fi - -.LP -.nf -\fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] - [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-N\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR]] \fB-a\fR -.fi - -.LP -.nf -\fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] - [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR]] \fIpool\fR |\fIid\fR [\fInewpool\fR] -.fi - -.LP -.nf -\fBzpool iostat\fR [\fB-T\fR \fBu\fR | \fBd\fR ] [\fB-v\fR] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]] -.fi - -.LP -.nf -\fBzpool list\fR [\fB-T\fR \fBu\fR | \fBd\fR ] [\fB-Hpv\fR] [\fB-o\fR \fIproperty\fR[,...]] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]] -.fi - -.LP -.nf -\fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ... -.fi - -.LP -.nf -\fBzpool online\fR \fIpool\fR \fIdevice\fR ... -.fi - -.LP -.nf -\fBzpool reguid\fR \fIpool\fR -.fi - -.LP -.nf -\fBzpool reopen\fR \fIpool\fR -.fi - -.LP -.nf -\fBzpool remove\fR \fIpool\fR \fIdevice\fR ... -.fi - -.LP -.nf -\fBzpool replace\fR [\fB-f\fR] \fIpool\fR \fIdevice\fR [\fInew_device\fR] -.fi - -.LP -.nf -\fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ... -.fi - -.LP -.nf -\fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR -.fi - -.LP -.nf -\fBzpool status\fR [\fB-xvD\fR] [\fB-T\fR \fBu\fR | \fBd\fR ] [\fIpool\fR] ... [\fIinterval\fR [\fIcount\fR]] -.fi - -.LP -.nf -\fBzpool upgrade\fR -.fi - -.LP -.nf -\fBzpool upgrade\fR \fB-v\fR -.fi - -.LP -.nf -\fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ... -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBzpool\fR command configures \fBZFS\fR storage pools. A storage pool is a -collection of devices that provides physical storage and data replication for -\fBZFS\fR datasets. -.sp -.LP -All datasets within a storage pool share the same space. See \fBzfs\fR(1M) for -information on managing datasets. -.SS "Virtual Devices (\fBvdev\fRs)" -.sp -.LP +.Dd February 15, 2016 +.Dt ZPOOL 1M +.Os +.Sh NAME +.Nm zpool +.Nd configure ZFS storage pools +.Sh SYNOPSIS +.Nm +.Fl \? +.Nm +.Cm add +.Op Fl fn +.Ar pool vdev Ns ... +.Nm +.Cm attach +.Op Fl f +.Ar pool device new_device +.Nm +.Cm clear +.Ar pool +.Op Ar device +.Nm +.Cm create +.Op Fl dfn +.Op Fl m Ar mountpoint +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ... +.Op Fl R Ar root +.Ar pool vdev Ns ... +.Nm +.Cm destroy +.Op Fl f +.Ar pool +.Nm +.Cm detach +.Ar pool device +.Nm +.Cm export +.Op Fl f +.Ar pool Ns ... +.Nm +.Cm get +.Op Fl Hp +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns ... +.Ar pool Ns ... +.Nm +.Cm history +.Op Fl il +.Oo Ar pool Oc Ns ... +.Nm +.Cm import +.Op Fl D +.Op Fl d Ar dir +.Nm +.Cm import +.Fl a +.Op Fl DfmN +.Op Fl F Op Fl n +.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir +.Op Fl o Ar mntopts +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Op Fl R Ar root +.Nm +.Cm import +.Op Fl Dfm +.Op Fl F Op Fl n +.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir +.Op Fl o Ar mntopts +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Op Fl R Ar root +.Ar pool Ns | Ns Ar id +.Op Ar newpool +.Nm +.Cm iostat +.Op Fl v +.Op Fl T Sy u Ns | Ns Sy d +.Oo Ar pool Oc Ns ... +.Op Ar interval Op Ar count +.Nm +.Cm list +.Op Fl Hpv +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... +.Op Fl T Sy u Ns | Ns Sy d +.Oo Ar pool Oc Ns ... +.Op Ar interval Op Ar count +.Nm +.Cm offline +.Op Fl t +.Ar pool Ar device Ns ... +.Nm +.Cm online +.Op Fl e +.Ar pool Ar device Ns ... +.Nm +.Cm reguid +.Ar pool +.Nm +.Cm reopen +.Ar pool +.Nm +.Cm remove +.Ar pool Ar device Ns ... +.Nm +.Cm replace +.Op Fl f +.Ar pool Ar device Op Ar new_device +.Nm +.Cm scrub +.Op Fl s +.Ar pool Ns ... +.Nm +.Cm set +.Ar property Ns = Ns Ar value +.Ar pool +.Nm +.Cm status +.Op Fl Dvx +.Op Fl T Sy u Ns | Ns Sy d +.Oo Ar pool Oc Ns ... +.Op Ar interval Op Ar count +.Nm +.Cm upgrade +.Nm +.Cm upgrade +.Fl v +.Nm +.Cm upgrade +.Op Fl V Ar version +.Fl a Ns | Ns Ar pool Ns ... +.Sh DESCRIPTION +The +.Nm +command configures ZFS storage pools. A storage pool is a collection of devices +that provides physical storage and data replication for ZFS datasets. All +datasets within a storage pool share the same space. See +.Xr zfs 1M +for information on managing datasets. +.Ss Virtual Devices (vdevs) A "virtual device" describes a single device or a collection of devices organized according to certain performance and fault characteristics. The following virtual devices are supported: -.sp -.ne 2 -.na -\fB\fBdisk\fR\fR -.ad -.RS 10n -A block device, typically located under \fB/dev/dsk\fR. \fBZFS\fR can use -individual slices or partitions, though the recommended mode of operation is to -use whole disks. A disk can be specified by a full path, or it can be a -shorthand name (the relative portion of the path under "/dev/dsk"). A whole -disk can be specified by omitting the slice or partition designation. For -example, "c0t0d0" is equivalent to "/dev/dsk/c0t0d0s2". When given a whole -disk, \fBZFS\fR automatically labels the disk, if necessary. -.RE - -.sp -.ne 2 -.na -\fB\fBfile\fR\fR -.ad -.RS 10n +.Bl -tag -width Ds +.It Sy disk +A block device, typically located under +.Pa /dev/dsk . +ZFS can use individual slices or partitions, though the recommended mode of +operation is to use whole disks. A disk can be specified by a full path, or it +can be a shorthand name +.Po the relative portion of the path under +.Pa /dev/dsk +.Pc . +A whole disk can be specified by omitting the slice or partition designation. +For example, +.Pa c0t0d0 +is equivalent to +.Pa /dev/dsk/c0t0d0s2 . +When given a whole disk, ZFS automatically labels the disk, if necessary. +.It Sy file A regular file. The use of files as a backing store is strongly discouraged. It is designed primarily for experimental purposes, as the fault tolerance of a file is only as good as the file system of which it is a part. A file must be specified by a full path. -.RE - -.sp -.ne 2 -.na -\fB\fBmirror\fR\fR -.ad -.RS 10n +.It Sy mirror A mirror of two or more devices. Data is replicated in an identical fashion -across all components of a mirror. A mirror with \fIN\fR disks of size \fIX\fR -can hold \fIX\fR bytes and can withstand (\fIN-1\fR) devices failing before -data integrity is compromised. -.RE - -.sp -.ne 2 -.na -\fB\fBraidz\fR\fR -.ad -.br -.na -\fB\fBraidz1\fR\fR -.ad -.br -.na -\fB\fBraidz2\fR\fR -.ad -.br -.na -\fB\fBraidz3\fR\fR -.ad -.RS 10n -A variation on \fBRAID-5\fR that allows for better distribution of parity and -eliminates the "\fBRAID-5\fR write hole" (in which data and parity become -inconsistent after a power loss). Data and parity is striped across all disks -within a \fBraidz\fR group. -.sp -A \fBraidz\fR group can have single-, double- , or triple parity, meaning that -the \fBraidz\fR group can sustain one, two, or three failures, respectively, -without losing any data. The \fBraidz1\fR \fBvdev\fR type specifies a -single-parity \fBraidz\fR group; the \fBraidz2\fR \fBvdev\fR type specifies a -double-parity \fBraidz\fR group; and the \fBraidz3\fR \fBvdev\fR type specifies -a triple-parity \fBraidz\fR group. The \fBraidz\fR \fBvdev\fR type is an alias -for \fBraidz1\fR. -.sp -A \fBraidz\fR group with \fIN\fR disks of size \fIX\fR with \fIP\fR parity -disks can hold approximately (\fIN-P\fR)*\fIX\fR bytes and can withstand -\fIP\fR device(s) failing before data integrity is compromised. The minimum -number of devices in a \fBraidz\fR group is one more than the number of parity -disks. The recommended number is between 3 and 9 to help increase performance. -.RE - -.sp -.ne 2 -.na -\fB\fBspare\fR\fR -.ad -.RS 10n -A special pseudo-\fBvdev\fR which keeps track of available hot spares for a -pool. For more information, see the "Hot Spares" section. -.RE - -.sp -.ne 2 -.na -\fB\fBlog\fR\fR -.ad -.RS 10n -A separate-intent log device. If more than one log device is specified, then +across all components of a mirror. A mirror with N disks of size X can hold X +bytes and can withstand (N-1) devices failing before data integrity is +compromised. +.It Sy raidz , raidz1 , raidz2 , raidz3 +A variation on RAID-5 that allows for better distribution of parity and +eliminates the RAID-5 +.Qq write hole +.Pq in which data and parity become inconsistent after a power loss . +Data and parity is striped across all disks within a raidz group. +.Pp +A raidz group can have single-, double-, or triple-parity, meaning that the +raidz group can sustain one, two, or three failures, respectively, without +losing any data. The +.Sy raidz1 +vdev type specifies a single-parity raidz group; the +.Sy raidz2 +vdev type specifies a double-parity raidz group; and the +.Sy raidz3 +vdev type specifies a triple-parity raidz group. The +.Sy raidz +vdev type is an alias for +.Sy raidz1 . +.Pp +A raidz group with N disks of size X with P parity disks can hold approximately +(N-P)*X bytes and can withstand P device(s) failing before data integrity is +compromised. The minimum number of devices in a raidz group is one more than +the number of parity disks. The recommended number is between 3 and 9 to help +increase performance. +.It Sy spare +A special pseudo-vdev which keeps track of available hot spares for a pool. For +more information, see the +.Sx Hot Spares +section. +.It Sy log +A separate intent log device. If more than one log device is specified, then writes are load-balanced between devices. Log devices can be mirrored. However, -\fBraidz\fR \fBvdev\fR types are not supported for the intent log. For more -information, see the "Intent Log" section. -.RE - -.sp -.ne 2 -.na -\fB\fBcache\fR\fR -.ad -.RS 10n +raidz vdev types are not supported for the intent log. For more information, +see the +.Sx Intent Log +section. +.It Sy cache A device used to cache storage pool data. A cache device cannot be cannot be -configured as a mirror or \fBraidz\fR group. For more information, see the -"Cache Devices" section. -.RE - -.sp -.LP -Virtual devices cannot be nested, so a mirror or \fBraidz\fR virtual device can -only contain files or disks. Mirrors of mirrors (or other combinations) are not -allowed. -.sp -.LP +configured as a mirror or raidz group. For more information, see the +.Sx Cache Devices +section. +.El +.Pp +Virtual devices cannot be nested, so a mirror or raidz virtual device can only +contain files or disks. Mirrors of mirrors +.Pq or other combinations +are not allowed. +.Pp A pool can have any number of virtual devices at the top of the configuration -(known as "root vdevs"). Data is dynamically distributed across all top-level -devices to balance data among devices. As new virtual devices are added, -\fBZFS\fR automatically places data on the newly available devices. -.sp -.LP +.Po known as +.Qq root vdevs +.Pc . +Data is dynamically distributed across all top-level devices to balance data +among devices. As new virtual devices are added, ZFS automatically places data +on the newly available devices. +.Pp Virtual devices are specified one at a time on the command line, separated by -whitespace. The keywords "mirror" and "raidz" are used to distinguish where a -group ends and another begins. For example, the following creates two root -vdevs, each a mirror of two disks: -.sp -.in +2 -.nf -# \fBzpool create mypool mirror c0t0d0 c0t1d0 mirror c1t0d0 c1t1d0\fR -.fi -.in -2 -.sp - -.SS "Device Failure and Recovery" -.sp -.LP -\fBZFS\fR supports a rich set of mechanisms for handling device failure and -data corruption. All metadata and data is checksummed, and \fBZFS\fR -automatically repairs bad data from a good copy when corruption is detected. -.sp -.LP +whitespace. The keywords +.Sy mirror +and +.Sy raidz +are used to distinguish where a group ends and another begins. For example, +the following creates two root vdevs, each a mirror of two disks: +.Bd -literal +# zpool create mypool mirror c0t0d0 c0t1d0 mirror c1t0d0 c1t1d0 +.Ed +.Ss Device Failure and Recovery +ZFS supports a rich set of mechanisms for handling device failure and data +corruption. All metadata and data is checksummed, and ZFS automatically repairs +bad data from a good copy when corruption is detected. +.Pp In order to take advantage of these features, a pool must make use of some form -of redundancy, using either mirrored or \fBraidz\fR groups. While \fBZFS\fR -supports running in a non-redundant configuration, where each root vdev is -simply a disk or file, this is strongly discouraged. A single case of bit -corruption can render some or all of your data unavailable. -.sp -.LP +of redundancy, using either mirrored or raidz groups. While ZFS supports +running in a non-redundant configuration, where each root vdev is simply a disk +or file, this is strongly discouraged. A single case of bit corruption can +render some or all of your data unavailable. +.Pp A pool's health status is described by one of three states: online, degraded, or faulted. An online pool has all devices operating normally. A degraded pool is one in which one or more devices have failed, but the data is still available due to a redundant configuration. A faulted pool has corrupted metadata, or one or more faulted devices, and insufficient replicas to continue functioning. -.sp -.LP -The health of the top-level vdev, such as mirror or \fBraidz\fR device, is +.Pp +The health of the top-level vdev, such as mirror or raidz device, is potentially impacted by the state of its associated vdevs, or component devices. A top-level vdev or component device is in one of the following states: -.sp -.ne 2 -.na -\fB\fBDEGRADED\fR\fR -.ad -.RS 12n +.Bl -tag -width "DEGRADED" +.It Sy DEGRADED One or more top-level vdevs is in the degraded state because one or more component devices are offline. Sufficient replicas exist to continue functioning. -.sp +.Pp One or more component devices is in the degraded or faulted state, but sufficient replicas exist to continue functioning. The underlying conditions are as follows: -.RS +4 -.TP -.ie t \(bu -.el o +.Bl -bullet +.It The number of checksum errors exceeds acceptable levels and the device is -degraded as an indication that something may be wrong. \fBZFS\fR continues to -use the device as necessary. -.RE -.RS +4 -.TP -.ie t \(bu -.el o +degraded as an indication that something may be wrong. ZFS continues to use the +device as necessary. +.It The number of I/O errors exceeds acceptable levels. The device could not be marked as faulted because there are insufficient replicas to continue functioning. -.RE -.RE - -.sp -.ne 2 -.na -\fB\fBFAULTED\fR\fR -.ad -.RS 12n +.El +.It Sy FAULTED One or more top-level vdevs is in the faulted state because one or more component devices are offline. Insufficient replicas exist to continue functioning. -.sp +.Pp One or more component devices is in the faulted state, and insufficient replicas exist to continue functioning. The underlying conditions are as follows: -.RS +4 -.TP -.ie t \(bu -.el o +.Bl -bullet +.It The device could be opened, but the contents did not match expected values. -.RE -.RS +4 -.TP -.ie t \(bu -.el o +.It The number of I/O errors exceeds acceptable levels and the device is faulted to prevent further use of the device. -.RE -.RE - -.sp -.ne 2 -.na -\fB\fBOFFLINE\fR\fR -.ad -.RS 12n -The device was explicitly taken offline by the "\fBzpool offline\fR" command. -.RE - -.sp -.ne 2 -.na -\fB\fBONLINE\fR\fR -.ad -.RS 12n +.El +.It Sy OFFLINE +The device was explicitly taken offline by the +.Nm zpool Cm offline +command. +.It Sy ONLINE The device is online and functioning. -.RE - -.sp -.ne 2 -.na -\fB\fBREMOVED\fR\fR -.ad -.RS 12n +.It Sy REMOVED The device was physically removed while the system was running. Device removal detection is hardware-dependent and may not be supported on all platforms. -.RE - -.sp -.ne 2 -.na -\fB\fBUNAVAIL\fR\fR -.ad -.RS 12n +.It Sy UNAVAIL The device could not be opened. If a pool is imported when a device was unavailable, then the device will be identified by a unique identifier instead of its path since the path was never correct in the first place. -.RE - -.sp -.LP -If a device is removed and later re-attached to the system, \fBZFS\fR attempts +.El +.Pp +If a device is removed and later re-attached to the system, ZFS attempts to put the device online automatically. Device attach detection is hardware-dependent and might not be supported on all platforms. -.SS "Hot Spares" -.sp -.LP -\fBZFS\fR allows devices to be associated with pools as "hot spares". These -devices are not actively used in the pool, but when an active device fails, it -is automatically replaced by a hot spare. To create a pool with hot spares, -specify a "spare" \fBvdev\fR with any number of devices. For example, -.sp -.in +2 -.nf +.Ss Hot Spares +ZFS allows devices to be associated with pools as +.Qq hot spares . +These devices are not actively used in the pool, but when an active device +fails, it is automatically replaced by a hot spare. To create a pool with hot +spares, specify a +.Sy spare +vdev with any number of devices. For example, +.Bd -literal # zpool create pool mirror c0d0 c1d0 spare c2d0 c3d0 -.fi -.in -2 -.sp - -.sp -.LP -Spares can be shared across multiple pools, and can be added with the "\fBzpool -add\fR" command and removed with the "\fBzpool remove\fR" command. Once a spare -replacement is initiated, a new "spare" \fBvdev\fR is created within the -configuration that will remain there until the original device is replaced. At -this point, the hot spare becomes available again if another device fails. -.sp -.LP +.Ed +.Pp +Spares can be shared across multiple pools, and can be added with the +.Nm zpool Cm add +command and removed with the +.Nm zpool Cm remove +command. Once a spare replacement is initiated, a new +.Sy spare +vdev is created within the configuration that will remain there until the +original device is replaced. At this point, the hot spare becomes available +again if another device fails. +.Pp If a pool has a shared spare that is currently being used, the pool can not be exported since other pools may use this shared spare, which may lead to potential data corruption. -.sp -.LP +.Pp An in-progress spare replacement can be cancelled by detaching the hot spare. If the original faulted device is detached, then the hot spare assumes its place in the configuration, and is removed from the spare list of all active pools. -.sp -.LP +.Pp Spares cannot replace log devices. -.SS "Intent Log" -.sp -.LP -The \fBZFS\fR Intent Log (\fBZIL\fR) satisfies \fBPOSIX\fR requirements for -synchronous transactions. For instance, databases often require their -transactions to be on stable storage devices when returning from a system call. -\fBNFS\fR and other applications can also use \fBfsync\fR() to ensure data -stability. By default, the intent log is allocated from blocks within the main -pool. However, it might be possible to get better performance using separate -intent log devices such as \fBNVRAM\fR or a dedicated disk. For example: -.sp -.in +2 -.nf -\fB# zpool create pool c0d0 c1d0 log c2d0\fR -.fi -.in -2 -.sp - -.sp -.LP +.Ss Intent Log +The ZFS Intent Log (ZIL) satisfies POSIX requirements for synchronous +transactions. For instance, databases often require their transactions to be on +stable storage devices when returning from a system call. NFS and other +applications can also use +.Xr fsync 3C +to ensure data stability. By default, the intent log is allocated from blocks +within the main pool. However, it might be possible to get better performance +using separate intent log devices such as NVRAM or a dedicated disk. For +example: +.Bd -literal +# zpool create pool c0d0 c1d0 log c2d0 +.Ed +.Pp Multiple log devices can also be specified, and they can be mirrored. See the -EXAMPLES section for an example of mirroring multiple log devices. -.sp -.LP +.Sx EXAMPLES +section for an example of mirroring multiple log devices. +.Pp Log devices can be added, replaced, attached, detached, and imported and exported as part of the larger pool. Mirrored log devices can be removed by specifying the top-level mirror for the log. -.SS "Cache Devices" -.sp -.LP -Devices can be added to a storage pool as "cache devices." These devices -provide an additional layer of caching between main memory and disk. For -read-heavy workloads, where the working set size is much larger than what can -be cached in main memory, using cache devices allow much more of this working -set to be served from low latency media. Using cache devices provides the -greatest performance improvement for random read-workloads of mostly static +.Ss Cache Devices +Devices can be added to a storage pool as +.Qq cache devices . +These devices provide an additional layer of caching between main memory and +disk. For read-heavy workloads, where the working set size is much larger than +what can be cached in main memory, using cache devices allow much more of this +working set to be served from low latency media. Using cache devices provides +the greatest performance improvement for random read-workloads of mostly static content. -.sp -.LP -To create a pool with cache devices, specify a "cache" \fBvdev\fR with any -number of devices. For example: -.sp -.in +2 -.nf -\fB# zpool create pool c0d0 c1d0 cache c2d0 c3d0\fR -.fi -.in -2 -.sp - -.sp -.LP -Cache devices cannot be mirrored or part of a \fBraidz\fR configuration. If a -read error is encountered on a cache device, that read \fBI/O\fR is reissued to -the original storage pool device, which might be part of a mirrored or -\fBraidz\fR configuration. -.sp -.LP +.Pp +To create a pool with cache devices, specify a +.Sy cache +vdev with any number of devices. For example: +.Bd -literal +# zpool create pool c0d0 c1d0 cache c2d0 c3d0 +.Ed +.Pp +Cache devices cannot be mirrored or part of a raidz configuration. If a read +error is encountered on a cache device, that read I/O is reissued to the +original storage pool device, which might be part of a mirrored or raidz +configuration. +.Pp The content of the cache devices is considered volatile, as is the case with other system caches. -.SS "Properties" -.sp -.LP +.Ss Properties Each pool has several properties associated with it. Some properties are read-only statistics while others are configurable and change the behavior of -the pool. The following are read-only properties: -.sp -.ne 2 -.na -\fB\fBavailable\fR\fR -.ad -.RS 20n +the pool. +.Pp +The following are read-only properties: +.Bl -tag -width Ds +.It Sy available Amount of storage available within the pool. This property can also be referred -to by its shortened column name, "avail". -.RE - -.sp -.ne 2 -.na -\fB\fBcapacity\fR\fR -.ad -.RS 20n +to by its shortened column name, +.Sy avail . +.It Sy capacity Percentage of pool space used. This property can also be referred to by its -shortened column name, "cap". -.RE - -.sp -.ne 2 -.na -\fB\fBexpandsize\fR\fR -.ad -.RS 20n +shortened column name, +.Sy cap . +.It Sy expandsize Amount of uninitialized space within the pool or device that can be used to increase the total capacity of the pool. Uninitialized space consists of any space on an EFI labeled vdev which has not been brought online -(i.e. zpool online -e). This space occurs when a LUN is dynamically expanded. -.RE - -.sp -.ne 2 -.na -\fB\fBfragmentation\fR\fR -.ad -.RS 20n +.Po e.g, using +.Nm zpool Cm online Fl e +.Pc . +This space occurs when a LUN is dynamically expanded. +.It Sy fragmentation The amount of fragmentation in the pool. -.RE - -.sp -.ne 2 -.na -\fB\fBfree\fR\fR -.ad -.RS 20n +.It Sy free The amount of free space available in the pool. -.RE - -.sp -.ne 2 -.na -\fB\fBfreeing\fR\fR -.ad -.RS 20n +.It Sy freeing After a file system or snapshot is destroyed, the space it was using is -returned to the pool asynchronously. \fB\fBfreeing\fR\fR is the amount of -space remaining to be reclaimed. Over time \fB\fBfreeing\fR\fR will decrease -while \fB\fBfree\fR\fR increases. -.RE - -.sp -.ne 2 -.na -\fB\fBhealth\fR\fR -.ad -.RS 20n -The current health of the pool. Health can be "\fBONLINE\fR", "\fBDEGRADED\fR", -"\fBFAULTED\fR", " \fBOFFLINE\fR", "\fBREMOVED\fR", or "\fBUNAVAIL\fR". -.RE - -.sp -.ne 2 -.na -\fB\fBguid\fR\fR -.ad -.RS 20n +returned to the pool asynchronously. +.Sy freeing +is the amount of space remaining to be reclaimed. Over time +.Sy freeing +will decrease while +.Sy free +increases. +.It Sy health +The current health of the pool. Health can be one of +.Sy ONLINE , DEGRADED , FAULTED , OFFLINE, REMOVED , UNAVAIL . +.It Sy guid A unique identifier for the pool. -.RE - -.sp -.ne 2 -.na *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri May 26 11:55:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EF71D83118; Fri, 26 May 2017 11:55:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 254AF1F10; Fri, 26 May 2017 11:55:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBtWJw089129; Fri, 26 May 2017 11:55:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBtWT0089128; Fri, 26 May 2017 11:55:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261155.v4QBtWT0089128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318937 - vendor/illumos/dist/man/man1m X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:55:33 -0000 Author: avg Date: Fri May 26 11:55:31 2017 New Revision: 318937 URL: https://svnweb.freebsd.org/changeset/base/318937 Log: 2897 "zpool split" documentation missing from manpage illumos/illumos-gate@879bece34ee134b2be670393fe9ffe33ce268aa0 https://github.com/illumos/illumos-gate/commit/879bece34ee134b2be670393fe9ffe33ce268aa0 https://www.illumos.org/issues/2897 Found this option in some Oracle documentation and wanted to check out the zpool manpage on it in OI. Unfortunately it seems to be missing from the manpage, so I first thought it was unsupported. However, "# zpool split" does print the correct usage. Testing with the "-n" switch makes me believe it is supported (I don't actually need to split my pool). Reviewed by: Dan McDonald Reviewed by: Matthew Ahrens Approved by: Hans Rosenfeld Author: Steven Burgess Modified: vendor/illumos/dist/man/man1m/zpool.1m Modified: vendor/illumos/dist/man/man1m/zpool.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 11:54:42 2017 (r318936) +++ vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 11:55:31 2017 (r318937) @@ -139,6 +139,12 @@ .Ar property Ns = Ns Ar value .Ar pool .Nm +.Cm split +.Op Fl n +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Op Fl R Ar root +.Ar pool newpool +.Nm .Cm status .Op Fl Dvx .Op Fl T Sy u Ns | Ns Sy d @@ -1327,6 +1333,44 @@ section for more information on what pro values. .It Xo .Nm +.Cm split +.Op Fl n +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Op Fl R Ar root +.Ar pool newpool +.Xc +Splits devices off +.Ar pool +creating +.Ar newpool . +All vdevs in +.Ar pool +must be mirrors. At the time of the split, +.Ar newpool +will be a replica of +.Ar pool . +.Bl -tag -width Ds +.It Fl n +Do dry run, do not actually perform the split. Print out the expected +configuration of +.Ar newpool . +.It Fl o Ar property Ns = Ns Ar value +Sets the specified property for +.Ar newpool . +See the +.Sx Properties +section for more information on the available pool properties. +.It Fl R Ar root +Set +.Sy altroot +for +.Ar newpool +to +.Ar root +and automaticaly import it. +.El +.It Xo +.Nm .Cm status .Op Fl Dvx .Op Fl T Sy u Ns | Ns Sy d From owner-svn-src-all@freebsd.org Fri May 26 11:56:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C905D83197; Fri, 26 May 2017 11:56:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14B641070; Fri, 26 May 2017 11:56:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBuTMo089209; Fri, 26 May 2017 11:56:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBuT6u089208; Fri, 26 May 2017 11:56:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261156.v4QBuT6u089208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:56:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318938 - vendor/illumos/dist/man/man1m X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:56:30 -0000 Author: avg Date: Fri May 26 11:56:28 2017 New Revision: 318938 URL: https://svnweb.freebsd.org/changeset/base/318938 Log: 6781 zpool man page needs updated to remove duplicate entry of "cannot be" where it discusses cache devices illumos/illumos-gate@e4cb59f791c5c6dea7ad4caa6dee845024ce71ef https://github.com/illumos/illumos-gate/commit/e4cb59f791c5c6dea7ad4caa6dee845024ce71ef https://www.illumos.org/issues/6781 cache A device used to cache storage pool data. A cache device cannot be cannot be configured as a mirror or raidz group. For more information, see the "Cache Devices" section. needs changed to cache A device used to cache storage pool data. A cache device cannot be configured as a mirror or raidz group. For more information, see the "Cache Devices" section. Reviewed by: Toomas Soome Reviewed by: Robert Mustacchi Approved by: Matthew Ahrens Author: Alexander Pyhalov Modified: vendor/illumos/dist/man/man1m/zpool.1m Modified: vendor/illumos/dist/man/man1m/zpool.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 11:55:31 2017 (r318937) +++ vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 11:56:28 2017 (r318938) @@ -23,7 +23,7 @@ .\" Copyright (c) 2013 by Delphix. All rights reserved. .\" Copyright 2016 Nexenta Systems, Inc. .\" -.Dd February 15, 2016 +.Dd March 25, 2016 .Dt ZPOOL 1M .Os .Sh NAME @@ -235,8 +235,8 @@ see the .Sx Intent Log section. .It Sy cache -A device used to cache storage pool data. A cache device cannot be cannot be -configured as a mirror or raidz group. For more information, see the +A device used to cache storage pool data. A cache device cannot be configured +as a mirror or raidz group. For more information, see the .Sx Cache Devices section. .El From owner-svn-src-all@freebsd.org Fri May 26 11:59:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2C7BD83223; Fri, 26 May 2017 11:59:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C4711239; Fri, 26 May 2017 11:59:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QBxKMQ089353; Fri, 26 May 2017 11:59:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QBxKRO089352; Fri, 26 May 2017 11:59:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261159.v4QBxKRO089352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 11:59:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318939 - vendor/illumos/dist/man/man1m X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 11:59:21 -0000 Author: avg Date: Fri May 26 11:59:20 2017 New Revision: 318939 URL: https://svnweb.freebsd.org/changeset/base/318939 Log: 6418 zpool should have a label clearing command illumos/illumos-gate@6401734d545a04c18f68b448202f9d9a77216bb9 https://github.com/illumos/illumos-gate/commit/6401734d545a04c18f68b448202f9d9a77216bb9 https://www.illumos.org/issues/6418 An easy, direct means of sanitizing pool vdevs can be helpful for management purposes. FreeBSD has had a 'zpool labelclear' for some time, see: https:// svnweb.freebsd.org/base?view=revision&revision=224171 SpectraBSD has a slightly updated version, which I propose for inclusion. Reviewed by: Yuri Pankov Reviewed by: Matthew Ahrens Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Will Andrews Note: the bulk of the change has been already imported, this is a follow up that imports zpool.1m changes. Modified: vendor/illumos/dist/man/man1m/zpool.1m Modified: vendor/illumos/dist/man/man1m/zpool.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 11:56:28 2017 (r318938) +++ vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 11:59:20 2017 (r318939) @@ -23,7 +23,7 @@ .\" Copyright (c) 2013 by Delphix. All rights reserved. .\" Copyright 2016 Nexenta Systems, Inc. .\" -.Dd March 25, 2016 +.Dd March 30, 2016 .Dt ZPOOL 1M .Os .Sh NAME @@ -103,6 +103,10 @@ .Oo Ar pool Oc Ns ... .Op Ar interval Op Ar count .Nm +.Cm labelclear +.Op Fl f +.Ar device +.Nm .Cm list .Op Fl Hpv .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... @@ -1154,6 +1158,21 @@ pool, in addition to the pool-wide stati .El .It Xo .Nm +.Cm labelclear +.Op Fl f +.Ar device +.Xc +Removes ZFS label information from the specified +.Ar device . +The +.Ar device +must not be part of an active pool configuration. +.Bl -tag -width Ds +.It Fl f +Treat exported or foreign devices as inactive. +.El +.It Xo +.Nm .Cm list .Op Fl Hpv .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... From owner-svn-src-all@freebsd.org Fri May 26 12:00:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3E04D83722; Fri, 26 May 2017 12:00:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85F94166A; Fri, 26 May 2017 12:00:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QC0V4T089488; Fri, 26 May 2017 12:00:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QC0VEs089487; Fri, 26 May 2017 12:00:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261200.v4QC0VEs089487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318940 - vendor/illumos/dist/man/man1m X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:00:32 -0000 Author: avg Date: Fri May 26 12:00:31 2017 New Revision: 318940 URL: https://svnweb.freebsd.org/changeset/base/318940 Log: 7956 "minimum" is misspelled in zpool manpage illumos/illumos-gate@eba8726136851528470dad9bad27892859bc1e3e https://github.com/illumos/illumos-gate/commit/eba8726136851528470dad9bad27892859bc1e3e https://www.illumos.org/issues/7956 Reviewed by: Prashanth Sreenivasa Reviewed by: Matthew Ahrens Reviewed by: Sebastien Roy Reviewed by: Yuri Pankov Approved by: Richard Lowe Author: Brad Lewis Modified: vendor/illumos/dist/man/man1m/zpool.1m Modified: vendor/illumos/dist/man/man1m/zpool.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 11:59:20 2017 (r318939) +++ vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 12:00:31 2017 (r318940) @@ -569,7 +569,7 @@ Threshold for the number of block ditto deduplicated block increases above this number, a new ditto copy of this block is automatically stored. The default setting is .Sy 0 -which causes no ditto copies to be created for deduplicated blocks. The miniumum +which causes no ditto copies to be created for deduplicated blocks. The minimum legal nonzero setting is .Sy 100 . .It Sy delegation Ns = Ns Sy on Ns | Ns Sy off From owner-svn-src-all@freebsd.org Fri May 26 12:02:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AB5ED83A49; Fri, 26 May 2017 12:02:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07E5A1AA7; Fri, 26 May 2017 12:02:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QC2Fb3093085; Fri, 26 May 2017 12:02:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QC2Eaa093079; Fri, 26 May 2017 12:02:14 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261202.v4QC2Eaa093079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318941 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor-sys/illumos/dist/uts/common/sys/fs vendor/ill... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:02:16 -0000 Author: avg Date: Fri May 26 12:02:14 2017 New Revision: 318941 URL: https://svnweb.freebsd.org/changeset/base/318941 Log: 7446 zpool create should support efi system partition illumos/illumos-gate@7855d95b30fd903e3918bad5a29b777e765db821 https://github.com/illumos/illumos-gate/commit/7855d95b30fd903e3918bad5a29b777e765db821 https://www.illumos.org/issues/7446 Since we support whole-disk configuration for boot pool, we also will need whole disk support with UEFI boot and for this, zpool create should create efi- system partition. I have borrowed the idea from oracle solaris, and introducing zpool create - B switch to provide an way to specify that boot partition should be created. However, there is still an question, how big should the system partition be. For time being, I have set default size 256MB (thats minimum size for FAT32 with 4k blocks). To support custom size, the set on creation "bootsize" property is created and so the custom size can be set as: zpool create B - o bootsize=34MB rpool c0t0d0 After pool is created, the "bootsize" property is read only. When -B switch is not used, the bootsize defaults to 0 and is shown in zpool get output with value ''. Older zfs/zpool implementations are ignoring this property. https://www.illumos.org/rb/r/219/ Reviewed by: Andrew Stormont Reviewed by: Yuri Pankov Approved by: Dan McDonald Author: Toomas Soome Modified: vendor-sys/illumos/dist/common/zfs/zpool_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c vendor/illumos/dist/cmd/zpool/zpool_util.h vendor/illumos/dist/cmd/zpool/zpool_vdev.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c vendor/illumos/dist/man/man1m/zpool.1m Modified: vendor-sys/illumos/dist/common/zfs/zpool_prop.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zpool_prop.c Fri May 26 12:00:31 2017 (r318940) +++ vendor-sys/illumos/dist/common/zfs/zpool_prop.c Fri May 26 12:02:14 2017 (r318941) @@ -100,6 +100,10 @@ zpool_prop_init(void) PROP_READONLY, ZFS_TYPE_POOL, "<1.00x or higher if deduped>", "DEDUP"); + /* system partition size */ + zprop_register_number(ZPOOL_PROP_BOOTSIZE, "bootsize", 0, PROP_ONETIME, + ZFS_TYPE_POOL, "", "BOOTSIZE"); + /* default number properties */ zprop_register_number(ZPOOL_PROP_VERSION, "version", SPA_VERSION, PROP_DEFAULT, ZFS_TYPE_POOL, "", "VERSION"); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Fri May 26 12:00:31 2017 (r318940) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Fri May 26 12:02:14 2017 (r318941) @@ -394,6 +394,7 @@ metaslab_class_expandable_space(metaslab spa_config_enter(mc->mc_spa, SCL_VDEV, FTAG, RW_READER); for (int c = 0; c < rvd->vdev_children; c++) { + uint64_t tspace; vdev_t *tvd = rvd->vdev_child[c]; metaslab_group_t *mg = tvd->vdev_mg; @@ -406,9 +407,13 @@ metaslab_class_expandable_space(metaslab * Calculate if we have enough space to add additional * metaslabs. We report the expandable space in terms * of the metaslab size since that's the unit of expansion. + * Adjust by efi system partition size. */ - space += P2ALIGN(tvd->vdev_max_asize - tvd->vdev_asize, - 1ULL << tvd->vdev_ms_shift); + tspace = tvd->vdev_max_asize - tvd->vdev_asize; + if (tspace > mc->mc_spa->spa_bootsize) { + tspace -= mc->mc_spa->spa_bootsize; + } + space += P2ALIGN(tspace, 1ULL << tvd->vdev_ms_shift); } spa_config_exit(mc->mc_spa, SCL_VDEV, FTAG); return (space); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Fri May 26 12:00:31 2017 (r318940) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Fri May 26 12:02:14 2017 (r318941) @@ -2738,6 +2738,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_ spa_prop_find(spa, ZPOOL_PROP_DELEGATION, &spa->spa_delegation); spa_prop_find(spa, ZPOOL_PROP_FAILUREMODE, &spa->spa_failmode); spa_prop_find(spa, ZPOOL_PROP_AUTOEXPAND, &spa->spa_autoexpand); + spa_prop_find(spa, ZPOOL_PROP_BOOTSIZE, &spa->spa_bootsize); spa_prop_find(spa, ZPOOL_PROP_DEDUPDITTO, &spa->spa_dedup_ditto); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h Fri May 26 12:00:31 2017 (r318940) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h Fri May 26 12:02:14 2017 (r318941) @@ -237,6 +237,7 @@ struct spa { int spa_mode; /* FREAD | FWRITE */ spa_log_state_t spa_log_state; /* log state */ uint64_t spa_autoexpand; /* lun expansion on/off */ + uint64_t spa_bootsize; /* efi system partition size */ ddt_t *spa_ddt[ZIO_CHECKSUM_FUNCTIONS]; /* in-core DDTs */ uint64_t spa_ddt_stat_object; /* DDT statistics */ uint64_t spa_dedup_ditto; /* dedup ditto threshold */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri May 26 12:00:31 2017 (r318940) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri May 26 12:02:14 2017 (r318941) @@ -2765,8 +2765,8 @@ vdev_get_stats(vdev_t *vd, vdev_stat_t * * since that determines how much space the pool can expand. */ if (vd->vdev_aux == NULL && tvd != NULL) { - vs->vs_esize = P2ALIGN(vd->vdev_max_asize - vd->vdev_asize, - 1ULL << tvd->vdev_ms_shift); + vs->vs_esize = P2ALIGN(vd->vdev_max_asize - vd->vdev_asize - + spa->spa_bootsize, 1ULL << tvd->vdev_ms_shift); } if (vd->vdev_aux == NULL && vd == vd->vdev_top && !vd->vdev_ishole) { vs->vs_fragmentation = vd->vdev_mg->mg_fragmentation; Modified: vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Fri May 26 12:00:31 2017 (r318940) +++ vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Fri May 26 12:02:14 2017 (r318941) @@ -203,6 +203,7 @@ typedef enum { ZPOOL_PROP_FRAGMENTATION, ZPOOL_PROP_LEAKED, ZPOOL_PROP_MAXBLOCKSIZE, + ZPOOL_PROP_BOOTSIZE, ZPOOL_NUM_PROPS } zpool_prop_t; From owner-svn-src-all@freebsd.org Fri May 26 12:02:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB35AD83A4E; Fri, 26 May 2017 12:02:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB4A21AAB; Fri, 26 May 2017 12:02:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QC2FCa093096; Fri, 26 May 2017 12:02:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QC2Fq2093090; Fri, 26 May 2017 12:02:15 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261202.v4QC2Fq2093090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318941 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor-sys/illumos/dist/uts/common/sys/fs vendor/ill... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:02:17 -0000 Author: avg Date: Fri May 26 12:02:14 2017 New Revision: 318941 URL: https://svnweb.freebsd.org/changeset/base/318941 Log: 7446 zpool create should support efi system partition illumos/illumos-gate@7855d95b30fd903e3918bad5a29b777e765db821 https://github.com/illumos/illumos-gate/commit/7855d95b30fd903e3918bad5a29b777e765db821 https://www.illumos.org/issues/7446 Since we support whole-disk configuration for boot pool, we also will need whole disk support with UEFI boot and for this, zpool create should create efi- system partition. I have borrowed the idea from oracle solaris, and introducing zpool create - B switch to provide an way to specify that boot partition should be created. However, there is still an question, how big should the system partition be. For time being, I have set default size 256MB (thats minimum size for FAT32 with 4k blocks). To support custom size, the set on creation "bootsize" property is created and so the custom size can be set as: zpool create B - o bootsize=34MB rpool c0t0d0 After pool is created, the "bootsize" property is read only. When -B switch is not used, the bootsize defaults to 0 and is shown in zpool get output with value ''. Older zfs/zpool implementations are ignoring this property. https://www.illumos.org/rb/r/219/ Reviewed by: Andrew Stormont Reviewed by: Yuri Pankov Approved by: Dan McDonald Author: Toomas Soome Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c vendor/illumos/dist/cmd/zpool/zpool_util.h vendor/illumos/dist/cmd/zpool/zpool_vdev.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c vendor/illumos/dist/man/man1m/zpool.1m Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/common/zfs/zpool_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Fri May 26 12:00:31 2017 (r318940) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Fri May 26 12:02:14 2017 (r318941) @@ -208,7 +208,8 @@ get_usage(zpool_help_t idx) case HELP_CLEAR: return (gettext("\tclear [-nF] [device]\n")); case HELP_CREATE: - return (gettext("\tcreate [-fnd] [-o property=value] ... \n" + return (gettext("\tcreate [-fnd] [-B] " + "[-o property=value] ... \n" "\t [-O file-system-property=value] ... \n" "\t [-m mountpoint] [-R root] ...\n")); case HELP_DESTROY: @@ -496,6 +497,8 @@ zpool_do_add(int argc, char **argv) int c; nvlist_t *nvroot; char *poolname; + zpool_boot_label_t boot_type; + uint64_t boot_size; int ret; zpool_handle_t *zhp; nvlist_t *config; @@ -544,9 +547,15 @@ zpool_do_add(int argc, char **argv) return (1); } + if (zpool_is_bootable(zhp)) + boot_type = ZPOOL_COPY_BOOT_LABEL; + else + boot_type = ZPOOL_NO_BOOT_LABEL; + /* pass off to get_vdev_spec for processing */ + boot_size = zpool_get_prop_int(zhp, ZPOOL_PROP_BOOTSIZE, NULL); nvroot = make_root_vdev(zhp, force, !force, B_FALSE, dryrun, - argc, argv); + boot_type, boot_size, argc, argv); if (nvroot == NULL) { zpool_close(zhp); return (1); @@ -767,10 +776,11 @@ errout: } /* - * zpool create [-fnd] [-o property=value] ... + * zpool create [-fnd] [-B] [-o property=value] ... * [-O file-system-property=value] ... * [-R root] [-m mountpoint] ... * + * -B Create boot partition. * -f Force creation, even if devices appear in use * -n Do not create the pool, but display the resulting layout if it * were to be created. @@ -787,12 +797,16 @@ errout: * we get the nvlist back from get_vdev_spec(), we either print out the contents * (if '-n' was specified), or pass it to libzfs to do the creation. */ + +#define SYSTEM256 (256 * 1024 * 1024) int zpool_do_create(int argc, char **argv) { boolean_t force = B_FALSE; boolean_t dryrun = B_FALSE; boolean_t enable_all_pool_feat = B_TRUE; + zpool_boot_label_t boot_type = ZPOOL_NO_BOOT_LABEL; + uint64_t boot_size = 0; int c; nvlist_t *nvroot = NULL; char *poolname; @@ -804,7 +818,7 @@ zpool_do_create(int argc, char **argv) char *propval; /* check options */ - while ((c = getopt(argc, argv, ":fndR:m:o:O:")) != -1) { + while ((c = getopt(argc, argv, ":fndBR:m:o:O:")) != -1) { switch (c) { case 'f': force = B_TRUE; @@ -815,6 +829,15 @@ zpool_do_create(int argc, char **argv) case 'd': enable_all_pool_feat = B_FALSE; break; + case 'B': + /* + * We should create the system partition. + * Also make sure the size is set. + */ + boot_type = ZPOOL_CREATE_BOOT_LABEL; + if (boot_size == 0) + boot_size = SYSTEM256; + break; case 'R': altroot = optarg; if (add_prop_list(zpool_prop_to_name( @@ -845,6 +868,20 @@ zpool_do_create(int argc, char **argv) goto errout; /* + * Get bootsize value for make_root_vdev(). + */ + if (zpool_name_to_prop(optarg) == ZPOOL_PROP_BOOTSIZE) { + if (zfs_nicestrtonum(g_zfs, propval, + &boot_size) < 0 || boot_size == 0) { + (void) fprintf(stderr, + gettext("bad boot partition size " + "'%s': %s\n"), propval, + libzfs_error_description(g_zfs)); + goto errout; + } + } + + /* * If the user is creating a pool that doesn't support * feature flags, don't enable any features. */ @@ -921,9 +958,43 @@ zpool_do_create(int argc, char **argv) goto errout; } + /* + * Make sure the bootsize is set when ZPOOL_CREATE_BOOT_LABEL is used, + * and not set otherwise. + */ + if (boot_type == ZPOOL_CREATE_BOOT_LABEL) { + const char *propname; + char *strptr, *buf = NULL; + int rv; + + propname = zpool_prop_to_name(ZPOOL_PROP_BOOTSIZE); + if (nvlist_lookup_string(props, propname, &strptr) != 0) { + (void) asprintf(&buf, "%" PRIu64, boot_size); + if (buf == NULL) { + (void) fprintf(stderr, + gettext("internal error: out of memory\n")); + goto errout; + } + rv = add_prop_list(propname, buf, &props, B_TRUE); + free(buf); + if (rv != 0) + goto errout; + } + } else { + const char *propname; + char *strptr; + + propname = zpool_prop_to_name(ZPOOL_PROP_BOOTSIZE); + if (nvlist_lookup_string(props, propname, &strptr) == 0) { + (void) fprintf(stderr, gettext("error: setting boot " + "partition size requires option '-B'\n")); + goto errout; + } + } + /* pass off to get_vdev_spec for bulk processing */ nvroot = make_root_vdev(NULL, force, !force, B_FALSE, dryrun, - argc - 1, argv + 1); + boot_type, boot_size, argc - 1, argv + 1); if (nvroot == NULL) goto errout; @@ -3183,6 +3254,8 @@ zpool_do_attach_or_replace(int argc, cha nvlist_t *nvroot; char *poolname, *old_disk, *new_disk; zpool_handle_t *zhp; + zpool_boot_label_t boot_type; + uint64_t boot_size; int ret; /* check options */ @@ -3247,8 +3320,14 @@ zpool_do_attach_or_replace(int argc, cha return (1); } + if (zpool_is_bootable(zhp)) + boot_type = ZPOOL_COPY_BOOT_LABEL; + else + boot_type = ZPOOL_NO_BOOT_LABEL; + + boot_size = zpool_get_prop_int(zhp, ZPOOL_PROP_BOOTSIZE, NULL); nvroot = make_root_vdev(zhp, force, B_FALSE, replacing, B_FALSE, - argc, argv); + boot_type, boot_size, argc, argv); if (nvroot == NULL) { zpool_close(zhp); return (1); Modified: vendor/illumos/dist/cmd/zpool/zpool_util.h ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_util.h Fri May 26 12:00:31 2017 (r318940) +++ vendor/illumos/dist/cmd/zpool/zpool_util.h Fri May 26 12:02:14 2017 (r318941) @@ -44,7 +44,8 @@ uint_t num_logs(nvlist_t *nv); */ nvlist_t *make_root_vdev(zpool_handle_t *zhp, int force, int check_rep, - boolean_t replacing, boolean_t dryrun, int argc, char **argv); + boolean_t replacing, boolean_t dryrun, zpool_boot_label_t boot_type, + uint64_t boot_size, int argc, char **argv); nvlist_t *split_mirror_vdev(zpool_handle_t *zhp, char *newname, nvlist_t *props, splitflags_t flags, int argc, char **argv); Modified: vendor/illumos/dist/cmd/zpool/zpool_vdev.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_vdev.c Fri May 26 12:00:31 2017 (r318940) +++ vendor/illumos/dist/cmd/zpool/zpool_vdev.c Fri May 26 12:02:14 2017 (r318941) @@ -876,14 +876,15 @@ check_replication(nvlist_t *config, nvli * Go through and find any whole disks in the vdev specification, labelling them * as appropriate. When constructing the vdev spec, we were unable to open this * device in order to provide a devid. Now that we have labelled the disk and - * know that slice 0 is valid, we can construct the devid now. + * know the pool slice is valid, we can construct the devid now. * * If the disk was already labeled with an EFI label, we will have gotten the * devid already (because we were able to open the whole disk). Otherwise, we * need to get the devid after we label the disk. */ static int -make_disks(zpool_handle_t *zhp, nvlist_t *nv) +make_disks(zpool_handle_t *zhp, nvlist_t *nv, zpool_boot_label_t boot_type, + uint64_t boot_size) { nvlist_t **child; uint_t c, children; @@ -892,6 +893,7 @@ make_disks(zpool_handle_t *zhp, nvlist_t uint64_t wholedisk; int fd; int ret; + int slice; ddi_devid_t devid; char *minor = NULL, *devid_str = NULL; @@ -909,20 +911,36 @@ make_disks(zpool_handle_t *zhp, nvlist_t * slice and stat()ing the device. */ verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0); - if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_WHOLE_DISK, - &wholedisk) != 0 || !wholedisk) - return (0); diskname = strrchr(path, '/'); assert(diskname != NULL); diskname++; - if (zpool_label_disk(g_zfs, zhp, diskname) == -1) - return (-1); + + if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_WHOLE_DISK, + &wholedisk) != 0 || !wholedisk) { + /* + * This is not whole disk, return error if + * boot partition creation was requested + */ + if (boot_type == ZPOOL_CREATE_BOOT_LABEL) { + (void) fprintf(stderr, + gettext("creating boot partition is only " + "supported on whole disk vdevs: %s\n"), + diskname); + return (-1); + } + return (0); + } + + ret = zpool_label_disk(g_zfs, zhp, diskname, boot_type, + boot_size, &slice); + if (ret == -1) + return (ret); /* * Fill in the devid, now that we've labeled the disk. */ - (void) snprintf(buf, sizeof (buf), "%ss0", path); + (void) snprintf(buf, sizeof (buf), "%ss%d", path, slice); if ((fd = open(buf, O_RDONLY)) < 0) { (void) fprintf(stderr, gettext("cannot open '%s': %s\n"), @@ -945,7 +963,7 @@ make_disks(zpool_handle_t *zhp, nvlist_t } /* - * Update the path to refer to the 's0' slice. The presence of + * Update the path to refer to the pool slice. The presence of * the 'whole_disk' field indicates to the CLI that we should * chop off the slice number when displaying the device in * future output. @@ -957,21 +975,36 @@ make_disks(zpool_handle_t *zhp, nvlist_t return (0); } - for (c = 0; c < children; c++) - if ((ret = make_disks(zhp, child[c])) != 0) + /* illumos kernel does not support booting from multi-vdev pools. */ + if ((boot_type == ZPOOL_CREATE_BOOT_LABEL)) { + if ((strcmp(type, VDEV_TYPE_ROOT) == 0) && children > 1) { + (void) fprintf(stderr, gettext("boot pool " + "can not have more than one vdev\n")); + return (-1); + } + } + + for (c = 0; c < children; c++) { + ret = make_disks(zhp, child[c], boot_type, boot_size); + if (ret != 0) return (ret); + } if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_SPARES, &child, &children) == 0) - for (c = 0; c < children; c++) - if ((ret = make_disks(zhp, child[c])) != 0) + for (c = 0; c < children; c++) { + ret = make_disks(zhp, child[c], boot_type, boot_size); + if (ret != 0) return (ret); + } if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_L2CACHE, &child, &children) == 0) - for (c = 0; c < children; c++) - if ((ret = make_disks(zhp, child[c])) != 0) + for (c = 0; c < children; c++) { + ret = make_disks(zhp, child[c], boot_type, boot_size); + if (ret != 0) return (ret); + } return (0); } @@ -1367,6 +1400,7 @@ split_mirror_vdev(zpool_handle_t *zhp, c { nvlist_t *newroot = NULL, **child; uint_t c, children; + zpool_boot_label_t boot_type; if (argc > 0) { if ((newroot = construct_spec(argc, argv)) == NULL) { @@ -1375,7 +1409,13 @@ split_mirror_vdev(zpool_handle_t *zhp, c return (NULL); } - if (!flags.dryrun && make_disks(zhp, newroot) != 0) { + if (zpool_is_bootable(zhp)) + boot_type = ZPOOL_COPY_BOOT_LABEL; + else + boot_type = ZPOOL_NO_BOOT_LABEL; + + if (!flags.dryrun && + make_disks(zhp, newroot, boot_type, 0) != 0) { nvlist_free(newroot); return (NULL); } @@ -1419,7 +1459,8 @@ split_mirror_vdev(zpool_handle_t *zhp, c */ nvlist_t * make_root_vdev(zpool_handle_t *zhp, int force, int check_rep, - boolean_t replacing, boolean_t dryrun, int argc, char **argv) + boolean_t replacing, boolean_t dryrun, zpool_boot_label_t boot_type, + uint64_t boot_size, int argc, char **argv) { nvlist_t *newroot; nvlist_t *poolconfig = NULL; @@ -1460,7 +1501,7 @@ make_root_vdev(zpool_handle_t *zhp, int /* * Run through the vdev specification and label any whole disks found. */ - if (!dryrun && make_disks(zhp, newroot) != 0) { + if (!dryrun && make_disks(zhp, newroot, boot_type, boot_size) != 0) { nvlist_free(newroot); return (NULL); } Modified: vendor/illumos/dist/lib/libzfs/common/libzfs.h ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs.h Fri May 26 12:00:31 2017 (r318940) +++ vendor/illumos/dist/lib/libzfs/common/libzfs.h Fri May 26 12:02:14 2017 (r318941) @@ -132,6 +132,18 @@ typedef enum zfs_error { } zfs_error_t; /* + * UEFI boot support parameters. When creating whole disk boot pool, + * zpool create should allow to create EFI System partition for UEFI boot + * program. In case of BIOS, the EFI System partition is not used + * even if it does exist. + */ +typedef enum zpool_boot_label { + ZPOOL_NO_BOOT_LABEL = 0, + ZPOOL_CREATE_BOOT_LABEL, + ZPOOL_COPY_BOOT_LABEL +} zpool_boot_label_t; + +/* * The following data structures are all part * of the zfs_allow_t data structure which is * used for printing 'allow' permissions. @@ -262,7 +274,8 @@ extern nvlist_t *zpool_find_vdev(zpool_h boolean_t *, boolean_t *); extern nvlist_t *zpool_find_vdev_by_physpath(zpool_handle_t *, const char *, boolean_t *, boolean_t *, boolean_t *); -extern int zpool_label_disk(libzfs_handle_t *, zpool_handle_t *, const char *); +extern int zpool_label_disk(libzfs_handle_t *, zpool_handle_t *, const char *, + zpool_boot_label_t, uint64_t, int *); /* * Functions to manage pool properties @@ -344,6 +357,7 @@ extern nvlist_t *zpool_get_config(zpool_ extern nvlist_t *zpool_get_features(zpool_handle_t *); extern int zpool_refresh_stats(zpool_handle_t *, boolean_t *); extern int zpool_get_errlog(zpool_handle_t *, nvlist_t **); +extern boolean_t zpool_is_bootable(zpool_handle_t *); /* * Import and export functions Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Fri May 26 12:00:31 2017 (r318940) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Fri May 26 12:02:14 2017 (r318941) @@ -48,7 +48,7 @@ #include "zfs_comutil.h" #include "zfeature_common.h" -static int read_efi_label(nvlist_t *config, diskaddr_t *sb); +static int read_efi_label(nvlist_t *, diskaddr_t *, boolean_t *); #define BACKUP_SLICE "s2" @@ -313,6 +313,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo (void) zfs_nicenum(intval, buf, len); } break; + case ZPOOL_PROP_BOOTSIZE: case ZPOOL_PROP_EXPANDSZ: if (intval == 0) { (void) strlcpy(buf, "-", len); @@ -514,6 +515,16 @@ zpool_valid_proplist(libzfs_handle_t *hd } break; + case ZPOOL_PROP_BOOTSIZE: + if (!flags.create) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "property '%s' can only be set during pool " + "creation"), propname); + (void) zfs_error(hdl, EZFS_BADPROP, errbuf); + goto error; + } + break; + case ZPOOL_PROP_BOOTFS: if (flags.create || flags.import) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, @@ -1964,8 +1975,9 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist /* * Search for the requested value. Special cases: * - * - ZPOOL_CONFIG_PATH for whole disk entries. These end in - * "s0" or "s0/old". The "s0" part is hidden from the user, + * - ZPOOL_CONFIG_PATH for whole disk entries. To support + * UEFI boot, these end in "s0" or "s0/old" or "s1" or + * "s1/old". The "s0" or "s1" part is hidden from the user, * but included in the string, so this matches around it. * - looking for a top-level vdev name (i.e. ZPOOL_CONFIG_TYPE). * @@ -1995,14 +2007,16 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist /* * strings identical except trailing "s0" */ - if (strcmp(&val[vlen - 2], "s0") == 0 && + if ((strcmp(&val[vlen - 2], "s0") == 0 || + strcmp(&val[vlen - 2], "s1") == 0) && strncmp(srchval, val, slen) == 0) return (nv); /* * strings identical except trailing "s0/old" */ - if (strcmp(&val[vlen - 6], "s0/old") == 0 && + if ((strcmp(&val[vlen - 6], "s0/old") == 0 || + strcmp(&val[vlen - 6], "s1/old") == 0) && strcmp(&srchval[slen - 4], "/old") == 0 && strncmp(srchval, val, slen - 4) == 0) return (nv); @@ -3406,15 +3420,17 @@ zpool_vdev_name(libzfs_handle_t *hdl, zp char *tmp = zfs_strdup(hdl, path); /* - * If it starts with c#, and ends with "s0", chop - * the "s0" off, or if it ends with "s0/old", remove - * the "s0" from the middle. + * If it starts with c#, and ends with "s0" or "s1", + * chop the slice off, or if it ends with "s0/old" or + * "s1/old", remove the slice from the middle. */ if (CTD_CHECK(tmp)) { - if (strcmp(&tmp[pathlen - 2], "s0") == 0) { + if (strcmp(&tmp[pathlen - 2], "s0") == 0 || + strcmp(&tmp[pathlen - 2], "s1") == 0) { tmp[pathlen - 2] = '\0'; } else if (pathlen > 6 && - strcmp(&tmp[pathlen - 6], "s0/old") == 0) { + (strcmp(&tmp[pathlen - 6], "s0/old") == 0 || + strcmp(&tmp[pathlen - 6], "s1/old") == 0)) { (void) strcpy(&tmp[pathlen - 6], "/old"); } @@ -3807,15 +3823,18 @@ zpool_obj_to_path(zpool_handle_t *zhp, u * Read the EFI label from the config, if a label does not exist then * pass back the error to the caller. If the caller has passed a non-NULL * diskaddr argument then we set it to the starting address of the EFI - * partition. + * partition. If the caller has passed a non-NULL boolean argument, then + * we set it to indicate if the disk does have efi system partition. */ static int -read_efi_label(nvlist_t *config, diskaddr_t *sb) +read_efi_label(nvlist_t *config, diskaddr_t *sb, boolean_t *system) { char *path; int fd; char diskname[MAXPATHLEN]; + boolean_t boot = B_FALSE; int err = -1; + int slice; if (nvlist_lookup_string(config, ZPOOL_CONFIG_PATH, &path) != 0) return (err); @@ -3826,8 +3845,16 @@ read_efi_label(nvlist_t *config, diskadd struct dk_gpt *vtoc; if ((err = efi_alloc_and_read(fd, &vtoc)) >= 0) { - if (sb != NULL) - *sb = vtoc->efi_parts[0].p_start; + for (slice = 0; slice < vtoc->efi_nparts; slice++) { + if (vtoc->efi_parts[slice].p_tag == V_SYSTEM) + boot = B_TRUE; + if (vtoc->efi_parts[slice].p_tag == V_USR) + break; + } + if (sb != NULL && vtoc->efi_parts[slice].p_tag == V_USR) + *sb = vtoc->efi_parts[slice].p_start; + if (system != NULL) + *system = boot; efi_free(vtoc); } (void) close(fd); @@ -3854,7 +3881,7 @@ find_start_block(nvlist_t *config) &wholedisk) != 0 || !wholedisk) { return (MAXOFFSET_T); } - if (read_efi_label(config, &sb) < 0) + if (read_efi_label(config, &sb, NULL) < 0) sb = MAXOFFSET_T; return (sb); } @@ -3873,7 +3900,8 @@ find_start_block(nvlist_t *config) * stripped of any leading /dev path. */ int -zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name) +zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name, + zpool_boot_label_t boot_type, uint64_t boot_size, int *slice) { char path[MAXPATHLEN]; struct dk_gpt *vtoc; @@ -3931,15 +3959,6 @@ zpool_label_disk(libzfs_handle_t *hdl, z return (zfs_error(hdl, EZFS_NOCAP, errbuf)); } - slice_size = vtoc->efi_last_u_lba + 1; - slice_size -= EFI_MIN_RESV_SIZE; - if (start_block == MAXOFFSET_T) - start_block = NEW_START_BLOCK; - slice_size -= start_block; - - vtoc->efi_parts[0].p_start = start_block; - vtoc->efi_parts[0].p_size = slice_size; - /* * Why we use V_USR: V_BACKUP confuses users, and is considered * disposable by some EFI utilities (since EFI doesn't have a backup @@ -3948,12 +3967,103 @@ zpool_label_disk(libzfs_handle_t *hdl, z * etc. were all pretty specific. V_USR is as close to reality as we * can get, in the absence of V_OTHER. */ - vtoc->efi_parts[0].p_tag = V_USR; - (void) strcpy(vtoc->efi_parts[0].p_name, "zfs"); + /* first fix the partition start block */ + if (start_block == MAXOFFSET_T) + start_block = NEW_START_BLOCK; + + /* + * EFI System partition is using slice 0. + * ZFS is on slice 1 and slice 8 is reserved. + * We assume the GPT partition table without system + * partition has zfs p_start == NEW_START_BLOCK. + * If start_block != NEW_START_BLOCK, it means we have + * system partition. Correct solution would be to query/cache vtoc + * from existing vdev member. + */ + if (boot_type == ZPOOL_CREATE_BOOT_LABEL) { + if (boot_size % vtoc->efi_lbasize != 0) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "boot partition size must be a multiple of %d"), + vtoc->efi_lbasize); + (void) close(fd); + efi_free(vtoc); + return (zfs_error(hdl, EZFS_LABELFAILED, errbuf)); + } + /* + * System partition size checks. + * Note the 1MB is quite arbitrary value, since we + * are creating dedicated pool, it should be enough + * to hold fat + efi bootloader. May need to be + * adjusted if the bootloader size will grow. + */ + if (boot_size < 1024 * 1024) { + char buf[64]; + zfs_nicenum(boot_size, buf, sizeof (buf)); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "Specified size %s for EFI System partition is too " + "small, the minimum size is 1MB."), buf); + (void) close(fd); + efi_free(vtoc); + return (zfs_error(hdl, EZFS_LABELFAILED, errbuf)); + } + /* 33MB is tested with mkfs -F pcfs */ + if (hdl->libzfs_printerr && + ((vtoc->efi_lbasize == 512 && + boot_size < 33 * 1024 * 1024) || + (vtoc->efi_lbasize == 4096 && + boot_size < 256 * 1024 * 1024))) { + char buf[64]; + zfs_nicenum(boot_size, buf, sizeof (buf)); + (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + "Warning: EFI System partition size %s is " + "not allowing to create FAT32 file\nsystem, which " + "may result in unbootable system.\n"), buf); + } + /* Adjust zfs partition start by size of system partition. */ + start_block += boot_size / vtoc->efi_lbasize; + } - vtoc->efi_parts[8].p_start = slice_size + start_block; - vtoc->efi_parts[8].p_size = resv; - vtoc->efi_parts[8].p_tag = V_RESERVED; + if (start_block == NEW_START_BLOCK) { + /* + * Use default layout. + * ZFS is on slice 0 and slice 8 is reserved. + */ + slice_size = vtoc->efi_last_u_lba + 1; + slice_size -= EFI_MIN_RESV_SIZE; + slice_size -= start_block; + if (slice != NULL) + *slice = 0; + + vtoc->efi_parts[0].p_start = start_block; + vtoc->efi_parts[0].p_size = slice_size; + + vtoc->efi_parts[0].p_tag = V_USR; + (void) strcpy(vtoc->efi_parts[0].p_name, "zfs"); + + vtoc->efi_parts[8].p_start = slice_size + start_block; + vtoc->efi_parts[8].p_size = resv; + vtoc->efi_parts[8].p_tag = V_RESERVED; + } else { + slice_size = start_block - NEW_START_BLOCK; + vtoc->efi_parts[0].p_start = NEW_START_BLOCK; + vtoc->efi_parts[0].p_size = slice_size; + vtoc->efi_parts[0].p_tag = V_SYSTEM; + (void) strcpy(vtoc->efi_parts[0].p_name, "loader"); + if (slice != NULL) + *slice = 1; + /* prepare slice 1 */ + slice_size = vtoc->efi_last_u_lba + 1 - slice_size; + slice_size -= resv; + slice_size -= NEW_START_BLOCK; + vtoc->efi_parts[1].p_start = start_block; + vtoc->efi_parts[1].p_size = slice_size; + vtoc->efi_parts[1].p_tag = V_USR; + (void) strcpy(vtoc->efi_parts[1].p_name, "zfs"); + + vtoc->efi_parts[8].p_start = slice_size + start_block; + vtoc->efi_parts[8].p_size = resv; + vtoc->efi_parts[8].p_tag = V_RESERVED; + } if (efi_write(fd, vtoc) != 0) { /* Modified: vendor/illumos/dist/man/man1m/zpool.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 12:00:31 2017 (r318940) +++ vendor/illumos/dist/man/man1m/zpool.1m Fri May 26 12:02:14 2017 (r318941) @@ -23,7 +23,7 @@ .\" Copyright (c) 2013 by Delphix. All rights reserved. .\" Copyright 2016 Nexenta Systems, Inc. .\" -.Dd March 30, 2016 +.Dd Oct 2, 2016 .Dt ZPOOL 1M .Os .Sh NAME @@ -47,6 +47,7 @@ .Nm .Cm create .Op Fl dfn +.Op Fl B .Op Fl m Ar mountpoint .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ... @@ -430,6 +431,12 @@ The following are read-only properties: Amount of storage available within the pool. This property can also be referred to by its shortened column name, .Sy avail . +.It Sy bootsize +The size of the system boot partition. This property can only be set at pool +creation time and is read-only once pool is created. Setting this property +implies using the +.Fl B +option. .It Sy capacity Percentage of pool space used. This property can also be referred to by its shortened column name, @@ -708,6 +715,7 @@ those errors associated with the specifi .Nm .Cm create .Op Fl dfn +.Op Fl B .Op Fl m Ar mountpoint .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ... @@ -766,6 +774,16 @@ By default all supported features are en .Fl d option is specified. .Bl -tag -width Ds +.It Fl B +Create whole disk pool with EFI System partition to support booting system +with UEFI firmware. Default size is 256MB. To create boot partition with +custom size, set the +.Sy bootsize +property with the +.Fl o +option. See the +.Sx Properties +section for details. .It Fl d Do not enable any features on the new pool. Individual features can be enabled by setting their corresponding properties to From owner-svn-src-all@freebsd.org Fri May 26 12:02:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DDB8D83B05; Fri, 26 May 2017 12:02:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D91281CD6; Fri, 26 May 2017 12:02:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QC2pmr093160; Fri, 26 May 2017 12:02:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QC2pcU093159; Fri, 26 May 2017 12:02:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261202.v4QC2pcU093159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318942 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:02:53 -0000 Author: avg Date: Fri May 26 12:02:51 2017 New Revision: 318942 URL: https://svnweb.freebsd.org/changeset/base/318942 Log: 8166 zpool scrub thinks it repaired offline device illumos/illumos-gate@2d2f193a21231a58c583466dc23ba71f1a25f424 https://github.com/illumos/illumos-gate/commit/2d2f193a21231a58c583466dc23ba71f1a25f424 https://www.illumos.org/issues/8166 If we do a scrub while a leaf device is offline (via "zpool offline"), we will inadvertently clear the DTL (dirty time log) of the offline device, even though it is still damaged. When the device comes back online, we will incompletely resilver it, thinking that the scrub repaired blocks written before the scrub was started. The incomplete resilver can lead to data loss if there is a subsequent failure of a different leaf device. The fix is to never clear the DTL of offline devices. Note that if a device is onlined while a scrub is in progress, the scrub will be restarted. The problem can be worked around by running "zpool scrub" after "zpool online". See also https://github.com/zfsonlinux/zfs/issues/5806 Reviewed by: George Wilson george.wilson@delphix.com Reviewed by: Brad Lewis Approved by: Richard Lowe Author: Matthew Ahrens Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri May 26 12:02:14 2017 (r318941) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri May 26 12:02:51 2017 (r318942) @@ -1788,6 +1788,9 @@ vdev_dtl_should_excise(vdev_t *vd) ASSERT0(scn->scn_phys.scn_errors); ASSERT0(vd->vdev_children); + if (vd->vdev_state < VDEV_STATE_DEGRADED) + return (B_FALSE); + if (vd->vdev_resilver_txg == 0 || range_tree_space(vd->vdev_dtl[DTL_MISSING]) == 0) return (B_TRUE); From owner-svn-src-all@freebsd.org Fri May 26 12:04:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 362D0D83B82; Fri, 26 May 2017 12:04:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E04041EBE; Fri, 26 May 2017 12:04:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QC4LAg093265; Fri, 26 May 2017 12:04:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QC4LWB093264; Fri, 26 May 2017 12:04:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261204.v4QC4LWB093264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318943 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:04:23 -0000 Author: avg Date: Fri May 26 12:04:21 2017 New Revision: 318943 URL: https://svnweb.freebsd.org/changeset/base/318943 Log: MFV r318942: 8166 zpool scrub thinks it repaired offline device illumos/illumos-gate@2d2f193a21231a58c583466dc23ba71f1a25f424 https://github.com/illumos/illumos-gate/commit/2d2f193a21231a58c583466dc23ba71f1a25f424 https://www.illumos.org/issues/8166 If we do a scrub while a leaf device is offline (via "zpool offline"), we will inadvertently clear the DTL (dirty time log) of the offline device, even though it is still damaged. When the device comes back online, we will incompletely resilver it, thinking that the scrub repaired blocks written before the scrub was started. The incomplete resilver can lead to data loss if there is a subsequent failure of a different leaf device. The fix is to never clear the DTL of offline devices. Note that if a device is onlined while a scrub is in progress, the scrub will be restarted. The problem can be worked around by running "zpool scrub" after "zpool online". See also https://github.com/zfsonlinux/zfs/issues/5806 Reviewed by: George Wilson george.wilson@delphix.com Reviewed by: Brad Lewis Approved by: Richard Lowe Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 26 12:02:51 2017 (r318942) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 26 12:04:21 2017 (r318943) @@ -1930,6 +1930,9 @@ vdev_dtl_should_excise(vdev_t *vd) ASSERT0(scn->scn_phys.scn_errors); ASSERT0(vd->vdev_children); + if (vd->vdev_state < VDEV_STATE_DEGRADED) + return (B_FALSE); + if (vd->vdev_resilver_txg == 0 || range_tree_space(vd->vdev_dtl[DTL_MISSING]) == 0) return (B_TRUE); From owner-svn-src-all@freebsd.org Fri May 26 12:07:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13505D83C42; Fri, 26 May 2017 12:07:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D92231065; Fri, 26 May 2017 12:07:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QC7leM093439; Fri, 26 May 2017 12:07:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QC7l8k093438; Fri, 26 May 2017 12:07:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261207.v4QC7l8k093438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318944 - vendor-sys/illumos/dist/uts/common/fs/zfs/sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:07:49 -0000 Author: avg Date: Fri May 26 12:07:47 2017 New Revision: 318944 URL: https://svnweb.freebsd.org/changeset/base/318944 Log: 8265 Reserve send stream flag for large dnode feature illumos/illumos-gate@bc83969fdbd1cb0d97ba00218c0a3de5c89fba92 https://github.com/illumos/illumos-gate/commit/bc83969fdbd1cb0d97ba00218c0a3de5c89fba92 https://www.illumos.org/issues/8265 Reserve bit 23 in the zfs send stream flags for the large dnode feature which has been implemented for Linux. Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Brian Behlendorf Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h Fri May 26 12:04:21 2017 (r318943) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h Fri May 26 12:07:47 2017 (r318944) @@ -93,6 +93,7 @@ typedef enum drr_headertype { #define DMU_BACKUP_FEATURE_RESUMING (1 << 20) /* flag #21 is reserved for a Delphix feature */ #define DMU_BACKUP_FEATURE_COMPRESSED (1 << 22) +/* flag #23 is reserved for the large dnode feature */ /* * Mask of all supported backup features From owner-svn-src-all@freebsd.org Fri May 26 12:08:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7868AD83C9B; Fri, 26 May 2017 12:08:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4516211F4; Fri, 26 May 2017 12:08:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QC8cOC093516; Fri, 26 May 2017 12:08:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QC8c3F093515; Fri, 26 May 2017 12:08:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261208.v4QC8c3F093515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318945 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:08:39 -0000 Author: avg Date: Fri May 26 12:08:38 2017 New Revision: 318945 URL: https://svnweb.freebsd.org/changeset/base/318945 Log: MFV r318944: 8265 Reserve send stream flag for large dnode feature illumos/illumos-gate@bc83969fdbd1cb0d97ba00218c0a3de5c89fba92 https://github.com/illumos/illumos-gate/commit/bc83969fdbd1cb0d97ba00218c0a3de5c89fba92 https://www.illumos.org/issues/8265 Reserve bit 23 in the zfs send stream flags for the large dnode feature which has been implemented for Linux. Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Brian Behlendorf MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Fri May 26 12:07:47 2017 (r318944) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Fri May 26 12:08:38 2017 (r318945) @@ -93,6 +93,7 @@ typedef enum drr_headertype { #define DMU_BACKUP_FEATURE_RESUMING (1 << 20) /* flag #21 is reserved for a Delphix feature */ #define DMU_BACKUP_FEATURE_COMPRESSED (1 << 22) +/* flag #23 is reserved for the large dnode feature */ /* * Mask of all supported backup features From owner-svn-src-all@freebsd.org Fri May 26 12:13:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3E51D83E40; Fri, 26 May 2017 12:13:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8AD61681; Fri, 26 May 2017 12:13:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QCDSJt097280; Fri, 26 May 2017 12:13:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QCDSir097276; Fri, 26 May 2017 12:13:28 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261213.v4QCDSir097276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318946 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/di... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:13:30 -0000 Author: avg Date: Fri May 26 12:13:27 2017 New Revision: 318946 URL: https://svnweb.freebsd.org/changeset/base/318946 Log: 8021 ARC buf data scatter-ization 8100 8021 seems to cause random BAD TRAP: type=d (#gp General protection) illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383 https://github.com/illumos/illumos-gate/commit/770499e185d15678ccb0be57ebc626ad18d93383 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 linear `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.) https://www.illumos.org/issues/8100 My supermicro system is getting random BAD TRAP: type=d (#gp General protection) at about the stage where ZFS filesystems are mounted - usually console login prompt is already present but the services are still starting. After backing out 8021, the boot is completed and no panics do occur. Machine does dump, however savecore fails: savecore: bad magic number baddcafe I can get more data out with boot -k, if needed. # psrinfo -vp The physical processor has 4 cores and 8 virtual processors (0-7) The core has 2 virtual processors (0 4) The core has 2 virtual processors (1 5) The core has 2 virtual processors (2 6) The core has 2 virtual processors (3 7) x86 (GenuineIntel 306C3 family 6 model 60 step 3 clock 3500 MHz) Intel(r) Xeon(r) CPU E3-1246 v3 @ 3.50GHz # prtconf -m 32657 $ zpool status pool: rpool state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 c3t0d0 ONLINE 0 0 0 c3t1d0 ONLINE 0 0 0 Reviewed by: Matthew Ahrens mahrens@delphix.com Reviewed by: George Wilson george.wilson@delphix.com Reviewed by: Paul Dagnelie pcd@delphix.com Reviewed by: John Kennedy john.kennedy@delphix.com Reviewed by: Prakash Surya prakash.surya@delphix.com Reviewed by: Prashanth Sreenivasa pks@delphix.com Reviewed by: Pavel Zakharov pavel.zakharov@delphix.com Reviewed by: Chris Williamson chris.williamson@delphix.com Approved by: Richard Lowe Author: Dan Kimmel Modified: vendor/illumos/dist/cmd/zdb/zdb.c vendor/illumos/dist/cmd/zdb/zdb_il.c vendor/illumos/dist/cmd/ztest/ztest.c vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Changes in other areas also in this revision: Added: vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c (contents, props changed) vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h vendor-sys/illumos/dist/uts/common/Makefile.files vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/blkptr.c vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/ddt.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/edonr_zfs.c vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c vendor-sys/illumos/dist/uts/common/fs/zfs/sha256.c vendor-sys/illumos/dist/uts/common/fs/zfs/skein_zfs.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/ddt.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_checksum.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_compress.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_cache.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_file.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_mirror.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_raidz.c vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_compress.c Modified: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb.c Fri May 26 12:08:38 2017 (r318945) +++ vendor/illumos/dist/cmd/zdb/zdb.c Fri May 26 12:13:27 2017 (r318946) @@ -60,6 +60,7 @@ #include #include #include +#include #include #undef verify #include @@ -2535,7 +2536,7 @@ zdb_blkptr_done(zio_t *zio) zdb_cb_t *zcb = zio->io_private; zbookmark_phys_t *zb = &zio->io_bookmark; - zio_data_buf_free(zio->io_data, zio->io_size); + abd_free(zio->io_abd); mutex_enter(&spa->spa_scrub_lock); spa->spa_scrub_inflight--; @@ -2601,7 +2602,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog if (!BP_IS_EMBEDDED(bp) && (dump_opt['c'] > 1 || (dump_opt['c'] && is_metadata))) { size_t size = BP_GET_PSIZE(bp); - void *data = zio_data_buf_alloc(size); + abd_t *abd = abd_alloc(size, B_FALSE); int flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | ZIO_FLAG_RAW; /* If it's an intent log block, failure is expected. */ @@ -2614,7 +2615,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog spa->spa_scrub_inflight++; mutex_exit(&spa->spa_scrub_lock); - zio_nowait(zio_read(NULL, spa, bp, data, size, + zio_nowait(zio_read(NULL, spa, bp, abd, size, zdb_blkptr_done, zcb, ZIO_PRIORITY_ASYNC_READ, flags, zb)); } @@ -3394,6 +3395,13 @@ name: return (NULL); } +/* ARGSUSED */ +static int +random_get_pseudo_bytes_cb(void *buf, size_t len, void *unused) +{ + return (random_get_pseudo_bytes(buf, len)); +} + /* * Read a block from a pool and print it out. The syntax of the * block descriptor is: @@ -3425,7 +3433,8 @@ zdb_read_block(char *thing, spa_t *spa) uint64_t offset = 0, size = 0, psize = 0, lsize = 0, blkptr_offset = 0; zio_t *zio; vdev_t *vd; - void *pbuf, *lbuf, *buf; + abd_t *pabd; + void *lbuf, *buf; char *s, *p, *dup, *vdev, *flagstr; int i, error; @@ -3496,7 +3505,7 @@ zdb_read_block(char *thing, spa_t *spa) psize = size; lsize = size; - pbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); + pabd = abd_alloc_linear(SPA_MAXBLOCKSIZE, B_FALSE); lbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); BP_ZERO(bp); @@ -3524,15 +3533,15 @@ zdb_read_block(char *thing, spa_t *spa) /* * Treat this as a normal block read. */ - zio_nowait(zio_read(zio, spa, bp, pbuf, psize, NULL, NULL, + zio_nowait(zio_read(zio, spa, bp, pabd, psize, NULL, NULL, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL)); } else { /* * Treat this as a vdev child I/O. */ - zio_nowait(zio_vdev_child_io(zio, bp, vd, offset, pbuf, psize, - ZIO_TYPE_READ, ZIO_PRIORITY_SYNC_READ, + zio_nowait(zio_vdev_child_io(zio, bp, vd, offset, pabd, + psize, ZIO_TYPE_READ, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE | ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY | ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL, NULL)); @@ -3555,21 +3564,21 @@ zdb_read_block(char *thing, spa_t *spa) void *pbuf2 = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); void *lbuf2 = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL); - bcopy(pbuf, pbuf2, psize); + abd_copy_to_buf(pbuf2, pabd, psize); - VERIFY(random_get_pseudo_bytes((uint8_t *)pbuf + psize, - SPA_MAXBLOCKSIZE - psize) == 0); + VERIFY0(abd_iterate_func(pabd, psize, SPA_MAXBLOCKSIZE - psize, + random_get_pseudo_bytes_cb, NULL)); - VERIFY(random_get_pseudo_bytes((uint8_t *)pbuf2 + psize, - SPA_MAXBLOCKSIZE - psize) == 0); + VERIFY0(random_get_pseudo_bytes((uint8_t *)pbuf2 + psize, + SPA_MAXBLOCKSIZE - psize)); for (lsize = SPA_MAXBLOCKSIZE; lsize > psize; lsize -= SPA_MINBLOCKSIZE) { for (c = 0; c < ZIO_COMPRESS_FUNCTIONS; c++) { - if (zio_decompress_data(c, pbuf, lbuf, - psize, lsize) == 0 && - zio_decompress_data(c, pbuf2, lbuf2, - psize, lsize) == 0 && + if (zio_decompress_data(c, pabd, + lbuf, psize, lsize) == 0 && + zio_decompress_data_buf(c, pbuf2, + lbuf2, psize, lsize) == 0 && bcmp(lbuf, lbuf2, lsize) == 0) break; } @@ -3588,7 +3597,7 @@ zdb_read_block(char *thing, spa_t *spa) buf = lbuf; size = lsize; } else { - buf = pbuf; + buf = abd_to_buf(pabd); size = psize; } @@ -3606,7 +3615,7 @@ zdb_read_block(char *thing, spa_t *spa) zdb_dump_block(thing, buf, size, flags); out: - umem_free(pbuf, SPA_MAXBLOCKSIZE); + abd_free(pabd); umem_free(lbuf, SPA_MAXBLOCKSIZE); free(dup); } Modified: vendor/illumos/dist/cmd/zdb/zdb_il.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb_il.c Fri May 26 12:08:38 2017 (r318945) +++ vendor/illumos/dist/cmd/zdb/zdb_il.c Fri May 26 12:13:27 2017 (r318946) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2016 by Delphix. All rights reserved. */ /* @@ -41,6 +41,7 @@ #include #include #include +#include extern uint8_t dump_opt[256]; @@ -117,13 +118,27 @@ zil_prt_rec_rename(zilog_t *zilog, int t } /* ARGSUSED */ +static int +zil_prt_rec_write_cb(void *data, size_t len, void *unused) +{ + char *cdata = data; + for (int i = 0; i < len; i++) { + if (isprint(*cdata)) + (void) printf("%c ", *cdata); + else + (void) printf("%2X", *cdata); + cdata++; + } + return (0); +} + +/* ARGSUSED */ static void zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write_t *lr) { - char *data, *dlimit; + abd_t *data; blkptr_t *bp = &lr->lr_blkptr; zbookmark_phys_t zb; - char buf[SPA_MAXBLOCKSIZE]; int verbose = MAX(dump_opt['d'], dump_opt['i']); int error; @@ -144,7 +159,6 @@ zil_prt_rec_write(zilog_t *zilog, int tx if (BP_IS_HOLE(bp)) { (void) printf("\t\t\tLSIZE 0x%llx\n", (u_longlong_t)BP_GET_LSIZE(bp)); - bzero(buf, sizeof (buf)); (void) printf("%s\n", prefix); return; } @@ -157,28 +171,26 @@ zil_prt_rec_write(zilog_t *zilog, int tx lr->lr_foid, ZB_ZIL_LEVEL, lr->lr_offset / BP_GET_LSIZE(bp)); + data = abd_alloc(BP_GET_LSIZE(bp), B_FALSE); error = zio_wait(zio_read(NULL, zilog->zl_spa, - bp, buf, BP_GET_LSIZE(bp), NULL, NULL, + bp, data, BP_GET_LSIZE(bp), NULL, NULL, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL, &zb)); if (error) - return; - data = buf; + goto out; } else { - data = (char *)(lr + 1); + /* data is stored after the end of the lr_write record */ + data = abd_alloc(lr->lr_length, B_FALSE); + abd_copy_from_buf(data, lr + 1, lr->lr_length); } - dlimit = data + MIN(lr->lr_length, - (verbose < 6 ? 20 : SPA_MAXBLOCKSIZE)); - (void) printf("%s", prefix); - while (data < dlimit) { - if (isprint(*data)) - (void) printf("%c ", *data); - else - (void) printf("%2X", *data); - data++; - } + (void) abd_iterate_func(data, + 0, MIN(lr->lr_length, (verbose < 6 ? 20 : SPA_MAXBLOCKSIZE)), + zil_prt_rec_write_cb, NULL); (void) printf("\n"); + +out: + abd_free(data); } /* ARGSUSED */ Modified: vendor/illumos/dist/cmd/ztest/ztest.c ============================================================================== --- vendor/illumos/dist/cmd/ztest/ztest.c Fri May 26 12:08:38 2017 (r318945) +++ vendor/illumos/dist/cmd/ztest/ztest.c Fri May 26 12:13:27 2017 (r318946) @@ -111,6 +111,7 @@ #include #include #include +#include #include #include #include @@ -188,6 +189,7 @@ extern uint64_t metaslab_df_alloc_thresh extern uint64_t zfs_deadman_synctime_ms; extern int metaslab_preload_limit; extern boolean_t zfs_compressed_arc_enabled; +extern boolean_t zfs_abd_scatter_enabled; static ztest_shared_opts_t *ztest_shared_opts; static ztest_shared_opts_t ztest_opts; @@ -5048,7 +5050,7 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_ enum zio_checksum checksum = spa_dedup_checksum(spa); dmu_buf_t *db; dmu_tx_t *tx; - void *buf; + abd_t *abd; blkptr_t blk; int copies = 2 * ZIO_DEDUPDITTO_MIN; @@ -5128,14 +5130,14 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_ * Damage the block. Dedup-ditto will save us when we read it later. */ psize = BP_GET_PSIZE(&blk); - buf = zio_buf_alloc(psize); - ztest_pattern_set(buf, psize, ~pattern); + abd = abd_alloc_linear(psize, B_TRUE); + ztest_pattern_set(abd_to_buf(abd), psize, ~pattern); (void) zio_wait(zio_rewrite(NULL, spa, 0, &blk, - buf, psize, NULL, NULL, ZIO_PRIORITY_SYNC_WRITE, + abd, psize, NULL, NULL, ZIO_PRIORITY_SYNC_WRITE, ZIO_FLAG_CANFAIL | ZIO_FLAG_INDUCE_DAMAGE, NULL)); - zio_buf_free(buf, psize); + abd_free(abd); (void) rw_unlock(&ztest_name_lock); } @@ -5418,6 +5420,12 @@ ztest_resume_thread(void *arg) */ if (ztest_random(10) == 0) zfs_compressed_arc_enabled = ztest_random(2); + + /* + * Periodically change the zfs_abd_scatter_enabled setting. + */ + if (ztest_random(10) == 0) + zfs_abd_scatter_enabled = ztest_random(2); } return (NULL); } Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Fri May 26 12:08:38 2017 (r318945) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Fri May 26 12:13:27 2017 (r318946) @@ -192,19 +192,19 @@ dump_record(dmu_replay_record_t *drr, vo { ASSERT3U(offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum), ==, sizeof (dmu_replay_record_t) - sizeof (zio_cksum_t)); - fletcher_4_incremental_native(drr, + (void) fletcher_4_incremental_native(drr, offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum), zc); if (drr->drr_type != DRR_BEGIN) { ASSERT(ZIO_CHECKSUM_IS_ZERO(&drr->drr_u. drr_checksum.drr_checksum)); drr->drr_u.drr_checksum.drr_checksum = *zc; } - fletcher_4_incremental_native(&drr->drr_u.drr_checksum.drr_checksum, - sizeof (zio_cksum_t), zc); + (void) fletcher_4_incremental_native( + &drr->drr_u.drr_checksum.drr_checksum, sizeof (zio_cksum_t), zc); if (write(outfd, drr, sizeof (*drr)) == -1) return (errno); if (payload_len != 0) { - fletcher_4_incremental_native(payload, payload_len, zc); + (void) fletcher_4_incremental_native(payload, payload_len, zc); if (write(outfd, payload, payload_len) == -1) return (errno); } @@ -2093,9 +2093,9 @@ recv_read(libzfs_handle_t *hdl, int fd, if (zc) { if (byteswap) - fletcher_4_incremental_byteswap(buf, ilen, zc); + (void) fletcher_4_incremental_byteswap(buf, ilen, zc); else - fletcher_4_incremental_native(buf, ilen, zc); + (void) fletcher_4_incremental_native(buf, ilen, zc); } return (0); } @@ -3649,7 +3649,8 @@ zfs_receive_impl(libzfs_handle_t *hdl, c * recv_read() above; do it again correctly. */ bzero(&zcksum, sizeof (zio_cksum_t)); - fletcher_4_incremental_byteswap(&drr, sizeof (drr), &zcksum); + (void) fletcher_4_incremental_byteswap(&drr, + sizeof (drr), &zcksum); flags->byteswap = B_TRUE; drr.drr_type = BSWAP_32(drr.drr_type); From owner-svn-src-all@freebsd.org Fri May 26 12:13:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 726D0D83E3C; Fri, 26 May 2017 12:13:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AAC21680; Fri, 26 May 2017 12:13:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QCDSQE097271; Fri, 26 May 2017 12:13:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QCDSsb097265; Fri, 26 May 2017 12:13:28 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261213.v4QCDSsb097265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318946 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/di... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:13:29 -0000 Author: avg Date: Fri May 26 12:13:27 2017 New Revision: 318946 URL: https://svnweb.freebsd.org/changeset/base/318946 Log: 8021 ARC buf data scatter-ization 8100 8021 seems to cause random BAD TRAP: type=d (#gp General protection) illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383 https://github.com/illumos/illumos-gate/commit/770499e185d15678ccb0be57ebc626ad18d93383 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 linear `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.) https://www.illumos.org/issues/8100 My supermicro system is getting random BAD TRAP: type=d (#gp General protection) at about the stage where ZFS filesystems are mounted - usually console login prompt is already present but the services are still starting. After backing out 8021, the boot is completed and no panics do occur. Machine does dump, however savecore fails: savecore: bad magic number baddcafe I can get more data out with boot -k, if needed. # psrinfo -vp The physical processor has 4 cores and 8 virtual processors (0-7) The core has 2 virtual processors (0 4) The core has 2 virtual processors (1 5) The core has 2 virtual processors (2 6) The core has 2 virtual processors (3 7) x86 (GenuineIntel 306C3 family 6 model 60 step 3 clock 3500 MHz) Intel(r) Xeon(r) CPU E3-1246 v3 @ 3.50GHz # prtconf -m 32657 $ zpool status pool: rpool state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 c3t0d0 ONLINE 0 0 0 c3t1d0 ONLINE 0 0 0 Reviewed by: Matthew Ahrens mahrens@delphix.com Reviewed by: George Wilson george.wilson@delphix.com Reviewed by: Paul Dagnelie pcd@delphix.com Reviewed by: John Kennedy john.kennedy@delphix.com Reviewed by: Prakash Surya prakash.surya@delphix.com Reviewed by: Prashanth Sreenivasa pks@delphix.com Reviewed by: Pavel Zakharov pavel.zakharov@delphix.com Reviewed by: Chris Williamson chris.williamson@delphix.com Approved by: Richard Lowe Author: Dan Kimmel Added: vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c (contents, props changed) vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h vendor-sys/illumos/dist/uts/common/Makefile.files vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/blkptr.c vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/ddt.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/edonr_zfs.c vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c vendor-sys/illumos/dist/uts/common/fs/zfs/sha256.c vendor-sys/illumos/dist/uts/common/fs/zfs/skein_zfs.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/ddt.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_checksum.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_compress.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_cache.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_file.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_mirror.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_raidz.c vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_compress.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zdb/zdb.c vendor/illumos/dist/cmd/zdb/zdb_il.c vendor/illumos/dist/cmd/ztest/ztest.c vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Modified: vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c Fri May 26 12:08:38 2017 (r318945) +++ vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c Fri May 26 12:13:27 2017 (r318946) @@ -24,6 +24,7 @@ */ /* * Copyright 2013 Saso Kiselkov. All rights reserved. + * Copyright (c) 2016 by Delphix. All rights reserved. */ /* @@ -133,17 +134,29 @@ #include #include #include +#include -/*ARGSUSED*/ void -fletcher_2_native(const void *buf, uint64_t size, - const void *ctx_template, zio_cksum_t *zcp) +fletcher_init(zio_cksum_t *zcp) { + ZIO_SET_CHECKSUM(zcp, 0, 0, 0, 0); +} + +int +fletcher_2_incremental_native(void *buf, size_t size, void *data) +{ + zio_cksum_t *zcp = data; + const uint64_t *ip = buf; const uint64_t *ipend = ip + (size / sizeof (uint64_t)); uint64_t a0, b0, a1, b1; - for (a0 = b0 = a1 = b1 = 0; ip < ipend; ip += 2) { + a0 = zcp->zc_word[0]; + a1 = zcp->zc_word[1]; + b0 = zcp->zc_word[2]; + b1 = zcp->zc_word[3]; + + for (; ip < ipend; ip += 2) { a0 += ip[0]; a1 += ip[1]; b0 += a0; @@ -151,18 +164,33 @@ fletcher_2_native(const void *buf, uint6 } ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); + return (0); } /*ARGSUSED*/ void -fletcher_2_byteswap(const void *buf, uint64_t size, +fletcher_2_native(const void *buf, size_t size, const void *ctx_template, zio_cksum_t *zcp) { + fletcher_init(zcp); + (void) fletcher_2_incremental_native((void *) buf, size, zcp); +} + +int +fletcher_2_incremental_byteswap(void *buf, size_t size, void *data) +{ + zio_cksum_t *zcp = data; + const uint64_t *ip = buf; const uint64_t *ipend = ip + (size / sizeof (uint64_t)); uint64_t a0, b0, a1, b1; - for (a0 = b0 = a1 = b1 = 0; ip < ipend; ip += 2) { + a0 = zcp->zc_word[0]; + a1 = zcp->zc_word[1]; + b0 = zcp->zc_word[2]; + b1 = zcp->zc_word[3]; + + for (; ip < ipend; ip += 2) { a0 += BSWAP_64(ip[0]); a1 += BSWAP_64(ip[1]); b0 += a0; @@ -170,50 +198,23 @@ fletcher_2_byteswap(const void *buf, uin } ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); + return (0); } /*ARGSUSED*/ void -fletcher_4_native(const void *buf, uint64_t size, +fletcher_2_byteswap(const void *buf, size_t size, const void *ctx_template, zio_cksum_t *zcp) { - const uint32_t *ip = buf; - const uint32_t *ipend = ip + (size / sizeof (uint32_t)); - uint64_t a, b, c, d; - - for (a = b = c = d = 0; ip < ipend; ip++) { - a += ip[0]; - b += a; - c += b; - d += c; - } - - ZIO_SET_CHECKSUM(zcp, a, b, c, d); + fletcher_init(zcp); + (void) fletcher_2_incremental_byteswap((void *) buf, size, zcp); } -/*ARGSUSED*/ -void -fletcher_4_byteswap(const void *buf, uint64_t size, - const void *ctx_template, zio_cksum_t *zcp) +int +fletcher_4_incremental_native(void *buf, size_t size, void *data) { - const uint32_t *ip = buf; - const uint32_t *ipend = ip + (size / sizeof (uint32_t)); - uint64_t a, b, c, d; + zio_cksum_t *zcp = data; - for (a = b = c = d = 0; ip < ipend; ip++) { - a += BSWAP_32(ip[0]); - b += a; - c += b; - d += c; - } - - ZIO_SET_CHECKSUM(zcp, a, b, c, d); -} - -void -fletcher_4_incremental_native(const void *buf, uint64_t size, - zio_cksum_t *zcp) -{ const uint32_t *ip = buf; const uint32_t *ipend = ip + (size / sizeof (uint32_t)); uint64_t a, b, c, d; @@ -231,12 +232,23 @@ fletcher_4_incremental_native(const void } ZIO_SET_CHECKSUM(zcp, a, b, c, d); + return (0); } +/*ARGSUSED*/ void -fletcher_4_incremental_byteswap(const void *buf, uint64_t size, - zio_cksum_t *zcp) +fletcher_4_native(const void *buf, size_t size, + const void *ctx_template, zio_cksum_t *zcp) { + fletcher_init(zcp); + (void) fletcher_4_incremental_native((void *) buf, size, zcp); +} + +int +fletcher_4_incremental_byteswap(void *buf, size_t size, void *data) +{ + zio_cksum_t *zcp = data; + const uint32_t *ip = buf; const uint32_t *ipend = ip + (size / sizeof (uint32_t)); uint64_t a, b, c, d; @@ -254,4 +266,14 @@ fletcher_4_incremental_byteswap(const vo } ZIO_SET_CHECKSUM(zcp, a, b, c, d); + return (0); +} + +/*ARGSUSED*/ +void +fletcher_4_byteswap(const void *buf, size_t size, + const void *ctx_template, zio_cksum_t *zcp) +{ + fletcher_init(zcp); + (void) fletcher_4_incremental_byteswap((void *) buf, size, zcp); } Modified: vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h Fri May 26 12:08:38 2017 (r318945) +++ vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h Fri May 26 12:13:27 2017 (r318946) @@ -24,6 +24,7 @@ */ /* * Copyright 2013 Saso Kiselkov. All rights reserved. + * Copyright (c) 2016 by Delphix. All rights reserved. */ #ifndef _ZFS_FLETCHER_H @@ -40,12 +41,15 @@ extern "C" { * fletcher checksum functions */ -void fletcher_2_native(const void *, uint64_t, const void *, zio_cksum_t *); -void fletcher_2_byteswap(const void *, uint64_t, const void *, zio_cksum_t *); -void fletcher_4_native(const void *, uint64_t, const void *, zio_cksum_t *); -void fletcher_4_byteswap(const void *, uint64_t, const void *, zio_cksum_t *); -void fletcher_4_incremental_native(const void *, uint64_t, zio_cksum_t *); -void fletcher_4_incremental_byteswap(const void *, uint64_t, zio_cksum_t *); +void fletcher_init(zio_cksum_t *); +void fletcher_2_native(const void *, size_t, const void *, zio_cksum_t *); +void fletcher_2_byteswap(const void *, size_t, const void *, zio_cksum_t *); +int fletcher_2_incremental_native(void *, size_t, void *); +int fletcher_2_incremental_byteswap(void *, size_t, void *); +void fletcher_4_native(const void *, size_t, const void *, zio_cksum_t *); +void fletcher_4_byteswap(const void *, size_t, const void *, zio_cksum_t *); +int fletcher_4_incremental_native(void *, size_t, void *); +int fletcher_4_incremental_byteswap(void *, size_t, void *); #ifdef __cplusplus } Modified: vendor-sys/illumos/dist/uts/common/Makefile.files ============================================================================== --- vendor-sys/illumos/dist/uts/common/Makefile.files Fri May 26 12:08:38 2017 (r318945) +++ vendor-sys/illumos/dist/uts/common/Makefile.files Fri May 26 12:13:27 2017 (r318946) @@ -1333,6 +1333,7 @@ NOTIFY_OBJS += md_notify.o TRANS_OBJS += mdtrans.o trans_ioctl.o trans_log.o ZFS_COMMON_OBJS += \ + abd.o \ arc.o \ blkptr.o \ bplist.o \ Added: vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/abd.c Fri May 26 12:13:27 2017 (r318946) @@ -0,0 +1,940 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright (c) 2014 by Chunwei Chen. All rights reserved. + * Copyright (c) 2016 by Delphix. All rights reserved. + */ + +/* + * ARC buffer data (ABD). + * + * ABDs are an abstract data structure for the ARC which can use two + * different ways of storing the underlying data: + * + * (a) Linear buffer. In this case, all the data in the ABD is stored in one + * contiguous buffer in memory (from a zio_[data_]buf_* kmem cache). + * + * +-------------------+ + * | ABD (linear) | + * | abd_flags = ... | + * | abd_size = ... | +--------------------------------+ + * | abd_buf ------------->| raw buffer of size abd_size | + * +-------------------+ +--------------------------------+ + * no abd_chunks + * + * (b) Scattered buffer. In this case, the data in the ABD is split into + * equal-sized chunks (from the abd_chunk_cache kmem_cache), with pointers + * to the chunks recorded in an array at the end of the ABD structure. + * + * +-------------------+ + * | ABD (scattered) | + * | abd_flags = ... | + * | abd_size = ... | + * | abd_offset = 0 | +-----------+ + * | abd_chunks[0] ----------------------------->| chunk 0 | + * | abd_chunks[1] ---------------------+ +-----------+ + * | ... | | +-----------+ + * | abd_chunks[N-1] ---------+ +------->| chunk 1 | + * +-------------------+ | +-----------+ + * | ... + * | +-----------+ + * +----------------->| chunk N-1 | + * +-----------+ + * + * Using a large proportion of scattered ABDs decreases ARC fragmentation since + * when we are at the limit of allocatable space, using equal-size chunks will + * allow us to quickly reclaim enough space for a new large allocation (assuming + * it is also scattered). + * + * In addition to directly allocating a linear or scattered ABD, it is also + * possible to create an ABD by requesting the "sub-ABD" starting at an offset + * within an existing ABD. In linear buffers this is simple (set abd_buf of + * the new ABD to the starting point within the original raw buffer), but + * scattered ABDs are a little more complex. The new ABD makes a copy of the + * relevant abd_chunks pointers (but not the underlying data). However, to + * provide arbitrary rather than only chunk-aligned starting offsets, it also + * tracks an abd_offset field which represents the starting point of the data + * within the first chunk in abd_chunks. For both linear and scattered ABDs, + * creating an offset ABD marks the original ABD as the offset's parent, and the + * original ABD's abd_children refcount is incremented. This data allows us to + * ensure the root ABD isn't deleted before its children. + * + * Most consumers should never need to know what type of ABD they're using -- + * the ABD public API ensures that it's possible to transparently switch from + * using a linear ABD to a scattered one when doing so would be beneficial. + * + * If you need to use the data within an ABD directly, if you know it's linear + * (because you allocated it) you can use abd_to_buf() to access the underlying + * raw buffer. Otherwise, you should use one of the abd_borrow_buf* functions + * which will allocate a raw buffer if necessary. Use the abd_return_buf* + * functions to return any raw buffers that are no longer necessary when you're + * done using them. + * + * There are a variety of ABD APIs that implement basic buffer operations: + * compare, copy, read, write, and fill with zeroes. If you need a custom + * function which progressively accesses the whole ABD, use the abd_iterate_* + * functions. + */ + +#include +#include +#include +#include +#include + +typedef struct abd_stats { + kstat_named_t abdstat_struct_size; + kstat_named_t abdstat_scatter_cnt; + kstat_named_t abdstat_scatter_data_size; + kstat_named_t abdstat_scatter_chunk_waste; + kstat_named_t abdstat_linear_cnt; + kstat_named_t abdstat_linear_data_size; +} abd_stats_t; + +static abd_stats_t abd_stats = { + /* Amount of memory occupied by all of the abd_t struct allocations */ + { "struct_size", KSTAT_DATA_UINT64 }, + /* + * The number of scatter ABDs which are currently allocated, excluding + * ABDs which don't own their data (for instance the ones which were + * allocated through abd_get_offset()). + */ + { "scatter_cnt", KSTAT_DATA_UINT64 }, + /* Amount of data stored in all scatter ABDs tracked by scatter_cnt */ + { "scatter_data_size", KSTAT_DATA_UINT64 }, + /* + * The amount of space wasted at the end of the last chunk across all + * scatter ABDs tracked by scatter_cnt. + */ + { "scatter_chunk_waste", KSTAT_DATA_UINT64 }, + /* + * The number of linear ABDs which are currently allocated, excluding + * ABDs which don't own their data (for instance the ones which were + * allocated through abd_get_offset() and abd_get_from_buf()). If an + * ABD takes ownership of its buf then it will become tracked. + */ + { "linear_cnt", KSTAT_DATA_UINT64 }, + /* Amount of data stored in all linear ABDs tracked by linear_cnt */ + { "linear_data_size", KSTAT_DATA_UINT64 }, +}; + +#define ABDSTAT(stat) (abd_stats.stat.value.ui64) +#define ABDSTAT_INCR(stat, val) \ + atomic_add_64(&abd_stats.stat.value.ui64, (val)) +#define ABDSTAT_BUMP(stat) ABDSTAT_INCR(stat, 1) +#define ABDSTAT_BUMPDOWN(stat) ABDSTAT_INCR(stat, -1) + +/* + * It is possible to make all future ABDs be linear by setting this to B_FALSE. + * Otherwise, ABDs are allocated scattered by default unless the caller uses + * abd_alloc_linear(). + */ +boolean_t zfs_abd_scatter_enabled = B_TRUE; + +/* + * The size of the chunks ABD allocates. Because the sizes allocated from the + * kmem_cache can't change, this tunable can only be modified at boot. Changing + * it at runtime would cause ABD iteration to work incorrectly for ABDs which + * were allocated with the old size, so a safeguard has been put in place which + * will cause the machine to panic if you change it and try to access the data + * within a scattered ABD. + */ +size_t zfs_abd_chunk_size = 4096; + +#ifdef _KERNEL +extern vmem_t *zio_alloc_arena; +#endif + +kmem_cache_t *abd_chunk_cache; +static kstat_t *abd_ksp; + +static void * +abd_alloc_chunk() +{ + void *c = kmem_cache_alloc(abd_chunk_cache, KM_PUSHPAGE); + ASSERT3P(c, !=, NULL); + return (c); +} + +static void +abd_free_chunk(void *c) +{ + kmem_cache_free(abd_chunk_cache, c); +} + +void +abd_init(void) +{ + vmem_t *data_alloc_arena = NULL; + +#ifdef _KERNEL + data_alloc_arena = zio_alloc_arena; +#endif + + /* + * Since ABD chunks do not appear in crash dumps, we pass KMC_NOTOUCH + * so that no allocator metadata is stored with the buffers. + */ + abd_chunk_cache = kmem_cache_create("abd_chunk", zfs_abd_chunk_size, 0, + NULL, NULL, NULL, NULL, data_alloc_arena, KMC_NOTOUCH); + + abd_ksp = kstat_create("zfs", 0, "abdstats", "misc", KSTAT_TYPE_NAMED, + sizeof (abd_stats) / sizeof (kstat_named_t), KSTAT_FLAG_VIRTUAL); + if (abd_ksp != NULL) { + abd_ksp->ks_data = &abd_stats; + kstat_install(abd_ksp); + } +} + +void +abd_fini(void) +{ + if (abd_ksp != NULL) { + kstat_delete(abd_ksp); + abd_ksp = NULL; + } + + kmem_cache_destroy(abd_chunk_cache); + abd_chunk_cache = NULL; +} + +static inline size_t +abd_chunkcnt_for_bytes(size_t size) +{ + return (P2ROUNDUP(size, zfs_abd_chunk_size) / zfs_abd_chunk_size); +} + +static inline size_t +abd_scatter_chunkcnt(abd_t *abd) +{ + ASSERT(!abd_is_linear(abd)); + return (abd_chunkcnt_for_bytes( + abd->abd_u.abd_scatter.abd_offset + abd->abd_size)); +} + +static inline void +abd_verify(abd_t *abd) +{ + ASSERT3U(abd->abd_size, >, 0); + ASSERT3U(abd->abd_size, <=, SPA_MAXBLOCKSIZE); + ASSERT3U(abd->abd_flags, ==, abd->abd_flags & (ABD_FLAG_LINEAR | + ABD_FLAG_OWNER | ABD_FLAG_META)); + IMPLY(abd->abd_parent != NULL, !(abd->abd_flags & ABD_FLAG_OWNER)); + IMPLY(abd->abd_flags & ABD_FLAG_META, abd->abd_flags & ABD_FLAG_OWNER); + if (abd_is_linear(abd)) { + ASSERT3P(abd->abd_u.abd_linear.abd_buf, !=, NULL); + } else { + ASSERT3U(abd->abd_u.abd_scatter.abd_offset, <, + zfs_abd_chunk_size); + size_t n = abd_scatter_chunkcnt(abd); + for (int i = 0; i < n; i++) { + ASSERT3P( + abd->abd_u.abd_scatter.abd_chunks[i], !=, NULL); + } + } +} + +static inline abd_t * +abd_alloc_struct(size_t chunkcnt) +{ + size_t size = offsetof(abd_t, abd_u.abd_scatter.abd_chunks[chunkcnt]); + abd_t *abd = kmem_alloc(size, KM_PUSHPAGE); + ASSERT3P(abd, !=, NULL); + ABDSTAT_INCR(abdstat_struct_size, size); + + return (abd); +} + +static inline void +abd_free_struct(abd_t *abd) +{ + size_t chunkcnt = abd_is_linear(abd) ? 0 : abd_scatter_chunkcnt(abd); + int size = offsetof(abd_t, abd_u.abd_scatter.abd_chunks[chunkcnt]); + kmem_free(abd, size); + ABDSTAT_INCR(abdstat_struct_size, -size); +} + +/* + * Allocate an ABD, along with its own underlying data buffers. Use this if you + * don't care whether the ABD is linear or not. + */ +abd_t * +abd_alloc(size_t size, boolean_t is_metadata) +{ + if (!zfs_abd_scatter_enabled) + return (abd_alloc_linear(size, is_metadata)); + + VERIFY3U(size, <=, SPA_MAXBLOCKSIZE); + + size_t n = abd_chunkcnt_for_bytes(size); + abd_t *abd = abd_alloc_struct(n); + + abd->abd_flags = ABD_FLAG_OWNER; + if (is_metadata) { + abd->abd_flags |= ABD_FLAG_META; + } + abd->abd_size = size; + abd->abd_parent = NULL; + refcount_create(&abd->abd_children); + + abd->abd_u.abd_scatter.abd_offset = 0; + abd->abd_u.abd_scatter.abd_chunk_size = zfs_abd_chunk_size; + + for (int i = 0; i < n; i++) { + void *c = abd_alloc_chunk(); + ASSERT3P(c, !=, NULL); + abd->abd_u.abd_scatter.abd_chunks[i] = c; + } + + ABDSTAT_BUMP(abdstat_scatter_cnt); + ABDSTAT_INCR(abdstat_scatter_data_size, size); + ABDSTAT_INCR(abdstat_scatter_chunk_waste, + n * zfs_abd_chunk_size - size); + + return (abd); +} + +static void +abd_free_scatter(abd_t *abd) +{ + size_t n = abd_scatter_chunkcnt(abd); + for (int i = 0; i < n; i++) { + abd_free_chunk(abd->abd_u.abd_scatter.abd_chunks[i]); + } + + refcount_destroy(&abd->abd_children); + ABDSTAT_BUMPDOWN(abdstat_scatter_cnt); + ABDSTAT_INCR(abdstat_scatter_data_size, -(int)abd->abd_size); + ABDSTAT_INCR(abdstat_scatter_chunk_waste, + abd->abd_size - n * zfs_abd_chunk_size); + + abd_free_struct(abd); +} + +/* + * Allocate an ABD that must be linear, along with its own underlying data + * buffer. Only use this when it would be very annoying to write your ABD + * consumer with a scattered ABD. + */ +abd_t * +abd_alloc_linear(size_t size, boolean_t is_metadata) +{ + abd_t *abd = abd_alloc_struct(0); + + VERIFY3U(size, <=, SPA_MAXBLOCKSIZE); + + abd->abd_flags = ABD_FLAG_LINEAR | ABD_FLAG_OWNER; + if (is_metadata) { + abd->abd_flags |= ABD_FLAG_META; + } + abd->abd_size = size; + abd->abd_parent = NULL; + refcount_create(&abd->abd_children); + + if (is_metadata) { + abd->abd_u.abd_linear.abd_buf = zio_buf_alloc(size); + } else { + abd->abd_u.abd_linear.abd_buf = zio_data_buf_alloc(size); + } + + ABDSTAT_BUMP(abdstat_linear_cnt); + ABDSTAT_INCR(abdstat_linear_data_size, size); + + return (abd); +} + +static void +abd_free_linear(abd_t *abd) +{ + if (abd->abd_flags & ABD_FLAG_META) { + zio_buf_free(abd->abd_u.abd_linear.abd_buf, abd->abd_size); + } else { + zio_data_buf_free(abd->abd_u.abd_linear.abd_buf, abd->abd_size); + } + + refcount_destroy(&abd->abd_children); + ABDSTAT_BUMPDOWN(abdstat_linear_cnt); + ABDSTAT_INCR(abdstat_linear_data_size, -(int)abd->abd_size); + + abd_free_struct(abd); +} + +/* + * Free an ABD. Only use this on ABDs allocated with abd_alloc() or + * abd_alloc_linear(). + */ +void +abd_free(abd_t *abd) +{ + abd_verify(abd); + ASSERT3P(abd->abd_parent, ==, NULL); + ASSERT(abd->abd_flags & ABD_FLAG_OWNER); + if (abd_is_linear(abd)) + abd_free_linear(abd); + else + abd_free_scatter(abd); +} + +/* + * Allocate an ABD of the same format (same metadata flag, same scatterize + * setting) as another ABD. + */ +abd_t * +abd_alloc_sametype(abd_t *sabd, size_t size) +{ + boolean_t is_metadata = (sabd->abd_flags & ABD_FLAG_META) != 0; + if (abd_is_linear(sabd)) { + return (abd_alloc_linear(size, is_metadata)); + } else { + return (abd_alloc(size, is_metadata)); + } +} + +/* + * If we're going to use this ABD for doing I/O using the block layer, the + * consumer of the ABD data doesn't care if it's scattered or not, and we don't + * plan to store this ABD in memory for a long period of time, we should + * allocate the ABD type that requires the least data copying to do the I/O. + * + * Currently this is linear ABDs, however if ldi_strategy() can ever issue I/Os + * using a scatter/gather list we should switch to that and replace this call + * with vanilla abd_alloc(). + */ +abd_t * +abd_alloc_for_io(size_t size, boolean_t is_metadata) +{ + return (abd_alloc_linear(size, is_metadata)); +} + +/* + * Allocate a new ABD to point to offset off of sabd. It shares the underlying + * buffer data with sabd. Use abd_put() to free. sabd must not be freed while + * any derived ABDs exist. + */ +abd_t * +abd_get_offset(abd_t *sabd, size_t off) +{ + abd_t *abd; + + abd_verify(sabd); + ASSERT3U(off, <=, sabd->abd_size); + + if (abd_is_linear(sabd)) { + abd = abd_alloc_struct(0); + + /* + * Even if this buf is filesystem metadata, we only track that + * if we own the underlying data buffer, which is not true in + * this case. Therefore, we don't ever use ABD_FLAG_META here. + */ + abd->abd_flags = ABD_FLAG_LINEAR; + + abd->abd_u.abd_linear.abd_buf = + (char *)sabd->abd_u.abd_linear.abd_buf + off; + } else { + size_t new_offset = sabd->abd_u.abd_scatter.abd_offset + off; + size_t chunkcnt = abd_scatter_chunkcnt(sabd) - + (new_offset / zfs_abd_chunk_size); + + abd = abd_alloc_struct(chunkcnt); + + /* + * Even if this buf is filesystem metadata, we only track that + * if we own the underlying data buffer, which is not true in + * this case. Therefore, we don't ever use ABD_FLAG_META here. + */ + abd->abd_flags = 0; + + abd->abd_u.abd_scatter.abd_offset = + new_offset % zfs_abd_chunk_size; + abd->abd_u.abd_scatter.abd_chunk_size = zfs_abd_chunk_size; + + /* Copy the scatterlist starting at the correct offset */ + (void) memcpy(&abd->abd_u.abd_scatter.abd_chunks, + &sabd->abd_u.abd_scatter.abd_chunks[new_offset / + zfs_abd_chunk_size], + chunkcnt * sizeof (void *)); + } + + abd->abd_size = sabd->abd_size - off; + abd->abd_parent = sabd; + refcount_create(&abd->abd_children); + (void) refcount_add_many(&sabd->abd_children, abd->abd_size, abd); + + return (abd); +} + +/* + * Allocate a linear ABD structure for buf. You must free this with abd_put() + * since the resulting ABD doesn't own its own buffer. + */ +abd_t * +abd_get_from_buf(void *buf, size_t size) +{ + abd_t *abd = abd_alloc_struct(0); + + VERIFY3U(size, <=, SPA_MAXBLOCKSIZE); + + /* + * Even if this buf is filesystem metadata, we only track that if we + * own the underlying data buffer, which is not true in this case. + * Therefore, we don't ever use ABD_FLAG_META here. + */ + abd->abd_flags = ABD_FLAG_LINEAR; + abd->abd_size = size; + abd->abd_parent = NULL; + refcount_create(&abd->abd_children); + + abd->abd_u.abd_linear.abd_buf = buf; + + return (abd); +} + +/* + * Free an ABD allocated from abd_get_offset() or abd_get_from_buf(). Will not + * free the underlying scatterlist or buffer. + */ +void +abd_put(abd_t *abd) +{ + abd_verify(abd); + ASSERT(!(abd->abd_flags & ABD_FLAG_OWNER)); + + if (abd->abd_parent != NULL) { + (void) refcount_remove_many(&abd->abd_parent->abd_children, + abd->abd_size, abd); + } + + refcount_destroy(&abd->abd_children); + abd_free_struct(abd); +} + +/* + * Get the raw buffer associated with a linear ABD. + */ +void * +abd_to_buf(abd_t *abd) +{ + ASSERT(abd_is_linear(abd)); + abd_verify(abd); + return (abd->abd_u.abd_linear.abd_buf); +} + +/* + * Borrow a raw buffer from an ABD without copying the contents of the ABD + * into the buffer. If the ABD is scattered, this will allocate a raw buffer + * whose contents are undefined. To copy over the existing data in the ABD, use + * abd_borrow_buf_copy() instead. + */ +void * +abd_borrow_buf(abd_t *abd, size_t n) +{ + void *buf; + abd_verify(abd); + ASSERT3U(abd->abd_size, >=, n); + if (abd_is_linear(abd)) { + buf = abd_to_buf(abd); + } else { + buf = zio_buf_alloc(n); + } + (void) refcount_add_many(&abd->abd_children, n, buf); + + return (buf); +} + +void * +abd_borrow_buf_copy(abd_t *abd, size_t n) +{ + void *buf = abd_borrow_buf(abd, n); + if (!abd_is_linear(abd)) { + abd_copy_to_buf(buf, abd, n); + } + return (buf); +} + +/* + * Return a borrowed raw buffer to an ABD. If the ABD is scattered, this will + * not change the contents of the ABD and will ASSERT that you didn't modify + * the buffer since it was borrowed. If you want any changes you made to buf to + * be copied back to abd, use abd_return_buf_copy() instead. + */ +void +abd_return_buf(abd_t *abd, void *buf, size_t n) +{ + abd_verify(abd); + ASSERT3U(abd->abd_size, >=, n); + if (abd_is_linear(abd)) { + ASSERT3P(buf, ==, abd_to_buf(abd)); + } else { + ASSERT0(abd_cmp_buf(abd, buf, n)); + zio_buf_free(buf, n); + } + (void) refcount_remove_many(&abd->abd_children, n, buf); +} + +void +abd_return_buf_copy(abd_t *abd, void *buf, size_t n) +{ + if (!abd_is_linear(abd)) { + abd_copy_from_buf(abd, buf, n); + } + abd_return_buf(abd, buf, n); +} + +/* + * Give this ABD ownership of the buffer that it's storing. Can only be used on + * linear ABDs which were allocated via abd_get_from_buf(), or ones allocated + * with abd_alloc_linear() which subsequently released ownership of their buf + * with abd_release_ownership_of_buf(). + */ +void +abd_take_ownership_of_buf(abd_t *abd, boolean_t is_metadata) +{ + ASSERT(abd_is_linear(abd)); + ASSERT(!(abd->abd_flags & ABD_FLAG_OWNER)); + abd_verify(abd); + + abd->abd_flags |= ABD_FLAG_OWNER; + if (is_metadata) { + abd->abd_flags |= ABD_FLAG_META; + } + + ABDSTAT_BUMP(abdstat_linear_cnt); + ABDSTAT_INCR(abdstat_linear_data_size, abd->abd_size); +} + +void +abd_release_ownership_of_buf(abd_t *abd) +{ + ASSERT(abd_is_linear(abd)); + ASSERT(abd->abd_flags & ABD_FLAG_OWNER); + abd_verify(abd); + + abd->abd_flags &= ~ABD_FLAG_OWNER; + /* Disable this flag since we no longer own the data buffer */ + abd->abd_flags &= ~ABD_FLAG_META; + + ABDSTAT_BUMPDOWN(abdstat_linear_cnt); + ABDSTAT_INCR(abdstat_linear_data_size, -(int)abd->abd_size); +} + +struct abd_iter { + abd_t *iter_abd; /* ABD being iterated through */ + size_t iter_pos; /* position (relative to abd_offset) */ + void *iter_mapaddr; /* addr corresponding to iter_pos */ + size_t iter_mapsize; /* length of data valid at mapaddr */ +}; + +static inline size_t +abd_iter_scatter_chunk_offset(struct abd_iter *aiter) +{ + ASSERT(!abd_is_linear(aiter->iter_abd)); + return ((aiter->iter_abd->abd_u.abd_scatter.abd_offset + + aiter->iter_pos) % zfs_abd_chunk_size); +} + +static inline size_t +abd_iter_scatter_chunk_index(struct abd_iter *aiter) +{ + ASSERT(!abd_is_linear(aiter->iter_abd)); + return ((aiter->iter_abd->abd_u.abd_scatter.abd_offset + + aiter->iter_pos) / zfs_abd_chunk_size); +} + +/* + * Initialize the abd_iter. + */ +static void +abd_iter_init(struct abd_iter *aiter, abd_t *abd) +{ + abd_verify(abd); + aiter->iter_abd = abd; + aiter->iter_pos = 0; + aiter->iter_mapaddr = NULL; + aiter->iter_mapsize = 0; +} + +/* + * Advance the iterator by a certain amount. Cannot be called when a chunk is + * in use. This can be safely called when the aiter has already exhausted, in + * which case this does nothing. + */ +static void +abd_iter_advance(struct abd_iter *aiter, size_t amount) +{ + ASSERT3P(aiter->iter_mapaddr, ==, NULL); + ASSERT0(aiter->iter_mapsize); + + /* There's nothing left to advance to, so do nothing */ + if (aiter->iter_pos == aiter->iter_abd->abd_size) + return; + + aiter->iter_pos += amount; +} + +/* + * Map the current chunk into aiter. This can be safely called when the aiter + * has already exhausted, in which case this does nothing. + */ +static void +abd_iter_map(struct abd_iter *aiter) +{ + void *paddr; + size_t offset = 0; + + ASSERT3P(aiter->iter_mapaddr, ==, NULL); + ASSERT0(aiter->iter_mapsize); + + /* Panic if someone has changed zfs_abd_chunk_size */ + IMPLY(!abd_is_linear(aiter->iter_abd), zfs_abd_chunk_size == + aiter->iter_abd->abd_u.abd_scatter.abd_chunk_size); + + /* There's nothing left to iterate over, so do nothing */ + if (aiter->iter_pos == aiter->iter_abd->abd_size) + return; + + if (abd_is_linear(aiter->iter_abd)) { + offset = aiter->iter_pos; + aiter->iter_mapsize = aiter->iter_abd->abd_size - offset; + paddr = aiter->iter_abd->abd_u.abd_linear.abd_buf; + } else { + size_t index = abd_iter_scatter_chunk_index(aiter); + offset = abd_iter_scatter_chunk_offset(aiter); + aiter->iter_mapsize = zfs_abd_chunk_size - offset; + paddr = aiter->iter_abd->abd_u.abd_scatter.abd_chunks[index]; + } + aiter->iter_mapaddr = (char *)paddr + offset; +} + +/* + * Unmap the current chunk from aiter. This can be safely called when the aiter + * has already exhausted, in which case this does nothing. + */ +static void +abd_iter_unmap(struct abd_iter *aiter) +{ + /* There's nothing left to unmap, so do nothing */ + if (aiter->iter_pos == aiter->iter_abd->abd_size) + return; + + ASSERT3P(aiter->iter_mapaddr, !=, NULL); + ASSERT3U(aiter->iter_mapsize, >, 0); + + aiter->iter_mapaddr = NULL; + aiter->iter_mapsize = 0; +} + +int +abd_iterate_func(abd_t *abd, size_t off, size_t size, + abd_iter_func_t *func, void *private) +{ + int ret = 0; + struct abd_iter aiter; + + abd_verify(abd); + ASSERT3U(off + size, <=, abd->abd_size); + + abd_iter_init(&aiter, abd); + abd_iter_advance(&aiter, off); + + while (size > 0) { + abd_iter_map(&aiter); + + size_t len = MIN(aiter.iter_mapsize, size); + ASSERT3U(len, >, 0); + + ret = func(aiter.iter_mapaddr, len, private); + + abd_iter_unmap(&aiter); + + if (ret != 0) + break; + + size -= len; + abd_iter_advance(&aiter, len); + } + + return (ret); +} + +struct buf_arg { + void *arg_buf; +}; + +static int +abd_copy_to_buf_off_cb(void *buf, size_t size, void *private) +{ + struct buf_arg *ba_ptr = private; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri May 26 12:14:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06A88D83ECE; Fri, 26 May 2017 12:14:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8DB418D2; Fri, 26 May 2017 12:13:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QCDwbm097344; Fri, 26 May 2017 12:13:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QCDw29097336; Fri, 26 May 2017 12:13:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261213.v4QCDw29097336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318947 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/ztest X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:14:00 -0000 Author: avg Date: Fri May 26 12:13:58 2017 New Revision: 318947 URL: https://svnweb.freebsd.org/changeset/base/318947 Log: 7578 Fix/improve some aspects of ZIL writing. 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: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/ztest/ztest.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h Fri May 26 12:13:27 2017 (r318946) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h Fri May 26 12:13:58 2017 (r318947) @@ -378,7 +378,6 @@ typedef struct itx { void *itx_private; /* type-specific opaque data */ itx_wr_state_t itx_wr_state; /* write state */ uint8_t itx_sync; /* synchronous transaction */ - uint64_t itx_sod; /* record size on disk */ uint64_t itx_oid; /* object id */ lr_t itx_lr; /* common part of log record */ /* followed by type-specific part of lr_xx_t and its immediate data */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil_impl.h Fri May 26 12:13:27 2017 (r318946) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil_impl.h Fri May 26 12:13:58 2017 (r318947) @@ -42,6 +42,7 @@ extern "C" { typedef struct lwb { zilog_t *lwb_zilog; /* back pointer to log struct */ blkptr_t lwb_blk; /* on disk address of this log blk */ + boolean_t lwb_slog; /* lwb_blk is on SLOG device */ int lwb_nused; /* # used bytes in buffer */ int lwb_sz; /* size of block and buffer */ char *lwb_buf; /* log write buffer */ @@ -62,7 +63,6 @@ typedef struct itxs { typedef struct itxg { kmutex_t itxg_lock; /* lock for this structure */ uint64_t itxg_txg; /* txg for this chain */ - uint64_t itxg_sod; /* total size on disk for this txg */ itxs_t *itxg_itxs; /* sync and async itxs */ } itxg_t; @@ -120,7 +120,6 @@ struct zilog { kcondvar_t zl_cv_batch[2]; /* batch condition variables */ itxg_t zl_itxg[TXG_SIZE]; /* intent log txg chains */ list_t zl_itx_commit_list; /* itx list to be committed */ - uint64_t zl_itx_list_sz; /* total size of records on list */ uint64_t zl_cur_used; /* current commit log size used */ list_t zl_lwb_list; /* in-flight log write list */ kmutex_t zl_vdev_lock; /* protects zl_vdev_tree */ @@ -140,9 +139,26 @@ 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. + */ #define ZIL_MAX_LOG_DATA (SPA_OLD_MAXBLOCKSIZE - sizeof (zil_chain_t) - \ 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%). + */ +#define ZIL_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. + */ +#define ZIL_MAX_COPIED_DATA ((SPA_OLD_MAXBLOCKSIZE - \ + sizeof (zil_chain_t)) / 2 - sizeof (lr_write_t)) + #ifdef __cplusplus } #endif Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h Fri May 26 12:13:27 2017 (r318946) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h Fri May 26 12:13:58 2017 (r318947) @@ -505,7 +505,7 @@ extern zio_t *zio_free_sync(zio_t *pio, const blkptr_t *bp, enum zio_flag flags); extern int zio_alloc_zil(spa_t *spa, uint64_t txg, blkptr_t *new_bp, - blkptr_t *old_bp, uint64_t size, boolean_t use_slog); + blkptr_t *old_bp, uint64_t size, boolean_t *slog); extern void zio_free_zil(spa_t *spa, uint64_t txg, blkptr_t *bp); extern void zio_flush(zio_t *zio, vdev_t *vd); extern void zio_shrink(zio_t *zio, uint64_t size); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c Fri May 26 12:13:27 2017 (r318946) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c Fri May 26 12:13:58 2017 (r318947) @@ -454,20 +454,17 @@ void zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, znode_t *zp, offset_t off, ssize_t resid, int ioflag) { + uint32_t blocksize = zp->z_blksz; itx_wr_state_t write_state; - boolean_t slogging; uintptr_t fsync_cnt; - ssize_t immediate_write_sz; if (zil_replaying(zilog, tx) || zp->z_unlinked) return; - immediate_write_sz = (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) - ? 0 : zfs_immediate_write_sz; - - slogging = spa_has_slogs(zilog->zl_spa) && - (zilog->zl_logbias == ZFS_LOGBIAS_LATENCY); - if (resid > immediate_write_sz && !slogging && resid <= zp->z_blksz) + if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) + write_state = WR_INDIRECT; + else if (!spa_has_slogs(zilog->zl_spa) && + resid >= zfs_immediate_write_sz) write_state = WR_INDIRECT; else if (ioflag & (FSYNC | FDSYNC)) write_state = WR_COPIED; @@ -481,30 +478,26 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t * while (resid) { itx_t *itx; lr_write_t *lr; - ssize_t len; + itx_wr_state_t wr_state = write_state; + ssize_t len = resid; - /* - * If the write would overflow the largest block then split it. - */ - if (write_state != WR_INDIRECT && resid > ZIL_MAX_LOG_DATA) - len = SPA_OLD_MAXBLOCKSIZE >> 1; - else - len = resid; + if (wr_state == WR_COPIED && resid > ZIL_MAX_COPIED_DATA) + wr_state = WR_NEED_COPY; + else if (wr_state == WR_INDIRECT) + len = MIN(blocksize - P2PHASE(off, blocksize), resid); itx = zil_itx_create(txtype, sizeof (*lr) + - (write_state == WR_COPIED ? len : 0)); + (wr_state == WR_COPIED ? len : 0)); lr = (lr_write_t *)&itx->itx_lr; - if (write_state == WR_COPIED && dmu_read(zp->z_zfsvfs->z_os, + if (wr_state == WR_COPIED && dmu_read(zp->z_zfsvfs->z_os, zp->z_id, off, len, lr + 1, DMU_READ_NO_PREFETCH) != 0) { zil_itx_destroy(itx); itx = zil_itx_create(txtype, sizeof (*lr)); lr = (lr_write_t *)&itx->itx_lr; - write_state = WR_NEED_COPY; + wr_state = WR_NEED_COPY; } - itx->itx_wr_state = write_state; - if (write_state == WR_NEED_COPY) - itx->itx_sod += len; + itx->itx_wr_state = wr_state; lr->lr_foid = zp->z_id; lr->lr_offset = off; lr->lr_length = len; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Fri May 26 12:13:27 2017 (r318946) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Fri May 26 12:13:58 2017 (r318947) @@ -79,6 +79,13 @@ int zil_replay_disable = 0; */ boolean_t zfs_nocacheflush = B_FALSE; +/* + * Limit SLOG write size per commit executed with synchronous priority. + * Any writes above that will be executed with lower (asynchronous) priority + * to limit potential SLOG device abuse by single active ZIL writer. + */ +uint64_t zil_slog_bulk = 768 * 1024; + static kmem_cache_t *zil_lwb_cache; static void zil_async_to_sync(zilog_t *zilog, uint64_t foid); @@ -430,13 +437,14 @@ zil_free_log_record(zilog_t *zilog, lr_t } static lwb_t * -zil_alloc_lwb(zilog_t *zilog, blkptr_t *bp, uint64_t txg) +zil_alloc_lwb(zilog_t *zilog, blkptr_t *bp, boolean_t slog, uint64_t txg) { lwb_t *lwb; lwb = kmem_cache_alloc(zil_lwb_cache, KM_SLEEP); lwb->lwb_zilog = zilog; lwb->lwb_blk = *bp; + lwb->lwb_slog = slog; lwb->lwb_buf = zio_buf_alloc(BP_GET_LSIZE(bp)); lwb->lwb_max_txg = txg; lwb->lwb_zio = NULL; @@ -520,6 +528,7 @@ zil_create(zilog_t *zilog) dmu_tx_t *tx = NULL; blkptr_t blk; int error = 0; + boolean_t slog = FALSE; /* * Wait for any previous destroy to complete. @@ -548,7 +557,7 @@ zil_create(zilog_t *zilog) } error = zio_alloc_zil(zilog->zl_spa, txg, &blk, NULL, - ZIL_MIN_BLKSZ, zilog->zl_logbias == ZFS_LOGBIAS_LATENCY); + ZIL_MIN_BLKSZ, &slog); if (error == 0) zil_init_log_chain(zilog, &blk); @@ -558,7 +567,7 @@ zil_create(zilog_t *zilog) * Allocate a log write buffer (lwb) for the first log block. */ if (error == 0) - lwb = zil_alloc_lwb(zilog, &blk, txg); + lwb = zil_alloc_lwb(zilog, &blk, slog, txg); /* * If we just allocated the first log block, commit our transaction @@ -890,6 +899,7 @@ static void zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb) { zbookmark_phys_t zb; + zio_priority_t prio; SET_BOOKMARK(&zb, lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_OBJSET], ZB_ZIL_OBJECT, ZB_ZIL_LEVEL, @@ -902,9 +912,13 @@ zil_lwb_write_init(zilog_t *zilog, lwb_t if (lwb->lwb_zio == NULL) { abd_t *lwb_abd = abd_get_from_buf(lwb->lwb_buf, BP_GET_LSIZE(&lwb->lwb_blk)); + if (!lwb->lwb_slog || zilog->zl_cur_used <= zil_slog_bulk) + prio = ZIO_PRIORITY_SYNC_WRITE; + else + prio = ZIO_PRIORITY_ASYNC_WRITE; lwb->lwb_zio = zio_rewrite(zilog->zl_root_zio, zilog->zl_spa, 0, &lwb->lwb_blk, lwb_abd, BP_GET_LSIZE(&lwb->lwb_blk), - zil_lwb_write_done, lwb, ZIO_PRIORITY_SYNC_WRITE, + zil_lwb_write_done, lwb, prio, ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_PROPAGATE, &zb); } } @@ -924,16 +938,6 @@ uint64_t zil_block_buckets[] = { }; /* - * Use the slog as long as the logbias is 'latency' and the current commit size - * is less than the limit or the total list size is less than 2X the limit. - * Limit checking is disabled by setting zil_slog_limit to UINT64_MAX. - */ -uint64_t zil_slog_limit = 1024 * 1024; -#define USE_SLOG(zilog) (((zilog)->zl_logbias == ZFS_LOGBIAS_LATENCY) && \ - (((zilog)->zl_cur_used < zil_slog_limit) || \ - ((zilog)->zl_itx_list_sz < (zil_slog_limit << 1)))) - -/* * Start a log block write and advance to the next log block. * Calls are serialized. */ @@ -948,6 +952,7 @@ zil_lwb_write_start(zilog_t *zilog, lwb_ uint64_t txg; uint64_t zil_blksz, wsz; int i, error; + boolean_t slog; if (BP_GET_CHECKSUM(&lwb->lwb_blk) == ZIO_CHECKSUM_ZILOG2) { zilc = (zil_chain_t *)lwb->lwb_buf; @@ -1004,8 +1009,7 @@ zil_lwb_write_start(zilog_t *zilog, lwb_ BP_ZERO(bp); /* pass the old blkptr in order to spread log blocks across devs */ - error = zio_alloc_zil(spa, txg, bp, &lwb->lwb_blk, zil_blksz, - USE_SLOG(zilog)); + error = zio_alloc_zil(spa, txg, bp, &lwb->lwb_blk, zil_blksz, &slog); if (error == 0) { ASSERT3U(bp->blk_birth, ==, txg); bp->blk_cksum = lwb->lwb_blk.blk_cksum; @@ -1014,7 +1018,7 @@ zil_lwb_write_start(zilog_t *zilog, lwb_ /* * Allocate a new log write buffer (lwb). */ - nlwb = zil_alloc_lwb(zilog, bp, txg); + nlwb = zil_alloc_lwb(zilog, bp, slog, txg); /* Record the block for later vdev flushing */ zil_add_block(zilog, &lwb->lwb_blk); @@ -1051,45 +1055,53 @@ zil_lwb_write_start(zilog_t *zilog, lwb_ static lwb_t * zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) { - lr_t *lrc = &itx->itx_lr; /* common log record */ - lr_write_t *lrw = (lr_write_t *)lrc; + lr_t *lrcb, *lrc; + lr_write_t *lrwb, *lrw; char *lr_buf; - uint64_t txg = lrc->lrc_txg; - uint64_t reclen = lrc->lrc_reclen; - uint64_t dlen = 0; + uint64_t dlen, dnow, lwb_sp, reclen, txg; if (lwb == NULL) return (NULL); ASSERT(lwb->lwb_buf != NULL); - if (lrc->lrc_txtype == TX_WRITE && itx->itx_wr_state == WR_NEED_COPY) + lrc = &itx->itx_lr; /* Common log record inside itx. */ + lrw = (lr_write_t *)lrc; /* Write log record inside itx. */ + if (lrc->lrc_txtype == TX_WRITE && itx->itx_wr_state == WR_NEED_COPY) { dlen = P2ROUNDUP_TYPED( lrw->lr_length, sizeof (uint64_t), uint64_t); - + } else { + dlen = 0; + } + reclen = lrc->lrc_reclen; zilog->zl_cur_used += (reclen + dlen); + txg = lrc->lrc_txg; zil_lwb_write_init(zilog, lwb); +cont: /* * If this record won't fit in the current log block, start a new one. + * For WR_NEED_COPY optimize layout for minimal number of chunks. */ - if (lwb->lwb_nused + reclen + dlen > lwb->lwb_sz) { + lwb_sp = lwb->lwb_sz - lwb->lwb_nused; + if (reclen > lwb_sp || (reclen + dlen > lwb_sp && + lwb_sp < ZIL_MAX_WASTE_SPACE && (dlen % ZIL_MAX_LOG_DATA == 0 || + lwb_sp < reclen + dlen % ZIL_MAX_LOG_DATA))) { lwb = zil_lwb_write_start(zilog, lwb); if (lwb == NULL) return (NULL); zil_lwb_write_init(zilog, lwb); ASSERT(LWB_EMPTY(lwb)); - if (lwb->lwb_nused + reclen + dlen > lwb->lwb_sz) { - txg_wait_synced(zilog->zl_dmu_pool, txg); - return (lwb); - } + lwb_sp = lwb->lwb_sz - lwb->lwb_nused; + ASSERT3U(reclen + MIN(dlen, sizeof (uint64_t)), <=, lwb_sp); } + dnow = MIN(dlen, lwb_sp - reclen); lr_buf = lwb->lwb_buf + lwb->lwb_nused; bcopy(lrc, lr_buf, reclen); - lrc = (lr_t *)lr_buf; - lrw = (lr_write_t *)lrc; + lrcb = (lr_t *)lr_buf; /* Like lrc, but inside lwb. */ + lrwb = (lr_write_t *)lrcb; /* Like lrw, but inside lwb. */ /* * If it's a write, fetch the data or get its blkptr as appropriate. @@ -1101,16 +1113,19 @@ zil_lwb_commit(zilog_t *zilog, itx_t *it char *dbuf; int error; - if (dlen) { - ASSERT(itx->itx_wr_state == WR_NEED_COPY); + if (itx->itx_wr_state == WR_NEED_COPY) { dbuf = lr_buf + reclen; - lrw->lr_common.lrc_reclen += dlen; + lrcb->lrc_reclen += dnow; + if (lrwb->lr_length > dnow) + lrwb->lr_length = dnow; + lrw->lr_offset += dnow; + lrw->lr_length -= dnow; } else { ASSERT(itx->itx_wr_state == WR_INDIRECT); dbuf = NULL; } error = zilog->zl_get_data( - itx->itx_private, lrw, dbuf, lwb->lwb_zio); + itx->itx_private, lrwb, dbuf, lwb->lwb_zio); if (error == EIO) { txg_wait_synced(zilog->zl_dmu_pool, txg); return (lwb); @@ -1129,12 +1144,18 @@ zil_lwb_commit(zilog_t *zilog, itx_t *it * equal to the itx sequence number because not all transactions * are synchronous, and sometimes spa_sync() gets there first. */ - lrc->lrc_seq = ++zilog->zl_lr_seq; /* we are single threaded */ - lwb->lwb_nused += reclen + dlen; + lrcb->lrc_seq = ++zilog->zl_lr_seq; /* we are single threaded */ + lwb->lwb_nused += reclen + dnow; lwb->lwb_max_txg = MAX(lwb->lwb_max_txg, txg); ASSERT3U(lwb->lwb_nused, <=, lwb->lwb_sz); ASSERT0(P2PHASE(lwb->lwb_nused, sizeof (uint64_t))); + dlen -= dnow; + if (dlen > 0) { + zilog->zl_cur_used += reclen; + goto cont; + } + return (lwb); } @@ -1148,7 +1169,6 @@ zil_itx_create(uint64_t txtype, size_t l itx = kmem_alloc(offsetof(itx_t, itx_lr) + lrsize, KM_SLEEP); itx->itx_lr.lrc_txtype = txtype; itx->itx_lr.lrc_reclen = lrsize; - itx->itx_sod = lrsize; /* if write & WR_NEED_COPY will be increased */ itx->itx_lr.lrc_seq = 0; /* defensive */ itx->itx_sync = B_TRUE; /* default is synchronous */ @@ -1299,11 +1319,8 @@ zil_itx_assign(zilog_t *zilog, itx_t *it */ zfs_dbgmsg("zil_itx_assign: missed itx cleanup for " "txg %llu", itxg->itxg_txg); - atomic_add_64(&zilog->zl_itx_list_sz, -itxg->itxg_sod); - itxg->itxg_sod = 0; clean = itxg->itxg_itxs; } - ASSERT(itxg->itxg_sod == 0); itxg->itxg_txg = txg; itxs = itxg->itxg_itxs = kmem_zalloc(sizeof (itxs_t), KM_SLEEP); @@ -1315,8 +1332,6 @@ zil_itx_assign(zilog_t *zilog, itx_t *it } if (itx->itx_sync) { list_insert_tail(&itxs->i_sync_list, itx); - atomic_add_64(&zilog->zl_itx_list_sz, itx->itx_sod); - itxg->itxg_sod += itx->itx_sod; } else { avl_tree_t *t = &itxs->i_async_tree; uint64_t foid = ((lr_ooo_t *)&itx->itx_lr)->lr_foid; @@ -1364,8 +1379,6 @@ zil_clean(zilog_t *zilog, uint64_t synce ASSERT3U(itxg->itxg_txg, <=, synced_txg); ASSERT(itxg->itxg_txg != 0); ASSERT(zilog->zl_clean_taskq != NULL); - atomic_add_64(&zilog->zl_itx_list_sz, -itxg->itxg_sod); - itxg->itxg_sod = 0; clean_me = itxg->itxg_itxs; itxg->itxg_itxs = NULL; itxg->itxg_txg = 0; @@ -1389,7 +1402,6 @@ zil_get_commit_list(zilog_t *zilog) { uint64_t otxg, txg; list_t *commit_list = &zilog->zl_itx_commit_list; - uint64_t push_sod = 0; if (spa_freeze_txg(zilog->zl_spa) != UINT64_MAX) /* ziltest support */ otxg = ZILTEST_TXG; @@ -1421,12 +1433,9 @@ zil_get_commit_list(zilog_t *zilog) ASSERT(zilog_is_dirty_in_txg(zilog, txg) || spa_freeze_txg(zilog->zl_spa) != UINT64_MAX); list_move_tail(commit_list, &itxg->itxg_itxs->i_sync_list); - push_sod += itxg->itxg_sod; - itxg->itxg_sod = 0; mutex_exit(&itxg->itxg_lock); } - atomic_add_64(&zilog->zl_itx_list_sz, -push_sod); } /* Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri May 26 12:13:27 2017 (r318946) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri May 26 12:13:58 2017 (r318947) @@ -2915,7 +2915,7 @@ zio_dva_unallocate(zio_t *zio, zio_gang_ */ int zio_alloc_zil(spa_t *spa, uint64_t txg, blkptr_t *new_bp, blkptr_t *old_bp, - uint64_t size, boolean_t use_slog) + uint64_t size, boolean_t *slog) { int error = 1; zio_alloc_list_t io_alloc_list; @@ -2923,17 +2923,16 @@ zio_alloc_zil(spa_t *spa, uint64_t txg, ASSERT(txg > spa_syncing_txg(spa)); metaslab_trace_init(&io_alloc_list); - - if (use_slog) { - error = metaslab_alloc(spa, spa_log_class(spa), size, - new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID, - &io_alloc_list, NULL); - } - - if (error) { + error = metaslab_alloc(spa, spa_log_class(spa), size, new_bp, 1, + txg, old_bp, METASLAB_HINTBP_AVOID, &io_alloc_list, NULL); + if (error == 0) { + *slog = TRUE; + } else { error = metaslab_alloc(spa, spa_normal_class(spa), size, new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID, &io_alloc_list, NULL); + if (error == 0) + *slog = FALSE; } metaslab_trace_fini(&io_alloc_list); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Fri May 26 12:13:27 2017 (r318946) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Fri May 26 12:13:58 2017 (r318947) @@ -1058,54 +1058,44 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_ { uint32_t blocksize = zv->zv_volblocksize; zilog_t *zilog = zv->zv_zilog; - boolean_t slogging; - ssize_t immediate_write_sz; + itx_wr_state_t write_state; if (zil_replaying(zilog, tx)) return; - immediate_write_sz = (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) - ? 0 : zvol_immediate_write_sz; - - slogging = spa_has_slogs(zilog->zl_spa) && - (zilog->zl_logbias == ZFS_LOGBIAS_LATENCY); + if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) + write_state = WR_INDIRECT; + else if (!spa_has_slogs(zilog->zl_spa) && + resid >= blocksize && blocksize > zvol_immediate_write_sz) + write_state = WR_INDIRECT; + else if (sync) + write_state = WR_COPIED; + else + write_state = WR_NEED_COPY; while (resid) { itx_t *itx; lr_write_t *lr; - ssize_t len; - itx_wr_state_t write_state; + itx_wr_state_t wr_state = write_state; + ssize_t len = resid; - /* - * Unlike zfs_log_write() we can be called with - * upto DMU_MAX_ACCESS/2 (5MB) writes. - */ - if (blocksize > immediate_write_sz && !slogging && - resid >= blocksize && off % blocksize == 0) { - write_state = WR_INDIRECT; /* uses dmu_sync */ - len = blocksize; - } else if (sync) { - write_state = WR_COPIED; - len = MIN(ZIL_MAX_LOG_DATA, resid); - } else { - write_state = WR_NEED_COPY; - len = MIN(ZIL_MAX_LOG_DATA, resid); - } + if (wr_state == WR_COPIED && resid > ZIL_MAX_COPIED_DATA) + wr_state = WR_NEED_COPY; + else if (wr_state == WR_INDIRECT) + len = MIN(blocksize - P2PHASE(off, blocksize), resid); itx = zil_itx_create(TX_WRITE, sizeof (*lr) + - (write_state == WR_COPIED ? len : 0)); + (wr_state == WR_COPIED ? len : 0)); lr = (lr_write_t *)&itx->itx_lr; - if (write_state == WR_COPIED && dmu_read(zv->zv_objset, + if (wr_state == WR_COPIED && dmu_read(zv->zv_objset, ZVOL_OBJ, off, len, lr + 1, DMU_READ_NO_PREFETCH) != 0) { zil_itx_destroy(itx); itx = zil_itx_create(TX_WRITE, sizeof (*lr)); lr = (lr_write_t *)&itx->itx_lr; - write_state = WR_NEED_COPY; + wr_state = WR_NEED_COPY; } - itx->itx_wr_state = write_state; - if (write_state == WR_NEED_COPY) - itx->itx_sod += len; + itx->itx_wr_state = wr_state; lr->lr_foid = ZVOL_OBJ; lr->lr_offset = off; lr->lr_length = len; From owner-svn-src-all@freebsd.org Fri May 26 12:14:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21C3BD83ECF; Fri, 26 May 2017 12:14:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F336718D4; Fri, 26 May 2017 12:13:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QCDxHj097350; Fri, 26 May 2017 12:13:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QCDxT5097349; Fri, 26 May 2017 12:13:59 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261213.v4QCDxT5097349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 12:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318947 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/ztest X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 12:14:00 -0000 Author: avg Date: Fri May 26 12:13:58 2017 New Revision: 318947 URL: https://svnweb.freebsd.org/changeset/base/318947 Log: 7578 Fix/improve some aspects of ZIL writing. 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: vendor/illumos/dist/cmd/ztest/ztest.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Modified: vendor/illumos/dist/cmd/ztest/ztest.c ============================================================================== --- vendor/illumos/dist/cmd/ztest/ztest.c Fri May 26 12:13:27 2017 (r318946) +++ vendor/illumos/dist/cmd/ztest/ztest.c Fri May 26 12:13:58 2017 (r318947) @@ -1377,7 +1377,6 @@ ztest_log_write(ztest_ds_t *zd, dmu_tx_t itx->itx_private = zd; itx->itx_wr_state = write_state; itx->itx_sync = (ztest_random(8) == 0); - itx->itx_sod += (write_state == WR_NEED_COPY ? lr->lr_length : 0); bcopy(&lr->lr_common + 1, &itx->itx_lr + 1, sizeof (*lr) - sizeof (lr_t)); From owner-svn-src-all@freebsd.org Fri May 26 13:06:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C78AD8154C; Fri, 26 May 2017 13:06:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C4841B34; Fri, 26 May 2017 13:06:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QD6EBs018572; Fri, 26 May 2017 13:06:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QD6EY8018571; Fri, 26 May 2017 13:06:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705261306.v4QD6EY8018571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 26 May 2017 13:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318948 - stable/11/tools/build/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 13:06:15 -0000 Author: gjb Date: Fri May 26 13:06:13 2017 New Revision: 318948 URL: https://svnweb.freebsd.org/changeset/base/318948 Log: MFC r318748: Honor WITHOUT_TFTP for check-old* and delete-old* targets. PR: 217949 Sponsored by: The FreeBSD Foundation Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Fri May 26 12:13:58 2017 (r318947) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Fri May 26 13:06:13 2017 (r318948) @@ -8329,6 +8329,13 @@ OLD_FILES+=usr/share/man/man1/colcrt.1.g OLD_FILES+=usr/share/man/man1/ul.1.gz .endif +.if ${MK_TFTP} == no +OLD_FILES+=usr/bin/tftp +OLD_FILES+=usr/libexec/tftpd +OLD_FILES+=usr/share/man/man1/tftp.1.gz +OLD_FILES+=usr/share/man/man8/tftpd.8.gz +.endif + .if ${MK_TIMED} == no OLD_FILES+=usr/sbin/timed OLD_FILES+=usr/sbin/timedc From owner-svn-src-all@freebsd.org Fri May 26 13:09:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC738D8161A; Fri, 26 May 2017 13:09:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C8A31DCF; Fri, 26 May 2017 13:09:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QD9GHs018887; Fri, 26 May 2017 13:09:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QD9GWn018886; Fri, 26 May 2017 13:09:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705261309.v4QD9GWn018886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 26 May 2017 13:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318949 - stable/10/tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 13:09:17 -0000 Author: gjb Date: Fri May 26 13:09:16 2017 New Revision: 318949 URL: https://svnweb.freebsd.org/changeset/base/318949 Log: MFC r318748: Honor WITHOUT_TFTP for check-old* and delete-old* targets. PR: 217949 Sponsored by: The FreeBSD Foundation Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri May 26 13:06:13 2017 (r318948) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri May 26 13:09:16 2017 (r318949) @@ -5308,6 +5308,13 @@ OLD_FILES+=${TESTS_FILES} . endif .endif # Test suite. +.if ${MK_TFTP} == no +OLD_FILES+=usr/bin/tftp +OLD_FILES+=usr/libexec/tftpd +OLD_FILES+=usr/share/man/man1/tftp.1.gz +OLD_FILES+=usr/share/man/man8/tftpd.8.gz +.endif + #.if ${MK_TOOLCHAIN} == no # to be filled in #.endif From owner-svn-src-all@freebsd.org Fri May 26 15:13:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06AD6D82A6D; Fri, 26 May 2017 15:13:48 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC9311B46; Fri, 26 May 2017 15:13:47 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QFDk4Y071764; Fri, 26 May 2017 15:13:46 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QFDkh0071759; Fri, 26 May 2017 15:13:46 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201705261513.v4QFDkh0071759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 26 May 2017 15:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318950 - in stable/11/contrib/blacklist: bin include lib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 15:13:48 -0000 Author: lidl Date: Fri May 26 15:13:46 2017 New Revision: 318950 URL: https://svnweb.freebsd.org/changeset/base/318950 Log: MFC r318755: Extend libblacklist support with new action types The original blacklist library supported two notification types: - failed auth attempt, which incremented the failed login count by one for the remote address - successful auth attempt, which reset the failed login count to zero for that remote address When the failed login count reached the limit in the configuration file, the remote address would be blocked by a packet filter. This patch implements a new notification type, "abusive behavior", and accepts, but does not act on an additional type, "bad username". It is envisioned that a system administrator will configure a small list of "known bad usernames" that should be blocked immediately. Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/blacklist/bin/blacklistd.c stable/11/contrib/blacklist/include/bl.h stable/11/contrib/blacklist/include/blacklist.h stable/11/contrib/blacklist/lib/blacklist.c stable/11/contrib/blacklist/lib/libblacklist.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/bin/blacklistd.c ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.c Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/bin/blacklistd.c Fri May 26 15:13:46 2017 (r318950) @@ -214,6 +214,17 @@ process(bl_t bl) } switch (bi->bi_type) { + case BL_ABUSE: + /* + * If the application has signaled abusive behavior, + * set the number of fails to be one less than the + * configured limit. Fallthrough to the normal BL_ADD + * processing, which will increment the failure count + * to the threshhold, and block the abusive address. + */ + if (c.c_nfail != -1) + dbi.count = c.c_nfail - 1; + /*FALLTHROUGH*/ case BL_ADD: dbi.count++; dbi.last = ts.tv_sec; @@ -249,6 +260,9 @@ process(bl_t bl) dbi.count = 0; dbi.last = 0; break; + case BL_BADUSER: + /* ignore for now */ + break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } Modified: stable/11/contrib/blacklist/include/bl.h ============================================================================== --- stable/11/contrib/blacklist/include/bl.h Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/include/bl.h Fri May 26 15:13:46 2017 (r318950) @@ -40,7 +40,9 @@ typedef enum { BL_INVALID, BL_ADD, - BL_DELETE + BL_DELETE, + BL_ABUSE, + BL_BADUSER } bl_type_t; typedef struct { Modified: stable/11/contrib/blacklist/include/blacklist.h ============================================================================== --- stable/11/contrib/blacklist/include/blacklist.h Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/include/blacklist.h Fri May 26 15:13:46 2017 (r318950) @@ -43,4 +43,13 @@ int blacklist_sa_r(struct blacklist *, i const struct sockaddr *, socklen_t, const char *); __END_DECLS +/* action values for user applications */ +#define BLACKLIST_API_ENUM 1 +enum { + BLACKLIST_AUTH_OK = 0, + BLACKLIST_AUTH_FAIL, + BLACKLIST_ABUSIVE_BEHAVIOR, + BLACKLIST_BAD_USER +}; + #endif /* _BLACKLIST_H */ Modified: stable/11/contrib/blacklist/lib/blacklist.c ============================================================================== --- stable/11/contrib/blacklist/lib/blacklist.c Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/lib/blacklist.c Fri May 26 15:13:46 2017 (r318950) @@ -61,7 +61,27 @@ int blacklist_sa_r(struct blacklist *bl, int action, int rfd, const struct sockaddr *sa, socklen_t slen, const char *msg) { - return bl_send(bl, action ? BL_ADD : BL_DELETE, rfd, sa, slen, msg); + int internal_action; + + /* internal values are not the same as user application values */ + switch (action) { + case BLACKLIST_AUTH_FAIL: + internal_action = BL_ADD; + break; + case BLACKLIST_AUTH_OK: + internal_action = BL_DELETE; + break; + case BLACKLIST_ABUSIVE_BEHAVIOR: + internal_action = BL_ABUSE; + break; + case BLACKLIST_BAD_USER: + internal_action = BL_BADUSER; + break; + default: + internal_action = BL_INVALID; + break; + } + return bl_send(bl, internal_action, rfd, sa, slen, msg); } int Modified: stable/11/contrib/blacklist/lib/libblacklist.3 ============================================================================== --- stable/11/contrib/blacklist/lib/libblacklist.3 Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/lib/libblacklist.3 Fri May 26 15:13:46 2017 (r318950) @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 22, 2015 +.Dd May 5, 2017 .Dt LIBBLACKLIST 3 .Os .Sh NAME @@ -76,13 +76,9 @@ The .Fn blacklist function sends a message to .Xr blacklistd 8 , -with an +with an integer .Ar action -argument specifying -.Dv 1 -for a failed connection or -.Dv 0 -for a successful connection, +argument specifying the type of notification, a file descriptor .Ar fd specifying the accepted file descriptor connected to the client, @@ -91,6 +87,30 @@ and an optional message in the argument. .Pp The +.Ar action +parameter can take these values: +.Bl -tag -width ".Va BLACKLIST_ABUSIVE_BEHAVIOR" +.It Va BLACKLIST_AUTH_FAIL +There was an unsuccessful authentication attempt. +.It Va BLACKLIST_AUTH_OK +A user successfully authenticated. +.It Va BLACKLIST_ABUSIVE_BEHAVIOR +The sending daemon has detected abusive behavior +from the remote system. The remote address should +be blocked as soon as possible. +.It Va BLACKLIST_BAD_USER +The sending daemon has determined the username +presented for authentication is invalid. The +.Xr blacklistd 8 +daemon compares the username to a configured list of forbidden +usernames and +blocks the address immediately if a forbidden username matches. +(The +.Ar BLACKLIST_BAD_USER +support is not currently available.) +.El +.Pp +The .Fn blacklist_r function is more efficient because it keeps the blacklist state around. .Pp @@ -102,8 +122,13 @@ functions can be used with unconnected s .Xr getpeername 2 will not work, the server will pass the peer name in the message. .Pp -All functions log errors to -.Xr syslogd 8 . +By default, +.Xr syslogd 8 +is used for message logging. +The internal +.Fn bl_create +function can be used to create the required internal +state and specify a custom logging function. .Sh RETURN VALUES The function .Fn blacklist_open From owner-svn-src-all@freebsd.org Fri May 26 15:49:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F9DFD83681; Fri, 26 May 2017 15:49:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39DBE10BA; Fri, 26 May 2017 15:49:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QFnL5V084333; Fri, 26 May 2017 15:49:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QFnKFA084327; Fri, 26 May 2017 15:49:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705261549.v4QFnKFA084327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 26 May 2017 15:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318951 - in head/usr.sbin/makefs: . ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 15:49:22 -0000 Author: emaste Date: Fri May 26 15:49:20 2017 New Revision: 318951 URL: https://svnweb.freebsd.org/changeset/base/318951 Log: makefs: add -O (offset) option NetBSD revs: ffs.c 1.60 makefs.8 1.44 makefs.c 1.48 makefs.h 1.33 ffs/buf.c 1.20 ffs/mkfs.c 1.27 Obtained from: NetBSD Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10780 Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/buf.c head/usr.sbin/makefs/ffs/mkfs.c head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c head/usr.sbin/makefs/makefs.h Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Fri May 26 15:13:46 2017 (r318950) +++ head/usr.sbin/makefs/ffs.c Fri May 26 15:49:20 2017 (r318951) @@ -476,13 +476,15 @@ ffs_create_image(const char *image, fsin char *buf; int i, bufsize; off_t bufrem; + int oflags = O_RDWR | O_CREAT; time_t tstamp; - int oflags = O_RDWR | O_CREAT | O_TRUNC; assert (image != NULL); assert (fsopts != NULL); /* create image */ + if (fsopts->offset == 0) + oflags |= O_TRUNC; if ((fsopts->fd = open(image, oflags, 0666)) == -1) { warn("Can't open `%s' for writing", image); return (-1); @@ -517,6 +519,13 @@ ffs_create_image(const char *image, fsin bufsize); buf = ecalloc(1, bufsize); } + + if (fsopts->offset != 0) + if (lseek(fsopts->fd, fsopts->offset, SEEK_SET) == -1) { + warn("can't seek"); + return -1; + } + while (bufrem > 0) { i = write(fsopts->fd, buf, MIN(bufsize, bufrem)); if (i == -1) { Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Fri May 26 15:13:46 2017 (r318950) +++ head/usr.sbin/makefs/ffs/buf.c Fri May 26 15:49:20 2017 (r318951) @@ -68,7 +68,7 @@ bread(struct vnode *vp, daddr_t blkno, i printf("%s: blkno %lld size %d\n", __func__, (long long)blkno, size); *bpp = getblk(vp, blkno, size, 0, 0, 0); - offset = (*bpp)->b_blkno * fsinfo->sectorsize; + offset = (*bpp)->b_blkno * fsinfo->sectorsize + fsinfo->offset; if (debug & DEBUG_BUF_BREAD) printf("%s: blkno %lld offset %lld bcount %ld\n", __func__, (long long)(*bpp)->b_blkno, (long long) offset, @@ -128,7 +128,7 @@ bwrite(struct buf *bp) fsinfo_t *fs = bp->b_fs; assert (bp != NULL); - offset = bp->b_blkno * fs->sectorsize; + offset = bp->b_blkno * fs->sectorsize + fs->offset; if (debug & DEBUG_BUF_BWRITE) printf("bwrite: blkno %lld offset %lld bcount %ld\n", (long long)bp->b_blkno, (long long) offset, Modified: head/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- head/usr.sbin/makefs/ffs/mkfs.c Fri May 26 15:13:46 2017 (r318950) +++ head/usr.sbin/makefs/ffs/mkfs.c Fri May 26 15:49:20 2017 (r318951) @@ -774,8 +774,7 @@ ffs_rdfs(daddr_t bno, int size, void *bf int n; off_t offset; - offset = bno; - offset *= fsopts->sectorsize; + offset = bno * fsopts->sectorsize + fsopts->offset; if (lseek(fsopts->fd, offset, SEEK_SET) < 0) err(1, "%s: seek error for sector %lld", __func__, (long long)bno); @@ -799,11 +798,10 @@ ffs_wtfs(daddr_t bno, int size, void *bf int n; off_t offset; - offset = bno; - offset *= fsopts->sectorsize; + offset = bno * fsopts->sectorsize + fsopts->offset; if (lseek(fsopts->fd, offset, SEEK_SET) < 0) err(1, "%s: seek error for sector %lld", __func__, - (long long)bno ); + (long long)bno); n = write(fsopts->fd, bf, size); if (n == -1) err(1, "%s: write error for sector %lld", __func__, Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Fri May 26 15:13:46 2017 (r318950) +++ head/usr.sbin/makefs/makefs.8 Fri May 26 15:49:20 2017 (r318951) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 2017 +.Dd May 26, 2017 .Dt MAKEFS 8 .Os .Sh NAME @@ -52,6 +52,7 @@ .Op Fl M Ar minimum-size .Op Fl m Ar maximum-size .Op Fl N Ar userdb-dir +.Op Fl O Ar offset .Op Fl o Ar fs-options .Op Fl R Ar roundup-size .Op Fl S Ar sector-size @@ -193,6 +194,11 @@ rather than using the results from the s and .Xr getgrnam 3 (and related) library calls. +.It Fl O Ar offset +Instead of creating the filesystem at the beginning of the file, start +at offset. +Valid only for +.Sy ffs . .It Fl o Ar fs-options Set file system specific options. .Ar fs-options Modified: head/usr.sbin/makefs/makefs.c ============================================================================== --- head/usr.sbin/makefs/makefs.c Fri May 26 15:13:46 2017 (r318950) +++ head/usr.sbin/makefs/makefs.c Fri May 26 15:49:20 2017 (r318951) @@ -124,7 +124,7 @@ main(int argc, char *argv[]) err(1, "Unable to get system time"); - while ((ch = getopt(argc, argv, "B:b:Dd:f:F:M:m:N:o:pR:s:S:t:T:xZ")) != -1) { + while ((ch = getopt(argc, argv, "B:b:Dd:f:F:M:m:N:O:o:pR:s:S:t:T:xZ")) != -1) { switch (ch) { case 'B': @@ -202,7 +202,12 @@ main(int argc, char *argv[]) fsoptions.maxsize = strsuftoll("maximum size", optarg, 1LL, LLONG_MAX); break; - + + case 'O': + fsoptions.offset = + strsuftoll("offset", optarg, 0LL, LLONG_MAX); + break; + case 'o': { char *p; @@ -479,8 +484,8 @@ usage(fstype_t *fstype, fsinfo_t *fsopti fprintf(stderr, "Usage: %s [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]\n" "\t[-F mtree-specfile] [-f free-files] [-M minimum-size] [-m maximum-size]\n" -"\t[-N userdb-dir] [-o fs-options] [-R roundup-size] [-S sector-size]\n" -"\t[-s image-size] [-T ] [-t fs-type]\n" +"\t[-N userdb-dir] [-O offset] [-o fs-options] [-R roundup-size]\n" +"\t[-S sector-size] [-s image-size] [-T ] [-t fs-type]\n" "\timage-file directory | manifest [extra-directory ...]\n", prog); Modified: head/usr.sbin/makefs/makefs.h ============================================================================== --- head/usr.sbin/makefs/makefs.h Fri May 26 15:13:46 2017 (r318950) +++ head/usr.sbin/makefs/makefs.h Fri May 26 15:49:20 2017 (r318951) @@ -151,6 +151,7 @@ typedef struct makefs_fsinfo { off_t maxsize; /* maximum size image can be */ off_t freefiles; /* free file entries to leave */ off_t freeblocks; /* free blocks to leave */ + off_t offset; /* offset from start of file */ off_t roundup; /* round image size up to this value */ int freefilepc; /* free file % */ int freeblockpc; /* free block % */ From owner-svn-src-all@freebsd.org Fri May 26 15:51:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC4FDD838DE; Fri, 26 May 2017 15:51:52 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC72D157D; Fri, 26 May 2017 15:51:52 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QFppHi085871; Fri, 26 May 2017 15:51:51 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QFppcf085870; Fri, 26 May 2017 15:51:51 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705261551.v4QFppcf085870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 26 May 2017 15:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318952 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 15:51:53 -0000 Author: vangyzen Date: Fri May 26 15:51:51 2017 New Revision: 318952 URL: https://svnweb.freebsd.org/changeset/base/318952 Log: libthr: prevent setcontext() from masking SIGTHR __thr_setcontext() mistakenly tested for the presence of SIGCANCEL in its local ucontext_t instead of the parameter. Therefore, if a thread calls setcontext() with a context whose signal mask contains SIGTHR (a.k.a. SIGCANCEL), that signal will be blocked, preventing the thread from being cancelled or suspended. Reported by: gcc 6.1 via RISC-V tinderbox Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10933 Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Fri May 26 15:49:20 2017 (r318951) +++ head/lib/libthr/thread/thr_sig.c Fri May 26 15:51:51 2017 (r318952) @@ -736,7 +736,7 @@ __thr_setcontext(const ucontext_t *ucp) errno = EINVAL; return (-1); } - if (!SIGISMEMBER(uc.uc_sigmask, SIGCANCEL)) + if (!SIGISMEMBER(ucp->uc_sigmask, SIGCANCEL)) return __sys_setcontext(ucp); (void) memcpy(&uc, ucp, sizeof(uc)); SIGDELSET(uc.uc_sigmask, SIGCANCEL); From owner-svn-src-all@freebsd.org Fri May 26 15:53:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B770D83957; Fri, 26 May 2017 15:53:29 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0E9B177B; Fri, 26 May 2017 15:53:28 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QFrRRt088083; Fri, 26 May 2017 15:53:27 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QFrRbZ088082; Fri, 26 May 2017 15:53:27 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705261553.v4QFrRbZ088082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 26 May 2017 15:53:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318953 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 15:53:29 -0000 Author: vangyzen Date: Fri May 26 15:53:27 2017 New Revision: 318953 URL: https://svnweb.freebsd.org/changeset/base/318953 Log: libthr: fix style in previous commit I intended to add this to the previous commit. Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Fri May 26 15:51:51 2017 (r318952) +++ head/lib/libthr/thread/thr_sig.c Fri May 26 15:53:27 2017 (r318953) @@ -737,7 +737,7 @@ __thr_setcontext(const ucontext_t *ucp) return (-1); } if (!SIGISMEMBER(ucp->uc_sigmask, SIGCANCEL)) - return __sys_setcontext(ucp); + return (__sys_setcontext(ucp)); (void) memcpy(&uc, ucp, sizeof(uc)); SIGDELSET(uc.uc_sigmask, SIGCANCEL); return (__sys_setcontext(&uc)); From owner-svn-src-all@freebsd.org Fri May 26 15:55:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7785BD839C8; Fri, 26 May 2017 15:55:05 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52AA1190F; Fri, 26 May 2017 15:55:05 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QFt4kj088215; Fri, 26 May 2017 15:55:04 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QFt37L088210; Fri, 26 May 2017 15:55:03 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705261555.v4QFt37L088210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 26 May 2017 15:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318954 - in head/libexec/rtld-elf: arm mips powerpc powerpc64 riscv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 15:55:05 -0000 Author: vangyzen Date: Fri May 26 15:55:03 2017 New Revision: 318954 URL: https://svnweb.freebsd.org/changeset/base/318954 Log: rtld: fix warnings about redundant declarations Fix warnings about redundant declarations in rtld when libthr in increased to WARNS=6. Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10934 Modified: head/libexec/rtld-elf/arm/rtld_machdep.h head/libexec/rtld-elf/mips/rtld_machdep.h head/libexec/rtld-elf/powerpc/rtld_machdep.h head/libexec/rtld-elf/powerpc64/rtld_machdep.h head/libexec/rtld-elf/riscv/rtld_machdep.h Modified: head/libexec/rtld-elf/arm/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/arm/rtld_machdep.h Fri May 26 15:53:27 2017 (r318953) +++ head/libexec/rtld-elf/arm/rtld_machdep.h Fri May 26 15:55:03 2017 (r318954) @@ -67,11 +67,6 @@ typedef struct { round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) -/* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - extern void *__tls_get_addr(tls_index *ti); #define RTLD_DEFAULT_STACK_PF_EXEC PF_X Modified: head/libexec/rtld-elf/mips/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/mips/rtld_machdep.h Fri May 26 15:53:27 2017 (r318953) +++ head/libexec/rtld-elf/mips/rtld_machdep.h Fri May 26 15:55:03 2017 (r318954) @@ -67,11 +67,6 @@ typedef struct { round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) -/* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - extern void *__tls_get_addr(tls_index *ti); #define RTLD_DEFAULT_STACK_PF_EXEC PF_X Modified: head/libexec/rtld-elf/powerpc/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/powerpc/rtld_machdep.h Fri May 26 15:53:27 2017 (r318953) +++ head/libexec/rtld-elf/powerpc/rtld_machdep.h Fri May 26 15:55:03 2017 (r318954) @@ -54,11 +54,6 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, (((Elf_Addr (*)(void))ptr)()) /* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - -/* * PLT functions. Not really correct prototypes, but the * symbol values are needed. */ Modified: head/libexec/rtld-elf/powerpc64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/powerpc64/rtld_machdep.h Fri May 26 15:53:27 2017 (r318953) +++ head/libexec/rtld-elf/powerpc64/rtld_machdep.h Fri May 26 15:55:03 2017 (r318954) @@ -54,11 +54,6 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, (((Elf_Addr (*)(void))ptr)()) /* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - -/* * TLS */ Modified: head/libexec/rtld-elf/riscv/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/riscv/rtld_machdep.h Fri May 26 15:53:27 2017 (r318953) +++ head/libexec/rtld-elf/riscv/rtld_machdep.h Fri May 26 15:55:03 2017 (r318954) @@ -80,11 +80,6 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, (((Elf_Addr (*)(void))ptr)()) /* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - -/* * TLS */ #define TLS_TP_OFFSET 0x0 From owner-svn-src-all@freebsd.org Fri May 26 15:56:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48B44D83A5C; Fri, 26 May 2017 15:56:30 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 234031AB4; Fri, 26 May 2017 15:56:30 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QFuTL8088312; Fri, 26 May 2017 15:56:29 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QFuSBF088306; Fri, 26 May 2017 15:56:28 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705261556.v4QFuSBF088306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 26 May 2017 15:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318955 - in head/lib/libthr: arch/aarch64/include arch/arm/include arch/mips/include arch/powerpc/include arch/riscv/include thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 15:56:30 -0000 Author: vangyzen Date: Fri May 26 15:56:28 2017 New Revision: 318955 URL: https://svnweb.freebsd.org/changeset/base/318955 Log: libthr: fix warnings at WARNS=6 Fix more warnings about redundant declarations. Reviewed by: kib emaste MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10932 Modified: head/lib/libthr/arch/aarch64/include/pthread_md.h head/lib/libthr/arch/arm/include/pthread_md.h head/lib/libthr/arch/mips/include/pthread_md.h head/lib/libthr/arch/powerpc/include/pthread_md.h head/lib/libthr/arch/riscv/include/pthread_md.h head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/arch/aarch64/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/aarch64/include/pthread_md.h Fri May 26 15:55:03 2017 (r318954) +++ head/lib/libthr/arch/aarch64/include/pthread_md.h Fri May 26 15:56:28 2017 (r318955) @@ -72,8 +72,6 @@ _tcb_get(void) return (tcb); } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: head/lib/libthr/arch/arm/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/arm/include/pthread_md.h Fri May 26 15:55:03 2017 (r318954) +++ head/lib/libthr/arch/arm/include/pthread_md.h Fri May 26 15:56:28 2017 (r318955) @@ -75,8 +75,6 @@ _tcb_get(void) #endif } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: head/lib/libthr/arch/mips/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/mips/include/pthread_md.h Fri May 26 15:55:03 2017 (r318954) +++ head/lib/libthr/arch/mips/include/pthread_md.h Fri May 26 15:56:28 2017 (r318955) @@ -120,8 +120,6 @@ _tcb_get(void) # endif /* ! __mips_n64 */ #endif /* ! TLS_USE_SYSARCH */ -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: head/lib/libthr/arch/powerpc/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/powerpc/include/pthread_md.h Fri May 26 15:55:03 2017 (r318954) +++ head/lib/libthr/arch/powerpc/include/pthread_md.h Fri May 26 15:56:28 2017 (r318955) @@ -80,8 +80,6 @@ _tcb_get(void) return ((struct tcb *)(_tp - TP_OFFSET)); } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: head/lib/libthr/arch/riscv/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/riscv/include/pthread_md.h Fri May 26 15:55:03 2017 (r318954) +++ head/lib/libthr/arch/riscv/include/pthread_md.h Fri May 26 15:56:28 2017 (r318955) @@ -78,8 +78,6 @@ _tcb_get(void) return ((struct tcb *)(_tp - TP_OFFSET)); } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Fri May 26 15:55:03 2017 (r318954) +++ head/lib/libthr/thread/thr_private.h Fri May 26 15:56:28 2017 (r318955) @@ -69,6 +69,9 @@ __NULLABILITY_PRAGMA_PUSH WEAK_REF(func, SYM_FBP10(sym)); \ SYM_DEFAULT(sym, SYM_FBP10(sym), FBSDprivate_1.0) +struct pthread; +extern struct pthread *_thr_initial __hidden; + #include "pthread_md.h" #include "thr_umtx.h" #include "thread_db.h" @@ -711,7 +714,6 @@ extern int __isthreaded; */ extern char *_usrstack __hidden; -extern struct pthread *_thr_initial __hidden; /* For debugger */ extern int _libthr_debug; From owner-svn-src-all@freebsd.org Fri May 26 15:57:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98C6CD83B00; Fri, 26 May 2017 15:57:55 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ABA21C7B; Fri, 26 May 2017 15:57:55 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QFvsml088402; Fri, 26 May 2017 15:57:54 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QFvsK2088401; Fri, 26 May 2017 15:57:54 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705261557.v4QFvsK2088401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 26 May 2017 15:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318956 - head/lib/libthr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 15:57:55 -0000 Author: vangyzen Date: Fri May 26 15:57:54 2017 New Revision: 318956 URL: https://svnweb.freebsd.org/changeset/base/318956 Log: libthr: increase WARNS to the default (6) ...and silence cast-align warnings from gcc. Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10935 Modified: head/lib/libthr/Makefile Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Fri May 26 15:56:28 2017 (r318955) +++ head/lib/libthr/Makefile Fri May 26 15:57:54 2017 (r318956) @@ -16,8 +16,8 @@ MK_SSP= no LIB=thr SHLIB_MAJOR= 3 -WARNS?= 3 NO_WTHREAD_SAFETY=1 +NO_WCAST_ALIGN.gcc=1 # for gcc 4.2 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ -I${SRCTOP}/include From owner-svn-src-all@freebsd.org Fri May 26 16:03:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 216B4D83D80; Fri, 26 May 2017 16:03:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2501121E; Fri, 26 May 2017 16:03:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QG3SZr092577; Fri, 26 May 2017 16:03:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QG3SH0092576; Fri, 26 May 2017 16:03:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705261603.v4QG3SH0092576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 26 May 2017 16:03:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318957 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 16:03:30 -0000 Author: emaste Date: Fri May 26 16:03:28 2017 New Revision: 318957 URL: https://svnweb.freebsd.org/changeset/base/318957 Log: rm stale ptrace dependencies after r305012 This is similar to r318912, except that ptrace.[sS] was previously a file in the source tree, not a generated assembly wrapper. Check for the existence of ptrace.[sS] in the .depend file to determine if we have to clean it up. This is a bit hackish and will not be left in place indefinitely, but provides a useful example case when investigating a better solution in bmake. Reviewed by: bdrewery Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10930 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri May 26 15:57:54 2017 (r318956) +++ head/Makefile.inc1 Fri May 26 16:03:28 2017 (r318957) @@ -710,6 +710,18 @@ _worldtmp: .PHONY # Dependencies cannot cope with certain source tree changes, particularly # with respect to removing source files and replacing generated files. # Handle these cases here in an ad-hoc fashion. +# 20160829 remove stale dependencies for ptrace stub, rewritten in C +# in r305012 +.for f in ptrace +.if exists(${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.o) + @if egrep -q '/${f}.[sS]' \ + ${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.o; then \ + echo Removing stale dependencies for ${f} syscall wrappers; \ + rm -f ${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.* \ + ${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/.depend.${f}.*; \ + fi +.endif +.endfor # 20170523 remove stale generated asm files for functions which are no longer # syscalls after r302092 (pipe) and r318736 (others) .for f in getdents lstat mknod pipe stat From owner-svn-src-all@freebsd.org Fri May 26 16:29:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE568D832C2; Fri, 26 May 2017 16:29:01 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B162B10FF; Fri, 26 May 2017 16:29:01 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QGT0Z6000800; Fri, 26 May 2017 16:29:00 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QGT0K9000794; Fri, 26 May 2017 16:29:00 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201705261629.v4QGT0K9000794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 26 May 2017 16:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318958 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 16:29:02 -0000 Author: tuexen Date: Fri May 26 16:29:00 2017 New Revision: 318958 URL: https://svnweb.freebsd.org/changeset/base/318958 Log: Use the SCTP_PCB_FLAGS_ACCEPTING flags to check for listeners. While there, use a macro for checking the listen state to allow for easier changes if required. This done to help glebius@ with his listen changes. Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri May 26 16:03:28 2017 (r318957) +++ head/sys/netinet/sctp_input.c Fri May 26 16:29:00 2017 (r318958) @@ -161,13 +161,11 @@ sctp_handle_init(struct mbuf *m, int iph *abort_no_unlock = 1; goto outnow; } - /* We are only accepting if we have a socket with positive - * so_qlimit. */ + /* We are only accepting if we have a listening socket. */ if ((stcb == NULL) && ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || - (inp->sctp_socket == NULL) || - (inp->sctp_socket->so_qlimit == 0))) { + (!SCTP_IS_LISTENING(inp)))) { /* * FIX ME ?? What about TCP model and we have a * match/restart case? Actually no fix is needed. the lookup @@ -1605,8 +1603,7 @@ sctp_process_cookie_existing(struct mbuf sctp_stop_all_cookie_timers(stcb); if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && - (inp->sctp_socket->so_qlimit == 0) - ) { + (!SCTP_IS_LISTENING(inp))) { #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -1806,7 +1803,7 @@ sctp_process_cookie_existing(struct mbuf if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && - (inp->sctp_socket->so_qlimit == 0)) { + (!SCTP_IS_LISTENING(inp))) { #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -2317,7 +2314,7 @@ sctp_process_cookie_new(struct mbuf *m, *notification = SCTP_NOTIFY_ASSOC_UP; if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && - (inp->sctp_socket->so_qlimit == 0)) { + (!SCTP_IS_LISTENING(inp))) { /* * This is an endpoint that called connect() how it got a * cookie that is NEW is a bit of a mystery. It must be that @@ -2343,7 +2340,7 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_SOCKET_UNLOCK(so, 1); #endif } else if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && - (inp->sctp_socket->so_qlimit)) { + (SCTP_IS_LISTENING(inp))) { /* * We don't want to do anything with this one. Since it is * the listening guy. The timer will get started for @@ -5205,7 +5202,9 @@ process_control_chunks: * longer listening. */ - if ((stcb == NULL) && (inp->sctp_socket->so_qlen >= inp->sctp_socket->so_qlimit)) { + if ((stcb == NULL) && + (!SCTP_IS_LISTENING(inp) || + inp->sctp_socket->so_qlen >= inp->sctp_socket->so_qlimit)) { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && (SCTP_BASE_SYSCTL(sctp_abort_if_one_2_one_hits_limit))) { op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Fri May 26 16:03:28 2017 (r318957) +++ head/sys/netinet/sctp_os_bsd.h Fri May 26 16:29:00 2017 (r318958) @@ -462,8 +462,6 @@ sctp_get_mbuf_for_msg(unsigned int space #define SCTP_SHA256_UPDATE SHA256_Update #define SCTP_SHA256_FINAL(x,y) SHA256_Final((caddr_t)x, y) -#endif - #define SCTP_DECREMENT_AND_CHECK_REFCOUNT(addr) (atomic_fetchadd_int(addr, -1) == 1) #if defined(INVARIANTS) #define SCTP_SAVE_ATOMIC_DECREMENT(addr, val) \ @@ -484,3 +482,7 @@ sctp_get_mbuf_for_msg(unsigned int space } \ } #endif + +#define SCTP_IS_LISTENING(inp) ((inp->sctp_flags & SCTP_PCB_FLAGS_ACCEPTING) != 0) + +#endif Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri May 26 16:03:28 2017 (r318957) +++ head/sys/netinet/sctp_output.c Fri May 26 16:29:00 2017 (r318958) @@ -12595,7 +12595,7 @@ sctp_lower_sosend(struct socket *so, (void *)addr, sndlen); if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && - (inp->sctp_socket->so_qlimit)) { + SCTP_IS_LISTENING(inp)) { /* The listener can NOT send */ SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOTCONN); error = ENOTCONN; Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Fri May 26 16:03:28 2017 (r318957) +++ head/sys/netinet/sctp_pcb.c Fri May 26 16:29:00 2017 (r318958) @@ -1311,7 +1311,7 @@ sctp_findassociation_ep_addr(struct sctp * it is the acceptor, then do the special_lookup to hash * and find the real inp. */ - if ((inp->sctp_socket) && (inp->sctp_socket->so_qlimit)) { + if ((inp->sctp_socket) && SCTP_IS_LISTENING(inp)) { /* to is peer addr, from is my addr */ stcb = sctp_tcb_special_locate(inp_p, remote, local, netp, inp->def_vrf_id); @@ -1884,7 +1884,7 @@ sctp_swap_inpcb_for_listen(struct sctp_i if (tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { continue; } - if (tinp->sctp_socket->so_qlimit) { + if (SCTP_IS_LISTENING(tinp)) { continue; } SCTP_INP_WLOCK(tinp); Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Fri May 26 16:03:28 2017 (r318957) +++ head/sys/netinet/sctp_sysctl.c Fri May 26 16:29:00 2017 (r318958) @@ -410,6 +410,7 @@ sctp_sysctl_handle_assoclist(SYSCTL_HAND xinpcb.socket = inp->sctp_socket; so = inp->sctp_socket; if ((so == NULL) || + (!SCTP_IS_LISTENING(inp)) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE)) { xinpcb.qlen = 0; xinpcb.maxqlen = 0; Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Fri May 26 16:03:28 2017 (r318957) +++ head/sys/netinet/sctp_usrreq.c Fri May 26 16:29:00 2017 (r318958) @@ -7039,7 +7039,7 @@ sctp_listen(struct socket *so, int backl if (tinp && (tinp != inp) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) == 0) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && - (tinp->sctp_socket->so_qlimit)) { + (SCTP_IS_LISTENING(tinp))) { /* * we have a listener already and * its not this inp. @@ -7083,7 +7083,7 @@ sctp_listen(struct socket *so, int backl if (tinp && (tinp != inp) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) == 0) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && - (tinp->sctp_socket->so_qlimit)) { + (SCTP_IS_LISTENING(tinp))) { /* * we have a listener already and its not * this inp. @@ -7137,6 +7137,7 @@ sctp_listen(struct socket *so, int backl return (error); } } + SCTP_INP_WLOCK(inp); SOCK_LOCK(so); /* It appears for 7.0 and on, we must always call this. */ solisten_proto(so, backlog); @@ -7144,11 +7145,13 @@ sctp_listen(struct socket *so, int backl /* remove the ACCEPTCONN flag for one-to-many sockets */ so->so_options &= ~SO_ACCEPTCONN; } - if (backlog == 0) { - /* turning off listen */ - so->so_options &= ~SO_ACCEPTCONN; + if (backlog > 0) { + inp->sctp_flags |= SCTP_PCB_FLAGS_ACCEPTING; + } else { + inp->sctp_flags &= ~SCTP_PCB_FLAGS_ACCEPTING; } SOCK_UNLOCK(so); + SCTP_INP_WUNLOCK(inp); return (error); } From owner-svn-src-all@freebsd.org Fri May 26 16:29:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52BD9D8335C; Fri, 26 May 2017 16:29:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2346B129F; Fri, 26 May 2017 16:29:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QGTuKT000869; Fri, 26 May 2017 16:29:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QGTuLc000868; Fri, 26 May 2017 16:29:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705261629.v4QGTuLc000868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 26 May 2017 16:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318959 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 16:29:57 -0000 Author: dim Date: Fri May 26 16:29:55 2017 New Revision: 318959 URL: https://svnweb.freebsd.org/changeset/base/318959 Log: Define a new __INO64 macro in , to indicate the system uses 64-bit inode numbers. Programs can use this to avoid including , with its associated namespace pollution. Reviewed by: kib Modified: head/sys/sys/_types.h Modified: head/sys/sys/_types.h ============================================================================== --- head/sys/sys/_types.h Fri May 26 16:29:00 2017 (r318958) +++ head/sys/sys/_types.h Fri May 26 16:29:55 2017 (r318959) @@ -120,4 +120,11 @@ typedef union { typedef __uintmax_t __rman_res_t; +/* + * When the following macro is defined, the system uses 64-bit inode numbers. + * Programs can use this to avoid including , with its associated + * namespace pollution. + */ +#define __INO64 + #endif /* !_SYS__TYPES_H_ */ From owner-svn-src-all@freebsd.org Fri May 26 16:36:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5675BD8359D; Fri, 26 May 2017 16:36:32 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 229F61766; Fri, 26 May 2017 16:36:32 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QGaVq4004780; Fri, 26 May 2017 16:36:31 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QGaU5L004774; Fri, 26 May 2017 16:36:30 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201705261636.v4QGaU5L004774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 26 May 2017 16:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318960 - in head/usr.sbin/newsyslog: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 16:36:32 -0000 Author: dab Date: Fri May 26 16:36:30 2017 New Revision: 318960 URL: https://svnweb.freebsd.org/changeset/base/318960 Log: Add newsyslog capability to write RFC5424 compliant rotation message. This modification adds the capability to newsyslog to write the rotation message in a format that is compliant with RFC5424. This capability is enabled on a per-log file basis through a new value ("T") in the flags field in newsyslog.conf. This is useful on systems that use the RFC5424 format for log files so that the rotation message format matches that of the other log messages. There has been recent mention of adding an RFC5424 compliant mode to syslogd and at least one alternative system log daemon (rsyslogd) that already has the capability to use that format. Reviewed by: vangyzen, ngie Approved by: vangyzen (mentor) MFC after: 2 months Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10253 Modified: head/usr.sbin/newsyslog/extern.h head/usr.sbin/newsyslog/newsyslog.8 head/usr.sbin/newsyslog/newsyslog.c head/usr.sbin/newsyslog/newsyslog.conf.5 head/usr.sbin/newsyslog/ptimes.c head/usr.sbin/newsyslog/tests/legacy_test.sh Modified: head/usr.sbin/newsyslog/extern.h ============================================================================== --- head/usr.sbin/newsyslog/extern.h Fri May 26 16:29:55 2017 (r318959) +++ head/usr.sbin/newsyslog/extern.h Fri May 26 16:36:30 2017 (r318960) @@ -60,6 +60,8 @@ int ptime_free(struct ptime_data *_pti int ptime_relparse(struct ptime_data *_ptime, int _parseopts, time_t _basetime, const char *_str); const char *ptimeget_ctime(const struct ptime_data *_ptime); +char *ptimeget_ctime_rfc5424(const struct ptime_data *_ptime, + char *timebuf, size_t bufsize); double ptimeget_diff(const struct ptime_data *_minuend, const struct ptime_data *_subtrahend); time_t ptimeget_secs(const struct ptime_data *_ptime); Modified: head/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.8 Fri May 26 16:29:55 2017 (r318959) +++ head/usr.sbin/newsyslog/newsyslog.8 Fri May 26 16:36:30 2017 (r318960) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd April 15, 2017 +.Dd May 19, 2017 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -125,7 +125,8 @@ reasons for either trimming that log or Cause .Nm not to trim the logs, but to print out what it would do if this option -were not specified. This option implies the +were not specified. +This option implies the .Fl r option. .It Fl r Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Fri May 26 16:29:55 2017 (r318959) +++ head/usr.sbin/newsyslog/newsyslog.c Fri May 26 16:36:30 2017 (r318960) @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -132,6 +133,8 @@ __FBSDID("$FreeBSD$"); #define CE_NODUMP 0x0200 /* Set 'nodump' on newly created log file. */ #define CE_PID2CMD 0x0400 /* Replace PID file with a shell command.*/ +#define CE_RFC5424 0x0800 /* Use RFC5424 format rotation message */ + #define MIN_PID 5 /* Don't touch pids lower than this */ #define MAX_PID 99999 /* was lower, see /usr/include/sys/proc.h */ @@ -247,6 +250,15 @@ static struct ptime_data *timenow; /* Th #define DAYTIME_LEN 16 static char daytime[DAYTIME_LEN];/* The current time in human readable form, * used for rotation-tracking messages. */ + +/* Another buffer to hold the current time in RFC5424 format. Fractional + * seconds are allowed by the RFC, but are not included in the + * rotation-tracking messages written by newsyslog and so are not accounted for + * in the length below. + */ +#define DAYTIME_RFC5424_LEN sizeof("YYYY-MM-DDTHH:MM:SS+00:00") +static char daytime_rfc5424[DAYTIME_RFC5424_LEN]; + static char hostname[MAXHOSTNAMELEN]; /* hostname */ static const char *path_syslogpid = _PATH_SYSLOGPID; @@ -630,6 +642,7 @@ parse_args(int argc, char **argv) timenow = ptime_init(NULL); ptimeset_time(timenow, time(NULL)); strlcpy(daytime, ptimeget_ctime(timenow) + 4, DAYTIME_LEN); + ptimeget_ctime_rfc5424(timenow, daytime_rfc5424, DAYTIME_RFC5424_LEN); /* Let's get our hostname */ (void)gethostname(hostname, sizeof(hostname)); @@ -1296,11 +1309,14 @@ no_trimat: case 'r': working->flags |= CE_PID2CMD; break; + case 't': + working->flags |= CE_RFC5424; + break; case 'u': working->flags |= CE_SIGNALGROUP; break; case 'w': - /* Depreciated flag - keep for compatibility purposes */ + /* Deprecated flag - keep for compatibility purposes */ break; case 'x': working->compress = COMPRESS_XZ; @@ -2101,7 +2117,7 @@ save_sigwork(const struct conf_entry *en tmpsiz = sizeof(struct sigwork_entry) + strlen(ent->pid_cmd_file) + 1; stmp = malloc(tmpsiz); - + stmp->sw_runcmd = 0; /* If this is a command to run we just set the flag and run command */ if (ent->flags & CE_PID2CMD) { @@ -2257,15 +2273,34 @@ log_trim(const char *logname, const stru xtra = ""; if (log_ent->def_cfg) xtra = " using rule"; - if (log_ent->firstcreate) - fprintf(f, "%s %s newsyslog[%d]: logfile first created%s\n", - daytime, hostname, (int) getpid(), xtra); - else if (log_ent->r_reason != NULL) - fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s%s\n", - daytime, hostname, (int) getpid(), log_ent->r_reason, xtra); - else - fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s\n", - daytime, hostname, (int) getpid(), xtra); + if (log_ent->flags & CE_RFC5424) { + if (log_ent->firstcreate) { + fprintf(f, "<%d>1 %s %s newsyslog %d - - %s%s\n", + LOG_MAKEPRI(LOG_USER, LOG_INFO), + daytime_rfc5424, hostname, getpid(), + "logfile first created", xtra); + } else if (log_ent->r_reason != NULL) { + fprintf(f, "<%d>1 %s %s newsyslog %d - - %s%s%s\n", + LOG_MAKEPRI(LOG_USER, LOG_INFO), + daytime_rfc5424, hostname, getpid(), + "logfile turned over", log_ent->r_reason, xtra); + } else { + fprintf(f, "<%d>1 %s %s newsyslog %d - - %s%s\n", + LOG_MAKEPRI(LOG_USER, LOG_INFO), + daytime_rfc5424, hostname, getpid(), + "logfile turned over", xtra); + } + } else { + if (log_ent->firstcreate) + fprintf(f, "%s %s newsyslog[%d]: logfile first created%s\n", + daytime, hostname, getpid(), xtra); + else if (log_ent->r_reason != NULL) + fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s%s\n", + daytime, hostname, getpid(), log_ent->r_reason, xtra); + else + fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s\n", + daytime, hostname, getpid(), xtra); + } if (fclose(f) == EOF) err(1, "log_trim: fclose"); return (0); Modified: head/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.conf.5 Fri May 26 16:29:55 2017 (r318959) +++ head/usr.sbin/newsyslog/newsyslog.conf.5 Fri May 26 16:36:30 2017 (r318960) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd April 15, 2017 +.Dd May 19, 2017 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -242,7 +242,7 @@ rotate at the first day of every month a (i.e., the start of the day; same as .Li @01T00 ) .It Li $M5D6 -rotate on every 5th day of month at 6:00 +rotate on every fifth day of month at 6:00 (same as .Li @05T06 ) .El @@ -319,6 +319,11 @@ will run shell command defined in .Ar path_to_pid_cmd_file after rotation instead of trying to send signal to a process id stored in the file. +.It Cm T +if this flag is set the informational rotation message written to +the log file will be in the format specified by RFC5424. +Normally, the rotation message is written in the traditional (RFC3164) +syslog format. .It Cm U indicates that the file specified by .Ar path_to_pid_cmd_file @@ -395,6 +400,17 @@ entry: .Xr chown 8 , .Xr newsyslog 8 , .Xr syslogd 8 +.Pp +.Rs +.%A C. Lonvick +.%T The BSD syslog Protocol +.%O RFC3164 +.Re +.Rs +.%A R. Gerhards +.%T The Syslog Protocol +.%O RFC5424 +.Re .Sh HISTORY This manual page first appeared in .Fx 4.10 . Modified: head/usr.sbin/newsyslog/ptimes.c ============================================================================== --- head/usr.sbin/newsyslog/ptimes.c Fri May 26 16:29:55 2017 (r318959) +++ head/usr.sbin/newsyslog/ptimes.c Fri May 26 16:36:30 2017 (r318960) @@ -478,6 +478,75 @@ ptimeget_ctime(const struct ptime_data * return (ctime(&ptime->tsecs)); } +/* + * Generate a time of day string in an RFC5424 compatible format. Return a + * pointer to the buffer with the timestamp string or NULL if an error. If the + * time is not supplied, cannot be converted to local time, or the resulting + * string would overflow the buffer, the returned string will be the RFC5424 + * NILVALUE. + */ +char * +ptimeget_ctime_rfc5424(const struct ptime_data *ptime, + char *timebuf, size_t bufsize) +{ + static const char NILVALUE[] = {"-"}; /* RFC5424 specified NILVALUE */ + int chars; + struct tm tm; + int tz_hours; + int tz_mins; + long tz_offset; + char tz_sign; + + if (timebuf == NULL) { + return (NULL); + } + + if (bufsize < sizeof(NILVALUE)) { + return (NULL); + } + + /* + * Convert to localtime. RFC5424 mandates the use of the NILVALUE if + * the time cannot be obtained, so use that if there is an error in the + * conversion. + */ + if (ptime == NULL || localtime_r(&(ptime->tsecs), &tm) == NULL) { + strlcpy(timebuf, NILVALUE, bufsize); + return (timebuf); + } + + /* + * Convert the time to a string in RFC5424 format. The conversion + * cannot be done with strftime() because it cannot produce the correct + * timezone offset format. + */ + if (tm.tm_gmtoff < 0) { + tz_sign = '-'; + tz_offset = -tm.tm_gmtoff; + } else { + tz_sign = '+'; + tz_offset = tm.tm_gmtoff; + } + + tz_hours = tz_offset / 3600; + tz_mins = (tz_offset % 3600) / 60; + + chars = snprintf(timebuf, bufsize, + "%04d-%02d-%02d" /* date */ + "T%02d:%02d:%02d" /* time */ + "%c%02d:%02d", /* time zone offset */ + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec, + tz_sign, tz_hours, tz_mins); + + /* If the timestamp is too big for timebuf, return the NILVALUE. */ + if (chars >= (int)bufsize) { + strlcpy(timebuf, NILVALUE, bufsize); + } + + return (timebuf); +} + double ptimeget_diff(const struct ptime_data *minuend, const struct ptime_data *subtrahend) Modified: head/usr.sbin/newsyslog/tests/legacy_test.sh ============================================================================== --- head/usr.sbin/newsyslog/tests/legacy_test.sh Fri May 26 16:29:55 2017 (r318959) +++ head/usr.sbin/newsyslog/tests/legacy_test.sh Fri May 26 16:36:30 2017 (r318960) @@ -2,6 +2,15 @@ # $FreeBSD$ +# A regular expression matching the format of an RFC-5424 log line header, +# including the timestamp up through the seconds indicator; it does not include +# the (optional) timezone offset. +RFC5424_FMT='^<[0-9][0-9]*>1 [0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}' + +# A regular expression matching the format of an RFC-3164 (traditional syslog) +# log line header, including the timestamp. +RFC3164_FMT='^[A-Z][a-z]{2} [ 0-9][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2}' + COUNT=0 TMPDIR=$(pwd)/work if [ $? -ne 0 ]; then @@ -98,6 +107,32 @@ ckntfe() fi } +# Verify that the specified file has RFC-5424 rotation messages. +ckrfc5424() +{ + local lc=$(wc -l $1 | cut -w -f2) + local rc=$(grep -cE "${RFC5424_FMT}" $1) + if [ "$lc" -eq 0 -o "$rc" -eq 0 -o "$lc" -ne "$rc" ] + then + notok + else + ok + fi +} + + +# Verify that the specified file has RFC-3164 rotation messages. +ckrfc3164() +{ + local lc=$(wc -l $1 | cut -w -f2) + local rc=$(grep -cE "${RFC3164_FMT}" $1) + if [ "$lc" -eq 0 -o "$rc" -eq 0 -o "$lc" -ne "$rc" ] + then + notok + else + ok + fi +} # A part of a test succeeds @@ -381,6 +416,45 @@ tests_time_rotate() { tmpdir_clean } +tests_rfc5424() { + ext="$1" + dir="$2" + + if [ -n "$dir" ]; then + newsyslog_args=" -a ${dir}" + name_postfix="${ext} archive dir" + else + newsyslog_args="" + name_postfix="${ext}" + fi + + tmpdir_create + + begin "RFC-5424 - create file ${name_postfix}" -newdir + run_newsyslog -C + ckfe $LOGFNAME + cknt ${dir}${LOGFNAME}.0${ext} + ckfe $LOGFNAME5424 + cknt ${dir}${LOGFNAME5424}.0${ext} + ckrfc3164 ${LOGFNAME} + ckrfc5424 ${LOGFNAME5424} + end + + begin "RFC-5424 - rotate normal 1 ${name_postfix}" + run_newsyslog $newsyslog_args + ckfe ${LOGFNAME} + ckfe ${dir}${LOGFNAME}.0${ext} + ckfe $LOGFNAME5424 + ckfe ${dir}${LOGFNAME5424}.0${ext} + ckrfc3164 ${LOGFNAME} + ckrfc3164 ${dir}${LOGFNAME}.0${ext} + ckrfc5424 ${LOGFNAME5424} + ckrfc5424 ${dir}${LOGFNAME5424}.0${ext} + end + + tmpdir_clean +} + echo 1..126 mkdir -p ${TMPDIR} cd ${TMPDIR} @@ -388,6 +462,10 @@ cd ${TMPDIR} LOGFNAME=foo.log LOGFPATH=${TMPDIR}/log/${LOGFNAME} +# Log file for RFC-5424 testing +LOGFNAME5424=foo5424.log +LOGFPATH5424=${TMPDIR}/log/${LOGFNAME5424} + # Normal, no archive dir, keep X files echo "$LOGFPATH 640 0 * @T00 NC" > newsyslog.conf tests_normal_rotate_keepn 0 @@ -454,4 +532,9 @@ tests_time_rotate "gz" "${TMPDIR}/alog/" echo "$LOGFPATH 640 3 * @T00 NCJ" > newsyslog.conf tests_time_rotate "bz2" "${TMPDIR}/alog/" +# RFC-5424; Normal, no archive dir +echo "$LOGFPATH5424 640 3 * @T00 NCT" > newsyslog.conf +echo "$LOGFPATH 640 3 * @T00 NC" >> newsyslog.conf +tests_rfc5424 + rm -rf "${TMPDIR}" From owner-svn-src-all@freebsd.org Fri May 26 17:03:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DA59D83E62; Fri, 26 May 2017 17:03:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E2E81F4F; Fri, 26 May 2017 17:03:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id DCE5A10AFA2; Fri, 26 May 2017 13:03:26 -0400 (EDT) From: John Baldwin To: Michael Tuexen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318879 - in head: lib/libsysdecode usr.bin/truss Date: Fri, 26 May 2017 09:48:12 -0700 Message-ID: <2215249.57b5qTibQB@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705251427.v4PERsWK053449@repo.freebsd.org> References: <201705251427.v4PERsWK053449@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 26 May 2017 13:03:26 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 17:03:28 -0000 On Thursday, May 25, 2017 02:27:54 PM Michael Tuexen wrote: > Author: tuexen > Date: Thu May 25 14:27:54 2017 > New Revision: 318879 > URL: https://svnweb.freebsd.org/changeset/base/318879 > > Log: > Improve the decoding of the third argument of the socket() call. > > Decoding of the third argument depends on the first one. For doing this, > add a corresponding function to libsysdecode. > > Thanks to jhb@ for suggesting this. Thanks! -- John Baldwin From owner-svn-src-all@freebsd.org Fri May 26 17:11:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B82FED83060; Fri, 26 May 2017 17:11:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81B2113F0; Fri, 26 May 2017 17:11:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QHBR4v018147; Fri, 26 May 2017 17:11:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QHBRNo018145; Fri, 26 May 2017 17:11:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705261711.v4QHBRNo018145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 26 May 2017 17:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318961 - stable/11/usr.bin/truss X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 17:11:28 -0000 Author: jhb Date: Fri May 26 17:11:27 2017 New Revision: 318961 URL: https://svnweb.freebsd.org/changeset/base/318961 Log: MFC 315335,315336,315496,315497,315500,315502,315504,315509,315523,315524, 315525: Decode more system call arguments in truss. 315335: Remove duplicate argument from linux_stat64() decoding. 315336: Automate the handling of QUAD_ALIGN and QUAD_SLOTS. Previously, the offset in a system call description specified the array index of the start of a system call argument. For most system call arguments this was the same as the index of the argument in the function signature. 64-bit arguments (off_t and id_t values) passed on 32-bit platforms use two slots in the array however. This was handled by adding (QUAD_SLOTS - 1) to the slot indicies of any subsequent arguments after a 64-bit argument (though written as ("{ Quad, 1 }, { Int, 1 + QUAD_SLOTS }" rather than "{ Quad, 1 }, { Int, 2 + QUAD_SLOTS - 1 }"). If a system call contained multiple 64-bit arguments (such as posix_fadvise()), then additional arguments would need to use 'QUAD_SLOTS * 2' but remember to subtract 2 from the initial number, etc. In addition, 32-bit powerpc requires 64-bit arguments to be 64-bit aligned, so if the effective index in the array of a 64-bit argument is odd, it needs QUAD_ALIGN added to the current and any subsequent slots. However, if the effective index in the array of a 64-bit argument was even, QUAD_ALIGN was omitted. This approach was messy and error prone. This commit replaces it with automated pre-processing of the system call table to do fixups for 64-bit argument offsets. The offset in a system call description now indicates the index of an argument in the associated function call's signature. A fixup function is run against each decoded system call description during startup on 32-bit platforms. The fixup function maintains an 'offset' value which holds an offset to be added to each remaining system call argument's index. Initially offset is 0. When a 64-bit system call argument is encountered, the offset is first aligned to a 64-bit boundary (only on powerpc) and then incremented to account for the second argument slot used by the argument. This modified 'offset' is then applied to any remaining arguments. This approach does require a few things that were not previously required: 1) Each system call description must now list arguments in ascending order (existing ones all do) without using duplicate slots in the register array. A new assert() should catch any future descriptions which violate this rule. 2) A system call description is still permitted to omit arguments (though none currently do), but if the call accepts 64-bit arguments those cannot be omitted or incorrect results will be displated on 32-bit systems. 315496: Decode the arguments passed to cap_fcntls_get() and cap_fcntls_limit(). 315497: Decode arguments passed to posix_fadvise(). 315500: Decode file flags passed to *chflags*(). While here, decode arguments passed to fchflags() and chflagsat(). 315502: Decode flock() operation. 315504: Decode arguments passed to getfsstat(). Note that this does not yet decode the statfs structures returned by getfsstat(). 315509: Decode arguments passed to kldsym() and kldunloadf(). This does not currently decode the kld_sym_lookup structure passed to kldsym(). 315523: Add a Sizet type for 'size_t' values and use it instead of Int. Various size_t arguments were previously decoded as Int values instead which would have truncated values above 2^31 on 64-bit systems. 315524: Decode arguments to madvise(). 315525: Improve decoding of last arguments to ioctl() and sendto(). Decode the last argument to ioctl() as a pointer rather than an int. Eventually this could use 'int' for the _IOWINT() case and pointers for all others. The last argument to sendto() is a socklen_t value, not a pointer. Modified: stable/11/usr.bin/truss/syscall.h stable/11/usr.bin/truss/syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/truss/syscall.h ============================================================================== --- stable/11/usr.bin/truss/syscall.h Fri May 26 16:36:30 2017 (r318960) +++ stable/11/usr.bin/truss/syscall.h Fri May 26 17:11:27 2017 (r318961) @@ -45,6 +45,8 @@ enum Argtype { None = 1, Hex, Octal, Int Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, + CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, + Kldunloadflags, Sizet, Madvice, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: stable/11/usr.bin/truss/syscalls.c ============================================================================== --- stable/11/usr.bin/truss/syscalls.c Fri May 26 16:36:30 2017 (r318960) +++ stable/11/usr.bin/truss/syscalls.c Fri May 26 17:11:27 2017 (r318961) @@ -71,20 +71,6 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #include "syscall.h" -/* 64-bit alignment on 32-bit platforms. */ -#if !defined(__LP64__) && defined(__powerpc__) -#define QUAD_ALIGN 1 -#else -#define QUAD_ALIGN 0 -#endif - -/* Number of slots needed for a 64-bit argument. */ -#ifdef __LP64__ -#define QUAD_SLOTS 1 -#else -#define QUAD_SLOTS 2 -#endif - /* * This should probably be in its own file, sorted alphabetically. */ @@ -106,10 +92,17 @@ static struct syscall decoded_syscalls[] { Int, 3 } } }, { .name = "break", .ret_type = 1, .nargs = 1, .args = { { Ptr, 0 } } }, + { .name = "cap_fcntls_get", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CapFcntlRights | OUT, 1 } } }, + { .name = "cap_fcntls_limit", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CapFcntlRights, 1 } } }, { .name = "chdir", .ret_type = 1, .nargs = 1, .args = { { Name, 0 } } }, { .name = "chflags", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Hex, 1 } } }, + .args = { { Name | IN, 0 }, { FileFlags, 1 } } }, + { .name = "chflagsat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Name | IN, 1 }, { FileFlags, 2 }, + { Atflags, 3 } } }, { .name = "chmod", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "chown", .ret_type = 1, .nargs = 3, @@ -135,6 +128,8 @@ static struct syscall decoded_syscalls[] { .name = "faccessat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Accessmode, 2 }, { Atflags, 3 } } }, + { .name = "fchflags", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { FileFlags, 1 } } }, { .name = "fchmod", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Octal, 1 } } }, { .name = "fchmodat", .ret_type = 1, .nargs = 4, @@ -146,6 +141,8 @@ static struct syscall decoded_syscalls[] { Atflags, 4 } } }, { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, + { .name = "flock", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Flockop, 1 } } }, { .name = "fstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Stat | OUT, 1 } } }, { .name = "fstatat", .ret_type = 1, .nargs = 4, @@ -154,13 +151,15 @@ static struct syscall decoded_syscalls[] { .name = "fstatfs", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { StatFs | OUT, 1 } } }, { .name = "ftruncate", .ret_type = 1, .nargs = 2, - .args = { { Int | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, + .args = { { Int | IN, 0 }, { QuadHex | IN, 1 } } }, { .name = "futimens", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Timespec2 | IN, 1 } } }, { .name = "futimes", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Timeval2 | IN, 1 } } }, { .name = "futimesat", .ret_type = 1, .nargs = 3, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timeval2 | IN, 2 } } }, + { .name = "getfsstat", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Long, 1 }, { Getfsstatmode, 2 } } }, { .name = "getitimer", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Itimerval | OUT, 2 } } }, { .name = "getpeername", .ret_type = 1, .nargs = 3, @@ -178,7 +177,7 @@ static struct syscall decoded_syscalls[] { .name = "gettimeofday", .ret_type = 1, .nargs = 2, .args = { { Timeval | OUT, 0 }, { Ptr, 1 } } }, { .name = "ioctl", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Ioctl, 1 }, { Hex, 2 } } }, + .args = { { Int, 0 }, { Ioctl, 1 }, { Ptr, 2 } } }, { .name = "kevent", .ret_type = 1, .nargs = 6, .args = { { Int, 0 }, { Kevent, 1 }, { Int, 2 }, { Kevent | OUT, 3 }, { Int, 4 }, { Timespec, 5 } } }, @@ -194,12 +193,16 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 } } }, { .name = "kldstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Ptr, 1 } } }, + { .name = "kldsym", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Kldsymcmd, 1 }, { Ptr, 2 } } }, { .name = "kldunload", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, + { .name = "kldunloadf", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Kldunloadflags, 1 } } }, { .name = "kse_release", .ret_type = 0, .nargs = 1, .args = { { Timespec, 0 } } }, { .name = "lchflags", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Hex, 1 } } }, + .args = { { Name | IN, 0 }, { FileFlags, 1 } } }, { .name = "lchmod", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "lchown", .ret_type = 1, .nargs = 3, @@ -210,12 +213,13 @@ static struct syscall decoded_syscalls[] .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 }, { Atflags, 4 } } }, { .name = "lseek", .ret_type = 2, .nargs = 3, - .args = { { Int, 0 }, { QuadHex, 1 + QUAD_ALIGN }, - { Whence, 1 + QUAD_SLOTS + QUAD_ALIGN } } }, + .args = { { Int, 0 }, { QuadHex, 1 }, { Whence, 2 } } }, { .name = "lstat", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, { .name = "lutimes", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Timeval2 | IN, 1 } } }, + { .name = "madvise", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Sizet, 1 }, { Madvice, 2 } } }, { .name = "mkdir", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "mkdirat", .ret_type = 1, .nargs = 3, @@ -229,16 +233,16 @@ static struct syscall decoded_syscalls[] { .name = "mknodat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Int, 3 } } }, { .name = "mmap", .ret_type = 1, .nargs = 6, - .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, - { Int, 4 }, { QuadHex, 5 + QUAD_ALIGN } } }, + .args = { { Ptr, 0 }, { Sizet, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, + { Int, 4 }, { QuadHex, 5 } } }, { .name = "modfind", .ret_type = 1, .nargs = 1, .args = { { Name | IN, 0 } } }, { .name = "mount", .ret_type = 1, .nargs = 4, .args = { { Name, 0 }, { Name, 1 }, { Int, 2 }, { Ptr, 3 } } }, { .name = "mprotect", .ret_type = 1, .nargs = 3, - .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 } } }, + .args = { { Ptr, 0 }, { Sizet, 1 }, { Mprot, 2 } } }, { .name = "munmap", .ret_type = 1, .nargs = 2, - .args = { { Ptr, 0 }, { Int, 1 } } }, + .args = { { Ptr, 0 }, { Sizet, 1 } } }, { .name = "nanosleep", .ret_type = 1, .nargs = 1, .args = { { Timespec, 0 } } }, { .name = "open", .ret_type = 1, .nargs = 3, @@ -254,21 +258,22 @@ static struct syscall decoded_syscalls[] .args = { { Ptr, 0 }, { Pipe2, 1 } } }, { .name = "poll", .ret_type = 1, .nargs = 3, .args = { { Pollfd, 0 }, { Int, 1 }, { Int, 2 } } }, + { .name = "posix_fadvise", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { QuadHex, 1 }, { QuadHex, 2 }, + { Fadvice, 3 } } }, { .name = "posix_openpt", .ret_type = 1, .nargs = 1, .args = { { Open, 0 } } }, { .name = "procctl", .ret_type = 1, .nargs = 4, - .args = { { Idtype, 0 }, { Quad, 1 + QUAD_ALIGN }, - { Procctl, 1 + QUAD_ALIGN + QUAD_SLOTS }, - { Ptr, 2 + QUAD_ALIGN + QUAD_SLOTS } } }, + .args = { { Idtype, 0 }, { Quad, 1 }, { Procctl, 2 }, { Ptr, 3 } } }, { .name = "read", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 } } }, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Sizet, 2 } } }, { .name = "readlink", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Int, 2 } } }, + .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Sizet, 2 } } }, { .name = "readlinkat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name, 1 }, { Readlinkres | OUT, 2 }, - { Int, 3 } } }, + { Sizet, 3 } } }, { .name = "recvfrom", .ret_type = 1, .nargs = 6, - .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 }, { Hex, 3 }, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Sizet, 2 }, { Hex, 3 }, { Sockaddr | OUT, 4 }, { Ptr | OUT, 5 } } }, { .name = "rename", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Name, 1 } } }, @@ -282,8 +287,8 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 }, { Fd_set, 1 }, { Fd_set, 2 }, { Fd_set, 3 }, { Timeval, 4 } } }, { .name = "sendto", .ret_type = 1, .nargs = 6, - .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 }, { Hex, 3 }, - { Sockaddr | IN, 4 }, { Ptr | IN, 5 } } }, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Sizet, 2 }, { Hex, 3 }, + { Sockaddr | IN, 4 }, { Int | IN, 5 } } }, { .name = "setitimer", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Itimerval, 1 }, { Itimerval | OUT, 2 } } }, { .name = "setrlimit", .ret_type = 1, .nargs = 2, @@ -326,7 +331,7 @@ static struct syscall decoded_syscalls[] { .name = "thr_self", .ret_type = 1, .nargs = 1, .args = { { Ptr, 0 } } }, { .name = "truncate", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, + .args = { { Name | IN, 0 }, { QuadHex | IN, 1 } } }, #if 0 /* Does not exist */ { .name = "umount", .ret_type = 1, .nargs = 2, @@ -349,13 +354,10 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 }, { ExitStatus | OUT, 1 }, { Waitoptions, 2 }, { Rusage | OUT, 3 } } }, { .name = "wait6", .ret_type = 1, .nargs = 6, - .args = { { Idtype, 0 }, { Quad, 1 + QUAD_ALIGN }, - { ExitStatus | OUT, 1 + QUAD_ALIGN + QUAD_SLOTS }, - { Waitoptions, 2 + QUAD_ALIGN + QUAD_SLOTS }, - { Rusage | OUT, 3 + QUAD_ALIGN + QUAD_SLOTS }, - { Ptr, 4 + QUAD_ALIGN + QUAD_SLOTS } } }, + .args = { { Idtype, 0 }, { Quad, 1 }, { ExitStatus | OUT, 2 }, + { Waitoptions, 3 }, { Rusage | OUT, 4 }, { Ptr, 5 } } }, { .name = "write", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 } } }, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Sizet, 2 } } }, /* Linux ABI */ { .name = "linux_access", .ret_type = 1, .nargs = 2, @@ -374,11 +376,11 @@ static struct syscall decoded_syscalls[] { .name = "linux_open", .ret_type = 1, .nargs = 3, .args = { { Name, 0 }, { Hex, 1 }, { Octal, 2 } } }, { .name = "linux_readlink", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Name | OUT, 1 }, { Int, 2 } } }, + .args = { { Name, 0 }, { Name | OUT, 1 }, { Sizet, 2 } } }, { .name = "linux_socketcall", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { LinuxSockArgs, 1 } } }, - { .name = "linux_stat64", .ret_type = 1, .nargs = 3, - .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 } } }, + { .name = "linux_stat64", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, /* CloudABI system calls. */ { .name = "cloudabi_sys_clock_res_get", .ret_type = 1, .nargs = 1, @@ -811,14 +813,77 @@ print_mask_arg(bool (*decoder)(FILE *, i fprintf(fp, "|0x%x", rem); } +static void +print_mask_arg32(bool (*decoder)(FILE *, uint32_t, uint32_t *), FILE *fp, + uint32_t value) +{ + uint32_t rem; + + if (!decoder(fp, value, &rem)) + fprintf(fp, "0x%x", rem); + else if (rem != 0) + fprintf(fp, "|0x%x", rem); +} + +#ifndef __LP64__ +/* + * Add argument padding to subsequent system calls afater a Quad + * syscall arguments as needed. This used to be done by hand in the + * decoded_syscalls table which was ugly and error prone. It is + * simpler to do the fixup of offsets at initalization time than when + * decoding arguments. + */ +static void +quad_fixup(struct syscall *sc) +{ + int offset, prev; + u_int i; + + offset = 0; + prev = -1; + for (i = 0; i < sc->nargs; i++) { + /* This arg type is a dummy that doesn't use offset. */ + if ((sc->args[i].type & ARG_MASK) == PipeFds) + continue; + + assert(prev < sc->args[i].offset); + prev = sc->args[i].offset; + sc->args[i].offset += offset; + switch (sc->args[i].type & ARG_MASK) { + case Quad: + case QuadHex: +#ifdef __powerpc__ + /* + * 64-bit arguments on 32-bit powerpc must be + * 64-bit aligned. If the current offset is + * not aligned, the calling convention inserts + * a 32-bit pad argument that should be skipped. + */ + if (sc->args[i].offset % 2 == 1) { + sc->args[i].offset++; + offset++; + } +#endif + offset++; + default: + break; + } + } +} +#endif + void init_syscalls(void) { struct syscall *sc; STAILQ_INIT(&syscalls); - for (sc = decoded_syscalls; sc->name != NULL; sc++) + for (sc = decoded_syscalls; sc->name != NULL; sc++) { +#ifndef __LP64__ + quad_fixup(sc); +#endif STAILQ_INSERT_HEAD(&syscalls, sc, entries); + } } static struct syscall * @@ -1104,6 +1169,9 @@ print_arg(struct syscall_args *sc, unsig case Long: fprintf(fp, "%ld", args[sc->offset]); break; + case Sizet: + fprintf(fp, "%zu", (size_t)args[sc->offset]); + break; case Name: { /* NULL-terminated string. */ char *tmp2; @@ -1801,6 +1869,49 @@ print_arg(struct syscall_args *sc, unsig case Pipe2: print_mask_arg(sysdecode_pipe2_flags, fp, args[sc->offset]); break; + case CapFcntlRights: { + uint32_t rights; + + if (sc->type & OUT) { + if (get_struct(pid, (void *)args[sc->offset], &rights, + sizeof(rights)) == -1) { + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } + } else + rights = args[sc->offset]; + print_mask_arg32(sysdecode_cap_fcntlrights, fp, rights); + break; + } + case Fadvice: + print_integer_arg(sysdecode_fadvice, fp, args[sc->offset]); + break; + case FileFlags: { + fflags_t rem; + + if (!sysdecode_fileflags(fp, args[sc->offset], &rem)) + fprintf(fp, "0x%x", rem); + else if (rem != 0) + fprintf(fp, "|0x%x", rem); + break; + } + case Flockop: + print_mask_arg(sysdecode_flock_operation, fp, args[sc->offset]); + break; + case Getfsstatmode: + print_integer_arg(sysdecode_getfsstat_mode, fp, + args[sc->offset]); + break; + case Kldsymcmd: + print_integer_arg(sysdecode_kldsym_cmd, fp, args[sc->offset]); + break; + case Kldunloadflags: + print_integer_arg(sysdecode_kldunload_flags, fp, + args[sc->offset]); + break; + case Madvice: + print_integer_arg(sysdecode_madvice, fp, args[sc->offset]); + break; case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); From owner-svn-src-all@freebsd.org Fri May 26 17:44:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BECDCD83674; Fri, 26 May 2017 17:44:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E1C612AA; Fri, 26 May 2017 17:44:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QHilde034077; Fri, 26 May 2017 17:44:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QHilml034076; Fri, 26 May 2017 17:44:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705261744.v4QHilml034076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 May 2017 17:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318962 - head/sys/cam/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 17:44:48 -0000 Author: avg Date: Fri May 26 17:44:47 2017 New Revision: 318962 URL: https://svnweb.freebsd.org/changeset/base/318962 Log: Allow PROBE_SPINUP to fail in CAM ATA transport The motivation for this is two-fold. 1. Some old WD SATA disks may appear as if they need to be spun up when they are already spinning. Those disks would respond with an error to the spin-up request. 2. Even if we really fail to spin up the disk, we still can try to proceed to the subsequent phases. If we fail later on, then no difference. Otherwise we get a chance to communicate with the disk which is better than completely ignoring it, because a user can try to recover the disk. Reviewed by: mav MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D10896 Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Fri May 26 17:11:27 2017 (r318961) +++ head/sys/cam/ata/ata_xpt.c Fri May 26 17:44:47 2017 (r318962) @@ -800,6 +800,16 @@ out: goto noerror; /* + * Some old WD SATA disks have broken SPINUP handling. + * If we really fail to spin up the disk, then there will be + * some media access errors later on, but at least we will + * have a device to interact with for recovery attempts. + */ + } else if (softc->action == PROBE_SPINUP && + status == CAM_ATA_STATUS_ERROR) { + goto noerror; + + /* * Some HP SATA disks report supported DMA Auto-Activation, * but return ABORT on attempt to enable it. */ From owner-svn-src-all@freebsd.org Fri May 26 19:02:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DD87D83AF5; Fri, 26 May 2017 19:02:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A2561FEF; Fri, 26 May 2017 19:02:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QJ2l34067290; Fri, 26 May 2017 19:02:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QJ2loW067289; Fri, 26 May 2017 19:02:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705261902.v4QJ2loW067289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 26 May 2017 19:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318963 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 19:02:48 -0000 Author: gjb Date: Fri May 26 19:02:46 2017 New Revision: 318963 URL: https://svnweb.freebsd.org/changeset/base/318963 Log: MFC r314935 (thompsa): Change ec2.conf to use the pkg tool from a chroot rather than trying to bootstrap it and fail from the livecd readonly filesystem. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/ec2.conf Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/tools/ec2.conf Directory Properties: stable/11/ (props changed) Modified: stable/10/release/tools/ec2.conf ============================================================================== --- stable/10/release/tools/ec2.conf Fri May 26 17:44:47 2017 (r318962) +++ stable/10/release/tools/ec2.conf Fri May 26 19:02:46 2017 (r318963) @@ -32,7 +32,8 @@ vm_extra_pre_umount() { # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. - env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg rm ${DESTDIR}/var/db/pkg/repo-*.sqlite # The size of the EC2 root disk can be configured at instance launch From owner-svn-src-all@freebsd.org Fri May 26 19:02:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71999D83AF9; Fri, 26 May 2017 19:02:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 415ED1FF0; Fri, 26 May 2017 19:02:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QJ2lZP067296; Fri, 26 May 2017 19:02:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QJ2lsn067295; Fri, 26 May 2017 19:02:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705261902.v4QJ2lsn067295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 26 May 2017 19:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318963 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 19:02:48 -0000 Author: gjb Date: Fri May 26 19:02:46 2017 New Revision: 318963 URL: https://svnweb.freebsd.org/changeset/base/318963 Log: MFC r314935 (thompsa): Change ec2.conf to use the pkg tool from a chroot rather than trying to bootstrap it and fail from the livecd readonly filesystem. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/ec2.conf Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/tools/ec2.conf Directory Properties: stable/10/ (props changed) Modified: stable/11/release/tools/ec2.conf ============================================================================== --- stable/11/release/tools/ec2.conf Fri May 26 17:44:47 2017 (r318962) +++ stable/11/release/tools/ec2.conf Fri May 26 19:02:46 2017 (r318963) @@ -32,7 +32,8 @@ vm_extra_pre_umount() { # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. - env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg rm ${DESTDIR}/var/db/pkg/repo-*.sqlite # The size of the EC2 root disk can be configured at instance launch From owner-svn-src-all@freebsd.org Fri May 26 19:19:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A25CD83DD2; Fri, 26 May 2017 19:19:49 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5DFC186C; Fri, 26 May 2017 19:19:48 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QJJleM071840; Fri, 26 May 2017 19:19:47 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QJJlhH071838; Fri, 26 May 2017 19:19:47 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705261919.v4QJJlhH071838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Fri, 26 May 2017 19:19:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318965 - stable/11/etc/rc.d X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 19:19:49 -0000 Author: n_hibma Date: Fri May 26 19:19:47 2017 New Revision: 318965 URL: https://svnweb.freebsd.org/changeset/base/318965 Log: MFC 317729: Silence sysctl in startup scripts. This makes 'stop' behave consistently with 'start' in the script. Also use $SYSCTL instead of sysctl for consistency within that script. Modified: stable/11/etc/rc.d/ipfw stable/11/etc/rc.d/routing Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.d/ipfw ============================================================================== --- stable/11/etc/rc.d/ipfw Fri May 26 19:11:24 2017 (r318964) +++ stable/11/etc/rc.d/ipfw Fri May 26 19:19:47 2017 (r318965) @@ -56,7 +56,7 @@ ipfw_start() # if checkyesno firewall_logging; then echo 'Firewall logging enabled.' - sysctl net.inet.ip.fw.verbose=1 >/dev/null + ${SYSCTL} net.inet.ip.fw.verbose=1 >/dev/null fi if checkyesno firewall_logif; then ifconfig ipfw0 create @@ -78,11 +78,11 @@ ipfw_poststart() # Enable the firewall # - if ! ${SYSCTL} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then + if ! ${SYSCTL} net.inet.ip.fw.enable=1 >/dev/null 2>&1; then warn "failed to enable IPv4 firewall" fi if afexists inet6; then - if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 + if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 >/dev/null 2>&1 then warn "failed to enable IPv6 firewall" fi @@ -95,9 +95,9 @@ ipfw_stop() # Disable the firewall # - ${SYSCTL} net.inet.ip.fw.enable=0 + ${SYSCTL} net.inet.ip.fw.enable=0 >/dev/null if afexists inet6; then - ${SYSCTL} net.inet6.ip6.fw.enable=0 + ${SYSCTL} net.inet6.ip6.fw.enable=0 >/dev/null fi # Stop firewall coscripts Modified: stable/11/etc/rc.d/routing ============================================================================== --- stable/11/etc/rc.d/routing Fri May 26 19:11:24 2017 (r318964) +++ stable/11/etc/rc.d/routing Fri May 26 19:19:47 2017 (r318965) @@ -286,7 +286,7 @@ static_inet6() esac ifconfig ${ipv6_default_interface} inet6 defaultif - sysctl net.inet6.ip6.use_defaultzone=1 + ${SYSCTL} net.inet6.ip6.use_defaultzone=1 > /dev/null } static_atm() From owner-svn-src-all@freebsd.org Fri May 26 20:15:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12BD9D831FA; Fri, 26 May 2017 20:15:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBA7C1C0F; Fri, 26 May 2017 20:15:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QKFXhf096293; Fri, 26 May 2017 20:15:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QKFXeK096292; Fri, 26 May 2017 20:15:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705262015.v4QKFXeK096292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 May 2017 20:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318966 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 20:15:35 -0000 Author: mav Date: Fri May 26 20:15:33 2017 New Revision: 318966 URL: https://svnweb.freebsd.org/changeset/base/318966 Log: Improve applying unified capabilities to the lagg ports. Some NICs have some capabilities dependent, so that disabling one require disabling some other (TXCSUM/RXCSUM on em). This code tries to reach the consensus more insistently. PR: 219453 MFC after: 1 week Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Fri May 26 19:19:47 2017 (r318965) +++ head/sys/net/if_lagg.c Fri May 26 20:15:33 2017 (r318966) @@ -572,24 +572,41 @@ static void lagg_capabilities(struct lagg_softc *sc) { struct lagg_port *lp; - int cap = ~0, ena = ~0; - u_long hwa = ~0UL; + int cap, ena, pena; + uint64_t hwa; struct ifnet_hw_tsomax hw_tsomax; LAGG_XLOCK_ASSERT(sc); - memset(&hw_tsomax, 0, sizeof(hw_tsomax)); + /* Get common enabled capabilities for the lagg ports */ + ena = ~0; + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) + ena &= lp->lp_ifp->if_capenable; + ena = (ena == ~0 ? 0 : ena); + + /* + * Apply common enabled capabilities back to the lagg ports. + * May require several iterations if they are dependent. + */ + do { + pena = ena; + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + lagg_setcaps(lp, ena); + ena &= lp->lp_ifp->if_capenable; + } + } while (pena != ena); - /* Get capabilities from the lagg ports */ + /* Get other capabilities from the lagg ports */ + cap = ~0; + hwa = ~(uint64_t)0; + memset(&hw_tsomax, 0, sizeof(hw_tsomax)); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { cap &= lp->lp_ifp->if_capabilities; - ena &= lp->lp_ifp->if_capenable; hwa &= lp->lp_ifp->if_hwassist; if_hw_tsomax_common(lp->lp_ifp, &hw_tsomax); } cap = (cap == ~0 ? 0 : cap); - ena = (ena == ~0 ? 0 : ena); - hwa = (hwa == ~0 ? 0 : hwa); + hwa = (hwa == ~(uint64_t)0 ? 0 : hwa); if (sc->sc_ifp->if_capabilities != cap || sc->sc_ifp->if_capenable != ena || @@ -604,10 +621,6 @@ lagg_capabilities(struct lagg_softc *sc) if_printf(sc->sc_ifp, "capabilities 0x%08x enabled 0x%08x\n", cap, ena); } - - /* Apply unified capabilities back to the lagg ports. */ - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) - lagg_setcaps(lp, ena); } static int From owner-svn-src-all@freebsd.org Fri May 26 20:20:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B536BD83440; Fri, 26 May 2017 20:20:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 909161F3F; Fri, 26 May 2017 20:20:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QKKekQ096649; Fri, 26 May 2017 20:20:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QKKecL096648; Fri, 26 May 2017 20:20:40 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705262020.v4QKKecL096648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 26 May 2017 20:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318967 - head/sys/dev/cxgbe/crypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 20:20:41 -0000 Author: jhb Date: Fri May 26 20:20:40 2017 New Revision: 318967 URL: https://svnweb.freebsd.org/changeset/base/318967 Log: Fail large requests with EFBIG. The adapter firmware in general does not accept PDUs larger than 64k - 1 bytes in size. Sending crypto requests larger than this size result in hangs or incorrect output, so reject them with EFBIG. For requests chaining an AES cipher with an HMAC, the firmware appears to require slightly smaller requests (around 512 bytes). Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_crypto.c Fri May 26 20:15:33 2017 (r318966) +++ head/sys/dev/cxgbe/crypto/t4_crypto.c Fri May 26 20:20:40 2017 (r318967) @@ -117,6 +117,13 @@ __FBSDID("$FreeBSD$"); #define MAX_RX_PHYS_DSGL_SGE 32 #define DSGL_SGE_MAXLEN 65535 +/* + * The adapter only supports requests with a total input or output + * length of 64k-1 or smaller. Longer requests either result in hung + * requests or incorrect results. + */ +#define MAX_REQUEST_SIZE 65535 + static MALLOC_DEFINE(M_CCR, "ccr", "Chelsio T6 crypto"); struct ccr_session_hmac { @@ -412,6 +419,12 @@ ccr_hmac(struct ccr_softc *sc, uint32_t u_int imm_len, iopad_size; int error, sgl_nsegs, sgl_len; + crd = crp->crp_desc; + + /* Reject requests with too large of an input buffer. */ + if (crd->crd_len > MAX_REQUEST_SIZE) + return (EFBIG); + axf = s->hmac.auth_hash; /* PADs must be 128-bit aligned. */ @@ -425,7 +438,6 @@ ccr_hmac(struct ccr_softc *sc, uint32_t hash_size_in_response = axf->hashsize; transhdr_len = HASH_TRANSHDR_SIZE(kctx_len); - crd = crp->crp_desc; if (ccr_use_imm_data(transhdr_len, crd->crd_len)) { imm_len = crd->crd_len; sgl_nsegs = 0; @@ -538,6 +550,10 @@ ccr_blkcipher(struct ccr_softc *sc, uint (crd->crd_len % AES_BLOCK_LEN) != 0) return (EINVAL); + /* Reject requests with too large of an input buffer. */ + if (crd->crd_len > MAX_REQUEST_SIZE) + return (EFBIG); + iv_loc = IV_NOP; if (crd->crd_flags & CRD_F_ENCRYPT) { op_type = CHCR_ENCRYPT_OP; @@ -785,6 +801,13 @@ ccr_authenc(struct ccr_softc *sc, uint32 * the hash when encrypting. For decryption it only contains * the plain text. */ + if (op_type == CHCR_ENCRYPT_OP) { + if (crde->crd_len + hash_size_in_response > MAX_REQUEST_SIZE) + return (EFBIG); + } else { + if (crde->crd_len > MAX_REQUEST_SIZE) + return (EFBIG); + } sglist_reset(sc->sg_dsgl); error = sglist_append_sglist(sc->sg_dsgl, sc->sg_crp, crde->crd_skip, crde->crd_len); @@ -824,6 +847,17 @@ ccr_authenc(struct ccr_softc *sc, uint32 } else aad_len = 0; input_len = aad_len + crde->crd_len; + + /* + * The firmware hangs if sent a request which is a + * bit smaller than MAX_REQUEST_SIZE. In particular, the + * firmware appears to require 512 - 16 bytes of spare room + * along with the size of the hash even if the hash isn't + * included in the input buffer. + */ + if (input_len + roundup2(axf->hashsize, 16) + (512 - 16) > + MAX_REQUEST_SIZE) + return (EFBIG); if (op_type == CHCR_DECRYPT_OP) input_len += hash_size_in_response; if (ccr_use_imm_data(transhdr_len, s->blkcipher.iv_len + input_len)) { @@ -1105,6 +1139,13 @@ ccr_gcm(struct ccr_softc *sc, uint32_t s * the tag when encrypting. For decryption it only contains * the plain text. */ + if (op_type == CHCR_ENCRYPT_OP) { + if (crde->crd_len + hash_size_in_response > MAX_REQUEST_SIZE) + return (EFBIG); + } else { + if (crde->crd_len > MAX_REQUEST_SIZE) + return (EFBIG); + } sglist_reset(sc->sg_dsgl); error = sglist_append_sglist(sc->sg_dsgl, sc->sg_crp, crde->crd_skip, crde->crd_len); @@ -1136,6 +1177,8 @@ ccr_gcm(struct ccr_softc *sc, uint32_t s input_len = crda->crd_len + crde->crd_len; if (op_type == CHCR_DECRYPT_OP) input_len += hash_size_in_response; + if (input_len > MAX_REQUEST_SIZE) + return (EFBIG); if (ccr_use_imm_data(transhdr_len, iv_len + input_len)) { imm_len = input_len; sgl_nsegs = 0; From owner-svn-src-all@freebsd.org Fri May 26 21:10:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE69DD830C0; Fri, 26 May 2017 21:10:02 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73D911769; Fri, 26 May 2017 21:10:02 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QLA17M017080; Fri, 26 May 2017 21:10:01 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QLA15h017078; Fri, 26 May 2017 21:10:01 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705262110.v4QLA15h017078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 26 May 2017 21:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318968 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 21:10:02 -0000 Author: brooks Date: Fri May 26 21:10:01 2017 New Revision: 318968 URL: https://svnweb.freebsd.org/changeset/base/318968 Log: Add missing usage and getopt(3) options - Add the missing option 'n' to the getopt(3) string - Add the missing options 'libxo' and 'N' to the usage message - Add the missing options 'M' and 'N' to the man-page Submitted by: Keegan Drake H.P. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10915 Modified: head/usr.bin/procstat/procstat.1 head/usr.bin/procstat/procstat.c Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Fri May 26 20:20:40 2017 (r318967) +++ head/usr.bin/procstat/procstat.1 Fri May 26 21:10:01 2017 (r318968) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 11, 2017 +.Dd May 26, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm .Op Fl -libxo .Op Fl CHhn +.Op Fl M Ar core +.Op Fl N Ar system .Op Fl w Ar interval .Op Fl b | c | e | f | i | j | k | l | L | r | s | S | t | v | x .Op Fl a | Ar pid | Ar core ... Modified: head/usr.bin/procstat/procstat.c ============================================================================== --- head/usr.bin/procstat/procstat.c Fri May 26 20:20:40 2017 (r318967) +++ head/usr.bin/procstat/procstat.c Fri May 26 21:10:01 2017 (r318968) @@ -50,10 +50,11 @@ static void usage(void) { - xo_error("usage: procstat [-CHhn] [-M core] [-N system] " - "[-w interval]\n" + xo_error("usage: procstat [--libxo] [-CHhn] [-M core] " + "[-N system] [-w interval]\n" " [-b | -c | -e | -f | -i | -j | -k | " - "-l | -r | -s | -S | -t | -v | -x]\n" + "-l | -L | -r | -s | \n" + " -S | -t | -v | -x]\n" " [-a | pid | core ...]\n"); xo_finish(); exit(EX_USAGE); @@ -164,7 +165,7 @@ main(int argc, char *argv[]) argc = xo_parse_args(argc, argv); xocontainer = "basic"; - while ((ch = getopt(argc, argv, "CHN:M:abcefijklLhrsStvw:x")) != -1) { + while ((ch = getopt(argc, argv, "abCcefHhijkLlM:N:nrSstvw:x")) != -1) { switch (ch) { case 'C': Cflag++; From owner-svn-src-all@freebsd.org Fri May 26 22:17:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 905D3D82A1D; Fri, 26 May 2017 22:17:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67E921B7F; Fri, 26 May 2017 22:17:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QMHjB1045280; Fri, 26 May 2017 22:17:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QMHiSd045273; Fri, 26 May 2017 22:17:44 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201705262217.v4QMHiSd045273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 26 May 2017 22:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318969 - in head: lib/libprocstat sys/kern sys/sys usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 22:17:46 -0000 Author: cem Date: Fri May 26 22:17:44 2017 New Revision: 318969 URL: https://svnweb.freebsd.org/changeset/base/318969 Log: procstat(1): Add TCP socket send/recv buffer size Add TCP socket send and receive buffer size to procstat -f output. Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D10689 Modified: head/lib/libprocstat/Symbol.map head/lib/libprocstat/libprocstat.c head/lib/libprocstat/libprocstat.h head/lib/libprocstat/libprocstat_compat.c head/sys/kern/sys_socket.c head/sys/sys/user.h head/usr.bin/procstat/procstat_files.c Modified: head/lib/libprocstat/Symbol.map ============================================================================== --- head/lib/libprocstat/Symbol.map Fri May 26 21:10:01 2017 (r318968) +++ head/lib/libprocstat/Symbol.map Fri May 26 22:17:44 2017 (r318969) @@ -6,7 +6,6 @@ FBSD_1.2 { procstat_freefiles; procstat_freeprocs; procstat_get_pipe_info; - procstat_get_socket_info; procstat_getfiles; procstat_getprocs; procstat_open_kvm; @@ -39,5 +38,6 @@ FBSD_1.5 { procstat_get_pts_info; procstat_get_sem_info; procstat_get_shm_info; + procstat_get_socket_info; procstat_get_vnode_info; }; Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Fri May 26 21:10:01 2017 (r318968) +++ head/lib/libprocstat/libprocstat.c Fri May 26 22:17:44 2017 (r318969) @@ -1497,6 +1497,8 @@ procstat_get_socket_info_kvm(kvm_t *kd, } else sock->inp_ppcb = (uintptr_t)inpcb.inp_ppcb; + sock->sendq = s.so_snd.sb_ccc; + sock->recvq = s.so_rcv.sb_ccc; } } break; @@ -1510,6 +1512,8 @@ procstat_get_socket_info_kvm(kvm_t *kd, sock->so_rcv_sb_state = s.so_rcv.sb_state; sock->so_snd_sb_state = s.so_snd.sb_state; sock->unp_conn = (uintptr_t)unpcb.unp_conn; + sock->sendq = s.so_snd.sb_ccc; + sock->recvq = s.so_rcv.sb_ccc; } } break; @@ -1556,17 +1560,22 @@ procstat_get_socket_info_sysctl(struct f switch(sock->dom_family) { case AF_INET: case AF_INET6: - if (sock->proto == IPPROTO_TCP) + if (sock->proto == IPPROTO_TCP) { sock->inp_ppcb = kif->kf_un.kf_sock.kf_sock_inpcb; + sock->sendq = kif->kf_un.kf_sock.kf_sock_sendq; + sock->recvq = kif->kf_un.kf_sock.kf_sock_recvq; + } break; case AF_UNIX: if (kif->kf_un.kf_sock.kf_sock_unpconn != 0) { - sock->so_rcv_sb_state = - kif->kf_un.kf_sock.kf_sock_rcv_sb_state; - sock->so_snd_sb_state = - kif->kf_un.kf_sock.kf_sock_snd_sb_state; - sock->unp_conn = - kif->kf_un.kf_sock.kf_sock_unpconn; + sock->so_rcv_sb_state = + kif->kf_un.kf_sock.kf_sock_rcv_sb_state; + sock->so_snd_sb_state = + kif->kf_un.kf_sock.kf_sock_snd_sb_state; + sock->unp_conn = + kif->kf_un.kf_sock.kf_sock_unpconn; + sock->sendq = kif->kf_un.kf_sock.kf_sock_sendq; + sock->recvq = kif->kf_un.kf_sock.kf_sock_recvq; } break; default: Modified: head/lib/libprocstat/libprocstat.h ============================================================================== --- head/lib/libprocstat/libprocstat.h Fri May 26 21:10:01 2017 (r318968) +++ head/lib/libprocstat/libprocstat.h Fri May 26 22:17:44 2017 (r318969) @@ -157,6 +157,8 @@ struct sockstat { struct sockaddr_storage sa_peer; /* Peer address. */ int type; char dname[32]; + unsigned int sendq; + unsigned int recvq; }; STAILQ_HEAD(filestat_list, filestat); Modified: head/lib/libprocstat/libprocstat_compat.c ============================================================================== --- head/lib/libprocstat/libprocstat_compat.c Fri May 26 21:10:01 2017 (r318968) +++ head/lib/libprocstat/libprocstat_compat.c Fri May 26 22:17:44 2017 (r318969) @@ -60,12 +60,29 @@ struct freebsd11_shmstat { uint16_t mode; }; +struct freebsd11_sockstat { + uint64_t inp_ppcb; + uint64_t so_addr; + uint64_t so_pcb; + uint64_t unp_conn; + int dom_family; + int proto; + int so_rcv_sb_state; + int so_snd_sb_state; + struct sockaddr_storage sa_local; /* Socket address. */ + struct sockaddr_storage sa_peer; /* Peer address. */ + int type; + char dname[32]; +}; + int freebsd11_procstat_get_pts_info(struct procstat *procstat, struct filestat *fst, struct freebsd11_ptsstat *pts, char *errbuf); int freebsd11_procstat_get_sem_info(struct procstat *procstat, struct filestat *fst, struct freebsd11_semstat *sem, char *errbuf); int freebsd11_procstat_get_shm_info(struct procstat *procstat, struct filestat *fst, struct freebsd11_shmstat *shm, char *errbuf); +int freebsd11_procstat_get_socket_info(struct procstat *procstat, + struct filestat *fst, struct freebsd11_sockstat *sock, char *errbuf); int freebsd11_procstat_get_vnode_info(struct procstat *procstat, struct filestat *fst, struct freebsd11_vnstat *vn, char *errbuf); @@ -116,6 +133,31 @@ freebsd11_procstat_get_shm_info(struct p } int +freebsd11_procstat_get_socket_info(struct procstat *procstat, struct filestat *fst, + struct freebsd11_sockstat *sock_compat, char *errbuf) +{ + struct sockstat sock; + int r; + + r = procstat_get_socket_info(procstat, fst, &sock, errbuf); + if (r != 0) + return (r); + sock_compat->inp_ppcb = sock.inp_ppcb; + sock_compat->so_addr = sock.so_addr; + sock_compat->so_pcb = sock.so_pcb; + sock_compat->unp_conn = sock.unp_conn; + sock_compat->dom_family = sock.dom_family; + sock_compat->proto = sock.proto; + sock_compat->so_rcv_sb_state = sock.so_rcv_sb_state; + sock_compat->so_snd_sb_state = sock.so_snd_sb_state; + sock_compat->sa_local = sock.sa_local; + sock_compat->sa_peer = sock.sa_peer; + sock_compat->type = sock.type; + memcpy(sock_compat->dname, sock.dname, sizeof(sock.dname)); + return (0); +} + +int freebsd11_procstat_get_vnode_info(struct procstat *procstat, struct filestat *fst, struct freebsd11_vnstat *vn_compat, char *errbuf) { @@ -138,6 +180,8 @@ freebsd11_procstat_get_vnode_info(struct } __sym_compat(procstat_get_pts_info, freebsd11_procstat_get_pts_info, FBSD_1.2); +__sym_compat(procstat_get_socket_info, freebsd11_procstat_get_socket_info, + FBSD_1.2); __sym_compat(procstat_get_vnode_info, freebsd11_procstat_get_vnode_info, FBSD_1.2); __sym_compat(procstat_get_sem_info, freebsd11_procstat_get_sem_info, FBSD_1.3); Modified: head/sys/kern/sys_socket.c ============================================================================== --- head/sys/kern/sys_socket.c Fri May 26 21:10:01 2017 (r318968) +++ head/sys/kern/sys_socket.c Fri May 26 22:17:44 2017 (r318969) @@ -359,6 +359,10 @@ soo_fill_kinfo(struct file *fp, struct k inpcb = (struct inpcb *)(so->so_pcb); kif->kf_un.kf_sock.kf_sock_inpcb = (uintptr_t)inpcb->inp_ppcb; + kif->kf_un.kf_sock.kf_sock_sendq = + sbused(&so->so_snd); + kif->kf_un.kf_sock.kf_sock_recvq = + sbused(&so->so_rcv); } } break; @@ -372,6 +376,10 @@ soo_fill_kinfo(struct file *fp, struct k so->so_rcv.sb_state; kif->kf_un.kf_sock.kf_sock_snd_sb_state = so->so_snd.sb_state; + kif->kf_un.kf_sock.kf_sock_sendq = + sbused(&so->so_snd); + kif->kf_un.kf_sock.kf_sock_recvq = + sbused(&so->so_rcv); } } break; Modified: head/sys/sys/user.h ============================================================================== --- head/sys/sys/user.h Fri May 26 21:10:01 2017 (r318968) +++ head/sys/sys/user.h Fri May 26 22:17:44 2017 (r318969) @@ -344,7 +344,8 @@ struct kinfo_file { int64_t kf_offset; /* Seek location. */ union { struct { - uint32_t kf_spareint; + /* Sendq size */ + uint32_t kf_sock_sendq; /* Socket domain. */ int kf_sock_domain0; /* Socket type. */ @@ -365,8 +366,8 @@ struct kinfo_file { uint16_t kf_sock_snd_sb_state; /* Receive buffer state. */ uint16_t kf_sock_rcv_sb_state; - /* Round to 64 bit alignment. */ - uint32_t kf_sock_pad0; + /* Recvq size. */ + uint32_t kf_sock_recvq; } kf_sock; struct { /* Vnode type. */ Modified: head/usr.bin/procstat/procstat_files.c ============================================================================== --- head/usr.bin/procstat/procstat_files.c Fri May 26 21:10:01 2017 (r318968) +++ head/usr.bin/procstat/procstat_files.c Fri May 26 22:17:44 2017 (r318969) @@ -534,6 +534,12 @@ procstat_files(struct procstat *procstat xo_emit("{:protocol/%-3s/%s} ", protocol_to_string(sock.dom_family, sock.type, sock.proto)); + if (sock.proto == IPPROTO_TCP || + sock.proto == IPPROTO_SCTP || + sock.type == SOCK_STREAM) { + xo_emit("{:sendq/%u} ", sock.sendq); + xo_emit("{:recvq/%u} ", sock.recvq); + } /* * While generally we like to print two addresses, * local and peer, for sockets, it turns out to be From owner-svn-src-all@freebsd.org Fri May 26 22:22:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B601D82C2D; Fri, 26 May 2017 22:22:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1ABA1FA5; Fri, 26 May 2017 22:22:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QMMnph049225; Fri, 26 May 2017 22:22:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QMMnLs049224; Fri, 26 May 2017 22:22:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705262222.v4QMMnLs049224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 May 2017 22:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318970 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 22:22:50 -0000 Author: mav Date: Fri May 26 22:22:48 2017 New Revision: 318970 URL: https://svnweb.freebsd.org/changeset/base/318970 Log: Call VLAN_CAPABILITIES() when LAGG capabilities change. This makes VLAN on top of LAGG to expose proper capabilities if they are changed after creation. MFC after: 1 week Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Fri May 26 22:17:44 2017 (r318969) +++ head/sys/net/if_lagg.c Fri May 26 22:22:48 2017 (r318970) @@ -901,6 +901,7 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon LAGG_XLOCK(sc); lagg_capabilities(sc); LAGG_XUNLOCK(sc); + VLAN_CAPABILITIES(sc->sc_ifp); break; case SIOCSIFMTU: @@ -1014,6 +1015,7 @@ lagg_port_ifdetach(void *arg __unused, s lp->lp_detaching = 1; lagg_port_destroy(lp, 1); LAGG_XUNLOCK(sc); + VLAN_CAPABILITIES(sc->sc_ifp); } static void @@ -1373,6 +1375,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd error = lagg_port_create(sc, tpif); LAGG_XUNLOCK(sc); if_rele(tpif); + VLAN_CAPABILITIES(ifp); break; case SIOCSLAGGDELPORT: error = priv_check(td, PRIV_NET_LAGG); @@ -1396,6 +1399,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd error = lagg_port_destroy(lp, 1); LAGG_XUNLOCK(sc); if_rele(tpif); + VLAN_CAPABILITIES(ifp); break; case SIOCSIFFLAGS: /* Set flags on ports too */ @@ -1446,6 +1450,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd } lagg_capabilities(sc); LAGG_XUNLOCK(sc); + VLAN_CAPABILITIES(ifp); error = 0; break; From owner-svn-src-all@freebsd.org Sat May 27 00:30:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EB26D82552; Sat, 27 May 2017 00:30:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE1F716BB; Sat, 27 May 2017 00:30:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R0UpTK002370; Sat, 27 May 2017 00:30:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R0UpRk002365; Sat, 27 May 2017 00:30:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705270030.v4R0UpRk002365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 27 May 2017 00:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318971 - in stable/11: lib/libc/gen lib/libc/sys sbin/zfsbootcfg share/man/man9 usr.sbin/efidp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 00:30:53 -0000 Author: gjb Date: Sat May 27 00:30:51 2017 New Revision: 318971 URL: https://svnweb.freebsd.org/changeset/base/318971 Log: MFC r318794, r318795: Update the "first appeared in" version in several manual pages. Sponsored by: The FreeBSD Foundation Modified: stable/11/lib/libc/gen/sem_timedwait.3 stable/11/lib/libc/sys/fsync.2 stable/11/sbin/zfsbootcfg/zfsbootcfg.8 stable/11/share/man/man9/mutex.9 stable/11/usr.sbin/efidp/efidp.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/sem_timedwait.3 ============================================================================== --- stable/11/lib/libc/gen/sem_timedwait.3 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/lib/libc/gen/sem_timedwait.3 Sat May 27 00:30:51 2017 (r318971) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2017 +.Dd May 24, 2017 .Dt SEM_TIMEDWAIT 3 .Os .Sh NAME @@ -160,4 +160,4 @@ function first appeared in The .Fn sem_clockwait_np function first appeared in -.Fx 12.0 . +.Fx 11.1 . Modified: stable/11/lib/libc/sys/fsync.2 ============================================================================== --- stable/11/lib/libc/sys/fsync.2 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/lib/libc/sys/fsync.2 Sat May 27 00:30:51 2017 (r318971) @@ -34,7 +34,7 @@ .\" @(#)fsync.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 17, 2016 +.Dd May 24, 2017 .Dt FSYNC 2 .Os .Sh NAME @@ -119,7 +119,7 @@ system call appeared in The .Fn fdatasync system call appeared in -.Fx 12.0 +.Fx 11.1 . .Sh BUGS The .Fn fdatasync Modified: stable/11/sbin/zfsbootcfg/zfsbootcfg.8 ============================================================================== --- stable/11/sbin/zfsbootcfg/zfsbootcfg.8 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/sbin/zfsbootcfg/zfsbootcfg.8 Sat May 27 00:30:51 2017 (r318971) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2016 +.Dd May 24, 2017 .Dt ZFSBOOTCFG 8 .Os .Sh NAME @@ -86,7 +86,7 @@ To clear the boot options: .Sh HISTORY .Nm appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS This manual page was written by .An Andriy Gapon Aq Mt avg@FreeBSD.org . Modified: stable/11/share/man/man9/mutex.9 ============================================================================== --- stable/11/share/man/man9/mutex.9 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/share/man/man9/mutex.9 Sat May 27 00:30:51 2017 (r318971) @@ -28,7 +28,7 @@ .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ .\" $FreeBSD$ .\" -.Dd July 18, 2016 +.Dd May 24, 2017 .Dt MUTEX 9 .Os .Sh NAME @@ -557,4 +557,4 @@ and The .Fn mtx_trylock_spin function was added in -.Fx 12.0 . +.Fx 11.1 . Modified: stable/11/usr.sbin/efidp/efidp.8 ============================================================================== --- stable/11/usr.sbin/efidp/efidp.8 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/usr.sbin/efidp/efidp.8 Sat May 27 00:30:51 2017 (r318971) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 5, 2017 +.Dd May 24, 2017 .Dt EFIDP 8 .Os .Sh NAME @@ -50,4 +50,4 @@ have the format described in RFC 4122. The .Nm utility first appeared in -.Fx 12.0 . +.Fx 11.1 . From owner-svn-src-all@freebsd.org Sat May 27 01:36:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5126D827D4; Sat, 27 May 2017 01:36:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C8AD1E98; Sat, 27 May 2017 01:36:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R1ZxmW026600; Sat, 27 May 2017 01:35:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R1ZxRG026597; Sat, 27 May 2017 01:35:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705270135.v4R1ZxRG026597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 27 May 2017 01:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318972 - stable/11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 01:36:00 -0000 Author: emaste Date: Sat May 27 01:35:59 2017 New Revision: 318972 URL: https://svnweb.freebsd.org/changeset/base/318972 Log: MFC r312599 (cem): Add remaining ELF compression definitions and structs PR: 219417 Modified: stable/11/sys/sys/elf32.h stable/11/sys/sys/elf64.h stable/11/sys/sys/elf_common.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/elf32.h ============================================================================== --- stable/11/sys/sys/elf32.h Sat May 27 00:30:51 2017 (r318971) +++ stable/11/sys/sys/elf32.h Sat May 27 01:35:59 2017 (r318972) @@ -254,4 +254,10 @@ typedef struct { Elf32_Half si_flags; /* per symbol flags */ } Elf32_Syminfo; +typedef struct { + Elf32_Word ch_type; + Elf32_Word ch_size; + Elf32_Word ch_addralign; +} Elf32_Chdr; + #endif /* !_SYS_ELF32_H_ */ Modified: stable/11/sys/sys/elf64.h ============================================================================== --- stable/11/sys/sys/elf64.h Sat May 27 00:30:51 2017 (r318971) +++ stable/11/sys/sys/elf64.h Sat May 27 01:35:59 2017 (r318972) @@ -257,4 +257,11 @@ typedef struct { Elf64_Half si_flags; /* per symbol flags */ } Elf64_Syminfo; +typedef struct { + Elf64_Word ch_type; + Elf64_Word ch_reserved; + Elf64_Xword ch_size; + Elf64_Xword ch_addralign; +} Elf64_Chdr; + #endif /* !_SYS_ELF64_H_ */ Modified: stable/11/sys/sys/elf_common.h ============================================================================== --- stable/11/sys/sys/elf_common.h Sat May 27 00:30:51 2017 (r318971) +++ stable/11/sys/sys/elf_common.h Sat May 27 01:35:59 2017 (r318972) @@ -849,6 +849,13 @@ typedef struct { #define SYMINFO_CURRENT 1 #define SYMINFO_NUM 2 +/* Values for ch_type (compressed section headers). */ +#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE */ +#define ELFCOMPRESS_LOOS 0x60000000 /* OS-specific */ +#define ELFCOMPRESS_HIOS 0x6fffffff +#define ELFCOMPRESS_LOPROC 0x70000000 /* Processor-specific */ +#define ELFCOMPRESS_HIPROC 0x7fffffff + /* * Relocation types. * From owner-svn-src-all@freebsd.org Sat May 27 02:05:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14C90D8313E; Sat, 27 May 2017 02:05:23 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDED814A6; Sat, 27 May 2017 02:05:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R25Leq038630; Sat, 27 May 2017 02:05:21 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R25LWu038629; Sat, 27 May 2017 02:05:21 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705270205.v4R25LWu038629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 27 May 2017 02:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318973 - head/contrib/ofed/libcxgb4/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 02:05:23 -0000 Author: np Date: Sat May 27 02:05:21 2017 New Revision: 318973 URL: https://svnweb.freebsd.org/changeset/base/318973 Log: libcxgb4: Use memcpy instead of copying WRs 8B at a time in the userspace RDMA library for cxgbe(4). MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/contrib/ofed/libcxgb4/src/qp.c Modified: head/contrib/ofed/libcxgb4/src/qp.c ============================================================================== --- head/contrib/ofed/libcxgb4/src/qp.c Sat May 27 01:35:59 2017 (r318972) +++ head/contrib/ofed/libcxgb4/src/qp.c Sat May 27 02:05:21 2017 (r318973) @@ -47,39 +47,49 @@ struct c4iw_stats c4iw_stats; static void copy_wr_to_sq(struct t4_wq *wq, union t4_wr *wqe, u8 len16) { - u64 *src, *dst; - - src = (u64 *)wqe; - dst = (u64 *)((u8 *)wq->sq.queue + wq->sq.wq_pidx * T4_EQ_ENTRY_SIZE); + void *src, *dst; + uintptr_t end; + int total, len; + + src = &wqe->flits[0]; + dst = &wq->sq.queue->flits[wq->sq.wq_pidx * + (T4_EQ_ENTRY_SIZE / sizeof(__be64))]; if (t4_sq_onchip(wq)) { len16 = align(len16, 4); wc_wmb(); } - while (len16) { - *dst++ = *src++; - if (dst == (u64 *)&wq->sq.queue[wq->sq.size]) - dst = (u64 *)wq->sq.queue; - *dst++ = *src++; - if (dst == (u64 *)&wq->sq.queue[wq->sq.size]) - dst = (u64 *)wq->sq.queue; - len16--; + + total = len16 * 16; + end = (uintptr_t)&wq->sq.queue[wq->sq.size]; + if (__predict_true((uintptr_t)dst + total <= end)) { + /* Won't wrap around. */ + memcpy(dst, src, total); + } else { + len = end - (uintptr_t)dst; + memcpy(dst, src, len); + memcpy(wq->sq.queue, src + len, total - len); } } static void copy_wr_to_rq(struct t4_wq *wq, union t4_recv_wr *wqe, u8 len16) { - u64 *src, *dst; - - src = (u64 *)wqe; - dst = (u64 *)((u8 *)wq->rq.queue + wq->rq.wq_pidx * T4_EQ_ENTRY_SIZE); - while (len16) { - *dst++ = *src++; - if (dst >= (u64 *)&wq->rq.queue[wq->rq.size]) - dst = (u64 *)wq->rq.queue; - *dst++ = *src++; - if (dst >= (u64 *)&wq->rq.queue[wq->rq.size]) - dst = (u64 *)wq->rq.queue; - len16--; + void *src, *dst; + uintptr_t end; + int total, len; + + src = &wqe->flits[0]; + dst = &wq->rq.queue->flits[wq->rq.wq_pidx * + (T4_EQ_ENTRY_SIZE / sizeof(__be64))]; + + total = len16 * 16; + end = (uintptr_t)&wq->rq.queue[wq->rq.size]; + if (__predict_true((uintptr_t)dst + total <= end)) { + /* Won't wrap around. */ + memcpy(dst, src, total); + } else { + len = end - (uintptr_t)dst; + memcpy(dst, src, len); + memcpy(wq->rq.queue, src + len, total - len); } } From owner-svn-src-all@freebsd.org Sat May 27 02:07:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB85AD83226; Sat, 27 May 2017 02:07:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B23715E0; Sat, 27 May 2017 02:07:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R27MWp038742; Sat, 27 May 2017 02:07:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R27MYZ038741; Sat, 27 May 2017 02:07:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705270207.v4R27MYZ038741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 27 May 2017 02:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318974 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 02:07:23 -0000 Author: emaste Date: Sat May 27 02:07:22 2017 New Revision: 318974 URL: https://svnweb.freebsd.org/changeset/base/318974 Log: uart: add AMT SOL PCI ID I adjusted the description to be similar to existing AMT entries. PR: 219384 Submitted by: "Tooker" MFC after: 1 week Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Sat May 27 02:05:21 2017 (r318973) +++ head/sys/dev/uart/uart_bus_pci.c Sat May 27 02:07:22 2017 (r318974) @@ -127,6 +127,7 @@ static const struct pci_id pci_ns8250_id 24 * DEFAULT_RCLK, 2 }, { 0x8086, 0x0f0c, 0xffff, 0, "Intel ValleyView LPIO1 HSUART#2", 0x10, 24 * DEFAULT_RCLK, 2 }, +{ 0x8086, 0x108f, 0xffff, 0, "Intel AMT - SOL", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, From owner-svn-src-all@freebsd.org Sat May 27 06:24:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81102D84B3D; Sat, 27 May 2017 06:24:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 531F4115F; Sat, 27 May 2017 06:24:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R6O6PS044167; Sat, 27 May 2017 06:24:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R6O6Lq044166; Sat, 27 May 2017 06:24:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705270624.v4R6O6Lq044166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 27 May 2017 06:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318975 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 06:24:07 -0000 Author: delphij Date: Sat May 27 06:24:06 2017 New Revision: 318975 URL: https://svnweb.freebsd.org/changeset/base/318975 Log: Tighten /entropy permissions. PR: 219527 Reported by: Lu Tung-Pin Submitted by: jilles MFC after: 3 days Modified: head/etc/rc.d/random Modified: head/etc/rc.d/random ============================================================================== --- head/etc/rc.d/random Sat May 27 02:07:22 2017 (r318974) +++ head/etc/rc.d/random Sat May 27 06:24:06 2017 (r318975) @@ -20,12 +20,14 @@ saveseed_cmd="${name}_stop" save_dev_random() { + oumask=`umask` + umask 077 for f ; do - if :>>"$f" ; then - debug "saving entropy to $f" - dd if=/dev/random of="$f" bs=4096 count=1 2>/dev/null - fi + debug "saving entropy to $f" + dd if=/dev/random of="$f" bs=4096 count=1 status=none && + chmod 600 "$f" done + umask ${oumask} } feed_dev_random() From owner-svn-src-all@freebsd.org Sat May 27 07:47:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C266AD8458C; Sat, 27 May 2017 07:47:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 841FD1834; Sat, 27 May 2017 07:47:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R7lri6076849; Sat, 27 May 2017 07:47:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R7lrMx076844; Sat, 27 May 2017 07:47:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270747.v4R7lrMx076844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 07:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318976 - in stable/11/sys: arm/arm arm64/arm64 mips/mips x86/x86 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 07:47:54 -0000 Author: hselasky Date: Sat May 27 07:47:52 2017 New Revision: 318976 URL: https://svnweb.freebsd.org/changeset/base/318976 Log: MFC r318353: Avoid use of contiguous memory allocations in busdma when possible. This patch improves the boundary checks in busdma to allow more cases using the regular page based kernel memory allocator. Especially in the case of having a non-zero boundary in the parent DMA tag. For example AMD64 based platforms set the PCI DMA tag boundary to PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous memory allocations to be preferred when allocating more than PAGE_SIZE bytes. Even if the required alignment was less than PAGE_SIZE bytes. This patch also fixes the nsegments check for using kmem_alloc_attr() when the maximum segment size is less than PAGE_SIZE bytes. Updated some comments describing the code in question. Differential Revision: https://reviews.freebsd.org/D10645 Reviewed by: kib, jhb, gallatin, scottl Sponsored by: Mellanox Technologies Modified: stable/11/sys/arm/arm/busdma_machdep-v4.c stable/11/sys/arm/arm/busdma_machdep-v6.c stable/11/sys/arm64/arm64/busdma_bounce.c stable/11/sys/mips/mips/busdma_machdep.c stable/11/sys/x86/x86/busdma_bounce.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/busdma_machdep-v4.c ============================================================================== --- stable/11/sys/arm/arm/busdma_machdep-v4.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/arm/arm/busdma_machdep-v4.c Sat May 27 07:47:52 2017 (r318976) @@ -736,8 +736,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { *vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/11/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- stable/11/sys/arm/arm/busdma_machdep-v6.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/arm/arm/busdma_machdep-v6.c Sat May 27 07:47:52 2017 (r318976) @@ -779,7 +779,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * (the allocator aligns buffers to their size boundaries). * - There's no need to handle lowaddr/highaddr exclusion zones. * else allocate non-contiguous pages if... - * - The page count that could get allocated doesn't exceed nsegments. + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. * - The alignment constraint isn't larger than a page boundary. * - There are no boundary-crossing constraints. * else allocate a block of contiguous pages because one or more of the @@ -788,8 +790,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !exclusion_bounce(dmat)) { *vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/11/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- stable/11/sys/arm64/arm64/busdma_bounce.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/arm64/arm64/busdma_bounce.c Sat May 27 07:47:52 2017 (r318976) @@ -461,22 +461,35 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm (*mapp)->flags = DMAMAP_FROM_DMAMEM; /* - * XXX: - * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact - * alignment guarantees of malloc need to be nailed down, and the - * code below should be rewritten to take that into account. + * Allocate the buffer from the malloc(9) allocator if... + * - It's small enough to fit into a single power of two sized bucket. + * - The alignment is less than or equal to the maximum size + * - The low address requirement is fulfilled. + * else allocate non-contiguous pages if... + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. + * - The alignment constraint isn't larger than a page boundary. + * - There are no boundary-crossing constraints. + * else allocate a block of contiguous pages because one or more of the + * constraints is something that only the contig allocator can fulfill. * - * In the meantime, we'll warn the user if malloc gets it wrong. + * NOTE: The (dmat->common.alignment <= dmat->maxsize) check + * below is just a quick hack. The exact alignment guarantees + * of malloc(9) need to be nailed down, and the code below + * should be rewritten to take that into account. + * + * In the meantime warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); - } else if (dmat->common.nsegments >= btoc(dmat->common.maxsize) && + } else if (dmat->common.nsegments >= + howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && - (dmat->common.boundary == 0 || - dmat->common.boundary >= dmat->common.lowaddr)) { + (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, Modified: stable/11/sys/mips/mips/busdma_machdep.c ============================================================================== --- stable/11/sys/mips/mips/busdma_machdep.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/mips/mips/busdma_machdep.c Sat May 27 07:47:52 2017 (r318976) @@ -680,7 +680,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * (the allocator aligns buffers to their size boundaries). * - There's no need to handle lowaddr/highaddr exclusion zones. * else allocate non-contiguous pages if... - * - The page count that could get allocated doesn't exceed nsegments. + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. * - The alignment constraint isn't larger than a page boundary. * - There are no boundary-crossing constraints. * else allocate a block of contiguous pages because one or more of the @@ -689,8 +691,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/11/sys/x86/x86/busdma_bounce.c ============================================================================== --- stable/11/sys/x86/x86/busdma_bounce.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/x86/x86/busdma_bounce.c Sat May 27 07:47:52 2017 (r318976) @@ -396,23 +396,36 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm else attr = VM_MEMATTR_DEFAULT; - /* - * XXX: - * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact - * alignment guarantees of malloc need to be nailed down, and the - * code below should be rewritten to take that into account. + /* + * Allocate the buffer from the malloc(9) allocator if... + * - It's small enough to fit into a single power of two sized bucket. + * - The alignment is less than or equal to the maximum size + * - The low address requirement is fulfilled. + * else allocate non-contiguous pages if... + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. + * - The alignment constraint isn't larger than a page boundary. + * - There are no boundary-crossing constraints. + * else allocate a block of contiguous pages because one or more of the + * constraints is something that only the contig allocator can fulfill. + * + * NOTE: The (dmat->common.alignment <= dmat->maxsize) check + * below is just a quick hack. The exact alignment guarantees + * of malloc(9) need to be nailed down, and the code below + * should be rewritten to take that into account. * - * In the meantime, we'll warn the user if malloc gets it wrong. + * In the meantime warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); - } else if (dmat->common.nsegments >= btoc(dmat->common.maxsize) && + } else if (dmat->common.nsegments >= + howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && - (dmat->common.boundary == 0 || - dmat->common.boundary >= dmat->common.lowaddr)) { + (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, From owner-svn-src-all@freebsd.org Sat May 27 08:18:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50F82D84EF3; Sat, 27 May 2017 08:18:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2931C165D; Sat, 27 May 2017 08:18:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R8I09n089098; Sat, 27 May 2017 08:18:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R8HxU1089091; Sat, 27 May 2017 08:17:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270817.v4R8HxU1089091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 08:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318977 - in stable/10/sys: arm/arm x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 08:18:01 -0000 Author: hselasky Date: Sat May 27 08:17:59 2017 New Revision: 318977 URL: https://svnweb.freebsd.org/changeset/base/318977 Log: MFC r318353: Avoid use of contiguous memory allocations in busdma when possible. This patch improves the boundary checks in busdma to allow more cases using the regular page based kernel memory allocator. Especially in the case of having a non-zero boundary in the parent DMA tag. For example AMD64 based platforms set the PCI DMA tag boundary to PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous memory allocations to be preferred when allocating more than PAGE_SIZE bytes. Even if the required alignment was less than PAGE_SIZE bytes. This patch also fixes the nsegments check for using kmem_alloc_attr() when the maximum segment size is less than PAGE_SIZE bytes. Updated some comments describing the code in question. Differential Revision: https://reviews.freebsd.org/D10645 Reviewed by: kib, jhb, gallatin, scottl Sponsored by: Mellanox Technologies Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c stable/10/sys/arm/arm/busdma_machdep.c stable/10/sys/x86/x86/busdma_bounce.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- stable/10/sys/arm/arm/busdma_machdep-v6.c Sat May 27 07:47:52 2017 (r318976) +++ stable/10/sys/arm/arm/busdma_machdep-v6.c Sat May 27 08:17:59 2017 (r318977) @@ -780,7 +780,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * (the allocator aligns buffers to their size boundaries). * - There's no need to handle lowaddr/highaddr exclusion zones. * else allocate non-contiguous pages if... - * - The page count that could get allocated doesn't exceed nsegments. + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. * - The alignment constraint isn't larger than a page boundary. * - There are no boundary-crossing constraints. * else allocate a block of contiguous pages because one or more of the @@ -789,8 +791,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !exclusion_bounce(dmat)) { *vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/10/sys/arm/arm/busdma_machdep.c ============================================================================== --- stable/10/sys/arm/arm/busdma_machdep.c Sat May 27 07:47:52 2017 (r318976) +++ stable/10/sys/arm/arm/busdma_machdep.c Sat May 27 08:17:59 2017 (r318977) @@ -749,8 +749,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/10/sys/x86/x86/busdma_bounce.c ============================================================================== --- stable/10/sys/x86/x86/busdma_bounce.c Sat May 27 07:47:52 2017 (r318976) +++ stable/10/sys/x86/x86/busdma_bounce.c Sat May 27 08:17:59 2017 (r318977) @@ -400,23 +400,36 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm else attr = VM_MEMATTR_DEFAULT; - /* - * XXX: - * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact - * alignment guarantees of malloc need to be nailed down, and the - * code below should be rewritten to take that into account. + /* + * Allocate the buffer from the malloc(9) allocator if... + * - It's small enough to fit into a single power of two sized bucket. + * - The alignment is less than or equal to the maximum size + * - The low address requirement is fulfilled. + * else allocate non-contiguous pages if... + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. + * - The alignment constraint isn't larger than a page boundary. + * - There are no boundary-crossing constraints. + * else allocate a block of contiguous pages because one or more of the + * constraints is something that only the contig allocator can fulfill. + * + * NOTE: The (dmat->common.alignment <= dmat->maxsize) check + * below is just a quick hack. The exact alignment guarantees + * of malloc(9) need to be nailed down, and the code below + * should be rewritten to take that into account. * - * In the meantime, we'll warn the user if malloc gets it wrong. + * In the meantime warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); - } else if (dmat->common.nsegments >= btoc(dmat->common.maxsize) && + } else if (dmat->common.nsegments >= + howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && - (dmat->common.boundary == 0 || - dmat->common.boundary >= dmat->common.lowaddr)) { + (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, From owner-svn-src-all@freebsd.org Sat May 27 08:25:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89111D81210; Sat, 27 May 2017 08:25:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39B601B1D; Sat, 27 May 2017 08:25:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R8P9FV092933; Sat, 27 May 2017 08:25:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R8P9L3092931; Sat, 27 May 2017 08:25:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270825.v4R8P9L3092931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 08:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318978 - in stable/11/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 08:25:10 -0000 Author: hselasky Date: Sat May 27 08:25:08 2017 New Revision: 318978 URL: https://svnweb.freebsd.org/changeset/base/318978 Log: MFC r318820: Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. Modified: stable/11/sys/dev/sound/pcm/feeder_mixer.c stable/11/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/pcm/feeder_mixer.c ============================================================================== --- stable/11/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:17:59 2017 (r318977) +++ stable/11/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:25:08 2017 (r318978) @@ -131,10 +131,10 @@ static struct feed_mixer_info feed_mixer sizeof(feed_mixer_info_tab[0]))) #define FEEDMIXER_DATA(i, c) ((void *) \ - ((uintptr_t)((((i) & 0x1f) << 5) | \ - ((c) & 0x1f)))) -#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 5) & 0x1f) -#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x1f) + ((uintptr_t)((((i) & 0x1f) << 7) | \ + ((c) & 0x7f)))) +#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 7) & 0x1f) +#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x7f) static int feed_mixer_init(struct pcm_feeder *f) Modified: stable/11/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/11/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:17:59 2017 (r318977) +++ stable/11/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:25:08 2017 (r318978) @@ -74,7 +74,7 @@ BEGIN { FXSHIFT = 16; FXONE = shl(1, FXSHIFT); - SND_CHN_MAX = 18; + SND_CHN_MAX = 127; PCM_8_BPS = 1; PCM_16_BPS = 2; @@ -103,9 +103,9 @@ BEGIN { printf("/*\n"); printf(" * Fast unsigned 32bit integer division and rounding, accurate for\n"); printf(" * x = 1 - %d. This table should be enough to handle possible\n", FXONE); - printf(" * division for 1 - 72 (more can be generated though..).\n"); + printf(" * division for 1 - 508 (more can be generated though..).\n"); printf(" *\n"); - printf(" * 72 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); + printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); From owner-svn-src-all@freebsd.org Sat May 27 08:27:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AE9BD8129D; Sat, 27 May 2017 08:27:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E61CE1C7F; Sat, 27 May 2017 08:27:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R8RB1t093060; Sat, 27 May 2017 08:27:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R8RBqp093058; Sat, 27 May 2017 08:27:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270827.v4R8RBqp093058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 08:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318979 - in stable/10/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 08:27:13 -0000 Author: hselasky Date: Sat May 27 08:27:11 2017 New Revision: 318979 URL: https://svnweb.freebsd.org/changeset/base/318979 Log: MFC r318820: Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. Modified: stable/10/sys/dev/sound/pcm/feeder_mixer.c stable/10/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/feeder_mixer.c ============================================================================== --- stable/10/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:25:08 2017 (r318978) +++ stable/10/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:27:11 2017 (r318979) @@ -131,10 +131,10 @@ static struct feed_mixer_info feed_mixer sizeof(feed_mixer_info_tab[0]))) #define FEEDMIXER_DATA(i, c) ((void *) \ - ((uintptr_t)((((i) & 0x1f) << 5) | \ - ((c) & 0x1f)))) -#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 5) & 0x1f) -#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x1f) + ((uintptr_t)((((i) & 0x1f) << 7) | \ + ((c) & 0x7f)))) +#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 7) & 0x1f) +#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x7f) static int feed_mixer_init(struct pcm_feeder *f) Modified: stable/10/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/10/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:25:08 2017 (r318978) +++ stable/10/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:27:11 2017 (r318979) @@ -74,7 +74,7 @@ BEGIN { FXSHIFT = 16; FXONE = shl(1, FXSHIFT); - SND_CHN_MAX = 18; + SND_CHN_MAX = 127; PCM_8_BPS = 1; PCM_16_BPS = 2; @@ -103,9 +103,9 @@ BEGIN { printf("/*\n"); printf(" * Fast unsigned 32bit integer division and rounding, accurate for\n"); printf(" * x = 1 - %d. This table should be enough to handle possible\n", FXONE); - printf(" * division for 1 - 72 (more can be generated though..).\n"); + printf(" * division for 1 - 508 (more can be generated though..).\n"); printf(" *\n"); - printf(" * 72 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); + printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); From owner-svn-src-all@freebsd.org Sat May 27 08:28:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 352E7D813E6; Sat, 27 May 2017 08:28:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1B791E08; Sat, 27 May 2017 08:28:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R8Sp6J093174; Sat, 27 May 2017 08:28:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R8SpKR093172; Sat, 27 May 2017 08:28:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270828.v4R8SpKR093172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 08:28:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318980 - in stable/9/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 08:28:53 -0000 Author: hselasky Date: Sat May 27 08:28:51 2017 New Revision: 318980 URL: https://svnweb.freebsd.org/changeset/base/318980 Log: MFC r318820: Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. Modified: stable/9/sys/dev/sound/pcm/feeder_mixer.c stable/9/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/pcm/feeder_mixer.c ============================================================================== --- stable/9/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:27:11 2017 (r318979) +++ stable/9/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:28:51 2017 (r318980) @@ -131,10 +131,10 @@ static struct feed_mixer_info feed_mixer sizeof(feed_mixer_info_tab[0]))) #define FEEDMIXER_DATA(i, c) ((void *) \ - ((uintptr_t)((((i) & 0x1f) << 5) | \ - ((c) & 0x1f)))) -#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 5) & 0x1f) -#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x1f) + ((uintptr_t)((((i) & 0x1f) << 7) | \ + ((c) & 0x7f)))) +#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 7) & 0x1f) +#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x7f) static int feed_mixer_init(struct pcm_feeder *f) Modified: stable/9/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/9/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:27:11 2017 (r318979) +++ stable/9/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:28:51 2017 (r318980) @@ -74,7 +74,7 @@ BEGIN { FXSHIFT = 16; FXONE = shl(1, FXSHIFT); - SND_CHN_MAX = 18; + SND_CHN_MAX = 127; PCM_8_BPS = 1; PCM_16_BPS = 2; @@ -103,9 +103,9 @@ BEGIN { printf("/*\n"); printf(" * Fast unsigned 32bit integer division and rounding, accurate for\n"); printf(" * x = 1 - %d. This table should be enough to handle possible\n", FXONE); - printf(" * division for 1 - 72 (more can be generated though..).\n"); + printf(" * division for 1 - 508 (more can be generated though..).\n"); printf(" *\n"); - printf(" * 72 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); + printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); From owner-svn-src-all@freebsd.org Sat May 27 08:30:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DBDCD815E7; Sat, 27 May 2017 08:30:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D31731017; Sat, 27 May 2017 08:30:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R8UWJU093321; Sat, 27 May 2017 08:30:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R8UWjV093319; Sat, 27 May 2017 08:30:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270830.v4R8UWjV093319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 08:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r318981 - in stable/8/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 08:30:34 -0000 Author: hselasky Date: Sat May 27 08:30:32 2017 New Revision: 318981 URL: https://svnweb.freebsd.org/changeset/base/318981 Log: MFC r318820: Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. Modified: stable/8/sys/dev/sound/pcm/feeder_mixer.c stable/8/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pcm/ (props changed) stable/8/sys/tools/ (props changed) Modified: stable/8/sys/dev/sound/pcm/feeder_mixer.c ============================================================================== --- stable/8/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:28:51 2017 (r318980) +++ stable/8/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:30:32 2017 (r318981) @@ -131,10 +131,10 @@ static struct feed_mixer_info feed_mixer sizeof(feed_mixer_info_tab[0]))) #define FEEDMIXER_DATA(i, c) ((void *) \ - ((uintptr_t)((((i) & 0x1f) << 5) | \ - ((c) & 0x1f)))) -#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 5) & 0x1f) -#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x1f) + ((uintptr_t)((((i) & 0x1f) << 7) | \ + ((c) & 0x7f)))) +#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 7) & 0x1f) +#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x7f) static int feed_mixer_init(struct pcm_feeder *f) Modified: stable/8/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/8/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:28:51 2017 (r318980) +++ stable/8/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:30:32 2017 (r318981) @@ -74,7 +74,7 @@ BEGIN { FXSHIFT = 16; FXONE = shl(1, FXSHIFT); - SND_CHN_MAX = 18; + SND_CHN_MAX = 127; PCM_8_BPS = 1; PCM_16_BPS = 2; @@ -103,9 +103,9 @@ BEGIN { printf("/*\n"); printf(" * Fast unsigned 32bit integer division and rounding, accurate for\n"); printf(" * x = 1 - %d. This table should be enough to handle possible\n", FXONE); - printf(" * division for 1 - 72 (more can be generated though..).\n"); + printf(" * division for 1 - 508 (more can be generated though..).\n"); printf(" *\n"); - printf(" * 72 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); + printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); From owner-svn-src-all@freebsd.org Sat May 27 10:50:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5DBBD83ED4; Sat, 27 May 2017 10:50:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E2331196; Sat, 27 May 2017 10:50:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RAoZXY051186; Sat, 27 May 2017 10:50:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RAoZDC051184; Sat, 27 May 2017 10:50:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271050.v4RAoZDC051184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 10:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318982 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 10:50:37 -0000 Author: bapt Date: Sat May 27 10:50:35 2017 New Revision: 318982 URL: https://svnweb.freebsd.org/changeset/base/318982 Log: Pass a "FREEBSD" user-class in PXE dhcp request rfc3004 allows to pass multiple user classes on dhcp requests this is used by dhcp servers to differentiate the caller if needed. As an example with isc dhcp server it will be possible to make options only for the FreeBSD loaders: if exists user-class and option user-class = "FREEBSD" { option root-path "tftp://192.168.42.1/FreeBSD; } Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D10951 Modified: head/lib/libstand/bootp.c head/lib/libstand/bootp.h Modified: head/lib/libstand/bootp.c ============================================================================== --- head/lib/libstand/bootp.c Sat May 27 08:30:32 2017 (r318981) +++ head/lib/libstand/bootp.c Sat May 27 10:50:35 2017 (r318982) @@ -146,16 +146,20 @@ bootp(int sock, int flag) bp->bp_vend[7] = TAG_CLASSID; bp->bp_vend[8] = 9; bcopy("PXEClient", &bp->bp_vend[9], 9); - bp->bp_vend[18] = TAG_PARAM_REQ; - bp->bp_vend[19] = 7; - bp->bp_vend[20] = TAG_ROOTPATH; - bp->bp_vend[21] = TAG_HOSTNAME; - bp->bp_vend[22] = TAG_SWAPSERVER; - bp->bp_vend[23] = TAG_GATEWAY; - bp->bp_vend[24] = TAG_SUBNET_MASK; - bp->bp_vend[25] = TAG_INTF_MTU; - bp->bp_vend[26] = TAG_SERVERID; - bp->bp_vend[27] = TAG_END; + bp->bp_vend[18] = TAG_USER_CLASS; + bp->bp_vend[19] = 8; + bp->bp_vend[20] = 7; + bcopy("FREEBSD", &bp->bp_vend[21], 7); + bp->bp_vend[28] = TAG_PARAM_REQ; + bp->bp_vend[29] = 7; + bp->bp_vend[30] = TAG_ROOTPATH; + bp->bp_vend[31] = TAG_HOSTNAME; + bp->bp_vend[32] = TAG_SWAPSERVER; + bp->bp_vend[33] = TAG_GATEWAY; + bp->bp_vend[34] = TAG_SUBNET_MASK; + bp->bp_vend[35] = TAG_INTF_MTU; + bp->bp_vend[36] = TAG_SERVERID; + bp->bp_vend[37] = TAG_END; } else bp->bp_vend[7] = TAG_END; #else Modified: head/lib/libstand/bootp.h ============================================================================== --- head/lib/libstand/bootp.h Sat May 27 08:30:32 2017 (r318981) +++ head/lib/libstand/bootp.h Sat May 27 10:50:35 2017 (r318982) @@ -108,6 +108,7 @@ struct bootp { #define TAG_T2 ((unsigned char) 59) #define TAG_CLASSID ((unsigned char) 60) #define TAG_CLIENTID ((unsigned char) 61) +#define TAG_USER_CLASS ((unsigned char) 77) #endif #define TAG_END ((unsigned char) 255) From owner-svn-src-all@freebsd.org Sat May 27 11:12:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75C68D83898; Sat, 27 May 2017 11:12:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F2A9110B; Sat, 27 May 2017 11:12:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RBCBV0063275; Sat, 27 May 2017 11:12:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RBCB9Y063274; Sat, 27 May 2017 11:12:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271112.v4RBCB9Y063274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 11:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318983 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 11:12:12 -0000 Author: bapt Date: Sat May 27 11:12:11 2017 New Revision: 318983 URL: https://svnweb.freebsd.org/changeset/base/318983 Log: MFC r318900: update pci_vendors to 2017.05.25 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Sat May 27 10:50:35 2017 (r318982) +++ stable/11/share/misc/pci_vendors Sat May 27 11:12:11 2017 (r318983) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.04.03 -# Date: 2017-04-03 03:15:02 +# Version: 2017.05.25 +# Date: 2017-05-25 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -76,16 +76,16 @@ 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. - 0105 Rhino R1T1 - 0205 Rhino R4FXO + 0105 R1T1 + 0205 R4FXO 0206 RCB4FXO 4-channel FXO analog telphony card - 0305 Rhino R4T1 - 0405 Rhino R8FXX + 0305 R4T1 + 0405 R8FXX 0406 RCB8FXX 8-channel modular analog telphony card - 0505 Rhino R24FXX + 0505 R24FXX 0506 RCB24FXS 24-Channel FXS analog telphony card - 0605 Rhino R2T1 - 0705 Rhino R24FXS + 0605 R2T1 + 0705 R24FXS 0706 RCB24FXO 24-Channel FXO analog telphony card 0905 R1T3 Single T3 Digital Telephony Card 0906 RCB24FXX 24-channel modular analog telphony card @@ -249,6 +249,7 @@ 0014 MegaRAID Tri-Mode SAS3516 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter + 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 0015 MegaRAID Tri-Mode SAS3416 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -430,6 +431,7 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 30c0 SAS 9201-16i 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] @@ -544,6 +546,7 @@ 0097 SAS3008 PCI-Express Fusion-MPT SAS-3 1000 3090 SAS9311-8i 1000 30e0 SAS9300-8i + 1000 3130 SAS 9300-16i 1028 1f45 HBA330 Adapter 1028 1f46 12Gbps HBA 1028 1f53 HBA330 Mini @@ -1100,7 +1103,7 @@ 1028 0085 Rage 3D LT Pro 4c46 Rage Mobility 128 AGP 2X/Mobility M3 1002 0155 IBM Thinkpad A22p - 1014 0155 IBM Thinkpad A22p + 1014 0155 Thinkpad A22p 1028 00b1 Latitude C600 4c47 3D Rage IIC PCI / Mobility Radeon 7500/7500C 4c49 3D Rage LT PRO PCI @@ -2213,6 +2216,7 @@ 1043 04a8 Radeon RX 480 1043 04b0 Radeon RX 470 1043 04fb Radeon RX 480 + 1043 04fd Radeon RX 480 8GB 1462 3411 Radeon RX 470 1462 3413 Radeon RX 480 148c 2372 Radeon RX 480 @@ -2939,7 +2943,7 @@ 6985 Polaris12 6986 Polaris12 6987 Polaris12 - 699f Polaris12 + 699f Lexa PRO [Radeon RX 550] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -3955,6 +3959,7 @@ 1438 Liverpool Processor Root Port 1439 Family 16h Processor Functions 5:1 145b Zeppelin Non-Transparent Bridge + 145c USB3 Host Controller 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4039,6 +4044,7 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) + 43bb USB 3.1 XHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -6025,9 +6031,9 @@ 1077 e4f8 FastLinQ QL45611H 100GbE Adapter (SR-IOV VF) 2020 ISP2020A Fast!SCSI Basic Adapter 2031 ISP8324-based 16Gb Fibre Channel to PCI Express Adapter - 103c 17e7 HP SN1000Q 16Gb Single Port Fibre Channel Adapter - 103c 17e8 HP SN1000Q 16Gb Dual Port Fibre Channel Adapter - 103c 1939 HP QMH2672 16Gb Dual Port Fibre Channel Adapter + 103c 17e7 SN1000Q 16Gb Single Port Fibre Channel Adapter + 103c 17e8 SN1000Q 16Gb Dual Port Fibre Channel Adapter + 103c 1939 QMH2672 16Gb Dual Port Fibre Channel Adapter 103c 8002 3830C 16G Fibre Channel Host Bus Adapter 2071 ISP2714-based 16/32Gb Fibre Channel to PCIe Adapter 1077 0283 QLE2764 Quad Port 32Gb Fibre Channel to PCIe Adapter @@ -6047,10 +6053,10 @@ 1077 02a8 QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter 1077 02ab QLE2740 Single Port 32Gb FC to PCIe Gen3 x8 Adapter 1077 02ac QLE2742 Dual Port 32Gb FC to PCIe Gen3 x8 Adapter - 1590 00f9 HPE StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter - 1590 00fa HPE StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter - 1590 0203 HPE StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter - 1590 0204 HPE StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter + 1590 00f9 StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter + 1590 00fa StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter + 1590 0203 StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter + 1590 0204 StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter 2300 QLA2300 64-bit Fibre Channel Adapter 2312 ISP2312-based 2Gb Fibre Channel to PCI-X HBA 103c 0131 2Gb Fibre Channel - Single port [A7538A] @@ -6065,7 +6071,7 @@ 103c 3262 StorageWorks 81Q 103c 3263 StorageWorks 82Q 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine - 1590 00fc HPE StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter + 1590 00fc StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter 3022 ISP4022-based Ethernet NIC 3032 ISP4032-based Ethernet IPv6 NIC 4010 ISP4010-based iSCSI TOE HBA @@ -8954,7 +8960,7 @@ 0396 G73 0397 G73M [GeForce Go 7700] 0398 G73M [GeForce Go 7600] - 1025 006c Acer 9814 WKMI + 1025 006c Aspire 9814WKMi 0399 G73M [GeForce Go 7600 GT] 039a G73M [Quadro NVS 300M] 039b G73M [GeForce Go 7900 SE] @@ -9912,6 +9918,7 @@ 0dfa GF108GLM [Quadro 1000M] 0dfc GF108GLM [NVS 5200M] 0e08 GF119 HDMI Audio Controller + 1043 83a0 ENGT520 SILENT # 1024MB with passive cooling (heatsink) 10b0 104a Gainward GeForce GT 610 0e09 GF110 High Definition Audio Controller @@ -10045,6 +10052,7 @@ 103a GK110GL [Quadro K6000] 103c GK110GL [Quadro K5200] 1040 GF119 [GeForce GT 520] + 1043 83a0 ENGT520 SILENT 1042 GF119 [GeForce 510] 1048 GF119 [GeForce 605] 1049 GF119 [GeForce GT 620 OEM] @@ -10694,6 +10702,7 @@ 17fd GM200GL [Tesla M40] 1b00 GP102 [TITAN X] 1b01 GP102 + 1b02 GP102 [TITAN Xp] 1b06 GP102 [GeForce GTX 1080 Ti] 1b30 GP102GL [Quadro P6000] 1b38 GP102GL [Tesla P40] @@ -10738,7 +10747,7 @@ 1cb1 GP107GL [Quardo P1000] 1cb2 GP107GL [Quardo P600] 1cb3 GP107GL [Quardo P400] - 1d01 GP108 + 1d01 GP108 [GeForce GT 1030] 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -10771,6 +10780,12 @@ e260 OneConnect FCoE Initiator (Lancer) e268 OneConnect 10Gb FCoE Converged Network Adapter (Lancer-VF) e300 Lancer Gen6: LPe32000 Fibre Channel Host Adapter + 10df e310 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e311 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e312 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e322 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e323 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e325 Lancer Gen6: LPe31000 Fibre Channel Host Adapter f011 Saturn: LightPulse Fibre Channel Host Adapter f015 Saturn: LightPulse Fibre Channel Host Adapter f085 LP850 Fibre Channel Host Adapter @@ -11562,8 +11577,8 @@ 1043 8095 A7V8X Motherboard (Realtek ALC650 codec) 1043 80a1 A7V8X-X Motherboard 1043 80b0 A7V600/K8V-X/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX]) - 1043 80f3 ASUSTek SK8V motherboard - 1043 810d Asus P5VD1-X (AD1888 codec [SoundMax]) + 1043 80f3 SK8V motherboard + 1043 810d P5VD1-X (AD1888 codec [SoundMax]) 1043 812a A8V Deluxe motherboard (Realtek ALC850 codec) 10ec 8168 High Definition Audio 1106 3059 L7VMM2 Motherboard @@ -12248,7 +12263,7 @@ 0070 6701 WinTV HVR-1110 1019 4cb5 Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) 1043 0210 FlyTV mini Asus Digimatrix - 1043 4843 ASUS TV-FM 7133 + 1043 4843 TV-FM 7133 1043 4845 TV-FM 7135 1043 4862 P7131 Dual 1043 4876 My Cinema-P7131 Hybrid @@ -12322,7 +12337,7 @@ 0000 4071 Behold TV 407 FM 1019 4cb4 Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) 1043 0210 Digimatrix TV - 1043 4840 ASUS TV-FM 7134 + 1043 4840 TV-FM 7134 1043 4842 TV-FM 7134 1131 0000 SAA713x-based TV tuner card 1131 2004 EUROPA V3 reference design @@ -13039,7 +13054,7 @@ 103c 30c1 Compaq 6910p 1043 1237 A6J-Q008 1043 1967 V6800V - 1043 1987 Asus A4K and Z81K notebooks, possibly others ( mid-2005 machines ) + 1043 1987 A4K and Z81K notebooks, possibly others ( mid-2005 machines ) 104d 80df Vaio PCG-FX403 104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP 104d 814e VAIO GRZ390Z @@ -13048,7 +13063,7 @@ 144d c00c P30/P35 notebook 14ef 0220 PCD-RP-220S 17aa 201c ThinkPad X60/X60s - 17aa 20c4 ThinkPad T61 + 17aa 20c4 ThinkPad T61/R61 17aa 20c6 ThinkPad R61 0477 RL5c477 0478 RL5c478 @@ -13098,7 +13113,7 @@ 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop 1043 1237 A6J-Q008 - 1043 1967 ASUS V6800V + 1043 1967 V6800V 10f7 8338 Panasonic CF-Y5 laptop 144d c018 X20 IV 17aa 201d ThinkPad X60/X60s @@ -13114,14 +13129,15 @@ 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop + 17aa 20c5 ThinkPad R61 17aa 20c7 ThinkPad R61 0841 R5C841 CardBus/SD/SDIO/MMC/MS/MSPro/xD/IEEE1394 0843 R5C843 MMC Host Controller 1025 0121 Aspire 5920G 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 - 1028 01f5 Dell Inspiron 1501 - 1028 024f Dell Latitude e6500 + 1028 01f5 Inspiron 1501 + 1028 024f Latitude e6500 103c 03b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cf Pavilion dv9500/9600/9700 series @@ -13144,9 +13160,11 @@ 1028 040a Latitude E6410 1028 040b Latitude E6510 e823 PCIe SDXC/MMC Host Controller + 17aa 21cf ThinkPad T520 e832 R5C832 PCIe IEEE 1394 Controller 1028 040a Latitude E6410 1028 040b Latitude E6510 + 17aa 21cf ThinkPad T520 e852 PCIe xD-Picture Card Controller 1181 Telmatics International 1183 Fujikura Ltd @@ -15143,7 +15161,7 @@ 0206 GPS180PEX GPS Receiver (PCI Express) 0207 GLN180PEX GPS/GLONASS receiver (PCI Express) 0208 GPS180AMC GPS Receiver (PCI Express / MicroTCA / AdvancedMC) - 0209 GRC181PEX GPS/GLONASS/BEIDOU receiver (PCI Express) + 0209 GNS181PEX GPS/Galileo/GLONASS/BEIDOU receiver (PCI Express) 0301 TCR510PCI IRIG Timecode Reader 0302 TCR167PCI IRIG Timecode Reader 0303 TCR511PCI IRIG Timecode Reader @@ -15746,8 +15764,8 @@ 1409 0103 PAR4008A 1409 0104 PAR4018A 140a DSP Research Inc -# Formerly RAMiX, Inc. -140b GE Intelligent Platforms +# Formerly RAMiX, GE Fanuc, GE Intelligent Platforms +140b Abaco Systems, Inc. 140c Elmic Systems Inc 140d Matsushita Electric Works Ltd 140e Goepel Electronic GmbH @@ -16062,6 +16080,7 @@ 509e T520-509E Unified Wire Ethernet Controller 509f T540-509F Unified Wire Ethernet Controller 50a0 T540-50A0 Unified Wire Ethernet Controller + 50a1 T540-50A1 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16113,6 +16132,7 @@ 549e T520-509E Unified Wire Ethernet Controller 549f T540-509F Unified Wire Ethernet Controller 54a0 T540-50A0 Unified Wire Ethernet Controller + 54a1 T540-50A1 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16164,6 +16184,7 @@ 559e T520-509E Unified Wire Storage Controller 559f T540-509F Unified Wire Storage Controller 55a0 T540-50A0 Unified Wire Storage Controller + 55a1 T540-50A1 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16215,6 +16236,7 @@ 569e T520-509E Unified Wire Storage Controller 569f T540-509F Unified Wire Storage Controller 56a0 T540-50A0 Unified Wire Storage Controller + 56a1 T540-50A1 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16305,6 +16327,7 @@ 589e T520-509E Unified Wire Ethernet Controller [VF] 589f T540-509F Unified Wire Ethernet Controller [VF] 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] + 58a1 T540-50A1 Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16470,6 +16493,8 @@ 1028 1fc2 Express Flash NVMe PM1725 1.6TB SFF 1028 1fc4 Express Flash NVMe PM1725 1.6TB AIC a822 NVMe SSD Controller 172Xa + 1014 0621 PCIe3 1.6TB NVMe Flash Adapter II x8 + 1014 0622 PCIe3 3.2TB NVMe Flash Adapter II x8 1028 1fd9 Express Flash PM1725a 800GB SFF 1028 1fda Express Flash PM1725a 1.6TB SFF 1028 1fdb Express Flash PM1725a 3.2TB SFF @@ -16663,7 +16688,10 @@ 14ca PE Logic Corp. 14cb Billionton Systems Inc 14cc NAKAYO Telecommunications Inc -14cd Universal Scientific Ind. +14cd Universal Global Scientific Industrial Co.,Ltd + 0001 USI-1514-1GbaseT [OCP1] + 0002 USI-4227-SFP [OCP2] + 0003 USI-X557-10GbaseT [OCP3] 14ce Whistle Communications 14cf TEK Microsystems Inc. 14d0 Ericsson Axe R & D @@ -16767,6 +16795,7 @@ 1028 02f1 PowerEdge R510 BCM5716 Gigabit Ethernet 163c NetXtreme II BCM5716S Gigabit Ethernet 163d NetXtreme II BCM57811 10-Gigabit Ethernet + 1043 858a PEB-10G/57811-1S 163e NetXtreme II BCM57811 10 Gigabit Ethernet Multi Function 163f NetXtreme II BCM57811 10-Gigabit Ethernet Virtual Function 1641 NetXtreme BCM57787 Gigabit Ethernet PCIe @@ -16892,7 +16921,7 @@ 1734 1061 PRIMERGY RX/TX S2 series onboard LAN 165a NetXtreme BCM5722 Gigabit Ethernet PCI Express # Dual NIC server - 1014 0378 IBM System x3350 (Machine type 4192) + 1014 0378 System x3350 (Machine type 4192) 1028 020f PowerEdge R300 Broadcom NetXtreme 5722 1028 0210 PowerEdge T300 Broadcom NetXtreme 5722 1028 0225 PowerEdge T105 Broadcom NetXtreme 5722 @@ -16992,6 +17021,7 @@ 1693 NetLink BCM5787M Gigabit Ethernet PCI Express 1025 0121 Aspire 5920G 103c 30c0 6710b + 17aa 20d5 ThinkPad R61 1694 NetLink BCM57790 Gigabit Ethernet PCIe 1696 NetXtreme BCM5782 Gigabit Ethernet 103c 12bc d530 CMT (DG746A) @@ -17128,6 +17158,8 @@ 16d5 BCM57407 NetXtreme-E 10GBase-T Ethernet Controller 16d6 BCM57412 NetXtreme-E 10Gb RDMA Ethernet Controller 16d7 BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller + 14e4 1202 BCM957412M4122 OCP 1x25G Type1 wRoCE + 14e4 1404 BCM957414M4142 OCP 2x25G Type1 wRoCE 1590 020e Ethernet 25Gb 2-port 631SFP28 Adapter 1590 0211 Ethernet 25Gb 2-port 631FLR-SFP28 Adapter 16d8 BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller @@ -17622,7 +17654,7 @@ 1002 00f8 ATI TV Wonder Pro 1002 00f9 ATI TV Wonder 1002 a101 HDTV Wonder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 6611 Winfast TV 2000XP Expert 107d 6613 Leadtek Winfast 2000XP Expert 107d 6620 Leadtek Winfast DV2000 @@ -17668,7 +17700,7 @@ 0070 9002 Nova-T DVB-T Model 909 0070 9402 WinTV-HVR1100 DVB-T/Hybrid 0070 9600 WinTV 88x MPEG Encoder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 663c Leadtek PVR 2000 107d 665f WinFast DTV1000-T 14f1 0187 Conexant DVB-T reference design @@ -18099,6 +18131,18 @@ 103c 18ce InfiniBand QDR/EN 10Gb Dual Port 544M Adapter 103c 18cf InfiniBand FDR/EN 10/40Gb Dual Port 544M Adapter 103c 18d6 InfiniBand FDR/EN 10/40Gb Dual Port 544QSFP Adapter + 15b3 0025 ConnectX-3 IB QDR Dual Port Mezzanine Card + 15b3 0026 ConnectX-3 IB FDR Dual Port Mezzanine Card + 15b3 0059 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Mezzanine Card + 15b3 0065 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Adapter + 15b3 0066 ConnectX-3 IB FDR10 Dual Port Mezzanine Card + 15b3 0067 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Adapter + 15b3 0071 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Mezzanine Card +# SVID = 15B3 SSID = 0078 + 15b3 0078 ConnectX-3 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 40 GbE Dual Port QSFP+ Adapter +# SVID = 15B3 SSID = 0080 + 15b3 0080 ConnectX-3 10 GbE Dual Port SFP+ Adapter 1004 MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] 1005 MT27510 Family 1006 MT27511 Family @@ -18111,6 +18155,9 @@ 117c 0091 FastFrame NQ42 117c 0092 FastFrame NQ11 117c 0093 FastFrame NQ12 + 15b3 0078 ConnectX-3 Pro 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 Pro 40 GbE Dual Port QSFP+ Adapter + 15b3 0080 ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter 1009 MT27530 Family 100a MT27531 Family 100b MT27540 Family @@ -18122,8 +18169,16 @@ 1011 MT27600 [Connect-IB] 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] + 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 + 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter + 15b3 0034 ConnectX-4 VPI IB EDR/100 GbE Dual Port QSFP28 Adapter + 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter + 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb + 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G + 15b3 0025 ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC 1016 MT27710 Family [ConnectX-4 Lx Virtual Function] 1017 MT27800 Family [ConnectX-5] 1018 MT27800 Family [ConnectX-5 Virtual Function] @@ -18711,6 +18766,7 @@ 0033 AR958x 802.11abgn Wireless Network Adapter 168c a120 AR9582 802.11a/n WLAN Mini-PCIe Adapter 0034 AR9462 Wireless Network Adapter + 1028 020b Wireless 1601 802.11abgn Adapter 1028 0300 Wireless 1802 802.11abgn Adapter 1a56 2003 Killer Wireless-N 1202 Half-size Mini PCIe Card 0036 QCA9565 / AR9565 Wireless Network Adapter @@ -20220,7 +20276,12 @@ 1af4 1100 QEMU Virtual Machine 0006 PCI Rocker Ethernet switch device 0007 PCI SD Card Host Controller Interface + 0008 QEMU PCIe Host bridge + 0009 QEMU PCI Expander bridge 000a PCI-PCI bridge (multiseat) + 000b QEMU PCIe Expander bridge + 000c QEMU PCIe Root port + 000d QEMU XHCI Host Controller 0100 QXL paravirtual graphic card 1af4 1100 QEMU Virtual Machine 1b37 Signal Processing Devices Sweden AB @@ -20446,6 +20507,8 @@ 0006 ExaNIC X10-HPT 1cf7 Subspace Dynamics 1d00 Pure Storage +1d18 RME + 0001 Fireface UFX+ 1d1d CNEX Labs 1f1f QEMU NVM Express LightNVM Controller 2807 8800 series NVMe SSD @@ -20460,6 +20523,7 @@ 1d44 DPT a400 PM2x24/PM3224 1d49 Lenovo +1d4c Diamanti, Inc. 1d5c Fantasia Trading LLC 1d61 Technobox, Inc. 1d62 Nebbiolo Technologies @@ -21148,10 +21212,13 @@ 0001 I-30xx Scanner Interface 5555 Genroco, Inc 0003 TURBOstor HFP-832 [HiPPI NIC] + 3b00 Epiphan DVI2PCIe video capture card 5646 Vector Fabrics BV 5654 VoiceTronix Pty Ltd 5678 Dawicontrol Computersysteme GmbH 5700 Netpower +# alternately Extreme Engineering Solutions, Inc. +5845 X-ES, Inc. 584d AuzenTech Co., Ltd. 5851 Exacq Technologies 8008 tDVR8008 8-port video capture card @@ -21261,7 +21328,7 @@ 8086 1315 Centrino Wireless-N 1000 BGN 8086 1316 Centrino Wireless-N 1000 BG 0085 Centrino Advanced-N 6205 [Taylor Peak] - 8086 1311 Centrino Advanced-N 6205 AGN + 8086 1311 Centrino Advanced-N 6205 (802.11a/b/g/n) 8086 1316 Centrino Advanced-N 6205 ABG 0087 Centrino Advanced-N + WiMAX 6250 [Kilmer Peak] 8086 1301 Centrino Advanced-N + WiMAX 6250 2x2 AGN @@ -21307,6 +21374,7 @@ 1028 04da Vostro 3750 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 144d c652 NP300E5C series laptop + 17aa 21cf ThinkPad T520 0105 Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 0106 2nd Generation Core Processor Family Integrated Graphics Controller @@ -21324,6 +21392,7 @@ 0122 2nd Generation Core Processor Family Integrated Graphics Controller 0126 2nd Generation Core Processor Family Integrated Graphics Controller 1028 04cc Vostro 3350 + 17aa 21cf ThinkPad T520 0150 Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller 1043 84ca P8 series motherboard 15d9 0624 X9SCM-F Motherboard @@ -22821,8 +22890,9 @@ 4c53 1090 Cx9/Vx9 mainboard 1462 82870P2 P64H2 Hot Plug Controller 1501 82567V-3 Gigabit Network Connection - 1502 82579LM Gigabit Network Connection + 1502 82579LM Gigabit Network Connection (Lewisville) 1028 04a3 Precision M4600 + 17aa 21ce ThinkPad T520 8086 357a Server Board S1200BTS 1503 82579V Gigabit Network Connection 1043 849c P8P67 Deluxe Motherboard @@ -22961,6 +23031,8 @@ 1059 0111 T4007 1GbE interface 1059 0120 T4008 1GbE interface 1059 0130 T4009 1GbE interface + 1059 0140 T2035 1GbE interface + 1059 0150 RD-01068 1GbE interface 1538 I210 Gigabit Network Connection 1539 I211 Gigabit Network Connection 153a Ethernet Connection I217-LM @@ -23021,8 +23093,8 @@ 1028 1f99 Ethernet 10G 4P X710/I350 rNDC 1028 1f9c Ethernet 10G 4P X710 SFP+ rNDC 103c 0000 Ethernet 10Gb 562SFP+ Adapter - 103c 22fc HP Ethernet 10Gb 2-port 562FLR-SFP+ Adapter - 103c 22fd HP Ethernet 10Gb 2-port 562SFP+ Adapter + 103c 22fc Ethernet 10Gb 2-port 562FLR-SFP+ Adapter + 103c 22fd Ethernet 10Gb 2-port 562SFP+ Adapter 1137 0000 Ethernet Converged NIC X710-DA 1137 013b Ethernet Converged NIC X710-DA4 1137 020a Ethernet Converged NIC X710-DA2 @@ -23044,9 +23116,11 @@ 8086 000a Ethernet Controller X710 for 10GbE SFP+ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ + 8086 000e Ethernet Server Adapter OCP X710-2 8086 0010 Ethernet Converged Network Adapter X710 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ + 8086 4007 Ethernet Controller X710 for 10GbE SFP+ 1575 DSL6340 Thunderbolt 3 NHI [Alpine Ridge 2C 2015] 1576 DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015] 1577 DSL6540 Thunderbolt 3 NHI [Alpine Ridge 4C 2015] @@ -23060,6 +23134,7 @@ 1028 0000 Ethernet 10G X710-k bNDC 1028 1f98 Ethernet 10G 4P X710-k bNDC 1028 1f9e Ethernet 10G 2P X710-k bNDC + 1059 0150 RD-01068 10GbE-KR interface 1590 0000 Ethernet 2-port 563i Adapter 1590 00f8 Ethernet 2-port 563i Adapter 8086 0000 Ethernet Converged Network Adapter XL710-Q2 @@ -23087,8 +23162,8 @@ 108e 0000 Ethernet Controller X710 for 10GBASE-T 108e 4857 Ethernet Controller X710 for 10GBASE-T 1587 Ethernet Controller XL710 for 20GbE backplane - 103c 0000 HPE Ethernet 10/20Gb 2-port 660FLB Adapter - 103c 22fe HPE Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 0000 Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 22fe Ethernet 10/20Gb 2-port 660FLB Adapter 1588 Ethernet Controller XL710 for 20GbE backplane 103c 0000 Ethernet 10/20Gb 2-port 660M Adapter 103c 22ff Ethernet 10/20Gb 2-port 660M Adapter @@ -23099,6 +23174,7 @@ 8086 0001 Ethernet Converged Network Adapter X710-T4 8086 0002 Ethernet Converged Network Adapter X710-T4 8086 0003 Ethernet Converged Network Adapter X710-T + 8086 00a0 Ethernet Converged Network Adapter X710-T4 8086 1003 Ethernet Converged Network Adapter X710-T 158a Ethernet Controller XXV710 for 25GbE backplane 158b Ethernet Controller XXV710 for 25GbE SFP28 @@ -23111,6 +23187,7 @@ 8086 0006 Ethernet Network Adapter OCP XXV710-2 8086 0007 Ethernet Network Adapter OCP XXV710-1 8086 0008 Ethernet Network Adapter OCP XXV710-1 + 8086 4001 Ethernet Network Adapter XXV710-2 15a0 Ethernet Connection (2) I218-LM 15a1 Ethernet Connection (2) I218-V 15a2 Ethernet Connection (3) I218-LM @@ -23121,6 +23198,7 @@ 15a9 X552 Virtual Function 15aa Ethernet Connection X552 10 GbE Backplane 1059 0120 T4008 10GbE interface + 1059 0150 RD-01068 10GbE interface 15ab Ethernet Connection X552 10 GbE Backplane 15ac Ethernet Connection X552 10 GbE SFP+ 15ad Ethernet Connection X552/X557-AT 10GBASE-T @@ -23192,6 +23270,7 @@ 163b Broadwell-U Integrated Graphics 163d Broadwell-U Integrated Graphics 163e Broadwell-U Integrated Graphics + 1889 Ethernet Adaptive Virtual Function 1900 Skylake Host Bridge/DRAM Registers 1901 Skylake PCIe Controller (x16) 1902 HD Graphics 510 @@ -23294,37 +23373,43 @@ 1b48 82597EX 10GbE Ethernet Controller 8086 a01f PRO/10GbE LR Server Adapter 8086 a11f PRO/10GbE LR Server Adapter - 1c00 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c01 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c02 6 Series/C200 Series Chipset Family SATA AHCI Controller + 1c00 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 0-3) + 1c01 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 0-3) + 1c02 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller 1028 04aa XPS 8300 1043 844d P8 series motherboard 8086 7270 Server Board S1200BTS - 1c03 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller + 1c03 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller 1028 04a3 Precision M4600 1028 04b2 Vostro 3350 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] - 1c04 6 Series/C200 Series Chipset Family SATA RAID Controller + 1c04 6 Series/C200 Series Desktop SATA RAID Controller 103c 3118 Smart Array B110i SATA RAID Controller - 1c05 6 Series/C200 Series Chipset Family SATA RAID Controller - 1c08 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller - 1c09 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller + 1c05 6 Series/C200 Series Mobile SATA RAID Controller + 1c06 Z68 Express Chipset SATA RAID Controller + 1c08 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 4-5) + 1c09 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 4-5) 1c10 6 Series/C200 Series Chipset Family PCI Express Root Port 1 1028 04aa XPS 8300 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c12 6 Series/C200 Series Chipset Family PCI Express Root Port 2 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c14 6 Series/C200 Series Chipset Family PCI Express Root Port 3 1028 04da Vostro 3750 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c16 6 Series/C200 Series Chipset Family PCI Express Root Port 4 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 1c18 6 Series/C200 Series Chipset Family PCI Express Root Port 5 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS 1c1a 6 Series/C200 Series Chipset Family PCI Express Root Port 6 1028 04da Vostro 3750 @@ -23340,6 +23425,7 @@ 1028 04da Vostro 3750 1043 8418 P8P67 Deluxe Motherboard 1043 841b P8H67 Series Motherboard + 17aa 21cf ThinkPad T520 # Realtek ALC888 audio codec 8086 2008 DQ67SW board 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23349,6 +23435,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c24 6 Series/C200 Series Chipset Family Thermal Management Controller 1c25 6 Series/C200 Series Chipset Family DMI to PCI Bridge @@ -23358,6 +23445,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c27 6 Series/C200 Series Chipset Family USB Universal Host Controller #1 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23369,6 +23457,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c33 6 Series/C200 Series Chipset Family LAN Controller 1c35 6 Series/C200 Series Chipset Family VECI Controller @@ -23378,6 +23467,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c3b 6 Series/C200 Series Chipset Family MEI Controller #2 1c3c 6 Series/C200 Series Chipset Family IDE-r Controller @@ -23405,6 +23495,7 @@ 1c4e Q67 Express Chipset Family LPC Controller 1c4f QM67 Express Chipset Family LPC Controller 1028 04a3 Precision M4600 + 17aa 21cf ThinkPad T520 1c50 B65 Express Chipset Family LPC Controller 1c51 6 Series/C200 Series Chipset Family LPC Controller 1c52 C202 Chipset Family LPC Controller @@ -23532,12 +23623,12 @@ 1e1e 7 Series/C210 Series Chipset Family PCI Express Root Port 8 1849 1e1e Motherboard 1e20 7 Series/C216 Chipset Family High Definition Audio Controller - 1028 054b Dell XPS One 2710 + 1028 054b XPS One 2710 1043 108d VivoBook X202EV 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A 1043 8415 P8H77-I Motherboard - 1043 8445 ASUS P8Z77-V LX Motherboard + 1043 8445 P8Z77-V LX Motherboard 144d c652 NP300E5C series laptop 1849 1898 Z77 Extreme4 motherboard 1e22 7 Series/C216 Chipset Family SMBus Controller @@ -23685,10 +23776,10 @@ 201c Sky Lake-E Non-Transparent Bridge Registers 2021 Sky Lake-E CBDMA Registers 2024 Sky Lake-E MM/Vt-d Configuration Registers - 2030 Sky Lake-E PCI Express Root Port 1A - 2031 Sky Lake-E PCI Express Root Port 1B - 2032 Sky Lake-E PCI Express Root Port 1C - 2033 Sky Lake-E PCI Express Root Port 1D + 2030 Sky Lake-E PCI Express Root Port A + 2031 Sky Lake-E PCI Express Root Port B + 2032 Sky Lake-E PCI Express Root Port C + 2033 Sky Lake-E PCI Express Root Port D 2035 Sky Lake-E RAS Configuration Registers 204c Sky Lake-E M3KTI Registers 204d Sky Lake-E M3KTI Registers @@ -24533,7 +24624,7 @@ 258a E7221 Integrated Graphics Controller 2590 Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller 1014 0575 ThinkPad X41 / Z60t - 1028 0182 Dell Latitude C610 + 1028 0182 Latitude C610 103c 0934 Compaq nw8240/nx8220 103c 099c NX6110/NC6120 104d 81b7 Vaio VGN-S3XP @@ -24822,7 +24913,7 @@ 1014 05b7 ThinkPad Z60t # based on the PTGD1-LA motherboard 103c 2a09 PufferM-UL8E - 1043 1173 Asus A6VC + 1043 1173 A6VC 1043 814e P5GD1-VW Mainboard 1462 7028 915P/G Neo2 1af4 1100 QEMU Virtual Machine @@ -24848,7 +24939,7 @@ 1028 0177 Dimension 8400 1028 0179 Optiplex GX280 1028 0182 Latitude D610 Laptop - 1028 0187 Dell Precision M70 Laptop + 1028 0187 Precision M70 Laptop 1028 0188 Inspiron 6000 laptop 103c 0934 Compaq nw8240/nx8220 103c 0944 Compaq NC6220 @@ -25222,7 +25313,7 @@ 103c 30a3 Compaq nw8440 103c 30d5 530 Laptop 1043 1123 A6J-Q008 - 1043 13c4 Asus G2P + 1043 13c4 G2P 1043 817f P5LD2-VM Mainboard (Realtek ALC 882 codec) 1043 8290 P5KPL-VM Motherboard 1043 82ea P5KPL-CM Motherboard @@ -25240,7 +25331,7 @@ 152d 0753 Softmodem 1734 10ad Conexant softmodem SmartCP 17aa 2010 ThinkPad R60/T60/X60 series - 17aa 3802 Lenovo 3000 C200 audio [Realtek ALC861VD] + 17aa 3802 3000 C200 audio [Realtek ALC861VD] 8086 1112 DeskTop Board D945GTP 8086 27d8 DeskTop Board D945GTP 8086 d618 DeskTop Board D510MO @@ -25311,6 +25402,7 @@ 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E + 17aa 20a5 ThinkPad R61 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2820 82801H (ICH8 Family) 4 port SATA Controller [IDE mode] 1028 01da OptiPlex 745 @@ -25337,6 +25429,7 @@ 2828 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [IDE mode] 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b + 17aa 20a8 ThinkPad R61 e4bf cc47 CCG-RUMBA 2829 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] 1025 0121 Aspire 5920G @@ -25353,7 +25446,7 @@ 1028 040b Latitude E6510 e4bf 50c1 PC1-GROOVE 2830 82801H (ICH8 Family) USB UHCI Controller #1 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25413,7 +25506,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2835 82801H (ICH8 Family) USB UHCI Controller #5 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25441,7 +25534,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 283a 82801H (ICH8 Family) USB2 EHCI Controller #2 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25496,14 +25589,14 @@ 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theather) 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 - 1028 01f9 Dell Latitude D630 - 1028 01ff Dell Precision M4300 + 1028 01f9 Latitude D630 + 1028 01ff Precision M4300 1028 0256 Studio 1735 103c 2802 Compaq dc7700p 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 - 1043 1339 Asus M51S series + 1043 1339 M51S series 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E 104d 9008 Vaio VGN-SZ79SN_C @@ -25843,7 +25936,7 @@ 29f7 3200/3210 Chipset Serial KT Controller 29f9 3210 Chipset Host-Secondary PCI Express Bridge 2a00 Mobile PM965/GM965/GL960 Memory Controller Hub - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p @@ -25862,16 +25955,16 @@ 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a03 Mobile GM965/GL960 Integrated Graphics Controller (secondary) 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a04 Mobile PM965/GM965 MEI Controller 103c 30c1 Compaq 6910p @@ -26074,7 +26167,7 @@ 2e16 4 Series Chipset PT IDER Controller 2e17 4 Series Chipset Serial KT Controller 2e20 4 Series Chipset DRAM Controller - 1028 0283 Dell Vostro 220 + 1028 0283 Vostro 220 1043 82d3 P5Q Deluxe Motherboard 1458 5000 GA-EP45-DS5/GA-EG45M-DS2H Motherboard 2e21 4 Series Chipset PCI Express Root Port @@ -26585,16 +26678,20 @@ 37d1 Ethernet Connection X722 for 1GbE 1590 0216 Ethernet 1Gb 2-port 368i Adapter 1590 0217 Ethernet 1Gb 2-port 368FLR-MMT Adapter + 1590 0247 Ethernet 1Gb 4-port 369i Adapter 17aa 4020 Intel Ethernet Connection X722 for 1GbE 17aa 4021 Intel Ethernet Connection X722 for 1GbE 17aa 4022 Intel Ethernet Connection X722 for 1GbE 37d2 Ethernet Connection X722 for 10GBASE-T + 14cd 0030 Ethernet OCP 2x10G RJ45 Phy Card [USI-X557-10GbaseT] 1590 0218 Ethernet 10Gb 2-port 568FLR-MMT Adapter - 17aa 4020 Intel Ethernet Connection X722 for 10GBASE - 17aa 4021 Intel Ethernet Connection X722 for 10GBASE + 17aa 4020 Ethernet Connection X722 for 10GBASE-T + 17aa 4021 Ethernet Connection X722 for 10GBASE-T 17aa 4022 Ethernet Connection X722 for 10GBASE-T 37d3 Ethernet Connection X722 for 10GbE SFP+ 1590 0219 Ethernet 10Gb 2-port 568FLR-MMSFP+ Adapter + 17aa 4020 Ethernet Connection X722 for 10GbE SFP+ + 17aa 4021 Ethernet Connection X722 for 10GbE SFP+ 37d4 Ethernet Connection X722 for 10GbE QSFP+ 37d9 X722 Hyper-V Virtual Function 3a00 82801JD/DO (ICH10 Family) 4-port SATA IDE Controller @@ -26865,7 +26962,7 @@ 1028 02da OptiPlex 980 1028 040a Latitude E6410 1028 040b Latitude E6510 - 1043 1373 ASUSTek G73-series gaming laptop + 1043 1373 G73-series gaming laptop 144d c06a R730 Laptop 15d9 060d C7SIM-Q Motherboard 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] @@ -27013,7 +27110,7 @@ 4224 PRO/Wireless 2915ABG [Calexico2] Network Connection 4227 PRO/Wireless 3945ABG [Golan] Network Connection 8086 1010 ThinkPad R60e - 8086 1011 ThinkPad T60/R60e/X60s + 8086 1011 ThinkPad T60/R60e/X60s/R61 8086 1014 PRO/Wireless 3945BG Network Connection 4229 PRO/Wireless 4965 AG or AGN [Kedron] Network Connection 8086 1100 Vaio VGN-SZ79SN_C @@ -27132,6 +27229,8 @@ 5845 QEMU NVM Express Controller 1af4 1100 QEMU Virtual Machine 5902 HD Graphics 610 + 590f Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers + 5910 Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers 5912 HD Graphics 630 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit @@ -28223,7 +28322,7 @@ 9004 7888 AHA-2930UW SCSI Controller 8b78 ABA-1030 ec78 AHA-4944W/UW -# acquired by PMC-Sierra +# acquired by Microsemi 9005 Adaptec 0010 AHA-2940U2/U2W 9005 2180 AHA-2940U2 SCSI Controller @@ -28835,9 +28934,11 @@ f1d0 AJA Video cafe Kona SD cfee Xena LS/SD-22-DA/SD-DA daff KONA LHi + db01 Corvid22 db09 Corvid 24 dcaf Kona HD dfee Xena HD-DA + eb0e Corvid 44 efac Xena SD-MM/SD-22-MM facd Xena HD-MM f5f5 F5 Networks, Inc. From owner-svn-src-all@freebsd.org Sat May 27 11:21:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 066F0D83E0C; Sat, 27 May 2017 11:21:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C625818B5; Sat, 27 May 2017 11:21:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RBLKl2063641; Sat, 27 May 2017 11:21:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RBLK4s063640; Sat, 27 May 2017 11:21:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271121.v4RBLK4s063640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 11:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318984 - stable/10/share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 11:21:22 -0000 Author: bapt Date: Sat May 27 11:21:20 2017 New Revision: 318984 URL: https://svnweb.freebsd.org/changeset/base/318984 Log: MFC r318900: update pci_vendors to 2017.05.25 Modified: stable/10/share/misc/pci_vendors Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/pci_vendors ============================================================================== --- stable/10/share/misc/pci_vendors Sat May 27 11:12:11 2017 (r318983) +++ stable/10/share/misc/pci_vendors Sat May 27 11:21:20 2017 (r318984) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.04.03 -# Date: 2017-04-03 03:15:02 +# Version: 2017.05.25 +# Date: 2017-05-25 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -76,16 +76,16 @@ 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. - 0105 Rhino R1T1 - 0205 Rhino R4FXO + 0105 R1T1 + 0205 R4FXO 0206 RCB4FXO 4-channel FXO analog telphony card - 0305 Rhino R4T1 - 0405 Rhino R8FXX + 0305 R4T1 + 0405 R8FXX 0406 RCB8FXX 8-channel modular analog telphony card - 0505 Rhino R24FXX + 0505 R24FXX 0506 RCB24FXS 24-Channel FXS analog telphony card - 0605 Rhino R2T1 - 0705 Rhino R24FXS + 0605 R2T1 + 0705 R24FXS 0706 RCB24FXO 24-Channel FXO analog telphony card 0905 R1T3 Single T3 Digital Telephony Card 0906 RCB24FXX 24-channel modular analog telphony card @@ -249,6 +249,7 @@ 0014 MegaRAID Tri-Mode SAS3516 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter + 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 0015 MegaRAID Tri-Mode SAS3416 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -430,6 +431,7 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 30c0 SAS 9201-16i 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] @@ -544,6 +546,7 @@ 0097 SAS3008 PCI-Express Fusion-MPT SAS-3 1000 3090 SAS9311-8i 1000 30e0 SAS9300-8i + 1000 3130 SAS 9300-16i 1028 1f45 HBA330 Adapter 1028 1f46 12Gbps HBA 1028 1f53 HBA330 Mini @@ -1100,7 +1103,7 @@ 1028 0085 Rage 3D LT Pro 4c46 Rage Mobility 128 AGP 2X/Mobility M3 1002 0155 IBM Thinkpad A22p - 1014 0155 IBM Thinkpad A22p + 1014 0155 Thinkpad A22p 1028 00b1 Latitude C600 4c47 3D Rage IIC PCI / Mobility Radeon 7500/7500C 4c49 3D Rage LT PRO PCI @@ -2213,6 +2216,7 @@ 1043 04a8 Radeon RX 480 1043 04b0 Radeon RX 470 1043 04fb Radeon RX 480 + 1043 04fd Radeon RX 480 8GB 1462 3411 Radeon RX 470 1462 3413 Radeon RX 480 148c 2372 Radeon RX 480 @@ -2939,7 +2943,7 @@ 6985 Polaris12 6986 Polaris12 6987 Polaris12 - 699f Polaris12 + 699f Lexa PRO [Radeon RX 550] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -3955,6 +3959,7 @@ 1438 Liverpool Processor Root Port 1439 Family 16h Processor Functions 5:1 145b Zeppelin Non-Transparent Bridge + 145c USB3 Host Controller 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4039,6 +4044,7 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) + 43bb USB 3.1 XHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -6025,9 +6031,9 @@ 1077 e4f8 FastLinQ QL45611H 100GbE Adapter (SR-IOV VF) 2020 ISP2020A Fast!SCSI Basic Adapter 2031 ISP8324-based 16Gb Fibre Channel to PCI Express Adapter - 103c 17e7 HP SN1000Q 16Gb Single Port Fibre Channel Adapter - 103c 17e8 HP SN1000Q 16Gb Dual Port Fibre Channel Adapter - 103c 1939 HP QMH2672 16Gb Dual Port Fibre Channel Adapter + 103c 17e7 SN1000Q 16Gb Single Port Fibre Channel Adapter + 103c 17e8 SN1000Q 16Gb Dual Port Fibre Channel Adapter + 103c 1939 QMH2672 16Gb Dual Port Fibre Channel Adapter 103c 8002 3830C 16G Fibre Channel Host Bus Adapter 2071 ISP2714-based 16/32Gb Fibre Channel to PCIe Adapter 1077 0283 QLE2764 Quad Port 32Gb Fibre Channel to PCIe Adapter @@ -6047,10 +6053,10 @@ 1077 02a8 QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter 1077 02ab QLE2740 Single Port 32Gb FC to PCIe Gen3 x8 Adapter 1077 02ac QLE2742 Dual Port 32Gb FC to PCIe Gen3 x8 Adapter - 1590 00f9 HPE StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter - 1590 00fa HPE StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter - 1590 0203 HPE StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter - 1590 0204 HPE StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter + 1590 00f9 StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter + 1590 00fa StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter + 1590 0203 StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter + 1590 0204 StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter 2300 QLA2300 64-bit Fibre Channel Adapter 2312 ISP2312-based 2Gb Fibre Channel to PCI-X HBA 103c 0131 2Gb Fibre Channel - Single port [A7538A] @@ -6065,7 +6071,7 @@ 103c 3262 StorageWorks 81Q 103c 3263 StorageWorks 82Q 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine - 1590 00fc HPE StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter + 1590 00fc StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter 3022 ISP4022-based Ethernet NIC 3032 ISP4032-based Ethernet IPv6 NIC 4010 ISP4010-based iSCSI TOE HBA @@ -8954,7 +8960,7 @@ 0396 G73 0397 G73M [GeForce Go 7700] 0398 G73M [GeForce Go 7600] - 1025 006c Acer 9814 WKMI + 1025 006c Aspire 9814WKMi 0399 G73M [GeForce Go 7600 GT] 039a G73M [Quadro NVS 300M] 039b G73M [GeForce Go 7900 SE] @@ -9912,6 +9918,7 @@ 0dfa GF108GLM [Quadro 1000M] 0dfc GF108GLM [NVS 5200M] 0e08 GF119 HDMI Audio Controller + 1043 83a0 ENGT520 SILENT # 1024MB with passive cooling (heatsink) 10b0 104a Gainward GeForce GT 610 0e09 GF110 High Definition Audio Controller @@ -10045,6 +10052,7 @@ 103a GK110GL [Quadro K6000] 103c GK110GL [Quadro K5200] 1040 GF119 [GeForce GT 520] + 1043 83a0 ENGT520 SILENT 1042 GF119 [GeForce 510] 1048 GF119 [GeForce 605] 1049 GF119 [GeForce GT 620 OEM] @@ -10694,6 +10702,7 @@ 17fd GM200GL [Tesla M40] 1b00 GP102 [TITAN X] 1b01 GP102 + 1b02 GP102 [TITAN Xp] 1b06 GP102 [GeForce GTX 1080 Ti] 1b30 GP102GL [Quadro P6000] 1b38 GP102GL [Tesla P40] @@ -10738,7 +10747,7 @@ 1cb1 GP107GL [Quardo P1000] 1cb2 GP107GL [Quardo P600] 1cb3 GP107GL [Quardo P400] - 1d01 GP108 + 1d01 GP108 [GeForce GT 1030] 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -10771,6 +10780,12 @@ e260 OneConnect FCoE Initiator (Lancer) e268 OneConnect 10Gb FCoE Converged Network Adapter (Lancer-VF) e300 Lancer Gen6: LPe32000 Fibre Channel Host Adapter + 10df e310 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e311 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e312 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e322 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e323 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e325 Lancer Gen6: LPe31000 Fibre Channel Host Adapter f011 Saturn: LightPulse Fibre Channel Host Adapter f015 Saturn: LightPulse Fibre Channel Host Adapter f085 LP850 Fibre Channel Host Adapter @@ -11562,8 +11577,8 @@ 1043 8095 A7V8X Motherboard (Realtek ALC650 codec) 1043 80a1 A7V8X-X Motherboard 1043 80b0 A7V600/K8V-X/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX]) - 1043 80f3 ASUSTek SK8V motherboard - 1043 810d Asus P5VD1-X (AD1888 codec [SoundMax]) + 1043 80f3 SK8V motherboard + 1043 810d P5VD1-X (AD1888 codec [SoundMax]) 1043 812a A8V Deluxe motherboard (Realtek ALC850 codec) 10ec 8168 High Definition Audio 1106 3059 L7VMM2 Motherboard @@ -12248,7 +12263,7 @@ 0070 6701 WinTV HVR-1110 1019 4cb5 Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) 1043 0210 FlyTV mini Asus Digimatrix - 1043 4843 ASUS TV-FM 7133 + 1043 4843 TV-FM 7133 1043 4845 TV-FM 7135 1043 4862 P7131 Dual 1043 4876 My Cinema-P7131 Hybrid @@ -12322,7 +12337,7 @@ 0000 4071 Behold TV 407 FM 1019 4cb4 Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) 1043 0210 Digimatrix TV - 1043 4840 ASUS TV-FM 7134 + 1043 4840 TV-FM 7134 1043 4842 TV-FM 7134 1131 0000 SAA713x-based TV tuner card 1131 2004 EUROPA V3 reference design @@ -13039,7 +13054,7 @@ 103c 30c1 Compaq 6910p 1043 1237 A6J-Q008 1043 1967 V6800V - 1043 1987 Asus A4K and Z81K notebooks, possibly others ( mid-2005 machines ) + 1043 1987 A4K and Z81K notebooks, possibly others ( mid-2005 machines ) 104d 80df Vaio PCG-FX403 104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP 104d 814e VAIO GRZ390Z @@ -13048,7 +13063,7 @@ 144d c00c P30/P35 notebook 14ef 0220 PCD-RP-220S 17aa 201c ThinkPad X60/X60s - 17aa 20c4 ThinkPad T61 + 17aa 20c4 ThinkPad T61/R61 17aa 20c6 ThinkPad R61 0477 RL5c477 0478 RL5c478 @@ -13098,7 +13113,7 @@ 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop 1043 1237 A6J-Q008 - 1043 1967 ASUS V6800V + 1043 1967 V6800V 10f7 8338 Panasonic CF-Y5 laptop 144d c018 X20 IV 17aa 201d ThinkPad X60/X60s @@ -13114,14 +13129,15 @@ 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop + 17aa 20c5 ThinkPad R61 17aa 20c7 ThinkPad R61 0841 R5C841 CardBus/SD/SDIO/MMC/MS/MSPro/xD/IEEE1394 0843 R5C843 MMC Host Controller 1025 0121 Aspire 5920G 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 - 1028 01f5 Dell Inspiron 1501 - 1028 024f Dell Latitude e6500 + 1028 01f5 Inspiron 1501 + 1028 024f Latitude e6500 103c 03b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cf Pavilion dv9500/9600/9700 series @@ -13144,9 +13160,11 @@ 1028 040a Latitude E6410 1028 040b Latitude E6510 e823 PCIe SDXC/MMC Host Controller + 17aa 21cf ThinkPad T520 e832 R5C832 PCIe IEEE 1394 Controller 1028 040a Latitude E6410 1028 040b Latitude E6510 + 17aa 21cf ThinkPad T520 e852 PCIe xD-Picture Card Controller 1181 Telmatics International 1183 Fujikura Ltd @@ -15143,7 +15161,7 @@ 0206 GPS180PEX GPS Receiver (PCI Express) 0207 GLN180PEX GPS/GLONASS receiver (PCI Express) 0208 GPS180AMC GPS Receiver (PCI Express / MicroTCA / AdvancedMC) - 0209 GRC181PEX GPS/GLONASS/BEIDOU receiver (PCI Express) + 0209 GNS181PEX GPS/Galileo/GLONASS/BEIDOU receiver (PCI Express) 0301 TCR510PCI IRIG Timecode Reader 0302 TCR167PCI IRIG Timecode Reader 0303 TCR511PCI IRIG Timecode Reader @@ -15746,8 +15764,8 @@ 1409 0103 PAR4008A 1409 0104 PAR4018A 140a DSP Research Inc -# Formerly RAMiX, Inc. -140b GE Intelligent Platforms +# Formerly RAMiX, GE Fanuc, GE Intelligent Platforms +140b Abaco Systems, Inc. 140c Elmic Systems Inc 140d Matsushita Electric Works Ltd 140e Goepel Electronic GmbH @@ -16062,6 +16080,7 @@ 509e T520-509E Unified Wire Ethernet Controller 509f T540-509F Unified Wire Ethernet Controller 50a0 T540-50A0 Unified Wire Ethernet Controller + 50a1 T540-50A1 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16113,6 +16132,7 @@ 549e T520-509E Unified Wire Ethernet Controller 549f T540-509F Unified Wire Ethernet Controller 54a0 T540-50A0 Unified Wire Ethernet Controller + 54a1 T540-50A1 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16164,6 +16184,7 @@ 559e T520-509E Unified Wire Storage Controller 559f T540-509F Unified Wire Storage Controller 55a0 T540-50A0 Unified Wire Storage Controller + 55a1 T540-50A1 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16215,6 +16236,7 @@ 569e T520-509E Unified Wire Storage Controller 569f T540-509F Unified Wire Storage Controller 56a0 T540-50A0 Unified Wire Storage Controller + 56a1 T540-50A1 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16305,6 +16327,7 @@ 589e T520-509E Unified Wire Ethernet Controller [VF] 589f T540-509F Unified Wire Ethernet Controller [VF] 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] + 58a1 T540-50A1 Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16470,6 +16493,8 @@ 1028 1fc2 Express Flash NVMe PM1725 1.6TB SFF 1028 1fc4 Express Flash NVMe PM1725 1.6TB AIC a822 NVMe SSD Controller 172Xa + 1014 0621 PCIe3 1.6TB NVMe Flash Adapter II x8 + 1014 0622 PCIe3 3.2TB NVMe Flash Adapter II x8 1028 1fd9 Express Flash PM1725a 800GB SFF 1028 1fda Express Flash PM1725a 1.6TB SFF 1028 1fdb Express Flash PM1725a 3.2TB SFF @@ -16663,7 +16688,10 @@ 14ca PE Logic Corp. 14cb Billionton Systems Inc 14cc NAKAYO Telecommunications Inc -14cd Universal Scientific Ind. +14cd Universal Global Scientific Industrial Co.,Ltd + 0001 USI-1514-1GbaseT [OCP1] + 0002 USI-4227-SFP [OCP2] + 0003 USI-X557-10GbaseT [OCP3] 14ce Whistle Communications 14cf TEK Microsystems Inc. 14d0 Ericsson Axe R & D @@ -16767,6 +16795,7 @@ 1028 02f1 PowerEdge R510 BCM5716 Gigabit Ethernet 163c NetXtreme II BCM5716S Gigabit Ethernet 163d NetXtreme II BCM57811 10-Gigabit Ethernet + 1043 858a PEB-10G/57811-1S 163e NetXtreme II BCM57811 10 Gigabit Ethernet Multi Function 163f NetXtreme II BCM57811 10-Gigabit Ethernet Virtual Function 1641 NetXtreme BCM57787 Gigabit Ethernet PCIe @@ -16892,7 +16921,7 @@ 1734 1061 PRIMERGY RX/TX S2 series onboard LAN 165a NetXtreme BCM5722 Gigabit Ethernet PCI Express # Dual NIC server - 1014 0378 IBM System x3350 (Machine type 4192) + 1014 0378 System x3350 (Machine type 4192) 1028 020f PowerEdge R300 Broadcom NetXtreme 5722 1028 0210 PowerEdge T300 Broadcom NetXtreme 5722 1028 0225 PowerEdge T105 Broadcom NetXtreme 5722 @@ -16992,6 +17021,7 @@ 1693 NetLink BCM5787M Gigabit Ethernet PCI Express 1025 0121 Aspire 5920G 103c 30c0 6710b + 17aa 20d5 ThinkPad R61 1694 NetLink BCM57790 Gigabit Ethernet PCIe 1696 NetXtreme BCM5782 Gigabit Ethernet 103c 12bc d530 CMT (DG746A) @@ -17128,6 +17158,8 @@ 16d5 BCM57407 NetXtreme-E 10GBase-T Ethernet Controller 16d6 BCM57412 NetXtreme-E 10Gb RDMA Ethernet Controller 16d7 BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller + 14e4 1202 BCM957412M4122 OCP 1x25G Type1 wRoCE + 14e4 1404 BCM957414M4142 OCP 2x25G Type1 wRoCE 1590 020e Ethernet 25Gb 2-port 631SFP28 Adapter 1590 0211 Ethernet 25Gb 2-port 631FLR-SFP28 Adapter 16d8 BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller @@ -17622,7 +17654,7 @@ 1002 00f8 ATI TV Wonder Pro 1002 00f9 ATI TV Wonder 1002 a101 HDTV Wonder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 6611 Winfast TV 2000XP Expert 107d 6613 Leadtek Winfast 2000XP Expert 107d 6620 Leadtek Winfast DV2000 @@ -17668,7 +17700,7 @@ 0070 9002 Nova-T DVB-T Model 909 0070 9402 WinTV-HVR1100 DVB-T/Hybrid 0070 9600 WinTV 88x MPEG Encoder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 663c Leadtek PVR 2000 107d 665f WinFast DTV1000-T 14f1 0187 Conexant DVB-T reference design @@ -18099,6 +18131,18 @@ 103c 18ce InfiniBand QDR/EN 10Gb Dual Port 544M Adapter 103c 18cf InfiniBand FDR/EN 10/40Gb Dual Port 544M Adapter 103c 18d6 InfiniBand FDR/EN 10/40Gb Dual Port 544QSFP Adapter + 15b3 0025 ConnectX-3 IB QDR Dual Port Mezzanine Card + 15b3 0026 ConnectX-3 IB FDR Dual Port Mezzanine Card + 15b3 0059 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Mezzanine Card + 15b3 0065 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Adapter + 15b3 0066 ConnectX-3 IB FDR10 Dual Port Mezzanine Card + 15b3 0067 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Adapter + 15b3 0071 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Mezzanine Card +# SVID = 15B3 SSID = 0078 + 15b3 0078 ConnectX-3 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 40 GbE Dual Port QSFP+ Adapter +# SVID = 15B3 SSID = 0080 + 15b3 0080 ConnectX-3 10 GbE Dual Port SFP+ Adapter 1004 MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] 1005 MT27510 Family 1006 MT27511 Family @@ -18111,6 +18155,9 @@ 117c 0091 FastFrame NQ42 117c 0092 FastFrame NQ11 117c 0093 FastFrame NQ12 + 15b3 0078 ConnectX-3 Pro 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 Pro 40 GbE Dual Port QSFP+ Adapter + 15b3 0080 ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter 1009 MT27530 Family 100a MT27531 Family 100b MT27540 Family @@ -18122,8 +18169,16 @@ 1011 MT27600 [Connect-IB] 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] + 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 + 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter + 15b3 0034 ConnectX-4 VPI IB EDR/100 GbE Dual Port QSFP28 Adapter + 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter + 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb + 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G + 15b3 0025 ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC 1016 MT27710 Family [ConnectX-4 Lx Virtual Function] 1017 MT27800 Family [ConnectX-5] 1018 MT27800 Family [ConnectX-5 Virtual Function] @@ -18711,6 +18766,7 @@ 0033 AR958x 802.11abgn Wireless Network Adapter 168c a120 AR9582 802.11a/n WLAN Mini-PCIe Adapter 0034 AR9462 Wireless Network Adapter + 1028 020b Wireless 1601 802.11abgn Adapter 1028 0300 Wireless 1802 802.11abgn Adapter 1a56 2003 Killer Wireless-N 1202 Half-size Mini PCIe Card 0036 QCA9565 / AR9565 Wireless Network Adapter @@ -20220,7 +20276,12 @@ 1af4 1100 QEMU Virtual Machine 0006 PCI Rocker Ethernet switch device 0007 PCI SD Card Host Controller Interface + 0008 QEMU PCIe Host bridge + 0009 QEMU PCI Expander bridge 000a PCI-PCI bridge (multiseat) + 000b QEMU PCIe Expander bridge + 000c QEMU PCIe Root port + 000d QEMU XHCI Host Controller 0100 QXL paravirtual graphic card 1af4 1100 QEMU Virtual Machine 1b37 Signal Processing Devices Sweden AB @@ -20446,6 +20507,8 @@ 0006 ExaNIC X10-HPT 1cf7 Subspace Dynamics 1d00 Pure Storage +1d18 RME + 0001 Fireface UFX+ 1d1d CNEX Labs 1f1f QEMU NVM Express LightNVM Controller 2807 8800 series NVMe SSD @@ -20460,6 +20523,7 @@ 1d44 DPT a400 PM2x24/PM3224 1d49 Lenovo +1d4c Diamanti, Inc. 1d5c Fantasia Trading LLC 1d61 Technobox, Inc. 1d62 Nebbiolo Technologies @@ -21148,10 +21212,13 @@ 0001 I-30xx Scanner Interface 5555 Genroco, Inc 0003 TURBOstor HFP-832 [HiPPI NIC] + 3b00 Epiphan DVI2PCIe video capture card 5646 Vector Fabrics BV 5654 VoiceTronix Pty Ltd 5678 Dawicontrol Computersysteme GmbH 5700 Netpower +# alternately Extreme Engineering Solutions, Inc. +5845 X-ES, Inc. 584d AuzenTech Co., Ltd. 5851 Exacq Technologies 8008 tDVR8008 8-port video capture card @@ -21261,7 +21328,7 @@ 8086 1315 Centrino Wireless-N 1000 BGN 8086 1316 Centrino Wireless-N 1000 BG 0085 Centrino Advanced-N 6205 [Taylor Peak] - 8086 1311 Centrino Advanced-N 6205 AGN + 8086 1311 Centrino Advanced-N 6205 (802.11a/b/g/n) 8086 1316 Centrino Advanced-N 6205 ABG 0087 Centrino Advanced-N + WiMAX 6250 [Kilmer Peak] 8086 1301 Centrino Advanced-N + WiMAX 6250 2x2 AGN @@ -21307,6 +21374,7 @@ 1028 04da Vostro 3750 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 144d c652 NP300E5C series laptop + 17aa 21cf ThinkPad T520 0105 Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 0106 2nd Generation Core Processor Family Integrated Graphics Controller @@ -21324,6 +21392,7 @@ 0122 2nd Generation Core Processor Family Integrated Graphics Controller 0126 2nd Generation Core Processor Family Integrated Graphics Controller 1028 04cc Vostro 3350 + 17aa 21cf ThinkPad T520 0150 Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller 1043 84ca P8 series motherboard 15d9 0624 X9SCM-F Motherboard @@ -22821,8 +22890,9 @@ 4c53 1090 Cx9/Vx9 mainboard 1462 82870P2 P64H2 Hot Plug Controller 1501 82567V-3 Gigabit Network Connection - 1502 82579LM Gigabit Network Connection + 1502 82579LM Gigabit Network Connection (Lewisville) 1028 04a3 Precision M4600 + 17aa 21ce ThinkPad T520 8086 357a Server Board S1200BTS 1503 82579V Gigabit Network Connection 1043 849c P8P67 Deluxe Motherboard @@ -22961,6 +23031,8 @@ 1059 0111 T4007 1GbE interface 1059 0120 T4008 1GbE interface 1059 0130 T4009 1GbE interface + 1059 0140 T2035 1GbE interface + 1059 0150 RD-01068 1GbE interface 1538 I210 Gigabit Network Connection 1539 I211 Gigabit Network Connection 153a Ethernet Connection I217-LM @@ -23021,8 +23093,8 @@ 1028 1f99 Ethernet 10G 4P X710/I350 rNDC 1028 1f9c Ethernet 10G 4P X710 SFP+ rNDC 103c 0000 Ethernet 10Gb 562SFP+ Adapter - 103c 22fc HP Ethernet 10Gb 2-port 562FLR-SFP+ Adapter - 103c 22fd HP Ethernet 10Gb 2-port 562SFP+ Adapter + 103c 22fc Ethernet 10Gb 2-port 562FLR-SFP+ Adapter + 103c 22fd Ethernet 10Gb 2-port 562SFP+ Adapter 1137 0000 Ethernet Converged NIC X710-DA 1137 013b Ethernet Converged NIC X710-DA4 1137 020a Ethernet Converged NIC X710-DA2 @@ -23044,9 +23116,11 @@ 8086 000a Ethernet Controller X710 for 10GbE SFP+ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ + 8086 000e Ethernet Server Adapter OCP X710-2 8086 0010 Ethernet Converged Network Adapter X710 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ + 8086 4007 Ethernet Controller X710 for 10GbE SFP+ 1575 DSL6340 Thunderbolt 3 NHI [Alpine Ridge 2C 2015] 1576 DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015] 1577 DSL6540 Thunderbolt 3 NHI [Alpine Ridge 4C 2015] @@ -23060,6 +23134,7 @@ 1028 0000 Ethernet 10G X710-k bNDC 1028 1f98 Ethernet 10G 4P X710-k bNDC 1028 1f9e Ethernet 10G 2P X710-k bNDC + 1059 0150 RD-01068 10GbE-KR interface 1590 0000 Ethernet 2-port 563i Adapter 1590 00f8 Ethernet 2-port 563i Adapter 8086 0000 Ethernet Converged Network Adapter XL710-Q2 @@ -23087,8 +23162,8 @@ 108e 0000 Ethernet Controller X710 for 10GBASE-T 108e 4857 Ethernet Controller X710 for 10GBASE-T 1587 Ethernet Controller XL710 for 20GbE backplane - 103c 0000 HPE Ethernet 10/20Gb 2-port 660FLB Adapter - 103c 22fe HPE Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 0000 Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 22fe Ethernet 10/20Gb 2-port 660FLB Adapter 1588 Ethernet Controller XL710 for 20GbE backplane 103c 0000 Ethernet 10/20Gb 2-port 660M Adapter 103c 22ff Ethernet 10/20Gb 2-port 660M Adapter @@ -23099,6 +23174,7 @@ 8086 0001 Ethernet Converged Network Adapter X710-T4 8086 0002 Ethernet Converged Network Adapter X710-T4 8086 0003 Ethernet Converged Network Adapter X710-T + 8086 00a0 Ethernet Converged Network Adapter X710-T4 8086 1003 Ethernet Converged Network Adapter X710-T 158a Ethernet Controller XXV710 for 25GbE backplane 158b Ethernet Controller XXV710 for 25GbE SFP28 @@ -23111,6 +23187,7 @@ 8086 0006 Ethernet Network Adapter OCP XXV710-2 8086 0007 Ethernet Network Adapter OCP XXV710-1 8086 0008 Ethernet Network Adapter OCP XXV710-1 + 8086 4001 Ethernet Network Adapter XXV710-2 15a0 Ethernet Connection (2) I218-LM 15a1 Ethernet Connection (2) I218-V 15a2 Ethernet Connection (3) I218-LM @@ -23121,6 +23198,7 @@ 15a9 X552 Virtual Function 15aa Ethernet Connection X552 10 GbE Backplane 1059 0120 T4008 10GbE interface + 1059 0150 RD-01068 10GbE interface 15ab Ethernet Connection X552 10 GbE Backplane 15ac Ethernet Connection X552 10 GbE SFP+ 15ad Ethernet Connection X552/X557-AT 10GBASE-T @@ -23192,6 +23270,7 @@ 163b Broadwell-U Integrated Graphics 163d Broadwell-U Integrated Graphics 163e Broadwell-U Integrated Graphics + 1889 Ethernet Adaptive Virtual Function 1900 Skylake Host Bridge/DRAM Registers 1901 Skylake PCIe Controller (x16) 1902 HD Graphics 510 @@ -23294,37 +23373,43 @@ 1b48 82597EX 10GbE Ethernet Controller 8086 a01f PRO/10GbE LR Server Adapter 8086 a11f PRO/10GbE LR Server Adapter - 1c00 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c01 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c02 6 Series/C200 Series Chipset Family SATA AHCI Controller + 1c00 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 0-3) + 1c01 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 0-3) + 1c02 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller 1028 04aa XPS 8300 1043 844d P8 series motherboard 8086 7270 Server Board S1200BTS - 1c03 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller + 1c03 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller 1028 04a3 Precision M4600 1028 04b2 Vostro 3350 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] - 1c04 6 Series/C200 Series Chipset Family SATA RAID Controller + 1c04 6 Series/C200 Series Desktop SATA RAID Controller 103c 3118 Smart Array B110i SATA RAID Controller - 1c05 6 Series/C200 Series Chipset Family SATA RAID Controller - 1c08 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller - 1c09 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller + 1c05 6 Series/C200 Series Mobile SATA RAID Controller + 1c06 Z68 Express Chipset SATA RAID Controller + 1c08 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 4-5) + 1c09 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 4-5) 1c10 6 Series/C200 Series Chipset Family PCI Express Root Port 1 1028 04aa XPS 8300 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c12 6 Series/C200 Series Chipset Family PCI Express Root Port 2 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c14 6 Series/C200 Series Chipset Family PCI Express Root Port 3 1028 04da Vostro 3750 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c16 6 Series/C200 Series Chipset Family PCI Express Root Port 4 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 1c18 6 Series/C200 Series Chipset Family PCI Express Root Port 5 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS 1c1a 6 Series/C200 Series Chipset Family PCI Express Root Port 6 1028 04da Vostro 3750 @@ -23340,6 +23425,7 @@ 1028 04da Vostro 3750 1043 8418 P8P67 Deluxe Motherboard 1043 841b P8H67 Series Motherboard + 17aa 21cf ThinkPad T520 # Realtek ALC888 audio codec 8086 2008 DQ67SW board 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23349,6 +23435,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c24 6 Series/C200 Series Chipset Family Thermal Management Controller 1c25 6 Series/C200 Series Chipset Family DMI to PCI Bridge @@ -23358,6 +23445,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c27 6 Series/C200 Series Chipset Family USB Universal Host Controller #1 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23369,6 +23457,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c33 6 Series/C200 Series Chipset Family LAN Controller 1c35 6 Series/C200 Series Chipset Family VECI Controller @@ -23378,6 +23467,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c3b 6 Series/C200 Series Chipset Family MEI Controller #2 1c3c 6 Series/C200 Series Chipset Family IDE-r Controller @@ -23405,6 +23495,7 @@ 1c4e Q67 Express Chipset Family LPC Controller 1c4f QM67 Express Chipset Family LPC Controller 1028 04a3 Precision M4600 + 17aa 21cf ThinkPad T520 1c50 B65 Express Chipset Family LPC Controller 1c51 6 Series/C200 Series Chipset Family LPC Controller 1c52 C202 Chipset Family LPC Controller @@ -23532,12 +23623,12 @@ 1e1e 7 Series/C210 Series Chipset Family PCI Express Root Port 8 1849 1e1e Motherboard 1e20 7 Series/C216 Chipset Family High Definition Audio Controller - 1028 054b Dell XPS One 2710 + 1028 054b XPS One 2710 1043 108d VivoBook X202EV 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A 1043 8415 P8H77-I Motherboard - 1043 8445 ASUS P8Z77-V LX Motherboard + 1043 8445 P8Z77-V LX Motherboard 144d c652 NP300E5C series laptop 1849 1898 Z77 Extreme4 motherboard 1e22 7 Series/C216 Chipset Family SMBus Controller @@ -23685,10 +23776,10 @@ 201c Sky Lake-E Non-Transparent Bridge Registers 2021 Sky Lake-E CBDMA Registers 2024 Sky Lake-E MM/Vt-d Configuration Registers - 2030 Sky Lake-E PCI Express Root Port 1A - 2031 Sky Lake-E PCI Express Root Port 1B - 2032 Sky Lake-E PCI Express Root Port 1C - 2033 Sky Lake-E PCI Express Root Port 1D + 2030 Sky Lake-E PCI Express Root Port A + 2031 Sky Lake-E PCI Express Root Port B + 2032 Sky Lake-E PCI Express Root Port C + 2033 Sky Lake-E PCI Express Root Port D 2035 Sky Lake-E RAS Configuration Registers 204c Sky Lake-E M3KTI Registers 204d Sky Lake-E M3KTI Registers @@ -24533,7 +24624,7 @@ 258a E7221 Integrated Graphics Controller 2590 Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller 1014 0575 ThinkPad X41 / Z60t - 1028 0182 Dell Latitude C610 + 1028 0182 Latitude C610 103c 0934 Compaq nw8240/nx8220 103c 099c NX6110/NC6120 104d 81b7 Vaio VGN-S3XP @@ -24822,7 +24913,7 @@ 1014 05b7 ThinkPad Z60t # based on the PTGD1-LA motherboard 103c 2a09 PufferM-UL8E - 1043 1173 Asus A6VC + 1043 1173 A6VC 1043 814e P5GD1-VW Mainboard 1462 7028 915P/G Neo2 1af4 1100 QEMU Virtual Machine @@ -24848,7 +24939,7 @@ 1028 0177 Dimension 8400 1028 0179 Optiplex GX280 1028 0182 Latitude D610 Laptop - 1028 0187 Dell Precision M70 Laptop + 1028 0187 Precision M70 Laptop 1028 0188 Inspiron 6000 laptop 103c 0934 Compaq nw8240/nx8220 103c 0944 Compaq NC6220 @@ -25222,7 +25313,7 @@ 103c 30a3 Compaq nw8440 103c 30d5 530 Laptop 1043 1123 A6J-Q008 - 1043 13c4 Asus G2P + 1043 13c4 G2P 1043 817f P5LD2-VM Mainboard (Realtek ALC 882 codec) 1043 8290 P5KPL-VM Motherboard 1043 82ea P5KPL-CM Motherboard @@ -25240,7 +25331,7 @@ 152d 0753 Softmodem 1734 10ad Conexant softmodem SmartCP 17aa 2010 ThinkPad R60/T60/X60 series - 17aa 3802 Lenovo 3000 C200 audio [Realtek ALC861VD] + 17aa 3802 3000 C200 audio [Realtek ALC861VD] 8086 1112 DeskTop Board D945GTP 8086 27d8 DeskTop Board D945GTP 8086 d618 DeskTop Board D510MO @@ -25311,6 +25402,7 @@ 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E + 17aa 20a5 ThinkPad R61 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2820 82801H (ICH8 Family) 4 port SATA Controller [IDE mode] 1028 01da OptiPlex 745 @@ -25337,6 +25429,7 @@ 2828 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [IDE mode] 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b + 17aa 20a8 ThinkPad R61 e4bf cc47 CCG-RUMBA 2829 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] 1025 0121 Aspire 5920G @@ -25353,7 +25446,7 @@ 1028 040b Latitude E6510 e4bf 50c1 PC1-GROOVE 2830 82801H (ICH8 Family) USB UHCI Controller #1 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25413,7 +25506,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2835 82801H (ICH8 Family) USB UHCI Controller #5 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25441,7 +25534,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 283a 82801H (ICH8 Family) USB2 EHCI Controller #2 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25496,14 +25589,14 @@ 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theather) 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 - 1028 01f9 Dell Latitude D630 - 1028 01ff Dell Precision M4300 + 1028 01f9 Latitude D630 + 1028 01ff Precision M4300 1028 0256 Studio 1735 103c 2802 Compaq dc7700p 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 - 1043 1339 Asus M51S series + 1043 1339 M51S series 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E 104d 9008 Vaio VGN-SZ79SN_C @@ -25843,7 +25936,7 @@ 29f7 3200/3210 Chipset Serial KT Controller 29f9 3210 Chipset Host-Secondary PCI Express Bridge 2a00 Mobile PM965/GM965/GL960 Memory Controller Hub - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p @@ -25862,16 +25955,16 @@ 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a03 Mobile GM965/GL960 Integrated Graphics Controller (secondary) 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a04 Mobile PM965/GM965 MEI Controller 103c 30c1 Compaq 6910p @@ -26074,7 +26167,7 @@ 2e16 4 Series Chipset PT IDER Controller 2e17 4 Series Chipset Serial KT Controller 2e20 4 Series Chipset DRAM Controller - 1028 0283 Dell Vostro 220 + 1028 0283 Vostro 220 1043 82d3 P5Q Deluxe Motherboard 1458 5000 GA-EP45-DS5/GA-EG45M-DS2H Motherboard 2e21 4 Series Chipset PCI Express Root Port @@ -26585,16 +26678,20 @@ 37d1 Ethernet Connection X722 for 1GbE 1590 0216 Ethernet 1Gb 2-port 368i Adapter 1590 0217 Ethernet 1Gb 2-port 368FLR-MMT Adapter + 1590 0247 Ethernet 1Gb 4-port 369i Adapter 17aa 4020 Intel Ethernet Connection X722 for 1GbE 17aa 4021 Intel Ethernet Connection X722 for 1GbE 17aa 4022 Intel Ethernet Connection X722 for 1GbE 37d2 Ethernet Connection X722 for 10GBASE-T + 14cd 0030 Ethernet OCP 2x10G RJ45 Phy Card [USI-X557-10GbaseT] 1590 0218 Ethernet 10Gb 2-port 568FLR-MMT Adapter - 17aa 4020 Intel Ethernet Connection X722 for 10GBASE - 17aa 4021 Intel Ethernet Connection X722 for 10GBASE + 17aa 4020 Ethernet Connection X722 for 10GBASE-T + 17aa 4021 Ethernet Connection X722 for 10GBASE-T 17aa 4022 Ethernet Connection X722 for 10GBASE-T 37d3 Ethernet Connection X722 for 10GbE SFP+ 1590 0219 Ethernet 10Gb 2-port 568FLR-MMSFP+ Adapter + 17aa 4020 Ethernet Connection X722 for 10GbE SFP+ + 17aa 4021 Ethernet Connection X722 for 10GbE SFP+ 37d4 Ethernet Connection X722 for 10GbE QSFP+ 37d9 X722 Hyper-V Virtual Function 3a00 82801JD/DO (ICH10 Family) 4-port SATA IDE Controller @@ -26865,7 +26962,7 @@ 1028 02da OptiPlex 980 1028 040a Latitude E6410 1028 040b Latitude E6510 - 1043 1373 ASUSTek G73-series gaming laptop + 1043 1373 G73-series gaming laptop 144d c06a R730 Laptop 15d9 060d C7SIM-Q Motherboard 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] @@ -27013,7 +27110,7 @@ 4224 PRO/Wireless 2915ABG [Calexico2] Network Connection 4227 PRO/Wireless 3945ABG [Golan] Network Connection 8086 1010 ThinkPad R60e - 8086 1011 ThinkPad T60/R60e/X60s + 8086 1011 ThinkPad T60/R60e/X60s/R61 8086 1014 PRO/Wireless 3945BG Network Connection 4229 PRO/Wireless 4965 AG or AGN [Kedron] Network Connection 8086 1100 Vaio VGN-SZ79SN_C @@ -27132,6 +27229,8 @@ 5845 QEMU NVM Express Controller 1af4 1100 QEMU Virtual Machine 5902 HD Graphics 610 + 590f Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers + 5910 Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers 5912 HD Graphics 630 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit @@ -28223,7 +28322,7 @@ 9004 7888 AHA-2930UW SCSI Controller 8b78 ABA-1030 ec78 AHA-4944W/UW -# acquired by PMC-Sierra +# acquired by Microsemi 9005 Adaptec 0010 AHA-2940U2/U2W 9005 2180 AHA-2940U2 SCSI Controller @@ -28835,9 +28934,11 @@ f1d0 AJA Video cafe Kona SD cfee Xena LS/SD-22-DA/SD-DA daff KONA LHi + db01 Corvid22 db09 Corvid 24 dcaf Kona HD dfee Xena HD-DA + eb0e Corvid 44 efac Xena SD-MM/SD-22-MM facd Xena HD-MM f5f5 F5 Networks, Inc. From owner-svn-src-all@freebsd.org Sat May 27 11:41:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBD4DD84793; Sat, 27 May 2017 11:41:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B795163A; Sat, 27 May 2017 11:41:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RBfsrI074330; Sat, 27 May 2017 11:41:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RBfsEk074329; Sat, 27 May 2017 11:41:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271141.v4RBfsEk074329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 11:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318986 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 11:41:55 -0000 Author: bapt Date: Sat May 27 11:41:54 2017 New Revision: 318986 URL: https://svnweb.freebsd.org/changeset/base/318986 Log: add a comment on vendor index 19 and 20 to avoid confusion Suggested by: tsoome Modified: head/lib/libstand/bootp.c Modified: head/lib/libstand/bootp.c ============================================================================== --- head/lib/libstand/bootp.c Sat May 27 11:25:21 2017 (r318985) +++ head/lib/libstand/bootp.c Sat May 27 11:41:54 2017 (r318986) @@ -147,7 +147,9 @@ bootp(int sock, int flag) bp->bp_vend[8] = 9; bcopy("PXEClient", &bp->bp_vend[9], 9); bp->bp_vend[18] = TAG_USER_CLASS; + /* len of each user class + number of user class */ bp->bp_vend[19] = 8; + /* len of the first user class */ bp->bp_vend[20] = 7; bcopy("FREEBSD", &bp->bp_vend[21], 7); bp->bp_vend[28] = TAG_PARAM_REQ; From owner-svn-src-all@freebsd.org Sat May 27 12:06:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2100FD84C2B; Sat, 27 May 2017 12:06:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D82281925; Sat, 27 May 2017 12:06:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RC6qZR084339; Sat, 27 May 2017 12:06:52 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RC6qCs084338; Sat, 27 May 2017 12:06:52 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271206.v4RC6qCs084338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 12:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318987 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 12:06:54 -0000 Author: bapt Date: Sat May 27 12:06:52 2017 New Revision: 318987 URL: https://svnweb.freebsd.org/changeset/base/318987 Log: Support URI scheme for root-path in netbooting Rather that previous attempts to add tftpfs support at the same time as NFS support. This time decide on a proper URI parser rather than hacks. root-path can now be define the following way: For tftpfs: tftp://ip/path tftp:/path (this one will consider the tftp server is the same as the one where the pxeboot file was fetched from) For nfs: nfs:/path nfs://ip/path The historical ip:/path /path are kept on NFS Reviewed by: tsoom, rgrimes Differential Revision: https://reviews.freebsd.org/D10947 Modified: head/sys/boot/common/dev_net.c Modified: head/sys/boot/common/dev_net.c ============================================================================== --- head/sys/boot/common/dev_net.c Sat May 27 11:41:54 2017 (r318986) +++ head/sys/boot/common/dev_net.c Sat May 27 12:06:52 2017 (r318987) @@ -97,6 +97,14 @@ struct devsw netdev = { net_cleanup }; +static struct uri_scheme { + const char *scheme; + int proto; +} uri_schemes[] = { + { "tftp:/", NET_TFTP }, + { "nfs:/", NET_NFS }, +}; + static int net_init(void) { @@ -334,11 +342,8 @@ net_getparams(int sock) return (EIO); } exit: - netproto = NET_TFTP; - if ((rootaddr = net_parse_rootpath()) != INADDR_NONE) { - netproto = NET_NFS; + if ((rootaddr = net_parse_rootpath()) != INADDR_NONE) rootip.s_addr = rootaddr; - } #ifdef NETIF_DEBUG if (debug) { @@ -387,14 +392,51 @@ net_print(int verbose) uint32_t net_parse_rootpath() { - n_long addr = INADDR_NONE; - char *ptr; + n_long addr = htonl(INADDR_NONE); + size_t i; + char ip[FNAME_SIZE]; + char *ptr, *val; + + netproto = NET_NONE; + + for (i = 0; i < nitems(uri_schemes); i++) { + if (strncmp(rootpath, uri_schemes[i].scheme, + strlen(uri_schemes[i].scheme)) != 0) + continue; + netproto = uri_schemes[i].proto; + break; + } ptr = rootpath; - (void)strsep(&ptr, ":"); - if (ptr != NULL) { - addr = inet_addr(rootpath); - bcopy(ptr, rootpath, strlen(ptr) + 1); + /* Fallback for compatibility mode */ + if (netproto == NET_NONE) { + netproto = NET_NFS; + (void)strsep(&ptr, ":"); + if (ptr != NULL) { + addr = inet_addr(rootpath); + bcopy(ptr, rootpath, strlen(ptr) + 1); + } + } else { + ptr += strlen(uri_schemes[i].scheme); + if (*ptr == '/') { + /* we are in the form ://, we do expect an ip */ + ptr++; + /* + * XXX when http will be there we will need to check for + * a port, but right now we do not need it yet + */ + val = strchr(ptr, '/'); + if (val != NULL) { + snprintf(ip, sizeof(ip), "%.*s", + (int)((uintptr_t)val - (uintptr_t)ptr), ptr); + printf("%s\n", ip); + addr = inet_addr(ip); + bcopy(val, rootpath, strlen(val) + 1); + } + } else { + ptr--; + bcopy(ptr, rootpath, strlen(ptr) + 1); + } } return (addr); From owner-svn-src-all@freebsd.org Sat May 27 12:20:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46410D84EC9; Sat, 27 May 2017 12:20:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 169A31F2A; Sat, 27 May 2017 12:20:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RCKECA088592; Sat, 27 May 2017 12:20:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RCKESw088591; Sat, 27 May 2017 12:20:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271220.v4RCKESw088591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 12:20:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318988 - head/sys/boot/i386/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 12:20:15 -0000 Author: bapt Date: Sat May 27 12:20:13 2017 New Revision: 318988 URL: https://svnweb.freebsd.org/changeset/base/318988 Log: Always build tftpfs support along with nfs for pxeboot This change was already done for loader.efi Modified: head/sys/boot/i386/loader/Makefile Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Sat May 27 12:06:52 2017 (r318987) +++ head/sys/boot/i386/loader/Makefile Sat May 27 12:20:13 2017 (r318988) @@ -10,6 +10,8 @@ INTERNALPROG= NEWVERSWHAT?= "bootstrap loader" x86 VERSION_FILE= ${.CURDIR}/../loader/version LOADER_NET_SUPPORT?= yes +LOADER_NFS_SUPPORT?= yes +LOADER_TFTP_SUPPORT?= yes # architecture-specific loader code SRCS= main.c conf.c vers.c @@ -30,10 +32,10 @@ LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsb CFLAGS+= -I${.CURDIR}/../../../../lib/libstand .endif -# Enable PXE TFTP or NFS support, not both. .if defined(LOADER_TFTP_SUPPORT) CFLAGS+= -DLOADER_TFTP_SUPPORT -.else +.endif +.if defined(LOADER_NFS_SUPPORT) CFLAGS+= -DLOADER_NFS_SUPPORT .endif From owner-svn-src-all@freebsd.org Sat May 27 12:35:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 307B7D856BD; Sat, 27 May 2017 12:35:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5C1418CF; Sat, 27 May 2017 12:35:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RCZ1SG096599; Sat, 27 May 2017 12:35:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RCZ1Ni096595; Sat, 27 May 2017 12:35:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271235.v4RCZ1Ni096595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 12:35:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318989 - in head: lib/libstand sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 12:35:03 -0000 Author: bapt Date: Sat May 27 12:35:01 2017 New Revision: 318989 URL: https://svnweb.freebsd.org/changeset/base/318989 Log: Always issue the pxe request All the code are now only issueing one single dhcp request at startup of the loader meaning we can always request a the PXE informations from the dhcp server. Previous code lost that information, meaning no option 55 anymore (meaning not working with the kea dhcp server) and no request for rootpath etc, no user class Remove the flags from the bootp function which is not needed anymore Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D10952 Modified: head/lib/libstand/bootp.c head/lib/libstand/bootp.h head/lib/libstand/net.h head/sys/boot/common/dev_net.c Modified: head/lib/libstand/bootp.c ============================================================================== --- head/lib/libstand/bootp.c Sat May 27 12:20:13 2017 (r318988) +++ head/lib/libstand/bootp.c Sat May 27 12:35:01 2017 (r318989) @@ -95,7 +95,7 @@ size_t bootp_response_size; /* Fetch required bootp infomation */ void -bootp(int sock, int flag) +bootp(int sock) { void *pkt; struct iodesc *d; @@ -138,32 +138,29 @@ bootp(int sock, int flag) bp->bp_vend[6] = DHCPDISCOVER; /* - * If we are booting from PXE, we want to send the string + * We are booting from PXE, we want to send the string * 'PXEClient' to the DHCP server so you have the option of * only responding to PXE aware dhcp requests. */ - if (flag & BOOTP_PXE) { - bp->bp_vend[7] = TAG_CLASSID; - bp->bp_vend[8] = 9; - bcopy("PXEClient", &bp->bp_vend[9], 9); - bp->bp_vend[18] = TAG_USER_CLASS; - /* len of each user class + number of user class */ - bp->bp_vend[19] = 8; - /* len of the first user class */ - bp->bp_vend[20] = 7; - bcopy("FREEBSD", &bp->bp_vend[21], 7); - bp->bp_vend[28] = TAG_PARAM_REQ; - bp->bp_vend[29] = 7; - bp->bp_vend[30] = TAG_ROOTPATH; - bp->bp_vend[31] = TAG_HOSTNAME; - bp->bp_vend[32] = TAG_SWAPSERVER; - bp->bp_vend[33] = TAG_GATEWAY; - bp->bp_vend[34] = TAG_SUBNET_MASK; - bp->bp_vend[35] = TAG_INTF_MTU; - bp->bp_vend[36] = TAG_SERVERID; - bp->bp_vend[37] = TAG_END; - } else - bp->bp_vend[7] = TAG_END; + bp->bp_vend[7] = TAG_CLASSID; + bp->bp_vend[8] = 9; + bcopy("PXEClient", &bp->bp_vend[9], 9); + bp->bp_vend[18] = TAG_USER_CLASS; + /* len of each user class + number of user class */ + bp->bp_vend[19] = 8; + /* len of the first user class */ + bp->bp_vend[20] = 7; + bcopy("FREEBSD", &bp->bp_vend[21], 7); + bp->bp_vend[28] = TAG_PARAM_REQ; + bp->bp_vend[29] = 7; + bp->bp_vend[30] = TAG_ROOTPATH; + bp->bp_vend[31] = TAG_HOSTNAME; + bp->bp_vend[32] = TAG_SWAPSERVER; + bp->bp_vend[33] = TAG_GATEWAY; + bp->bp_vend[34] = TAG_SUBNET_MASK; + bp->bp_vend[35] = TAG_INTF_MTU; + bp->bp_vend[36] = TAG_SERVERID; + bp->bp_vend[37] = TAG_END; #else bp->bp_vend[4] = TAG_END; #endif @@ -199,13 +196,10 @@ bootp(int sock, int flag) bp->bp_vend[20] = 4; leasetime = htonl(300); bcopy(&leasetime, &bp->bp_vend[21], 4); - if (flag & BOOTP_PXE) { - bp->bp_vend[25] = TAG_CLASSID; - bp->bp_vend[26] = 9; - bcopy("PXEClient", &bp->bp_vend[27], 9); - bp->bp_vend[36] = TAG_END; - } else - bp->bp_vend[25] = TAG_END; + bp->bp_vend[25] = TAG_CLASSID; + bp->bp_vend[26] = 9; + bcopy("PXEClient", &bp->bp_vend[27], 9); + bp->bp_vend[36] = TAG_END; expected_dhcpmsgtype = DHCPACK; Modified: head/lib/libstand/bootp.h ============================================================================== --- head/lib/libstand/bootp.h Sat May 27 12:20:13 2017 (r318988) +++ head/lib/libstand/bootp.h Sat May 27 12:35:01 2017 (r318989) @@ -124,12 +124,6 @@ struct bootp { #endif /* - * bootp flags - */ -#define BOOTP_NONE 0x0000 /* No flags */ -#define BOOTP_PXE 0x0001 /* Booting from PXE. */ - -/* * "vendor" data permitted for CMU bootp clients. */ Modified: head/lib/libstand/net.h ============================================================================== --- head/lib/libstand/net.h Sat May 27 12:20:13 2017 (r318988) +++ head/lib/libstand/net.h Sat May 27 12:35:01 2017 (r318989) @@ -119,7 +119,7 @@ ssize_t sendrecv(struct iodesc *, void **, void **); /* bootp/DHCP */ -void bootp(int, int); +void bootp(int); /* Utilities: */ char *ether_sprintf(u_char *); Modified: head/sys/boot/common/dev_net.c ============================================================================== --- head/sys/boot/common/dev_net.c Sat May 27 12:20:13 2017 (r318988) +++ head/sys/boot/common/dev_net.c Sat May 27 12:35:01 2017 (r318989) @@ -284,7 +284,7 @@ net_getparams(int sock) d->myip = myip; } if (rc < 0) - bootp(sock, BOOTP_NONE); + bootp(sock); } if (myip.s_addr != 0) goto exit; From owner-svn-src-all@freebsd.org Sat May 27 12:46:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D8C9D858DD; Sat, 27 May 2017 12:46:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8DE1D94; Sat, 27 May 2017 12:46:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RCkkbl001047; Sat, 27 May 2017 12:46:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RCkkoQ001046; Sat, 27 May 2017 12:46:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271246.v4RCkkoQ001046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 12:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318990 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 12:46:47 -0000 Author: bapt Date: Sat May 27 12:46:46 2017 New Revision: 318990 URL: https://svnweb.freebsd.org/changeset/base/318990 Log: Partially revert r314948 While it sounds like a good idea to extract the RFC1048 data from PXE, in the end it is not and it is causing lots of issues. Our pxeloader might need options which are incompatible with other pxe servers (for example iPXE, but not only). Our pxe loaders are also now settings their own user class, so it is useful to issue our own pxe request at startup Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D10953 Modified: head/sys/boot/common/dev_net.c Modified: head/sys/boot/common/dev_net.c ============================================================================== --- head/sys/boot/common/dev_net.c Sat May 27 12:35:01 2017 (r318989) +++ head/sys/boot/common/dev_net.c Sat May 27 12:46:46 2017 (r318990) @@ -256,7 +256,6 @@ net_getparams(int sock) { char buf[MAXHOSTNAMELEN]; n_long rootaddr, smask; - struct iodesc *d = socktodesc(sock); extern struct in_addr servip; #ifdef SUPPORT_BOOTP @@ -266,26 +265,8 @@ net_getparams(int sock) * be initialized. If any remain uninitialized, we will * use RARP and RPC/bootparam (the Sun way) to get them. */ - if (try_bootp) { - int rc = -1; - if (bootp_response != NULL) { - rc = dhcp_try_rfc1048(bootp_response->bp_vend, - bootp_response_size - - offsetof(struct bootp, bp_vend)); - - if (servip.s_addr == 0) - servip = bootp_response->bp_siaddr; - if (rootip.s_addr == 0) - rootip = bootp_response->bp_siaddr; - if (gateip.s_addr == 0) - gateip = bootp_response->bp_giaddr; - if (myip.s_addr == 0) - myip = bootp_response->bp_yiaddr; - d->myip = myip; - } - if (rc < 0) - bootp(sock); - } + if (try_bootp) + bootp(sock); if (myip.s_addr != 0) goto exit; #ifdef NETIF_DEBUG From owner-svn-src-all@freebsd.org Sat May 27 13:26:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81669D8215B; Sat, 27 May 2017 13:26:19 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 394511E4A; Sat, 27 May 2017 13:26:19 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RDQIkI017159; Sat, 27 May 2017 13:26:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RDQI5L017158; Sat, 27 May 2017 13:26:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271326.v4RDQI5L017158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 13:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318991 - head/sys/boot/i386/pxeldr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 13:26:19 -0000 Author: bapt Date: Sat May 27 13:26:18 2017 New Revision: 318991 URL: https://svnweb.freebsd.org/changeset/base/318991 Log: Document recent changes on pxeboot Modified: head/sys/boot/i386/pxeldr/pxeboot.8 Modified: head/sys/boot/i386/pxeldr/pxeboot.8 ============================================================================== --- head/sys/boot/i386/pxeldr/pxeboot.8 Sat May 27 12:46:46 2017 (r318990) +++ head/sys/boot/i386/pxeldr/pxeboot.8 Sat May 27 13:26:18 2017 (r318991) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2017 +.Dd May 27, 2017 .Dt PXEBOOT 8 .Os .Sh NAME @@ -39,6 +39,11 @@ configured to run under Intel's Preboot PXE is a form of smart boot ROM, built into Intel EtherExpress Pro/100 and 3Com 3c905c Ethernet cards, and Ethernet-equipped Intel motherboards. PXE supports DHCP configuration and provides low-level NIC access services. +.Pp +The DHCP client will set a DHCP user class named +.Va FREEBSD +to allow flexible configuration of the dhcp server. +.Pp The .Nm bootloader retrieves the kernel, modules, @@ -69,6 +74,9 @@ max-lease-time 120; subnet 10.0.0.0 netmask 255.255.255.0 { filename "pxeboot"; range 10.0.0.10 10.0.0.254; + if exists user-class and option user-class = "FREEBSD" { + option root-path "tftp://10.0.0.1/FreeBSD"; + } } .Ed @@ -85,6 +93,27 @@ expects to fetch .Pa /boot/loader.rc from the specified server before loading any other files. .Pp +Valid +.Va option root-path +Syntax is the following +.Bl -tag -width ://ip/path indent +.It /path +path to the root filesystem on the NFS server +.It ip:/path +path to the root filesystem on the NFS server +.Ar ip +.It nfs:/path +path to the root filesystem on the NFS server +.It nfs://ip/path +path to the root filesystem on the NFS server +.Ar ip +.It tftp:/path +path to the root filesystem on the TFTP server +.It tftp://ip/path +path to the root filesystem on the TFTP server +.Ar ip +.El +.Pp .Nm defaults to a conservative 1024 byte NFS data packet size. This may be changed by setting the From owner-svn-src-all@freebsd.org Sat May 27 13:51:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DE21D8288F; Sat, 27 May 2017 13:51:38 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45F48195A; Sat, 27 May 2017 13:51:38 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 6F1AE47BD; Sat, 27 May 2017 13:51:37 +0000 (UTC) Date: Sat, 27 May 2017 13:51:37 +0000 From: Alexey Dokuchaev To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318991 - head/sys/boot/i386/pxeldr Message-ID: <20170527135137.GA31549@FreeBSD.org> References: <201705271326.v4RDQI5L017158@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705271326.v4RDQI5L017158@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 13:51:38 -0000 On Sat, May 27, 2017 at 01:26:18PM +0000, Baptiste Daroussin wrote: > New Revision: 318991 > URL: https://svnweb.freebsd.org/changeset/base/318991 > > Log: > Document recent changes on pxeboot > > Modified: > head/sys/boot/i386/pxeldr/pxeboot.8 > ... > @@ -39,6 +39,11 @@ configured to run under Intel's Preboot > PXE is a form of smart boot ROM, built into Intel EtherExpress Pro/100 and > 3Com 3c905c Ethernet cards, and Ethernet-equipped Intel motherboards. > PXE supports DHCP configuration and provides low-level NIC access services. > +.Pp > +The DHCP client will set a DHCP user class named > +.Va FREEBSD > +to allow flexible configuration of the dhcp server. > +.Pp Inconsistent DHCP/dhcp spelling within a single sentence does not look good. ./danfe From owner-svn-src-all@freebsd.org Sat May 27 13:55:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 220EDD82AA1; Sat, 27 May 2017 13:55:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5AD31BA3; Sat, 27 May 2017 13:55:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RDtKdr029285; Sat, 27 May 2017 13:55:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RDtKav029284; Sat, 27 May 2017 13:55:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271355.v4RDtKav029284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 13:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318992 - head/sys/boot/i386/pxeldr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 13:55:22 -0000 Author: bapt Date: Sat May 27 13:55:20 2017 New Revision: 318992 URL: https://svnweb.freebsd.org/changeset/base/318992 Log: Capitalize DHCP Reported by: danfe Modified: head/sys/boot/i386/pxeldr/pxeboot.8 Modified: head/sys/boot/i386/pxeldr/pxeboot.8 ============================================================================== --- head/sys/boot/i386/pxeldr/pxeboot.8 Sat May 27 13:26:18 2017 (r318991) +++ head/sys/boot/i386/pxeldr/pxeboot.8 Sat May 27 13:55:20 2017 (r318992) @@ -42,7 +42,7 @@ PXE supports DHCP configuration and prov .Pp The DHCP client will set a DHCP user class named .Va FREEBSD -to allow flexible configuration of the dhcp server. +to allow flexible configuration of the DHCP server. .Pp The .Nm From owner-svn-src-all@freebsd.org Sat May 27 14:04:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8A19D82D32; Sat, 27 May 2017 14:04:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89C961032; Sat, 27 May 2017 14:04:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id BA2734A93; Sat, 27 May 2017 14:04:33 +0000 (UTC) Date: Sat, 27 May 2017 14:04:33 +0000 From: Alexey Dokuchaev To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318992 - head/sys/boot/i386/pxeldr Message-ID: <20170527140433.GB31549@FreeBSD.org> References: <201705271355.v4RDtKav029284@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705271355.v4RDtKav029284@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 14:04:34 -0000 On Sat, May 27, 2017 at 01:55:20PM +0000, Baptiste Daroussin wrote: > New Revision: 318992 > URL: https://svnweb.freebsd.org/changeset/base/318992 > > Log: > Capitalize DHCP Thank you. ./danfe From owner-svn-src-all@freebsd.org Sat May 27 14:06:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95B33D82DE0; Sat, 27 May 2017 14:06:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66346119E; Sat, 27 May 2017 14:06:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RE6vWs033256; Sat, 27 May 2017 14:06:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RE6veW033255; Sat, 27 May 2017 14:06:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271406.v4RE6veW033255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 14:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318993 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 14:06:58 -0000 Author: bapt Date: Sat May 27 14:06:57 2017 New Revision: 318993 URL: https://svnweb.freebsd.org/changeset/base/318993 Log: Use the usual FreeBSD spelling for the DHCP user class Reported by: lidl Modified: head/lib/libstand/bootp.c Modified: head/lib/libstand/bootp.c ============================================================================== --- head/lib/libstand/bootp.c Sat May 27 13:55:20 2017 (r318992) +++ head/lib/libstand/bootp.c Sat May 27 14:06:57 2017 (r318993) @@ -150,7 +150,7 @@ bootp(int sock) bp->bp_vend[19] = 8; /* len of the first user class */ bp->bp_vend[20] = 7; - bcopy("FREEBSD", &bp->bp_vend[21], 7); + bcopy("FreeBSD", &bp->bp_vend[21], 7); bp->bp_vend[28] = TAG_PARAM_REQ; bp->bp_vend[29] = 7; bp->bp_vend[30] = TAG_ROOTPATH; From owner-svn-src-all@freebsd.org Sat May 27 14:07:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0972CD82E7A; Sat, 27 May 2017 14:07:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF9001372; Sat, 27 May 2017 14:07:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RE7kuk033327; Sat, 27 May 2017 14:07:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RE7kij033326; Sat, 27 May 2017 14:07:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271407.v4RE7kij033326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 14:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318994 - head/sys/boot/i386/pxeldr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 14:07:48 -0000 Author: bapt Date: Sat May 27 14:07:46 2017 New Revision: 318994 URL: https://svnweb.freebsd.org/changeset/base/318994 Log: Catch with the change in the user class Modified: head/sys/boot/i386/pxeldr/pxeboot.8 Modified: head/sys/boot/i386/pxeldr/pxeboot.8 ============================================================================== --- head/sys/boot/i386/pxeldr/pxeboot.8 Sat May 27 14:06:57 2017 (r318993) +++ head/sys/boot/i386/pxeldr/pxeboot.8 Sat May 27 14:07:46 2017 (r318994) @@ -41,7 +41,7 @@ PXE is a form of smart boot ROM, built i PXE supports DHCP configuration and provides low-level NIC access services. .Pp The DHCP client will set a DHCP user class named -.Va FREEBSD +.Va FreeBSD to allow flexible configuration of the DHCP server. .Pp The From owner-svn-src-all@freebsd.org Sat May 27 16:40:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B87A4D83876; Sat, 27 May 2017 16:40:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A873192E; Sat, 27 May 2017 16:40:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RGe0R6095664; Sat, 27 May 2017 16:40:00 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RGe0v3095663; Sat, 27 May 2017 16:40:00 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201705271640.v4RGe0v3095663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 27 May 2017 16:40:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318995 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 16:40:01 -0000 Author: alc Date: Sat May 27 16:40:00 2017 New Revision: 318995 URL: https://svnweb.freebsd.org/changeset/base/318995 Log: In r118390, the swap pager's approach to striping swap allocation over multiple devices was changed. However, swapoff_one() was not fully and correctly converted. In particular, with r118390's introduction of a per- device blist, the maximum swap block size, "dmmax", became irrelevant to swapoff_one()'s operation. Moreover, swapoff_one() was performing out-of- range operations on the per-device blist that were silently ignored by blist_fill(). This change corrects both of these problems with swapoff_one(), which will allow us to potentially increase MAX_PAGEOUT_CLUSTER. Previously, swapoff_one() would panic inside of blist_fill() if you increased MAX_PAGEOUT_CLUSTER. Reviewed by: kib, markj MFC after: 3 days Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sat May 27 14:07:46 2017 (r318994) +++ head/sys/vm/swap_pager.c Sat May 27 16:40:00 2017 (r318995) @@ -2310,9 +2310,13 @@ swapoff_one(struct swdevt *sp, struct uc */ mtx_lock(&sw_dev_mtx); sp->sw_flags |= SW_CLOSING; - for (dvbase = 0; dvbase < sp->sw_end; dvbase += dmmax) { + for (dvbase = 0; dvbase < nblks; dvbase += BLIST_BMAP_RADIX) { + /* + * blist_fill() cannot allocate more than BLIST_BMAP_RADIX + * blocks per call. + */ swap_pager_avail -= blist_fill(sp->sw_blist, - dvbase, dmmax); + dvbase, ulmin(nblks - dvbase, BLIST_BMAP_RADIX)); } swap_total -= (vm_ooffset_t)nblks * PAGE_SIZE; mtx_unlock(&sw_dev_mtx); From owner-svn-src-all@freebsd.org Sat May 27 16:53:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45E99D83EC1; Sat, 27 May 2017 16:53:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08B871507; Sat, 27 May 2017 16:53:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RGrejg003786; Sat, 27 May 2017 16:53:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RGread003785; Sat, 27 May 2017 16:53:40 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705271653.v4RGread003785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 27 May 2017 16:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318996 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 16:53:41 -0000 Author: jhb Date: Sat May 27 16:53:39 2017 New Revision: 318996 URL: https://svnweb.freebsd.org/changeset/base/318996 Log: Add descriptions for AES-GCM IPSec authentication (AH) counters. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/usr.bin/netstat/ipsec.c Modified: head/usr.bin/netstat/ipsec.c ============================================================================== --- head/usr.bin/netstat/ipsec.c Sat May 27 16:40:00 2017 (r318995) +++ head/usr.bin/netstat/ipsec.c Sat May 27 16:53:39 2017 (r318996) @@ -141,6 +141,15 @@ static struct val2str ipsec_ahnames[] = #ifdef SADB_X_AALG_AES_XCBC_MAC { SADB_X_AALG_AES_XCBC_MAC, "aes-xcbc-mac", }, #endif +#ifdef SADB_X_AALG_AES128GMAC + { SADB_X_AALG_AES128GMAC, "aes-gmac-128", }, +#endif +#ifdef SADB_X_AALG_AES192GMAC + { SADB_X_AALG_AES192GMAC, "aes-gmac-192", }, +#endif +#ifdef SADB_X_AALG_AES256GMAC + { SADB_X_AALG_AES256GMAC, "aes-gmac-256", }, +#endif { -1, NULL }, }; From owner-svn-src-all@freebsd.org Sat May 27 17:00:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A5A5D84064; Sat, 27 May 2017 17:00:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05C461810; Sat, 27 May 2017 17:00:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RH0VmH004315; Sat, 27 May 2017 17:00:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RH0USD004310; Sat, 27 May 2017 17:00:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705271700.v4RH0USD004310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 27 May 2017 17:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318997 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfsclient kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 17:00:32 -0000 Author: kib Date: Sat May 27 17:00:30 2017 New Revision: 318997 URL: https://svnweb.freebsd.org/changeset/base/318997 Log: Use whole mnt_stat.f_fsid bits for st_dev. Since ino64 expanded dev_t to 64bit, make VOP_GETATTR(9) provide all bits of mnt_stat.f_fsid as va_fsid for vnodes on filesystems which use f_fsid. In particular, NFSv3 and sometimes NFSv4, and ZFS use this method or reporting st_dev by stat(2). Provide a new helper vn_fsid() to avoid duplicating code to copy f_fsid to va_fsid. Note that the change is mostly cosmetic. Its motivation is to avoid sign-extension of f_fsid[0] into 64bit dev_t value which happens after dev_t becomes 64bit.. Reviewed by: avg(zfs), rmacklem (nfs) (both for previous version) Sponsored by: The FreeBSD Foundation Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/fs/nfsclient/nfs_clport.c head/sys/kern/vfs_vnops.c head/sys/sys/vnode.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat May 27 16:53:39 2017 (r318996) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat May 27 17:00:30 2017 (r318997) @@ -497,7 +497,7 @@ zfsctl_common_getattr(vnode_t *vp, vattr vap->va_blksize = 0; vap->va_nblocks = 0; vap->va_seq = 0; - vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; + vn_fsid(vp, vap); vap->va_mode = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; vap->va_type = VDIR; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat May 27 16:53:39 2017 (r318996) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat May 27 17:00:30 2017 (r318997) @@ -2708,7 +2708,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i #ifdef illumos vap->va_fsid = zp->z_zfsvfs->z_vfs->vfs_dev; #else - vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; + vn_fsid(vp, vap); #endif vap->va_nodeid = zp->z_id; if ((vp->v_flag & VROOT) && zfs_show_ctldir(zp)) Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Sat May 27 16:53:39 2017 (r318996) +++ head/sys/fs/nfsclient/nfs_clport.c Sat May 27 17:00:30 2017 (r318997) @@ -490,14 +490,13 @@ nfscl_loadattrcache(struct vnode **vpp, * from the value used for the top level server volume * in the mounted subtree. */ - if (vp->v_mount->mnt_stat.f_fsid.val[0] != - (uint32_t)np->n_vattr.na_filesid[0]) - vap->va_fsid = (uint32_t)np->n_vattr.na_filesid[0]; - else - vap->va_fsid = (uint32_t)hash32_buf( + vn_fsid(vp, vap); + vap->va_fsid = np->n_vattr.na_filesid[0]; + if (vap->va_fsid == np->n_vattr.na_filesid[0]) + vap->va_fsid = hash32_buf( np->n_vattr.na_filesid, 2 * sizeof(uint64_t), 0); } else - vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; + vn_fsid(vp, vap); np->n_attrstamp = time_second; if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat May 27 16:53:39 2017 (r318996) +++ head/sys/kern/vfs_vnops.c Sat May 27 17:00:30 2017 (r318997) @@ -2493,3 +2493,14 @@ vn_mmap(struct file *fp, vm_map_t map, v #endif return (error); } + +void +vn_fsid(struct vnode *vp, struct vattr *va) +{ + fsid_t *f; + + f = &vp->v_mount->mnt_stat.f_fsid; + va->va_fsid = (uint32_t)f->val[1]; + va->va_fsid <<= sizeof(f->val[1]) * NBBY; + va->va_fsid += (uint32_t)f->val[0]; +} Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sat May 27 16:53:39 2017 (r318996) +++ head/sys/sys/vnode.h Sat May 27 17:00:30 2017 (r318997) @@ -885,6 +885,8 @@ int vn_chmod(struct file *fp, mode_t mod int vn_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, struct thread *td); +void vn_fsid(struct vnode *vp, struct vattr *va); + #endif /* _KERNEL */ #endif /* !_SYS_VNODE_H_ */ From owner-svn-src-all@freebsd.org Sat May 27 18:01:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53321D852D5; Sat, 27 May 2017 18:01:16 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 238A81734; Sat, 27 May 2017 18:01:16 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RI1FCk030869; Sat, 27 May 2017 18:01:15 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RI1FV7030868; Sat, 27 May 2017 18:01:15 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705271801.v4RI1FV7030868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 27 May 2017 18:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318998 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 18:01:16 -0000 Author: cy Date: Sat May 27 18:01:14 2017 New Revision: 318998 URL: https://svnweb.freebsd.org/changeset/base/318998 Log: Fix return value of ip_sync_nat. Previously, regardless of error it always returned a return code of 0. Obtained from: NetBSD ip_sync.c r1.5 MFC after: 1 week Modified: head/sys/contrib/ipfilter/netinet/ip_sync.c Modified: head/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_sync.c Sat May 27 17:00:30 2017 (r318997) +++ head/sys/contrib/ipfilter/netinet/ip_sync.c Sat May 27 18:01:14 2017 (r318998) @@ -939,7 +939,7 @@ ipf_sync_nat(softc, sp, data) nat_t *n, *nat; synclist_t *sl; u_int hv = 0; - int err; + int err = 0; READ_ENTER(&softs->ipf_syncnat); @@ -1016,7 +1016,7 @@ ipf_sync_nat(softc, sp, data) } RWLOCK_EXIT(&softs->ipf_syncnat); - return 0; + return err; } From owner-svn-src-all@freebsd.org Sat May 27 18:46:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAEACD85B98; Sat, 27 May 2017 18:46:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2C2C1909; Sat, 27 May 2017 18:46:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RIk0Af049070; Sat, 27 May 2017 18:46:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RIk0ks049069; Sat, 27 May 2017 18:46:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271846.v4RIk0ks049069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 18:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318999 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 18:46:02 -0000 Author: bapt Date: Sat May 27 18:46:00 2017 New Revision: 318999 URL: https://svnweb.freebsd.org/changeset/base/318999 Log: Update the comments concerning net_parse_rootpath to reflect what it is now really doing Reported by: rgrimes Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D10959 Modified: head/sys/boot/common/dev_net.c Modified: head/sys/boot/common/dev_net.c ============================================================================== --- head/sys/boot/common/dev_net.c Sat May 27 18:01:14 2017 (r318998) +++ head/sys/boot/common/dev_net.c Sat May 27 18:46:00 2017 (r318999) @@ -367,8 +367,20 @@ net_print(int verbose) } /* - * Strip the server's address off of the rootpath if present and return it in - * network byte order, leaving just the pathname part in the global rootpath. + * Parses the rootpath if present + * + * The rootpath format can be in the form + * ://ip/path + * :/path + * + * For compatibility with previous behaviour it also accepts as an NFS scheme + * ip:/path + * /path + * + * If an ip is set it returns it in network byte order. + * The default scheme defined in the global netproto, if not set it defaults to + * NFS. + * It leaves just the pathname in the global rootpath. */ uint32_t net_parse_rootpath() From owner-svn-src-all@freebsd.org Sat May 27 20:01:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3656FD85EC6; Sat, 27 May 2017 20:01:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05D401E61; Sat, 27 May 2017 20:01:51 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RK1p1I081490; Sat, 27 May 2017 20:01:51 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RK1pV6081489; Sat, 27 May 2017 20:01:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705272001.v4RK1pV6081489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 27 May 2017 20:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319000 - head/contrib/binutils/ld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 20:01:52 -0000 Author: pfg Date: Sat May 27 20:01:50 2017 New Revision: 319000 URL: https://svnweb.freebsd.org/changeset/base/319000 Log: Align text correctly by using tabs instead of spaces. The text was copy-pasted from the lines that carry the bogus spaces. This is a non-functional change. Modified: head/contrib/binutils/ld/configure.tgt Modified: head/contrib/binutils/ld/configure.tgt ============================================================================== --- head/contrib/binutils/ld/configure.tgt Sat May 27 18:46:00 2017 (r318999) +++ head/contrib/binutils/ld/configure.tgt Sat May 27 20:01:50 2017 (r319000) @@ -480,7 +480,7 @@ powerpc-*-lynxos*) targ_emul=ppclynx ;; rs6000-*-aix5*) targ_emul=aix5rs6 ;; rs6000-*-aix*) targ_emul=aixrs6 ;; -s390x-*-freebsd*) targ_emul=elf64_s390 +s390x-*-freebsd*) targ_emul=elf64_s390 targ_extra_emuls=elf_s390 targ_extra_libpath=$targ_extra_emuls tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; @@ -490,7 +490,7 @@ s390x-*-linux*) targ_emul=elf64_ tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; s390x-*-tpf*) targ_emul=elf64_s390 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; -s390-*-freebsd*) targ_emul=elf_s390 +s390-*-freebsd*) targ_emul=elf_s390 targ64_extra_emuls=elf64_s390 targ64_extra_libpath=elf64_s390 tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'` From owner-svn-src-all@freebsd.org Sat May 27 21:46:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C730FD85A41; Sat, 27 May 2017 21:46:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97A7C1F41; Sat, 27 May 2017 21:46:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RLk0Dt024294; Sat, 27 May 2017 21:46:00 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RLk0hP024293; Sat, 27 May 2017 21:46:00 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201705272146.v4RLk0hP024293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 27 May 2017 21:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319001 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 21:46:01 -0000 Author: alc Date: Sat May 27 21:46:00 2017 New Revision: 319001 URL: https://svnweb.freebsd.org/changeset/base/319001 Log: After r118390, the variable "dmmax" was neither the correct strip size nor the correct maximum block size. Moreover, after r318995, it serves no purpose except to provide information to user space through a read- sysctl. This change eliminates the variable "dmmax" but retains the sysctl. It also corrects the value returned by the sysctl. Reviewed by: kib, markj MFC after: 3 days Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sat May 27 20:01:50 2017 (r319000) +++ head/sys/vm/swap_pager.c Sat May 27 21:46:00 2017 (r319001) @@ -381,18 +381,14 @@ struct pagerops swappagerops = { }; /* - * dmmax is in page-sized chunks with the new swap system. It was - * dev-bsized chunks in the old. dmmax is always a power of 2. - * * swap_*() routines are externally accessible. swp_*() routines are * internal. */ -static int dmmax; static int nswap_lowat = 128; /* in pages, swap_pager_almost_full warn */ static int nswap_hiwat = 512; /* in pages, swap_pager_almost_full warn */ -SYSCTL_INT(_vm, OID_AUTO, dmmax, CTLFLAG_RD, &dmmax, 0, - "Maximum size of a swap block"); +SYSCTL_INT(_vm, OID_AUTO, dmmax, CTLFLAG_RD, &nsw_cluster_max, 0, + "Maximum size of a swap block in pages"); static void swp_sizecheck(void); static void swp_pager_async_iodone(struct buf *bp); @@ -489,11 +485,6 @@ swap_pager_init(void) mtx_init(&sw_dev_mtx, "swapdev", NULL, MTX_DEF); sx_init(&sw_alloc_sx, "swspsx"); sx_init(&swdev_syscall_lock, "swsysc"); - - /* - * Device Stripe, in PAGE_SIZE'd blocks - */ - dmmax = SWB_NPAGES * 2; } /* From owner-svn-src-all@freebsd.org Sat May 27 22:40:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2B38D85606; Sat, 27 May 2017 22:40:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A24EF1764; Sat, 27 May 2017 22:40:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RMeKS7045088; Sat, 27 May 2017 22:40:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RMeKap045087; Sat, 27 May 2017 22:40:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272240.v4RMeKap045087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 22:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319002 - head/usr.bin/grep/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 22:40:21 -0000 Author: ngie Date: Sat May 27 22:40:20 2017 New Revision: 319002 URL: https://svnweb.freebsd.org/changeset/base/319002 Log: :rgrep : use atf-check to check the exit code/save the output of grep -r instead of calling grep -r without it, and saving the output to a file This ensures that any errors thrown via grep -r are caught, not lost, and uses existing atf-sh idioms for saving files. Tested with: bsdgrep, gnu grep (base, ports) Sponsored by: Dell EMC Isilon Modified: head/usr.bin/grep/tests/grep_freebsd_test.sh Modified: head/usr.bin/grep/tests/grep_freebsd_test.sh ============================================================================== --- head/usr.bin/grep/tests/grep_freebsd_test.sh Sat May 27 21:46:00 2017 (r319001) +++ head/usr.bin/grep/tests/grep_freebsd_test.sh Sat May 27 22:40:20 2017 (r319002) @@ -77,8 +77,7 @@ rgrep_head() } rgrep_body() { - grep -r --exclude="*.out" -e "test" "$(atf_get_srcdir)" > d_grep_r_implied.out - + atf_check -o save:d_grep_r_implied.out grep -r --exclude="*.out" -e "test" "$(atf_get_srcdir)" atf_check -o file:d_grep_r_implied.out rgrep --exclude="*.out" -e "test" "$(atf_get_srcdir)" } From owner-svn-src-all@freebsd.org Sat May 27 22:57:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FF80D85955; Sat, 27 May 2017 22:57:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD3ED1E82; Sat, 27 May 2017 22:57:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RMv7Dt053177; Sat, 27 May 2017 22:57:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RMv7X8053176; Sat, 27 May 2017 22:57:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272257.v4RMv7X8053176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 22:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319003 - stable/10/lib/libgeom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 22:57:09 -0000 Author: ngie Date: Sat May 27 22:57:07 2017 New Revision: 319003 URL: https://svnweb.freebsd.org/changeset/base/319003 Log: MFC r317288,r317289: r317288: libgeom(3): apply minor polish - Use .Dv when mentioning NULL per mdoc(7). - Reword `g_device_path`, `g_open_by_ident`, and `g_providername`'s descriptions so they're less wordy. - Fix a typo in `g_device_path` (can not -> cannot). Tested with: igor, make manlint r317289: libgeom(3): note that stdio.h is required when referencing gctl_dump(3) gctl_dump(3) is only exposed when stdio.h is #include'd first, per its addition in r112510. The reasoning noted for the conditional "exposure" of the function was to "limit #include pollution". This addresses an issue I found with the documentation when looking at bug 218809, which in turn addresses a -Wimplicit-function-declaration compiler warning in `tools/regression/geom_gpt/test.c` (it uses gctl_dump(3)). Modified: stable/10/lib/libgeom/libgeom.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libgeom/libgeom.3 ============================================================================== --- stable/10/lib/libgeom/libgeom.3 Sat May 27 22:40:20 2017 (r319002) +++ stable/10/lib/libgeom/libgeom.3 Sat May 27 22:57:07 2017 (r319003) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2010 +.Dd April 22, 2017 .Dt LIBGEOM 3 .Os .Sh NAME @@ -63,6 +63,10 @@ .Sh LIBRARY .Lb libgeom .Sh SYNOPSIS +.Bd -literal +/* stdio.h is only required for `gctl_dump` */ +.Ed +.In stdio.h .In libgeom.h .Ss "Statistics Functions" .Ft void @@ -324,8 +328,8 @@ The .Fn g_device_path function returns the full path to a provider given a partial or full path to the device node. -If the device can not be found or is not a valid geom provider, NULL is -returned. +.Dv NULL +is returned if the device cannot be found or is not a valid geom provider. .Pp The .Fn g_get_ident @@ -344,20 +348,19 @@ string. .Pp The .Fn g_open_by_ident -function opens provider using its ident, unlike +function opens provider using its identification, unlike .Fn g_open -which uses provider's name. -If the +which uses the provider's name. +The function will store the provider's name in the .Fa name -argument is not -.Dv NULL , -the function will store provider's name there. +parameter if it is not +.Dv NULL . .Pp The .Fn g_providername function returns the provider name of an open file descriptor. -If the file descriptor does not point to a valid geom provider, NULL is -returned. +.Dv NULL +is returned the file descriptor does not point to a valid geom provider. .Pp All functions except .Fn g_providername From owner-svn-src-all@freebsd.org Sat May 27 22:57:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EE15D8596C; Sat, 27 May 2017 22:57:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56DD21E86; Sat, 27 May 2017 22:57:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RMvA4S053224; Sat, 27 May 2017 22:57:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RMvA3T053223; Sat, 27 May 2017 22:57:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272257.v4RMvA3T053223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 22:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319004 - stable/11/lib/libgeom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 22:57:11 -0000 Author: ngie Date: Sat May 27 22:57:10 2017 New Revision: 319004 URL: https://svnweb.freebsd.org/changeset/base/319004 Log: MFC r317288,r317289: r317288: libgeom(3): apply minor polish - Use .Dv when mentioning NULL per mdoc(7). - Reword `g_device_path`, `g_open_by_ident`, and `g_providername`'s descriptions so they're less wordy. - Fix a typo in `g_device_path` (can not -> cannot). Tested with: igor, make manlint r317289: libgeom(3): note that stdio.h is required when referencing gctl_dump(3) gctl_dump(3) is only exposed when stdio.h is #include'd first, per its addition in r112510. The reasoning noted for the conditional "exposure" of the function was to "limit #include pollution". This addresses an issue I found with the documentation when looking at bug 218809, which in turn addresses a -Wimplicit-function-declaration compiler warning in `tools/regression/geom_gpt/test.c` (it uses gctl_dump(3)). Modified: stable/11/lib/libgeom/libgeom.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libgeom/libgeom.3 ============================================================================== --- stable/11/lib/libgeom/libgeom.3 Sat May 27 22:57:07 2017 (r319003) +++ stable/11/lib/libgeom/libgeom.3 Sat May 27 22:57:10 2017 (r319004) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2010 +.Dd April 22, 2017 .Dt LIBGEOM 3 .Os .Sh NAME @@ -63,6 +63,10 @@ .Sh LIBRARY .Lb libgeom .Sh SYNOPSIS +.Bd -literal +/* stdio.h is only required for `gctl_dump` */ +.Ed +.In stdio.h .In libgeom.h .Ss "Statistics Functions" .Ft void @@ -324,8 +328,8 @@ The .Fn g_device_path function returns the full path to a provider given a partial or full path to the device node. -If the device can not be found or is not a valid geom provider, NULL is -returned. +.Dv NULL +is returned if the device cannot be found or is not a valid geom provider. .Pp The .Fn g_get_ident @@ -344,20 +348,19 @@ string. .Pp The .Fn g_open_by_ident -function opens provider using its ident, unlike +function opens provider using its identification, unlike .Fn g_open -which uses provider's name. -If the +which uses the provider's name. +The function will store the provider's name in the .Fa name -argument is not -.Dv NULL , -the function will store provider's name there. +parameter if it is not +.Dv NULL . .Pp The .Fn g_providername function returns the provider name of an open file descriptor. -If the file descriptor does not point to a valid geom provider, NULL is -returned. +.Dv NULL +is returned the file descriptor does not point to a valid geom provider. .Pp All functions except .Fn g_providername From owner-svn-src-all@freebsd.org Sat May 27 22:59:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26AEDD85A5F; Sat, 27 May 2017 22:59:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 020851122; Sat, 27 May 2017 22:59:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RMxO6k053391; Sat, 27 May 2017 22:59:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RMxNS3053389; Sat, 27 May 2017 22:59:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272259.v4RMxNS3053389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 22:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319005 - in stable/11: contrib/netbsd-tests/fs/tmpfs tests/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 22:59:25 -0000 Author: ngie Date: Sat May 27 22:59:23 2017 New Revision: 319005 URL: https://svnweb.freebsd.org/changeset/base/319005 Log: MFC r318546: sys/fs/tmpfs/vnd_test: make md(4) allocation dynamic The previous logic was flawed in the sense that it assumed that /dev/md3 was always available. This was a caveat I noted in r306038, that I hadn't gotten around to solving before now. Cache the device for the mountpoint after executing mdmfs, then use the cached value in basic_cleanup(..) when unmounting/disconnecting the md(4) device. Apply sed expressions to use reuse logic in the NetBSD code that could also be applied to FreeBSD, just with different tools. Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh stable/11/tests/sys/fs/tmpfs/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh ============================================================================== --- stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat May 27 22:57:10 2017 (r319004) +++ stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat May 27 22:59:23 2017 (r319005) @@ -28,6 +28,10 @@ # Verifies that vnd works with files stored in tmpfs. # +# Begin FreeBSD +MD_DEVICE_FILE=md.device +# End FreeBSD + atf_test_case basic cleanup basic_head() { atf_set "descr" "Verifies that vnd works with files stored in tmpfs" @@ -41,7 +45,10 @@ basic_body() { # Begin FreeBSD if true; then atf_check -s eq:0 -o empty -e empty mkdir mnt - atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md3 mnt + atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md mnt + md_dev=$(df mnt | awk 'NR != 1 { print $1 }' | xargs basename) + atf_check test -c /dev/$md_dev # Sanity check + echo -n $md_dev > $TMPDIR/$MD_DEVICE_FILE else # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig /dev/vnd3 disk.img @@ -67,31 +74,23 @@ basic_body() { done atf_check -s eq:0 -o empty -e empty umount mnt - # Begin FreeBSD - if true; then - atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 - else - # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig -u /dev/vnd3 - # Begin FreeBSD - fi - # End FreeBSD test_unmount touch done } basic_cleanup() { + # Begin FreeBSD + if md_dev=$(cat $TMPDIR/$MD_DEVICE_FILE); then + echo "Will try disconnecting $md_dev" + else + echo "$MD_DEVICE_FILE doesn't exist in $TMPDIR; returning early" + return 0 + fi + # End FreeBSD if [ ! -f done ]; then umount mnt 2>/dev/null 1>&2 - # Begin FreeBSD - if true; then - [ ! -c /dev/md3 ] || mdconfig -d -u 3 - else - # End FreeBSD vndconfig -u /dev/vnd3 2>/dev/null 1>&2 - # Begin FreeBSD - fi - # End FreeBSD fi } Modified: stable/11/tests/sys/fs/tmpfs/Makefile ============================================================================== --- stable/11/tests/sys/fs/tmpfs/Makefile Sat May 27 22:57:10 2017 (r319004) +++ stable/11/tests/sys/fs/tmpfs/Makefile Sat May 27 22:59:23 2017 (r319005) @@ -54,6 +54,9 @@ ATF_TESTS_SH_SED_mount_test= \ ATF_TESTS_SH_SED_readdir_test= -e 's,mknod fifo p,mkfifo fifo,g' ATF_TESTS_SH_SED_sizes_test= -e 's,-o -s,-o size=,g' ATF_TESTS_SH_SED_statvfs_test= -e 's,-o -s,-o size=,g' +ATF_TESTS_SH_SED_vnd_test= \ + -e 's,vndconfig -u /dev/vnd3,mdconfig -d -u $$md_dev,g' \ + -e 's,/dev/vnd3,/dev/$$md_dev,g' ATF_TESTS_SH_SED_vnode_leak_test= -e 's,-o -s,-o size=,g' .include From owner-svn-src-all@freebsd.org Sat May 27 23:04:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AC66D85C3F; Sat, 27 May 2017 23:04:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1095715B7; Sat, 27 May 2017 23:04:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RN4f6D057258; Sat, 27 May 2017 23:04:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RN4eCw057256; Sat, 27 May 2017 23:04:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272304.v4RN4eCw057256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319006 - in stable/11: etc/mtree lib/libkvm lib/libkvm/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:04:42 -0000 Author: ngie Date: Sat May 27 23:04:40 2017 New Revision: 319006 URL: https://svnweb.freebsd.org/changeset/base/319006 Log: MFC r316099: lib/libkvm: start adding basic tests for kvm(3) - kvm_close: add a testcase to verify support for errno = EINVAL / -1 (see D10065) when kd == NULL is provided to the libcall. - kvm_geterr: -- Add a negative testcase for kd == NULL returning "" (see D10022). -- Add two positive testcases: --- test the error case using kvm_write on a O_RDONLY descriptor. --- test the "no error" case using kvm_read(3) and kvm_nlist(3) as helper routines and by injecting a bogus error message via _kvm_err (an internal API) _kvm_err was used as there isn't a formalized way to clear the error output, and because kvm_nlist always returns ENOENT with the NULL terminator today. - kvm_open, kvm_open2: -- Add some basic negative tests for kvm_open(3) and kvm_open2(3). Testing positive cases with a specific `corefile`/`execfile`/`resolver` requires more work and would require user intervention today in order to reliably test this out. Added: stable/11/lib/libkvm/tests/ - copied from r316099, head/lib/libkvm/tests/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/lib/libkvm/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Sat May 27 22:59:23 2017 (r319005) +++ stable/11/etc/mtree/BSD.tests.dist Sat May 27 23:04:40 2017 (r319006) @@ -316,6 +316,8 @@ .. libdevdctl .. + libkvm + .. libmp .. libnv Modified: stable/11/lib/libkvm/Makefile ============================================================================== --- stable/11/lib/libkvm/Makefile Sat May 27 22:59:23 2017 (r319005) +++ stable/11/lib/libkvm/Makefile Sat May 27 23:04:40 2017 (r319006) @@ -36,4 +36,10 @@ MLINKS+=kvm_nlist.3 kvm_nlist2.3 MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_open2.3 kvm_open.3 kvm_openfiles.3 MLINKS+=kvm_read.3 kvm_read2.3 kvm_read.3 kvm_write.3 +.include + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include From owner-svn-src-all@freebsd.org Sat May 27 23:04:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB840D85C77; Sat, 27 May 2017 23:04:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 938261600; Sat, 27 May 2017 23:04:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RN4mLk057309; Sat, 27 May 2017 23:04:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RN4mKT057308; Sat, 27 May 2017 23:04:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272304.v4RN4mKT057308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319007 - in stable/10: contrib/netbsd-tests/fs/tmpfs tests/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:04:49 -0000 Author: ngie Date: Sat May 27 23:04:48 2017 New Revision: 319007 URL: https://svnweb.freebsd.org/changeset/base/319007 Log: MFC r318546: sys/fs/tmpfs/vnd_test: make md(4) allocation dynamic The previous logic was flawed in the sense that it assumed that /dev/md3 was always available. This was a caveat I noted in r306038, that I hadn't gotten around to solving before now. Cache the device for the mountpoint after executing mdmfs, then use the cached value in basic_cleanup(..) when unmounting/disconnecting the md(4) device. Apply sed expressions to use reuse logic in the NetBSD code that could also be applied to FreeBSD, just with different tools. Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh stable/10/tests/sys/fs/tmpfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat May 27 23:04:40 2017 (r319006) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat May 27 23:04:48 2017 (r319007) @@ -28,6 +28,10 @@ # Verifies that vnd works with files stored in tmpfs. # +# Begin FreeBSD +MD_DEVICE_FILE=md.device +# End FreeBSD + atf_test_case basic cleanup basic_head() { atf_set "descr" "Verifies that vnd works with files stored in tmpfs" @@ -41,7 +45,10 @@ basic_body() { # Begin FreeBSD if true; then atf_check -s eq:0 -o empty -e empty mkdir mnt - atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md3 mnt + atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md mnt + md_dev=$(df mnt | awk 'NR != 1 { print $1 }' | xargs basename) + atf_check test -c /dev/$md_dev # Sanity check + echo -n $md_dev > $TMPDIR/$MD_DEVICE_FILE else # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig /dev/vnd3 disk.img @@ -67,31 +74,23 @@ basic_body() { done atf_check -s eq:0 -o empty -e empty umount mnt - # Begin FreeBSD - if true; then - atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 - else - # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig -u /dev/vnd3 - # Begin FreeBSD - fi - # End FreeBSD test_unmount touch done } basic_cleanup() { + # Begin FreeBSD + if md_dev=$(cat $TMPDIR/$MD_DEVICE_FILE); then + echo "Will try disconnecting $md_dev" + else + echo "$MD_DEVICE_FILE doesn't exist in $TMPDIR; returning early" + return 0 + fi + # End FreeBSD if [ ! -f done ]; then umount mnt 2>/dev/null 1>&2 - # Begin FreeBSD - if true; then - [ ! -c /dev/md3 ] || mdconfig -d -u 3 - else - # End FreeBSD vndconfig -u /dev/vnd3 2>/dev/null 1>&2 - # Begin FreeBSD - fi - # End FreeBSD fi } Modified: stable/10/tests/sys/fs/tmpfs/Makefile ============================================================================== --- stable/10/tests/sys/fs/tmpfs/Makefile Sat May 27 23:04:40 2017 (r319006) +++ stable/10/tests/sys/fs/tmpfs/Makefile Sat May 27 23:04:48 2017 (r319007) @@ -54,6 +54,9 @@ ATF_TESTS_SH_SED_mount_test= \ ATF_TESTS_SH_SED_readdir_test= -e 's,mknod fifo p,mkfifo fifo,g' ATF_TESTS_SH_SED_sizes_test= -e 's,-o -s,-o size=,g' ATF_TESTS_SH_SED_statvfs_test= -e 's,-o -s,-o size=,g' +ATF_TESTS_SH_SED_vnd_test= \ + -e 's,vndconfig -u /dev/vnd3,mdconfig -d -u $$md_dev,g' \ + -e 's,/dev/vnd3,/dev/$$md_dev,g' ATF_TESTS_SH_SED_vnode_leak_test= -e 's,-o -s,-o size=,g' .include From owner-svn-src-all@freebsd.org Sat May 27 23:19:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE0DDD85E89; Sat, 27 May 2017 23:19:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B0B81B78; Sat, 27 May 2017 23:19:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNJWXK061397; Sat, 27 May 2017 23:19:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNJWuZ061396; Sat, 27 May 2017 23:19:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272319.v4RNJWuZ061396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319008 - head/lib/libkvm/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:19:33 -0000 Author: ngie Date: Sat May 27 23:19:32 2017 New Revision: 319008 URL: https://svnweb.freebsd.org/changeset/base/319008 Log: kvm_geterr_test: Compile out the portions that require kvm_open2(3) on systems that lack the libcall, based on __FreeBSD_version. kvm_open2(3) wasn't made available until r291406, which is in ^/stable/11, but not ^/stable/10. This makes some of kvm_geterr_test available for testing on ^/stable/10. MFC after: now Sponsored by: Dell EMC Isilon Modified: head/lib/libkvm/tests/kvm_geterr_test.c Modified: head/lib/libkvm/tests/kvm_geterr_test.c ============================================================================== --- head/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:04:48 2017 (r319007) +++ head/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:19:32 2017 (r319008) @@ -65,6 +65,8 @@ ATF_TC_HEAD(kvm_geterr_positive_test_err atf_tc_set_md_var(tc, "require.user", "root"); } +/* 1100090 was where kvm_open2(3) was introduced. */ +#if __FreeBSD_version >= 1100091 ATF_TC_BODY(kvm_geterr_positive_test_error, tc) { kvm_t *kd; @@ -125,13 +127,16 @@ ATF_TC_BODY(kvm_geterr_positive_test_no_ ATF_REQUIRE_MSG(kvm_close(kd) == 0, "kvm_close failed: %s", strerror(errno)); } +#endif ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, kvm_geterr_negative_test_NULL); +#if __FreeBSD_version >= 1100091 ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_error); ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_no_error); +#endif return (atf_no_error()); } From owner-svn-src-all@freebsd.org Sat May 27 23:20:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AAD2D85F32; Sat, 27 May 2017 23:20:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE9BB1CF3; Sat, 27 May 2017 23:20:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNKSZN061522; Sat, 27 May 2017 23:20:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNKSIM061521; Sat, 27 May 2017 23:20:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272320.v4RNKSIM061521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319009 - stable/11/lib/libkvm/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:20:30 -0000 Author: ngie Date: Sat May 27 23:20:28 2017 New Revision: 319009 URL: https://svnweb.freebsd.org/changeset/base/319009 Log: MFC r319008: kvm_geterr_test: Compile out the portions that require kvm_open2(3) on systems that lack the libcall, based on __FreeBSD_version. kvm_open2(3) wasn't made available until r291406, which is in ^/stable/11, but not ^/stable/10. This makes some of kvm_geterr_test available for testing on ^/stable/10. Modified: stable/11/lib/libkvm/tests/kvm_geterr_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libkvm/tests/kvm_geterr_test.c ============================================================================== --- stable/11/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:19:32 2017 (r319008) +++ stable/11/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:20:28 2017 (r319009) @@ -65,6 +65,8 @@ ATF_TC_HEAD(kvm_geterr_positive_test_err atf_tc_set_md_var(tc, "require.user", "root"); } +/* 1100090 was where kvm_open2(3) was introduced. */ +#if __FreeBSD_version >= 1100091 ATF_TC_BODY(kvm_geterr_positive_test_error, tc) { kvm_t *kd; @@ -125,13 +127,16 @@ ATF_TC_BODY(kvm_geterr_positive_test_no_ ATF_REQUIRE_MSG(kvm_close(kd) == 0, "kvm_close failed: %s", strerror(errno)); } +#endif ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, kvm_geterr_negative_test_NULL); +#if __FreeBSD_version >= 1100091 ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_error); ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_no_error); +#endif return (atf_no_error()); } From owner-svn-src-all@freebsd.org Sat May 27 23:23:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83B4BD84118; Sat, 27 May 2017 23:23:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 534EC10EC; Sat, 27 May 2017 23:23:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNNM6g065565; Sat, 27 May 2017 23:23:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNNMYI065564; Sat, 27 May 2017 23:23:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272323.v4RNNMYI065564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:23:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319010 - head/lib/libkvm/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:23:23 -0000 Author: ngie Date: Sat May 27 23:23:22 2017 New Revision: 319010 URL: https://svnweb.freebsd.org/changeset/base/319010 Log: Fix #if conditional added in r319008 I committed an earlier version of the file by accident This is a no-op on ^/head and ^/stable/11. MFC after: now Sponsored by: Dell EMC Isilon Modified: head/lib/libkvm/tests/kvm_geterr_test.c Modified: head/lib/libkvm/tests/kvm_geterr_test.c ============================================================================== --- head/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:20:28 2017 (r319009) +++ head/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:23:22 2017 (r319010) @@ -56,6 +56,8 @@ ATF_TC_BODY(kvm_geterr_negative_test_NUL ATF_REQUIRE(!errbuf_has_error(kvm_geterr(NULL))); } +/* 1100090 was where kvm_open2(3) was introduced. */ +#if __FreeBSD_version >= 1100091 ATF_TC(kvm_geterr_positive_test_error); ATF_TC_HEAD(kvm_geterr_positive_test_error, tc) { @@ -65,8 +67,6 @@ ATF_TC_HEAD(kvm_geterr_positive_test_err atf_tc_set_md_var(tc, "require.user", "root"); } -/* 1100090 was where kvm_open2(3) was introduced. */ -#if __FreeBSD_version >= 1100091 ATF_TC_BODY(kvm_geterr_positive_test_error, tc) { kvm_t *kd; From owner-svn-src-all@freebsd.org Sat May 27 23:24:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAE65D841C6; Sat, 27 May 2017 23:24:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89FF91290; Sat, 27 May 2017 23:24:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNOX52065675; Sat, 27 May 2017 23:24:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNOXps065674; Sat, 27 May 2017 23:24:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272324.v4RNOXps065674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319011 - stable/11/lib/libkvm/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:24:34 -0000 Author: ngie Date: Sat May 27 23:24:33 2017 New Revision: 319011 URL: https://svnweb.freebsd.org/changeset/base/319011 Log: MFC r319010: Fix #if conditional added in r319008 I committed an earlier version of the file by accident This is a no-op on ^/head and ^/stable/11. Modified: stable/11/lib/libkvm/tests/kvm_geterr_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libkvm/tests/kvm_geterr_test.c ============================================================================== --- stable/11/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:23:22 2017 (r319010) +++ stable/11/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:24:33 2017 (r319011) @@ -56,6 +56,8 @@ ATF_TC_BODY(kvm_geterr_negative_test_NUL ATF_REQUIRE(!errbuf_has_error(kvm_geterr(NULL))); } +/* 1100090 was where kvm_open2(3) was introduced. */ +#if __FreeBSD_version >= 1100091 ATF_TC(kvm_geterr_positive_test_error); ATF_TC_HEAD(kvm_geterr_positive_test_error, tc) { @@ -65,8 +67,6 @@ ATF_TC_HEAD(kvm_geterr_positive_test_err atf_tc_set_md_var(tc, "require.user", "root"); } -/* 1100090 was where kvm_open2(3) was introduced. */ -#if __FreeBSD_version >= 1100091 ATF_TC_BODY(kvm_geterr_positive_test_error, tc) { kvm_t *kd; From owner-svn-src-all@freebsd.org Sat May 27 23:26:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3011BD842C1; Sat, 27 May 2017 23:26:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B4B613E2; Sat, 27 May 2017 23:26:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNQBgh065782; Sat, 27 May 2017 23:26:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNQAWU065778; Sat, 27 May 2017 23:26:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272326.v4RNQAWU065778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319012 - in stable/10: etc/mtree lib/libkvm lib/libkvm/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:26:12 -0000 Author: ngie Date: Sat May 27 23:26:10 2017 New Revision: 319012 URL: https://svnweb.freebsd.org/changeset/base/319012 Log: MFC r316099: lib/libkvm: start adding basic tests for kvm(3) - kvm_close: add a testcase to verify support for errno = EINVAL / -1 (see D10065) when kd == NULL is provided to the libcall. - kvm_geterr: -- Add a negative testcase for kd == NULL returning "" (see D10022). -- Add two positive testcases: --- test the error case using kvm_write on a O_RDONLY descriptor. --- test the "no error" case using kvm_read(3) and kvm_nlist(3) as helper routines and by injecting a bogus error message via _kvm_err (an internal API) _kvm_err was used as there isn't a formalized way to clear the error output, and because kvm_nlist always returns ENOENT with the NULL terminator today. - kvm_open, kvm_open2: -- Add some basic negative tests for kvm_open(3) and kvm_open2(3). Testing positive cases with a specific `corefile`/`execfile`/`resolver` requires more work and would require user intervention today in order to reliably test this out. MFC note: lib/libkvm/kvm_open2_test is not compiled/tested because ^/stable/10 lacks the kvm_open2(3) libcall. Added: stable/10/lib/libkvm/tests/ - copied from r316099, head/lib/libkvm/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/lib/libkvm/Makefile stable/10/lib/libkvm/tests/Makefile stable/10/lib/libkvm/tests/kvm_geterr_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sat May 27 23:24:33 2017 (r319011) +++ stable/10/etc/mtree/BSD.tests.dist Sat May 27 23:26:10 2017 (r319012) @@ -310,6 +310,8 @@ .. libcrypt .. + libkvm + .. libmp .. libnv Modified: stable/10/lib/libkvm/Makefile ============================================================================== --- stable/10/lib/libkvm/Makefile Sat May 27 23:24:33 2017 (r319011) +++ stable/10/lib/libkvm/Makefile Sat May 27 23:26:10 2017 (r319012) @@ -34,4 +34,10 @@ MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3 MLINKS+=kvm_read.3 kvm_write.3 +.include + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/lib/libkvm/tests/Makefile ============================================================================== --- head/lib/libkvm/tests/Makefile Tue Mar 28 17:37:49 2017 (r316099) +++ stable/10/lib/libkvm/tests/Makefile Sat May 27 23:26:10 2017 (r319012) @@ -5,11 +5,13 @@ ATF_TESTS_C+= kvm_close_test ATF_TESTS_C+= kvm_geterr_test ATF_TESTS_C+= kvm_open_test -ATF_TESTS_C+= kvm_open2_test +# NB: kvm_open2(3) isn't available on ^/stable/10 +#ATF_TESTS_C+= kvm_open2_test CFLAGS.kvm_geterr_test+= -I${.CURDIR:H} -LIBADD+= kvm +DPADD+= ${LIBKVM} +LDADD+= -lkvm WARNS?= 6 Modified: stable/10/lib/libkvm/tests/kvm_geterr_test.c ============================================================================== --- head/lib/libkvm/tests/kvm_geterr_test.c Tue Mar 28 17:37:49 2017 (r316099) +++ stable/10/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:26:10 2017 (r319012) @@ -56,6 +56,8 @@ ATF_TC_BODY(kvm_geterr_negative_test_NUL ATF_REQUIRE(!errbuf_has_error(kvm_geterr(NULL))); } +/* 1100090 was where kvm_open2(3) was introduced. */ +#if __FreeBSD_version >= 1100091 ATF_TC(kvm_geterr_positive_test_error); ATF_TC_HEAD(kvm_geterr_positive_test_error, tc) { @@ -125,13 +127,16 @@ ATF_TC_BODY(kvm_geterr_positive_test_no_ ATF_REQUIRE_MSG(kvm_close(kd) == 0, "kvm_close failed: %s", strerror(errno)); } +#endif ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, kvm_geterr_negative_test_NULL); +#if __FreeBSD_version >= 1100091 ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_error); ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_no_error); +#endif return (atf_no_error()); } From owner-svn-src-all@freebsd.org Sat May 27 23:31:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A319D8462D; Sat, 27 May 2017 23:31:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15620194F; Sat, 27 May 2017 23:31:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNVqaR067962; Sat, 27 May 2017 23:31:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNVpZZ067959; Sat, 27 May 2017 23:31:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272331.v4RNVpZZ067959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319013 - stable/11/tools/regression/geom_gpt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:31:53 -0000 Author: ngie Date: Sat May 27 23:31:51 2017 New Revision: 319013 URL: https://svnweb.freebsd.org/changeset/base/319013 Log: MFC r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309: r317290: Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h #include below the stdio.h #include. gctl_dump(3) needs stdio.h, per reasoning noted in r317289. PR: 218809 r317291: Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c This is being done to reduce ambiguity and to make the tests more portable in the future to other locations in the source tree. r317292: gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly r317293: gctl_test_helper: apply polish - Staticize variables to fix warnings. - Sprinkle asserts around for calls that can fail - Apply style(9) for main(..) definition. - ANSIify usage(..) definition. r317294: Bump WARNS to 6 per previous commits which fixed warnings Tested with: clang (4.0), gcc (4.2.1, 6.3.0) r317295: The GPT class no longer exists; use the PART class instead r317304: gctl_test_helper: add diagnostic output for parse_retval(..) This will help end-users better diagnose issues with the function. r317306: gctl_test.t: minor tweaks - Declare $count with the `my` scope operator to permit `use strict`. - Add `use strict`. - Use `use warnings` instead of using `-w` in the shebang. - Don't unlink $cmd when done (prevents unnecessary rebuilding). - Improve the error message when running with insufficient permissions, e.g., non-root. r317307: Use verb=delete not verb=remove The `remove` verb hasn't been present in geom_part*(4) for well over a decade, if ever. I couldn't find any references to it in ^/stable/5 at least, which is around the timeframe that this test was written. r317308: gctl_test.t: more tweaks to try and update the code and get it functional (again?) - Make the logfile for $out be built off the basename for $cmd, instead of $cmd. (r317292 broke this assumption). - Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for mountpoints. - Reindent the umount directive block while here to match the rest of the code. r317309: gctl_test.t: improve error reporting with mdcfg and mount directives If the commands had failed previously, it would press on and result in a series of cascading failures. Fail early and continue on to the next case instead of executing additional commands after a previously failed series of steps. Added: stable/11/tools/regression/geom_gpt/Makefile - copied, changed from r317292, head/tools/regression/geom_gpt/Makefile stable/11/tools/regression/geom_gpt/gctl_test.t - copied, changed from r317291, head/tools/regression/geom_gpt/gctl_test.t stable/11/tools/regression/geom_gpt/gctl_test_helper.c - copied, changed from r317291, head/tools/regression/geom_gpt/gctl_test_helper.c Deleted: stable/11/tools/regression/geom_gpt/gctl.t stable/11/tools/regression/geom_gpt/test.c Modified: Directory Properties: stable/11/ (props changed) Copied and modified: stable/11/tools/regression/geom_gpt/Makefile (from r317292, head/tools/regression/geom_gpt/Makefile) ============================================================================== --- head/tools/regression/geom_gpt/Makefile Sat Apr 22 20:15:47 2017 (r317292, copy source) +++ stable/11/tools/regression/geom_gpt/Makefile Sat May 27 23:31:51 2017 (r319013) @@ -5,4 +5,6 @@ MAN= LIBADD+= geom +WARNS?= 6 + .include Copied and modified: stable/11/tools/regression/geom_gpt/gctl_test.t (from r317291, head/tools/regression/geom_gpt/gctl_test.t) ============================================================================== --- head/tools/regression/geom_gpt/gctl_test.t Sat Apr 22 20:06:11 2017 (r317291, copy source) +++ stable/11/tools/regression/geom_gpt/gctl_test.t Sat May 27 23:31:51 2017 (r319013) @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w +#!/usr/bin/env perl # # Copyright (c) 2005, 2006 Marcel Moolenaar # All rights reserved. @@ -26,13 +26,13 @@ # # $FreeBSD$ -my $srcdir = `dirname $0`; -chomp $srcdir; +use strict; +use warnings; + +use File::Basename; -my $cmd = "/tmp/gctl-$$"; -my $out = "$cmd.out"; my $disk = "/tmp/disk-$$"; -my $mntpt = "/tmp/mount-$$"; +my $mntpt_prefix = "/tmp/mount-$$"; my %steps = ( "000" => "gctl", @@ -70,9 +70,9 @@ my %steps = ( "054" => "conf", "060" => "gctl verb=add geom=%dev% type=516e7cb6-6ecf-11d6-8ff8-00022d09712b start=34 end=546 entry:8=1", "061" => "mount %dev%p1", - "062" => "gctl verb=remove geom=%dev% entry=1", + "062" => "gctl verb=delete geom=%dev% entry=1", "063" => "umount %dev%p1", - "064" => "gctl verb=remove geom=%dev% entry=1", + "064" => "gctl verb=delete geom=%dev% entry=1", "065" => "conf", "100" => "mdcfg destroy", "110" => "mdcfg create corrupted", @@ -132,20 +132,23 @@ if (exists $ENV{'TEST_VERBOSE'}) { } # Compile the driver... -my $st = system("cc -o $cmd -g $srcdir/gctl_test_helper.c -lgeom"); +my $st = system("make obj && make all"); if ($st != 0) { print "1..0 # SKIP error compiling test.c\n"; exit 0; } +chomp(my $cmd = `make '-V\${.OBJDIR}/\${PROG}'`); + +my $out = basename($cmd) . ".out"; # Make sure we have permission to use gctl... if (`$cmd` =~ "^FAIL Permission denied") { - print "1..0 # SKIP not enough permission\n"; + print "1..0 # SKIP insufficient permissions\n"; unlink $cmd; exit 0; } -$count = keys (%steps); +my $count = keys (%steps); print "1..$count\n"; my $nr = 1; @@ -158,13 +161,15 @@ foreach my $key (sort keys %steps) { $res =~ s/%dev%/$dev/g; if ($action =~ "^gctl") { + my $errmsg = ""; system("$cmd $verbose $args | tee $out 2>&1"); - $st = `tail -1 $out`; - if ($st =~ "^$res") { - print "ok $nr \# gctl($key)\n"; - } else { - print "not ok $nr \# gctl($key) - $st\n"; + chomp($st = `tail -1 $out`); + if ($st ne $res) { + $errmsg = "\"$st\" (actual) != \"$res\" (expected)\n"; } + printf("%sok $nr \# gctl($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); unlink $out; } elsif ($action =~ "^mdcfg") { if ($args =~ "^create") { @@ -191,17 +196,23 @@ foreach my $key (sort keys %steps) { } unlink $out; } elsif ($action =~ "^mount") { - system("mkdir $mntpt-$args"); - system("newfs $args"); - system("mount -t ufs /dev/$args $mntpt-$args"); - print "ok $nr \# mount($key)\n"; + my $errmsg = ""; + mkdir("$mntpt_prefix-$args"); + if (system("newfs /dev/$args") == 0) { + if (system("mount /dev/$args $mntpt_prefix-$args") != 0) { + $errmsg = "mount failed"; + } + } else { + $errmsg = "newfs failed"; + } + printf("%sok $nr # mount($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); } elsif ($action =~ "^umount") { - system("umount $mntpt-$args"); - system("rmdir $mntpt-$args"); - print "ok $nr \# umount($key)\n"; + system("umount $mntpt_prefix-$args"); + system("rmdir $mntpt_prefix-$args"); + print "ok $nr \# umount($key)\n"; } $nr += 1; } - -unlink $cmd; exit 0; Copied and modified: stable/11/tools/regression/geom_gpt/gctl_test_helper.c (from r317291, head/tools/regression/geom_gpt/gctl_test_helper.c) ============================================================================== --- head/tools/regression/geom_gpt/gctl_test_helper.c Sat Apr 22 20:06:11 2017 (r317291, copy source) +++ stable/11/tools/regression/geom_gpt/gctl_test_helper.c Sat May 27 23:31:51 2017 (r319013) @@ -28,6 +28,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -42,11 +44,11 @@ struct retval { char *value; }; -struct retval *retval; -int verbose; +static struct retval *retval; +static int verbose; static void -usage() +usage(void) { fprintf(stdout, "usage: %s [-v] param[:len][=value] ...\n", getprogname()); @@ -105,16 +107,18 @@ parse(char *arg, char **param, char **va return (0); } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { struct retval *rv; struct gctl_req *req; char *param, *value; const char *s; - int c, len; + int c, len, parse_retval; req = gctl_get_handle(); - gctl_ro_param(req, "class", -1, "GPT"); + assert(req != NULL); + gctl_ro_param(req, "class", -1, "PART"); while ((c = getopt(argc, argv, "v")) != -1) { switch (c) { @@ -129,10 +133,12 @@ int main(int argc, char *argv[]) } } - while (optind < argc) { - if (!parse(argv[optind++], ¶m, &value, &len)) { + for (; optind < argc; optind++) { + parse_retval = parse(argv[optind], ¶m, &value, &len); + if (parse_retval == 0) { if (len > 0) { rv = malloc(sizeof(struct retval)); + assert(rv != NULL); rv->param = param; rv->value = value; rv->retval = retval; @@ -140,7 +146,9 @@ int main(int argc, char *argv[]) gctl_rw_param(req, param, len, value); } else gctl_ro_param(req, param, -1, value); - } + } else + warnc(parse_retval, "failed to parse argument (%s)", + argv[optind]); } if (verbose) From owner-svn-src-all@freebsd.org Sat May 27 23:32:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 045E4D84676; Sat, 27 May 2017 23:32:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D547419BC; Sat, 27 May 2017 23:32:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNVxx1070125; Sat, 27 May 2017 23:31:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNVxkw070122; Sat, 27 May 2017 23:31:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272331.v4RNVxkw070122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:31:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319014 - stable/10/tools/regression/geom_gpt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:32:01 -0000 Author: ngie Date: Sat May 27 23:31:59 2017 New Revision: 319014 URL: https://svnweb.freebsd.org/changeset/base/319014 Log: MFC r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309: r317290: Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h #include below the stdio.h #include. gctl_dump(3) needs stdio.h, per reasoning noted in r317289. PR: 218809 r317291: Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c This is being done to reduce ambiguity and to make the tests more portable in the future to other locations in the source tree. r317292: gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly r317293: gctl_test_helper: apply polish - Staticize variables to fix warnings. - Sprinkle asserts around for calls that can fail - Apply style(9) for main(..) definition. - ANSIify usage(..) definition. r317294: Bump WARNS to 6 per previous commits which fixed warnings Tested with: clang (4.0), gcc (4.2.1, 6.3.0) r317295: The GPT class no longer exists; use the PART class instead r317304: gctl_test_helper: add diagnostic output for parse_retval(..) This will help end-users better diagnose issues with the function. r317306: gctl_test.t: minor tweaks - Declare $count with the `my` scope operator to permit `use strict`. - Add `use strict`. - Use `use warnings` instead of using `-w` in the shebang. - Don't unlink $cmd when done (prevents unnecessary rebuilding). - Improve the error message when running with insufficient permissions, e.g., non-root. r317307: Use verb=delete not verb=remove The `remove` verb hasn't been present in geom_part*(4) for well over a decade, if ever. I couldn't find any references to it in ^/stable/5 at least, which is around the timeframe that this test was written. r317308: gctl_test.t: more tweaks to try and update the code and get it functional (again?) - Make the logfile for $out be built off the basename for $cmd, instead of $cmd. (r317292 broke this assumption). - Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for mountpoints. - Reindent the umount directive block while here to match the rest of the code. r317309: gctl_test.t: improve error reporting with mdcfg and mount directives If the commands had failed previously, it would press on and result in a series of cascading failures. Fail early and continue on to the next case instead of executing additional commands after a previously failed series of steps. Added: stable/10/tools/regression/geom_gpt/Makefile - copied, changed from r317292, head/tools/regression/geom_gpt/Makefile stable/10/tools/regression/geom_gpt/gctl_test.t - copied, changed from r317291, head/tools/regression/geom_gpt/gctl_test.t stable/10/tools/regression/geom_gpt/gctl_test_helper.c - copied, changed from r317291, head/tools/regression/geom_gpt/gctl_test_helper.c Deleted: stable/10/tools/regression/geom_gpt/gctl.t stable/10/tools/regression/geom_gpt/test.c Modified: Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/tools/regression/geom_gpt/Makefile (from r317292, head/tools/regression/geom_gpt/Makefile) ============================================================================== --- head/tools/regression/geom_gpt/Makefile Sat Apr 22 20:15:47 2017 (r317292, copy source) +++ stable/10/tools/regression/geom_gpt/Makefile Sat May 27 23:31:59 2017 (r319014) @@ -3,6 +3,9 @@ PROG= gctl_test_helper MAN= -LIBADD+= geom +DPADD+= ${LIBGEOM} +LDADD+= -lgeom + +WARNS?= 6 .include Copied and modified: stable/10/tools/regression/geom_gpt/gctl_test.t (from r317291, head/tools/regression/geom_gpt/gctl_test.t) ============================================================================== --- head/tools/regression/geom_gpt/gctl_test.t Sat Apr 22 20:06:11 2017 (r317291, copy source) +++ stable/10/tools/regression/geom_gpt/gctl_test.t Sat May 27 23:31:59 2017 (r319014) @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w +#!/usr/bin/env perl # # Copyright (c) 2005, 2006 Marcel Moolenaar # All rights reserved. @@ -26,13 +26,13 @@ # # $FreeBSD$ -my $srcdir = `dirname $0`; -chomp $srcdir; +use strict; +use warnings; + +use File::Basename; -my $cmd = "/tmp/gctl-$$"; -my $out = "$cmd.out"; my $disk = "/tmp/disk-$$"; -my $mntpt = "/tmp/mount-$$"; +my $mntpt_prefix = "/tmp/mount-$$"; my %steps = ( "000" => "gctl", @@ -70,9 +70,9 @@ my %steps = ( "054" => "conf", "060" => "gctl verb=add geom=%dev% type=516e7cb6-6ecf-11d6-8ff8-00022d09712b start=34 end=546 entry:8=1", "061" => "mount %dev%p1", - "062" => "gctl verb=remove geom=%dev% entry=1", + "062" => "gctl verb=delete geom=%dev% entry=1", "063" => "umount %dev%p1", - "064" => "gctl verb=remove geom=%dev% entry=1", + "064" => "gctl verb=delete geom=%dev% entry=1", "065" => "conf", "100" => "mdcfg destroy", "110" => "mdcfg create corrupted", @@ -132,20 +132,23 @@ if (exists $ENV{'TEST_VERBOSE'}) { } # Compile the driver... -my $st = system("cc -o $cmd -g $srcdir/gctl_test_helper.c -lgeom"); +my $st = system("make obj && make all"); if ($st != 0) { print "1..0 # SKIP error compiling test.c\n"; exit 0; } +chomp(my $cmd = `make '-V\${.OBJDIR}/\${PROG}'`); + +my $out = basename($cmd) . ".out"; # Make sure we have permission to use gctl... if (`$cmd` =~ "^FAIL Permission denied") { - print "1..0 # SKIP not enough permission\n"; + print "1..0 # SKIP insufficient permissions\n"; unlink $cmd; exit 0; } -$count = keys (%steps); +my $count = keys (%steps); print "1..$count\n"; my $nr = 1; @@ -158,13 +161,15 @@ foreach my $key (sort keys %steps) { $res =~ s/%dev%/$dev/g; if ($action =~ "^gctl") { + my $errmsg = ""; system("$cmd $verbose $args | tee $out 2>&1"); - $st = `tail -1 $out`; - if ($st =~ "^$res") { - print "ok $nr \# gctl($key)\n"; - } else { - print "not ok $nr \# gctl($key) - $st\n"; + chomp($st = `tail -1 $out`); + if ($st ne $res) { + $errmsg = "\"$st\" (actual) != \"$res\" (expected)\n"; } + printf("%sok $nr \# gctl($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); unlink $out; } elsif ($action =~ "^mdcfg") { if ($args =~ "^create") { @@ -191,17 +196,23 @@ foreach my $key (sort keys %steps) { } unlink $out; } elsif ($action =~ "^mount") { - system("mkdir $mntpt-$args"); - system("newfs $args"); - system("mount -t ufs /dev/$args $mntpt-$args"); - print "ok $nr \# mount($key)\n"; + my $errmsg = ""; + mkdir("$mntpt_prefix-$args"); + if (system("newfs /dev/$args") == 0) { + if (system("mount /dev/$args $mntpt_prefix-$args") != 0) { + $errmsg = "mount failed"; + } + } else { + $errmsg = "newfs failed"; + } + printf("%sok $nr # mount($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); } elsif ($action =~ "^umount") { - system("umount $mntpt-$args"); - system("rmdir $mntpt-$args"); - print "ok $nr \# umount($key)\n"; + system("umount $mntpt_prefix-$args"); + system("rmdir $mntpt_prefix-$args"); + print "ok $nr \# umount($key)\n"; } $nr += 1; } - -unlink $cmd; exit 0; Copied and modified: stable/10/tools/regression/geom_gpt/gctl_test_helper.c (from r317291, head/tools/regression/geom_gpt/gctl_test_helper.c) ============================================================================== --- head/tools/regression/geom_gpt/gctl_test_helper.c Sat Apr 22 20:06:11 2017 (r317291, copy source) +++ stable/10/tools/regression/geom_gpt/gctl_test_helper.c Sat May 27 23:31:59 2017 (r319014) @@ -28,6 +28,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -42,11 +44,11 @@ struct retval { char *value; }; -struct retval *retval; -int verbose; +static struct retval *retval; +static int verbose; static void -usage() +usage(void) { fprintf(stdout, "usage: %s [-v] param[:len][=value] ...\n", getprogname()); @@ -105,16 +107,18 @@ parse(char *arg, char **param, char **va return (0); } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { struct retval *rv; struct gctl_req *req; char *param, *value; const char *s; - int c, len; + int c, len, parse_retval; req = gctl_get_handle(); - gctl_ro_param(req, "class", -1, "GPT"); + assert(req != NULL); + gctl_ro_param(req, "class", -1, "PART"); while ((c = getopt(argc, argv, "v")) != -1) { switch (c) { @@ -129,10 +133,12 @@ int main(int argc, char *argv[]) } } - while (optind < argc) { - if (!parse(argv[optind++], ¶m, &value, &len)) { + for (; optind < argc; optind++) { + parse_retval = parse(argv[optind], ¶m, &value, &len); + if (parse_retval == 0) { if (len > 0) { rv = malloc(sizeof(struct retval)); + assert(rv != NULL); rv->param = param; rv->value = value; rv->retval = retval; @@ -140,7 +146,9 @@ int main(int argc, char *argv[]) gctl_rw_param(req, param, len, value); } else gctl_ro_param(req, param, -1, value); - } + } else + warnc(parse_retval, "failed to parse argument (%s)", + argv[optind]); } if (verbose) From owner-svn-src-all@freebsd.org Sat May 27 23:57:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDBA0D84D34; Sat, 27 May 2017 23:57:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF5B1383; Sat, 27 May 2017 23:57:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNv9DA078143; Sat, 27 May 2017 23:57:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNv9Vb078142; Sat, 27 May 2017 23:57:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272357.v4RNv9Vb078142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319015 - head/tools/regression/geom_gpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:57:10 -0000 Author: ngie Date: Sat May 27 23:57:09 2017 New Revision: 319015 URL: https://svnweb.freebsd.org/changeset/base/319015 Log: Use calloc instead of malloc + memset MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tools/regression/geom_gpt/gctl_test_helper.c Modified: head/tools/regression/geom_gpt/gctl_test_helper.c ============================================================================== --- head/tools/regression/geom_gpt/gctl_test_helper.c Sat May 27 23:31:59 2017 (r319014) +++ head/tools/regression/geom_gpt/gctl_test_helper.c Sat May 27 23:57:09 2017 (r319015) @@ -87,10 +87,9 @@ parse(char *arg, char **param, char **va return (EINVAL); if (*len <= 0 || *len > PATH_MAX) return (EINVAL); - *value = malloc(*len); + *value = calloc(*len, sizeof(char)); if (*value == NULL) return (ENOMEM); - memset(*value, 0, *len); if (equal != NULL) { if (strlen(equal) >= PATH_MAX) return (ENOMEM);