From owner-svn-src-stable-10@freebsd.org Sun Mar 12 04:12:43 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EB12D09131; Sun, 12 Mar 2017 04:12:43 +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 D345F1BE4; Sun, 12 Mar 2017 04:12:42 +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 v2C4CfFt037162; Sun, 12 Mar 2017 04:12:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4Cf74037160; Sun, 12 Mar 2017 04:12:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120412.v2C4Cf74037160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:12: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: r315110 - in stable/10: rescue/rescue 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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 04:12:43 -0000 Author: ngie Date: Sun Mar 12 04:12:41 2017 New Revision: 315110 URL: https://svnweb.freebsd.org/changeset/base/315110 Log: MFC r314240: Conditionally compile certain programs into rescue(8) if requested MK_CCD - ccdconfig MK_ROUTED - routed, rtquery Modified: stable/10/rescue/rescue/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/rescue/rescue/Makefile ============================================================================== --- stable/10/rescue/rescue/Makefile Sun Mar 12 04:12:22 2017 (r315109) +++ stable/10/rescue/rescue/Makefile Sun Mar 12 04:12:41 2017 (r315110) @@ -89,7 +89,7 @@ CRUNCH_SUPPRESS_LINK_-tcsh= 1 # CRUNCH_SRCDIRS+= sbin CRUNCH_PROGS_sbin= badsect \ - camcontrol ccdconfig clri devfs dmesg dump \ + camcontrol clri devfs dmesg dump \ dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb \ fsirand gbde geom ifconfig init \ kldconfig kldload kldstat kldunload ldconfig \ @@ -97,13 +97,17 @@ CRUNCH_PROGS_sbin= badsect \ mount_msdosfs mount_nfs mount_nullfs \ mount_udf mount_unionfs newfs \ newfs_msdos nos-tun ping reboot \ - restore rcorder route routed rtquery rtsol savecore \ + restore rcorder route rtsol savecore \ spppcontrol swapon sysctl tunefs umount .if ${MK_ATM} != "no" CRUNCH_PROGS_sbin+= atmconfig .endif +.if ${MK_CCD} != "no" +CRUNCH_PROGS_sbin+= ccdconfig +.endif + .if ${MK_INET6_SUPPORT} != "no" CRUNCH_PROGS_sbin+= ping6 .endif @@ -111,6 +115,11 @@ CRUNCH_PROGS_sbin+= ping6 .if ${MK_IPFILTER} != "no" CRUNCH_PROGS_sbin+= ipf .endif + +.if ${MK_ROUTED} != "no" +CRUNCH_PROGS_sbin+= routed rtquery +.endif + .if ${MK_ZFS} != "no" CRUNCH_PROGS_sbin+= zfs CRUNCH_PROGS_sbin+= zpool Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 12 04:12:22 2017 (r315109) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 12 04:12:41 2017 (r315110) @@ -801,6 +801,7 @@ OLD_DIRS+=usr/tests/usr.bin/calendar .if ${MK_CCD} == no OLD_FILES+=etc/rc.d/ccd +OLD_FILES+=rescue/ccdconfig OLD_FILES+=sbin/ccdconfig OLD_FILES+=usr/share/man/man4/ccd.4.gz OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz @@ -4437,6 +4438,8 @@ OLD_DIRS+=usr/tests/usr.sbin/etcupdate #.endif .if ${MK_ROUTED} == no +OLD_FILES+=rescue/routed +OLD_FILES+=rescue/rtquery OLD_FILES+=sbin/routed OLD_FILES+=sbin/rtquery OLD_FILES+=usr/share/man/man8/routed.8.gz From owner-svn-src-stable-10@freebsd.org Sun Mar 12 04:32:32 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84D8DD097B0; Sun, 12 Mar 2017 04:32: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 51A2F1C51; Sun, 12 Mar 2017 04:32: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 v2C4WVkW045756; Sun, 12 Mar 2017 04:32:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4WVaX045755; Sun, 12 Mar 2017 04:32:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120432.v2C4WVaX045755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:32: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: r315116 - stable/10/rescue/rescue X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 04:32:32 -0000 Author: ngie Date: Sun Mar 12 04:32:31 2017 New Revision: 315116 URL: https://svnweb.freebsd.org/changeset/base/315116 Log: MFC r314239: Add shutdown/poweroff support to rescue(8) shutdown is a safer way to power off than reboot (in general), because of the added shutdown process that it executes via /etc/rc.shutdown . It was odd that it was missing from rescue(8) since reboot and friends were added in past commits. While here, alias poweroff to shutdown for parity with sbin/shutdown/Makefile Modified: stable/10/rescue/rescue/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/rescue/rescue/Makefile ============================================================================== --- stable/10/rescue/rescue/Makefile Sun Mar 12 04:32:15 2017 (r315115) +++ stable/10/rescue/rescue/Makefile Sun Mar 12 04:32:31 2017 (r315116) @@ -98,7 +98,7 @@ CRUNCH_PROGS_sbin= badsect \ mount_udf mount_unionfs newfs \ newfs_msdos nos-tun ping reboot \ restore rcorder route rtsol savecore \ - spppcontrol swapon sysctl tunefs umount + shutdown spppcontrol swapon sysctl tunefs umount .if ${MK_ATM} != "no" CRUNCH_PROGS_sbin+= atmconfig @@ -185,6 +185,7 @@ CRUNCH_ALIAS_restore= rrestore CRUNCH_ALIAS_dump= rdump CRUNCH_ALIAS_fsck_ffs= fsck_4.2bsd fsck_ufs CRUNCH_ALIAS_geom= glabel gpart +CRUNCH_ALIAS_shutdown= poweroff # dhclient has historically been troublesome... CRUNCH_PROGS_sbin+= dhclient From owner-svn-src-stable-10@freebsd.org Sun Mar 12 04:41:28 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD53FD09B1F; Sun, 12 Mar 2017 04:41: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 79F711313; Sun, 12 Mar 2017 04:41: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 v2C4fROZ047827; Sun, 12 Mar 2017 04:41:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4fRR1047826; Sun, 12 Mar 2017 04:41:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120441.v2C4fRR1047826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:41:27 +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: r315119 - stable/10/sys/modules/geom/geom_uzip X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 04:41:28 -0000 Author: ngie Date: Sun Mar 12 04:41:27 2017 New Revision: 315119 URL: https://svnweb.freebsd.org/changeset/base/315119 Log: MFC r314644: Fix "make depend" with geom_uzip.ko: add opt_geom.h to SRCS Modified: stable/10/sys/modules/geom/geom_uzip/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/geom/geom_uzip/Makefile ============================================================================== --- stable/10/sys/modules/geom/geom_uzip/Makefile Sun Mar 12 04:40:01 2017 (r315118) +++ stable/10/sys/modules/geom/geom_uzip/Makefile Sun Mar 12 04:41:27 2017 (r315119) @@ -20,5 +20,6 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/x SRCS+= xz_crc32.c xz_dec_bcj.c xz_dec_lzma2.c xz_dec_stream.c \ xz_malloc.c SRCS+= xz.h xz_config.h xz_lzma2.h xz_malloc.h xz_private.h xz_stream.h +SRCS+= opt_geom.h .include From owner-svn-src-stable-10@freebsd.org Sun Mar 12 04:53:28 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAC46D09EF5; Sun, 12 Mar 2017 04:53: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 AA56C1E5A; Sun, 12 Mar 2017 04:53: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 v2C4rRgD054223; Sun, 12 Mar 2017 04:53:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4rR9Z054222; Sun, 12 Mar 2017 04:53:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120453.v2C4rR9Z054222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:53:27 +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: r315122 - stable/10/lib/libcam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 04:53:29 -0000 Author: ngie Date: Sun Mar 12 04:53:27 2017 New Revision: 315122 URL: https://svnweb.freebsd.org/changeset/base/315122 Log: MFC r314189,r314190,r314191: r314189: Fix up NULL/'\0' uses and fix 2 derefs after NULL CID: 1018898, 1018899 r314190: Fix some minor style nits: put parentheses around return values r314191: Fix up r314189 The conditional in do_buff_decode(..) after the while loop was accidentally inverted. Only increment the pointer for fmt if it's not NUL. Modified: stable/10/lib/libcam/scsi_cmdparse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcam/scsi_cmdparse.c ============================================================================== --- stable/10/lib/libcam/scsi_cmdparse.c Sun Mar 12 04:52:09 2017 (r315121) +++ stable/10/lib/libcam/scsi_cmdparse.c Sun Mar 12 04:53:27 2017 (r315122) @@ -128,14 +128,14 @@ do_buff_decode(u_int8_t *buff, size_t le *(va_arg(*ap, int *)) = (ARG); \ assigned++; \ } \ - field_name[0] = 0; \ + field_name[0] = '\0'; \ suppress = 0; \ } while (0) u_char bits = 0; /* For bit fields */ int shift = 0; /* Bits already shifted out */ suppress = 0; - field_name[0] = 0; + field_name[0] = '\0'; while (!done) { switch(letter = *fmt) { @@ -169,9 +169,9 @@ do_buff_decode(u_int8_t *buff, size_t le fmt++; } - if (fmt) + if (*fmt != '\0') fmt++; /* Skip '}' */ - field_name[i] = 0; + field_name[i] = '\0'; break; } @@ -255,7 +255,7 @@ do_buff_decode(u_int8_t *buff, size_t le break; } if (!suppress) { - if (arg_put) + if (arg_put != NULL) (*arg_put)(puthook, (letter == 't' ? 'b' : letter), &buff[ind], width, field_name); @@ -268,7 +268,7 @@ do_buff_decode(u_int8_t *buff, size_t le for (p = dest + width - 1; p >= dest && *p == ' '; p--) - *p = 0; + *p = '\0'; } } assigned++; @@ -379,22 +379,22 @@ next_field(const char **pp, char *fmt, i field_size = 8; /* Default to byte field type... */ *fmt = 'i'; field_width = 1; /* 1 byte wide */ - if (name) - *name = 0; + if (name != NULL) + *name = '\0'; state = BETWEEN_FIELDS; while (state != DONE) { switch(state) { case BETWEEN_FIELDS: - if (*p == 0) + if (*p == '\0') state = DONE; else if (isspace(*p)) p++; else if (*p == '#') { while (*p && *p != '\n') p++; - if (p) + if (*p != '\0') p++; } else if (*p == '{') { int i = 0; @@ -410,7 +410,7 @@ next_field(const char **pp, char *fmt, i } if(name && i < n_name) - name[i] = 0; + name[i] = '\0'; if (*p == '}') p++; @@ -530,7 +530,7 @@ next_field(const char **pp, char *fmt, i if (is_error) { *error_p = 1; - return 0; + return (0); } *error_p = 0; @@ -568,7 +568,7 @@ do_encode(u_char *buff, size_t vec_max, if (suppress) value = 0; else - value = arg_get ? + value = arg_get != NULL ? (*arg_get)(gethook, field_name) : va_arg(*ap, int); } @@ -659,9 +659,9 @@ do_encode(u_char *buff, size_t vec_max, *used = ind; if (error) - return -1; + return (-1); - return encoded; + return (encoded); } int @@ -672,8 +672,8 @@ csio_decode(struct ccb_scsiio *csio, con va_start(ap, fmt); - retval = do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, 0, 0, - fmt, &ap); + retval = do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, + NULL, NULL, fmt, &ap); va_end(ap); @@ -705,7 +705,7 @@ buff_decode(u_int8_t *buff, size_t len, va_start(ap, fmt); - retval = do_buff_decode(buff, len, 0, 0, fmt, &ap); + retval = do_buff_decode(buff, len, NULL, NULL, fmt, &ap); va_end(ap); @@ -723,7 +723,7 @@ buff_decode_visit(u_int8_t *buff, size_t * the arg_put function. */ if (arg_put == NULL) - return(-1); + return (-1); return (do_buff_decode(buff, len, arg_put, puthook, fmt, NULL)); } @@ -779,20 +779,20 @@ csio_build_visit(struct ccb_scsiio *csio int retval; if (csio == NULL) - return(0); + return (0); /* * We need something to encode, but we can't get it without the * arg_get function. */ if (arg_get == NULL) - return(-1); + return (-1); bzero(csio, sizeof(struct ccb_scsiio)); if ((retval = do_encode(csio->cdb_io.cdb_bytes, SCSI_MAX_CDBLEN, &cmdlen, arg_get, gethook, cmd_spec, NULL)) == -1) - return(retval); + return (retval); cam_fill_csio(csio, /* retries */ retry_count, @@ -805,7 +805,7 @@ csio_build_visit(struct ccb_scsiio *csio /* cdb_len */ cmdlen, /* timeout */ timeout ? timeout : 5000); - return(retval); + return (retval); } int @@ -819,7 +819,8 @@ csio_encode(struct ccb_scsiio *csio, con va_start(ap, fmt); - retval = do_encode(csio->data_ptr, csio->dxfer_len, 0, 0, 0, fmt, &ap); + retval = do_encode(csio->data_ptr, csio->dxfer_len, NULL, NULL, NULL, + fmt, &ap); va_end(ap); @@ -836,9 +837,9 @@ buff_encode_visit(u_int8_t *buff, size_t * arg_get function. */ if (arg_get == NULL) - return(-1); + return (-1); - return (do_encode(buff, len, 0, arg_get, gethook, fmt, NULL)); + return (do_encode(buff, len, NULL, arg_get, gethook, fmt, NULL)); } int @@ -851,8 +852,8 @@ csio_encode_visit(struct ccb_scsiio *csi * arg_get function. */ if (arg_get == NULL) - return(-1); + return (-1); - return (do_encode(csio->data_ptr, csio->dxfer_len, 0, arg_get, + return (do_encode(csio->data_ptr, csio->dxfer_len, NULL, arg_get, gethook, fmt, NULL)); } From owner-svn-src-stable-10@freebsd.org Sun Mar 12 04:55:04 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6961BD09FC6; Sun, 12 Mar 2017 04:55: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 1CB7510EC; Sun, 12 Mar 2017 04:55: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 v2C4t32s054431; Sun, 12 Mar 2017 04:55:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4t3N6054430; Sun, 12 Mar 2017 04:55:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120455.v2C4t3N6054430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:55:03 +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: r315124 - stable/10/usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 04:55:04 -0000 Author: ngie Date: Sun Mar 12 04:55:02 2017 New Revision: 315124 URL: https://svnweb.freebsd.org/changeset/base/315124 Log: MFC r314233: Parameterize out the length of struct filed->f_lasttime as `MAXDATELEN` This removes the hardcoded value for the field (16) and the equivalent hardcoded lengths in logmsg(..). This change is being done to help stage future work to add RFC5424/RFC5434 support to syslogd(8). Obtained from: Isilon OneFS (dcd33d13da) (as part of a larger change) Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Sun Mar 12 04:53:48 2017 (r315123) +++ stable/10/usr.sbin/syslogd/syslogd.c Sun Mar 12 04:55:02 2017 (r315124) @@ -68,6 +68,8 @@ __FBSDID("$FreeBSD$"); * Priority comparison code by Harlan Stenn. */ +/* Maximum number of characters in time of last occurrence */ +#define MAXDATELEN 16 #define MAXLINE 1024 /* maximum line length */ #define MAXSVLINE MAXLINE /* maximum saved line length */ #define DEFUPRI (LOG_USER|LOG_NOTICE) @@ -185,7 +187,7 @@ struct filed { } f_pipe; } f_un; char f_prevline[MAXSVLINE]; /* last message logged */ - char f_lasttime[16]; /* time of last occurrence */ + char f_lasttime[MAXDATELEN]; /* time of last occurrence */ char f_prevhost[MAXHOSTNAMELEN]; /* host from which recd. */ int f_prevpri; /* pri of f_prevline */ int f_prevlen; /* length of f_prevline */ @@ -939,7 +941,7 @@ logmsg(int pri, const char *msg, const c * Check to see if msg looks non-standard. */ msglen = strlen(msg); - if (msglen < 16 || msg[3] != ' ' || msg[6] != ' ' || + if (msglen < MAXDATELEN || msg[3] != ' ' || msg[6] != ' ' || msg[9] != ':' || msg[12] != ':' || msg[15] != ' ') flags |= ADDDATE; @@ -948,8 +950,8 @@ logmsg(int pri, const char *msg, const c timestamp = ctime(&now) + 4; } else { timestamp = msg; - msg += 16; - msglen -= 16; + msg += MAXDATELEN; + msglen -= MAXDATELEN; } /* skip leading blanks */ From owner-svn-src-stable-10@freebsd.org Sun Mar 12 04:57:23 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2217AD0815B; Sun, 12 Mar 2017 04:57: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 E57031612; Sun, 12 Mar 2017 04:57:22 +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 v2C4vMsD054909; Sun, 12 Mar 2017 04:57:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4vMK6054908; Sun, 12 Mar 2017 04:57:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120457.v2C4vMK6054908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:57:22 +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: r315127 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 04:57:23 -0000 Author: ngie Date: Sun Mar 12 04:57:21 2017 New Revision: 315127 URL: https://svnweb.freebsd.org/changeset/base/315127 Log: MFC r314545: Add missing section to .Xr macro calls for wpifw(4) The driver manpage for wpifw(4) is missing, but will be added soon. This fixes the other 2 .Xr calls lacking sections to match the 3rd, syntactically correct, reference in the SEE ALSO section. Modified: stable/10/share/man/man4/wpi.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/wpi.4 ============================================================================== --- stable/10/share/man/man4/wpi.4 Sun Mar 12 04:56:21 2017 (r315126) +++ stable/10/share/man/man4/wpi.4 Sun Mar 12 04:57:21 2017 (r315127) @@ -69,7 +69,7 @@ For more information on configuring this .Xr ifconfig 8 . .Pp This driver requires the firmware built with the -.Nm wpifw +.Nm wpifw 4 module to work. .Sh FILES .Bl -tag -width ".Pa /usr/share/doc/legal/intel_wpi/LICENSE" -compact @@ -107,7 +107,7 @@ The driver failed to load the firmware i .Xr firmware 9 subsystem. Verify the -.Xr wpifw +.Xr wpifw 4 firmware module is installed. .It "wpi%d: fatal firmware error" An unknown error has occurred in the uploaded firmware, you may have to From owner-svn-src-stable-10@freebsd.org Sun Mar 12 04:58:59 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BE4DD08277; Sun, 12 Mar 2017 04:58: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 ECB1C18C8; Sun, 12 Mar 2017 04:58: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 v2C4wwsD055118; Sun, 12 Mar 2017 04:58:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4wwIc055117; Sun, 12 Mar 2017 04:58:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120458.v2C4wwIc055117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:58: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: r315129 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 04:58:59 -0000 Author: ngie Date: Sun Mar 12 04:58:57 2017 New Revision: 315129 URL: https://svnweb.freebsd.org/changeset/base/315129 Log: MFC r314542: kern.cam.da.X.delete_method: add -width to .Bl macro call Now the section width is set appropriately per the BIO_DELETE parameter being described. Modified: stable/10/share/man/man4/da.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/da.4 ============================================================================== --- stable/10/share/man/man4/da.4 Sun Mar 12 04:57:35 2017 (r315128) +++ stable/10/share/man/man4/da.4 Sun Mar 12 04:58:57 2017 (r315129) @@ -156,7 +156,7 @@ Set to 1 to enable sorting, 0 to disable The default is sorting enabled for HDDs and disabled for SSDs. .It Va kern.cam.da. Ns Ar X Ns Va .delete_method This variable specifies method to handle BIO_DELETE requests: -.Bl -tag +.Bl -tag -width "ATA_TRIM" .It ATA_TRIM ATA TRIM via ATA COMMAND PASS THROUGH command, .It UNMAP From owner-svn-src-stable-10@freebsd.org Sun Mar 12 05:36:33 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 718CBCF91B2; Sun, 12 Mar 2017 05:36:33 +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 33DD81FB4; Sun, 12 Mar 2017 05:36:33 +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 v2C5aWts071577; Sun, 12 Mar 2017 05:36:32 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C5aW9K071574; Sun, 12 Mar 2017 05:36:32 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703120536.v2C5aW9K071574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 12 Mar 2017 05:36:32 +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: r315135 - stable/10/usr.bin/dc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 05:36:33 -0000 Author: pfg Date: Sun Mar 12 05:36:31 2017 New Revision: 315135 URL: https://svnweb.freebsd.org/changeset/base/315135 Log: MFC r314321: dc(1): Merge minor changes from OpenBSD. Prefer setvbuf() to setlinebuf() for portability. Some style(9) and redundant tests for NULL. These are only meant to ease up merging newer changes. Obtained from: OpenBSD Modified: stable/10/usr.bin/dc/bcode.c stable/10/usr.bin/dc/dc.c stable/10/usr.bin/dc/stack.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/dc/bcode.c ============================================================================== --- stable/10/usr.bin/dc/bcode.c Sun Mar 12 05:35:28 2017 (r315134) +++ stable/10/usr.bin/dc/bcode.c Sun Mar 12 05:36:31 2017 (r315135) @@ -960,9 +960,8 @@ badd(void) struct number *a, *b, *r; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } b = pop_number(); if (b == NULL) { push_number(a); @@ -987,9 +986,8 @@ bsub(void) struct number *a, *b, *r; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } b = pop_number(); if (b == NULL) { push_number(a); @@ -1035,9 +1033,8 @@ bmul(void) struct number *a, *b, *r; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } b = pop_number(); if (b == NULL) { push_number(a); @@ -1060,9 +1057,8 @@ bdiv(void) u_int scale; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } b = pop_number(); if (b == NULL) { push_number(a); @@ -1097,9 +1093,8 @@ bmod(void) u_int scale; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } b = pop_number(); if (b == NULL) { push_number(a); @@ -1134,9 +1129,8 @@ bdivmod(void) u_int scale; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } b = pop_number(); if (b == NULL) { push_number(a); @@ -1176,9 +1170,8 @@ bexp(void) u_int rscale; p = pop_number(); - if (p == NULL) { + if (p == NULL) return; - } a = pop_number(); if (a == NULL) { push_number(p); @@ -1299,9 +1292,8 @@ bsqrt(void) onecount = 0; n = pop_number(); - if (n == NULL) { + if (n == NULL) return; - } if (BN_is_zero(n->number)) { r = new_number(); push_number(r); @@ -1342,9 +1334,8 @@ not(void) struct number *a; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } a->scale = 0; bn_check(BN_set_word(a->number, BN_get_word(a->number) ? 0 : 1)); push_number(a); @@ -1363,9 +1354,8 @@ equal_numbers(void) struct number *a, *b, *r; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } b = pop_number(); if (b == NULL) { push_number(a); @@ -1383,9 +1373,8 @@ less_numbers(void) struct number *a, *b, *r; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } b = pop_number(); if (b == NULL) { push_number(a); @@ -1403,9 +1392,8 @@ lesseq_numbers(void) struct number *a, *b, *r; a = pop_number(); - if (a == NULL) { + if (a == NULL) return; - } b = pop_number(); if (b == NULL) { push_number(a); @@ -1736,9 +1724,8 @@ eval_tos(void) char *p; p = pop_string(); - if (p == NULL) - return; - eval_string(p); + if (p != NULL) + eval_string(p); } void Modified: stable/10/usr.bin/dc/dc.c ============================================================================== --- stable/10/usr.bin/dc/dc.c Sun Mar 12 05:35:28 2017 (r315134) +++ stable/10/usr.bin/dc/dc.c Sun Mar 12 05:36:31 2017 (r315135) @@ -120,8 +120,8 @@ main(int argc, char *argv[]) if (!preproc_done) init_bmachine(extended_regs); - setlinebuf(stdout); - setlinebuf(stderr); + (void)setvbuf(stdout, NULL, _IOLBF, 0); + (void)setvbuf(stderr, NULL, _IOLBF, 0); if (argc > 1) usage(); Modified: stable/10/usr.bin/dc/stack.c ============================================================================== --- stable/10/usr.bin/dc/stack.c Sun Mar 12 05:35:28 2017 (r315134) +++ stable/10/usr.bin/dc/stack.c Sun Mar 12 05:36:31 2017 (r315135) @@ -68,10 +68,8 @@ stack_free_value(struct value *v) free(v->u.string); break; } - if (v->array != NULL) { - array_free(v->array); - v->array = NULL; - } + array_free(v->array); + v->array = NULL; } /* Copy number or string content into already allocated target */ @@ -225,10 +223,8 @@ stack_popnumber(struct stack *stack) if (stack_empty(stack)) return (NULL); - if (stack->stack[stack->sp].array != NULL) { - array_free(stack->stack[stack->sp].array); - stack->stack[stack->sp].array = NULL; - } + array_free(stack->stack[stack->sp].array); + stack->stack[stack->sp].array = NULL; if (stack->stack[stack->sp].type != BCODE_NUMBER) { warnx("not a number"); /* XXX remove */ return (NULL); @@ -242,10 +238,8 @@ stack_popstring(struct stack *stack) if (stack_empty(stack)) return (NULL); - if (stack->stack[stack->sp].array != NULL) { - array_free(stack->stack[stack->sp].array); - stack->stack[stack->sp].array = NULL; - } + array_free(stack->stack[stack->sp].array); + stack->stack[stack->sp].array = NULL; if (stack->stack[stack->sp].type != BCODE_STRING) { warnx("not a string"); /* XXX remove */ return (NULL); @@ -257,9 +251,8 @@ void stack_clear(struct stack *stack) { - while (stack->sp >= 0) { + while (stack->sp >= 0) stack_free_value(&stack->stack[stack->sp--]); - } free(stack->stack); stack_init(stack); } From owner-svn-src-stable-10@freebsd.org Sun Mar 12 06:18:42 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DE53CF9CDB; Sun, 12 Mar 2017 06:18:42 +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 4A78512C5; Sun, 12 Mar 2017 06:18:42 +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 v2C6IfTY087956; Sun, 12 Mar 2017 06:18:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C6Ifii087955; Sun, 12 Mar 2017 06:18:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703120618.v2C6Ifii087955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 12 Mar 2017 06:18: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: r315138 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 06:18:42 -0000 Author: mav Date: Sun Mar 12 06:18:41 2017 New Revision: 315138 URL: https://svnweb.freebsd.org/changeset/base/315138 Log: MFC r314307: Add support for SIMs without autosense. If we asked to send sense data by setting CAM_SEND_SENSE, but SIM didn't confirm transmission by setting CAM_SENT_SENSE, assume it was not sent. Queue the I/O back to CTL for later REQUEST SENSE with ctl_queue_sense(). This is needed for error reporting on SPI HBAs like ahc(4)/ahd(4). Modified: stable/10/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Sun Mar 12 06:18:08 2017 (r315137) +++ stable/10/sys/cam/ctl/scsi_ctl.c Sun Mar 12 06:18:41 2017 (r315138) @@ -1229,6 +1229,20 @@ ctlfedone(struct cam_periph *periph, uni * datamove done routine. */ if ((io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { + /* + * If we asked to send sense data but it wasn't sent, + * queue the I/O back to CTL for later REQUEST SENSE. + */ + if ((done_ccb->ccb_h.flags & CAM_SEND_SENSE) != 0 && + (done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP && + (done_ccb->ccb_h.status & CAM_SENT_SENSE) == 0 && + (io = ctl_alloc_io_nowait(bus_softc->port.ctl_pool_ref)) != NULL) { + PRIV_INFO(io) = PRIV_INFO( + (union ctl_io *)atio->ccb_h.io_ptr); + ctl_queue_sense(atio->ccb_h.io_ptr); + atio->ccb_h.io_ptr = io; + } + /* Abort ATIO if CTIO sending status has failed. */ if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { From owner-svn-src-stable-10@freebsd.org Sun Mar 12 06:20:30 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43BB0CF9E02; Sun, 12 Mar 2017 06:20:30 +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 106D915CE; Sun, 12 Mar 2017 06:20:29 +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 v2C6KTcC088159; Sun, 12 Mar 2017 06:20:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C6KSZB088157; Sun, 12 Mar 2017 06:20:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703120620.v2C6KSZB088157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 12 Mar 2017 06:20: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: r315140 - stable/10/sys/dev/aic7xxx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 06:20:30 -0000 Author: mav Date: Sun Mar 12 06:20:28 2017 New Revision: 315140 URL: https://svnweb.freebsd.org/changeset/base/315140 Log: MFC r314308: Fix LUN enabling on wildcard target, as done by CTL. Modified: stable/10/sys/dev/aic7xxx/aic79xx.c stable/10/sys/dev/aic7xxx/aic7xxx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/aic7xxx/aic79xx.c ============================================================================== --- stable/10/sys/dev/aic7xxx/aic79xx.c Sun Mar 12 06:19:58 2017 (r315139) +++ stable/10/sys/dev/aic7xxx/aic79xx.c Sun Mar 12 06:20:28 2017 (r315140) @@ -9927,7 +9927,8 @@ ahd_handle_en_lun(struct ahd_softc *ahd, u_int our_id; our_id = ahd->our_id; - if (ccb->ccb_h.target_id != our_id) { + if (ccb->ccb_h.target_id != our_id + && ccb->ccb_h.target_id != CAM_TARGET_WILDCARD) { if ((ahd->features & AHD_MULTI_TID) != 0 && (ahd->flags & AHD_INITIATORROLE) != 0) { /* Modified: stable/10/sys/dev/aic7xxx/aic7xxx.c ============================================================================== --- stable/10/sys/dev/aic7xxx/aic7xxx.c Sun Mar 12 06:19:58 2017 (r315139) +++ stable/10/sys/dev/aic7xxx/aic7xxx.c Sun Mar 12 06:20:28 2017 (r315140) @@ -7353,7 +7353,8 @@ ahc_handle_en_lun(struct ahc_softc *ahc, else our_id = ahc->our_id_b; - if (ccb->ccb_h.target_id != our_id) { + if (ccb->ccb_h.target_id != our_id + && ccb->ccb_h.target_id != CAM_TARGET_WILDCARD) { /* * our_id represents our initiator ID, or * the ID of the first target to have an From owner-svn-src-stable-10@freebsd.org Sun Mar 12 12:13:00 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5EFAD08D22; Sun, 12 Mar 2017 12:13:00 +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 71FC81958; Sun, 12 Mar 2017 12:13:00 +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 v2CCCxZi033535; Sun, 12 Mar 2017 12:12:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CCCx6f033534; Sun, 12 Mar 2017 12:12:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703121212.v2CCCx6f033534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 12 Mar 2017 12:12: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: r315145 - stable/10/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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 12:13:00 -0000 Author: kib Date: Sun Mar 12 12:12:59 2017 New Revision: 315145 URL: https://svnweb.freebsd.org/changeset/base/315145 Log: MFC r314960: Fix typo in comment. Modified: stable/10/sys/sys/signalvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/signalvar.h ============================================================================== --- stable/10/sys/sys/signalvar.h Sun Mar 12 12:11:11 2017 (r315144) +++ stable/10/sys/sys/signalvar.h Sun Mar 12 12:12:59 2017 (r315145) @@ -233,7 +233,7 @@ typedef struct ksiginfo { #define KSI_TRAP 0x01 /* Generated by trap. */ #define KSI_EXT 0x02 /* Externally managed ksi. */ #define KSI_INS 0x04 /* Directly insert ksi, not the copy */ -#define KSI_SIGQ 0x08 /* Generated by sigqueue, might ret EGAIN. */ +#define KSI_SIGQ 0x08 /* Generated by sigqueue, might ret EAGAIN. */ #define KSI_HEAD 0x10 /* Insert into head, not tail. */ #define KSI_COPYMASK (KSI_TRAP|KSI_SIGQ) From owner-svn-src-stable-10@freebsd.org Sun Mar 12 13:15:27 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3C47D090BD; Sun, 12 Mar 2017 13:15:27 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92CDC19D1; Sun, 12 Mar 2017 13:15:27 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CDFQkW057889; Sun, 12 Mar 2017 13:15:26 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDFQwn057888; Sun, 12 Mar 2017 13:15:26 GMT (envelope-from des@FreeBSD.org) Message-Id: <201703121315.v2CDFQwn057888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 12 Mar 2017 13:15: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: r315148 - stable/10/sbin/md5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 13:15:27 -0000 Author: des Date: Sun Mar 12 13:15:26 2017 New Revision: 315148 URL: https://svnweb.freebsd.org/changeset/base/315148 Log: MFH (r314528): update to reflect the state of SHA-1 Modified: stable/10/sbin/md5/md5.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/md5/md5.1 ============================================================================== --- stable/10/sbin/md5/md5.1 Sun Mar 12 13:14:49 2017 (r315147) +++ stable/10/sbin/md5/md5.1 Sun Mar 12 13:15:26 2017 (r315148) @@ -67,21 +67,17 @@ in a secure manner before being encrypte key under a public-key cryptosystem such as .Tn RSA . .Pp +The .Tn MD5 -has been completely broken as far as finding collisions is -concerned, and should not be relied upon to produce unique outputs. -This also means that -.Tn MD5 -should not be used as part of a cryptographic signature scheme. -At the current time (2014-05-17) there is no publicly known method to -.Dq reverse -MD5, i.e., to find an input given a hash value. -.Pp -.Tn SHA-1 -currently (2014-05-17) has no known collisions, but an attack has been -found which is faster than a brute-force search, placing the security of +and .Tn SHA-1 -in doubt. +algorithms have been proven to be vulnerable to practical collision +attacks and should not be relied upon to produce unique outputs, nor +should they be used as part of a cryptographic signature scheme. +As of 2016-03-02, there is no publicly known method to +.Em reverse +either algorithm, i.e. to find an input that produces a specific +output. .Pp .Tn SHA-512t256 is a version of @@ -94,6 +90,8 @@ The hashes are not interchangeable. .Pp It is recommended that all new applications use .Tn SHA-512 +or +.Tn SKEIN-512 instead of one of the other hash functions. .Pp The following options may be used in any combination and must From owner-svn-src-stable-10@freebsd.org Sun Mar 12 13:20:08 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 575B2D091EB; Sun, 12 Mar 2017 13:20:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2648D1CE2; Sun, 12 Mar 2017 13:20:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CDK70D058189; Sun, 12 Mar 2017 13:20:07 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDK7Po058188; Sun, 12 Mar 2017 13:20:07 GMT (envelope-from des@FreeBSD.org) Message-Id: <201703121320.v2CDK7Po058188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 12 Mar 2017 13:20: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: r315150 - stable/10/sbin/md5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 13:20:08 -0000 Author: des Date: Sun Mar 12 13:20:07 2017 New Revision: 315150 URL: https://svnweb.freebsd.org/changeset/base/315150 Log: MFH (r314554): fix date in previous commit Also remove mention of SKEIN-512 since it is not available in 10. Modified: stable/10/sbin/md5/md5.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/md5/md5.1 ============================================================================== --- stable/10/sbin/md5/md5.1 Sun Mar 12 13:18:48 2017 (r315149) +++ stable/10/sbin/md5/md5.1 Sun Mar 12 13:20:07 2017 (r315150) @@ -74,7 +74,7 @@ and algorithms have been proven to be vulnerable to practical collision attacks and should not be relied upon to produce unique outputs, nor should they be used as part of a cryptographic signature scheme. -As of 2016-03-02, there is no publicly known method to +As of 2017-03-02, there is no publicly known method to .Em reverse either algorithm, i.e. to find an input that produces a specific output. @@ -90,8 +90,6 @@ The hashes are not interchangeable. .Pp It is recommended that all new applications use .Tn SHA-512 -or -.Tn SKEIN-512 instead of one of the other hash functions. .Pp The following options may be used in any combination and must From owner-svn-src-stable-10@freebsd.org Sun Mar 12 13:23:24 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3BB7D0941B; Sun, 12 Mar 2017 13:23:24 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 829831244; Sun, 12 Mar 2017 13:23:24 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CDNNTU061910; Sun, 12 Mar 2017 13:23:23 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDNN2l061909; Sun, 12 Mar 2017 13:23:23 GMT (envelope-from des@FreeBSD.org) Message-Id: <201703121323.v2CDNN2l061909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 12 Mar 2017 13:23:23 +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: r315152 - stable/10/lib/libpam/modules/pam_krb5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 13:23:24 -0000 Author: des Date: Sun Mar 12 13:23:23 2017 New Revision: 315152 URL: https://svnweb.freebsd.org/changeset/base/315152 Log: MFH (r314598): load default options before requesting ticket PR: 213909 Modified: stable/10/lib/libpam/modules/pam_krb5/pam_krb5.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/pam_krb5/pam_krb5.c ============================================================================== --- stable/10/lib/libpam/modules/pam_krb5/pam_krb5.c Sun Mar 12 13:22:35 2017 (r315151) +++ stable/10/lib/libpam/modules/pam_krb5/pam_krb5.c Sun Mar 12 13:23:23 2017 (r315152) @@ -239,6 +239,8 @@ pam_sm_authenticate(pam_handle_t *pamh, retval = PAM_SERVICE_ERR; goto cleanup2; } + krb5_get_init_creds_opt_set_default_flags(pam_context, + service, NULL, opts); if (openpam_get_option(pamh, PAM_OPT_FORWARDABLE)) krb5_get_init_creds_opt_set_forwardable(opts, 1); From owner-svn-src-stable-10@freebsd.org Sun Mar 12 13:36:15 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B79FED09A19; Sun, 12 Mar 2017 13:36:15 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86AA21AEA; Sun, 12 Mar 2017 13:36:15 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CDaEfh066741; Sun, 12 Mar 2017 13:36:14 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDaECI066740; Sun, 12 Mar 2017 13:36:14 GMT (envelope-from des@FreeBSD.org) Message-Id: <201703121336.v2CDaECI066740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 12 Mar 2017 13:36: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: r315153 - stable/10/lib/libradius X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 13:36:15 -0000 Author: des Date: Sun Mar 12 13:36:14 2017 New Revision: 315153 URL: https://svnweb.freebsd.org/changeset/base/315153 Log: MFH (r300602): the NAS identifier is a string, not an integer Modified: stable/10/lib/libradius/radlib.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libradius/radlib.h ============================================================================== --- stable/10/lib/libradius/radlib.h Sun Mar 12 13:23:23 2017 (r315152) +++ stable/10/lib/libradius/radlib.h Sun Mar 12 13:36:14 2017 (r315153) @@ -98,7 +98,7 @@ #define RAD_TERMINATION_ACTION 29 /* Integer */ #define RAD_CALLED_STATION_ID 30 /* String */ #define RAD_CALLING_STATION_ID 31 /* String */ -#define RAD_NAS_IDENTIFIER 32 /* Integer */ +#define RAD_NAS_IDENTIFIER 32 /* String */ #define RAD_PROXY_STATE 33 /* Integer */ #define RAD_LOGIN_LAT_SERVICE 34 /* Integer */ #define RAD_LOGIN_LAT_NODE 35 /* Integer */ From owner-svn-src-stable-10@freebsd.org Sun Mar 12 13:42:41 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6919D09D75; Sun, 12 Mar 2017 13:42:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A73D510EB; Sun, 12 Mar 2017 13:42:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CDgeuR070497; Sun, 12 Mar 2017 13:42:40 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDgeT5070496; Sun, 12 Mar 2017 13:42:40 GMT (envelope-from des@FreeBSD.org) Message-Id: <201703121342.v2CDgeT5070496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 12 Mar 2017 13:42:40 +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: r315154 - stable/10/sbin/geom/class/part X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 13:42:42 -0000 Author: des Date: Sun Mar 12 13:42:40 2017 New Revision: 315154 URL: https://svnweb.freebsd.org/changeset/base/315154 Log: MFH (r303289): update example section PR: 211361 Modified: stable/10/sbin/geom/class/part/gpart.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/10/sbin/geom/class/part/gpart.8 Sun Mar 12 13:36:14 2017 (r315153) +++ stable/10/sbin/geom/class/part/gpart.8 Sun Mar 12 13:42:40 2017 (r315154) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2015 +.Dd July 25, 2016 .Dt GPART 8 .Os .Sh NAME @@ -1193,86 +1193,112 @@ Otherwise the values will be left unchan .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES -Create a GPT scheme on -.Pa ada0 : +The examples below assume that the disk's logical block size is 512 +bytes, regardless of its physical block size. +.Ss GPT +In this example, we will format +.Pa ada0 +with the GPT scheme and create boot, swap and root partitions. +First, we need to create the partition table: .Bd -literal -offset indent /sbin/gpart create -s GPT ada0 .Ed .Pp -Embed GPT bootstrap code into a protective MBR: +Next, we install a protective MBR with the first-stage bootstrap code. +The protective MBR lists a single, bootable partition spanning the +entire disk, thus allowing non-GPT-aware BIOSes to boot from the disk +and preventing tools which do not understand the GPT scheme from +considering the disk to be unformatted. .Bd -literal -offset indent /sbin/gpart bootcode -b /boot/pmbr ada0 .Ed .Pp -Create a dedicated +We then create a dedicated .Cm freebsd-boot -partition that can boot +partition to hold the second-stage boot loader, which will load the .Fx -from a -.Cm freebsd-ufs -partition, and install bootstrap code into it. +kernel and modules from a UFS or ZFS filesystem. This partition must be larger than the bootstrap code .Po -usually either +either .Pa /boot/gptboot -or +for UFS or .Pa /boot/gptzfsboot +for ZFS .Pc , but smaller than 545 kB since the first-stage loader will load the entire partition into memory during boot, regardless of how much data it actually contains. -This example uses 88 blocks (44 kB) so the next partition will be -aligned on a 64 kB boundary without the need to specify an explicit -offset or alignment. -The boot partition itself is aligned on a 4 kB boundary. +We create a 472-block (236 kB) boot partition at offset 40, which is +the size of the partition table (34 blocks or 17 kB) rounded up to the +nearest 4 kB boundary. .Bd -literal -offset indent -/sbin/gpart add -b 40 -s 88 -t freebsd-boot ada0 +/sbin/gpart add -b 40 -s 472 -t freebsd-boot ada0 /sbin/gpart bootcode -p /boot/gptboot -i 1 ada0 .Ed .Pp -Create a 512MB-sized +We now create a 4 GB swap partition at the first available offset, +which is 40 + 472 = 512 blocks (256 kB). +.Bd -literal -offset indent +/sbin/gpart add -s 4G -t freebsd-swap ada0 +.Ed +.Pp +Aligning the swap partition and all subsequent partitions on a 256 kB +boundary ensures optimal performance on a wide range of media, from +plain old disks with 512-byte blocks, through modern +.Dq advanced format +disks with 4096-byte physical blocks, to RAID volumes with stripe +sizes of up to 256 kB. +.Pp +Finally, we create and format an 8 GB .Cm freebsd-ufs -partition to contain a UFS filesystem from which the system can boot. +partition for the root filesystem, leaving the rest of the slice free +for additional filesystems: .Bd -literal -offset indent -/sbin/gpart add -s 512M -t freebsd-ufs ada0 +/sbin/gpart add -s 8G -t freebsd-ufs ada0 +/sbin/newfs -Uj /dev/ada0p3 .Ed +.Ss MBR +In this example, we will format +.Pa ada0 +with the MBR scheme and create a single partition which we subdivide +using a traditional +.Bx +disklabel. .Pp -Create an MBR scheme on -.Pa ada0 , -then create a 30GB-sized -.Fx -slice, mark it active and -install the -.Nm boot0 -boot manager: +First, we create the partition table and a single 64 GB partition, +then we mark that partition active (bootable) and install the +first-stage boot loader: .Bd -literal -offset indent /sbin/gpart create -s MBR ada0 -/sbin/gpart add -t freebsd -s 30G ada0 +/sbin/gpart add -t freebsd -s 64G ada0 /sbin/gpart set -a active -i 1 ada0 /sbin/gpart bootcode -b /boot/boot0 ada0 .Ed .Pp -Now create a -.Bx -scheme -.Pf ( Bx -label) with space for up to 20 partitions: +Next, we create a disklabel in that partition +.Po +.Dq slice +in disklabel terminology +.Pc +with room for up to 20 partitions: .Bd -literal -offset indent /sbin/gpart create -s BSD -n 20 ada0s1 .Ed .Pp -Create a 1GB-sized UFS partition and a 4GB-sized swap partition: +We then create an 8 GB root partition and a 4 GB swap partition: .Bd -literal -offset indent -/sbin/gpart add -t freebsd-ufs -s 1G ada0s1 +/sbin/gpart add -t freebsd-ufs -s 8G ada0s1 /sbin/gpart add -t freebsd-swap -s 4G ada0s1 .Ed .Pp -Install bootstrap code for the +Finally, we install the appropriate boot loader for the .Bx label: .Bd -literal -offset indent /sbin/gpart bootcode -b /boot/boot ada0s1 .Ed +.Ss VTOC8 .Pp Create a VTOC8 scheme on .Pa da0 : @@ -1298,6 +1324,7 @@ After creating all required partitions, .Bd -literal -offset indent /sbin/gpart bootcode -p /boot/boot1 da0 .Ed +.Ss Backup and Restore .Pp Create a backup of the partition table from .Pa da0 : From owner-svn-src-stable-10@freebsd.org Sun Mar 12 13:46:11 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE2E2D09EEE; Sun, 12 Mar 2017 13:46:11 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id A79AD1376; Sun, 12 Mar 2017 13:46:11 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 333AB5330; Sun, 12 Mar 2017 13:46:10 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 07556736F; Sun, 12 Mar 2017 14:46:09 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ravi Pokala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r313433 - stable/10/usr.sbin/bsdinstall/partedit References: <201702080837.v188bir1055373@repo.freebsd.org> Date: Sun, 12 Mar 2017 14:46:09 +0100 In-Reply-To: <201702080837.v188bir1055373@repo.freebsd.org> (Ravi Pokala's message of "Wed, 8 Feb 2017 08:37:44 +0000 (UTC)") Message-ID: <86o9x6d2vy.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 13:46:12 -0000 Ravi Pokala writes: > Log: > MFC r304142: ensure stripe size is non-zero multiple of 4096 > [...] Please include the PR number in the commit message when you merge a commit associated with a PR. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable-10@freebsd.org Sun Mar 12 19:49:10 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BF2AD09184; Sun, 12 Mar 2017 19:49:10 +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 3CB681C62; Sun, 12 Mar 2017 19:49:10 +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 v2CJn9d6023873; Sun, 12 Mar 2017 19:49:09 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CJn9gZ023869; Sun, 12 Mar 2017 19:49:09 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201703121949.v2CJn9gZ023869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 12 Mar 2017 19:49: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: r315179 - stable/10/bin/sh/tests/expansion X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 19:49:10 -0000 Author: jilles Date: Sun Mar 12 19:49:08 2017 New Revision: 315179 URL: https://svnweb.freebsd.org/changeset/base/315179 Log: MFC r314637: sh: Add some already working tests that exercise new code paths Added: stable/10/bin/sh/tests/expansion/cmdsubst18.0 - copied unchanged from r314637, head/bin/sh/tests/expansion/cmdsubst18.0 stable/10/bin/sh/tests/expansion/cmdsubst19.0 - copied unchanged from r314637, head/bin/sh/tests/expansion/cmdsubst19.0 stable/10/bin/sh/tests/expansion/cmdsubst20.0 - copied unchanged from r314637, head/bin/sh/tests/expansion/cmdsubst20.0 Modified: stable/10/bin/sh/tests/expansion/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/tests/expansion/Makefile ============================================================================== --- stable/10/bin/sh/tests/expansion/Makefile Sun Mar 12 19:28:44 2017 (r315178) +++ stable/10/bin/sh/tests/expansion/Makefile Sun Mar 12 19:49:08 2017 (r315179) @@ -38,6 +38,9 @@ FILES+= cmdsubst14.0 FILES+= cmdsubst15.0 FILES+= cmdsubst16.0 FILES+= cmdsubst17.0 +FILES+= cmdsubst18.0 +FILES+= cmdsubst19.0 +FILES+= cmdsubst20.0 FILES+= export1.0 FILES+= export2.0 FILES+= export3.0 Copied: stable/10/bin/sh/tests/expansion/cmdsubst18.0 (from r314637, head/bin/sh/tests/expansion/cmdsubst18.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/expansion/cmdsubst18.0 Sun Mar 12 19:49:08 2017 (r315179, copy of r314637, head/bin/sh/tests/expansion/cmdsubst18.0) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +x=X +unset n +r=${x+$(echo a)}${x-$(echo b)}${n+$(echo c)}${n-$(echo d)}$(echo e) +[ "$r" = aXde ] Copied: stable/10/bin/sh/tests/expansion/cmdsubst19.0 (from r314637, head/bin/sh/tests/expansion/cmdsubst19.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/expansion/cmdsubst19.0 Sun Mar 12 19:49:08 2017 (r315179, copy of r314637, head/bin/sh/tests/expansion/cmdsubst19.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +b=200 c=30 d=5 x=4 +r=$(echo a)$(($(echo b) + ${x+$(echo c)} + ${x-$(echo d)}))$(echo e) +[ "$r" = a234e ] Copied: stable/10/bin/sh/tests/expansion/cmdsubst20.0 (from r314637, head/bin/sh/tests/expansion/cmdsubst20.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/expansion/cmdsubst20.0 Sun Mar 12 19:49:08 2017 (r315179, copy of r314637, head/bin/sh/tests/expansion/cmdsubst20.0) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +set -T +trapped='' +trap "trapped=x$trapped" USR1 +[ "x$(kill -USR1 $$)y" = xy ] && [ "$trapped" = x ] From owner-svn-src-stable-10@freebsd.org Mon Mar 13 01:17:59 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0854AD08200; Mon, 13 Mar 2017 01:17: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 D6ECE87F; Mon, 13 Mar 2017 01:17: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 v2D1Hv04060891; Mon, 13 Mar 2017 01:17:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2D1Hv1n060885; Mon, 13 Mar 2017 01:17:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703130117.v2D1Hv1n060885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 13 Mar 2017 01:17: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: r315183 - in stable/10/contrib/atf: atf-c atf-c++ atf-sh doc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2017 01:17:59 -0000 Author: ngie Date: Mon Mar 13 01:17:57 2017 New Revision: 315183 URL: https://svnweb.freebsd.org/changeset/base/315183 Log: MFC r314793,r314796,r314797,r314798,r314799,r314800,r314801,r314802,r314803,r314804,r314805: r314793: Fix ATF_TP_ADD_TCS example in atf-c-api(3) ATF_TP_ADD_TC should use `tp` as the second argument, not `tcs`, as ATF_TP_ADD_TCS uses `tp` as its first argument. Bump .Dd for the change. r314796: Fix atf-sh(3) manpage issues - Fix spelling errors (specifiying -> specifying) [1] - Escape '.' at start of lines using & to tell the roff processor that the line isn't meant to be treated as a command [2]. Bump .Dd for the change r314797: Fix grammar warning noted by igor Remove surrounding ellipses in e.g. section and add a comma before and after the e.g. reference. r314798: Fix out-of-order sections in atf-sh(1) - `.Op` must be used in the SYNOPSIS section, not the NAME section. - Move ATF_SHELL environment variable description up to first ENVIRONMENT section. Garbage collect the duplicate ENVIRONMENT section. Bump .Dd for the change r314799: Fix manlint issues with atf-check(1) - Use `.Bf Em`/`.Ef` instead of prefixing lines with `.Em`. The forms are equivalent with traditional roff, but unnecessarily verbose. The former form applies the .Em macro to the enclosed block. - Move EXIT_STATUS section down so the section complies with section ordering specified by mdoc(7) and enforced by manlint(1). Bump .Dd for the change r314800: Fix issues with atf-check(1) found by igor and refer to atf-check(1) - Fix typo (specifiying -> specifying) - Add atf-check(1) to SEE ALSO section for completeness. It's mentioned above, but by convention the SEE ALSO section should list all relevant references to other tools and APIs. Bump .Dd for the change r314801: Fix igor/manlint issues with atf-c(3) - Remove surrounding ellipses in i.e. section and add a comma before and after the i.e. reference [1]. - Fix typo (specifiying -> specifying) [1]. - Escape '.' at start of lines using & to tell the roff processor that the line isn't meant to be treated as a command [2]. Bump .Dd for the change r314802: Fix atf-c-api(3) manpage issues - Fix typo (specifiying -> specifying). - Remove surrounding ellipses in i.e. section and add a comma before and after the i.e. reference. Bump .Dd for the change r314803: Fix typos - specifiying -> specifying - manged -> managed Bump .Dd for the change r314804: Fix issues noted by igor/manlint - Fix typos [1]: -- manged -> managed -- specifiying -> specifying - Escape '.' at start of lines using & to tell the roff processor that the line isn't meant to be treated as a command [2]. Bump .Dd for the change r314805: Remove *-api(3) manpages removed in ATF 0.21 I overlooked the fact that these manpages had been removed upstream and replaced with their non *-api(3) equivalents. Follow upstream's lead and remove the unused manpages. Deleted: stable/10/contrib/atf/atf-c++/atf-c++-api.3 stable/10/contrib/atf/atf-c/atf-c-api.3 stable/10/contrib/atf/atf-sh/atf-sh-api.3 Modified: stable/10/contrib/atf/atf-c++/atf-c++.3 stable/10/contrib/atf/atf-c/atf-c.3 stable/10/contrib/atf/atf-sh/atf-check.1 stable/10/contrib/atf/atf-sh/atf-sh.1 stable/10/contrib/atf/atf-sh/atf-sh.3 stable/10/contrib/atf/doc/atf-test-case.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/atf/atf-c++/atf-c++.3 ============================================================================== --- stable/10/contrib/atf/atf-c++/atf-c++.3 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-c++/atf-c++.3 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" 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. -.Dd October 13, 2014 +.Dd March 6, 2017 .Dt ATF-C++ 3 .Os .Sh NAME @@ -145,10 +145,10 @@ ATF provides a C++ programming interface C++-based test programs follow this template: .Bd -literal -offset indent extern "C" { -.Ns ... C-specific includes go here ... +\&... C-specific includes go here ... } -.Ns ... C++-specific includes go here ... +\&... C++-specific includes go here ... #include @@ -182,7 +182,7 @@ ATF_TEST_CASE_BODY(tc3) ... third test case's body ... } -.Ns ... additional test cases ... +\&... additional test cases ... ATF_INIT_TEST_CASES(tcs) { @@ -202,7 +202,7 @@ To define test cases, one can use the .Fn ATF_TEST_CASE_WITH_CLEANUP or the .Fn ATF_TEST_CASE_WITHOUT_HEAD -macros, which take a single parameter specifiying the test case's +macros, which take a single parameter specifying the test case's name. .Fn ATF_TEST_CASE , requires to define a head and a body for the test case, @@ -232,7 +232,7 @@ opening and closing brackets. Additionally, the .Fn ATF_TEST_CASE_NAME macro can be used to obtain the name of the class corresponding to a -particular test case, as the name is internally manged by the library to +particular test case, as the name is internally managed by the library to prevent clashes with other user identifiers. Similarly, the .Fn ATF_TEST_CASE_USE Modified: stable/10/contrib/atf/atf-c/atf-c.3 ============================================================================== --- stable/10/contrib/atf/atf-c/atf-c.3 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-c/atf-c.3 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" 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. -.Dd October 13, 2014 +.Dd March 6, 2017 .Dt ATF-C 3 .Os .Sh NAME @@ -203,7 +203,7 @@ ATF provides a C programming interface to implement test programs. C-based test programs follow this template: .Bd -literal -offset indent -.Ns ... C-specific includes go here ... +\&... C-specific includes go here ... #include @@ -237,7 +237,7 @@ ATF_TC_BODY(tc3, tc) ... third test case's body ... } -.Ns ... additional test cases ... +\&... additional test cases ... ATF_TP_ADD_TCS(tp) { @@ -259,7 +259,7 @@ To define test cases, one can use the .Fn ATF_TC_WITH_CLEANUP or the .Fn ATF_TC_WITHOUT_HEAD -macros, which take a single parameter specifiying the test case's name. +macros, which take a single parameter specifying the test case's name. .Fn ATF_TC , requires to define a head and a body for the test case, .Fn ATF_TC_WITH_CLEANUP @@ -299,7 +299,7 @@ library to do it for you. This is done by using the .Fn ATF_TP_ADD_TCS macro, which is passed the name of the object that will hold the test -cases; i.e. the test program instance. +cases, i.e., the test program instance. This name can be whatever you want as long as it is a valid variable identifier. .Pp Modified: stable/10/contrib/atf/atf-sh/atf-check.1 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-check.1 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-sh/atf-check.1 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" 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. -.Dd October 5, 2014 +.Dd March 6, 2017 .Dt ATF-CHECK 1 .Os .Sh NAME @@ -40,10 +40,12 @@ executes a given command and analyzes its results, including exit code, stdout and stderr. .Pp -.Em Test cases must use -.Em Xr atf-sh 3 Ns ' Ns s -.Em Nm atf_check -.Em builtin function instead of calling this utility directly. +.Bf Em +Test cases must use +.Xr atf-sh 3 Ns ' Ns s +.Nm atf_check +builtin function instead of calling this utility directly. +.Ef .Pp In the first synopsis form, .Nm @@ -119,9 +121,6 @@ as a shell command line, executing it wi You should avoid using this flag if at all possible to prevent shell quoting issues. .El -.Sh EXIT STATUS -.Nm -exits 0 on success, and other (unspecified) value on failure. .Sh ENVIRONMENT .Bl -tag -width ATFXSHELLXX -compact .It Va ATF_SHELL @@ -129,6 +128,9 @@ Path to the system shell to be used when .Fl x is given to run commands. .El +.Sh EXIT STATUS +.Nm +exits 0 on success, and other (unspecified) value on failure. .Sh EXAMPLES The following are sample invocations from within a test case. Note that we use the Modified: stable/10/contrib/atf/atf-sh/atf-sh.1 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-sh.1 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-sh/atf-sh.1 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,15 +22,15 @@ .\" 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. -.Dd September 27, 2014 +.Dd March 6, 2017 .Dt ATF-SH 1 .Os .Sh NAME .Nm atf-sh -.Op Fl s Ar shell .Nd interpreter for shell-based test programs .Sh SYNOPSIS .Nm +.Op Fl s Ar shell .Ar script .Sh DESCRIPTION .Nm @@ -75,6 +75,8 @@ Should not be overridden other than for Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a specific interpreter. +.It Va ATF_SHELL +Path to the system shell to be used in the generated scripts. .El .Sh EXAMPLES Scripts using @@ -98,10 +100,5 @@ option afterwards as a .Bd -literal -offset indent #! /path/to/bin/atf-sh -s/bin/bash .Ed -.Sh ENVIRONMENT -.Bl -tag -width ATFXSHELLXX -compact -.It Va ATF_SHELL -Path to the system shell to be used in the generated scripts. -.El .Sh SEE ALSO .Xr atf-sh 3 Modified: stable/10/contrib/atf/atf-sh/atf-sh.3 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-sh.3 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-sh/atf-sh.3 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" 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. -.Dd October 13, 2014 +.Dd March 6, 2017 .Dt ATF-SH 3 .Os .Sh NAME @@ -129,7 +129,7 @@ tc2_cleanup() { ... second test case's cleanup ... } -.Ns ... additional test cases ... +\&... additional test cases ... atf_init_test_cases() { atf_add_test_case tc1 @@ -144,7 +144,7 @@ described in .Xr atf-test-case 4 . To define test cases, one can use the .Nm atf_test_case -function, which takes a first parameter specifiying the test case's +function, which takes a first parameter specifying the test case's name and instructs the library to set things up to accept it as a valid test case. The second parameter is optional and, if provided, must be @@ -334,7 +334,7 @@ atf_init_test_cases() { This other example shows how to include a file with extra helper functions in the test program: .Bd -literal -offset indent -.Ns ... definition of test cases ... +\&... definition of test cases ... atf_init_test_cases() { . $(atf_get_srcdir)/helper_functions.sh Modified: stable/10/contrib/atf/doc/atf-test-case.4 ============================================================================== --- stable/10/contrib/atf/doc/atf-test-case.4 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/doc/atf-test-case.4 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" 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. -.Dd October 5, 2014 +.Dd March 6, 2017 .Dt ATF-TEST-CASE 4 .Os .Sh NAME @@ -79,8 +79,8 @@ Upon termination, a test case reports a reason describing why the test reported such status. The caller must ensure that the test case really performed the task that its status describes, as the test program may be bogus and therefore providing a -misleading result (e.g. providing a result that indicates success but the -error code of the program says otherwise). +misleading result, e.g., providing a result that indicates success but the +error code of the program says otherwise. .Pp The possible exit status of a test case are one of the following: .Bl -tag -width expectedXfailureXX From owner-svn-src-stable-10@freebsd.org Mon Mar 13 01:34:44 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EE47D085B1; Mon, 13 Mar 2017 01:34: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 CFC37F70; Mon, 13 Mar 2017 01:34:43 +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 v2D1Yg7d068794; Mon, 13 Mar 2017 01:34:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2D1Yg4o068793; Mon, 13 Mar 2017 01:34:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703130134.v2D1Yg4o068793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 13 Mar 2017 01:34:42 +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: r315185 - stable/10/lib/libc/tests/nss X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2017 01:34:44 -0000 Author: ngie Date: Mon Mar 13 01:34:42 2017 New Revision: 315185 URL: https://svnweb.freebsd.org/changeset/base/315185 Log: MFC r314807: Move ATF_TC_WITHOUT_HEAD(getgrent) near the testcase it annotates Modified: stable/10/lib/libc/tests/nss/getgr_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/nss/getgr_test.c ============================================================================== --- stable/10/lib/libc/tests/nss/getgr_test.c Mon Mar 13 01:34:40 2017 (r315184) +++ stable/10/lib/libc/tests/nss/getgr_test.c Mon Mar 13 01:34:42 2017 (r315185) @@ -474,6 +474,7 @@ fin: #define SNAPSHOT_FILE "snapshot_grp" +ATF_TC_WITHOUT_HEAD(getgrent); ATF_TC_BODY(getgrent, tc) { @@ -525,7 +526,6 @@ ATF_TC_BODY(getgrnam_with_snapshot, tc) ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETGRNAM) == 0); } -ATF_TC_WITHOUT_HEAD(getgrent); ATF_TP_ADD_TCS(tp) { From owner-svn-src-stable-10@freebsd.org Mon Mar 13 06:52:31 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5581CD0AF60; Mon, 13 Mar 2017 06:52:31 +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 2DAE41150; Mon, 13 Mar 2017 06:52:31 +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 v2D6qUeA099132; Mon, 13 Mar 2017 06:52:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2D6qTap098556; Mon, 13 Mar 2017 06:52:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703130652.v2D6qTap098556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 13 Mar 2017 06:52: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: r315189 - in stable/10/sys/dev/mpr: . mpi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2017 06:52:31 -0000 Author: mav Date: Mon Mar 13 06:52:29 2017 New Revision: 315189 URL: https://svnweb.freebsd.org/changeset/base/315189 Log: MFC r314786: Import mpr(4) driver P12 to P14 diff from vendor site. This is mostly a version bump to stay in version number sync with firmware. The only change there was cosmetic: Display degraded speed message upon receiving Active Cable Exception Event with DEGRADED reason code. Modified: stable/10/sys/dev/mpr/mpi/mpi2_ioc.h stable/10/sys/dev/mpr/mpr_sas_lsi.c stable/10/sys/dev/mpr/mpr_table.c stable/10/sys/dev/mpr/mprvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpr/mpi/mpi2_ioc.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_ioc.h Mon Mar 13 06:51:50 2017 (r315188) +++ stable/10/sys/dev/mpr/mpi/mpi2_ioc.h Mon Mar 13 06:52:29 2017 (r315189) @@ -688,7 +688,10 @@ typedef struct _MPI26_EVENT_DATA_ACTIVE_ MPI2_POINTER pMpi26EventDataActiveCableExcept_t; /* defines for ReasonCode field */ -#define MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER (0x00) +#define MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER (0x00) +#define MPI26_EVENT_ACTIVE_CABLE_PRESENT (0x01) +#define MPI26_EVENT_ACTIVE_CABLE_DEGRADED (0x02) + /* Hard Reset Received Event data */ Modified: stable/10/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas_lsi.c Mon Mar 13 06:51:50 2017 (r315188) +++ stable/10/sys/dev/mpr/mpr_sas_lsi.c Mon Mar 13 06:52:29 2017 (r315189) @@ -651,14 +651,26 @@ skip_fp_send: ace_event_data = (pMpi26EventDataActiveCableExcept_t)fw_event->event_data; - if (ace_event_data->ReasonCode == - MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER) { - mpr_printf(sc, "Currently an active cable with " + switch(ace_event_data->ReasonCode) { + case MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER: + { + mpr_printf(sc, "Currently a cable with " "ReceptacleID %d cannot be powered and device " "connected to this active cable will not be seen. " "This active cable requires %d mW of power.\n", ace_event_data->ReceptacleID, ace_event_data->ActiveCablePowerRequirement); + break; + } + case MPI26_EVENT_ACTIVE_CABLE_DEGRADED: + { + mpr_printf(sc, "Currently a cable with " + "ReceptacleID %d is not running at optimal speed " + "(12 Gb/s rate)\n", ace_event_data->ReceptacleID); + break; + } + default: + break; } break; } Modified: stable/10/sys/dev/mpr/mpr_table.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_table.c Mon Mar 13 06:51:50 2017 (r315188) +++ stable/10/sys/dev/mpr/mpr_table.c Mon Mar 13 06:52:29 2017 (r315189) @@ -95,6 +95,12 @@ struct mpr_table_lookup mpr_event_names[ {"SasPhyCounter", 0x22}, {"GpioInterrupt", 0x23}, {"HbdPhyEvent", 0x24}, + {"SasQuiesce", 0x25}, + {"SasNotifyPrimitive", 0x26}, + {"TempThreshold", 0x27}, + {"HostMessage", 0x28}, + {"PowerPerformanceChange", 0x29}, + {"CableEvent", 0x34}, {NULL, 0}, {"Unknown Event", 0} }; Modified: stable/10/sys/dev/mpr/mprvar.h ============================================================================== --- stable/10/sys/dev/mpr/mprvar.h Mon Mar 13 06:51:50 2017 (r315188) +++ stable/10/sys/dev/mpr/mprvar.h Mon Mar 13 06:52:29 2017 (r315189) @@ -33,7 +33,7 @@ #ifndef _MPRVAR_H #define _MPRVAR_H -#define MPR_DRIVER_VERSION "13.01.00.00-fbsd" +#define MPR_DRIVER_VERSION "15.01.00.00-fbsd" #define MPR_DB_MAX_WAIT 2500 From owner-svn-src-stable-10@freebsd.org Tue Mar 14 06:12:52 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA7E3D0AF49; Tue, 14 Mar 2017 06:12:52 +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 A6C8C181D; Tue, 14 Mar 2017 06:12:52 +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 v2E6CpEO075278; Tue, 14 Mar 2017 06:12:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E6CpMo075276; Tue, 14 Mar 2017 06:12:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201703140612.v2E6CpMo075276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 14 Mar 2017 06:12:51 +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: r315227 - in stable/10: lib/libc/gen sys/libkern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 06:12:53 -0000 Author: delphij Date: Tue Mar 14 06:12:51 2017 New Revision: 315227 URL: https://svnweb.freebsd.org/changeset/base/315227 Log: MFC r315225: Discard first 3072 bytes of RC4 keystream, this is a bandaid that allows us to work on switching to a more modern PRNG. Submitted by: Steven Chamberlain Approved by: so Modified: stable/10/lib/libc/gen/arc4random.c stable/10/sys/libkern/arc4random.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/arc4random.c ============================================================================== --- stable/10/lib/libc/gen/arc4random.c Tue Mar 14 06:10:40 2017 (r315226) +++ stable/10/lib/libc/gen/arc4random.c Tue Mar 14 06:12:51 2017 (r315227) @@ -172,7 +172,7 @@ arc4_stir(void) * Discard early keystream, as per recommendations in: * "(Not So) Random Shuffles of RC4" by Ilya Mironov. */ - for (i = 0; i < 1024; i++) + for (i = 0; i < 3072; i++) (void)arc4_getbyte(); arc4_count = 1600000; } Modified: stable/10/sys/libkern/arc4random.c ============================================================================== --- stable/10/sys/libkern/arc4random.c Tue Mar 14 06:10:40 2017 (r315226) +++ stable/10/sys/libkern/arc4random.c Tue Mar 14 06:12:51 2017 (r315227) @@ -80,9 +80,9 @@ arc4_randomstir (void) /* * Throw away the first N words of output, as suggested in the * paper "Weaknesses in the Key Scheduling Algorithm of RC4" - * by Fluher, Mantin, and Shamir. (N = 256 in our case.) + * by Fluher, Mantin, and Shamir. (N = 768 in our case.) */ - for (n = 0; n < 256*4; n++) + for (n = 0; n < 768*4; n++) arc4_randbyte(); mtx_unlock(&arc4_mtx); } From owner-svn-src-stable-10@freebsd.org Tue Mar 14 15:15:39 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A330D0BF55; Tue, 14 Mar 2017 15:15:39 +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 E901126C; Tue, 14 Mar 2017 15:15:38 +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 v2EFFcZB099289; Tue, 14 Mar 2017 15:15:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EFFcVl099288; Tue, 14 Mar 2017 15:15:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703141515.v2EFFcVl099288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Mar 2017 15:15:38 +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: r315247 - stable/10/sys/dev/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 15:15:39 -0000 Author: hselasky Date: Tue Mar 14 15:15:37 2017 New Revision: 315247 URL: https://svnweb.freebsd.org/changeset/base/315247 Log: MFC r310806: Add MSIX rewrite table quirk for use with VMs. This patch solves IRQ generation problems using the mlx5en(4) driver with xenserver v6.5.0 in SRIOV and PCI-passthrough modes. Until further the hw.pci.msix_rewrite_table quirk must be set manually in /boot/loader.conf . Reviewed by: jhb @ Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/pci/pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Tue Mar 14 15:12:58 2017 (r315246) +++ stable/10/sys/dev/pci/pci.c Tue Mar 14 15:15:37 2017 (r315247) @@ -351,6 +351,11 @@ TUNABLE_INT("hw.pci.enable_msix", &pci_d SYSCTL_INT(_hw_pci, OID_AUTO, enable_msix, CTLFLAG_RW, &pci_do_msix, 1, "Enable support for MSI-X interrupts"); +static int pci_msix_rewrite_table = 0; +SYSCTL_INT(_hw_pci, OID_AUTO, msix_rewrite_table, CTLFLAG_RWTUN, + &pci_msix_rewrite_table, 0, + "Rewrite entire MSI-X table when updating MSI-X entries"); + static int pci_honor_msi_blacklist = 1; TUNABLE_INT("hw.pci.honor_msi_blacklist", &pci_honor_msi_blacklist); SYSCTL_INT(_hw_pci, OID_AUTO, honor_msi_blacklist, CTLFLAG_RD, @@ -1375,11 +1380,10 @@ pci_find_extcap_method(device_t dev, dev /* * Support for MSI-X message interrupts. */ -void -pci_enable_msix_method(device_t dev, device_t child, u_int index, - uint64_t address, uint32_t data) +static void +pci_write_msix_entry(device_t dev, u_int index, uint64_t address, uint32_t data) { - struct pci_devinfo *dinfo = device_get_ivars(child); + struct pci_devinfo *dinfo = device_get_ivars(dev); struct pcicfg_msix *msix = &dinfo->cfg.msix; uint32_t offset; @@ -1388,6 +1392,31 @@ pci_enable_msix_method(device_t dev, dev bus_write_4(msix->msix_table_res, offset, address & 0xffffffff); bus_write_4(msix->msix_table_res, offset + 4, address >> 32); bus_write_4(msix->msix_table_res, offset + 8, data); +} + +void +pci_enable_msix_method(device_t dev, device_t child, u_int index, + uint64_t address, uint32_t data) +{ + + if (pci_msix_rewrite_table) { + struct pci_devinfo *dinfo = device_get_ivars(child); + struct pcicfg_msix *msix = &dinfo->cfg.msix; + + /* + * Some VM hosts require MSIX to be disabled in the + * control register before updating the MSIX table + * entries are allowed. It is not enough to only + * disable MSIX while updating a single entry. MSIX + * must be disabled while updating all entries in the + * table. + */ + pci_write_config(child, + msix->msix_location + PCIR_MSIX_CTRL, + msix->msix_ctrl & ~PCIM_MSIXCTRL_MSIX_ENABLE, 2); + pci_resume_msix(child); + } else + pci_write_msix_entry(child, index, address, data); /* Enable MSI -> HT mapping. */ pci_ht_map_msi(child, address); @@ -1463,7 +1492,8 @@ pci_resume_msix(device_t dev) if (mte->mte_vector == 0 || mte->mte_handlers == 0) continue; mv = &msix->msix_vectors[mte->mte_vector - 1]; - pci_enable_msix(dev, i, mv->mv_address, mv->mv_data); + pci_write_msix_entry(dev, i, mv->mv_address, + mv->mv_data); pci_unmask_msix(dev, i); } } @@ -3980,12 +4010,20 @@ pci_setup_intr(device_t dev, device_t ch mv->mv_address = addr; mv->mv_data = data; } - if (mte->mte_handlers == 0) { + + /* + * The MSIX table entry must be made valid by + * incrementing the mte_handlers before + * calling pci_enable_msix() and + * pci_resume_msix(). Else the MSIX rewrite + * table quirk will not work as expected. + */ + mte->mte_handlers++; + if (mte->mte_handlers == 1) { pci_enable_msix(child, rid - 1, mv->mv_address, mv->mv_data); pci_unmask_msix(child, rid - 1); } - mte->mte_handlers++; } /* From owner-svn-src-stable-10@freebsd.org Tue Mar 14 15:21:42 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8C70D0C276; Tue, 14 Mar 2017 15:21:42 +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 B0ADEC54; Tue, 14 Mar 2017 15:21:42 +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 v2EFLfai000797; Tue, 14 Mar 2017 15:21:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EFLfZK000791; Tue, 14 Mar 2017 15:21:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703141521.v2EFLfZK000791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Mar 2017 15:21: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: r315249 - in stable/10: share/man/man4 sys/dev/sound/usb sys/dev/usb sys/dev/usb/quirk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 15:21:43 -0000 Author: hselasky Date: Tue Mar 14 15:21:41 2017 New Revision: 315249 URL: https://svnweb.freebsd.org/changeset/base/315249 Log: MFC r312338: Add USB audio support for S/PDIF output with C-Media CM6206 devices. Submitted by: Julien Nadeau PR: 216131 Modified: stable/10/share/man/man4/usb_quirk.4 stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/quirk/usb_quirk.h stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/usb_quirk.4 ============================================================================== --- stable/10/share/man/man4/usb_quirk.4 Tue Mar 14 15:19:14 2017 (r315248) +++ stable/10/share/man/man4/usb_quirk.4 Tue Mar 14 15:21:41 2017 (r315249) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 2016 +.Dd January 17, 2017 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -52,6 +52,10 @@ input is async despite claim of adaptive do not adjust for fractional samples .It UQ_AU_NO_XU audio device has broken extension unit +.It UQ_AU_VENDOR_CLASS +audio device uses vendor class to identify itself +.It UQ_AU_SET_SPDIF_CM6206 +audio device needs special programming to enable S/PDIF audio output .It UQ_BAD_ADC bad audio spec version number .It UQ_BAD_AUDIO Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Tue Mar 14 15:19:14 2017 (r315248) +++ stable/10/sys/dev/sound/usb/uaudio.c Tue Mar 14 15:21:41 2017 (r315249) @@ -343,6 +343,11 @@ struct uaudio_hid { uint8_t mute_id; }; +#define UAUDIO_SPDIF_OUT 0x01 /* Enable S/PDIF output */ +#define UAUDIO_SPDIF_OUT_48K 0x02 /* Out sample rate = 48K */ +#define UAUDIO_SPDIF_OUT_96K 0x04 /* Out sample rate = 96K */ +#define UAUDIO_SPDIF_IN_MIX 0x10 /* Input mix enable */ + struct uaudio_softc { struct sbuf sc_sndstat; struct sndcard_func sc_sndcard_func; @@ -360,6 +365,7 @@ struct uaudio_softc { struct usb_xfer *sc_mixer_xfer[1]; struct uaudio_mixer_node *sc_mixer_root; struct uaudio_mixer_node *sc_mixer_curr; + int (*sc_set_spdif_fn) (struct uaudio_softc *, int); uint32_t sc_mix_info; uint32_t sc_recsrc_info; @@ -891,6 +897,46 @@ uaudio_probe(device_t dev) return (ENXIO); } +/* + * Set Cmedia CM6206 S/PDIF settings + * Source: CM6206 Datasheet v2.3. + */ +static int +uaudio_set_spdif_cm6206(struct uaudio_softc *sc, int flags) +{ + uint8_t cmd[2][4] = { + {0x20, 0x20, 0x00, 0}, + {0x20, 0x30, 0x02, 1} + }; + int i; + + if (flags & UAUDIO_SPDIF_OUT) + cmd[1][1] = 0x00; + else + cmd[1][1] = 0x02; + + if (flags & UAUDIO_SPDIF_OUT_96K) + cmd[0][1] = 0x60; /* 96K: 3'b110 */ + + if (flags & UAUDIO_SPDIF_IN_MIX) + cmd[1][1] = 0x03; /* SPDIFMIX */ + + for (i = 0; i < 2; i++) { + if (usbd_req_set_report(sc->sc_udev, NULL, + cmd[i], sizeof(cmd[0]), + sc->sc_mixer_iface_index, UHID_OUTPUT_REPORT, 0) != 0) { + return (ENXIO); + } + } + return (0); +} + +static int +uaudio_set_spdif_dummy(struct uaudio_softc *sc, int flags) +{ + return (0); +} + static int uaudio_attach(device_t dev) { @@ -925,6 +971,12 @@ uaudio_attach(device_t dev) if (usb_test_quirk(uaa, UQ_AU_VENDOR_CLASS)) sc->sc_uq_au_vendor_class = 1; + /* set S/PDIF function */ + if (usb_test_quirk(uaa, UQ_AU_SET_SPDIF_CM6206)) + sc->sc_set_spdif_fn = uaudio_set_spdif_cm6206; + else + sc->sc_set_spdif_fn = uaudio_set_spdif_dummy; + umidi_init(dev); device_set_usb_desc(dev); @@ -1061,6 +1113,11 @@ uaudio_attach(device_t dev) /* reload all mixer settings */ uaudio_mixer_reload_all(sc); + /* enable S/PDIF output, if any */ + if (sc->sc_set_spdif_fn(sc, + UAUDIO_SPDIF_OUT | UAUDIO_SPDIF_OUT_48K) != 0) { + device_printf(dev, "Failed to enable S/PDIF at 48K\n"); + } return (0); /* success */ detach: @@ -1145,6 +1202,9 @@ uaudio_detach_sub(device_t dev) struct uaudio_softc *sc = device_get_softc(device_get_parent(dev)); int error = 0; + /* disable S/PDIF output, if any */ + (void) sc->sc_set_spdif_fn(sc, 0); + repeat: if (sc->sc_pcm_registered) { error = pcm_unregister(dev); Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Tue Mar 14 15:19:14 2017 (r315248) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Tue Mar 14 15:21:41 2017 (r315249) @@ -518,6 +518,7 @@ static struct usb_quirk_entry usb_quirks /* Non-standard USB AUDIO devices */ USB_QUIRK(MAUDIO, FASTTRACKULTRA, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), + USB_QUIRK(CMEDIA, CM6206, 0x0000, 0xffff, UQ_AU_SET_SPDIF_CM6206), /* * Quirks for manufacturers which USB devices does not respond @@ -604,6 +605,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_AU_VENDOR_CLASS] = "UQ_AU_VENDOR_CLASS", [UQ_SINGLE_CMD_MIDI] = "UQ_SINGLE_CMD_MIDI", [UQ_MSC_DYMO_EJECT] = "UQ_MSC_DYMO_EJECT", + [UQ_AU_SET_SPDIF_CM6206] = "UQ_AU_SET_SPDIF_CM6206", }; /*------------------------------------------------------------------------* Modified: stable/10/sys/dev/usb/quirk/usb_quirk.h ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.h Tue Mar 14 15:19:14 2017 (r315248) +++ stable/10/sys/dev/usb/quirk/usb_quirk.h Tue Mar 14 15:21:41 2017 (r315249) @@ -109,6 +109,7 @@ enum { UQ_AU_VENDOR_CLASS, /* audio device uses vendor and not audio class */ UQ_SINGLE_CMD_MIDI, /* at most one command per USB packet */ UQ_MSC_DYMO_EJECT, /* ejects Dymo MSC device */ + UQ_AU_SET_SPDIF_CM6206, /* enable S/PDIF audio output */ USB_QUIRK_MAX }; Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue Mar 14 15:19:14 2017 (r315248) +++ stable/10/sys/dev/usb/usbdevs Tue Mar 14 15:21:41 2017 (r315249) @@ -1438,6 +1438,9 @@ product CLIPSAL 5000CT2 0x0304 5000CT2 product CLIPSAL C5000CT2 0x0305 C5000CT2 C-Bus Touch Screen product CLIPSAL L51xx 0x0401 L51xx C-Bus Dimmer +/* C-Media products */ +product CMEDIA CM6206 0x0102 CM106 compatible sound device + /* CMOTECH products */ product CMOTECH CNU510 0x5141 CDMA Technologies USB modem product CMOTECH CNU550 0x5543 CDMA 2000 1xRTT/1xEVDO USB modem From owner-svn-src-stable-10@freebsd.org Tue Mar 14 15:29:01 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49343D0C56F; Tue, 14 Mar 2017 15:29: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 2349B14EB; Tue, 14 Mar 2017 15:29: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 v2EFT0EU004060; Tue, 14 Mar 2017 15:29:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EFT0Px004054; Tue, 14 Mar 2017 15:29:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703141529.v2EFT0Px004054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Mar 2017 15:29:00 +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: r315252 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 15:29:01 -0000 Author: hselasky Date: Tue Mar 14 15:28:59 2017 New Revision: 315252 URL: https://svnweb.freebsd.org/changeset/base/315252 Log: MFC r312424: Fix problem with suspend and resume when using Skylake chipsets. Make sure the XHCI controller is reset after halting it. The problem is clearly a BIOS bug as the suspend and resume is failing without loading the XHCI driver. The same happens when using Linux and the XHCI driver is not loaded. Submitted by: Yanko Yankulov PR: 216261 Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci.h stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Tue Mar 14 15:27:38 2017 (r315251) +++ stable/10/sys/dev/usb/controller/xhci.c Tue Mar 14 15:28:59 2017 (r315252) @@ -352,6 +352,7 @@ xhci_start_controller(struct xhci_softc struct usb_page_search buf_res; struct xhci_hw_root *phwr; struct xhci_dev_ctx_addr *pdctxa; + usb_error_t err; uint64_t addr; uint32_t temp; uint16_t i; @@ -363,22 +364,9 @@ xhci_start_controller(struct xhci_softc sc->sc_command_ccs = 1; sc->sc_command_idx = 0; - /* Reset controller */ - XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); - - for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 100); - temp = (XREAD4(sc, oper, XHCI_USBCMD) & XHCI_CMD_HCRST) | - (XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_CNR); - if (!temp) - break; - } - - if (temp) { - device_printf(sc->sc_bus.parent, "Controller " - "reset timeout.\n"); - return (USB_ERR_IOERROR); - } + err = xhci_reset_controller(sc); + if (err) + return (err); /* set up number of device slots */ DPRINTF("CONFIG=0x%08x -> 0x%08x\n", @@ -526,6 +514,33 @@ xhci_halt_controller(struct xhci_softc * } usb_error_t +xhci_reset_controller(struct xhci_softc *sc) +{ + uint32_t temp = 0; + uint16_t i; + + DPRINTF("\n"); + + /* Reset controller */ + XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); + + for (i = 0; i != 100; i++) { + usb_pause_mtx(NULL, hz / 100); + temp = (XREAD4(sc, oper, XHCI_USBCMD) & XHCI_CMD_HCRST) | + (XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_CNR); + if (!temp) + break; + } + + if (temp) { + device_printf(sc->sc_bus.parent, "Controller " + "reset timeout.\n"); + return (USB_ERR_IOERROR); + } + return (0); +} + +usb_error_t xhci_init(struct xhci_softc *sc, device_t self, uint8_t dma32) { uint32_t temp; @@ -676,10 +691,12 @@ xhci_set_hw_power_sleep(struct usb_bus * case USB_HW_POWER_SUSPEND: DPRINTF("Stopping the XHCI\n"); xhci_halt_controller(sc); + xhci_reset_controller(sc); break; case USB_HW_POWER_SHUTDOWN: DPRINTF("Stopping the XHCI\n"); xhci_halt_controller(sc); + xhci_reset_controller(sc); break; case USB_HW_POWER_RESUME: DPRINTF("Starting the XHCI\n"); Modified: stable/10/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.h Tue Mar 14 15:27:38 2017 (r315251) +++ stable/10/sys/dev/usb/controller/xhci.h Tue Mar 14 15:28:59 2017 (r315252) @@ -524,6 +524,7 @@ struct xhci_softc { uint8_t xhci_use_polling(void); usb_error_t xhci_halt_controller(struct xhci_softc *); +usb_error_t xhci_reset_controller(struct xhci_softc *); usb_error_t xhci_init(struct xhci_softc *, device_t, uint8_t); usb_error_t xhci_start_controller(struct xhci_softc *); void xhci_interrupt(struct xhci_softc *); Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Tue Mar 14 15:27:38 2017 (r315251) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Tue Mar 14 15:28:59 2017 (r315252) @@ -326,6 +326,7 @@ xhci_pci_detach(device_t self) usb_callout_drain(&sc->sc_callout); xhci_halt_controller(sc); + xhci_reset_controller(sc); pci_disable_busmaster(self); From owner-svn-src-stable-10@freebsd.org Tue Mar 14 15:37:30 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBF3BD0C998; Tue, 14 Mar 2017 15:37:30 +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 940B31FCE; Tue, 14 Mar 2017 15:37:30 +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 v2EFbTDc008523; Tue, 14 Mar 2017 15:37:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EFbTTJ008522; Tue, 14 Mar 2017 15:37:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703141537.v2EFbTTJ008522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Mar 2017 15:37: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: r315255 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 15:37:30 -0000 Author: hselasky Date: Tue Mar 14 15:37:29 2017 New Revision: 315255 URL: https://svnweb.freebsd.org/changeset/base/315255 Log: MFC r312551: Fix for race leading to endless timer interrupts related to configtimer(). During normal operation "state->nextcallopt" will always be less than or equal to "state->nextcall" and checking only "state->nextcallopt" before calling "callout_process()" is sufficient. However when "configtimer()" is called a race might happen requiring both of these binary times to be checked. Short description of race: 1) A configtimer() call will reset both "state->nextcall" and "state->nextcallopt" to the same binary time. 2) If a "callout_reset()" call happens between "configtimer()" and the next "callout_process()" call, "state->nextcallopt" will get updated and "state->nextcall" will remain at the current time. Refer to logic inside cpu_new_callout(). 3) getnextcpuevent() only respects "state->nextcall" and returns this value over and over again, even if it is in the past, until "now >= state->nextcallopt" becomes true. Then these two time variables are corrected by a "callout_process()" call and the situation goes back to normal. The problem manifests itself in different ways. The common factor is the timer process(es) consume all CPU on one or more CPU cores for a long time, blocking other kernel processes from getting execution time. This can be seen by very high interrupt counts as displayed by "vmstat -i | grep timer" right after boot. When EARLY_AP_STARTUP was enabled in r310177 the likelyhood of hitting this bug apparently increased. Example output from "vmstat -i" before patch: cpu0:timer 7591 69 cpu9:timer 39031773 358089 cpu4:timer 9359 85 cpu3:timer 9100 83 cpu2:timer 9620 88 Example output from "vmstat -i" after patch: cpu0:timer 4242 34 cpu6:timer 5531 44 cpu3:timer 6450 52 cpu1:timer 4545 36 cpu9:timer 7153 58 Before the patch cpu9 in the example above, was spinning in a loop in order to reach 39 million interrupts just a few seconds after bootup. After the patch the timer interrupt counts are more or less consistent. Discussed with: mav @ Reported by: several people Sponsored by: Mellanox Technologies Modified: stable/10/sys/kern/kern_clocksource.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_clocksource.c ============================================================================== --- stable/10/sys/kern/kern_clocksource.c Tue Mar 14 15:35:40 2017 (r315254) +++ stable/10/sys/kern/kern_clocksource.c Tue Mar 14 15:37:29 2017 (r315255) @@ -210,7 +210,7 @@ handleevents(sbintime_t now, int fake) } } else state->nextprof = state->nextstat; - if (now >= state->nextcallopt) { + if (now >= state->nextcallopt || now >= state->nextcall) { state->nextcall = state->nextcallopt = SBT_MAX; callout_process(now); } From owner-svn-src-stable-10@freebsd.org Tue Mar 14 15:44:40 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE0B5D0CE02; Tue, 14 Mar 2017 15:44:40 +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 7CE9FBAF; Tue, 14 Mar 2017 15:44:40 +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 v2EFidd2012625; Tue, 14 Mar 2017 15:44:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EFid4I012624; Tue, 14 Mar 2017 15:44:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703141544.v2EFid4I012624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Mar 2017 15:44:39 +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: r315257 - stable/10/sys/ofed/drivers/infiniband/hw/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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 15:44:40 -0000 Author: hselasky Date: Tue Mar 14 15:44:39 2017 New Revision: 315257 URL: https://svnweb.freebsd.org/changeset/base/315257 Log: MFC r313778: Improve code readability and fix compilation error when using clang 4.x. Found by: emaste @ Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Tue Mar 14 15:42:27 2017 (r315256) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Tue Mar 14 15:44:39 2017 (r315257) @@ -593,7 +593,7 @@ static int mlx4_ib_demux_mad(struct ib_d is_eth = 1; if (is_eth) { - if (!wc->wc_flags & IB_WC_GRH) { + if (!(wc->wc_flags & IB_WC_GRH)) { mlx4_ib_warn(ibdev, "RoCE grh not present.\n"); return -EINVAL; } From owner-svn-src-stable-10@freebsd.org Tue Mar 14 15:50:37 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A332D0C044; Tue, 14 Mar 2017 15:50:37 +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 49B981160; Tue, 14 Mar 2017 15:50:37 +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 v2EFoaJb015117; Tue, 14 Mar 2017 15:50:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EFoada015116; Tue, 14 Mar 2017 15:50:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703141550.v2EFoada015116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Mar 2017 15:50: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: r315260 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 15:50:37 -0000 Author: hselasky Date: Tue Mar 14 15:50:36 2017 New Revision: 315260 URL: https://svnweb.freebsd.org/changeset/base/315260 Log: MFC r313941: Make sure the thread constructor and destructor eventhandlers are called for all threads belonging to a procedure. Currently the first thread in a procedure is kept around as an optimisation step and is never freed. Because the first thread in a procedure is never freed nor allocated, its destructor and constructor callbacks are never called which means per thread structures allocated by dtrace and the Linux emulation layers for example, might be present for threads which don't need these structures. This patch adds a thread construction and destruction call for the first thread in a procedure. Tested: dtrace, linux emulation Reviewed by: kib @ Sponsored by: Mellanox Technologies Modified: stable/10/sys/kern/kern_proc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Tue Mar 14 15:49:28 2017 (r315259) +++ stable/10/sys/kern/kern_proc.c Tue Mar 14 15:50:36 2017 (r315260) @@ -191,11 +191,17 @@ static int proc_ctor(void *mem, int size, void *arg, int flags) { struct proc *p; + struct thread *td; p = (struct proc *)mem; SDT_PROBE4(proc, , ctor , entry, p, size, arg, flags); EVENTHANDLER_INVOKE(process_ctor, p); SDT_PROBE4(proc, , ctor , return, p, size, arg, flags); + td = FIRST_THREAD_IN_PROC(p); + if (td != NULL) { + /* Make sure all thread constructors are executed */ + EVENTHANDLER_INVOKE(thread_ctor, td); + } return (0); } @@ -220,6 +226,9 @@ proc_dtor(void *mem, int size, void *arg #endif /* Free all OSD associated to this thread. */ osd_thread_exit(td); + + /* Make sure all thread destructors are executed */ + EVENTHANDLER_INVOKE(thread_dtor, td); } EVENTHANDLER_INVOKE(process_dtor, p); if (p->p_ksi != NULL) From owner-svn-src-stable-10@freebsd.org Tue Mar 14 15:56:20 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 627E9D0C72B; Tue, 14 Mar 2017 15:56:20 +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 236321D07; Tue, 14 Mar 2017 15:56:20 +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 v2EFuJ4b017508; Tue, 14 Mar 2017 15:56:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EFuJLS017507; Tue, 14 Mar 2017 15:56:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703141556.v2EFuJLS017507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Mar 2017 15:56: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: r315264 - stable/10/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 15:56:20 -0000 Author: hselasky Date: Tue Mar 14 15:56:19 2017 New Revision: 315264 URL: https://svnweb.freebsd.org/changeset/base/315264 Log: MFC r314328: Fix startup race initialising ACPI CM battery structures on MacBookPro. During acpi_cmbat_attach() the acpi_cmbat_init_battery() notification handler is registered. It has been observed this notification handler can be called instantly, before the attach routine has returned. In the notification handler there is a call to device_is_attached() which returns false. Because the softc is set we know an attach is in progress and the fix is simply to wait and try again in this case. Reviewed by: avg @ Modified: stable/10/sys/dev/acpica/acpi_cmbat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpi_cmbat.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_cmbat.c Tue Mar 14 15:55:17 2017 (r315263) +++ stable/10/sys/dev/acpica/acpi_cmbat.c Tue Mar 14 15:56:19 2017 (r315264) @@ -164,6 +164,16 @@ acpi_cmbat_detach(device_t dev) handle = acpi_get_handle(dev); AcpiRemoveNotifyHandler(handle, ACPI_ALL_NOTIFY, acpi_cmbat_notify_handler); acpi_battery_remove(dev); + + /* + * Force any pending notification handler calls to complete by + * requesting cmbat serialisation while freeing and clearing the + * softc pointer: + */ + ACPI_SERIAL_BEGIN(cmbat); + device_set_softc(dev, NULL); + ACPI_SERIAL_END(cmbat); + return (0); } @@ -436,7 +446,6 @@ acpi_cmbat_init_battery(void *arg) device_t dev; dev = (device_t)arg; - sc = device_get_softc(dev); ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), "battery initialization start\n"); @@ -446,18 +455,33 @@ acpi_cmbat_init_battery(void *arg) * to wait a while. */ for (retry = 0; retry < ACPI_CMBAT_RETRY_MAX; retry++, AcpiOsSleep(10000)) { - /* batteries on DOCK can be ejected w/ DOCK during retrying */ - if (!device_is_attached(dev)) + /* + * Batteries on DOCK can be ejected w/ DOCK during retrying. + * + * If there is a valid softc pointer the device may be in + * attaching, attached or detaching state. If the state is + * different from attached retry getting the device state + * until it becomes stable. This solves a race if the ACPI + * notification handler is called during attach, because + * device_is_attached() doesn't return non-zero until after + * the attach code has been executed. + */ + ACPI_SERIAL_BEGIN(cmbat); + sc = device_get_softc(dev); + if (sc == NULL) { + ACPI_SERIAL_END(cmbat); return; + } - if (!acpi_BatteryIsPresent(dev)) + if (!acpi_BatteryIsPresent(dev) || !device_is_attached(dev)) { + ACPI_SERIAL_END(cmbat); continue; + } /* * Only query the battery if this is the first try or the specific * type of info is still invalid. */ - ACPI_SERIAL_BEGIN(cmbat); if (retry == 0 || !acpi_battery_bst_valid(&sc->bst)) { timespecclear(&sc->bst_lastupdated); acpi_cmbat_get_bst(dev); From owner-svn-src-stable-10@freebsd.org Tue Mar 14 16:00:34 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF9FFD0C9B8; Tue, 14 Mar 2017 16:00: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 A10DC913; Tue, 14 Mar 2017 16:00:34 +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 v2EG0Xhr018311; Tue, 14 Mar 2017 16:00:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EG0XBl018309; Tue, 14 Mar 2017 16:00:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703141600.v2EG0XBl018309@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Mar 2017 16:00:33 +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: r315268 - in stable/10/sys: kern 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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 16:00:35 -0000 Author: hselasky Date: Tue Mar 14 16:00:33 2017 New Revision: 315268 URL: https://svnweb.freebsd.org/changeset/base/315268 Log: MFC r314553: Implement taskqueue_poll_is_busy() for use by the LinuxKPI. Refer to comment above function for a detailed description. Discussed with: kib @ Sponsored by: Mellanox Technologies Modified: stable/10/sys/kern/subr_taskqueue.c stable/10/sys/sys/taskqueue.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_taskqueue.c ============================================================================== --- stable/10/sys/kern/subr_taskqueue.c Tue Mar 14 15:59:51 2017 (r315267) +++ stable/10/sys/kern/subr_taskqueue.c Tue Mar 14 16:00:33 2017 (r315268) @@ -390,6 +390,23 @@ task_is_running(struct taskqueue *queue, return (0); } +/* + * Only use this function in single threaded contexts. It returns + * non-zero if the given task is either pending or running. Else the + * task is idle and can be queued again or freed. + */ +int +taskqueue_poll_is_busy(struct taskqueue *queue, struct task *task) +{ + int retval; + + TQ_LOCK(queue); + retval = task->ta_pending > 0 || task_is_running(queue, task); + TQ_UNLOCK(queue); + + return (retval); +} + static int taskqueue_cancel_locked(struct taskqueue *queue, struct task *task, u_int *pendp) Modified: stable/10/sys/sys/taskqueue.h ============================================================================== --- stable/10/sys/sys/taskqueue.h Tue Mar 14 15:59:51 2017 (r315267) +++ stable/10/sys/sys/taskqueue.h Tue Mar 14 16:00:33 2017 (r315268) @@ -74,6 +74,7 @@ int taskqueue_start_threads(struct taskq int taskqueue_enqueue(struct taskqueue *queue, struct task *task); int taskqueue_enqueue_timeout(struct taskqueue *queue, struct timeout_task *timeout_task, int ticks); +int taskqueue_poll_is_busy(struct taskqueue *queue, struct task *task); int taskqueue_cancel(struct taskqueue *queue, struct task *task, u_int *pendp); int taskqueue_cancel_timeout(struct taskqueue *queue, From owner-svn-src-stable-10@freebsd.org Wed Mar 15 19:51:00 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2584FD0E32B; Wed, 15 Mar 2017 19:51: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 E5CBC1881; Wed, 15 Mar 2017 19:50:59 +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 v2FJowEq017202; Wed, 15 Mar 2017 19:50:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FJowv8017201; Wed, 15 Mar 2017 19:50:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201703151950.v2FJowv8017201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 15 Mar 2017 19:50: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: r315328 - in stable: 10/sys/ofed/drivers/infiniband/hw/mlx4 11/sys/ofed/drivers/infiniband/hw/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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2017 19:51:00 -0000 Author: dim Date: Wed Mar 15 19:50:58 2017 New Revision: 315328 URL: https://svnweb.freebsd.org/changeset/base/315328 Log: MFC r310232: After r310171, the kernel version of sscanf() has format string checking enabled. This results in a -Werror warning in mlx4ib: sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c:90:22: error: format specifies type 'unsigned long long *' but the argument has type 'u64 *' (aka 'unsigned long *') [-Werror,-Wformat] sscanf(buf, "%llx", &sysadmin_ag_val); ~~~~ ^~~~~~~~~~~~~~~~ Change sysadmin_ag_val to unsigned long long to avoid the warning. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D8831 Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c Wed Mar 15 19:49:45 2017 (r315327) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c Wed Mar 15 19:50:58 2017 (r315328) @@ -79,7 +79,7 @@ static ssize_t store_admin_alias_guid(st container_of(attr, struct mlx4_ib_iov_sysfs_attr, dentry); struct mlx4_ib_iov_port *port = mlx4_ib_iov_dentry->ctx; struct mlx4_ib_dev *mdev = port->dev; - u64 sysadmin_ag_val; + unsigned long long sysadmin_ag_val; record_num = mlx4_ib_iov_dentry->entry_num / 8; guid_index_in_rec = mlx4_ib_iov_dentry->entry_num % 8; From owner-svn-src-stable-10@freebsd.org Wed Mar 15 21:20:19 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58269D0DFBA; Wed, 15 Mar 2017 21:20:19 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E38FB1008; Wed, 15 Mar 2017 21:20:18 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FLKIiC053003; Wed, 15 Mar 2017 21:20:18 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FLKHUs052999; Wed, 15 Mar 2017 21:20:17 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201703152120.v2FLKHUs052999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 15 Mar 2017 21:20: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: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2017 21:20:19 -0000 Author: erj Date: Wed Mar 15 21:20:17 2017 New Revision: 315333 URL: https://svnweb.freebsd.org/changeset/base/315333 Log: ixgbe(4): Update to 3.2.11-k Includes: 1. Support for X553 (Denverton) Ethernet devices. 2. Initialization code refactoring. 3. ixgbe-specific netmap code moved to ixgbe folder (but not removed from dev/netmap/). 4. VF driver full split. Some cleanup can be had due to redundant code, but this split goes inline with the refactoring. NOTE: This is a direct commit to stable/10. Newer branches will receive an iflib-converted version of ixgbe, with these updates included, instead. Differential Revision: https://reviews.freebsd.org/D9310 Submitted by: Jeb Cramer (jeb.j.cramer@intel.com) Tested by: Jeffrey Pieper (jeffrey.e.pieper@intel.com) Sponsored by: Intel Corporation Added: stable/10/sys/dev/ixgbe/if_bypass.c (contents, props changed) stable/10/sys/dev/ixgbe/if_fdir.c (contents, props changed) stable/10/sys/dev/ixgbe/if_sriov.c (contents, props changed) stable/10/sys/dev/ixgbe/ixgbe_bypass.h (contents, props changed) stable/10/sys/dev/ixgbe/ixgbe_fdir.h (contents, props changed) stable/10/sys/dev/ixgbe/ixgbe_features.h (contents, props changed) stable/10/sys/dev/ixgbe/ixgbe_netmap.c (contents, props changed) stable/10/sys/dev/ixgbe/ixgbe_netmap.h (contents, props changed) stable/10/sys/dev/ixgbe/ixgbe_rss.h (contents, props changed) stable/10/sys/dev/ixgbe/ixgbe_sriov.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_bypass.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_fdir.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_features.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_mbx.c (contents, props changed) stable/10/sys/dev/ixgbe/ixv_mbx.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_netmap.c (contents, props changed) stable/10/sys/dev/ixgbe/ixv_netmap.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_osdep.c (contents, props changed) stable/10/sys/dev/ixgbe/ixv_osdep.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_rss.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_sriov.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_txrx.c (contents, props changed) stable/10/sys/dev/ixgbe/ixv_type.h (contents, props changed) stable/10/sys/dev/ixgbe/ixv_vf.c (contents, props changed) stable/10/sys/dev/ixgbe/ixv_vf.h (contents, props changed) Deleted: stable/10/sys/dev/ixgbe/ixgbe_vf.c stable/10/sys/dev/ixgbe/ixgbe_vf.h Modified: stable/10/sys/conf/files stable/10/sys/dev/ixgbe/if_ix.c stable/10/sys/dev/ixgbe/if_ixv.c stable/10/sys/dev/ixgbe/ix_txrx.c stable/10/sys/dev/ixgbe/ixgbe.h stable/10/sys/dev/ixgbe/ixgbe_82598.c stable/10/sys/dev/ixgbe/ixgbe_82598.h stable/10/sys/dev/ixgbe/ixgbe_82599.c stable/10/sys/dev/ixgbe/ixgbe_82599.h stable/10/sys/dev/ixgbe/ixgbe_api.c stable/10/sys/dev/ixgbe/ixgbe_api.h stable/10/sys/dev/ixgbe/ixgbe_common.c stable/10/sys/dev/ixgbe/ixgbe_common.h stable/10/sys/dev/ixgbe/ixgbe_dcb.c stable/10/sys/dev/ixgbe/ixgbe_dcb.h stable/10/sys/dev/ixgbe/ixgbe_dcb_82598.c stable/10/sys/dev/ixgbe/ixgbe_dcb_82598.h stable/10/sys/dev/ixgbe/ixgbe_dcb_82599.c stable/10/sys/dev/ixgbe/ixgbe_dcb_82599.h stable/10/sys/dev/ixgbe/ixgbe_mbx.c stable/10/sys/dev/ixgbe/ixgbe_mbx.h stable/10/sys/dev/ixgbe/ixgbe_osdep.c stable/10/sys/dev/ixgbe/ixgbe_osdep.h stable/10/sys/dev/ixgbe/ixgbe_phy.c stable/10/sys/dev/ixgbe/ixgbe_phy.h stable/10/sys/dev/ixgbe/ixgbe_type.h stable/10/sys/dev/ixgbe/ixgbe_x540.c stable/10/sys/dev/ixgbe/ixgbe_x540.h stable/10/sys/dev/ixgbe/ixgbe_x550.c stable/10/sys/dev/ixgbe/ixgbe_x550.h stable/10/sys/modules/ix/Makefile stable/10/sys/modules/ixv/Makefile Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed Mar 15 21:17:45 2017 (r315332) +++ stable/10/sys/conf/files Wed Mar 15 21:20:17 2017 (r315333) @@ -1765,6 +1765,14 @@ dev/ixgbe/if_ixv.c optional ixv inet | compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/ix_txrx.c optional ix inet | ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/if_bypass.c optional ix inet | ixv inet | ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/if_fdir.c optional ix inet | ixv inet | ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/if_sriov.c optional ix inet | ixv inet | ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_netmap.c optional ix inet | ixv inet | ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_phy.c optional ix inet | ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_osdep.c optional ix inet | ixv inet | ixgbe inet \ @@ -1775,8 +1783,6 @@ dev/ixgbe/ixgbe_common.c optional ix ine compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_mbx.c optional ix inet | ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_vf.c optional ix inet | ixv inet | ixgbe inet \ - compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82598.c optional ix inet | ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82599.c optional ix inet | ixv inet | ixgbe inet \ @@ -1791,6 +1797,16 @@ dev/ixgbe/ixgbe_dcb_82598.c optional ix compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82599.c optional ix inet | ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixv_mbx.c optional ix inet | ixv inet | ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixv_netmap.c optional ix inet | ixv inet | ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixv_osdep.c optional ix inet | ixv inet | ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixv_txrx.c optional ix inet | ixv inet | ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixv_vf.c optional ix inet | ixv inet | ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixl/if_ixl.c optional ixl inet \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/if_ixlv.c optional ixlv inet \ Added: stable/10/sys/dev/ixgbe/if_bypass.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/ixgbe/if_bypass.c Wed Mar 15 21:20:17 2017 (r315333) @@ -0,0 +1,808 @@ +/****************************************************************************** + + Copyright (c) 2001-2017, Intel Corporation + 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 Intel Corporation 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 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$*/ + + +#include "ixgbe.h" + +/************************************************************************ + * ixgbe_bypass_mutex_enter + * + * Mutex support for the bypass feature. Using a dual lock + * to facilitate a privileged access to the watchdog update + * over other threads. + ************************************************************************/ +static void +ixgbe_bypass_mutex_enter(struct adapter *adapter) +{ + while (atomic_cmpset_int(&adapter->bypass.low, 0, 1) == 0) + usec_delay(3000); + while (atomic_cmpset_int(&adapter->bypass.high, 0, 1) == 0) + usec_delay(3000); + return; +} /* ixgbe_bypass_mutex_enter */ + +/************************************************************************ + * ixgbe_bypass_mutex_clear + ************************************************************************/ +static void +ixgbe_bypass_mutex_clear(struct adapter *adapter) +{ + while (atomic_cmpset_int(&adapter->bypass.high, 1, 0) == 0) + usec_delay(6000); + while (atomic_cmpset_int(&adapter->bypass.low, 1, 0) == 0) + usec_delay(6000); + return; +} /* ixgbe_bypass_mutex_clear */ + +/************************************************************************ + * ixgbe_bypass_wd_mutex_enter + * + * Watchdog entry is allowed to simply grab the high priority + ************************************************************************/ +static void +ixgbe_bypass_wd_mutex_enter(struct adapter *adapter) +{ + while (atomic_cmpset_int(&adapter->bypass.high, 0, 1) == 0) + usec_delay(3000); + return; +} /* ixgbe_bypass_wd_mutex_enter */ + +/************************************************************************ + * ixgbe_bypass_wd_mutex_clear + ************************************************************************/ +static void +ixgbe_bypass_wd_mutex_clear(struct adapter *adapter) +{ + while (atomic_cmpset_int(&adapter->bypass.high, 1, 0) == 0) + usec_delay(6000); + return; +} /* ixgbe_bypass_wd_mutex_clear */ + +/************************************************************************ + * ixgbe_get_bypass_time + ************************************************************************/ +static void +ixgbe_get_bypass_time(u32 *year, u32 *sec) +{ + struct timespec current; + + *year = 1970; /* time starts at 01/01/1970 */ + nanotime(¤t); + *sec = current.tv_sec; + + while(*sec > SEC_THIS_YEAR(*year)) { + *sec -= SEC_THIS_YEAR(*year); + (*year)++; + } +} /* ixgbe_get_bypass_time */ + +/************************************************************************ + * ixgbe_bp_version + * + * Display the feature version + ************************************************************************/ +static int +ixgbe_bp_version(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int version = 0; + u32 cmd; + + ixgbe_bypass_mutex_enter(adapter); + cmd = BYPASS_PAGE_CTL2 | BYPASS_WE; + cmd |= (BYPASS_EEPROM_VER_ADD << BYPASS_CTL2_OFFSET_SHIFT) & + BYPASS_CTL2_OFFSET_M; + if ((error = hw->mac.ops.bypass_rw(hw, cmd, &version) != 0)) + goto err; + msec_delay(100); + cmd &= ~BYPASS_WE; + if ((error = hw->mac.ops.bypass_rw(hw, cmd, &version) != 0)) + goto err; + ixgbe_bypass_mutex_clear(adapter); + version &= BYPASS_CTL2_DATA_M; + error = sysctl_handle_int(oidp, &version, 0, req); + return (error); +err: + ixgbe_bypass_mutex_clear(adapter); + return (error); + +} /* ixgbe_bp_version */ + +/************************************************************************ + * ixgbe_bp_set_state + * + * Show/Set the Bypass State: + * 1 = NORMAL + * 2 = BYPASS + * 3 = ISOLATE + * + * With no argument the state is displayed, + * passing a value will set it. + ************************************************************************/ +static int +ixgbe_bp_set_state(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int state = 0; + + /* Get the current state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, + BYPASS_PAGE_CTL0, &state); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + state = (state >> BYPASS_STATUS_OFF_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &state, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check new state */ + switch (state) { + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + ixgbe_bypass_mutex_enter(adapter); + if ((error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_MODE_OFF_M, state) != 0)) + goto out; + /* Set AUTO back on so FW can receive events */ + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_MODE_OFF_M, BYPASS_AUTO); +out: + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_set_state */ + +/************************************************************************ + * The following routines control the operational + * "rules" of the feature, what behavior will occur + * when particular events occur. + * Values are: + * 0 - no change for the event (NOP) + * 1 - go to Normal operation + * 2 - go to Bypass operation + * 3 - go to Isolate operation + * Calling the entry with no argument just displays + * the current rule setting. + ************************************************************************/ + +/************************************************************************ + * ixgbe_bp_timeout + * + * This is to set the Rule for the watchdog, + * not the actual watchdog timeout value. + ************************************************************************/ +static int +ixgbe_bp_timeout(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int timeout = 0; + + /* Get the current value */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &timeout); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + timeout = (timeout >> BYPASS_WDTIMEOUT_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &timeout, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (timeout) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_WDTIMEOUT_M, timeout << BYPASS_WDTIMEOUT_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_timeout */ + +/************************************************************************ + * ixgbe_bp_main_on + ************************************************************************/ +static int +ixgbe_bp_main_on(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int main_on = 0; + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_on); + main_on = (main_on >> BYPASS_MAIN_ON_SHIFT) & 0x3; + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + + error = sysctl_handle_int(oidp, &main_on, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (main_on) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_MAIN_ON_M, main_on << BYPASS_MAIN_ON_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_main_on */ + +/************************************************************************ + * ixgbe_bp_main_off + ************************************************************************/ +static int +ixgbe_bp_main_off(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int main_off = 0; + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_off); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + main_off = (main_off >> BYPASS_MAIN_OFF_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &main_off, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (main_off) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_MAIN_OFF_M, main_off << BYPASS_MAIN_OFF_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_main_off */ + +/************************************************************************ + * ixgbe_bp_aux_on + ************************************************************************/ +static int +ixgbe_bp_aux_on(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int aux_on = 0; + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_on); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + aux_on = (aux_on >> BYPASS_AUX_ON_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &aux_on, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (aux_on) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_AUX_ON_M, aux_on << BYPASS_AUX_ON_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_aux_on */ + +/************************************************************************ + * ixgbe_bp_aux_off + ************************************************************************/ +static int +ixgbe_bp_aux_off(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int aux_off = 0; + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_off); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + aux_off = (aux_off >> BYPASS_AUX_OFF_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &aux_off, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (aux_off) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_AUX_OFF_M, aux_off << BYPASS_AUX_OFF_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_aux_off */ + +/************************************************************************ + * ixgbe_bp_wd_set - Set the Watchdog timer value + * + * Valid settings are: + * - 0 will disable the watchdog + * - 1, 2, 3, 4, 8, 16, 32 + * - anything else is invalid and will be ignored + ************************************************************************/ +static int +ixgbe_bp_wd_set(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error, tmp; + static int timeout = 0; + u32 mask, arg = BYPASS_PAGE_CTL0; + + /* Get the current hardware value */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &tmp); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + /* + * If armed keep the displayed value, + * else change the display to zero. + */ + if ((tmp & (0x1 << BYPASS_WDT_ENABLE_SHIFT)) == 0) + timeout = 0; + + error = sysctl_handle_int(oidp, &timeout, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + mask = BYPASS_WDT_ENABLE_M; + switch (timeout) { + case 0: /* disables the timer */ + break; + case 1: + arg = BYPASS_WDT_1_5 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 2: + arg = BYPASS_WDT_2 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 3: + arg = BYPASS_WDT_3 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 4: + arg = BYPASS_WDT_4 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 8: + arg = BYPASS_WDT_8 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 16: + arg = BYPASS_WDT_16 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 32: + arg = BYPASS_WDT_32 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + default: + return (EINVAL); + } + /* Set the new watchdog */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, mask, arg); + ixgbe_bypass_mutex_clear(adapter); + + return (error); +} /* ixgbe_bp_wd_set */ + +/************************************************************************ + * ixgbe_bp_wd_reset - Reset the Watchdog timer + * + * To activate this it must be called with any argument. + ************************************************************************/ +static int +ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + u32 sec, year; + int cmd, count = 0, error = 0; + int reset_wd = 0; + + error = sysctl_handle_int(oidp, &reset_wd, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + cmd = BYPASS_PAGE_CTL1 | BYPASS_WE | BYPASS_CTL1_WDT_PET; + + /* Resync the FW time while writing to CTL1 anyway */ + ixgbe_get_bypass_time(&year, &sec); + + cmd |= (sec & BYPASS_CTL1_TIME_M) | BYPASS_CTL1_VALID; + cmd |= BYPASS_CTL1_OFFTRST; + + ixgbe_bypass_wd_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, cmd, &reset_wd); + + /* Read until it matches what we wrote, or we time out */ + do { + if (count++ > 10) { + error = IXGBE_BYPASS_FW_WRITE_FAILURE; + break; + } + if (hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL1, &reset_wd)) { + error = IXGBE_ERR_INVALID_ARGUMENT; + break; + } + } while (!hw->mac.ops.bypass_valid_rd(cmd, reset_wd)); + + reset_wd = 0; + ixgbe_bypass_wd_mutex_clear(adapter); + return (error); +} /* ixgbe_bp_wd_reset */ + +/************************************************************************ + * ixgbe_bp_log - Display the bypass log + * + * You must pass a non-zero arg to sysctl + ************************************************************************/ +static int +ixgbe_bp_log(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + u32 cmd, base, head; + u32 log_off, count = 0; + static int status = 0; + u8 data; + struct ixgbe_bypass_eeprom eeprom[BYPASS_MAX_LOGS]; + int i, error = 0; + + error = sysctl_handle_int(oidp, &status, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Keep the log display single-threaded */ + while (atomic_cmpset_int(&adapter->bypass.log, 0, 1) == 0) + usec_delay(3000); + + ixgbe_bypass_mutex_enter(adapter); + + /* Find Current head of the log eeprom offset */ + cmd = BYPASS_PAGE_CTL2 | BYPASS_WE; + cmd |= (0x1 << BYPASS_CTL2_OFFSET_SHIFT) & BYPASS_CTL2_OFFSET_M; + error = hw->mac.ops.bypass_rw(hw, cmd, &status); + if (error) + goto unlock_err; + + /* wait for the write to stick */ + msec_delay(100); + + /* Now read the results */ + cmd &= ~BYPASS_WE; + error = hw->mac.ops.bypass_rw(hw, cmd, &status); + if (error) + goto unlock_err; + + ixgbe_bypass_mutex_clear(adapter); + + base = status & BYPASS_CTL2_DATA_M; + head = (status & BYPASS_CTL2_HEAD_M) >> BYPASS_CTL2_HEAD_SHIFT; + + /* address of the first log */ + log_off = base + (head * 5); + + /* extract all the log entries */ + while (count < BYPASS_MAX_LOGS) { + eeprom[count].logs = 0; + eeprom[count].actions = 0; + + /* Log 5 bytes store in on u32 and a u8 */ + for (i = 0; i < 4; i++) { + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rd_eep(hw, log_off + i, + &data); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (-EINVAL); + eeprom[count].logs += data << (8 * i); + } + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rd_eep(hw, + log_off + i, &eeprom[count].actions); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (-EINVAL); + + /* Quit if not a unread log */ + if (!(eeprom[count].logs & BYPASS_LOG_CLEAR_M)) + break; + /* + * Log looks good so store the address where it's + * Unread Log bit is so we can clear it after safely + * pulling out all of the log data. + */ + eeprom[count].clear_off = log_off; + + count++; + head = head ? head - 1 : BYPASS_MAX_LOGS; + log_off = base + (head * 5); + } + + /* reverse order (oldest first) for output */ + while (count--) { + int year; + u32 mon, days, hours, min, sec; + u32 time = eeprom[count].logs & BYPASS_LOG_TIME_M; + u32 event = (eeprom[count].logs & BYPASS_LOG_EVENT_M) >> + BYPASS_LOG_EVENT_SHIFT; + u8 action = eeprom[count].actions & BYPASS_LOG_ACTION_M; + u16 day_mon[2][13] = { + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, + {0, 31, 59, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} + }; + char *event_str[] = {"unknown", "main on", "aux on", + "main off", "aux off", "WDT", "user" }; + char *action_str[] = {"ignore", "normal", "bypass", "isolate",}; + + /* verify vaild data 1 - 6 */ + if (event < BYPASS_EVENT_MAIN_ON || event > BYPASS_EVENT_USR) + event = 0; + + /* + * time is in sec's this year, so convert to something + * printable. + */ + ixgbe_get_bypass_time(&year, &sec); + days = time / SEC_PER_DAY; + for (i = 11; days < day_mon[LEAP_YR(year)][i]; i--) + continue; + mon = i + 1; /* display month as 1-12 */ + time -= (day_mon[LEAP_YR(year)][i] * SEC_PER_DAY); + days = (time / SEC_PER_DAY) + 1; /* first day is 1 */ + time %= SEC_PER_DAY; + hours = time / (60 * 60); + time %= (60 * 60); + min = time / 60; + sec = time % 60; + device_printf(adapter->dev, + "UT %02d/%02d %02d:%02d:%02d %8.8s -> %7.7s\n", + mon, days, hours, min, sec, event_str[event], + action_str[action]); + cmd = BYPASS_PAGE_CTL2 | BYPASS_WE | BYPASS_CTL2_RW; + cmd |= ((eeprom[count].clear_off + 3) + << BYPASS_CTL2_OFFSET_SHIFT) & BYPASS_CTL2_OFFSET_M; + cmd |= ((eeprom[count].logs & ~BYPASS_LOG_CLEAR_M) >> 24); + + ixgbe_bypass_mutex_enter(adapter); + + error = hw->mac.ops.bypass_rw(hw, cmd, &status); + + /* wait for the write to stick */ + msec_delay(100); + + ixgbe_bypass_mutex_clear(adapter); + + if (error) + return (-EINVAL); + } + + status = 0; /* reset */ + /* Another log command can now run */ + while (atomic_cmpset_int(&adapter->bypass.log, 1, 0) == 0) + usec_delay(3000); + return(error); + +unlock_err: + ixgbe_bypass_mutex_clear(adapter); + status = 0; /* reset */ + while (atomic_cmpset_int(&adapter->bypass.log, 1, 0) == 0) + usec_delay(3000); + return (-EINVAL); +} /* ixgbe_bp_log */ + +/************************************************************************ + * ixgbe_bypass_init - Set up infrastructure for the bypass feature + * + * Do time and sysctl initialization here. This feature is + * only enabled for the first port of a bypass adapter. + ************************************************************************/ +void +ixgbe_bypass_init(struct adapter *adapter) +{ + struct ixgbe_hw *hw = &adapter->hw; + device_t dev = adapter->dev; + struct sysctl_oid *bp_node; + struct sysctl_oid_list *bp_list; + u32 mask, value, sec, year; + + if (!(adapter->feat_cap & IXGBE_FEATURE_BYPASS)) + return; + + /* First set up time for the hardware */ + ixgbe_get_bypass_time(&year, &sec); + + mask = BYPASS_CTL1_TIME_M + | BYPASS_CTL1_VALID_M + | BYPASS_CTL1_OFFTRST_M; + + value = (sec & BYPASS_CTL1_TIME_M) + | BYPASS_CTL1_VALID + | BYPASS_CTL1_OFFTRST; + + ixgbe_bypass_mutex_enter(adapter); + hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL1, mask, value); + ixgbe_bypass_mutex_clear(adapter); + + /* Now set up the SYSCTL infrastructure */ + + /* + * The log routine is kept separate from the other + * children so a general display command like: + * `sysctl dev.ix.0.bypass` will not show the log. + */ + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "bypass_log", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_log, "I", "Bypass Log"); + + /* All other setting are hung from the 'bypass' node */ + bp_node = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "bypass", CTLFLAG_RD, NULL, "Bypass"); + + bp_list = SYSCTL_CHILDREN(bp_node); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD, + adapter, 0, ixgbe_bp_version, "I", "Bypass Version"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_set_state, "I", "Bypass State"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_timeout, "I", "Bypass Timeout"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_main_on, "I", "Bypass Main On"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_main_off, "I", "Bypass Main Off"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_aux_on, "I", "Bypass Aux On"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_aux_off, "I", "Bypass Aux Off"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_wd_set, "I", "Set BP Watchdog"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR, + adapter, 0, ixgbe_bp_wd_reset, "S", "Bypass WD Reset"); + + adapter->feat_en |= IXGBE_FEATURE_BYPASS; + + return; +} /* ixgbe_bypass_init */ + Added: stable/10/sys/dev/ixgbe/if_fdir.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/ixgbe/if_fdir.c Wed Mar 15 21:20:17 2017 (r315333) @@ -0,0 +1,154 @@ +/****************************************************************************** + + Copyright (c) 2001-2017, Intel Corporation + 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 Intel Corporation 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 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$*/ + +#include "ixgbe.h" + +#ifdef IXGBE_FDIR + +void +ixgbe_init_fdir(struct adapter *adapter) +{ + u32 hdrm = 32 << fdir_pballoc; + + if (!(adapter->feat_en & IXGBE_FEATURE_FDIR)) + return; + + adapter->hw.mac.ops.setup_rxpba(&adapter->hw, 0, hdrm, + PBA_STRATEGY_EQUAL); + ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc); +} /* ixgbe_init_fdir */ + +void +ixgbe_reinit_fdir(void *context, int pending) +{ + struct adapter *adapter = context; + struct ifnet *ifp = adapter->ifp; + + if (!(adapter->feat_en & IXGBE_FEATURE_FDIR)) + return; + if (adapter->fdir_reinit != 1) /* Shouldn't happen */ + return; + ixgbe_reinit_fdir_tables_82599(&adapter->hw); + adapter->fdir_reinit = 0; + /* re-enable flow director interrupts */ + IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_FLOW_DIR); + /* Restart the interface */ + ifp->if_drv_flags |= IFF_DRV_RUNNING; +} /* ixgbe_reinit_fdir */ + +/************************************************************************ + * ixgbe_atr + * + * Parse packet headers so that Flow Director can make + * a hashed filter table entry allowing traffic flows + * to be identified and kept on the same cpu. This + * would be a performance hit, but we only do it at + * IXGBE_FDIR_RATE of packets. + ************************************************************************/ +void +ixgbe_atr(struct tx_ring *txr, struct mbuf *mp) +{ + struct adapter *adapter = txr->adapter; + struct ix_queue *que; + struct ip *ip; + struct tcphdr *th; + struct udphdr *uh; + struct ether_vlan_header *eh; + union ixgbe_atr_hash_dword input = {.dword = 0}; + union ixgbe_atr_hash_dword common = {.dword = 0}; + int ehdrlen, ip_hlen; + u16 etype; + + eh = mtod(mp, struct ether_vlan_header *); + if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + ehdrlen = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; + etype = eh->evl_proto; + } else { + ehdrlen = ETHER_HDR_LEN; + etype = eh->evl_encap_proto; + } + + /* Only handling IPv4 */ + if (etype != htons(ETHERTYPE_IP)) + return; + + ip = (struct ip *)(mp->m_data + ehdrlen); + ip_hlen = ip->ip_hl << 2; + + /* check if we're UDP or TCP */ + switch (ip->ip_p) { + case IPPROTO_TCP: + th = (struct tcphdr *)((caddr_t)ip + ip_hlen); + /* src and dst are inverted */ + common.port.dst ^= th->th_sport; + common.port.src ^= th->th_dport; + input.formatted.flow_type ^= IXGBE_ATR_FLOW_TYPE_TCPV4; + break; + case IPPROTO_UDP: + uh = (struct udphdr *)((caddr_t)ip + ip_hlen); + /* src and dst are inverted */ + common.port.dst ^= uh->uh_sport; + common.port.src ^= uh->uh_dport; + input.formatted.flow_type ^= IXGBE_ATR_FLOW_TYPE_UDPV4; + break; + default: + return; + } + + input.formatted.vlan_id = htobe16(mp->m_pkthdr.ether_vtag); + if (mp->m_pkthdr.ether_vtag) + common.flex_bytes ^= htons(ETHERTYPE_VLAN); + else + common.flex_bytes ^= etype; + common.ip ^= ip->ip_src.s_addr ^ ip->ip_dst.s_addr; + + que = &adapter->queues[txr->me]; + /* + * This assumes the Rx queue and Tx + * queue are bound to the same CPU + */ + ixgbe_fdir_add_signature_filter_82599(&adapter->hw, + input, common, que->msix); +} /* ixgbe_atr */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Thu Mar 16 01:38:05 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B930D0DF10; Thu, 16 Mar 2017 01:38:05 +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 4848F18BD; Thu, 16 Mar 2017 01:38:05 +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 v2G1c4ct058426; Thu, 16 Mar 2017 01:38:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G1c4Ds058425; Thu, 16 Mar 2017 01:38:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160138.v2G1c4Ds058425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 01:38: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: r315343 - stable/10/usr.sbin/mergemaster X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 01:38:05 -0000 Author: ngie Date: Thu Mar 16 01:38:04 2017 New Revision: 315343 URL: https://svnweb.freebsd.org/changeset/base/315343 Log: MFC r314830: mergemaster: fix description of -p -p only handles updating /etc/master.passwd and /etc/group . No more, no less. Also, mergemaster (and no other portions of the vanilla FreeBSD build process) should be messing with __MAKECONF or SRCCONF as part of the installworld or distribution process. Don't insinuate that mergemaster does that as it's a false claim. Modified: stable/10/usr.sbin/mergemaster/mergemaster.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- stable/10/usr.sbin/mergemaster/mergemaster.8 Thu Mar 16 01:36:09 2017 (r315342) +++ stable/10/usr.sbin/mergemaster/mergemaster.8 Thu Mar 16 01:38:04 2017 (r315343) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 29, 2015 +.Dd March 6, 2017 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -226,9 +226,10 @@ destination directory. .It Fl p Pre-buildworld mode. Compares only files known to be essential to the success of -{build|install}world, -including -.Pa /etc/make.conf . +{build|install}world, i.e., +.Pa /etc/group +and +.Pa /etc/master.passwd . .It Fl F If the files differ only by VCS Id ($FreeBSD) install the new file. From owner-svn-src-stable-10@freebsd.org Thu Mar 16 01:41:37 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87E34D0C0AD; Thu, 16 Mar 2017 01:41:37 +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 618701D5F; Thu, 16 Mar 2017 01:41:37 +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 v2G1fawC062421; Thu, 16 Mar 2017 01:41:36 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G1fahX062420; Thu, 16 Mar 2017 01:41:36 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201703160141.v2G1fahX062420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Thu, 16 Mar 2017 01:41: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: r315345 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 01:41:37 -0000 Author: badger Date: Thu Mar 16 01:41:36 2017 New Revision: 315345 URL: https://svnweb.freebsd.org/changeset/base/315345 Log: MFC r313733: sleepq_catch_signals: do thread suspension before signal check Since locks are dropped when a thread suspends, it's possible for another thread to deliver a signal to the suspended thread. If the thread awakens from suspension without checking for signals, it may go to sleep despite having a pending signal that should wake it up. Therefore the suspension check is done first, so any signals sent while suspended will be caught in the subsequent signal check. Sponsored by: Dell EMC Modified: stable/10/sys/kern/subr_sleepqueue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_sleepqueue.c ============================================================================== --- stable/10/sys/kern/subr_sleepqueue.c Thu Mar 16 01:38:07 2017 (r315344) +++ stable/10/sys/kern/subr_sleepqueue.c Thu Mar 16 01:41:36 2017 (r315345) @@ -411,6 +411,7 @@ sleepq_catch_signals(void *wchan, int pr struct sigacts *ps; int sig, ret; + ret = 0; td = curthread; p = curproc; sc = SC_LOOKUP(wchan); @@ -424,44 +425,51 @@ sleepq_catch_signals(void *wchan, int pr } /* - * See if there are any pending signals for this thread. If not - * we can switch immediately. Otherwise do the signal processing - * directly. + * See if there are any pending signals or suspension requests for this + * thread. If not, we can switch immediately. */ thread_lock(td); - if ((td->td_flags & (TDF_NEEDSIGCHK | TDF_NEEDSUSPCHK)) == 0) { - sleepq_switch(wchan, pri); - return (0); - } - thread_unlock(td); - mtx_unlock_spin(&sc->sc_lock); - CTR3(KTR_PROC, "sleepq catching signals: thread %p (pid %ld, %s)", - (void *)td, (long)p->p_pid, td->td_name); - PROC_LOCK(p); - ps = p->p_sigacts; - mtx_lock(&ps->ps_mtx); - sig = cursig(td); - if (sig == 0) { - mtx_unlock(&ps->ps_mtx); - ret = thread_suspend_check(1); - MPASS(ret == 0 || ret == EINTR || ret == ERESTART); - } else { - if (SIGISMEMBER(ps->ps_sigintr, sig)) - ret = EINTR; - else - ret = ERESTART; - mtx_unlock(&ps->ps_mtx); + if ((td->td_flags & (TDF_NEEDSIGCHK | TDF_NEEDSUSPCHK)) != 0) { + thread_unlock(td); + mtx_unlock_spin(&sc->sc_lock); + CTR3(KTR_PROC, "sleepq catching signals: thread %p (pid %ld, %s)", + (void *)td, (long)p->p_pid, td->td_name); + PROC_LOCK(p); + /* + * Check for suspension first. Checking for signals and then + * suspending could result in a missed signal, since a signal + * can be delivered while this thread is suspended. + */ + if ((td->td_flags & TDF_NEEDSUSPCHK) != 0) { + ret = thread_suspend_check(1); + MPASS(ret == 0 || ret == EINTR || ret == ERESTART); + if (ret != 0) { + PROC_UNLOCK(p); + mtx_lock_spin(&sc->sc_lock); + thread_lock(td); + goto out; + } + } + if ((td->td_flags & TDF_NEEDSIGCHK) != 0) { + ps = p->p_sigacts; + mtx_lock(&ps->ps_mtx); + sig = cursig(td); + if (sig != 0) + ret = SIGISMEMBER(ps->ps_sigintr, sig) ? + EINTR : ERESTART; + mtx_unlock(&ps->ps_mtx); + } + /* + * Lock the per-process spinlock prior to dropping the PROC_LOCK + * to avoid a signal delivery race. PROC_LOCK, PROC_SLOCK, and + * thread_lock() are currently held in tdsendsignal(). + */ + PROC_SLOCK(p); + mtx_lock_spin(&sc->sc_lock); + PROC_UNLOCK(p); + thread_lock(td); + PROC_SUNLOCK(p); } - /* - * Lock the per-process spinlock prior to dropping the PROC_LOCK - * to avoid a signal delivery race. PROC_LOCK, PROC_SLOCK, and - * thread_lock() are currently held in tdsendsignal(). - */ - PROC_SLOCK(p); - mtx_lock_spin(&sc->sc_lock); - PROC_UNLOCK(p); - thread_lock(td); - PROC_SUNLOCK(p); if (ret == 0) { sleepq_switch(wchan, pri); return (0); From owner-svn-src-stable-10@freebsd.org Thu Mar 16 01:47:27 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AF62D0C439; Thu, 16 Mar 2017 01:47: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 4A4061141; Thu, 16 Mar 2017 01:47: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 v2G1lQUB062689; Thu, 16 Mar 2017 01:47:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G1lQWr062688; Thu, 16 Mar 2017 01:47:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160147.v2G1lQWr062688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 01:47: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: r315346 - stable/10/etc/periodic/security X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 01:47:27 -0000 Author: ngie Date: Thu Mar 16 01:47:26 2017 New Revision: 315346 URL: https://svnweb.freebsd.org/changeset/base/315346 Log: MFC r274130: r274130 (by bapt): Avoid installing security.functions with executable bits, periodic(8) will try to execute all files with an executable bit in /etc/periodic/*/ while this file is supposed only to be sourced by others Modified: stable/10/etc/periodic/security/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/security/Makefile ============================================================================== --- stable/10/etc/periodic/security/Makefile Thu Mar 16 01:41:36 2017 (r315345) +++ stable/10/etc/periodic/security/Makefile Thu Mar 16 01:47:26 2017 (r315346) @@ -2,6 +2,8 @@ .include +FILESGROUPS= FILES DATA + FILES= 100.chksetuid \ 110.neggrpperm \ 200.chkmounts \ @@ -10,8 +12,8 @@ FILES= 100.chksetuid \ 410.logincheck \ 700.kernelmsg \ 800.loginfail \ - 900.tcpwrap \ - security.functions + 900.tcpwrap +DATA= security.functions # NB: keep these sorted by MK_* knobs From owner-svn-src-stable-10@freebsd.org Thu Mar 16 01:50:12 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E233D0C5BA; Thu, 16 Mar 2017 01:50: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 3D72C1433; Thu, 16 Mar 2017 01:50: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 v2G1oB8a062930; Thu, 16 Mar 2017 01:50:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G1oBcb062929; Thu, 16 Mar 2017 01:50:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160150.v2G1oBcb062929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 01:50: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: r315348 - stable/10/etc/periodic/security X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 01:50:12 -0000 Author: ngie Date: Thu Mar 16 01:50:11 2017 New Revision: 315348 URL: https://svnweb.freebsd.org/changeset/base/315348 Log: MFC r314895: Only install 900.tcpwrap if MK_INETD != "no" and MK_TCP_WRAPPERS != "no" It relies on output from inetd that is triggered by MK_TCP_WRAPPERS=yes. We need to check for both knobs being set -- otherwise the script doesn't have much value. PR: 217577 Modified: stable/10/etc/periodic/security/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/security/Makefile ============================================================================== --- stable/10/etc/periodic/security/Makefile Thu Mar 16 01:48:08 2017 (r315347) +++ stable/10/etc/periodic/security/Makefile Thu Mar 16 01:50:11 2017 (r315348) @@ -11,8 +11,7 @@ FILES= 100.chksetuid \ 400.passwdless \ 410.logincheck \ 700.kernelmsg \ - 800.loginfail \ - 900.tcpwrap + 800.loginfail DATA= security.functions # NB: keep these sorted by MK_* knobs @@ -35,4 +34,8 @@ FILES+= 520.pfdenied FILES+= 460.chkportsum .endif +.if ${MK_INETD} != "no" && ${MK_TCP_WRAPPERS} != "no" +FILES+= 900.tcpwrap +.endif + .include From owner-svn-src-stable-10@freebsd.org Thu Mar 16 01:56:21 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B6BDD0C8CF; Thu, 16 Mar 2017 01:56: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 181971B25; Thu, 16 Mar 2017 01:56: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 v2G1uKqj066967; Thu, 16 Mar 2017 01:56:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G1uKct066966; Thu, 16 Mar 2017 01:56:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160156.v2G1uKct066966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 01:56: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: r315351 - 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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 01:56:21 -0000 Author: ngie Date: Thu Mar 16 01:56:19 2017 New Revision: 315351 URL: https://svnweb.freebsd.org/changeset/base/315351 Log: MFC r315114: Remove /rescue/zdb if MK_ZFS == no Missed in r202452. 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 Thu Mar 16 01:54:56 2017 (r315350) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Mar 16 01:56:19 2017 (r315351) @@ -909,6 +909,7 @@ OLD_FILES+=etc/periodic/daily/800.scrub- OLD_LIBS+=lib/libzfs.so.2 OLD_LIBS+=lib/libzfs_core.so.2 OLD_LIBS+=lib/libzpool.so.2 +OLD_FILES+=rescue/zdb OLD_FILES+=rescue/zfs OLD_FILES+=rescue/zpool OLD_FILES+=sbin/zfs From owner-svn-src-stable-10@freebsd.org Thu Mar 16 01:58:11 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D483D0C99B; Thu, 16 Mar 2017 01:58: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 DF47A1CB8; Thu, 16 Mar 2017 01: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 v2G1wAFI067164; Thu, 16 Mar 2017 01:58:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G1wA57067163; Thu, 16 Mar 2017 01:58:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160158.v2G1wA57067163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 01:58: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: r315353 - 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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 01:58:11 -0000 Author: ngie Date: Thu Mar 16 01:58:09 2017 New Revision: 315353 URL: https://svnweb.freebsd.org/changeset/base/315353 Log: MFC r315111: Remove /rescue/iscsictl and /rescue/iscsid if MK_ISCSI == no 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 Thu Mar 16 01:58:06 2017 (r315352) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Mar 16 01:58:09 2017 (r315353) @@ -2616,6 +2616,8 @@ OLD_FILES+=usr/share/man/man8/IPXrouted. .if ${MK_ISCSI} == no OLD_FILES+=etc/rc.d/iscsictl OLD_FILES+=etc/rc.d/iscsid +OLD_FILES+=rescue/iscsictl +OLD_FILES+=rescue/iscsid OLD_FILES+=sbin/iscontrol OLD_FILES+=usr/bin/iscsictl OLD_FILES+=usr/sbin/iscsid From owner-svn-src-stable-10@freebsd.org Thu Mar 16 01:59:44 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F02DD0CA93; Thu, 16 Mar 2017 01:59: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 4BD3D1F31; Thu, 16 Mar 2017 01:59: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 v2G1xh5K067347; Thu, 16 Mar 2017 01:59:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G1xhRL067346; Thu, 16 Mar 2017 01:59:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160159.v2G1xhRL067346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 01:59: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: r315355 - stable/10/sbin/devfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 01:59:44 -0000 Author: ngie Date: Thu Mar 16 01:59:43 2017 New Revision: 315355 URL: https://svnweb.freebsd.org/changeset/base/315355 Log: MFC r314924: sbin/devfs: clarify usage - Note existence of -m option. - Note that -s applies to rule keyword, only, by adding usage text specifically for the `rule` and `ruleset` keywords. Don't go into any further detail in usage(..) -- it's best that one reads the manpage to get a better idea of how things work as there are a number of different option-specific keywords and arguments, as well as some rule grammar. Modified: stable/10/sbin/devfs/devfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/devfs/devfs.c ============================================================================== --- stable/10/sbin/devfs/devfs.c Thu Mar 16 01:59:41 2017 (r315354) +++ stable/10/sbin/devfs/devfs.c Thu Mar 16 01:59:43 2017 (r315355) @@ -225,6 +225,8 @@ void usage(void) { - fprintf(stderr, "usage: devfs rule|ruleset arguments\n"); + fprintf(stderr, "usage: %s\n%s\n", + "\tdevfs [-m mount-point] [-s ruleset] rule ...", + "\tdevfs [-m mount-point] ruleset ..."); exit(1); } From owner-svn-src-stable-10@freebsd.org Thu Mar 16 02:02:35 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72BD6D0CCEA; Thu, 16 Mar 2017 02:02:35 +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 2909714C8; Thu, 16 Mar 2017 02:02: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 v2G22YAD071260; Thu, 16 Mar 2017 02:02:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G22Y0B071258; Thu, 16 Mar 2017 02:02:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160202.v2G22Y0B071258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 02:02:34 +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: r315356 - in stable/10: rescue/rescue 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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 02:02:35 -0000 Author: ngie Date: Thu Mar 16 02:02:33 2017 New Revision: 315356 URL: https://svnweb.freebsd.org/changeset/base/315356 Log: MFC r315113: Conditionally compile [additional] programs into rescue(8) if requested Trivial oversight missed in r314240 cleanup because I enable these knobs on my test machines. MK_INET6_SUPPORT - rtsol MK_NETCAT - nc Modified: stable/10/rescue/rescue/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/rescue/rescue/Makefile ============================================================================== --- stable/10/rescue/rescue/Makefile Thu Mar 16 01:59:43 2017 (r315355) +++ stable/10/rescue/rescue/Makefile Thu Mar 16 02:02:33 2017 (r315356) @@ -97,7 +97,7 @@ CRUNCH_PROGS_sbin= badsect \ mount_msdosfs mount_nfs mount_nullfs \ mount_udf mount_unionfs newfs \ newfs_msdos nos-tun ping reboot \ - restore rcorder route rtsol savecore \ + restore rcorder route savecore \ shutdown spppcontrol swapon sysctl tunefs umount .if ${MK_ATM} != "no" @@ -110,6 +110,7 @@ CRUNCH_PROGS_sbin+= ccdconfig .if ${MK_INET6_SUPPORT} != "no" CRUNCH_PROGS_sbin+= ping6 +CRUNCH_PROGS_sbin+= rtsol .endif .if ${MK_IPFILTER} != "no" @@ -196,7 +197,7 @@ CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRU # CRUNCH_SRCDIRS+= usr.bin -CRUNCH_PROGS_usr.bin= head mt nc sed tail tee +CRUNCH_PROGS_usr.bin= head mt sed tail tee CRUNCH_PROGS_usr.bin+= gzip CRUNCH_ALIAS_gzip= gunzip gzcat zcat @@ -218,6 +219,10 @@ CRUNCH_LIBS+= -lcrypto .endif CRUNCH_LIBS+= -lmd +.if ${MK_NETCAT} != "no" +CRUNCH_PROGS_usr.bin= nc +.endif + CRUNCH_PROGS_usr.bin+= vi CRUNCH_ALIAS_vi= ex Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Mar 16 01:59:43 2017 (r315355) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Mar 16 02:02:33 2017 (r315356) @@ -2487,6 +2487,7 @@ OLD_FILES+=usr/share/man/man8/traceroute .if ${MK_INET6_SUPPORT} == no OLD_FILES+=rescue/ping6 +OLD_FILES+=rescue/rtsol .endif #.if ${MK_INFO} == no @@ -3887,6 +3888,7 @@ OLD_FILES+=usr/share/misc/windrv_stub.c .endif .if ${MK_NETCAT} == no +OLD_FILES+=rescue/nc OLD_FILES+=usr/bin/nc OLD_FILES+=usr/share/man/man1/nc.1.gz .endif From owner-svn-src-stable-10@freebsd.org Thu Mar 16 02:04:18 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18161D0CDB3; Thu, 16 Mar 2017 02:04: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 DB82B1665; Thu, 16 Mar 2017 02:04: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 v2G24GCe071430; Thu, 16 Mar 2017 02:04:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G24GvN071429; Thu, 16 Mar 2017 02:04:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160204.v2G24GvN071429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 02:04: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: r315358 - stable/10/lib/libc/tests/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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 02:04:18 -0000 Author: ngie Date: Thu Mar 16 02:04:16 2017 New Revision: 315358 URL: https://svnweb.freebsd.org/changeset/base/315358 Log: MFC r314954: style(9): sort the #includes Modified: stable/10/lib/libc/tests/sys/mlock_helper.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/sys/mlock_helper.c ============================================================================== --- stable/10/lib/libc/tests/sys/mlock_helper.c Thu Mar 16 02:04:13 2017 (r315357) +++ stable/10/lib/libc/tests/sys/mlock_helper.c Thu Mar 16 02:04:16 2017 (r315358) @@ -36,8 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include #define VM_MAX_WIRED "vm.max_wired" From owner-svn-src-stable-10@freebsd.org Thu Mar 16 05:10:39 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE363D0DC8F; Thu, 16 Mar 2017 05:10:39 +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 9AE301564; Thu, 16 Mar 2017 05:10:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id r137so627737pfr.3; Wed, 15 Mar 2017 22:10:39 -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=BYjUB2N/rKpLObOG6BPF9UNWuFGGXCmKBexEw3S7OTc=; b=XX7+zYVs82lfQpsrtr022G6KuJQlCuJyapUgF7b9blgO0qz2kvo+b3+SBNKs22hZ6E YV1mDuD9IpEGhd3M/YBKNtCgPdvHrqtHQwCJBelCO59NEwMpTLUfsCRfWH9OgIv3N+dS 1rHsCnsKIS8livYcWqQL0MuWZUOs6y4dalyooYvIvNc2WoZd5qjEkmZnxHUu0qQY8Zer 5dbRCauL8wVcdn2SbT+cFarmEBg6q2rNzpjpUeppJGB3y4+Gtr5ph73KmPktedL5I5A+ gYx2EUCAHXadJSKQ7f8y/KkA9m+U1xmkhgTRKQLOC7p4ewoe6bTdpDjHaLswrgONbGt1 5hoQ== 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=BYjUB2N/rKpLObOG6BPF9UNWuFGGXCmKBexEw3S7OTc=; b=lk3YOOo6s2LhFyHVplWtgK57j9rulRXEiVrO0rMLRXG5McYNPHtMAARdmZYxEAwG8s TSVbLnovAfHd8iIdqAdrIz1xEYrmbEZDEPxfU3R3qZpzN6JiAtnG2leGv+YwvipcsI/m YMd/px2uJKFlfz3uZIfE1SBEwhT1j8fjld5kUnKnIGSKL+gJ6k8GotZwhlqmStku8K26 hgjx7SmXeY4Lx6NN9IkhqQGDlY9Hjbj3lf2dPFAtwpGU7CJB4+8YUdeCAjleU22iTzBj BIosVycLZuNb5/RXIGJ53Yl3hfFjgHHxonLF8UZHx3SlZh5V+uKPSS/udrnG0AlUi0js LMaw== X-Gm-Message-State: AFeK/H1ZlqFAP985POm2WQgc7e3g4UOgo7OKGNYK+ImTJBvYiVtQiFKZMI6irEz9ADBgQA== X-Received: by 10.98.68.199 with SMTP id m68mr8169955pfi.31.1489641039078; Wed, 15 Mar 2017 22:10:39 -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 23sm7263578pfz.127.2017.03.15.22.10.38 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 22:10:38 -0700 (PDT) Subject: Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BD9D96B3-A5E1-4DF6-8A1A-EEC15F03AFC5"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703152120.v2FLKHUs052999@repo.freebsd.org> Date: Wed, 15 Mar 2017 22:10:36 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com> References: <201703152120.v2FLKHUs052999@repo.freebsd.org> To: Eric Joyner X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 05:10:39 -0000 --Apple-Mail=_BD9D96B3-A5E1-4DF6-8A1A-EEC15F03AFC5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 15, 2017, at 14:20, Eric Joyner wrote: >=20 > Author: erj > Date: Wed Mar 15 21:20:17 2017 > New Revision: 315333 > URL: https://svnweb.freebsd.org/changeset/base/315333 >=20 > Log: > ixgbe(4): Update to 3.2.11-k >=20 > Includes: >=20 > 1. Support for X553 (Denverton) Ethernet devices. > 2. Initialization code refactoring. > 3. ixgbe-specific netmap code moved to ixgbe folder > (but not removed from dev/netmap/). > 4. VF driver full split. Some cleanup can be had due to redundant = code, > but this split goes inline with the refactoring. >=20 > NOTE: This is a direct commit to stable/10. Newer branches will = receive an > iflib-converted version of ixgbe, with these updates included, = instead. >=20 > Differential Revision: https://reviews.freebsd.org/D9310 > Submitted by: Jeb Cramer (jeb.j.cramer@intel.com) > Tested by: Jeffrey Pieper (jeffrey.e.pieper@intel.com) > Sponsored by: Intel Corporation Hi Eric, This commit broke amd64/LINT, further (there are other issues = preventing it from passing): = https://ci.freebsd.org/job/FreeBSD-stable-10-amd64-LINT/543/console . Thanks, -Ngie --Apple-Mail=_BD9D96B3-A5E1-4DF6-8A1A-EEC15F03AFC5 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 iQIcBAEBCgAGBQJYyh5NAAoJEPWDqSZpMIYVZpMP/3YHEZOrZEyT433EB4qhSbrQ 4FlwiPh965C+2xN3E6fL2yc22Y+2iknzZpOXKin7FsbSosY1iKNi/FNY2PZj7Ltl 2ibMA9wwqV58rAuUMqpXPG1menwVO++3ARE7smH07dV0uOEtpPnaebLB7TSBdGjO OmdXsOiNctYylfwdgByGJVAr7jIpJ+ElKANU+Z+ohphgW9OpW/0e7TW8fKlIFOF0 cc0yTjFA22B1XrK1VpF79Nxr3kwvZ/KukF30N6RKkFJ5AYXMlulBWfi88RP0KInJ wCkc+5yMKCum4x1zSX3PMl+bb9mjWQv7qaBItWYw1QIGGVPyrjtSlc80kBTJgkp0 maM6St3DGmkoFDQPSLCjupqvyL+GaKZfwYjsCmdac38kdp8DVTVj1RhdrzCtnMRV eKTof36emzpT0Tm75rX8lCuxmulZD0RnekRTpLCuuBlSJps12XMAv96+y0UhAglI IHs9L+ePnPtTcci2sHUE2wDFOO42NVlfQAFTDvdJPCp/90OKf4DqUi11q+2Sd6vM xohwifr/Sfo7NZiOQ72AjGvk5bKHGpApwKfh/XJhQg6vE92Hault+08Uy69cea7U A2Hz1KItX7a6d9uoo0w+8ov35SChAV6Rt5t/RBBO81h83w2k8le1oYK15O1Whu21 V9/j1cRT7C60UF/6bRqR =HMEt -----END PGP SIGNATURE----- --Apple-Mail=_BD9D96B3-A5E1-4DF6-8A1A-EEC15F03AFC5-- From owner-svn-src-stable-10@freebsd.org Thu Mar 16 07:09:49 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 444E3D0EA82; Thu, 16 Mar 2017 07:09:49 +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 134651F39; Thu, 16 Mar 2017 07:09: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 v2G79mOZ095233; Thu, 16 Mar 2017 07:09:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G79mvJ095232; Thu, 16 Mar 2017 07:09:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703160709.v2G79mvJ095232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 16 Mar 2017 07: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: r315385 - 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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 07:09:49 -0000 Author: mav Date: Thu Mar 16 07:09:47 2017 New Revision: 315385 URL: https://svnweb.freebsd.org/changeset/base/315385 Log: MFC r314548: Completely skip cache flushing for not supporting log devices. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Mar 16 07:09:19 2017 (r315384) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Mar 16 07:09:47 2017 (r315385) @@ -830,7 +830,7 @@ zil_flush_vdevs(zilog_t *zilog) avl_tree_t *t = &zilog->zl_vdev_tree; void *cookie = NULL; zil_vdev_node_t *zv; - zio_t *zio; + zio_t *zio = NULL; ASSERT(zilog->zl_writer); @@ -843,12 +843,13 @@ zil_flush_vdevs(zilog_t *zilog) spa_config_enter(spa, SCL_STATE, FTAG, RW_READER); - zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL); - while ((zv = avl_destroy_nodes(t, &cookie)) != NULL) { vdev_t *vd = vdev_lookup_top(spa, zv->zv_vdev); - if (vd != NULL) + if (vd != NULL && !vd->vdev_nowritecache) { + if (zio == NULL) + zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL); zio_flush(zio, vd); + } kmem_free(zv, sizeof (*zv)); } @@ -856,7 +857,8 @@ zil_flush_vdevs(zilog_t *zilog) * Wait for all the flushes to complete. Not all devices actually * support the DKIOCFLUSHWRITECACHE ioctl, so it's OK if it fails. */ - (void) zio_wait(zio); + if (zio) + (void) zio_wait(zio); spa_config_exit(spa, SCL_STATE, FTAG); } From owner-svn-src-stable-10@freebsd.org Thu Mar 16 07:11:36 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D46DD0ED31; Thu, 16 Mar 2017 07:11:36 +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 415F113E1; Thu, 16 Mar 2017 07:11:36 +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 v2G7BZcl099294; Thu, 16 Mar 2017 07:11:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G7BZRK099293; Thu, 16 Mar 2017 07:11:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703160711.v2G7BZRK099293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 16 Mar 2017 07:11: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: r315388 - 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-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 07:11:36 -0000 Author: mav Date: Thu Mar 16 07:11:35 2017 New Revision: 315388 URL: https://svnweb.freebsd.org/changeset/base/315388 Log: MFC r314549: Execute last ZIO of log commit synchronously. For short transactions overhead of context switch can be too large. Skipping it gives significant latency reduction. For large ones, including multiple ZIOs, latency is less critical, while throughput there may become limited by checksumming speed of single CPU core. To get best of both cases, execute last ZIO directly from calling thread context to save latency, while all others (if there are any) enqueue to taskqueues in traditional way. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Mar 16 07:11:05 2017 (r315387) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Mar 16 07:11:35 2017 (r315388) @@ -956,7 +956,7 @@ uint64_t zil_slog_limit = 1024 * 1024; * Calls are serialized. */ static lwb_t * -zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb) +zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb, boolean_t last) { lwb_t *nlwb = NULL; zil_chain_t *zilc; @@ -1057,6 +1057,8 @@ zil_lwb_write_start(zilog_t *zilog, lwb_ */ bzero(lwb->lwb_buf + lwb->lwb_nused, wsz - lwb->lwb_nused); + if (last) + lwb->lwb_zio->io_pipeline &= ~ZIO_STAGE_ISSUE_ASYNC; zio_nowait(lwb->lwb_zio); /* Kick off the write for the old log block */ /* @@ -1093,7 +1095,7 @@ zil_lwb_commit(zilog_t *zilog, itx_t *it * If this record won't fit in the current log block, start a new one. */ if (lwb->lwb_nused + reclen + dlen > lwb->lwb_sz) { - lwb = zil_lwb_write_start(zilog, lwb); + lwb = zil_lwb_write_start(zilog, lwb, B_FALSE); if (lwb == NULL) return (NULL); zil_lwb_write_init(zilog, lwb); @@ -1554,7 +1556,7 @@ zil_commit_writer(zilog_t *zilog) /* write the last block out */ if (lwb != NULL && lwb->lwb_zio != NULL) - lwb = zil_lwb_write_start(zilog, lwb); + lwb = zil_lwb_write_start(zilog, lwb, B_TRUE); zilog->zl_cur_used = 0; From owner-svn-src-stable-10@freebsd.org Thu Mar 16 14:10:04 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A32DFD0FEA4; Thu, 16 Mar 2017 14:10:04 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (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 503851153; Thu, 16 Mar 2017 14:10:03 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id oW6Fc6qPjcWiHoW6GcWX9J; Thu, 16 Mar 2017 08:09:57 -0600 X-Authority-Analysis: v=2.2 cv=JLBLi4Cb c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=6Iz7jQTuP9IA:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=QyXUC8HyAAAA:8 a=YxBL1-UpAAAA:8 a=clO4ALi61GNoqMNj0K4A:9 a=CjuIK1q_8ugA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 a=IjZwj45LgO3ly-622nXo:22 a=avl4LiGQNoF5OB0DmCJ7:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 978AD5F3; Thu, 16 Mar 2017 07:09:55 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v2GE9tx0088345; Thu, 16 Mar 2017 07:09:55 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201703161409.v2GE9tx0088345@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: "Ngie Cooper (yaneurabeya)" cc: Eric Joyner , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv In-Reply-To: Message from "Ngie Cooper (yaneurabeya)" of "Wed, 15 Mar 2017 22:10:36 -0700." <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 16 Mar 2017 07:09:55 -0700 X-CMAE-Envelope: MS4wfN3H7iYDZlhUtSqg9d9IAAuID16vDM0blBotZMfSMcPqza4oyUhrnw/VDozARivjtGq01xvrr/nGPHWfSSY0jFmmx8rOIZN0q61ZTQi3RC/poFEvT0Eo 1wSXSWXoXo5r0WraJWZC1uXzFkrpFTSnZiIYDPfk8ZwH+exStX5jDFpWrxBBbS1BoDfYBM7cgB6faQWDhZj/vcyfTmDdE754TObX6li08m/qHGnYtTCIjwax mDJSdq8RAgyEaOoaNknfCSr1/jWSSkOUZmRdSgJ6slczqht1Ix1YUFeflLAtITqUlkWSaCTL3Xe04wJ3HjTeSPQGH3qB0IJx6vxBODOuiclXg7KNMMSJiHmZ C5KjgiRY X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 14:10:04 -0000 In message <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com>, "Ngie Cooper (yane urabeya)" writes: > > --Apple-Mail=_BD9D96B3-A5E1-4DF6-8A1A-EEC15F03AFC5 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; > charset=us-ascii > > > > On Mar 15, 2017, at 14:20, Eric Joyner wrote: > >=20 > > Author: erj > > Date: Wed Mar 15 21:20:17 2017 > > New Revision: 315333 > > URL: https://svnweb.freebsd.org/changeset/base/315333 > >=20 > > Log: > > ixgbe(4): Update to 3.2.11-k > >=20 > > Includes: > >=20 > > 1. Support for X553 (Denverton) Ethernet devices. > > 2. Initialization code refactoring. > > 3. ixgbe-specific netmap code moved to ixgbe folder > > (but not removed from dev/netmap/). > > 4. VF driver full split. Some cleanup can be had due to redundant = > code, > > but this split goes inline with the refactoring. > >=20 > > NOTE: This is a direct commit to stable/10. Newer branches will = > receive an > > iflib-converted version of ixgbe, with these updates included, = > instead. > >=20 > > Differential Revision: https://reviews.freebsd.org/D9310 > > Submitted by: Jeb Cramer (jeb.j.cramer@intel.com) > > Tested by: Jeffrey Pieper (jeffrey.e.pieper@intel.com) > > Sponsored by: Intel Corporation > > Hi Eric, > This commit broke amd64/LINT, further (there are other issues = > preventing it from passing): = > https://ci.freebsd.org/job/FreeBSD-stable-10-amd64-LINT/543/console . It also broke buildkernel while building the ixgbe module in my stable10/amd64 VM. -- 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-stable-10@freebsd.org Thu Mar 16 15:10:06 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30A59D0F01B; Thu, 16 Mar 2017 15:10:06 +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 F3CF7121C; Thu, 16 Mar 2017 15:10:05 +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 v2GFA5Zd093790; Thu, 16 Mar 2017 15:10:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GFA5P8093789; Thu, 16 Mar 2017 15:10:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703161510.v2GFA5P8093789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 16 Mar 2017 15:10:05 +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: r315415 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 15:10:06 -0000 Author: pfg Date: Thu Mar 16 15:10:04 2017 New Revision: 315415 URL: https://svnweb.freebsd.org/changeset/base/315415 Log: MFC r315187: libc: mall cleanup. Let calloc(3) do the multiplication. Modified: stable/10/lib/libc/stdlib/getenv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/getenv.c ============================================================================== --- stable/10/lib/libc/stdlib/getenv.c Thu Mar 16 15:03:53 2017 (r315414) +++ stable/10/lib/libc/stdlib/getenv.c Thu Mar 16 15:10:04 2017 (r315415) @@ -342,7 +342,7 @@ __build_env(void) envVarsSize = envVarsTotal * 2; /* Create new environment. */ - envVars = calloc(1, sizeof (*envVars) * envVarsSize); + envVars = calloc(envVarsSize, sizeof(*envVars)); if (envVars == NULL) goto Failure; From owner-svn-src-stable-10@freebsd.org Thu Mar 16 15:43:33 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD38FD0FCF8; Thu, 16 Mar 2017 15:43:33 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 801CC1962; Thu, 16 Mar 2017 15:43:33 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GFhWmL010142; Thu, 16 Mar 2017 15:43:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GFhWWb010140; Thu, 16 Mar 2017 15:43:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201703161543.v2GFhWWb010140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 16 Mar 2017 15:43:32 +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: r315417 - stable/10/sys/dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 15:43:33 -0000 Author: ian Date: Thu Mar 16 15:43:32 2017 New Revision: 315417 URL: https://svnweb.freebsd.org/changeset/base/315417 Log: MFC r314918, r314919: Add the pnp id for a Wacom 'WACF00e' tablet. Update the comment for the Wacom WACF00e to make it clear it's not an accidental duplicate of WACF004. PR: 217306 Modified: stable/10/sys/dev/uart/uart_bus_acpi.c stable/10/sys/dev/uart/uart_bus_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/uart/uart_bus_acpi.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_acpi.c Thu Mar 16 15:13:28 2017 (r315416) +++ stable/10/sys/dev/uart/uart_bus_acpi.c Thu Mar 16 15:43:32 2017 (r315417) @@ -64,6 +64,7 @@ static struct isa_pnp_id acpi_ns8250_ids {0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */ {0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */ {0x04f0235c, "Wacom Tablet PC Screen"}, /* WACF004 */ + {0x0ef0235c, "Wacom Tablet PC Screen 00e"}, /* WACF00e */ {0xe502aa1a, "Wacom Tablet at FuS Lifebook T"}, /* FUJ02E5 */ {0} }; Modified: stable/10/sys/dev/uart/uart_bus_isa.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_isa.c Thu Mar 16 15:13:28 2017 (r315416) +++ stable/10/sys/dev/uart/uart_bus_isa.c Thu Mar 16 15:43:32 2017 (r315417) @@ -142,7 +142,8 @@ static struct isa_pnp_id isa_ns8250_ids[ {0x90307256, NULL}, /* USR3090 - USR ? */ {0x70917256, NULL}, /* USR9170 - U.S. Robotics 56K FAX INT */ {0x90917256, NULL}, /* USR9190 - USR 56k Voice INT */ - {0x04f0235c, NULL}, /* WACF004 - Wacom Tablet PC Screen*/ + {0x04f0235c, NULL}, /* WACF004 - Wacom Tablet PC Screen */ + {0x0ef0235c, NULL}, /* WACF00e - Wacom Tablet PC Screen 00e */ {0x0300695c, NULL}, /* WCI0003 - Fax/Voice/Modem/Speakphone/Asvd */ {0x01a0896a, NULL}, /* ZTIA001 - Zoom Internal V90 Faxmodem */ {0x61f7896a, NULL}, /* ZTIF761 - Zoom ComStar 33.6 */ From owner-svn-src-stable-10@freebsd.org Thu Mar 16 17:00:39 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 514C7D0E82F; Thu, 16 Mar 2017 17:00:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (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 1C8BA1AC1; Thu, 16 Mar 2017 17:00:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id m5so6718587pgk.3; Thu, 16 Mar 2017 10:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zv+VZoreKl0ROdWjXYsTjB4EHBOIvdxJjpOmbcbqwr4=; b=k1G0HQRHsnUimaWU/wiCOpvBxDvgcEbmVEbva2FK9t6fWGodDa7nyr5YqqLE5LsJuG ZYeV5bumNCaYUgnDeRE70M9CFK5elVecV7b8nHSdTCW5XZs7DlAgW6e0a/KIosDyE/x2 w9PSNVjw07mn6PBUXSeUYjFmLNWZaDZgzUpWEMBpZ9X/MxrB8yYvSLwfLx/bZPRNyKCH DJua/+DzDrUH6mh6F7JE1/qGpSqnemKuK0dmZGjJvYc+cO2KATW+JNS6qvQlYqL+Ri4U P0fkUIsjGFSu5qnQROc92vDYyC5M+1qBzq/kzE91hFwDih7mKfdM6JsDSoIr/RDIp+U8 wAAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zv+VZoreKl0ROdWjXYsTjB4EHBOIvdxJjpOmbcbqwr4=; b=BaNTTX6cBDUlVRgZ5CsDFOtRulfFq/EnHQ0p/d7zg6XZinQ+LCsBCGDGCDcVRl4kHG /pUX43soNjhevEe1RfDNrYxCARXW8eZv3HXgIfVc2Pt7DDFHJYsBnAzM9mZew72ntYFi B9Vuk1HHVNs5lmIfhWYOASDn+sBtcIgB0QQ6D86nRyoQmvcqEZi3yRgl95RZCorCC+Ps GjAZUnGvr/aThhR6hxmGiL39ZBbbtm+jtORlxLvgcJiqqNJuG0jXCoSmc3MXVBiowIw2 2kPV2Zp/6DwejPFlCcj6cvAu8Y8kF45syS2gqJUCY5NasKZS6SNPp5Gqx3ricPbe9MSW 9q8w== X-Gm-Message-State: AFeK/H3ZNk7KvZ6yUDj/GXk79do20bIMBqG2RUthK3+g9By21ub0E9Q1pmOsX2f4UO5iig== X-Received: by 10.98.65.211 with SMTP id g80mr11429904pfd.187.1489683638161; Thu, 16 Mar 2017 10:00:38 -0700 (PDT) Received: from [192.168.50.243] (50-251-209-113-static.hfc.comcastbusiness.net. [50.251.209.113]) by smtp.gmail.com with ESMTPSA id x71sm10659944pfd.58.2017.03.16.10.00.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Mar 2017 10:00:37 -0700 (PDT) Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv From: Ngie Cooper X-Mailer: iPhone Mail (14D27) In-Reply-To: Date: Thu, 16 Mar 2017 10:00:34 -0700 Cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: <0E58B9FA-C271-44CB-90E7-AE14301EEF03@gmail.com> References: <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com> <201703161409.v2GE9tx0088345@slippy.cwsent.com> To: Eric Joyner Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 17:00:39 -0000 > On Mar 16, 2017, at 09:29, Eric Joyner wrote: >=20 > I'm looking at this now. >=20 > Cy, in your case it sounds like the "device ixgbe" option is broken. I'll w= ork on getting that to build again. >=20 > The LINT build error looks like a netmap linking issue (probably due to Je= b moving/copying netmap stuff into the driver folder), so that'll be fun to r= oot cause. Hi Eric, One sandtrap to be aware of is r307394 (and corresponding commits) not b= eing MFCed, along with a host of PCI-IOV, etc changes not being easily backp= ortable. If you can, look for commits from me in the r29xxxx series citing ix_crc= strip (it was a backport from bz@ to unbreak LINT on head that also fixed st= able/10). Thanks! -Ngie > On Thu, Mar 16, 2017 at 7:10 AM Cy Schubert wro= te: > In message <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com>, "Ngie Cooper > (yane > urabeya)" writes: > > > > --Apple-Mail=3D_BD9D96B3-A5E1-4DF6-8A1A-EEC15F03AFC5 > > Content-Transfer-Encoding: quoted-printable > > Content-Type: text/plain; > > charset=3Dus-ascii > > > > > > > On Mar 15, 2017, at 14:20, Eric Joyner wrote: > > >=3D20 > > > Author: erj > > > Date: Wed Mar 15 21:20:17 2017 > > > New Revision: 315333 > > > URL: https://svnweb.freebsd.org/changeset/base/315333 > > >=3D20 > > > Log: > > > ixgbe(4): Update to 3.2.11-k > > >=3D20 > > > Includes: > > >=3D20 > > > 1. Support for X553 (Denverton) Ethernet devices. > > > 2. Initialization code refactoring. > > > 3. ixgbe-specific netmap code moved to ixgbe folder > > > (but not removed from dev/netmap/). > > > 4. VF driver full split. Some cleanup can be had due to redundant =3D= > > code, > > > but this split goes inline with the refactoring. > > >=3D20 > > > NOTE: This is a direct commit to stable/10. Newer branches will =3D > > receive an > > > iflib-converted version of ixgbe, with these updates included, =3D > > instead. > > >=3D20 > > > Differential Revision: https://reviews.freebsd.org/D9310 > > > Submitted by: Jeb Cramer (jeb.j.cramer@intel.com) > > > Tested by: Jeffrey Pieper (jeffrey.e.pieper@intel.com) > > > Sponsored by: Intel Corporation > > > > Hi Eric, > > This commit broke amd64/LINT, further (there are other issues =3D > > preventing it from passing): =3D > > https://ci.freebsd.org/job/FreeBSD-stable-10-amd64-LINT/543/console . >=20 > It also broke buildkernel while building the ixgbe module in my > stable10/amd64 VM. >=20 >=20 > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org >=20 > The need of the many outweighs the greed of the few. >=20 >=20 From owner-svn-src-stable-10@freebsd.org Thu Mar 16 17:02:04 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 192CAD0EA00; Thu, 16 Mar 2017 17:02:04 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-ot0-f169.google.com (mail-ot0-f169.google.com [74.125.82.169]) (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 D9F6E1E4F; Thu, 16 Mar 2017 17:02:03 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mail-ot0-f169.google.com with SMTP id x37so62949429ota.2; Thu, 16 Mar 2017 10:02:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VSmAkAYpsjgQTI86X6QpVmh8iGfIvxtcRqg7uJdPkJE=; b=Qixd18tHHjmXlZ12owhl5WNq+mBuMIw9GmVdnXhL9oMHuE4fjkEknyj/pqBU3hnxbY 9Ur+LvTKJUSF020gLh1U/6pXkROL2wGNvNdumXTJGNCGsZLPfXtiZDAyfMUhUf5Ft/KZ 19+fN9q+gr1edYrcEBVggfEAaCMkHPxn5FVJuRaySGPQiw5p1XMnHU9+sd3J8O5aLUxf pI5Knhs7Ie63bhuAxerIkuip502/tA0kqaBDOFGwSI2SNufApGP7B8dGZG+HQ47d/eAN hc02uXesmt5An/FG1ox5EhFExrniGV4ypZStRxC6YHIZftBhNIoFKQTPuBYUTCTu4Onw 8rVA== X-Gm-Message-State: AFeK/H3sD94xKQZkTX7Nd0bFPJ6fWn3ng1jPWK0+RsLoeY2OR36Y801PPQiJfBZC/wSJJg== X-Received: by 10.157.60.123 with SMTP id j56mr5403158ote.235.1489681777320; Thu, 16 Mar 2017 09:29:37 -0700 (PDT) Received: from mail-ot0-f173.google.com (mail-ot0-f173.google.com. [74.125.82.173]) by smtp.gmail.com with ESMTPSA id x143sm2289294oia.26.2017.03.16.09.29.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Mar 2017 09:29:37 -0700 (PDT) Received: by mail-ot0-f173.google.com with SMTP id 19so61882106oti.0; Thu, 16 Mar 2017 09:29:36 -0700 (PDT) X-Received: by 10.157.11.28 with SMTP id a28mr5915219ota.121.1489681776823; Thu, 16 Mar 2017 09:29:36 -0700 (PDT) MIME-Version: 1.0 References: <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com> <201703161409.v2GE9tx0088345@slippy.cwsent.com> In-Reply-To: <201703161409.v2GE9tx0088345@slippy.cwsent.com> From: Eric Joyner Date: Thu, 16 Mar 2017 16:29:26 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv To: Cy Schubert , "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 17:02:04 -0000 I'm looking at this now. Cy, in your case it sounds like the "device ixgbe" option is broken. I'll work on getting that to build again. The LINT build error looks like a netmap linking issue (probably due to Jeb moving/copying netmap stuff into the driver folder), so that'll be fun to root cause. - Eric On Thu, Mar 16, 2017 at 7:10 AM Cy Schubert wrote: In message <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com>, "Ngie Cooper (yane urabeya)" writes: > > --Apple-Mail=_BD9D96B3-A5E1-4DF6-8A1A-EEC15F03AFC5 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; > charset=us-ascii > > > > On Mar 15, 2017, at 14:20, Eric Joyner wrote: > >=20 > > Author: erj > > Date: Wed Mar 15 21:20:17 2017 > > New Revision: 315333 > > URL: https://svnweb.freebsd.org/changeset/base/315333 > >=20 > > Log: > > ixgbe(4): Update to 3.2.11-k > >=20 > > Includes: > >=20 > > 1. Support for X553 (Denverton) Ethernet devices. > > 2. Initialization code refactoring. > > 3. ixgbe-specific netmap code moved to ixgbe folder > > (but not removed from dev/netmap/). > > 4. VF driver full split. Some cleanup can be had due to redundant = > code, > > but this split goes inline with the refactoring. > >=20 > > NOTE: This is a direct commit to stable/10. Newer branches will = > receive an > > iflib-converted version of ixgbe, with these updates included, = > instead. > >=20 > > Differential Revision: https://reviews.freebsd.org/D9310 > > Submitted by: Jeb Cramer (jeb.j.cramer@intel.com) > > Tested by: Jeffrey Pieper (jeffrey.e.pieper@intel.com) > > Sponsored by: Intel Corporation > > Hi Eric, > This commit broke amd64/LINT, further (there are other issues = > preventing it from passing): = > https://ci.freebsd.org/job/FreeBSD-stable-10-amd64-LINT/543/console . It also broke buildkernel while building the ixgbe module in my stable10/amd64 VM. -- 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-stable-10@freebsd.org Thu Mar 16 18:59:50 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17D4ED0F23C; Thu, 16 Mar 2017 18:59:50 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-ot0-f177.google.com (mail-ot0-f177.google.com [74.125.82.177]) (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 D7D9E1270; Thu, 16 Mar 2017 18:59:49 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mail-ot0-f177.google.com with SMTP id 19so67121475oti.0; Thu, 16 Mar 2017 11:59:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QISIkWLNuQDNHyORyBCvdA+aX55l0u06accpeilIufs=; b=c7Q9MjT3M/99EqJw8YgiyxjXEP8cECuLg+mz4gbZtida8VjE1WYdek816YhcnWNdvv GUolhB3+dgLElEFvIBsuFyGTayRwMaHULkve8OzKHKwEpzUt+wGsinwSsREkjjovVT7j Zvkyqi7jEJkS191AxDTkb4MgswEcito00Tl/jdZwQd/5bbW6PTL0CKTZyDdoNSibNNqw cv65FN9hi77LCQZneZ2MX4PAk77svfOSHqiDXgwlZ+tHyEb+CrNS8003cBsmyGl9m0Ca Q957RkLelifgzW6B41Pl4PX1BuHiX7TE060IsaWp6Wb8b63U23LdLbDxKJuxhvI7xm4Z b4Ew== X-Gm-Message-State: AFeK/H2sGY4iX/pIm/E+8cwjKMOWO3eTAdJJEnzyiQPhDyHy1EWT9GkWm7M9X7ujgrmY2g== X-Received: by 10.202.63.7 with SMTP id m7mr5676811oia.170.1489690783111; Thu, 16 Mar 2017 11:59:43 -0700 (PDT) Received: from mail-ot0-f169.google.com (mail-ot0-f169.google.com. [74.125.82.169]) by smtp.gmail.com with ESMTPSA id r2sm2423004ota.21.2017.03.16.11.59.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Mar 2017 11:59:42 -0700 (PDT) Received: by mail-ot0-f169.google.com with SMTP id x37so67004428ota.2; Thu, 16 Mar 2017 11:59:42 -0700 (PDT) X-Received: by 10.202.5.4 with SMTP id 4mr5625388oif.132.1489690782344; Thu, 16 Mar 2017 11:59:42 -0700 (PDT) MIME-Version: 1.0 References: <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com> <201703161409.v2GE9tx0088345@slippy.cwsent.com> <0E58B9FA-C271-44CB-90E7-AE14301EEF03@gmail.com> In-Reply-To: <0E58B9FA-C271-44CB-90E7-AE14301EEF03@gmail.com> From: Eric Joyner Date: Thu, 16 Mar 2017 18:59:31 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv To: Ngie Cooper Cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 18:59:50 -0000 Ngie, It looks like what's in the commit is using an older version of netmap, so I think we're okay on that. I think the naming conflict may be due to splitting the ixgbe_netmap.c file into ixgbe_netmap.c & ixv_netmap.c, and not having the functions in ixv_netmap.c be renamed. I don't think the PCI_IOV stuff should be left in there. At least from what I gathered in D4767, it's probably abandoned in 10. Cy, Are you using special options in your kernel config file? "device ixgbe" works for me, so I want to assume you have "device netmap" in your config file, unless you're missing INET and/or INET6. On Thu, Mar 16, 2017 at 10:00 AM Ngie Cooper wrote: > > On Mar 16, 2017, at 09:29, Eric Joyner wrote: > > I'm looking at this now. > > Cy, in your case it sounds like the "device ixgbe" option is broken. I'll > work on getting that to build again. > > The LINT build error looks like a netmap linking issue (probably due to > Jeb moving/copying netmap stuff into the driver folder), so that'll be fun > to root cause. > > > Hi Eric, > One sandtrap to be aware of is r307394 (and corresponding commits) > not being MFCed, along with a host of PCI-IOV, etc changes not being easily > backportable. > If you can, look for commits from me in the r29xxxx series citing > ix_crcstrip (it was a backport from bz@ to unbreak LINT on head that also > fixed stable/10). > Thanks! > -Ngie > > On Thu, Mar 16, 2017 at 7:10 AM Cy Schubert > wrote: > > In message <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com>, "Ngie Cooper > (yane > urabeya)" writes: > > > > --Apple-Mail=_BD9D96B3-A5E1-4DF6-8A1A-EEC15F03AFC5 > > Content-Transfer-Encoding: quoted-printable > > Content-Type: text/plain; > > charset=us-ascii > > > > > > > On Mar 15, 2017, at 14:20, Eric Joyner wrote: > > >=20 > > > Author: erj > > > Date: Wed Mar 15 21:20:17 2017 > > > New Revision: 315333 > > > URL: https://svnweb.freebsd.org/changeset/base/315333 > > >=20 > > > Log: > > > ixgbe(4): Update to 3.2.11-k > > >=20 > > > Includes: > > >=20 > > > 1. Support for X553 (Denverton) Ethernet devices. > > > 2. Initialization code refactoring. > > > 3. ixgbe-specific netmap code moved to ixgbe folder > > > (but not removed from dev/netmap/). > > > 4. VF driver full split. Some cleanup can be had due to redundant = > > code, > > > but this split goes inline with the refactoring. > > >=20 > > > NOTE: This is a direct commit to stable/10. Newer branches will = > > receive an > > > iflib-converted version of ixgbe, with these updates included, = > > instead. > > >=20 > > > Differential Revision: https://reviews.freebsd.org/D9310 > > > Submitted by: Jeb Cramer (jeb.j.cramer@intel.com) > > > Tested by: Jeffrey Pieper (jeffrey.e.pieper@intel.com) > > > Sponsored by: Intel Corporation > > > > Hi Eric, > > This commit broke amd64/LINT, further (there are other issues = > > preventing it from passing): = > > https://ci.freebsd.org/job/FreeBSD-stable-10-amd64-LINT/543/console . > > It also broke buildkernel while building the ixgbe module in my > stable10/amd64 VM. > > > -- > 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-stable-10@freebsd.org Thu Mar 16 19:31:10 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31749D0FFB6; Thu, 16 Mar 2017 19:31:10 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD1BE1823; Thu, 16 Mar 2017 19:31:09 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp59-167-167-3.static.internode.on.net [59.167.167.3]) by vps.rulingia.com (8.15.2/8.15.2) with ESMTPS id v2GJUstk098588 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Mar 2017 06:30:59 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id v2GJUldl022231 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 17 Mar 2017 06:30:47 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id v2GJUlmb022230; Fri, 17 Mar 2017 06:30:47 +1100 (AEDT) (envelope-from peter) Date: Fri, 17 Mar 2017 06:30:47 +1100 From: Peter Jeremy To: Eric Joyner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv Message-ID: <20170316193047.GA22193@server.rulingia.com> References: <201703152120.v2FLKHUs052999@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline In-Reply-To: <201703152120.v2FLKHUs052999@repo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 19:31:10 -0000 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2017-Mar-15 21:20:17 +0000, Eric Joyner wrote: >Author: erj >Date: Wed Mar 15 21:20:17 2017 >New Revision: 315333 >URL: https://svnweb.freebsd.org/changeset/base/315333 > >Log: > ixgbe(4): Update to 3.2.11-k I'll add that this broke the ixv compile on my i386 VM: =3D=3D=3D> ixv (all) cc -O2 -pipe -DSMP -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -n= ostdinc -I/usr/src/sys/modules/ixv/../../dev/ixgbe -DHAVE_KERNEL_OPTION_HE= ADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contri= b/altq -fno-common -g -I/usr/obj/usr/src/sys/GENERIC -mno-aes -mno-avx -mn= o-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -gdwarf-2 -std= =3Diso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-dec= ls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arit= h -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmi= ssing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compa= re -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused= -function -c /usr/src/sys/modules/ixv/../../dev/ixgbe/if_ixv.c -o if_ixv= =2Eo /usr/src/sys/modules/ixv/../../dev/ixgbe/if_ixv.c:2292:3: error: incompatib= le pointer types initializing 'uint64_t *' (aka 'unsigned long long *') wit= h an expression of type 'unsigned long *' [-Werror,-Wincompatible-pointer-t= ypes] SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "no_tx_dma_setu= p", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ @/sys/sysctl.h:413:12: note: expanded from macro 'SYSCTL_ADD_UQUAD' uint64_t *__ptr =3D (ptr); \ ^ ~~~~~ 1 error generated. --=20 Peter Jeremy --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJYyufnXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0a2sP/idoV775m1bsDBWn6rVGiM/f Dn+Z/U6jIlkumY0vTSz59TwYa9wUPFsn6n+KGr23+UDTN9Uz6C29NJQ/hPTQSkNz nYFLFDgQS1E3WLVNgir2OQbG8NI8upgeienZr+1xEhNoxgg2Ow8vkBJqbhl5Y8dD 71qUAhPEXcn3sHm06C0uWwo5Rckw9RgGVWiQ2VkV+DUxiNAcre7k2bx/uIAzfznG +LG2iwAVZR7bKub9LZcrCHCsytT/pNfqBs10qF15q9HHV/X8He6VWweetyCbzZID GzcedVGcY9YyqH89Pifxnp6nn7ARNBR2UsT/KOg03ErO6OiRx34dqCvrBvB1KVJq vhJtT4GMkecEQAuTUBNYSSSPpfT0y44UsHMDwS6hq+KVXB3DAQjmf1HqpXZTsyhr BQeCEob2WNTzn0eQNbhJHCzIucjb9vUONhnRb72fq+kYD9q2EVneqRVGiJ2VB6+E C3MnERURkqi4HXLP8TB5Vhp1ExvEdkBSZGQoa91wiH6lHrIfcn4GD+O1WrisZXoe 5/YjF/M9r3XhV+OCTx2x3eiybXty2Q+k9MrUvpztSu173apEyYjHqGrhMj8AULk2 DbbIWLZBKgR3cafZF0s7THPlOjkt1FG9ov15mc/Ql1MaV49N/izNT1toNdgk/Ilf hhRxOLalXbzYJqahH2Bg =RGK9 -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS-- From owner-svn-src-stable-10@freebsd.org Thu Mar 16 20:52:11 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E251AD0FD38; Thu, 16 Mar 2017 20:52:11 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::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 B14FD787; Thu, 16 Mar 2017 20:52:11 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-it0-x22f.google.com with SMTP id m27so3060181iti.1; Thu, 16 Mar 2017 13:52:11 -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=IPnUJem/xacYoR/SXu+mA5C6SiEDNP5hoKsaZqqCK+k=; b=ZtRDE/imEiFsFbA7NkUZf8cxcorSOUjOAWmbbZ4Ve3ned5vOXCgBKd3ja7NL74FnTY uEOnX3jzdAe8vN7bQz6m3OL+TT3rNi17EPbN3K18TPFZKT4oaEjxzKbzWBjtLtvxUd5k krPEHT/xMbTXLoW5e1na2EXnwFjVpvdWHIrOVjhrKB+V+OfmE7UAlOJch87ftdF9fnGd QT20z+47MxlGhFqsE9zztPTZ7IcqIXjBgt2ZHFQn2hvAiXdkCRZrQ4OhuH6ZxCX6pvhr Z+3XJCxu3uj5Gjy2mLYPAJT0VEA/Y9xJrC5XpsFcoP2zpVW6OvAnf8HsKZ9bT7a9Pmm0 YCcw== 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=IPnUJem/xacYoR/SXu+mA5C6SiEDNP5hoKsaZqqCK+k=; b=bvewCPRCV+5pK4AvGMc4WLMHZ+/Trk3OYfJa1xdE6yzqlkgIILQaqWPDsFfIK7bR/4 hEv/Dy5XGtwOrhOaVTfmtnin0G2yuqxZ4y5unB0lorcjRkV+0EuDIbrzI7MQlXhLmzca kAoY280aNDVcwK2f6/Z4XaAsJgISZHC2BXKArSmWpitstON5N0/kBIwl5cKdLpDwNKF7 d4ADyMjBQjoa1ZD/3MTYFvL/fntPhp5wUhk5er9aEGxM6qgGcAy5SlvjN+aQy0E1U4AE CUUeV2h4c78k1uKycEQStQdwljxPtxsVsVD1zrdaRpZ4CkoYhUeZ4O2JycKKNXjUi/B3 jImg== X-Gm-Message-State: AFeK/H2HngTdCyZnfaFU1AMwW5DLIPNl7ecMXd10x/pO/KkxtlySniKprUMYdilieMXGaolXLahzGljGr9LUFg== X-Received: by 10.107.164.36 with SMTP id n36mr11396095ioe.103.1489697530982; Thu, 16 Mar 2017 13:52:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.190.71 with HTTP; Thu, 16 Mar 2017 13:52:10 -0700 (PDT) In-Reply-To: References: <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com> <201703161409.v2GE9tx0088345@slippy.cwsent.com> <0E58B9FA-C271-44CB-90E7-AE14301EEF03@gmail.com> From: Ryan Stone Date: Thu, 16 Mar 2017 16:52:10 -0400 Message-ID: Subject: Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv To: Eric Joyner Cc: Ngie Cooper , Cy Schubert , src-committers , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 20:52:12 -0000 On Thu, Mar 16, 2017 at 2:59 PM, Eric Joyner wrote: > I don't think the PCI_IOV stuff should be left in there. At least from > what I gathered in D4767, it's probably abandoned in 10. > It shouldn't hurt to leave it in, though. It should all be compiled under #ifdef PCI_IOV and just be compiled out safely. From owner-svn-src-stable-10@freebsd.org Thu Mar 16 23:08:21 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23DD6D0FE10; Thu, 16 Mar 2017 23:08:21 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD03A905; Thu, 16 Mar 2017 23:08:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GN8KQk092380; Thu, 16 Mar 2017 23:08:20 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GN8JVT092369; Thu, 16 Mar 2017 23:08:19 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201703162308.v2GN8JVT092369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 16 Mar 2017 23:08: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: r315433 - in stable/10: contrib/libarchive contrib/libarchive/cat/test contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/t... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 23:08:21 -0000 Author: mm Date: Thu Mar 16 23:08:18 2017 New Revision: 315433 URL: https://svnweb.freebsd.org/changeset/base/315433 Log: MFC r314571: Update libarchive to version 3.3.1 (and sync with latest vendor dist) Notable vendor changes: PR #501: improvements in ACL path handling PR #724: fix hang when reading malformed cpio files PR #864: fix out of bounds read with malformed GNU tar archives Documentation, style, test suite improvements and typo fixes. New options to bsdtar that enable or disable reading and/or writing of: Access Control Lists (--acls, --no-acls) Extended file flags (--fflags, --no-fflags) Extended attributes (--xattrs, --no-xattrs) Mac OS X metadata (Mac OS X only) (--mac-metadata, --no-mac-metadata) Added: stable/10/contrib/libarchive/tar/test/test_option_acls.c - copied unchanged from r314571, head/contrib/libarchive/tar/test/test_option_acls.c stable/10/contrib/libarchive/tar/test/test_option_fflags.c - copied unchanged from r314571, head/contrib/libarchive/tar/test/test_option_fflags.c stable/10/contrib/libarchive/test_utils/test_common.h - copied unchanged from r314571, head/contrib/libarchive/test_utils/test_common.h stable/10/contrib/libarchive/test_utils/test_main.c - copied unchanged from r314571, head/contrib/libarchive/test_utils/test_main.c Deleted: stable/10/contrib/libarchive/cat/test/main.c stable/10/contrib/libarchive/cpio/test/main.c stable/10/contrib/libarchive/tar/test/main.c Modified: stable/10/contrib/libarchive/NEWS stable/10/contrib/libarchive/cat/test/test.h stable/10/contrib/libarchive/cat/test/test_version.c stable/10/contrib/libarchive/cpio/cpio.c stable/10/contrib/libarchive/cpio/test/test.h stable/10/contrib/libarchive/cpio/test/test_option_version.c stable/10/contrib/libarchive/libarchive/archive.h stable/10/contrib/libarchive/libarchive/archive_check_magic.c stable/10/contrib/libarchive/libarchive/archive_digest_private.h stable/10/contrib/libarchive/libarchive/archive_entry.c stable/10/contrib/libarchive/libarchive/archive_entry.h stable/10/contrib/libarchive/libarchive/archive_entry_acl.3 stable/10/contrib/libarchive/libarchive/archive_entry_paths.3 stable/10/contrib/libarchive/libarchive/archive_entry_perms.3 stable/10/contrib/libarchive/libarchive/archive_hmac.c stable/10/contrib/libarchive/libarchive/archive_platform.h stable/10/contrib/libarchive/libarchive/archive_read_disk.3 stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_read_disk_private.h stable/10/contrib/libarchive/libarchive/archive_read_format.3 stable/10/contrib/libarchive/libarchive/archive_read_open.3 stable/10/contrib/libarchive/libarchive/archive_read_support_format_tar.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_warc.c stable/10/contrib/libarchive/libarchive/archive_write_data.3 stable/10/contrib/libarchive/libarchive/archive_write_disk.3 stable/10/contrib/libarchive/libarchive/archive_write_disk_acl.c stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_write_finish_entry.3 stable/10/contrib/libarchive/libarchive/archive_write_format.3 stable/10/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c stable/10/contrib/libarchive/libarchive/test/test.h stable/10/contrib/libarchive/libarchive/test/test_acl_nfs4.c stable/10/contrib/libarchive/libarchive/test/test_acl_pax.c stable/10/contrib/libarchive/libarchive/test/test_acl_platform_nfs4.c stable/10/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c stable/10/contrib/libarchive/libarchive/test/test_acl_posix1e.c stable/10/contrib/libarchive/libarchive/test/test_acl_text.c stable/10/contrib/libarchive/libarchive/test/test_archive_api_feature.c stable/10/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c stable/10/contrib/libarchive/libarchive/test/test_compat_star_acl.c stable/10/contrib/libarchive/libarchive/test/test_fuzz.c stable/10/contrib/libarchive/libarchive/test/test_read_disk.c stable/10/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c stable/10/contrib/libarchive/tar/bsdtar.1 stable/10/contrib/libarchive/tar/bsdtar.c stable/10/contrib/libarchive/tar/bsdtar.h stable/10/contrib/libarchive/tar/cmdline.c stable/10/contrib/libarchive/tar/read.c stable/10/contrib/libarchive/tar/test/test.h stable/10/contrib/libarchive/tar/test/test_option_nodump.c stable/10/contrib/libarchive/tar/test/test_version.c stable/10/contrib/libarchive/tar/util.c stable/10/contrib/libarchive/tar/write.c stable/10/lib/libarchive/config_freebsd.h stable/10/lib/libarchive/tests/Makefile stable/10/usr.bin/bsdcat/Makefile stable/10/usr.bin/bsdcat/tests/Makefile stable/10/usr.bin/cpio/Makefile stable/10/usr.bin/cpio/tests/Makefile stable/10/usr.bin/tar/Makefile stable/10/usr.bin/tar/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/NEWS ============================================================================== --- stable/10/contrib/libarchive/NEWS Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/NEWS Thu Mar 16 23:08:18 2017 (r315433) @@ -1,3 +1,9 @@ +Feb 26, 2017: libarchive 3.3.1 released + Security & Feature release + +Feb 19, 2017: libarchive 3.3.0 released + Security & Feature release + Jan 29, 2017: Limited NFSv4 ACL support for Mac OS (Darwin) Jan 10, 2017: POSIX.1e and NFSv4 ACL support for Solaris and derivates @@ -5,6 +11,8 @@ Jan 10, 2017: POSIX.1e and NFSv4 ACL sup Dec 27, 2016: NFSv4 ACL read and write support for pax Deprecated functions: archive_entry_acl_text(), archive_entry_acl_text_w() +Nov, 2016: libarchive is now being tested by the OSS-Fuzz project + Oct 26, 2016: Remove liblzmadec support Oct 23, 2016: libarchive 3.2.2 released Modified: stable/10/contrib/libarchive/cat/test/test.h ============================================================================== --- stable/10/contrib/libarchive/cat/test/test.h Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/cat/test/test.h Thu Mar 16 23:08:18 2017 (r315433) @@ -27,328 +27,14 @@ /* Every test program should #include "test.h" as the first thing. */ -/* - * The goal of this file (and the matching test.c) is to - * simplify the very repetitive test-*.c test programs. - */ -#if defined(HAVE_CONFIG_H) -/* Most POSIX platforms use the 'configure' script to build config.h */ -#include "config.h" -#elif defined(__FreeBSD__) -/* Building as part of FreeBSD system requires a pre-built config.h. */ -#include "config_freebsd.h" -#elif defined(_WIN32) && !defined(__CYGWIN__) -/* Win32 can't run the 'configure' script. */ -#include "config_windows.h" -#else -/* Warn if the library hasn't been (automatically or manually) configured. */ -#error Oops: No config.h and no pre-built configuration in test.h. -#endif +#define KNOWNREF "test_expand.Z.uu" +#define ENVBASE "BSDCAT" /* Prefix for environment variables. */ +#define PROGRAM "bsdcat" /* Name of program being tested. */ +#define PROGRAM_ALIAS "cat" /* Generic alias for program */ +#undef LIBRARY /* Not testing a library. */ +#undef EXTRA_DUMP /* How to dump extra data */ +#undef EXTRA_ERRNO /* How to dump errno */ +/* How to generate extra version info. */ +#define EXTRA_VERSION (systemf("%s --version", testprog) ? "" : "") -#include /* Windows requires this before sys/stat.h */ -#include - -#if HAVE_DIRENT_H -#include -#endif -#ifdef HAVE_DIRECT_H -#include -#define dirent direct -#endif -#include -#include -#ifdef HAVE_IO_H -#include -#endif -#ifdef HAVE_STDINT_H -#include -#endif -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_WINDOWS_H -#include -#endif - -/* - * System-specific tweaks. We really want to minimize these - * as much as possible, since they make it harder to understand - * the mainline code. - */ - -/* Windows (including Visual Studio and MinGW but not Cygwin) */ -#if defined(_WIN32) && !defined(__CYGWIN__) -#if !defined(__BORLANDC__) -#undef chdir -#define chdir _chdir -#define strdup _strdup -#endif -#endif - -/* Visual Studio */ -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf sprintf_s -#endif - -#if defined(__BORLANDC__) -#pragma warn -8068 /* Constant out of range in comparison. */ -#endif - -/* Haiku OS and QNX */ -#if defined(__HAIKU__) || defined(__QNXNTO__) -/* Haiku and QNX have typedefs in stdint.h (needed for int64_t) */ -#include -#endif - -/* Get a real definition for __FBSDID if we can */ -#if HAVE_SYS_CDEFS_H -#include -#endif - -/* If not, define it so as to avoid dangling semicolons. */ -#ifndef __FBSDID -#define __FBSDID(a) struct _undefined_hack -#endif - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -/* - * Redefine DEFINE_TEST for use in defining the test functions. - */ -#undef DEFINE_TEST -#define DEFINE_TEST(name) void name(void); void name(void) - -/* An implementation of the standard assert() macro */ -#define assert(e) assertion_assert(__FILE__, __LINE__, (e), #e, NULL) -/* chdir() and error if it fails */ -#define assertChdir(path) \ - assertion_chdir(__FILE__, __LINE__, path) -/* Assert two integers are the same. Reports value of each one if not. */ -#define assertEqualInt(v1,v2) \ - assertion_equal_int(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL) -/* Assert two strings are the same. Reports value of each one if not. */ -#define assertEqualString(v1,v2) \ - assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 0) -#define assertEqualUTF8String(v1,v2) \ - assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 1) -/* As above, but v1 and v2 are wchar_t * */ -#define assertEqualWString(v1,v2) \ - assertion_equal_wstring(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL) -/* As above, but raw blocks of bytes. */ -#define assertEqualMem(v1, v2, l) \ - assertion_equal_mem(__FILE__, __LINE__, (v1), #v1, (v2), #v2, (l), #l, NULL) -/* Assert that memory is full of a specified byte */ -#define assertMemoryFilledWith(v1, l, b) \ - assertion_memory_filled_with(__FILE__, __LINE__, (v1), #v1, (l), #l, (b), #b, NULL) -/* Assert two files are the same. */ -#define assertEqualFile(f1, f2) \ - assertion_equal_file(__FILE__, __LINE__, (f1), (f2)) -/* Assert that a file is empty. */ -#define assertEmptyFile(pathname) \ - assertion_empty_file(__FILE__, __LINE__, (pathname)) -/* Assert that a file is not empty. */ -#define assertNonEmptyFile(pathname) \ - assertion_non_empty_file(__FILE__, __LINE__, (pathname)) -#define assertFileAtime(pathname, sec, nsec) \ - assertion_file_atime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileAtimeRecent(pathname) \ - assertion_file_atime_recent(__FILE__, __LINE__, pathname) -#define assertFileBirthtime(pathname, sec, nsec) \ - assertion_file_birthtime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileBirthtimeRecent(pathname) \ - assertion_file_birthtime_recent(__FILE__, __LINE__, pathname) -/* Assert that a file exists; supports printf-style arguments. */ -#define assertFileExists(pathname) \ - assertion_file_exists(__FILE__, __LINE__, pathname) -/* Assert that a file exists. */ -#define assertFileNotExists(pathname) \ - assertion_file_not_exists(__FILE__, __LINE__, pathname) -/* Assert that file contents match a string. */ -#define assertFileContents(data, data_size, pathname) \ - assertion_file_contents(__FILE__, __LINE__, data, data_size, pathname) -/* Verify that a file does not contain invalid strings */ -#define assertFileContainsNoInvalidStrings(pathname, strings) \ - assertion_file_contains_no_invalid_strings(__FILE__, __LINE__, pathname, strings) -#define assertFileMtime(pathname, sec, nsec) \ - assertion_file_mtime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileMtimeRecent(pathname) \ - assertion_file_mtime_recent(__FILE__, __LINE__, pathname) -#define assertFileNLinks(pathname, nlinks) \ - assertion_file_nlinks(__FILE__, __LINE__, pathname, nlinks) -#define assertFileSize(pathname, size) \ - assertion_file_size(__FILE__, __LINE__, pathname, size) -#define assertFileMode(pathname, mode) \ - assertion_file_mode(__FILE__, __LINE__, pathname, mode) -#define assertTextFileContents(text, pathname) \ - assertion_text_file_contents(__FILE__, __LINE__, text, pathname) -#define assertFileContainsLinesAnyOrder(pathname, lines) \ - assertion_file_contains_lines_any_order(__FILE__, __LINE__, pathname, lines) -#define assertIsDir(pathname, mode) \ - assertion_is_dir(__FILE__, __LINE__, pathname, mode) -#define assertIsHardlink(path1, path2) \ - assertion_is_hardlink(__FILE__, __LINE__, path1, path2) -#define assertIsNotHardlink(path1, path2) \ - assertion_is_not_hardlink(__FILE__, __LINE__, path1, path2) -#define assertIsReg(pathname, mode) \ - assertion_is_reg(__FILE__, __LINE__, pathname, mode) -#define assertIsSymlink(pathname, contents) \ - assertion_is_symlink(__FILE__, __LINE__, pathname, contents) -/* Create a directory, report error if it fails. */ -#define assertMakeDir(dirname, mode) \ - assertion_make_dir(__FILE__, __LINE__, dirname, mode) -#define assertMakeFile(path, mode, contents) \ - assertion_make_file(__FILE__, __LINE__, path, mode, -1, contents) -#define assertMakeBinFile(path, mode, csize, contents) \ - assertion_make_file(__FILE__, __LINE__, path, mode, csize, contents) -#define assertMakeHardlink(newfile, oldfile) \ - assertion_make_hardlink(__FILE__, __LINE__, newfile, oldfile) -#define assertMakeSymlink(newfile, linkto) \ - assertion_make_symlink(__FILE__, __LINE__, newfile, linkto) -#define assertNodump(path) \ - assertion_nodump(__FILE__, __LINE__, path) -#define assertUmask(mask) \ - assertion_umask(__FILE__, __LINE__, mask) -#define assertUtimes(pathname, atime, atime_nsec, mtime, mtime_nsec) \ - assertion_utimes(__FILE__, __LINE__, pathname, atime, atime_nsec, mtime, mtime_nsec) - -/* - * This would be simple with C99 variadic macros, but I don't want to - * require that. Instead, I insert a function call before each - * skipping() call to pass the file and line information down. Crude, - * but effective. - */ -#define skipping \ - skipping_setup(__FILE__, __LINE__);test_skipping - -/* Function declarations. These are defined in test_utility.c. */ -void failure(const char *fmt, ...); -int assertion_assert(const char *, int, int, const char *, void *); -int assertion_chdir(const char *, int, const char *); -int assertion_empty_file(const char *, int, const char *); -int assertion_equal_file(const char *, int, const char *, const char *); -int assertion_equal_int(const char *, int, long long, const char *, long long, const char *, void *); -int assertion_equal_mem(const char *, int, const void *, const char *, const void *, const char *, size_t, const char *, void *); -int assertion_memory_filled_with(const char *, int, const void *, const char *, size_t, const char *, char, const char *, void *); -int assertion_equal_string(const char *, int, const char *v1, const char *, const char *v2, const char *, void *, int); -int assertion_equal_wstring(const char *, int, const wchar_t *v1, const char *, const wchar_t *v2, const char *, void *); -int assertion_file_atime(const char *, int, const char *, long, long); -int assertion_file_atime_recent(const char *, int, const char *); -int assertion_file_birthtime(const char *, int, const char *, long, long); -int assertion_file_birthtime_recent(const char *, int, const char *); -int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); -int assertion_file_contains_no_invalid_strings(const char *, int, const char *, const char **); -int assertion_file_contents(const char *, int, const void *, int, const char *); -int assertion_file_exists(const char *, int, const char *); -int assertion_file_mode(const char *, int, const char *, int); -int assertion_file_mtime(const char *, int, const char *, long, long); -int assertion_file_mtime_recent(const char *, int, const char *); -int assertion_file_nlinks(const char *, int, const char *, int); -int assertion_file_not_exists(const char *, int, const char *); -int assertion_file_size(const char *, int, const char *, long); -int assertion_is_dir(const char *, int, const char *, int); -int assertion_is_hardlink(const char *, int, const char *, const char *); -int assertion_is_not_hardlink(const char *, int, const char *, const char *); -int assertion_is_reg(const char *, int, const char *, int); -int assertion_is_symlink(const char *, int, const char *, const char *); -int assertion_make_dir(const char *, int, const char *, int); -int assertion_make_file(const char *, int, const char *, int, int, const void *); -int assertion_make_hardlink(const char *, int, const char *newpath, const char *); -int assertion_make_symlink(const char *, int, const char *newpath, const char *); -int assertion_nodump(const char *, int, const char *); -int assertion_non_empty_file(const char *, int, const char *); -int assertion_text_file_contents(const char *, int, const char *buff, const char *f); -int assertion_umask(const char *, int, int); -int assertion_utimes(const char *, int, const char *, long, long, long, long ); - -void skipping_setup(const char *, int); -void test_skipping(const char *fmt, ...); - -/* Like sprintf, then system() */ -int systemf(const char * fmt, ...); - -/* Delay until time() returns a value after this. */ -void sleepUntilAfter(time_t); - -/* Return true if this platform can create symlinks. */ -int canSymlink(void); - -/* Return true if this platform can run the "bzip2" program. */ -int canBzip2(void); - -/* Return true if this platform can run the "grzip" program. */ -int canGrzip(void); - -/* Return true if this platform can run the "gzip" program. */ -int canGzip(void); - -/* Return true if this platform can run the specified command. */ -int canRunCommand(const char *); - -/* Return true if this platform can run the "lrzip" program. */ -int canLrzip(void); - -/* Return true if this platform can run the "lz4" program. */ -int canLz4(void); - -/* Return true if this platform can run the "lzip" program. */ -int canLzip(void); - -/* Return true if this platform can run the "lzma" program. */ -int canLzma(void); - -/* Return true if this platform can run the "lzop" program. */ -int canLzop(void); - -/* Return true if this platform can run the "xz" program. */ -int canXz(void); - -/* Return true if this filesystem can handle nodump flags. */ -int canNodump(void); - -/* Return true if the file has large i-node number(>0xffffffff). */ -int is_LargeInode(const char *); - -/* Suck file into string allocated via malloc(). Call free() when done. */ -/* Supports printf-style args: slurpfile(NULL, "%s/myfile", refdir); */ -char *slurpfile(size_t *, const char *fmt, ...); - -/* Dump block of bytes to a file. */ -void dumpfile(const char *filename, void *, size_t); - -/* Extracts named reference file to the current directory. */ -void extract_reference_file(const char *); -/* Copies named reference file to the current directory. */ -void copy_reference_file(const char *); - -/* Extracts a list of files to the current directory. - * List must be NULL terminated. - */ -void extract_reference_files(const char **); - -/* Subtract umask from mode */ -mode_t umasked(mode_t expected_mode); - -/* Path to working directory for current test */ -extern const char *testworkdir; - -/* - * Special interfaces for program test harness. - */ - -/* Pathname of exe to be tested. */ -extern const char *testprogfile; -/* Name of exe to use in printf-formatted command strings. */ -/* On Windows, this includes leading/trailing quotes. */ -extern const char *testprog; - -#ifdef USE_DMALLOC -#include -#endif +#include "test_common.h" Modified: stable/10/contrib/libarchive/cat/test/test_version.c ============================================================================== --- stable/10/contrib/libarchive/cat/test/test_version.c Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/cat/test/test_version.c Thu Mar 16 23:08:18 2017 (r315433) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003-2007 Tim Kientzle + * Copyright (c) 2003-2017 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,68 +30,5 @@ DEFINE_TEST(test_version) { - int r; - char *p, *q; - size_t s; - - - r = systemf("%s --version >version.stdout 2>version.stderr", testprog); - failure("Unable to run %s --version", testprog); - if (!assert(r == 0)) - return; - - /* --version should generate nothing to stdout. */ - assertEmptyFile("version.stderr"); - /* Verify format of version message. */ - q = p = slurpfile(&s, "version.stdout"); - /* Version message should start with name of program, then space. */ - assert(s > 6); - failure("Version must start with 'bsdcat': ``%s''", p); - if (!assertEqualMem(q, "bsdcat ", 7)) - return; - q += 7; s -= 7; - /* Version number is a series of digits and periods. */ - while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) { - ++q; - --s; - } - /* Version number terminated by space. */ - failure("No space after bsdcat version: ``%s''", p); - assert(s > 1); - /* Skip a single trailing a,b,c, or d. */ - if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') - ++q; - failure("No space after bsdcat version: ``%s''", p); - assert(*q == ' '); - ++q; --s; - /* Separator. */ - failure("No `-' between bsdcat and libarchive versions: ``%s''", p); - assertEqualMem(q, "- ", 2); - q += 2; s -= 2; - /* libarchive name and version number */ - failure("Not long enough for libarchive version: ``%s''", p); - assert(s > 11); - failure("Libarchive version must start with `libarchive': ``%s''", p); - assertEqualMem(q, "libarchive ", 11); - q += 11; s -= 11; - /* Version number is a series of digits and periods. */ - while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) { - ++q; - --s; - } - /* Skip a single trailing a,b,c, or d. */ - if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') - ++q; - /* Skip arbitrary third-party version numbers. */ - while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || isalnum(*q))) { - ++q; - --s; - } - /* All terminated by end-of-line. */ - assert(s >= 1); - /* Skip an optional CR character (e.g., Windows) */ - failure("Version output must end with \\n or \\r\\n"); - if (*q == '\r') { ++q; --s; } - assertEqualMem(q, "\n", 1); - free(p); + assertVersion(testprog, "bsdcat"); } Modified: stable/10/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/10/contrib/libarchive/cpio/cpio.c Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/cpio/cpio.c Thu Mar 16 23:08:18 2017 (r315433) @@ -108,22 +108,22 @@ static int entry_to_archive(struct cpio static int file_to_archive(struct cpio *, const char *); static void free_cache(struct name_cache *cache); static void list_item_verbose(struct cpio *, struct archive_entry *); -static void long_help(void); +static void long_help(void) __LA_DEAD; static const char *lookup_gname(struct cpio *, gid_t gid); static int lookup_gname_helper(struct cpio *, const char **name, id_t gid); static const char *lookup_uname(struct cpio *, uid_t uid); static int lookup_uname_helper(struct cpio *, const char **name, id_t uid); -static void mode_in(struct cpio *); -static void mode_list(struct cpio *); +static void mode_in(struct cpio *) __LA_DEAD; +static void mode_list(struct cpio *) __LA_DEAD; static void mode_out(struct cpio *); static void mode_pass(struct cpio *, const char *); static const char *remove_leading_slash(const char *); static int restore_time(struct cpio *, struct archive_entry *, const char *, int fd); -static void usage(void); -static void version(void); +static void usage(void) __LA_DEAD; +static void version(void) __LA_DEAD; static const char * passphrase_callback(struct archive *, void *); static void passphrase_free(char *); Modified: stable/10/contrib/libarchive/cpio/test/test.h ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test.h Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/cpio/test/test.h Thu Mar 16 23:08:18 2017 (r315433) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2006 Tim Kientzle + * Copyright (c) 2003-2017 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,328 +27,14 @@ /* Every test program should #include "test.h" as the first thing. */ -/* - * The goal of this file (and the matching test.c) is to - * simplify the very repetitive test-*.c test programs. - */ -#if defined(HAVE_CONFIG_H) -/* Most POSIX platforms use the 'configure' script to build config.h */ -#include "config.h" -#elif defined(__FreeBSD__) -/* Building as part of FreeBSD system requires a pre-built config.h. */ -#include "config_freebsd.h" -#elif defined(_WIN32) && !defined(__CYGWIN__) -/* Win32 can't run the 'configure' script. */ -#include "config_windows.h" -#else -/* Warn if the library hasn't been (automatically or manually) configured. */ -#error Oops: No config.h and no pre-built configuration in test.h. -#endif - -#include /* Windows requires this before sys/stat.h */ -#include - -#if HAVE_DIRENT_H -#include -#endif -#ifdef HAVE_DIRECT_H -#include -#define dirent direct -#endif -#include -#include -#ifdef HAVE_IO_H -#include -#endif -#ifdef HAVE_STDINT_H -#include -#endif -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_WINDOWS_H -#include -#endif - -/* - * System-specific tweaks. We really want to minimize these - * as much as possible, since they make it harder to understand - * the mainline code. - */ - -/* Windows (including Visual Studio and MinGW but not Cygwin) */ -#if defined(_WIN32) && !defined(__CYGWIN__) -#if !defined(__BORLANDC__) -#undef chdir -#define chdir _chdir -#define strdup _strdup -#endif -#endif - -/* Visual Studio */ -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf sprintf_s -#endif - -#if defined(__BORLANDC__) -#pragma warn -8068 /* Constant out of range in comparison. */ -#endif - -/* Haiku OS and QNX */ -#if defined(__HAIKU__) || defined(__QNXNTO__) -/* Haiku and QNX have typedefs in stdint.h (needed for int64_t) */ -#include -#endif - -/* Get a real definition for __FBSDID if we can */ -#if HAVE_SYS_CDEFS_H -#include -#endif - -/* If not, define it so as to avoid dangling semicolons. */ -#ifndef __FBSDID -#define __FBSDID(a) struct _undefined_hack -#endif - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -/* - * Redefine DEFINE_TEST for use in defining the test functions. - */ -#undef DEFINE_TEST -#define DEFINE_TEST(name) void name(void); void name(void) - -/* An implementation of the standard assert() macro */ -#define assert(e) assertion_assert(__FILE__, __LINE__, (e), #e, NULL) -/* chdir() and error if it fails */ -#define assertChdir(path) \ - assertion_chdir(__FILE__, __LINE__, path) -/* Assert two integers are the same. Reports value of each one if not. */ -#define assertEqualInt(v1,v2) \ - assertion_equal_int(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL) -/* Assert two strings are the same. Reports value of each one if not. */ -#define assertEqualString(v1,v2) \ - assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 0) -#define assertEqualUTF8String(v1,v2) \ - assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 1) -/* As above, but v1 and v2 are wchar_t * */ -#define assertEqualWString(v1,v2) \ - assertion_equal_wstring(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL) -/* As above, but raw blocks of bytes. */ -#define assertEqualMem(v1, v2, l) \ - assertion_equal_mem(__FILE__, __LINE__, (v1), #v1, (v2), #v2, (l), #l, NULL) -/* Assert that memory is full of a specified byte */ -#define assertMemoryFilledWith(v1, l, b) \ - assertion_memory_filled_with(__FILE__, __LINE__, (v1), #v1, (l), #l, (b), #b, NULL) -/* Assert two files are the same. */ -#define assertEqualFile(f1, f2) \ - assertion_equal_file(__FILE__, __LINE__, (f1), (f2)) -/* Assert that a file is empty. */ -#define assertEmptyFile(pathname) \ - assertion_empty_file(__FILE__, __LINE__, (pathname)) -/* Assert that a file is not empty. */ -#define assertNonEmptyFile(pathname) \ - assertion_non_empty_file(__FILE__, __LINE__, (pathname)) -#define assertFileAtime(pathname, sec, nsec) \ - assertion_file_atime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileAtimeRecent(pathname) \ - assertion_file_atime_recent(__FILE__, __LINE__, pathname) -#define assertFileBirthtime(pathname, sec, nsec) \ - assertion_file_birthtime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileBirthtimeRecent(pathname) \ - assertion_file_birthtime_recent(__FILE__, __LINE__, pathname) -/* Assert that a file exists; supports printf-style arguments. */ -#define assertFileExists(pathname) \ - assertion_file_exists(__FILE__, __LINE__, pathname) -/* Assert that a file exists. */ -#define assertFileNotExists(pathname) \ - assertion_file_not_exists(__FILE__, __LINE__, pathname) -/* Assert that file contents match a string. */ -#define assertFileContents(data, data_size, pathname) \ - assertion_file_contents(__FILE__, __LINE__, data, data_size, pathname) -/* Verify that a file does not contain invalid strings */ -#define assertFileContainsNoInvalidStrings(pathname, strings) \ - assertion_file_contains_no_invalid_strings(__FILE__, __LINE__, pathname, strings) -#define assertFileMtime(pathname, sec, nsec) \ - assertion_file_mtime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileMtimeRecent(pathname) \ - assertion_file_mtime_recent(__FILE__, __LINE__, pathname) -#define assertFileNLinks(pathname, nlinks) \ - assertion_file_nlinks(__FILE__, __LINE__, pathname, nlinks) -#define assertFileSize(pathname, size) \ - assertion_file_size(__FILE__, __LINE__, pathname, size) -#define assertFileMode(pathname, mode) \ - assertion_file_mode(__FILE__, __LINE__, pathname, mode) -#define assertTextFileContents(text, pathname) \ - assertion_text_file_contents(__FILE__, __LINE__, text, pathname) -#define assertFileContainsLinesAnyOrder(pathname, lines) \ - assertion_file_contains_lines_any_order(__FILE__, __LINE__, pathname, lines) -#define assertIsDir(pathname, mode) \ - assertion_is_dir(__FILE__, __LINE__, pathname, mode) -#define assertIsHardlink(path1, path2) \ - assertion_is_hardlink(__FILE__, __LINE__, path1, path2) -#define assertIsNotHardlink(path1, path2) \ - assertion_is_not_hardlink(__FILE__, __LINE__, path1, path2) -#define assertIsReg(pathname, mode) \ - assertion_is_reg(__FILE__, __LINE__, pathname, mode) -#define assertIsSymlink(pathname, contents) \ - assertion_is_symlink(__FILE__, __LINE__, pathname, contents) -/* Create a directory, report error if it fails. */ -#define assertMakeDir(dirname, mode) \ - assertion_make_dir(__FILE__, __LINE__, dirname, mode) -#define assertMakeFile(path, mode, contents) \ - assertion_make_file(__FILE__, __LINE__, path, mode, -1, contents) -#define assertMakeBinFile(path, mode, csize, contents) \ - assertion_make_file(__FILE__, __LINE__, path, mode, csize, contents) -#define assertMakeHardlink(newfile, oldfile) \ - assertion_make_hardlink(__FILE__, __LINE__, newfile, oldfile) -#define assertMakeSymlink(newfile, linkto) \ - assertion_make_symlink(__FILE__, __LINE__, newfile, linkto) -#define assertNodump(path) \ - assertion_nodump(__FILE__, __LINE__, path) -#define assertUmask(mask) \ - assertion_umask(__FILE__, __LINE__, mask) -#define assertUtimes(pathname, atime, atime_nsec, mtime, mtime_nsec) \ - assertion_utimes(__FILE__, __LINE__, pathname, atime, atime_nsec, mtime, mtime_nsec) - -/* - * This would be simple with C99 variadic macros, but I don't want to - * require that. Instead, I insert a function call before each - * skipping() call to pass the file and line information down. Crude, - * but effective. - */ -#define skipping \ - skipping_setup(__FILE__, __LINE__);test_skipping - -/* Function declarations. These are defined in test_utility.c. */ -void failure(const char *fmt, ...); -int assertion_assert(const char *, int, int, const char *, void *); -int assertion_chdir(const char *, int, const char *); -int assertion_empty_file(const char *, int, const char *); -int assertion_equal_file(const char *, int, const char *, const char *); -int assertion_equal_int(const char *, int, long long, const char *, long long, const char *, void *); -int assertion_equal_mem(const char *, int, const void *, const char *, const void *, const char *, size_t, const char *, void *); -int assertion_memory_filled_with(const char *, int, const void *, const char *, size_t, const char *, char, const char *, void *); -int assertion_equal_string(const char *, int, const char *v1, const char *, const char *v2, const char *, void *, int); -int assertion_equal_wstring(const char *, int, const wchar_t *v1, const char *, const wchar_t *v2, const char *, void *); -int assertion_file_atime(const char *, int, const char *, long, long); -int assertion_file_atime_recent(const char *, int, const char *); -int assertion_file_birthtime(const char *, int, const char *, long, long); -int assertion_file_birthtime_recent(const char *, int, const char *); -int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); -int assertion_file_contains_no_invalid_strings(const char *, int, const char *, const char **); -int assertion_file_contents(const char *, int, const void *, int, const char *); -int assertion_file_exists(const char *, int, const char *); -int assertion_file_mode(const char *, int, const char *, int); -int assertion_file_mtime(const char *, int, const char *, long, long); -int assertion_file_mtime_recent(const char *, int, const char *); -int assertion_file_nlinks(const char *, int, const char *, int); -int assertion_file_not_exists(const char *, int, const char *); -int assertion_file_size(const char *, int, const char *, long); -int assertion_is_dir(const char *, int, const char *, int); -int assertion_is_hardlink(const char *, int, const char *, const char *); -int assertion_is_not_hardlink(const char *, int, const char *, const char *); -int assertion_is_reg(const char *, int, const char *, int); -int assertion_is_symlink(const char *, int, const char *, const char *); -int assertion_make_dir(const char *, int, const char *, int); -int assertion_make_file(const char *, int, const char *, int, int, const void *); -int assertion_make_hardlink(const char *, int, const char *newpath, const char *); -int assertion_make_symlink(const char *, int, const char *newpath, const char *); -int assertion_nodump(const char *, int, const char *); -int assertion_non_empty_file(const char *, int, const char *); -int assertion_text_file_contents(const char *, int, const char *buff, const char *f); -int assertion_umask(const char *, int, int); -int assertion_utimes(const char *, int, const char *, long, long, long, long ); - -void skipping_setup(const char *, int); -void test_skipping(const char *fmt, ...); - -/* Like sprintf, then system() */ -int systemf(const char * fmt, ...); - -/* Delay until time() returns a value after this. */ -void sleepUntilAfter(time_t); - -/* Return true if this platform can create symlinks. */ -int canSymlink(void); - -/* Return true if this platform can run the "bzip2" program. */ -int canBzip2(void); - -/* Return true if this platform can run the "grzip" program. */ -int canGrzip(void); - -/* Return true if this platform can run the "gzip" program. */ -int canGzip(void); - -/* Return true if this platform can run the specified command. */ -int canRunCommand(const char *); - -/* Return true if this platform can run the "lrzip" program. */ -int canLrzip(void); - -/* Return true if this platform can run the "lz4" program. */ -int canLz4(void); - -/* Return true if this platform can run the "lzip" program. */ -int canLzip(void); - -/* Return true if this platform can run the "lzma" program. */ -int canLzma(void); - -/* Return true if this platform can run the "lzop" program. */ -int canLzop(void); - -/* Return true if this platform can run the "xz" program. */ -int canXz(void); - -/* Return true if this filesystem can handle nodump flags. */ -int canNodump(void); - -/* Return true if the file has large i-node number(>0xffffffff). */ -int is_LargeInode(const char *); - -/* Suck file into string allocated via malloc(). Call free() when done. */ -/* Supports printf-style args: slurpfile(NULL, "%s/myfile", refdir); */ -char *slurpfile(size_t *, const char *fmt, ...); - -/* Dump block of bytes to a file. */ -void dumpfile(const char *filename, void *, size_t); - -/* Extracts named reference file to the current directory. */ -void extract_reference_file(const char *); -/* Copies named reference file to the current directory. */ -void copy_reference_file(const char *); - -/* Extracts a list of files to the current directory. - * List must be NULL terminated. - */ -void extract_reference_files(const char **); - -/* Subtract umask from mode */ -mode_t umasked(mode_t expected_mode); - -/* Path to working directory for current test */ -extern const char *testworkdir; - -/* - * Special interfaces for program test harness. - */ - -/* Pathname of exe to be tested. */ -extern const char *testprogfile; -/* Name of exe to use in printf-formatted command strings. */ -/* On Windows, this includes leading/trailing quotes. */ -extern const char *testprog; +#define KNOWNREF "test_option_f.cpio.uu" +#define ENVBASE "BSDCPIO" /* Prefix for environment variables. */ +#define PROGRAM "bsdcpio" /* Name of program being tested. */ +#define PROGRAM_ALIAS "cpio" /* Generic alias for program */ +#undef LIBRARY /* Not testing a library. */ +#undef EXTRA_DUMP /* How to dump extra data */ +#undef EXTRA_ERRNO /* How to dump errno */ +/* How to generate extra version info. */ +#define EXTRA_VERSION (systemf("%s --version", testprog) ? "" : "") -#ifdef USE_DMALLOC -#include -#endif +#include "test_common.h" Modified: stable/10/contrib/libarchive/cpio/test/test_option_version.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_version.c Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/cpio/test/test_option_version.c Thu Mar 16 23:08:18 2017 (r315433) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003-2007 Tim Kientzle + * Copyright (c) 2003-2017 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,92 +23,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD$"); - -/* - * Test that --version option works and generates reasonable output. - */ - -static void -verify(const char *p, size_t s) -{ - const char *q = p; - - /* Version message should start with name of program, then space. */ - failure("version message too short:", p); - if (!assert(s > 6)) - return; - failure("Version message should begin with 'bsdcpio': %s", p); - if (!assertEqualMem(q, "bsdcpio ", 8)) - /* If we're not testing bsdcpio, don't keep going. */ - return; - q += 8; s -= 8; - /* Version number is a series of digits and periods. */ - while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) { - ++q; - --s; - } - /* Version number terminated by space. */ - failure("Version: %s", p); - assert(s > 1); - /* Skip a single trailing a,b,c, or d. */ - if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') - ++q; - failure("Version: %s", p); - assert(*q == ' '); - ++q; --s; - /* Separator. */ - failure("Version: %s", p); - assertEqualMem(q, "- ", 2); - q += 2; s -= 2; - /* libarchive name and version number */ - assert(s > 11); - failure("Version: %s", p); - assertEqualMem(q, "libarchive ", 11); - q += 11; s -= 11; - /* Version number is a series of digits and periods. */ - while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) { - ++q; - --s; - } - /* Skip a single trailing a,b,c, or d. */ - if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') - ++q; - /* Skip arbitrary third-party version numbers. */ - while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || isalnum(*q))) { - ++q; - --s; - } - /* All terminated by end-of-line: \r, \r\n, or \n */ - assert(s >= 1); - failure("Version: %s", p); - if (*q == '\x0d') { - if (q[1] != '\0') - assertEqualMem(q, "\x0d\x0a", 2); - } else - assertEqualMem(q, "\x0a", 1); -} - DEFINE_TEST(test_option_version) { - int r; - char *p; - size_t s; - - r = systemf("%s --version >version.stdout 2>version.stderr", testprog); - if (r != 0) - r = systemf("%s -W version >version.stdout 2>version.stderr", - testprog); - failure("Unable to run either %s --version or %s -W version", - testprog, testprog); - if (!assert(r == 0)) - return; - - /* --version should generate nothing to stderr. */ - assertEmptyFile("version.stderr"); - /* Verify format of version message. */ - p = slurpfile(&s, "version.stdout"); - verify(p, s); - free(p); + assertVersion(testprog, "bsdcpio"); } Modified: stable/10/contrib/libarchive/libarchive/archive.h ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive.h Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/libarchive/archive.h Thu Mar 16 23:08:18 2017 (r315433) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3002002 +#define ARCHIVE_VERSION_NUMBER 3003001 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(vo /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.2.2" +#define ARCHIVE_VERSION_ONLY_STRING "3.3.1" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); @@ -1001,6 +1001,10 @@ __LA_DECL int archive_read_disk_set_ati #define ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS (0x0008) /* Default: Xattrs are read from disk. */ #define ARCHIVE_READDISK_NO_XATTR (0x0010) +/* Default: ACLs are read from disk. */ +#define ARCHIVE_READDISK_NO_ACL (0x0020) +/* Default: File flags are read from disk. */ +#define ARCHIVE_READDISK_NO_FFLAGS (0x0040) __LA_DECL int archive_read_disk_set_behavior(struct archive *, int flags); Modified: stable/10/contrib/libarchive/libarchive/archive_check_magic.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_check_magic.c Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/libarchive/archive_check_magic.c Thu Mar 16 23:08:18 2017 (r315433) @@ -62,7 +62,7 @@ errmsg(const char *m) } } -static void +static __LA_DEAD void diediedie(void) { #if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG) Modified: stable/10/contrib/libarchive/libarchive/archive_digest_private.h ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_digest_private.h Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/libarchive/archive_digest_private.h Thu Mar 16 23:08:18 2017 (r315433) @@ -143,6 +143,7 @@ defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\ defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\ defined(ARCHIVE_CRYPTO_SHA512_WIN) +#include #include typedef struct { int valid; Modified: stable/10/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_entry.c Thu Mar 16 23:07:35 2017 (r315432) +++ stable/10/contrib/libarchive/libarchive/archive_entry.c Thu Mar 16 23:08:18 2017 (r315433) @@ -401,7 +401,7 @@ archive_entry_fflags_text(struct archive return (NULL); } -int64_t +la_int64_t archive_entry_gid(struct archive_entry *entry) { return (entry->ae_stat.aest_gid); @@ -502,7 +502,7 @@ _archive_entry_hardlink_l(struct archive return (archive_mstring_get_mbs_l(&entry->ae_hardlink, p, len, sc)); } -int64_t +la_int64_t archive_entry_ino(struct archive_entry *entry) { return (entry->ae_stat.aest_ino); @@ -514,7 +514,7 @@ archive_entry_ino_is_set(struct archive_ return (entry->ae_set & AE_SET_INO); } -int64_t +la_int64_t *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Thu Mar 16 23:18:58 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5A72D10103; Thu, 16 Mar 2017 23:18:58 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D86DF30; Thu, 16 Mar 2017 23:18:58 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GNIvlC096688; Thu, 16 Mar 2017 23:18:57 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GNIvNe096684; Thu, 16 Mar 2017 23:18:57 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201703162318.v2GNIvNe096684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Thu, 16 Mar 2017 23:18: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: r315434 - stable/10/sys/dev/ixgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 23:18:58 -0000 Author: erj Date: Thu Mar 16 23:18:57 2017 New Revision: 315434 URL: https://svnweb.freebsd.org/changeset/base/315434 Log: ixgbe(4): Fix VF build failure on i386 caused by r315333 SYSCTL_ADD_UQUAD on i386 expects a uint64_t pointer, and not an unsigned long pointer. So change the data type of the original variable to u64 (uint64_t) from unsigned long, since the statistics are intended to be 64 bits, anyway. Reported by: Peter Jeremy (peter@rulingia.com) Modified: stable/10/sys/dev/ixgbe/if_ix.c stable/10/sys/dev/ixgbe/if_ixv.c stable/10/sys/dev/ixgbe/ixgbe.h stable/10/sys/dev/ixgbe/ixv.h Modified: stable/10/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/10/sys/dev/ixgbe/if_ix.c Thu Mar 16 23:08:18 2017 (r315433) +++ stable/10/sys/dev/ixgbe/if_ix.c Thu Mar 16 23:18:57 2017 (r315434) @@ -4488,9 +4488,9 @@ ixgbe_add_hw_stats(struct adapter *adapt SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr), ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); - SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "tso_tx", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); - SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "no_tx_dma_setup", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "no_tx_dma_setup", CTLFLAG_RD, &txr->no_tx_dma_setup, "Driver tx dma failure in xmit"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", Modified: stable/10/sys/dev/ixgbe/if_ixv.c ============================================================================== --- stable/10/sys/dev/ixgbe/if_ixv.c Thu Mar 16 23:08:18 2017 (r315433) +++ stable/10/sys/dev/ixgbe/if_ixv.c Thu Mar 16 23:18:57 2017 (r315434) @@ -2290,7 +2290,7 @@ ixv_add_stats_sysctls(struct adapter *ad SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "irqs", CTLFLAG_RD, &(adapter->queues[i].irqs), "IRQs on queue"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "no_tx_dma_setup", - CTLFLAG_RD, &txr->no_tx_dma_setup, + CTLFLAG_RD, &(txr->no_tx_dma_setup), "Driver Tx DMA failure in Tx"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tx_no_desc", CTLFLAG_RD, &(txr->no_desc_avail), Modified: stable/10/sys/dev/ixgbe/ixgbe.h ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.h Thu Mar 16 23:08:18 2017 (r315433) +++ stable/10/sys/dev/ixgbe/ixgbe.h Thu Mar 16 23:18:57 2017 (r315434) @@ -346,9 +346,9 @@ struct tx_ring { u32 bytes; /* used for AIM */ u32 packets; /* Soft Stats */ - unsigned long tso_tx; - unsigned long no_tx_map_avail; - unsigned long no_tx_dma_setup; + u64 tso_tx; + u64 no_tx_map_avail; + u64 no_tx_dma_setup; u64 no_desc_avail; u64 total_packets; }; Modified: stable/10/sys/dev/ixgbe/ixv.h ============================================================================== --- stable/10/sys/dev/ixgbe/ixv.h Thu Mar 16 23:08:18 2017 (r315433) +++ stable/10/sys/dev/ixgbe/ixv.h Thu Mar 16 23:18:57 2017 (r315434) @@ -347,9 +347,9 @@ struct tx_ring { u32 bytes; /* used for AIM */ u32 packets; /* Soft Stats */ - unsigned long tso_tx; - unsigned long no_tx_map_avail; - unsigned long no_tx_dma_setup; + u64 tso_tx; + u64 no_tx_map_avail; + u64 no_tx_dma_setup; u64 no_desc_avail; u64 total_packets; }; From owner-svn-src-stable-10@freebsd.org Thu Mar 16 23:19:54 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11C1DD101C8; Thu, 16 Mar 2017 23:19:54 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-ot0-f177.google.com (mail-ot0-f177.google.com [74.125.82.177]) (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 D08141165; Thu, 16 Mar 2017 23:19:53 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mail-ot0-f177.google.com with SMTP id o24so73523323otb.1; Thu, 16 Mar 2017 16:19:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xH0g8mWiig8iKeGpEQgL9HNzIIUz9yNEFDt4GX7I8WM=; b=SxYV7kFNwaYWW82L3SasVJQO1/80HfCGA3XEPVUgrzSvcCEMOogu2cxp+BpVM3e40b 3o92gF7h2+ELcKVbuTRiLbNqfzafbMI5Kp3g2/prlcbjk8xF5/on0Mae6TIj8PGvDCz3 F0Pvl9jTlEN1LYL7N1saHSP6QGXSYfMlVKaBKtUD3PSBWVkQbL6FfbUuRHigr22vGqr/ FIISJ+F7hwt3AhyRhmw0GWp8WPgsdE4YY4eBdVCNLjEA6m0+wxHPsQxkvnAlD6LyeHUd oDaiSCNL797cdPrpVLf0S23mCIi2mrSg8Atpajb57sfxl+1uRTemVd5TIL3Hb2NyKCqw jxmg== X-Gm-Message-State: AFeK/H3pVkYXB5MdGfU+CdBsV0DYKgO7W8sXZt+r9cNs9PjUN3u0SJ9mkmBmbOXMZBQaGA== X-Received: by 10.157.16.112 with SMTP id o45mr5967632oto.259.1489706392035; Thu, 16 Mar 2017 16:19:52 -0700 (PDT) Received: from mail-ot0-f177.google.com (mail-ot0-f177.google.com. [74.125.82.177]) by smtp.gmail.com with ESMTPSA id o6sm2754454oig.8.2017.03.16.16.19.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Mar 2017 16:19:51 -0700 (PDT) Received: by mail-ot0-f177.google.com with SMTP id x37so73995439ota.2; Thu, 16 Mar 2017 16:19:51 -0700 (PDT) X-Received: by 10.157.26.103 with SMTP id u36mr7107950otu.124.1489706391287; Thu, 16 Mar 2017 16:19:51 -0700 (PDT) MIME-Version: 1.0 References: <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com> <201703161409.v2GE9tx0088345@slippy.cwsent.com> <0E58B9FA-C271-44CB-90E7-AE14301EEF03@gmail.com> In-Reply-To: From: Eric Joyner Date: Thu, 16 Mar 2017 23:19:40 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv To: Ryan Stone Cc: Ngie Cooper , Cy Schubert , src-committers , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 23:19:54 -0000 I think I've got the i386 error fixed in r315434; I have Jeb looking at fixing the netmap issue. On Thu, Mar 16, 2017 at 1:52 PM Ryan Stone wrote: > On Thu, Mar 16, 2017 at 2:59 PM, Eric Joyner wrote: > > I don't think the PCI_IOV stuff should be left in there. At least from > what I gathered in D4767, it's probably abandoned in 10. > > > It shouldn't hurt to leave it in, though. It should all be compiled under > #ifdef PCI_IOV and just be compiled out safely. > From owner-svn-src-stable-10@freebsd.org Fri Mar 17 00:57:57 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6F38D0EC02; Fri, 17 Mar 2017 00:57:57 +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 4E1EC1111; Fri, 17 Mar 2017 00:57:56 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ogDKcGuwi47SdogDLcdzKl; Thu, 16 Mar 2017 18:57:55 -0600 X-Authority-Analysis: v=2.2 cv=P9pKvmIu c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=6Iz7jQTuP9IA:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=QyXUC8HyAAAA:8 a=YxBL1-UpAAAA:8 a=zHFK984VsUyzW9ukltwA:9 a=CjuIK1q_8ugA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=avl4LiGQNoF5OB0DmCJ7:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 57D70C27; Thu, 16 Mar 2017 17:57:54 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v2H0vr29087029; Thu, 16 Mar 2017 17:57:53 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201703170057.v2H0vr29087029@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: Eric Joyner cc: Ngie Cooper , Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv In-Reply-To: Message from Eric Joyner of "Thu, 16 Mar 2017 18:59:31 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 16 Mar 2017 17:57:53 -0700 X-CMAE-Envelope: MS4wfN2r2OoDF3DGngDMimpRwiBQVxE6x9s4GiaToENFil7pJfetUzVQVDywMD1NAlgz/xYCYxiKTXzKPMMwcQe8dWCeZhJccnahzVEot57f2+CDcF4jkQmB u77REJNBRCIsWk094K1VwKeJI4EDfpimHteELBQw+LtJvILUmUomLcbQurqUmn3FoCvXwKNGRLG9HzUmxOUnfrxpRjibWGdOmHwwzN7JGdEpfrmwZB5ikePi bttzptMWXtR+Fv1JtBMCevlfRFA+3zHXxw3L5PMmOxFdSMEJ58AfaPqE4NrQbryvyITiVrAIMNSVsTgcLKKcJ37JOInw6hke6d6EjsLx5uUTFGxazb///wxP YBr5Koef X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2017 00:57:57 -0000 In message , Eric Joyner writes: > --94eb2c18d092e83944054adda9b6 > Content-Type: text/plain; charset=UTF-8 > > Ngie, > > It looks like what's in the commit is using an older version of netmap, so > I think we're okay on that. I think the naming conflict may be due to > splitting the ixgbe_netmap.c file into ixgbe_netmap.c & ixv_netmap.c, and > not having the functions in ixv_netmap.c be renamed. > > I don't think the PCI_IOV stuff should be left in there. At least from what > I gathered in D4767, it's probably abandoned in 10. > > Cy, > > Are you using special options in your kernel config file? "device ixgbe" > works for me, so I want to assume you have "device netmap" in your config > file, unless you're missing INET and/or INET6. > > On Thu, Mar 16, 2017 at 10:00 AM Ngie Cooper wrote: > > > > > On Mar 16, 2017, at 09:29, Eric Joyner wrote: > > > > I'm looking at this now. > > > > Cy, in your case it sounds like the "device ixgbe" option is broken. I'll > > work on getting that to build again. I don't specify ix or ixgbe. Just a module build. I disconnected it to allow the build to finish. > > > > The LINT build error looks like a netmap linking issue (probably due to > > Jeb moving/copying netmap stuff into the driver folder), so that'll be fun > > to root cause. > > > > > > Hi Eric, > > One sandtrap to be aware of is r307394 (and corresponding commits) > > not being MFCed, along with a host of PCI-IOV, etc changes not being easily > > backportable. > > If you can, look for commits from me in the r29xxxx series citing > > ix_crcstrip (it was a backport from bz@ to unbreak LINT on head that also > > fixed stable/10). > > Thanks! > > -Ngie > > > > On Thu, Mar 16, 2017 at 7:10 AM Cy Schubert > > wrote: > > > > In message <62C8A9FD-1EE0-4DEF-A28A-843DBBB4972A@gmail.com>, "Ngie Cooper > > (yane > > urabeya)" writes: > > > > > > --Apple-Mail=_BD9D96B3-A5E1-4DF6-8A1A-EEC15F03AFC5 > > > Content-Transfer-Encoding: quoted-printable > > > Content-Type: text/plain; > > > charset=us-ascii > > > > > > > > > > On Mar 15, 2017, at 14:20, Eric Joyner wrote: > > > >=20 > > > > Author: erj > > > > Date: Wed Mar 15 21:20:17 2017 > > > > New Revision: 315333 > > > > URL: https://svnweb.freebsd.org/changeset/base/315333 > > > >=20 > > > > Log: > > > > ixgbe(4): Update to 3.2.11-k > > > >=20 > > > > Includes: > > > >=20 > > > > 1. Support for X553 (Denverton) Ethernet devices. > > > > 2. Initialization code refactoring. > > > > 3. ixgbe-specific netmap code moved to ixgbe folder > > > > (but not removed from dev/netmap/). > > > > 4. VF driver full split. Some cleanup can be had due to redundant = > > > code, > > > > but this split goes inline with the refactoring. > > > >=20 > > > > NOTE: This is a direct commit to stable/10. Newer branches will = > > > receive an > > > > iflib-converted version of ixgbe, with these updates included, = > > > instead. > > > >=20 > > > > Differential Revision: https://reviews.freebsd.org/D9310 > > > > Submitted by: Jeb Cramer (jeb.j.cramer@intel.com) > > > > Tested by: Jeffrey Pieper (jeffrey.e.pieper@intel.com) > > > > Sponsored by: Intel Corporation > > > > > > Hi Eric, > > > This commit broke amd64/LINT, further (there are other issues = > > > preventing it from passing): = > > > https://ci.freebsd.org/job/FreeBSD-stable-10-amd64-LINT/543/console . > > > > It also broke buildkernel while building the ixgbe module in my > > stable10/amd64 VM. > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > > > -- 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-stable-10@freebsd.org Fri Mar 17 03:04:00 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C7F6D0F372; Fri, 17 Mar 2017 03:04:00 +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 4559A1199; Fri, 17 Mar 2017 03:04:00 +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 v2H33xZ4090445; Fri, 17 Mar 2017 03:03:59 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2H33xdm090442; Fri, 17 Mar 2017 03:03:59 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201703170303.v2H33xdm090442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 17 Mar 2017 03:03: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: r315437 - stable/10/sys/dev/hyperv/netvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2017 03:04:00 -0000 Author: sephe Date: Fri Mar 17 03:03:58 2017 New Revision: 315437 URL: https://svnweb.freebsd.org/changeset/base/315437 Log: MFC 314382,314483-314485 314382 hyperv/hn: Simplify RNDIS packet data offset calculation. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9699 314483 hyperv/hn: Simplify RNDIS packet total length calculation. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9712 314484 hyperv/hn: Make sure that RNDIS packet message is at least 4B aligned. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9713 314485 hyperv/hn: Misaligned chimney sending buffers should not be used Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9714 Modified: stable/10/sys/dev/hyperv/netvsc/hn_nvs.c stable/10/sys/dev/hyperv/netvsc/hn_rndis.c stable/10/sys/dev/hyperv/netvsc/if_hn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/hn_nvs.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hn_nvs.c Fri Mar 17 02:48:29 2017 (r315436) +++ stable/10/sys/dev/hyperv/netvsc/hn_nvs.c Fri Mar 17 03:03:58 2017 (r315437) @@ -272,12 +272,17 @@ hn_nvs_conn_chim(struct hn_softc *sc) error = EIO; goto cleanup; } - if (sectsz == 0) { + if (sectsz == 0 || sectsz % sizeof(uint32_t) != 0) { /* * Can't use chimney sending buffer; done! */ - if_printf(sc->hn_ifp, "zero chimney sending buffer " - "section size\n"); + if (sectsz == 0) { + if_printf(sc->hn_ifp, "zero chimney sending buffer " + "section size\n"); + } else { + if_printf(sc->hn_ifp, "misaligned chimney sending " + "buffers, section size: %u\n", sectsz); + } sc->hn_chim_szmax = 0; sc->hn_chim_cnt = 0; sc->hn_flags |= HN_FLAG_CHIM_CONNECTED; Modified: stable/10/sys/dev/hyperv/netvsc/hn_rndis.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hn_rndis.c Fri Mar 17 02:48:29 2017 (r315436) +++ stable/10/sys/dev/hyperv/netvsc/hn_rndis.c Fri Mar 17 03:03:58 2017 (r315437) @@ -842,9 +842,22 @@ hn_rndis_init(struct hn_softc *sc) sc->hn_rndis_agg_pkts = comp->rm_pktmaxcnt; sc->hn_rndis_agg_align = 1U << comp->rm_align; + if (sc->hn_rndis_agg_align < sizeof(uint32_t)) { + /* + * The RNDIS packet messsage encap assumes that the RNDIS + * packet message is at least 4 bytes aligned. Fix up the + * alignment here, if the remote side sets the alignment + * too low. + */ + if_printf(sc->hn_ifp, "fixup RNDIS aggpkt align: %u -> %zu\n", + sc->hn_rndis_agg_align, sizeof(uint32_t)); + sc->hn_rndis_agg_align = sizeof(uint32_t); + } + if (bootverbose) { - if_printf(sc->hn_ifp, "RNDIS ver %u.%u, pktsz %u, pktcnt %u, " - "align %u\n", comp->rm_ver_major, comp->rm_ver_minor, + if_printf(sc->hn_ifp, "RNDIS ver %u.%u, " + "aggpkt size %u, aggpkt cnt %u, aggpkt align %u\n", + comp->rm_ver_major, comp->rm_ver_minor, sc->hn_rndis_agg_size, sc->hn_rndis_agg_pkts, sc->hn_rndis_agg_align); } Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Mar 17 02:48:29 2017 (r315436) +++ stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Mar 17 03:03:58 2017 (r315437) @@ -1773,12 +1773,6 @@ hn_rndis_pktinfo_append(struct rndis_pac pi->rm_type = pi_type; pi->rm_pktinfooffset = RNDIS_PKTINFO_OFFSET; - /* Data immediately follow per-packet-info. */ - pkt->rm_dataoffset += pi_size; - - /* Update RNDIS packet msg length */ - pkt->rm_len += pi_size; - return (pi->rm_data); } @@ -1920,8 +1914,8 @@ hn_encap(struct ifnet *ifp, struct hn_tx } pkt->rm_type = REMOTE_NDIS_PACKET_MSG; - pkt->rm_len = sizeof(*pkt) + m_head->m_pkthdr.len; - pkt->rm_dataoffset = sizeof(*pkt); + pkt->rm_len = m_head->m_pkthdr.len; + pkt->rm_dataoffset = 0; pkt->rm_datalen = m_head->m_pkthdr.len; pkt->rm_oobdataoffset = 0; pkt->rm_oobdatalen = 0; @@ -1991,8 +1985,10 @@ hn_encap(struct ifnet *ifp, struct hn_tx } pkt_hlen = pkt->rm_pktinfooffset + pkt->rm_pktinfolen; + /* Fixup RNDIS packet message total length */ + pkt->rm_len += pkt_hlen; /* Convert RNDIS packet message offsets */ - pkt->rm_dataoffset = hn_rndis_pktmsg_offset(pkt->rm_dataoffset); + pkt->rm_dataoffset = hn_rndis_pktmsg_offset(pkt_hlen); pkt->rm_pktinfooffset = hn_rndis_pktmsg_offset(pkt->rm_pktinfooffset); /* From owner-svn-src-stable-10@freebsd.org Fri Mar 17 21:24:11 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AE05D10883; Fri, 17 Mar 2017 21:24:11 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4B2E180B; Fri, 17 Mar 2017 21:24:10 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HLO9Dp040517; Fri, 17 Mar 2017 21:24:09 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HLO9kZ040516; Fri, 17 Mar 2017 21:24:09 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201703172124.v2HLO9kZ040516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Fri, 17 Mar 2017 21:24: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: r315463 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2017 21:24:11 -0000 Author: erj Date: Fri Mar 17 21:24:09 2017 New Revision: 315463 URL: https://svnweb.freebsd.org/changeset/base/315463 Log: ixgbe(4): Fix build breakage when only compiling ix(4) PR: 217862 Reported by: lampa Sponsored by: Intel Corporation Modified: stable/10/sys/conf/files Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Fri Mar 17 21:03:54 2017 (r315462) +++ stable/10/sys/conf/files Fri Mar 17 21:24:09 2017 (r315463) @@ -1763,15 +1763,15 @@ dev/ixgbe/if_ix.c optional ix inet | ix compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/if_ixv.c optional ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" -dev/ixgbe/ix_txrx.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/ix_txrx.c optional ix inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/if_bypass.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/if_bypass.c optional ix inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/if_fdir.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/if_fdir.c optional ix inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/if_sriov.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/if_sriov.c optional ix inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_netmap.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/ixgbe_netmap.c optional ix inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_phy.c optional ix inet | ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" @@ -1797,15 +1797,15 @@ dev/ixgbe/ixgbe_dcb_82598.c optional ix compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82599.c optional ix inet | ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixv_mbx.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/ixv_mbx.c optional ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixv_netmap.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/ixv_netmap.c optional ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixv_osdep.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/ixv_osdep.c optional ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixv_txrx.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/ixv_txrx.c optional ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixv_vf.c optional ix inet | ixv inet | ixgbe inet \ +dev/ixgbe/ixv_vf.c optional ixv inet | ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixl/if_ixl.c optional ixl inet \ compile-with "${NORMAL_C} -I$S/dev/ixl" From owner-svn-src-stable-10@freebsd.org Sat Mar 18 12:39:26 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48639D10F8B; Sat, 18 Mar 2017 12:39:26 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 178BB1158; Sat, 18 Mar 2017 12:39:26 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2ICdPp2024750; Sat, 18 Mar 2017 12:39:25 GMT (envelope-from mmokhi@FreeBSD.org) Received: (from mmokhi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2ICdPvU024749; Sat, 18 Mar 2017 12:39:25 GMT (envelope-from mmokhi@FreeBSD.org) Message-Id: <201703181239.v2ICdPvU024749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmokhi set sender to mmokhi@FreeBSD.org using -f From: Mahdi Mokhtari Date: Sat, 18 Mar 2017 12:39:25 +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: r315481 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2017 12:39:26 -0000 Author: mmokhi (ports committer) Date: Sat Mar 18 12:39:24 2017 New Revision: 315481 URL: https://svnweb.freebsd.org/changeset/base/315481 Log: MFC r314996: Fix NULL pointer dereference and panic with shm file pread/pwrite. PR: 217429 Approved by: dchagin Modified: stable/10/sys/kern/sys_generic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sys_generic.c ============================================================================== --- stable/10/sys/kern/sys_generic.c Sat Mar 18 11:13:54 2017 (r315480) +++ stable/10/sys/kern/sys_generic.c Sat Mar 18 12:39:24 2017 (r315481) @@ -313,7 +313,8 @@ kern_preadv(td, fd, auio, offset) return (error); if (!(fp->f_ops->fo_flags & DFLAG_SEEKABLE)) error = ESPIPE; - else if (offset < 0 && fp->f_vnode->v_type != VCHR) + else if (offset < 0 && + (fp->f_vnode == NULL || fp->f_vnode->v_type != VCHR)) error = EINVAL; else error = dofileread(td, fd, fp, auio, offset, FOF_OFFSET); @@ -524,7 +525,8 @@ kern_pwritev(td, fd, auio, offset) return (error); if (!(fp->f_ops->fo_flags & DFLAG_SEEKABLE)) error = ESPIPE; - else if (offset < 0 && fp->f_vnode->v_type != VCHR) + else if (offset < 0 && + (fp->f_vnode == NULL || fp->f_vnode->v_type != VCHR)) error = EINVAL; else error = dofilewrite(td, fd, fp, auio, offset, FOF_OFFSET);