From owner-svn-src-stable-11@freebsd.org Mon May 22 02:09:29 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CD76D78475; Mon, 22 May 2017 02:09:29 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E72F1A43; Mon, 22 May 2017 02:09:29 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M29SI5036453; Mon, 22 May 2017 02:09:28 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M29SAG036452; Mon, 22 May 2017 02:09:28 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705220209.v4M29SAG036452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 22 May 2017 02:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318604 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 02:09:29 -0000 Author: sephe Date: Mon May 22 02:09:27 2017 New Revision: 318604 URL: https://svnweb.freebsd.org/changeset/base/318604 Log: MFC 318512 net/vlan: Revert 305177 Miss read the parentheses. Reported by: oleg@ Reviewed by: hps@ Sponsored by: Microsoft Modified: stable/11/sys/net/ethernet.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ethernet.h ============================================================================== --- stable/11/sys/net/ethernet.h Mon May 22 01:10:12 2017 (r318603) +++ stable/11/sys/net/ethernet.h Mon May 22 02:09:27 2017 (r318604) @@ -89,7 +89,7 @@ struct ether_vlan_header { #define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7) #define EVL_CFIOFTAG(tag) (((tag) >> 12) & 1) #define EVL_MAKETAG(vlid, pri, cfi) \ - ((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) + ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) /* * NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields. From owner-svn-src-stable-11@freebsd.org Mon May 22 06:03:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F02CD78334; Mon, 22 May 2017 06:03:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 507E71E44; Mon, 22 May 2017 06:03:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M63pDU034067; Mon, 22 May 2017 06:03:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M63pIr034066; Mon, 22 May 2017 06:03:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220603.v4M63pIr034066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318607 - stable/11/usr.sbin/rpcbind X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:03:52 -0000 Author: ngie Date: Mon May 22 06:03:51 2017 New Revision: 318607 URL: https://svnweb.freebsd.org/changeset/base/318607 Log: MFC r317154: Print out the signal number on exit in terminate(..) if WARMSTART is compiled into rpcbind. The signal number can provide helpful diagnostic info. Obtained from: Isilon OneFS Modified: stable/11/usr.sbin/rpcbind/rpcbind.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- stable/11/usr.sbin/rpcbind/rpcbind.c Mon May 22 03:01:35 2017 (r318606) +++ stable/11/usr.sbin/rpcbind/rpcbind.c Mon May 22 06:03:51 2017 (r318607) @@ -757,12 +757,13 @@ rbllist_add(rpcprog_t prog, rpcvers_t ve * Catch the signal and die */ static void -terminate(int dummy __unused) +terminate(int signum __unused) { close(rpcbindlockfd); #ifdef WARMSTART syslog(LOG_ERR, - "rpcbind terminating on signal. Restart with \"rpcbind -w\""); + "rpcbind terminating on signal %d. Restart with \"rpcbind -w\"", + signum); write_warmstart(); /* Dump yourself */ #endif exit(2); From owner-svn-src-stable-11@freebsd.org Mon May 22 06:05:36 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B937DD784E7; Mon, 22 May 2017 06:05:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 871491292; Mon, 22 May 2017 06:05:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M65ZVZ034311; Mon, 22 May 2017 06:05:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M65ZwQ034310; Mon, 22 May 2017 06:05:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220605.v4M65ZwQ034310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318610 - stable/11/usr.bin/which X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:05:36 -0000 Author: ngie Date: Mon May 22 06:05:35 2017 New Revision: 318610 URL: https://svnweb.freebsd.org/changeset/base/318610 Log: MFC r317160: Clean up trailing whitespace No functional changes Modified: stable/11/usr.bin/which/which.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/which/which.c ============================================================================== --- stable/11/usr.bin/which/which.c Mon May 22 06:05:14 2017 (r318609) +++ stable/11/usr.bin/which/which.c Mon May 22 06:05:35 2017 (r318610) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); static void usage(void); static int print_matches(char *, char *); - + static int silent; static int allpaths; @@ -81,7 +81,7 @@ main(int argc, char **argv) while (argc > 0) { memcpy(path, p, pathlen); - + if (strlen(*argv) >= FILENAME_MAX || print_matches(path, *argv) == -1) status = EXIT_FAILURE; From owner-svn-src-stable-11@freebsd.org Mon May 22 06:07:12 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2983D7861E; Mon, 22 May 2017 06:07:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9949F14F3; Mon, 22 May 2017 06:07:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M67AZ7034495; Mon, 22 May 2017 06:07:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M67ANc034494; Mon, 22 May 2017 06:07:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220607.v4M67ANc034494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318612 - stable/11/share/man/man3 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:07:13 -0000 Author: ngie Date: Mon May 22 06:07:09 2017 New Revision: 318612 URL: https://svnweb.freebsd.org/changeset/base/318612 Log: MFC r315793: intro(3): fix markup - Use `Em` with `.It` macro when referring to other libraries, instead of `Xr`. - Use `.Em` instead of `.Xr` when referring to libraries. - Remove commented out lines. Modified: stable/11/share/man/man3/intro.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man3/intro.3 ============================================================================== --- stable/11/share/man/man3/intro.3 Mon May 22 06:06:48 2017 (r318611) +++ stable/11/share/man/man3/intro.3 Mon May 22 06:07:09 2017 (r318612) @@ -28,7 +28,7 @@ .\" @(#)intro.3 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd March 22, 2017 .Dt INTRO 3 .Os .Sh NAME @@ -40,26 +40,16 @@ library functions, their error returns a common definitions and concepts. Most of these functions are available from the C library, .Em libc . -.\" (see -.\" .Xr libc 3 ) . Other libraries, such as the math library, .Em libm , must be indicated at compile time with the .Fl l option of the compiler. -.\" .Pp -.\" A subset of the -.\" .Xr libc functions -.\" are available from Fortran; -.\" they are described separately in -.\" .Xr intro 3f . .Pp The various libraries (followed by the loader flag): .Bl -tag -width "libc (-lc)" -.It Xr libc Pq Fl l Ns Ar c +.It Em libc Pq Fl l Ns Ar c Standard C library functions. -.\" (See -.\" .Xr libc 3 . ) When using the C compiler .Xr cc 1 , it is not necessary @@ -67,8 +57,8 @@ to supply the loader flag .Fl l Ns Ar c for these functions. There are several `libraries' or groups of functions included inside of -.Xr libc : -the standard +.Em libc +: the standard .Tn I/O routines, database routines, @@ -77,12 +67,12 @@ string operators, character tests and character operators, des encryption routines, storage allocation, time functions, signal handling and more. -.It Xr libcurses Pq Fl l Ns Ar curses Fl l Ns Ar termcap +.It Em libcurses Pq Fl l Ns Ar curses Fl l Ns Ar termcap Terminal independent screen management routines for two dimensional non-bitmap display terminals. (See .Xr ncurses 3 . ) -.It Xr libcompat Pq Fl l Ns Ar compat +.It Em libcompat Pq Fl l Ns Ar compat Functions which are obsolete but are available for compatibility with .Bx 4.3 . In particular, @@ -92,45 +82,30 @@ have been included for source code compa Use of these routines should, for the most part, be avoided. The manual page entry for each compatibility routine indicates the proper interface to use. -.It Xr libkvm Pq Fl l Ns Ar kvm +.It Em libkvm Pq Fl l Ns Ar kvm Functions used to access kernel memory are in this library. They can be used against both a running system and a crash dump. (See .Xr kvm 3 . ) -.It Xr libl Pq Fl l Ns Ar l +.It Em libl Pq Fl l Ns Ar l The library for .Xr lex 1 . -.\" .It Xr libln -.It Xr libm Pq Fl l Ns Ar m +.It Em libm Pq Fl l Ns Ar m The math library, .Em libm . The math library is loaded as needed by the Pascal compiler, -.\" .Xr pc 1 , but not by the C compiler which requires the .Fl l Ns Ar m flag. (See .Xr math 3 . ) -.It Xr libmp Pq Fl l Ns Ar mp -.\" .It Xr libom -.\" Old math library. -.\" .It Xr libplot Pq Fl l Ns Ar plot -.\" Device independent plotting functions. -.\" (See -.\" .Xr plot 3 . ) -.\" .It Xr libplotf77 Pq Fl l Ns Ar plotf77 -.\" The device independent plotting functions for fortran. -.\" (See -.\" .Xr plot 3 . ) -.\" .It Xr libresolv Pq Fl l Ns Ar resolv -.\" Routines for network address resolution. -.It Xr libtermcap Pq Fl l Ns Ar termcap +.It Em libmp Pq Fl l Ns Ar mp +.It Em libtermcap Pq Fl l Ns Ar termcap The terminal independent operation library package. (See .Xr termcap 3 . ) -.\" .It libvt0.a -.It Xr liby Pq Fl l Ns Ar y +.It Em liby Pq Fl l Ns Ar y The library for .Xr yacc 1 . .El @@ -146,17 +121,12 @@ the math library the math library compiled for profiling .El .Sh SEE ALSO -.\" .Xr libc 3 , .Xr cc 1 , .Xr ld 1 , .Xr nm 1 , .Xr intro 2 , .Xr math 3 , .Xr stdio 3 -.\" .Sh LIST OF FUNCTIONS -.\" .Bl -column "strncasecmpxxx" "system" -.\" .Sy Name Description -.\" .El .Sh HISTORY An .Nm From owner-svn-src-stable-11@freebsd.org Mon May 22 06:08:20 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CA89D786CA; Mon, 22 May 2017 06:08:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 683911717; Mon, 22 May 2017 06:08:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M68Jcl034645; Mon, 22 May 2017 06:08:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M68JNv034644; Mon, 22 May 2017 06:08:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220608.v4M68JNv034644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318613 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:08:20 -0000 Author: ngie Date: Mon May 22 06:08:19 2017 New Revision: 318613 URL: https://svnweb.freebsd.org/changeset/base/318613 Log: MFC r315766,r315768: r315766: Note that tools/build/options/makeman automatically generated src.conf(5) This (as a bonus) fixes mdoc warnings with src.conf(5) :).. r315768: Remove the .Pa portion I added to the .An macro in AUTHORS section That doesn't work (mandoc complains about the macro being empty). That's what I get for being clever and not verifying before committing things again *sigh*. Partyhat to: ngie Modified: stable/11/tools/build/options/makeman Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/makeman ============================================================================== --- stable/11/tools/build/options/makeman Mon May 22 06:07:09 2017 (r318612) +++ stable/11/tools/build/options/makeman Mon May 22 06:08:19 2017 (r318613) @@ -341,7 +341,8 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . EOF } From owner-svn-src-stable-11@freebsd.org Mon May 22 06:15:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1CA1D78C0D; Mon, 22 May 2017 06:15:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B02501113; Mon, 22 May 2017 06:15:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6FoIW038776; Mon, 22 May 2017 06:15:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6Foko038774; Mon, 22 May 2017 06:15:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220615.v4M6Foko038774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318618 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:15:52 -0000 Author: ngie Date: Mon May 22 06:15:50 2017 New Revision: 318618 URL: https://svnweb.freebsd.org/changeset/base/318618 Log: MFC r311135: Add documentation for MK_EFI added in r307243 Added: stable/11/tools/build/options/WITHOUT_EFI - copied unchanged from r311135, head/tools/build/options/WITHOUT_EFI stable/11/tools/build/options/WITH_EFI - copied unchanged from r311135, head/tools/build/options/WITH_EFI Modified: Directory Properties: stable/11/ (props changed) Copied: stable/11/tools/build/options/WITHOUT_EFI (from r311135, head/tools/build/options/WITHOUT_EFI) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITHOUT_EFI Mon May 22 06:15:50 2017 (r318618, copy of r311135, head/tools/build/options/WITHOUT_EFI) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set not to build +.Xr efivar 3 +and +.Xr efivar 8 . Copied: stable/11/tools/build/options/WITH_EFI (from r311135, head/tools/build/options/WITH_EFI) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITH_EFI Mon May 22 06:15:50 2017 (r318618, copy of r311135, head/tools/build/options/WITH_EFI) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to build +.Xr efivar 3 +and +.Xr efivar 8 . From owner-svn-src-stable-11@freebsd.org Mon May 22 06:17:16 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08295D78D23; Mon, 22 May 2017 06:17:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD2171360; Mon, 22 May 2017 06:17:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6HE8u038872; Mon, 22 May 2017 06:17:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6HEpi038871; Mon, 22 May 2017 06:17:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220617.v4M6HEpi038871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318619 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:17:16 -0000 Author: ngie Date: Mon May 22 06:17:14 2017 New Revision: 318619 URL: https://svnweb.freebsd.org/changeset/base/318619 Log: MFC r311135: Add documentation for MK_EFI added in r307243 Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Mon May 22 06:15:50 2017 (r318618) +++ stable/11/share/man/man5/src.conf.5 Mon May 22 06:17:14 2017 (r318619) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 18, 2017 +.Dd May 21, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -557,6 +557,22 @@ Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. +.It Va WITHOUT_EFI +Set not to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_EFI +Set to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_EISA Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY @@ -1476,4 +1492,5 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . From owner-svn-src-stable-11@freebsd.org Mon May 22 06:18:18 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13F42D78E2D; Mon, 22 May 2017 06:18:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 211AD154D; Mon, 22 May 2017 06:18:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6IF0r038964; Mon, 22 May 2017 06:18:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6IFPd038963; Mon, 22 May 2017 06:18:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220618.v4M6IFPd038963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318620 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:18:18 -0000 Author: ngie Date: Mon May 22 06:18:15 2017 New Revision: 318620 URL: https://svnweb.freebsd.org/changeset/base/318620 Log: Revert commit again to correct it Obviously my brain's on autopilot tonight Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Mon May 22 06:17:14 2017 (r318619) +++ stable/11/share/man/man5/src.conf.5 Mon May 22 06:18:15 2017 (r318620) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 21, 2017 +.Dd May 18, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -557,22 +557,6 @@ Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. -.It Va WITHOUT_EFI -Set not to build -.Xr efivar 3 -and -.Xr efivar 8 . -.Pp -It is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_EFI -Set to build -.Xr efivar 3 -and -.Xr efivar 8 . -.Pp -It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_EISA Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY @@ -1492,5 +1476,4 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated by -.An tools/build/options/makeman . +This manual page was autogenerated. From owner-svn-src-stable-11@freebsd.org Mon May 22 06:19:28 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D02CD78F71; Mon, 22 May 2017 06:19:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BCB417CC; Mon, 22 May 2017 06:19:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6JRQQ039064; Mon, 22 May 2017 06:19:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6JRAV039063; Mon, 22 May 2017 06:19:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220619.v4M6JRAV039063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318621 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:19:28 -0000 Author: ngie Date: Mon May 22 06:19:27 2017 New Revision: 318621 URL: https://svnweb.freebsd.org/changeset/base/318621 Log: Regenerate src.conf(5) Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Mon May 22 06:18:15 2017 (r318620) +++ stable/11/share/man/man5/src.conf.5 Mon May 22 06:19:27 2017 (r318621) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 18, 2017 +.Dd May 21, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -557,6 +557,22 @@ Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. +.It Va WITHOUT_EFI +Set not to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_EFI +Set to build +.Xr efivar 3 +and +.Xr efivar 8 . +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_EISA Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY @@ -1476,4 +1492,5 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . From owner-svn-src-stable-11@freebsd.org Mon May 22 06:20:24 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97D66D78044; Mon, 22 May 2017 06:20:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BB601952; Mon, 22 May 2017 06:20:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6KNai039209; Mon, 22 May 2017 06:20:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6KNiN039205; Mon, 22 May 2017 06:20:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220620.v4M6KNiN039205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318622 - in stable/11: sbin/mount sbin/mount_cd9660 share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:20:24 -0000 Author: ngie Date: Mon May 22 06:20:22 2017 New Revision: 318622 URL: https://svnweb.freebsd.org/changeset/base/318622 Log: MFC r315775: Add a post-humous manpage for cd9660(5), the ISO-9660 file system Describe (briefly) how to compile the filesystem into the kernel and load as a module. Reference cd9660(5) in mount(8) and mount_cd9660(8). Added: stable/11/share/man/man5/cd9660.5 - copied unchanged from r315775, head/share/man/man5/cd9660.5 Modified: stable/11/sbin/mount/mount.8 stable/11/sbin/mount_cd9660/mount_cd9660.8 stable/11/share/man/man5/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mount/mount.8 ============================================================================== --- stable/11/sbin/mount/mount.8 Mon May 22 06:19:27 2017 (r318621) +++ stable/11/sbin/mount/mount.8 Mon May 22 06:20:22 2017 (r318622) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd October 13, 2015 +.Dd March 22, 2017 .Dt MOUNT 8 .Os .Sh NAME @@ -543,6 +543,7 @@ support for a particular file system mig .Xr nmount 2 , .Xr acl 3 , .Xr mac 4 , +.Xr cd9660 5 , .Xr devfs 5 , .Xr ext2fs 5 , .Xr fstab 5 , Modified: stable/11/sbin/mount_cd9660/mount_cd9660.8 ============================================================================== --- stable/11/sbin/mount_cd9660/mount_cd9660.8 Mon May 22 06:19:27 2017 (r318621) +++ stable/11/sbin/mount_cd9660/mount_cd9660.8 Mon May 22 06:20:22 2017 (r318622) @@ -32,7 +32,7 @@ .\" @(#)mount_cd9660.8 8.3 (Berkeley) 3/27/94 .\" $FreeBSD$ .\" -.Dd March 5, 2013 +.Dd March 22, 2017 .Dt MOUNT_CD9660 8 .Os .Sh NAME @@ -138,6 +138,7 @@ The following command can be used to mou .Xr cdcontrol 1 , .Xr mount 2 , .Xr unmount 2 , +.Xr cd9660 5 , .Xr fstab 5 , .Xr mount 8 .Sh HISTORY Modified: stable/11/share/man/man5/Makefile ============================================================================== --- stable/11/share/man/man5/Makefile Mon May 22 06:19:27 2017 (r318621) +++ stable/11/share/man/man5/Makefile Mon May 22 06:20:22 2017 (r318622) @@ -10,6 +10,7 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ ${_boot.config.5} \ + cd9660.5 \ core.5 \ devfs.5 \ devfs.conf.5 \ Copied: stable/11/share/man/man5/cd9660.5 (from r315775, head/share/man/man5/cd9660.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man5/cd9660.5 Mon May 22 06:20:22 2017 (r318622, copy of r315775, head/share/man/man5/cd9660.5) @@ -0,0 +1,82 @@ +.\" +.\" Copyright (c) 2017 Ngie Cooper +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission +.\" +.\" THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 22, 2017 +.Dt CD9660 5 +.Os +.Sh NAME +.Nm cd9660 +.Nd "ISO-9660 file system" +.Sh SYNOPSIS +To link into the kernel: +.Bd -ragged -offset indent +.Cd "options CD9660" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +cd9660_load="YES" +.Sh DESCRIPTION +The +.Nm +driver will permit the +.Fx +kernel to access the +.Tn cd9660 +file system. +.Sh EXAMPLES +To mount a +.Nm +volume located on +.Pa /dev/cd0 : +.Pp +.Dl "mount -t cd9660 /dev/cd0 /mnt" +.Sh SEE ALSO +.Xr nmount 2 , +.Xr unmount 2 , +.Xr fstab 5 , +.Xr mount 8 , +.Xr mount_cd9660 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 4.4 Lite +.Sh AUTHORS +.An -nosplit +The +.Nm +kernel implementation was originally written by +.An Pace Willisson Aq Mt pace@blitz.com +and +.An Atsushi Murai Aq Mt amurai@spec.co.jp . +.Pp +This manual page was written by +.An Ngie Cooper Aq Mt ngie@FreeBSD.org . From owner-svn-src-stable-11@freebsd.org Mon May 22 06:24:44 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4AF5D78373; Mon, 22 May 2017 06:24:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F34A101E; Mon, 22 May 2017 06:24:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6OhP5043129; Mon, 22 May 2017 06:24:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6OhF4043128; Mon, 22 May 2017 06:24:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220624.v4M6OhF4043128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318624 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:24:44 -0000 Author: ngie Date: Mon May 22 06:24:43 2017 New Revision: 318624 URL: https://svnweb.freebsd.org/changeset/base/318624 Log: MFC r317594: usb(4): manpage cleanup 1. Wrap at <80 columns for readability when editing. Rewrap some lines prematurely wrapped to better fit in <80 columns and not waste vertical space. 2. Fix SEE ALSO sorting (sort by section first, then manpage name). 3. Tweak the compound device description slightly by adding soft stops via commas. Sponsored by Dell EMC Isilon Modified: stable/11/share/man/man4/usb.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/usb.4 ============================================================================== --- stable/11/share/man/man4/usb.4 Mon May 22 06:20:58 2017 (r318623) +++ stable/11/share/man/man4/usb.4 Mon May 22 06:24:43 2017 (r318624) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2013 +.Dd April 29, 2017 .Dt USB 4 .Os .Sh NAME @@ -78,8 +78,7 @@ bus. .Pp The .Nm uhub -device will always be present as it is needed for the -root hub. +device will always be present as it is needed for the root hub. .Sh INTRODUCTION TO USB The .Tn USB @@ -94,38 +93,34 @@ The most common USB speeds are: Each .Tn USB has a USB controller that is the master of the bus. -The physical communication is simplex which means the host controller only communicates with one USB device at a time. +The physical communication is simplex which means the host controller only +communicates with one USB device at a time. .Pp There can be up to 127 devices connected to an USB HUB tree. -The addresses are assigned -dynamically by the host when each device is attached to the bus. +The addresses are assigned dynamically by the host when each device is +attached to the bus. .Pp Within each device there can be up to 16 endpoints. -Each endpoint -is individually addressed and the addresses are static. +Each endpoint is individually addressed and the addresses are static. Each of these endpoints will communicate in one of four different modes: .Em control , isochronous , bulk , or .Em interrupt . A device always has at least one endpoint. -This endpoint has address 0 and is a control -endpoint and is used to give commands to and extract basic data, -such as descriptors, from the device. +This endpoint has address 0 and is a control endpoint and is used to give +commands to and extract basic data, such as descriptors, from the device. Each endpoint, except the control endpoint, is unidirectional. .Pp The endpoints in a device are grouped into interfaces. -An interface is a logical unit within a device; e.g.\& -a compound device with both a keyboard and a trackball would present -one interface for each. -An interface can sometimes be set into different modes, -called alternate settings, which affects how it operates. -Different alternate settings can have different endpoints -within it. +An interface is a logical unit within a device, e.g., a compound device with +both a keyboard and a trackball, would present one interface for each. +An interface can sometimes be set into different modes, called alternate +settings, which affects how it operates. +Different alternate settings can have different endpoints within it. .Pp A device may operate in different configurations. -Depending on the -configuration, the device may present different sets of endpoints -and interfaces. +Depending on the configuration, the device may present different sets of +endpoints and interfaces. .Pp The bus enumeration of the .Tn USB @@ -144,7 +139,6 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr axge 4 , @@ -166,8 +160,9 @@ specifications can be found at: .Xr uplcom 4 , .Xr urio 4 , .Xr uvscom 4 , -.Xr usbconfig 8 , .Xr xhci 4 +.Xr usbconfig 8 , +.Xr usbdi 9 , .Sh STANDARDS The .Nm From owner-svn-src-stable-11@freebsd.org Mon May 22 06:26:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3967D7842A; Mon, 22 May 2017 06:26:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83850119E; Mon, 22 May 2017 06:26:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6QMBI043264; Mon, 22 May 2017 06:26:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6QMbZ043261; Mon, 22 May 2017 06:26:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220626.v4M6QMbZ043261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318625 - stable/11/sys/boot/efi/boot1 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:26:23 -0000 Author: ngie Date: Mon May 22 06:26:22 2017 New Revision: 318625 URL: https://svnweb.freebsd.org/changeset/base/318625 Log: MFC r316103: Remove redundant declarations They're already defined in libstand.h Modified: stable/11/sys/boot/efi/boot1/boot1.c stable/11/sys/boot/efi/boot1/boot_module.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/efi/boot1/boot1.c ============================================================================== --- stable/11/sys/boot/efi/boot1/boot1.c Mon May 22 06:24:43 2017 (r318624) +++ stable/11/sys/boot/efi/boot1/boot1.c Mon May 22 06:26:22 2017 (r318625) @@ -47,7 +47,6 @@ static const boot_module_t *boot_modules /* The initial number of handles used to query EFI for partitions. */ #define NUM_HANDLES_INIT 24 -void putchar(int c); EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab); EFI_SYSTEM_TABLE *systab; Modified: stable/11/sys/boot/efi/boot1/boot_module.h ============================================================================== --- stable/11/sys/boot/efi/boot1/boot_module.h Mon May 22 06:24:43 2017 (r318624) +++ stable/11/sys/boot/efi/boot1/boot_module.h Mon May 22 06:26:22 2017 (r318625) @@ -105,8 +105,6 @@ extern const boot_module_t zfs_module; /* Functions available to modules. */ extern void add_device(dev_info_t **devinfop, dev_info_t *devinfo); -extern void panic(const char *fmt, ...) __dead2; -extern int printf(const char *fmt, ...); extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); extern EFI_SYSTEM_TABLE *systab; From owner-svn-src-stable-11@freebsd.org Mon May 22 08:17:09 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19D9DD78499; Mon, 22 May 2017 08:17:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D11C4180E; Mon, 22 May 2017 08:17:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M8H7BP088086; Mon, 22 May 2017 08:17:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M8H72i088084; Mon, 22 May 2017 08:17:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705220817.v4M8H72i088084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 22 May 2017 08:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318627 - stable/11/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 08:17:09 -0000 Author: hselasky Date: Mon May 22 08:17:07 2017 New Revision: 318627 URL: https://svnweb.freebsd.org/changeset/base/318627 Log: MFC r318531: mlx4: Use the CQ quota for SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the firmware). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the firmware total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c stable/11/sys/ofed/drivers/net/mlx4/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 06:29:20 2017 (r318626) +++ stable/11/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:17:07 2017 (r318627) @@ -1169,8 +1169,7 @@ int mlx4_init_eq_table(struct mlx4_dev * } for (i = 0; i < dev->caps.num_comp_vectors; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); @@ -1190,8 +1189,7 @@ int mlx4_init_eq_table(struct mlx4_dev * for (i = dev->caps.num_comp_vectors + 1; i < dev->caps.num_comp_vectors + dev->caps.comp_pool + 1; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); Modified: stable/11/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/main.c Mon May 22 06:29:20 2017 (r318626) +++ stable/11/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:17:07 2017 (r318627) @@ -3446,6 +3446,8 @@ slave_start: goto err_free_eq; } + mlx4_init_quotas(dev); + err = mlx4_setup_hca(dev); if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && !mlx4_is_mfunc(dev)) { @@ -3459,7 +3461,6 @@ slave_start: if (err) goto err_steer; - mlx4_init_quotas(dev); mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { From owner-svn-src-stable-11@freebsd.org Mon May 22 10:28:18 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C17FCD77995; Mon, 22 May 2017 10:28:18 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82144165B; Mon, 22 May 2017 10:28:18 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MASHv5041438; Mon, 22 May 2017 10:28:17 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MASHNe041436; Mon, 22 May 2017 10:28:17 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705221028.v4MASHNe041436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Mon, 22 May 2017 10:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318630 - stable/11/sbin/dhclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 10:28:18 -0000 Author: n_hibma Date: Mon May 22 10:28:17 2017 New Revision: 318630 URL: https://svnweb.freebsd.org/changeset/base/318630 Log: MFC: ------------------------------------------------------------------------ r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines Fix the output of very large rebind, renew and lease time options in lease file. Some routers set very large values for rebind time (Netgear) and these are erroneously reported as negative in the leasefile. This was due to a wrong printf format specification of %ld for an unsigned long on 32-bit platforms. ------------------------------------------------------------------------ r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines Fix handling of large DHCP expiry values. They would overflow a signed 32-bit time_t on 32 bit architectures. This was taken care of, but a compiler optimisation makes this behave erratically. This could be resolved by adding a -fwrapv flag, but instead we can check the value before adding the current timestamp to it. In the lease file values are still wrong though: option dhcp-rebinding-time -644245096; PR: 218980 Modified: stable/11/sbin/dhclient/dhclient.c stable/11/sbin/dhclient/options.c Modified: stable/11/sbin/dhclient/dhclient.c ============================================================================== --- stable/11/sbin/dhclient/dhclient.c Mon May 22 08:20:50 2017 (r318629) +++ stable/11/sbin/dhclient/dhclient.c Mon May 22 10:28:17 2017 (r318630) @@ -107,7 +107,11 @@ struct pidfh *pidfile; */ #define ASSERT_STATE(state_is, state_shouldbe) {} -#define TIME_MAX 2147483647 +/* + * We need to check that the expiry, renewal and rebind times are not beyond + * the end of time (~2038 when a 32-bit time_t is being used). + */ +#define TIME_MAX ((((time_t) 1 << (sizeof(time_t) * CHAR_BIT - 2)) - 1) * 2 + 1) int log_priority; int no_daemon; @@ -762,15 +766,17 @@ dhcpack(struct packet *packet) else ip->client->new->expiry = default_lease_time; /* A number that looks negative here is really just very large, - because the lease expiry offset is unsigned. */ - if (ip->client->new->expiry < 0) - ip->client->new->expiry = TIME_MAX; + because the lease expiry offset is unsigned. Also make sure that + the addition of cur_time below does not overflow (a 32 bit) time_t. */ + if (ip->client->new->expiry < 0 || + ip->client->new->expiry > TIME_MAX - cur_time) + ip->client->new->expiry = TIME_MAX - cur_time; /* XXX should be fixed by resetting the client state */ if (ip->client->new->expiry < 60) ip->client->new->expiry = 60; /* Unless overridden in the config, take the server-provided renewal - * time if there is one; otherwise figure it out according to the spec. + * time if there is one. Otherwise figure it out according to the spec. * Also make sure the renewal time does not exceed the expiry time. */ if (ip->client->config->default_actions[DHO_DHCP_RENEWAL_TIME] == @@ -782,7 +788,8 @@ dhcpack(struct packet *packet) ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data); else ip->client->new->renewal = ip->client->new->expiry / 2; - if (ip->client->new->renewal > ip->client->new->expiry / 2) + if (ip->client->new->renewal < 0 || + ip->client->new->renewal > ip->client->new->expiry / 2) ip->client->new->renewal = ip->client->new->expiry / 2; /* Same deal with the rebind time. */ @@ -794,20 +801,15 @@ dhcpack(struct packet *packet) ip->client->new->rebind = getULong( ip->client->new->options[DHO_DHCP_REBINDING_TIME].data); else - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - if (ip->client->new->rebind > ip->client->new->renewal * 7 / 4) - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - - ip->client->new->expiry += cur_time; - /* Lease lengths can never be negative. */ - if (ip->client->new->expiry < cur_time) - ip->client->new->expiry = TIME_MAX; - ip->client->new->renewal += cur_time; - if (ip->client->new->renewal < cur_time) - ip->client->new->renewal = TIME_MAX; - ip->client->new->rebind += cur_time; - if (ip->client->new->rebind < cur_time) - ip->client->new->rebind = TIME_MAX; + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + if (ip->client->new->rebind < 0 || + ip->client->new->rebind > ip->client->new->renewal / 4 * 7) + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + + /* Convert the time offsets into seconds-since-the-epoch */ + ip->client->new->expiry += cur_time; + ip->client->new->renewal += cur_time; + ip->client->new->rebind += cur_time; bind_lease(ip); } Modified: stable/11/sbin/dhclient/options.c ============================================================================== --- stable/11/sbin/dhclient/options.c Mon May 22 08:20:50 2017 (r318629) +++ stable/11/sbin/dhclient/options.c Mon May 22 10:28:17 2017 (r318630) @@ -783,7 +783,7 @@ pretty_print_option(unsigned int code, u dp += 4; break; case 'L': - opcount = snprintf(op, opleft, "%ld", + opcount = snprintf(op, opleft, "%lu", (unsigned long)getULong(dp)); if (opcount >= opleft || opcount == -1) goto toobig; @@ -799,7 +799,7 @@ pretty_print_option(unsigned int code, u dp += 2; break; case 'S': - opcount = snprintf(op, opleft, "%d", + opcount = snprintf(op, opleft, "%u", getUShort(dp)); if (opcount >= opleft || opcount == -1) goto toobig; From owner-svn-src-stable-11@freebsd.org Mon May 22 12:28:21 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4C2AD78435; Mon, 22 May 2017 12:28:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABB8D16C4; Mon, 22 May 2017 12:28:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MCSKBU091334; Mon, 22 May 2017 12:28:20 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MCSK6t091333; Mon, 22 May 2017 12:28:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221228.v4MCSK6t091333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 12:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318636 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 12:28:22 -0000 Author: gjb Date: Mon May 22 12:28:20 2017 New Revision: 318636 URL: https://svnweb.freebsd.org/changeset/base/318636 Log: Fix typo and grammar. Submitted by: pfg Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 11:45:45 2017 (r318635) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 12:28:20 2017 (r318636) @@ -384,8 +384,8 @@ clock and choose between absolute and relative mode. The clang - nullability qualifier has been added to the - C library headers. + nullability qualifiers have been added to + the C library headers. Uses of the GNU __nonnull__ attribute have been replaced From owner-svn-src-stable-11@freebsd.org Mon May 22 12:35:32 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDD11D78634; Mon, 22 May 2017 12:35:32 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D64B1BD6; Mon, 22 May 2017 12:35:32 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MCZV6q095335; Mon, 22 May 2017 12:35:31 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MCZVNK095334; Mon, 22 May 2017 12:35:31 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705221235.v4MCZVNK095334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 22 May 2017 12:35:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318637 - stable/11/sys/arm/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 12:35:32 -0000 Author: mmel Date: Mon May 22 12:35:31 2017 New Revision: 318637 URL: https://svnweb.freebsd.org/changeset/base/318637 Log: MFC r318530: Increase maximum text segment size. LLVM binaries are huge... Modified: stable/11/sys/arm/include/vmparam.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/include/vmparam.h ============================================================================== --- stable/11/sys/arm/include/vmparam.h Mon May 22 12:28:20 2017 (r318636) +++ stable/11/sys/arm/include/vmparam.h Mon May 22 12:35:31 2017 (r318637) @@ -42,7 +42,7 @@ * Virtual memory related constants, all in bytes */ #ifndef MAXTSIZ -#define MAXTSIZ (64UL*1024*1024) /* max text size */ +#define MAXTSIZ (256UL*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ #define DFLDSIZ (128UL*1024*1024) /* initial data size limit */ From owner-svn-src-stable-11@freebsd.org Mon May 22 13:00:11 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EC41D78A5E; Mon, 22 May 2017 13:00:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58DC5162B; Mon, 22 May 2017 13:00:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MD0AJs003864; Mon, 22 May 2017 13:00:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MD0Af3003863; Mon, 22 May 2017 13:00:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221300.v4MD0Af3003863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318638 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:00:11 -0000 Author: gjb Date: Mon May 22 13:00:10 2017 New Revision: 318638 URL: https://svnweb.freebsd.org/changeset/base/318638 Log: Document r318472, LDD enabled by default on arm64. Submitted by: andrew Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 12:35:31 2017 (r318637) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:10 2017 (r318638) @@ -174,6 +174,11 @@ WITH_LLD_AS_LD build knob has been added, which installs LLD as /usr/bin/ld if set. + + + LDD has been enabled by default and + installed as /usr/bin/ld on + &os;/&arch.arm64;. From owner-svn-src-stable-11@freebsd.org Mon May 22 13:00:12 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80793D78A64; Mon, 22 May 2017 13:00:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39D001634; Mon, 22 May 2017 13:00:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MD0BtS003909; Mon, 22 May 2017 13:00:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MD0BiP003907; Mon, 22 May 2017 13:00:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221300.v4MD0BiP003907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318639 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:00:12 -0000 Author: gjb Date: Mon May 22 13:00:11 2017 New Revision: 318639 URL: https://svnweb.freebsd.org/changeset/base/318639 Log: Document r309312, PCI passthrough enabled on Hyper-V VMs. Document r314091, hv_netvsc(4) SR-IOV/VF support. Document r316272, Hyper-V Gen 2 support. Document r317119, Hyper-V synthetic keyboard support. Submitted by: sephe Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:10 2017 (r318638) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:11 2017 (r318639) @@ -646,6 +646,25 @@ sponsor="&chelsio;">PCI passthrough with &man.bhyve.4; resets functions via FLR when a virtual machine is started and stopped. + + PCI passthrough support has + been enabled on &os; virtual machines running on + Microsoft® Hyper-V™. + + The + &man.hv.netvsc.4; driver SR-IOV + implementation has been updated to support Virtual Function + (VF) devices, such as the Mellanox® + Connect-X3™ network card. + + Support + for Microsoft® Hyper-V™ Generation 2 virtual + machines has been added. + + Support + for synthetic keyboards has been added for virtual machines + running on Microsoft® Hyper-V™. From owner-svn-src-stable-11@freebsd.org Mon May 22 13:16:00 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 726DED781F1; Mon, 22 May 2017 13:16:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43E9B1172; Mon, 22 May 2017 13:16:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MDFx1M011645; Mon, 22 May 2017 13:15:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MDFxJR011644; Mon, 22 May 2017 13:15:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221315.v4MDFxJR011644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318640 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:16:00 -0000 Author: gjb Date: Mon May 22 13:15:59 2017 New Revision: 318640 URL: https://svnweb.freebsd.org/changeset/base/318640 Log: Fix typo: s/LDD/LLD/ Spotted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:00:11 2017 (r318639) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:15:59 2017 (r318640) @@ -176,7 +176,7 @@ /usr/bin/ld if set. - LDD has been enabled by default and + LLD has been enabled by default and installed as /usr/bin/ld on &os;/&arch.arm64;. From owner-svn-src-stable-11@freebsd.org Mon May 22 13:27:33 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E5FBD7870C; Mon, 22 May 2017 13:27:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DE201B0E; Mon, 22 May 2017 13:27:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MDRW0G016373; Mon, 22 May 2017 13:27:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MDRWMU016372; Mon, 22 May 2017 13:27:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221327.v4MDRWMU016372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318642 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:27:33 -0000 Author: gjb Date: Mon May 22 13:27:31 2017 New Revision: 318642 URL: https://svnweb.freebsd.org/changeset/base/318642 Log: Document r315514, if_ipsec(4) addition. Submitted by: ae Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:21:28 2017 (r318641) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:27:31 2017 (r318642) @@ -602,6 +602,12 @@ sponsor="&netgate;">The &man.etherswitch.4; driver has been updated to support RTL8366RB and RTL8366SR cards. + The + &man.if.ipsec.4; virtual tunneling interface has been added, + implementing route-based VPNs protected + with Encapsulating Security Payload + (ESP). + The &man.qlnxe.4; driver has been added, providing support for Cavium® Qlogic™ 45000 Series adapters. From owner-svn-src-stable-11@freebsd.org Mon May 22 13:56:36 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F048D78F41; Mon, 22 May 2017 13:56:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2FC11EFE; Mon, 22 May 2017 13:56:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MDuYF1029322; Mon, 22 May 2017 13:56:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MDuYHp029321; Mon, 22 May 2017 13:56:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221356.v4MDuYHp029321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 13:56:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318644 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:56:36 -0000 Author: gjb Date: Mon May 22 13:56:34 2017 New Revision: 318644 URL: https://svnweb.freebsd.org/changeset/base/318644 Log: Document r318576, efivar(8) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:55:59 2017 (r318643) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 22 13:56:34 2017 (r318644) @@ -230,6 +230,10 @@ The &man.daemon.8; utility has been updated to allow redirecting &man.stdout.4; and &man.stderr.4; output to &man.syslog.3; or to a file. + + The + &man.efivar.8; utility has been added, providing an interface + to manage UEFI variables. From owner-svn-src-stable-11@freebsd.org Mon May 22 15:12:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EE40D78C40; Mon, 22 May 2017 15:12:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03C87183C; Mon, 22 May 2017 15:12:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MFCojF062475; Mon, 22 May 2017 15:12:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MFCodE062474; Mon, 22 May 2017 15:12:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705221512.v4MFCodE062474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 22 May 2017 15:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318648 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 15:12:51 -0000 Author: asomers Date: Mon May 22 15:12:49 2017 New Revision: 318648 URL: https://svnweb.freebsd.org/changeset/base/318648 Log: MFC r318189: vdev_geom may associate multiple vdevs per g_consumer vdev_geom.c currently uses the g_consumer's private field to point to a vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For example, when you remove a disk, the vdev's status will change to REMOVED. However, vdev_geom will sometimes attach multiple vdevs to the same GEOM consumer. If this happens, then geom events will only be propagated to one of the vdevs. Fix this by storing a linked list of vdevs in g_consumer's private field. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c * g_consumer.private now stores a linked list of vdev pointers associated with the consumer instead of just a single vdev pointer. * Change vdev_geom_set_physpath's signature to more closely match vdev_geom_set_rotation_rate * Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed that we've already accessed the consumer by the time we get here. * Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it in vdev_geom_open, after we know that the open has succeeded. PR: 218634 Reviewed by: gibbs Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10391 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon May 22 14:46:13 2017 (r318647) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon May 22 15:12:49 2017 (r318648) @@ -49,6 +49,16 @@ struct g_class zfs_vdev_class = { .attrchanged = vdev_geom_attrchanged, }; +struct consumer_vdev_elem { + SLIST_ENTRY(consumer_vdev_elem) elems; + vdev_t *vd; +}; + +SLIST_HEAD(consumer_priv_t, consumer_vdev_elem); +_Static_assert(sizeof(((struct g_consumer*)NULL)->private) + == sizeof(struct consumer_priv_t*), + "consumer_priv_t* can't be stored in g_consumer.private"); + DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev); SYSCTL_DECL(_vfs_zfs_vdev); @@ -85,21 +95,16 @@ vdev_geom_set_rotation_rate(vdev_t *vd, } static void -vdev_geom_set_physpath(struct g_consumer *cp, boolean_t do_null_update) +vdev_geom_set_physpath(vdev_t *vd, struct g_consumer *cp, + boolean_t do_null_update) { boolean_t needs_update = B_FALSE; - vdev_t *vd; char *physpath; int error, physpath_len; - if (g_access(cp, 1, 0, 0) != 0) - return; - - vd = cp->private; physpath_len = MAXPATHLEN; physpath = g_malloc(physpath_len, M_WAITOK|M_ZERO); error = g_io_getattr("GEOM::physpath", cp, &physpath_len, physpath); - g_access(cp, -1, 0, 0); if (error == 0) { char *old_physpath; @@ -130,37 +135,40 @@ vdev_geom_set_physpath(struct g_consumer static void vdev_geom_attrchanged(struct g_consumer *cp, const char *attr) { - vdev_t *vd; char *old_physpath; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; int error; - vd = cp->private; - if (vd == NULL) + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) return; - if (strcmp(attr, "GEOM::rotation_rate") == 0) { - vdev_geom_set_rotation_rate(vd, cp); - return; - } - - if (strcmp(attr, "GEOM::physpath") == 0) { - vdev_geom_set_physpath(cp, /*do_null_update*/B_TRUE); - return; + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + if (strcmp(attr, "GEOM::rotation_rate") == 0) { + vdev_geom_set_rotation_rate(vd, cp); + return; + } + if (strcmp(attr, "GEOM::physpath") == 0) { + vdev_geom_set_physpath(vd, cp, /*null_update*/B_TRUE); + return; + } } } static void vdev_geom_orphan(struct g_consumer *cp) { - vdev_t *vd; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; g_topology_assert(); - vd = cp->private; - if (vd == NULL) { + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) /* Vdev close in progress. Ignore the event. */ return; - } /* * Orphan callbacks occur from the GEOM event thread. @@ -176,8 +184,12 @@ vdev_geom_orphan(struct g_consumer *cp) * async removal support to invoke a close on this * vdev once it is safe to do so. */ - vd->vdev_remove_wanted = B_TRUE; - spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + + vd->vdev_remove_wanted = B_TRUE; + spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + } } static struct g_consumer * @@ -265,21 +277,8 @@ vdev_geom_attach(struct g_provider *pp, } } - /* - * BUG: cp may already belong to a vdev. This could happen if: - * 1) That vdev is a shared spare, or - * 2) We are trying to reopen a missing vdev and we are scanning by - * guid. In that case, we'll ultimately fail to open this consumer, - * but not until after setting the private field. - * The solution is to: - * 1) Don't set the private field until after the open succeeds, and - * 2) Set it to a linked list of vdevs, not just a single vdev - */ - cp->private = vd; - if (vd != NULL) { + if (vd != NULL) vd->vdev_tsd = cp; - vdev_geom_set_physpath(cp, /*do_null_update*/B_FALSE); - } cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; return (cp); @@ -289,16 +288,12 @@ static void vdev_geom_detach(struct g_consumer *cp, boolean_t open_for_read) { struct g_geom *gp; - vdev_t *vd; g_topology_assert(); ZFS_LOG(1, "Detaching from %s.", cp->provider && cp->provider->name ? cp->provider->name : "NULL"); - vd = cp->private; - cp->private = NULL; - gp = cp->geom; if (open_for_read) g_access(cp, -1, 0, -1); @@ -324,16 +319,26 @@ static void vdev_geom_close_locked(vdev_t *vd) { struct g_consumer *cp; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem, *elem_temp; g_topology_assert(); cp = vd->vdev_tsd; - vd->vdev_tsd = NULL; vd->vdev_delayed_close = B_FALSE; if (cp == NULL) return; ZFS_LOG(1, "Closing access to %s.", cp->provider->name); + KASSERT(cp->private != NULL, ("%s: cp->private is NULL", __func__)); + priv = (struct consumer_priv_t*)&cp->private; + vd->vdev_tsd = NULL; + SLIST_FOREACH_SAFE(elem, priv, elems, elem_temp) { + if (elem->vd == vd) { + SLIST_REMOVE(priv, elem, consumer_vdev_elem, elems); + g_free(elem); + } + } vdev_geom_detach(cp, B_TRUE); } @@ -870,11 +875,27 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi cp = NULL; } } + if (cp != NULL) { + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; + + priv = (struct consumer_priv_t*)&cp->private; + if (cp->private == NULL) + SLIST_INIT(priv); + elem = g_malloc(sizeof(*elem), M_WAITOK|M_ZERO); + elem->vd = vd; + SLIST_INSERT_HEAD(priv, elem, elems); + } /* Fetch initial physical path information for this device. */ - if (cp != NULL) + if (cp != NULL) { vdev_geom_attrchanged(cp, "GEOM::physpath"); + /* Set other GEOM characteristics */ + vdev_geom_set_physpath(vd, cp, /*do_null_update*/B_FALSE); + vdev_geom_set_rotation_rate(vd, cp); + } + g_topology_unlock(); PICKUP_GIANT(); if (cp == NULL) { @@ -905,11 +926,6 @@ skip_open: */ vd->vdev_nowritecache = B_FALSE; - /* - * Determine the device's rotation rate. - */ - vdev_geom_set_rotation_rate(vd, cp); - return (0); } From owner-svn-src-stable-11@freebsd.org Mon May 22 15:51:18 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C338ED78B4A; Mon, 22 May 2017 15:51:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 932481F88; Mon, 22 May 2017 15:51:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MFpHTF075532; Mon, 22 May 2017 15:51:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MFpHAh075531; Mon, 22 May 2017 15:51:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221551.v4MFpHAh075531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 15:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318650 - in stable: 10/usr.bin/grep 11/usr.bin/grep X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 15:51:18 -0000 Author: gjb Date: Mon May 22 15:51:17 2017 New Revision: 318650 URL: https://svnweb.freebsd.org/changeset/base/318650 Log: MFC r313955 (emaste): bsdgrep: document ignored option -u MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if running on an UNIX system." The option has no effect on systems that do not use CRLF line endings. PR: 171200 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.bin/grep/grep.1 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/grep/grep.1 Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.bin/grep/grep.1 ============================================================================== --- stable/11/usr.bin/grep/grep.1 Mon May 22 15:29:10 2017 (r318649) +++ stable/11/usr.bin/grep/grep.1 Mon May 22 15:51:17 2017 (r318650) @@ -352,6 +352,8 @@ Nonexistent and unreadable files are ign (i.e. their error messages are suppressed). .It Fl U , Fl Fl binary Search binary files, but do not attempt to print them. +.It Fl u +This option has no effect and is provided only for compatibility with GNU grep. .It Fl V , Fl Fl version Display version information and exit. .It Fl v , Fl Fl invert-match From owner-svn-src-stable-11@freebsd.org Mon May 22 16:07:18 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDC76D78FA7; Mon, 22 May 2017 16:07:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD1C21D0C; Mon, 22 May 2017 16:07:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MG7Hoh084083; Mon, 22 May 2017 16:07:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MG7HnY084082; Mon, 22 May 2017 16:07:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221607.v4MG7HnY084082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 16:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318652 - stable/11/etc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 16:07:19 -0000 Author: gjb Date: Mon May 22 16:07:17 2017 New Revision: 318652 URL: https://svnweb.freebsd.org/changeset/base/318652 Log: MFC r307469 (imp): Allow root_rw_mount to be both lower and upper case. Before, if it was upper case, you'd wind up with a read-only filesystem when you should sometimes. PR: 213549 Sponsored by: The FreeBSD Foundation Modified: stable/11/etc/rc Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc ============================================================================== --- stable/11/etc/rc Mon May 22 15:53:30 2017 (r318651) +++ stable/11/etc/rc Mon May 22 16:07:17 2017 (r318652) @@ -135,16 +135,16 @@ done # Note: this assumes firstboot_sentinel is on / when we have # a read-only /, or that it is on media that's writable. if [ -e ${firstboot_sentinel} ]; then - [ ${root_rw_mount} = "yes" ] || mount -uw / + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -uw / chflags -R 0 ${firstboot_sentinel} rm -rf ${firstboot_sentinel} if [ -e ${firstboot_sentinel}-reboot ]; then chflags -R 0 ${firstboot_sentinel}-reboot rm -rf ${firstboot_sentinel}-reboot - [ ${root_rw_mount} = "yes" ] || mount -ur / + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur / kill -INT 1 fi - [ ${root_rw_mount} = "yes" ] || mount -ur / + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur / fi echo '' From owner-svn-src-stable-11@freebsd.org Mon May 22 16:11:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AEC7D7819C; Mon, 22 May 2017 16:11:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0C331187; Mon, 22 May 2017 16:11:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MGBkQt088088; Mon, 22 May 2017 16:11:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MGBkwZ088087; Mon, 22 May 2017 16:11:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221611.v4MGBkwZ088087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 16:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318653 - in stable: 10/usr.bin/sort 11/usr.bin/sort X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 16:11:48 -0000 Author: gjb Date: Mon May 22 16:11:46 2017 New Revision: 318653 URL: https://svnweb.freebsd.org/changeset/base/318653 Log: MFC r305613 (gabor): Fix typo. PR: 211245 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.bin/sort/sort.1.in Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/sort/sort.1.in Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.bin/sort/sort.1.in ============================================================================== --- stable/11/usr.bin/sort/sort.1.in Mon May 22 16:07:17 2017 (r318652) +++ stable/11/usr.bin/sort/sort.1.in Mon May 22 16:11:46 2017 (r318653) @@ -133,7 +133,7 @@ also checks that there are no lines with .It Fl s Stable sort. This option maintains the original record order of records that have -and equal key. +an equal key. This is a non-standard feature, but it is widely accepted and used. .It Fl Fl version Print the version and silently exits. From owner-svn-src-stable-11@freebsd.org Mon May 22 19:22:07 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBD56D79F27; Mon, 22 May 2017 19:22:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A574A1260; Mon, 22 May 2017 19:22:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJM6C3067103; Mon, 22 May 2017 19:22:06 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJM6tp067099; Mon, 22 May 2017 19:22:06 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705221922.v4MJM6tp067099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 22 May 2017 19:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318657 - in stable/11/sys: dev/qlnx/qlnxe modules/qlnx/qlnxe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:22:08 -0000 Author: davidcs Date: Mon May 22 19:22:06 2017 New Revision: 318657 URL: https://svnweb.freebsd.org/changeset/base/318657 Log: MFC r318382 1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for processing interrupts drops to around 1% for 100G and under 1% for other speeds. 2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN 3. remove unused mtx tx_lock 4. bind taskqueue kernel thread to the appropriate cpu core 5. when tx_ring is full, stop further transmits till at least 1/16th of the Tx Ring is empty. In our case 1K entries. Also if there are rx_pkts to process, put the taskqueue thread to sleep for 100ms, before enabling interrupts. 6. Use rx_pkt_threshold of 128. Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c stable/11/sys/dev/qlnx/qlnxe/qlnx_os.h stable/11/sys/modules/qlnx/qlnxe/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:22:06 2017 (r318657) @@ -191,6 +191,7 @@ struct qlnx_fastpath { struct mtx tx_mtx; char tx_mtx_name[32]; struct buf_ring *tx_br; + uint32_t tx_ring_full; struct task fp_task; struct taskqueue *fp_taskqueue; @@ -364,6 +365,8 @@ struct qlnx_host { /* debug */ uint32_t dbg_level; + uint32_t dbg_trace_lro_cnt; + uint32_t dbg_trace_tso_pkt_len; uint32_t dp_level; uint32_t dp_module; @@ -386,7 +389,6 @@ struct qlnx_host { /* tx related */ struct callout tx_callout; - struct mtx tx_lock; uint32_t txr_idx; /* rx related */ Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:22:06 2017 (r318657) @@ -382,16 +382,77 @@ qlnx_fp_taskqueue(void *context, int pen struct ifnet *ifp; struct mbuf *mp; int ret; + int lro_enable, tc; + int rx_int = 0, total_rx_count = 0; + struct thread *cthread; fp = context; if (fp == NULL) return; + cthread = curthread; + + thread_lock(cthread); + + if (!sched_is_bound(cthread)) + sched_bind(cthread, fp->rss_id); + + thread_unlock(cthread); + ha = (qlnx_host_t *)fp->edev; ifp = ha->ifp; + lro_enable = ha->ifp->if_capenable & IFCAP_LRO; + + rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, lro_enable); + + if (rx_int) { + fp->rx_pkts += rx_int; + total_rx_count += rx_int; + } + +#ifdef QLNX_SOFT_LRO + { + struct lro_ctrl *lro; + + lro = &fp->rxq->lro; + + if (lro_enable && total_rx_count) { + +#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) + + if (ha->dbg_trace_lro_cnt) { + if (lro->lro_mbuf_count & ~1023) + fp->lro_cnt_1024++; + else if (lro->lro_mbuf_count & ~511) + fp->lro_cnt_512++; + else if (lro->lro_mbuf_count & ~255) + fp->lro_cnt_256++; + else if (lro->lro_mbuf_count & ~127) + fp->lro_cnt_128++; + else if (lro->lro_mbuf_count & ~63) + fp->lro_cnt_64++; + } + tcp_lro_flush_all(lro); + +#else + struct lro_entry *queued; + + while ((!SLIST_EMPTY(&lro->lro_active))) { + queued = SLIST_FIRST(&lro->lro_active); + SLIST_REMOVE_HEAD(&lro->lro_active, next); + tcp_lro_flush(lro, queued); + } +#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ + } + } +#endif /* #ifdef QLNX_SOFT_LRO */ + + ecore_sb_update_sb_idx(fp->sb_info); + rmb(); + mtx_lock(&fp->tx_mtx); if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != @@ -401,13 +462,19 @@ qlnx_fp_taskqueue(void *context, int pen goto qlnx_fp_taskqueue_exit; } - (void)qlnx_tx_int(ha, fp, fp->txq[0]); + for (tc = 0; tc < ha->num_tc; tc++) { + (void)qlnx_tx_int(ha, fp, fp->txq[tc]); + } mp = drbr_peek(ifp, fp->tx_br); while (mp != NULL) { - ret = qlnx_send(ha, fp, &mp); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = qlnx_send(ha, fp, &mp); + } else { + ret = -1; + } if (ret) { @@ -428,14 +495,28 @@ qlnx_fp_taskqueue(void *context, int pen fp->tx_pkts_processed++; } + if (fp->tx_ring_full) + break; + mp = drbr_peek(ifp, fp->tx_br); } - (void)qlnx_tx_int(ha, fp, fp->txq[0]); + for (tc = 0; tc < ha->num_tc; tc++) { + (void)qlnx_tx_int(ha, fp, fp->txq[tc]); + } mtx_unlock(&fp->tx_mtx); qlnx_fp_taskqueue_exit: + if (rx_int) { + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + } else { + if (fp->tx_ring_full) { + qlnx_mdelay(__func__, 100); + } + ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); + } QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); return; @@ -504,7 +585,9 @@ qlnx_drain_fp_taskqueues(qlnx_host_t *ha fp = &ha->fp_array[i]; if (fp->fp_taskqueue != NULL) { + QLNX_UNLOCK(ha); taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + QLNX_LOCK(ha); } } return; @@ -540,7 +623,6 @@ qlnx_pci_attach(device_t dev) ha->pci_dev = dev; mtx_init(&ha->hw_lock, "qlnx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF); - mtx_init(&ha->tx_lock, "qlnx_tx_lock", MTX_NETWORK_LOCK, MTX_DEF); ha->flags.lock_init = 1; @@ -944,7 +1026,6 @@ qlnx_release(qlnx_host_t *ha) pci_release_msi(dev); if (ha->flags.lock_init) { - mtx_destroy(&ha->tx_lock); mtx_destroy(&ha->hw_lock); } @@ -1226,7 +1307,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h CTLFLAG_RD, &ha->fp_array[i].err_tx_cons_idx_conflict, "err_tx_cons_idx_conflict"); -#ifdef QLNX_TRACE_LRO_CNT SYSCTL_ADD_QUAD(ctx, node_children, OID_AUTO, "lro_cnt_64", CTLFLAG_RD, &ha->fp_array[i].lro_cnt_64, @@ -1251,7 +1331,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h OID_AUTO, "lro_cnt_1024", CTLFLAG_RD, &ha->fp_array[i].lro_cnt_1024, "lro_cnt_1024"); -#endif /* #ifdef QLNX_TRACE_LRO_CNT */ /* Rx Related */ @@ -1710,6 +1789,18 @@ qlnx_add_sysctls(qlnx_host_t *ha) OID_AUTO, "dp_level", CTLFLAG_RW, &ha->dp_level, ha->dp_level, "DP Level"); + ha->dbg_trace_lro_cnt = 0; + SYSCTL_ADD_UINT(ctx, children, + OID_AUTO, "dbg_trace_lro_cnt", CTLFLAG_RW, + &ha->dbg_trace_lro_cnt, ha->dbg_trace_lro_cnt, + "Trace LRO Counts"); + + ha->dbg_trace_tso_pkt_len = 0; + SYSCTL_ADD_UINT(ctx, children, + OID_AUTO, "dbg_trace_tso_pkt_len", CTLFLAG_RW, + &ha->dbg_trace_tso_pkt_len, ha->dbg_trace_tso_pkt_len, + "Trace TSO packet lengths"); + ha->dp_module = 0; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dp_module", CTLFLAG_RW, @@ -1755,7 +1846,7 @@ qlnx_add_sysctls(qlnx_host_t *ha) &ha->tx_coalesce_usecs, ha->tx_coalesce_usecs, "tx_coalesce_usecs"); - ha->rx_pkt_threshold = 32; + ha->rx_pkt_threshold = 128; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_pkt_threshold", CTLFLAG_RW, &ha->rx_pkt_threshold, ha->rx_pkt_threshold, @@ -2162,7 +2253,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd ifp->if_mtu = ifr->ifr_mtu; ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { qlnx_init_locked(ha); } @@ -2178,7 +2269,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd QLNX_LOCK(ha); if (ifp->if_flags & IFF_UP) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if ((ifp->if_flags ^ ha->if_flags) & IFF_PROMISC) { ret = qlnx_set_promisc(ha); @@ -2712,6 +2803,16 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f tx_data_bd = NULL; txq = fp->txq[0]; + + if (fp->tx_ring_full) { + elem_left = ecore_chain_get_elem_left(&txq->tx_pbl); + + if (elem_left < (TX_RING_SIZE >> 4)) + return (-1); + else + fp->tx_ring_full = 0; + } + idx = txq->sw_tx_prod; map = txq->sw_tx_ring[idx].map; @@ -2720,20 +2821,18 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (!fp->tx_tso_min_pkt_len) { - fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - } else { - if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len) + if (ha->dbg_trace_tso_pkt_len) { + if (!fp->tx_tso_min_pkt_len) { fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len) - fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len; + fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; + } else { + if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len) + fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; + if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len) + fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len; + } } -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ - if (m_head->m_pkthdr.csum_flags & CSUM_TSO) offset = qlnx_tcp_offset(ha, m_head); @@ -2815,14 +2914,12 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f QL_ASSERT(ha, (nsegs != 0), ("qlnx_send: empty packet")); -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (nsegs < QLNX_FP_MAX_SEGS) - fp->tx_pkts[(nsegs - 1)]++; - else - fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; - -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ + if (ha->dbg_trace_tso_pkt_len) { + if (nsegs < QLNX_FP_MAX_SEGS) + fp->tx_pkts[(nsegs - 1)]++; + else + fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; + } if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { @@ -2843,6 +2940,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f __func__, nsegs, elem_left, fp->rss_id)); fp->err_tx_nsegs_gt_elem_left++; + fp->tx_ring_full = 1; ha->storm_stats_enable = 1; return (ENOBUFS); } @@ -3051,15 +3149,13 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f first_bd->data.nbds = nbd; -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (fp->tx_tso_max_nsegs < nsegs) - fp->tx_tso_max_nsegs = nsegs; - - if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs)) - fp->tx_tso_min_nsegs = nsegs; + if (ha->dbg_trace_tso_pkt_len) { + if (fp->tx_tso_max_nsegs < nsegs) + fp->tx_tso_max_nsegs = nsegs; -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ + if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs)) + fp->tx_tso_min_nsegs = nsegs; + } txq->sw_tx_ring[idx].nsegs = nsegs; txq->sw_tx_prod = (txq->sw_tx_prod + 1) & (TX_RING_SIZE - 1); @@ -4188,11 +4284,9 @@ qlnx_fp_isr(void *arg) qlnx_ivec_t *ivec = arg; qlnx_host_t *ha; struct qlnx_fastpath *fp = NULL; - int idx, lro_enable, tc; - int rx_int = 0, total_rx_count = 0; + int idx; ha = ivec->ha; - lro_enable = ha->ifp->if_capenable & IFCAP_LRO; if (ha->state != QLNX_STATE_OPEN) { return; @@ -4214,73 +4308,8 @@ qlnx_fp_isr(void *arg) ha->err_fp_null++; } else { ecore_sb_ack(fp->sb_info, IGU_INT_DISABLE, 0); - - do { - for (tc = 0; tc < ha->num_tc; tc++) { - if (mtx_trylock(&fp->tx_mtx)) { - qlnx_tx_int(ha, fp, fp->txq[tc]); - mtx_unlock(&fp->tx_mtx); - } - } - - rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, - lro_enable); - - if (rx_int) { - fp->rx_pkts += rx_int; - total_rx_count += rx_int; - } - - } while (rx_int); - - -#ifdef QLNX_SOFT_LRO - { - struct lro_ctrl *lro; - - lro = &fp->rxq->lro; - - if (lro_enable && total_rx_count) { - -#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) - -#ifdef QLNX_TRACE_LRO_CNT - if (lro->lro_mbuf_count & ~1023) - fp->lro_cnt_1024++; - else if (lro->lro_mbuf_count & ~511) - fp->lro_cnt_512++; - else if (lro->lro_mbuf_count & ~255) - fp->lro_cnt_256++; - else if (lro->lro_mbuf_count & ~127) - fp->lro_cnt_128++; - else if (lro->lro_mbuf_count & ~63) - fp->lro_cnt_64++; -#endif /* #ifdef QLNX_TRACE_LRO_CNT */ - - tcp_lro_flush_all(lro); - -#else - struct lro_entry *queued; - - while ((!SLIST_EMPTY(&lro->lro_active))) { - queued = SLIST_FIRST(&lro->lro_active); - SLIST_REMOVE_HEAD(&lro->lro_active, \ - next); - tcp_lro_flush(lro, queued); - } -#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ - } - } -#endif /* #ifdef QLNX_SOFT_LRO */ - - if (fp->fp_taskqueue != NULL) - taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); - - ecore_sb_update_sb_idx(fp->sb_info); - rmb(); - ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); - - return; + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); } return; @@ -5150,6 +5179,8 @@ qlnx_init_fp(qlnx_host_t *ha) snprintf(fp->name, sizeof(fp->name), "%s-fp-%d", qlnx_name_str, rss_id); + fp->tx_ring_full = 0; + /* reset all the statistics counters */ fp->tx_pkts_processed = 0; Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_os.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_os.h Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_os.h Mon May 22 19:22:06 2017 (r318657) @@ -92,6 +92,7 @@ #include #include #include +#include static __inline int qlnx_ms_to_hz(int ms) { @@ -138,10 +139,6 @@ MALLOC_DECLARE(M_QLNXBUF); #define QLNX_LOCK(ha) mtx_lock(&ha->hw_lock) #define QLNX_UNLOCK(ha) mtx_unlock(&ha->hw_lock) - -#define QLNX_TX_LOCK(ha) mtx_lock(&ha->tx_lock); -#define QLNX_TX_UNLOCK(ha) mtx_unlock(&ha->tx_lock); - /* * structure encapsulating a DMA buffer */ Modified: stable/11/sys/modules/qlnx/qlnxe/Makefile ============================================================================== --- stable/11/sys/modules/qlnx/qlnxe/Makefile Mon May 22 19:06:39 2017 (r318656) +++ stable/11/sys/modules/qlnx/qlnxe/Makefile Mon May 22 19:22:06 2017 (r318657) @@ -63,8 +63,6 @@ CFLAGS += -DECORE_CONFIG_DIRECT_HWFN #CFLAGS += -DQLNX_SOFT_LRO #CFLAGS += -DQLNX_QSORT_LRO #CFLAGS += -DQLNX_MAX_COALESCE -#CFLAGS += -DQLNX_TRACE_LRO_CNT -#CFLAGS += -DQLNX_TRACE_TSO_PKT_LEN .include From owner-svn-src-stable-11@freebsd.org Mon May 22 19:28:40 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30EA6D7810D; Mon, 22 May 2017 19:28:40 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE90D176A; Mon, 22 May 2017 19:28:39 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJSdHb068320; Mon, 22 May 2017 19:28:39 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJScfL068317; Mon, 22 May 2017 19:28:38 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705221928.v4MJScfL068317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 22 May 2017 19:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318659 - stable/11/sys/dev/qlnx/qlnxe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:28:40 -0000 Author: davidcs Date: Mon May 22 19:28:38 2017 New Revision: 318659 URL: https://svnweb.freebsd.org/changeset/base/318659 Log: MFC r318383 QL_DPRINT macro modfied to handle multiple args; print line#. Submitted by:Shminderjit.Singh@cavium.com Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:28:24 2017 (r318658) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:28:38 2017 (r318659) @@ -483,35 +483,141 @@ typedef struct qlnx_host qlnx_host_t; #ifdef QLNX_DEBUG -#define QL_DPRINT1(ha, x) if (ha->dbg_level & 0x0001) device_printf x -#define QL_DPRINT2(ha, x) if (ha->dbg_level & 0x0002) device_printf x -#define QL_DPRINT3(ha, x) if (ha->dbg_level & 0x0004) device_printf x -#define QL_DPRINT4(ha, x) if (ha->dbg_level & 0x0008) device_printf x -#define QL_DPRINT5(ha, x) if (ha->dbg_level & 0x0010) device_printf x -#define QL_DPRINT6(ha, x) if (ha->dbg_level & 0x0020) device_printf x -#define QL_DPRINT7(ha, x) if (ha->dbg_level & 0x0040) device_printf x -#define QL_DPRINT8(ha, x) if (ha->dbg_level & 0x0080) device_printf x -#define QL_DPRINT9(ha, x) if (ha->dbg_level & 0x0100) device_printf x -#define QL_DPRINT11(ha, x) if (ha->dbg_level & 0x0400) device_printf x -#define QL_DPRINT12(ha, x) if (ha->dbg_level & 0x0800) device_printf x -#define QL_DPRINT13(ha, x) if (ha->dbg_level & 0x1000) device_printf x -#define QL_DPRINT14(ha, x) if (ha->dbg_level & 0x2000) device_printf x +#define QL_DPRINT1(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0001) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT2(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0002) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT3(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0004) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT4(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0008) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT5(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0010) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT6(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0020) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT7(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0040) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT8(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0080) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT9(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0100) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT11(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0400) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT12(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0800) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT13(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x1000) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + #else -#define QL_DPRINT1(ha, x) -#define QL_DPRINT2(ha, x) -#define QL_DPRINT3(ha, x) -#define QL_DPRINT4(ha, x) -#define QL_DPRINT5(ha, x) -#define QL_DPRINT6(ha, x) -#define QL_DPRINT7(ha, x) -#define QL_DPRINT8(ha, x) -#define QL_DPRINT9(ha, x) -#define QL_DPRINT11(ha, x) -#define QL_DPRINT12(ha, x) -#define QL_DPRINT13(ha, x) -#define QL_DPRINT14(ha, x) +#define QL_DPRINT1(ha, x, ...) +#define QL_DPRINT2(ha, x, ...) +#define QL_DPRINT3(ha, x, ...) +#define QL_DPRINT4(ha, x, ...) +#define QL_DPRINT5(ha, x, ...) +#define QL_DPRINT6(ha, x, ...) +#define QL_DPRINT7(ha, x, ...) +#define QL_DPRINT8(ha, x, ...) +#define QL_DPRINT9(ha, x, ...) +#define QL_DPRINT11(ha, x, ...) +#define QL_DPRINT12(ha, x, ...) +#define QL_DPRINT13(ha, x, ...) #endif /* #ifdef QLNX_DEBUG */ Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Mon May 22 19:28:24 2017 (r318658) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Mon May 22 19:28:38 2017 (r318659) @@ -121,8 +121,7 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : ecore_ptt_acquire failed\n", - __func__)); + QL_DPRINT1(ha,"ecore_ptt_acquire failed\n"); return (rval); } @@ -133,9 +132,8 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t rval = 0; ha->grcdump_taken = 1; } else - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_dbg_grc_dump failed [%d, 0x%x]\n", - __func__, hwfn_index, rval)); + QL_DPRINT1(ha,"ecore_dbg_grc_dump failed [%d, 0x%x]\n", + hwfn_index, rval); ecore_ptt_release(p_hwfn, p_ptt); @@ -177,8 +175,7 @@ qlnx_get_grc_dump(qlnx_host_t *ha, qlnx_ grcdump->grcdump_dwords[i] = dwords; - QL_DPRINT1(ha, (ha->pci_dev, "%s: grcdump_dwords[%d] = 0x%x\n", - __func__, i, dwords)); + QL_DPRINT1(ha,"grcdump_dwords[%d] = 0x%x\n", i, dwords); rval = copyout(ha->grcdump[i], grcdump->grcdump[i], ha->grcdump_size[i]); @@ -213,8 +210,7 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_ptt_acquire failed\n", __func__)); + QL_DPRINT1(ha,"ecore_ptt_acquire failed\n"); return (rval); } @@ -225,9 +221,8 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t rval = 0; ha->idle_chk_taken = 1; } else - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n", - __func__, hwfn_index, rval)); + QL_DPRINT1(ha,"ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n", + hwfn_index, rval); ecore_ptt_release(p_hwfn, p_ptt); @@ -271,8 +266,7 @@ qlnx_get_idle_chk(qlnx_host_t *ha, qlnx_ idle_chk->idle_chk_dwords[i] = dwords; - QL_DPRINT1(ha, (ha->pci_dev, "%s: idle_chk_dwords[%d] = 0x%x\n", - __func__, i, dwords)); + QL_DPRINT1(ha,"idle_chk_dwords[%d] = 0x%x\n", i, dwords); rval = copyout(ha->idle_chk[i], idle_chk->idle_chk[i], ha->idle_chk_size[i]); @@ -299,9 +293,8 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha, p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: ecore_ptt_acquire [%d, 0x%x]failed\n", - __func__, hwfn_index, cmd)); + QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n", + hwfn_index, cmd); return (0); } @@ -334,8 +327,7 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha, } if (rval != DBG_STATUS_OK) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n", - __func__, cmd, rval)); + QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", cmd, rval); num_dwords = 0; } @@ -369,9 +361,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn buffer = qlnx_zalloc(trace->size[hwfn_index]); if (buffer == NULL) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: qlnx_zalloc [%d, 0x%x]failed\n", - __func__, hwfn_index, trace->cmd)); + QL_DPRINT1(ha,"qlnx_zalloc [%d, 0x%x]failed\n", + hwfn_index, trace->cmd); return (ENXIO); } ecore_dbg_set_app_ver(ecore_dbg_get_fw_func_ver()); @@ -380,9 +371,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: ecore_ptt_acquire [%d, 0x%x]failed\n", - __func__, hwfn_index, trace->cmd)); + QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n", + hwfn_index, trace->cmd); return (ENXIO); } @@ -420,8 +410,7 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn } if (rval != DBG_STATUS_OK) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n", - __func__, trace->cmd, rval)); + QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", trace->cmd, rval); num_dwords = 0; } @@ -609,21 +598,18 @@ qlnx_write_nvram(qlnx_host_t *ha, qlnx_n ret = copyin(nvram->data, buf, nvram->data_len); - QL_DPRINT9(ha, - (ha->pci_dev, "%s: issue cmd = 0x%x data = %p " - " data_len = 0x%x ret = 0x%x exit\n", __func__, - cmd, nvram->data, nvram->data_len, ret)); + QL_DPRINT9(ha, "issue cmd = 0x%x data = %p \ + data_len = 0x%x ret = 0x%x exit\n", + cmd, nvram->data, nvram->data_len, ret); if (ret == 0) { ret = ecore_mcp_nvm_write(&ha->cdev, cmd, nvram->offset, buf, nvram->data_len); } - QL_DPRINT9(ha, - (ha->pci_dev, "%s: cmd = 0x%x data = %p " - " data_len = 0x%x resp = 0x%x ret = 0x%x exit\n", - __func__, cmd, nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "cmd = 0x%x data = %p \ + data_len = 0x%x resp = 0x%x ret = 0x%x exit\n", + cmd, nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); free(buf, M_QLNXBUF); @@ -644,10 +630,9 @@ qlnx_read_nvram(qlnx_host_t *ha, qlnx_nv ret = ecore_mcp_nvm_read(&ha->cdev, nvram->offset, buf, nvram->data_len); - QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x " - " resp = 0x%x ret = 0x%x exit\n", __func__, - nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, " data = %p data_len = 0x%x \ + resp = 0x%x ret = 0x%x exit\n", + nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); if (ret == 0) { ret = copyout(buf, nvram->data, nvram->data_len); @@ -672,10 +657,9 @@ qlnx_get_nvram_resp(qlnx_host_t *ha, qln ret = ecore_mcp_nvm_resp(&ha->cdev, buf); - QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x " - " resp = 0x%x ret = 0x%x exit\n", __func__, - nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "data = %p data_len = 0x%x \ + resp = 0x%x ret = 0x%x exit\n", + nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); if (ret == 0) { ret = copyout(buf, nvram->data, nvram->data_len); @@ -708,28 +692,25 @@ qlnx_nvram(qlnx_host_t *ha, qlnx_nvram_t case QLNX_NVRAM_CMD_SET_SECURE_MODE: ret = ecore_mcp_nvm_set_secure_mode(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_SET_SECURE_MODE " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_SET_SECURE_MODE \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_DEL_FILE: ret = ecore_mcp_nvm_del_file(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_DEL_FILE " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_DEL_FILE \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_PUT_FILE_BEGIN: ret = ecore_mcp_nvm_put_file_begin(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_PUT_FILE_BEGIN " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_PUT_FILE_BEGIN \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_GET_NVRAM_RESP: Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:28:24 2017 (r318658) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:28:38 2017 (r318659) @@ -303,7 +303,7 @@ qlnx_sp_intr(void *arg) ha = (qlnx_host_t *)p_hwfn->p_dev; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < ha->cdev.num_hwfns; i++) { if (&ha->cdev.hwfns[i] == p_hwfn) { @@ -311,7 +311,7 @@ qlnx_sp_intr(void *arg) break; } } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -353,8 +353,7 @@ qlnx_create_sp_taskqueues(qlnx_host_t *h taskqueue_start_threads(&ha->sp_taskqueue[i], 1, PI_NET, "%s", tq_name); - QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, - ha->sp_taskqueue[i])); + QL_DPRINT1(ha, "%p\n", ha->sp_taskqueue[i]); } return (0); @@ -518,7 +517,7 @@ qlnx_fp_taskqueue_exit: ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + QL_DPRINT2(ha, "exit ret = %d\n", ret); return; } @@ -548,8 +547,7 @@ qlnx_create_fp_taskqueues(qlnx_host_t *h taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s", tq_name); - QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, - fp->fp_taskqueue)); + QL_DPRINT1(ha, "%p\n",fp->fp_taskqueue); } return (0); @@ -711,15 +709,14 @@ qlnx_pci_attach(device_t dev) else ha->num_rss = ha->msix_count - ha->cdev.num_hwfns; - QL_DPRINT1(ha, (dev, "%s:\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]" + QL_DPRINT1(ha, "\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]" "\n\t\t\tdbells [%p, 0x%08x 0x%08x]" "\n\t\t\tmsix [%p, 0x%08x 0x%08x 0x%x 0x%x]" "\n\t\t\t[ncpus = %d][num_rss = 0x%x] [num_tc = 0x%x]\n", - __func__, ha->pci_reg, rsrc_len_reg, + ha->pci_reg, rsrc_len_reg, ha->reg_rid, ha->pci_dbells, rsrc_len_dbells, ha->dbells_rid, ha->msix_bar, rsrc_len_msix, ha->msix_rid, pci_msix_count(dev), - ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc)); - + ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc); if (pci_alloc_msix(dev, &ha->msix_count)) { device_printf(dev, "%s: pci_alloc_msix[%d] failed\n", __func__, ha->msix_count); @@ -755,9 +752,9 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; } - QL_DPRINT1(ha, (dev, "%s: p_hwfn [%p] sp_irq_rid %d" - " sp_irq %p sp_handle %p\n", __func__, p_hwfn, - ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i])); + QL_DPRINT1(ha, "p_hwfn [%p] sp_irq_rid %d" + " sp_irq %p sp_handle %p\n", p_hwfn, + ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i]); } @@ -800,8 +797,8 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; ha->grcdump_size[i] = ha->grcdump_size[i] << 2; - QL_DPRINT1(ha, (dev, "grcdump_size[%d] = 0x%08x\n", - i, ha->grcdump_size[i])); + QL_DPRINT1(ha, "grcdump_size[%d] = 0x%08x\n", + i, ha->grcdump_size[i]); ha->grcdump[i] = qlnx_zalloc(ha->grcdump_size[i]); if (ha->grcdump[i] == NULL) { @@ -815,8 +812,8 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; ha->idle_chk_size[i] = ha->idle_chk_size[i] << 2; - QL_DPRINT1(ha, (dev, "idle_chk_size[%d] = 0x%08x\n", - i, ha->idle_chk_size[i])); + QL_DPRINT1(ha, "idle_chk_size[%d] = 0x%08x\n", + i, ha->idle_chk_size[i]); ha->idle_chk[i] = qlnx_zalloc(ha->idle_chk_size[i]); @@ -855,8 +852,8 @@ qlnx_pci_attach(device_t dev) FW_MAJOR_VERSION, FW_MINOR_VERSION, FW_REVISION_VERSION, FW_ENGINEERING_VERSION); - QL_DPRINT1(ha, (dev, "%s: STORM_FW version %s MFW version %s\n", - __func__, ha->stormfw_ver, ha->mfw_ver)); + QL_DPRINT1(ha, "STORM_FW version %s MFW version %s\n", + ha->stormfw_ver, ha->mfw_ver); qlnx_init_ifnet(dev, ha); @@ -874,7 +871,7 @@ qlnx_pci_attach_err0: goto qlnx_pci_attach_err; } - QL_DPRINT2(ha, (dev, "%s: success\n", __func__)); + QL_DPRINT2(ha, "success\n"); return (0); @@ -958,7 +955,7 @@ qlnx_release(qlnx_host_t *ha) dev = ha->pci_dev; - QL_DPRINT2(ha, (dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < QLNX_MAX_HW_FUNCS; i++) { if (ha->idle_chk[i] != NULL) { @@ -1041,7 +1038,7 @@ qlnx_release(qlnx_host_t *ha) (void) bus_release_resource(dev, SYS_RES_MEMORY, ha->msix_rid, ha->msix_bar); - QL_DPRINT2(ha, (dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -1053,14 +1050,14 @@ qlnx_trigger_dump(qlnx_host_t *ha) if (ha->ifp != NULL) ha->ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QL_DPRINT2(ha, (ha->pci_dev, "%s: start\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < ha->cdev.num_hwfns; i++) { qlnx_grc_dump(ha, &ha->grcdump_dwords[i], i); qlnx_idle_chk(ha, &ha->idle_chk_dwords[i], i); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: end\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -1779,12 +1776,11 @@ qlnx_add_sysctls(qlnx_host_t *ha) "\tpersonality = 6 => Default in Shared Memory\n"); ha->dbg_level = 0; - SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "debug", CTLFLAG_RW, &ha->dbg_level, ha->dbg_level, "Debug Level"); - ha->dp_level = 0; + ha->dp_level = 0x01; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dp_level", CTLFLAG_RW, &ha->dp_level, ha->dp_level, "DP Level"); @@ -1999,7 +1995,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_ ifmedia_set(&ha->media, (IFM_ETHER | IFM_AUTO)); - QL_DPRINT2(ha, (dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2009,6 +2005,8 @@ qlnx_init_locked(qlnx_host_t *ha) { struct ifnet *ifp = ha->ifp; + QL_DPRINT1(ha, "Driver Initialization start \n"); + qlnx_stop(ha); if (qlnx_load(ha) == 0) { @@ -2026,13 +2024,13 @@ qlnx_init(void *arg) ha = (qlnx_host_t *)arg; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); QLNX_LOCK(ha); qlnx_init_locked(ha); QLNX_UNLOCK(ha); - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2221,8 +2219,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd switch (cmd) { case SIOCSIFADDR: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFADDR (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd); if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; @@ -2231,10 +2228,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd qlnx_init_locked(ha); QLNX_UNLOCK(ha); } - QL_DPRINT4(ha, (ha->pci_dev, - "%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", - __func__, cmd, - ntohl(IA_SIN(ifa)->sin_addr.s_addr))); + QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", + cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); arp_ifinit(ifp, ifa); } else { @@ -2243,8 +2238,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFMTU: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFMTU (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFMTU (0x%lx)\n", cmd); if (ifr->ifr_mtu > QLNX_MAX_MTU) { ret = EINVAL; @@ -2263,8 +2257,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFFLAGS: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFFLAGS (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFFLAGS (0x%lx)\n", cmd); QLNX_LOCK(ha); @@ -2292,8 +2285,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCADDMULTI: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); + QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCADDMULTI", cmd); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if (qlnx_set_multi(ha, 1)) @@ -2302,8 +2294,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCDELMULTI: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); + QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCDELMULTI", cmd); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if (qlnx_set_multi(ha, 0)) @@ -2313,9 +2304,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd case SIOCSIFMEDIA: case SIOCGIFMEDIA: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", cmd); + ret = ifmedia_ioctl(ifp, ifr, &ha->media, cmd); break; @@ -2323,8 +2313,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd mask = ifr->ifr_reqcap ^ ifp->if_capenable; - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFCAP (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFCAP (0x%lx)\n", cmd); if (mask & IFCAP_HWCSUM) ifp->if_capenable ^= IFCAP_HWCSUM; @@ -2367,8 +2356,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, "%s :" - " ecore_ptt_acquire failed\n", __func__)); + QL_DPRINT1(ha, "ecore_ptt_acquire failed\n"); ret = -1; break; } @@ -2386,20 +2374,19 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd ret = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); - QL_DPRINT8(ha, (ha->pci_dev, "SIOCGI2C copyout ret = %d" - " len = %d addr = 0x%02x offset = 0x%04x" - " data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x" - " 0x%02x 0x%02x 0x%02x\n", + QL_DPRINT8(ha, "SIOCGI2C copyout ret = %d \ + len = %d addr = 0x%02x offset = 0x%04x \ + data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x \ + 0x%02x 0x%02x 0x%02x\n", ret, i2c.len, i2c.dev_addr, i2c.offset, i2c.data[0], i2c.data[1], i2c.data[2], i2c.data[3], - i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7])); + i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7]); break; } #endif /* #if (__FreeBSD_version >= 1100101) */ default: - QL_DPRINT4(ha, (ha->pci_dev, "%s: default (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "default (0x%lx)\n", cmd); ret = ether_ioctl(ifp, cmd, data); break; } @@ -2416,14 +2403,14 @@ qlnx_media_change(struct ifnet *ifp) ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); ifm = &ha->media; if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) ret = EINVAL; - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return (ret); } @@ -2435,7 +2422,7 @@ qlnx_media_status(struct ifnet *ifp, str ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -2451,8 +2438,7 @@ qlnx_media_status(struct ifnet *ifp, str (IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit (%s)\n", __func__, - (ha->link_up ? "link_up" : "link_down"))); + QL_DPRINT2(ha, "exit (%s)\n", (ha->link_up ? "link_up" : "link_down")); return; } @@ -2478,20 +2464,19 @@ qlnx_free_tx_pkt(qlnx_host_t *ha, struct QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_MBUF_NULL); - QL_DPRINT1(ha, (ha->pci_dev, "%s: (mp == NULL) " + QL_DPRINT1(ha, "(mp == NULL) " " tx_idx = 0x%x" " ecore_prod_idx = 0x%x" " ecore_cons_idx = 0x%x" " hw_bd_cons = 0x%x" " txq_db_last = 0x%x" " elem_left = 0x%x\n", - __func__, fp->rss_id, ecore_chain_get_prod_idx(&txq->tx_pbl), ecore_chain_get_cons_idx(&txq->tx_pbl), le16toh(*txq->hw_cons_ptr), txq->tx_db.raw, - ecore_chain_get_elem_left(&txq->tx_pbl))); + ecore_chain_get_elem_left(&txq->tx_pbl)); fp->err_tx_free_pkt_null++; @@ -2552,20 +2537,20 @@ qlnx_tx_int(qlnx_host_t *ha, struct qlnx QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_DIFF); - QL_DPRINT1(ha, (ha->pci_dev, "%s: (diff = 0x%x) " + QL_DPRINT1(ha, "(diff = 0x%x) " " tx_idx = 0x%x" " ecore_prod_idx = 0x%x" " ecore_cons_idx = 0x%x" " hw_bd_cons = 0x%x" " txq_db_last = 0x%x" " elem_left = 0x%x\n", - __func__, diff, + diff, fp->rss_id, ecore_chain_get_prod_idx(&txq->tx_pbl), ecore_chain_get_cons_idx(&txq->tx_pbl), le16toh(*txq->hw_cons_ptr), txq->tx_db.raw, - ecore_chain_get_elem_left(&txq->tx_pbl))); + ecore_chain_get_elem_left(&txq->tx_pbl)); fp->err_tx_cons_idx_conflict++; @@ -2587,7 +2572,7 @@ qlnx_transmit(struct ifnet *ifp, struct struct qlnx_fastpath *fp; int rss_id = 0, ret = 0; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); #if __FreeBSD_version >= 1100000 if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) @@ -2615,7 +2600,7 @@ qlnx_transmit(struct ifnet *ifp, struct qlnx_transmit_exit: - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + QL_DPRINT2(ha, "exit ret = %d\n", ret); return ret; } @@ -2629,7 +2614,7 @@ qlnx_qflush(struct ifnet *ifp) ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (rss_id = 0; rss_id < ha->num_rss; rss_id++) { @@ -2648,7 +2633,7 @@ qlnx_qflush(struct ifnet *ifp) mtx_unlock(&fp->tx_mtx); } } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2792,7 +2777,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f uint32_t nbds_in_hdr = 0; uint32_t offset = 0; - QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT8(ha, "enter\n"); if (!ha->link_up) return (-1); @@ -2844,8 +2829,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f struct mbuf *m; - QL_DPRINT8(ha, (ha->pci_dev, "%s: EFBIG [%d]\n", __func__, - m_head->m_pkthdr.len)); + QL_DPRINT8(ha, "EFBIG [%d]\n", m_head->m_pkthdr.len); fp->tx_defrag++; @@ -2855,9 +2839,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->tx_pkts_freed++; m_freem(m_head); *m_headp = NULL; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: m_defrag() = NULL [%d]\n", - __func__, ret)); + QL_DPRINT1(ha, "m_defrag() = NULL [%d]\n", ret); return (ENOBUFS); } @@ -2869,9 +2851,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_defrag_dmamap_load++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: bus_dmamap_load_mbuf_sg failed0[%d, %d]\n", - __func__, ret, m_head->m_pkthdr.len)); + QL_DPRINT1(ha, + "bus_dmamap_load_mbuf_sg failed0 [%d, %d]\n", + ret, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); @@ -2885,9 +2867,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_non_tso_max_seg++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: (%d) nsegs too many for non-TSO[%d, %d]\n", - __func__, ret, nsegs, m_head->m_pkthdr.len)); + QL_DPRINT1(ha, + "(%d) nsegs too many for non-TSO [%d, %d]\n", + ret, nsegs, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); @@ -2902,10 +2884,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_dmamap_load++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: bus_dmamap_load_mbuf_sg failed1[%d, %d]\n", - __func__, ret, m_head->m_pkthdr.len)); - + QL_DPRINT1(ha, "bus_dmamap_load_mbuf_sg failed1 [%d, %d]\n", + ret, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); *m_headp = NULL; @@ -2924,9 +2904,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { - QL_DPRINT1(ha, (ha->pci_dev, "%s: (%d, 0x%x) insuffient BDs" - "in chain[%d] trying to free packets\n", - __func__, nsegs, elem_left, fp->rss_id)); + QL_DPRINT1(ha, "(%d, 0x%x) insuffient BDs" + " in chain[%d] trying to free packets\n", + nsegs, elem_left, fp->rss_id); fp->tx_nsegs_gt_elem_left++; @@ -2935,9 +2915,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: (%d, 0x%x) insuffient BDs in chain[%d]\n", - __func__, nsegs, elem_left, fp->rss_id)); + QL_DPRINT1(ha, + "(%d, 0x%x) insuffient BDs in chain[%d]\n", + nsegs, elem_left, fp->rss_id); fp->err_tx_nsegs_gt_elem_left++; fp->tx_ring_full = 1; @@ -3165,7 +3145,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f qlnx_txq_doorbell_wr32(ha, txq->doorbell_addr, txq->tx_db.raw); - QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT8(ha, "exit\n"); return (0); } @@ -3185,6 +3165,8 @@ qlnx_stop(qlnx_host_t *ha) * propagate the if_drv_flags * state to each tx thread */ + QL_DPRINT1(ha, "QLNX STATE = %d\n",ha->state); + if (ha->state == QLNX_STATE_OPEN) { for (i = 0; i < ha->num_rss; i++) { struct qlnx_fastpath *fp = &ha->fp_array[i]; @@ -3277,8 +3259,7 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str mp = sw_rx_data->data; if (mp == NULL) { - QL_DPRINT1(ha, (ha->pci_dev, "%s: mp = NULL\n", - __func__)); + QL_DPRINT1(ha, "mp = NULL\n"); fp->err_rx_mp_null++; rxq->sw_rx_cons = (rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1); @@ -3293,10 +3274,8 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str if (qlnx_alloc_rx_buffer(ha, rxq) != 0) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: New buffer allocation failed, dropping" - " incoming packet and reusing its buffer\n", - __func__)); + QL_DPRINT1(ha, "New buffer allocation failed, dropping" + " incoming packet and reusing its buffer\n"); qlnx_reuse_rx_data(rxq); fp->err_rx_alloc_errors++; @@ -3356,29 +3335,29 @@ qlnx_tpa_start(qlnx_host_t *ha, dev = ha->pci_dev; agg_index = cqe->tpa_agg_index; - QL_DPRINT7(ha, (dev, "%s[%d]: enter\n " - "\t type = 0x%x\n" - "\t bitfields = 0x%x\n" - "\t seg_len = 0x%x\n" - "\t pars_flags = 0x%x\n" - "\t vlan_tag = 0x%x\n" - "\t rss_hash = 0x%x\n" - "\t len_on_first_bd = 0x%x\n" - "\t placement_offset = 0x%x\n" - "\t tpa_agg_index = 0x%x\n" - "\t header_len = 0x%x\n" - "\t ext_bd_len_list[0] = 0x%x\n" - "\t ext_bd_len_list[1] = 0x%x\n" - "\t ext_bd_len_list[2] = 0x%x\n" - "\t ext_bd_len_list[3] = 0x%x\n" - "\t ext_bd_len_list[4] = 0x%x\n", - __func__, fp->rss_id, cqe->type, cqe->bitfields, cqe->seg_len, + QL_DPRINT7(ha, "[rss_id = %d]: enter\n \ + \t type = 0x%x\n \ + \t bitfields = 0x%x\n \ + \t seg_len = 0x%x\n \ + \t pars_flags = 0x%x\n \ + \t vlan_tag = 0x%x\n \ + \t rss_hash = 0x%x\n \ + \t len_on_first_bd = 0x%x\n \ + \t placement_offset = 0x%x\n \ + \t tpa_agg_index = 0x%x\n \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Mon May 22 19:34:38 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C424D784DC; Mon, 22 May 2017 19:34:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4957D1EE3; Mon, 22 May 2017 19:34:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJYbgO072317; Mon, 22 May 2017 19:34:37 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJYbqG072316; Mon, 22 May 2017 19:34:37 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705221934.v4MJYbqG072316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 19:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318660 - stable/11/sys/rpc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:34:38 -0000 Author: rmacklem Date: Mon May 22 19:34:37 2017 New Revision: 318660 URL: https://svnweb.freebsd.org/changeset/base/318660 Log: MFC: r317906 Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). When sosend() replies ERESTART in the client side krpc, it indicates that the RPC message hasn't yet been sent and that the send queue is full or locked while a signal is posted for the process. Without this patch, this would result in a RPC_CANTSEND reply from clnt_vc_call(), which would cause clnt_reconnect_call() to create a new TCP transport connection. For most NFS servers, this wasn't a serious problem, although it did imply retries of outstanding RPCs, which could possibly have missed the DRC. For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since AmazonEFS often didn't retain the NFSv4.1 session and would reply with NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which requires open/lock state recovery. Three options were considered to fix this: - Return the ERESTART all the way up to the system call boundary and then have the system call redone. This is fraught with risk, due to convoluted code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it is still a work in prgress and may not be feasible. - Set SB_NOINTR for the socket buffer. This fixes the problem, but makes the sosend() completely non interruptible, which kib@ considered inappropriate. It also would break forced dismount when a thread was blocked in sosend(). - Modify the retry loop in clnt_vc_call(), so that it loops for this case for up to 15sec. Testing showed that the sosend() usually succeeded by the 2nd retry. The extreme case observed was 111 loop iterations, or about 100msec of delay. This third alternative is what is implemented in this patch, since the change is: - localized - straightforward - forced dismount is not broken by it. This patch has been tested by cperciva@ extensively against AmazonEFS. Modified: stable/11/sys/rpc/clnt_vc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/rpc/clnt_vc.c ============================================================================== --- stable/11/sys/rpc/clnt_vc.c Mon May 22 19:28:38 2017 (r318659) +++ stable/11/sys/rpc/clnt_vc.c Mon May 22 19:34:37 2017 (r318660) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,6 +108,8 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); +static int fake_wchan; + /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. @@ -298,7 +301,7 @@ clnt_vc_call( uint32_t xid; struct mbuf *mreq = NULL, *results; struct ct_request *cr; - int error; + int error, trycnt; cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); @@ -328,8 +331,20 @@ clnt_vc_call( timeout = ct->ct_wait; /* use default timeout */ } + /* + * After 15sec of looping, allow it to return RPC_CANTSEND, which will + * cause the clnt_reconnect layer to create a new TCP connection. + */ + trycnt = 15 * hz; call_again: mtx_assert(&ct->ct_lock, MA_OWNED); + if (ct->ct_closing || ct->ct_closed) { + ct->ct_threads--; + wakeup(ct); + mtx_unlock(&ct->ct_lock); + free(cr, M_RPC); + return (RPC_CANTSEND); + } ct->ct_xid++; xid = ct->ct_xid; @@ -397,13 +412,16 @@ call_again: */ error = sosend(ct->ct_socket, NULL, NULL, mreq, NULL, 0, curthread); mreq = NULL; - if (error == EMSGSIZE) { + if (error == EMSGSIZE || (error == ERESTART && + (ct->ct_waitflag & PCATCH) == 0 && trycnt-- > 0)) { SOCKBUF_LOCK(&ct->ct_socket->so_snd); sbwait(&ct->ct_socket->so_snd); SOCKBUF_UNLOCK(&ct->ct_socket->so_snd); AUTH_VALIDATE(auth, xid, NULL, NULL); mtx_lock(&ct->ct_lock); TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); + /* Sleep for 1 clock tick before trying the sosend() again. */ + msleep(&fake_wchan, &ct->ct_lock, 0, "rpclpsnd", 1); goto call_again; } From owner-svn-src-stable-11@freebsd.org Mon May 22 21:41:35 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79CF1D785F0; Mon, 22 May 2017 21:41:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 499A31CEF; Mon, 22 May 2017 21:41:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MLfYZr025579; Mon, 22 May 2017 21:41:34 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MLfYTG025578; Mon, 22 May 2017 21:41:34 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705222141.v4MLfYTG025578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 21:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318682 - stable/11/sbin/mount_nfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 21:41:35 -0000 Author: rmacklem Date: Mon May 22 21:41:34 2017 New Revision: 318682 URL: https://svnweb.freebsd.org/changeset/base/318682 Log: MFC: r317931 Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts. The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871 modified umount so that it doesn't remove any entry created by mount_nfs. Modified: stable/11/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mount_nfs/mount_nfs.c ============================================================================== --- stable/11/sbin/mount_nfs/mount_nfs.c Mon May 22 21:17:44 2017 (r318681) +++ stable/11/sbin/mount_nfs/mount_nfs.c Mon May 22 21:41:34 2017 (r318682) @@ -651,7 +651,7 @@ getnfsargs(char *spec, struct iovec **io build_iovec(iov, iovlen, "hostname", nam, (size_t)-1); /* Add mounted file system to PATH_MOUNTTAB */ - if (!add_mtab(hostp, spec)) + if (mountmode != V4 && !add_mtab(hostp, spec)) warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec); return (1); } From owner-svn-src-stable-11@freebsd.org Mon May 22 22:02:08 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 620D4D78A7A; Mon, 22 May 2017 22:02:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26F141A22; Mon, 22 May 2017 22:02:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MM27rx034239; Mon, 22 May 2017 22:02:07 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MM27cK034238; Mon, 22 May 2017 22:02:07 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705222202.v4MM27cK034238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 22:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318684 - stable/11/sys/fs/nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 22:02:08 -0000 Author: rmacklem Date: Mon May 22 22:02:06 2017 New Revision: 318684 URL: https://svnweb.freebsd.org/changeset/base/318684 Log: MFC: r318287 Make nfscl_mtofh() return ENXIO when *nfhpp == NULL. r317272 introduced a case where nfscl_mtofh() could return 0 when *nfhpp is NULL. This patch makes it return ENXIO for this case. Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 21:52:06 2017 (r318683) +++ stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 22:02:06 2017 (r318684) @@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, s if (*++tl != 0) { nd->nd_flag |= ND_NOMOREDATA; flag = 0; + error = ENXIO; /* Return ENXIO so *nfhpp isn't used. */ } } if (flag) { From owner-svn-src-stable-11@freebsd.org Tue May 23 07:21:28 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50955D7A5BE; Tue, 23 May 2017 07:21:28 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06FBC1814; Tue, 23 May 2017 07:21:27 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7LRcT077752; Tue, 23 May 2017 07:21:27 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7LQIN077749; Tue, 23 May 2017 07:21:26 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705230721.v4N7LQIN077749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 23 May 2017 07:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318714 - in stable/11/contrib/gcc: . config/arm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:21:28 -0000 Author: mmel Date: Tue May 23 07:21:26 2017 New Revision: 318714 URL: https://svnweb.freebsd.org/changeset/base/318714 Log: MFC r318024,r318025: r318024: Fix _Unwind_Backtrace symbol version for ARM. r318025: Revert accidentally changed std.armv6 in r318024. Modified: stable/11/contrib/gcc/config/arm/libgcc-bpabi.ver stable/11/contrib/gcc/config/arm/libunwind-arm.S stable/11/contrib/gcc/libgcc-std.ver Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/gcc/config/arm/libgcc-bpabi.ver ============================================================================== --- stable/11/contrib/gcc/config/arm/libgcc-bpabi.ver Tue May 23 07:20:29 2017 (r318713) +++ stable/11/contrib/gcc/config/arm/libgcc-bpabi.ver Tue May 23 07:21:26 2017 (r318714) @@ -81,3 +81,11 @@ GCC_3.5 { # GNU-specific entry point. __gnu_unwind_frame } + +%exclude { + _Unwind_Backtrace +} + +GCC_4.3.0 { + _Unwind_Backtrace +} Modified: stable/11/contrib/gcc/config/arm/libunwind-arm.S ============================================================================== --- stable/11/contrib/gcc/config/arm/libunwind-arm.S Tue May 23 07:20:29 2017 (r318713) +++ stable/11/contrib/gcc/config/arm/libunwind-arm.S Tue May 23 07:21:26 2017 (r318714) @@ -133,4 +133,22 @@ UNWIND_WRAPPER _Unwind_Resume_or_Rethrow UNWIND_WRAPPER _Unwind_ForcedUnwind 3 UNWIND_WRAPPER _Unwind_Backtrace 2 +/* + * Originally, we incorrectly export _Unwind_Backtrace symbol + * with GCC_3.3 version, but real GCC libgcc export it as GCC_4.3.0. + * To maintain backward compatibility, export it with both versions where + * GCC_4.3.0 is default one. + * + * The workaround is complicated by next two issues: + * - old GNU ld cannot handle two (or more) symbol versions + * targeting same function. + * - the .weakref crashes clang 4.0 + */ + .globl SYM(_Unwind_Backtrace33) + TYPE(_Unwind_Backtrace33) +SYM(_Unwind_Backtrace33): + b _Unwind_Backtrace + + .symver SYM(_Unwind_Backtrace33),_Unwind_Backtrace@GCC_3.3 + #endif /* ndef __symbian__ */ Modified: stable/11/contrib/gcc/libgcc-std.ver ============================================================================== --- stable/11/contrib/gcc/libgcc-std.ver Tue May 23 07:20:29 2017 (r318713) +++ stable/11/contrib/gcc/libgcc-std.ver Tue May 23 07:21:26 2017 (r318714) @@ -275,7 +275,7 @@ GCC_4.2.0 { _Unwind_GetIPInfo } -%inherit GCC_4.3 GCC_4.2.0 +%inherit GCC_4.3.0 GCC_4.2.0 GCC_4.3.0 { # byte swapping routines __bswapsi2 From owner-svn-src-stable-11@freebsd.org Tue May 23 07:27:33 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7552D7A779; Tue, 23 May 2017 07:27:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 553C01CC0; Tue, 23 May 2017 07:27:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N7RW9j078812; Tue, 23 May 2017 07:27:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N7RUYV078792; Tue, 23 May 2017 07:27:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705230727.v4N7RUYV078792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 23 May 2017 07:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318716 - in stable/11: sys/amd64/amd64 sys/arm64/arm64 sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/fs/tmpfs sys/i386/i386 sys/kern sys/sys sys/vm... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 07:27:33 -0000 Author: markj Date: Tue May 23 07:27:30 2017 New Revision: 318716 URL: https://svnweb.freebsd.org/changeset/base/318716 Log: MFC r308474, r308691, r309203, r309365, r309703, r309898, r310720, r308489, r308706: Add PQ_LAUNDRY and remove PG_CACHED pages. Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/arm64/arm64/pmap.c stable/11/sys/cddl/compat/opensolaris/sys/vnode.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/fs/tmpfs/tmpfs_subr.c stable/11/sys/i386/i386/pmap.c stable/11/sys/kern/kern_exec.c stable/11/sys/kern/uipc_shm.c stable/11/sys/sys/vmmeter.h stable/11/sys/vm/_vm_radix.h stable/11/sys/vm/swap_pager.c stable/11/sys/vm/vm_fault.c stable/11/sys/vm/vm_map.c stable/11/sys/vm/vm_meter.c stable/11/sys/vm/vm_mmap.c stable/11/sys/vm/vm_object.c stable/11/sys/vm/vm_object.h stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h stable/11/sys/vm/vm_pageout.c stable/11/sys/vm/vm_phys.c stable/11/sys/vm/vm_radix.c stable/11/sys/vm/vm_radix.h stable/11/sys/vm/vm_reserv.c stable/11/sys/vm/vm_reserv.h stable/11/sys/vm/vnode_pager.c stable/11/usr.bin/systat/systat.1 stable/11/usr.bin/systat/vmstat.c stable/11/usr.bin/top/machine.c stable/11/usr.bin/top/top.local.1 stable/11/usr.bin/vmstat/vmstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/amd64/amd64/pmap.c Tue May 23 07:27:30 2017 (r318716) @@ -614,7 +614,6 @@ static vm_page_t pmap_enter_quick_locked static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); -static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits, int mask); static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, struct rwlock **lockp); @@ -625,7 +624,7 @@ static int pmap_remove_pde(pmap_t pmap, struct spglist *free, struct rwlock **lockp); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva, pd_entry_t ptepde, struct spglist *free, struct rwlock **lockp); -static void pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte); +static vm_page_t pmap_remove_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_remove_page(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, struct spglist *free); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, @@ -2218,29 +2217,17 @@ pmap_insert_pt_page(pmap_t pmap, vm_page } /* - * Looks for a page table page mapping the specified virtual address in the - * specified pmap's collection of idle page table pages. Returns NULL if there - * is no page table page corresponding to the specified virtual address. + * Removes the page table page mapping the specified virtual address from the + * specified pmap's collection of idle page table pages, and returns it. + * Otherwise, returns NULL if there is no page table page corresponding to the + * specified virtual address. */ static __inline vm_page_t -pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va) +pmap_remove_pt_page(pmap_t pmap, vm_offset_t va) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); - return (vm_radix_lookup(&pmap->pm_root, pmap_pde_pindex(va))); -} - -/* - * Removes the specified page table page from the specified pmap's collection - * of idle page table pages. The specified page table page must be a member of - * the pmap's collection. - */ -static __inline void -pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte) -{ - - PMAP_LOCK_ASSERT(pmap, MA_OWNED); - vm_radix_remove(&pmap->pm_root, mpte->pindex); + return (vm_radix_remove(&pmap->pm_root, pmap_pde_pindex(va))); } /* @@ -3460,10 +3447,8 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e oldpde = *pde; KASSERT((oldpde & (PG_PS | PG_V)) == (PG_PS | PG_V), ("pmap_demote_pde: oldpde is missing PG_PS and/or PG_V")); - if ((oldpde & PG_A) != 0 && (mpte = pmap_lookup_pt_page(pmap, va)) != - NULL) - pmap_remove_pt_page(pmap, mpte); - else { + if ((oldpde & PG_A) == 0 || (mpte = pmap_remove_pt_page(pmap, va)) == + NULL) { KASSERT((oldpde & PG_W) == 0, ("pmap_demote_pde: page table page for a wired mapping" " is missing")); @@ -3577,11 +3562,10 @@ pmap_remove_kernel_pde(pmap_t pmap, pd_e KASSERT(pmap == kernel_pmap, ("pmap %p is not kernel_pmap", pmap)); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mpte = pmap_lookup_pt_page(pmap, va); + mpte = pmap_remove_pt_page(pmap, va); if (mpte == NULL) panic("pmap_remove_kernel_pde: Missing pt page."); - pmap_remove_pt_page(pmap, mpte); mptepa = VM_PAGE_TO_PHYS(mpte); newpde = mptepa | X86_PG_M | X86_PG_A | X86_PG_RW | X86_PG_V; @@ -3668,9 +3652,8 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t if (pmap == kernel_pmap) { pmap_remove_kernel_pde(pmap, pdq, sva); } else { - mpte = pmap_lookup_pt_page(pmap, sva); + mpte = pmap_remove_pt_page(pmap, sva); if (mpte != NULL) { - pmap_remove_pt_page(pmap, mpte); pmap_resident_count_dec(pmap, 1); KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pde: pte page wire count error")); @@ -5533,9 +5516,8 @@ pmap_remove_pages(pmap_t pmap) TAILQ_EMPTY(&mt->md.pv_list)) vm_page_aflag_clear(mt, PGA_WRITEABLE); } - mpte = pmap_lookup_pt_page(pmap, pv->pv_va); + mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { - pmap_remove_pt_page(pmap, mpte); pmap_resident_count_dec(pmap, 1); KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pages: pte page wire count error")); Modified: stable/11/sys/arm64/arm64/pmap.c ============================================================================== --- stable/11/sys/arm64/arm64/pmap.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/arm64/arm64/pmap.c Tue May 23 07:27:30 2017 (r318716) @@ -2514,29 +2514,17 @@ pmap_insert_pt_page(pmap_t pmap, vm_page } /* - * Looks for a page table page mapping the specified virtual address in the - * specified pmap's collection of idle page table pages. Returns NULL if there - * is no page table page corresponding to the specified virtual address. + * Removes the page table page mapping the specified virtual address from the + * specified pmap's collection of idle page table pages, and returns it. + * Otherwise, returns NULL if there is no page table page corresponding to the + * specified virtual address. */ static __inline vm_page_t -pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va) +pmap_remove_pt_page(pmap_t pmap, vm_offset_t va) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); - return (vm_radix_lookup(&pmap->pm_root, pmap_l2_pindex(va))); -} - -/* - * Removes the specified page table page from the specified pmap's collection - * of idle page table pages. The specified page table page must be a member of - * the pmap's collection. - */ -static __inline void -pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte) -{ - - PMAP_LOCK_ASSERT(pmap, MA_OWNED); - vm_radix_remove(&pmap->pm_root, mpte->pindex); + return (vm_radix_remove(&pmap->pm_root, pmap_l2_pindex(va))); } /* @@ -3605,10 +3593,9 @@ pmap_remove_pages(pmap_t pmap) TAILQ_EMPTY(&mt->md.pv_list)) vm_page_aflag_clear(mt, PGA_WRITEABLE); } - ml3 = pmap_lookup_pt_page(pmap, + ml3 = pmap_remove_pt_page(pmap, pv->pv_va); if (ml3 != NULL) { - pmap_remove_pt_page(pmap, ml3); pmap_resident_count_dec(pmap,1); KASSERT(ml3->wire_count == NL3PG, ("pmap_remove_pages: l3 page wire count error")); @@ -4381,9 +4368,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_en return (NULL); } - if ((ml3 = pmap_lookup_pt_page(pmap, va)) != NULL) { - pmap_remove_pt_page(pmap, ml3); - } else { + if ((ml3 = pmap_remove_pt_page(pmap, va)) == NULL) { ml3 = vm_page_alloc(NULL, pmap_l2_pindex(va), (VIRT_IN_DMAP(va) ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); Modified: stable/11/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- stable/11/sys/cddl/compat/opensolaris/sys/vnode.h Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/cddl/compat/opensolaris/sys/vnode.h Tue May 23 07:27:30 2017 (r318716) @@ -75,8 +75,7 @@ vn_is_readonly(vnode_t *vp) #define vn_mountedvfs(vp) ((vp)->v_mountedhere) #define vn_has_cached_data(vp) \ ((vp)->v_object != NULL && \ - ((vp)->v_object->resident_page_count > 0 || \ - !vm_object_cache_is_empty((vp)->v_object))) + (vp)->v_object->resident_page_count > 0) #define vn_exists(vp) do { } while (0) #define vn_invalid(vp) do { } while (0) #define vn_renamepath(tdvp, svp, tnm, lentnm) do { } while (0) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue May 23 07:27:30 2017 (r318716) @@ -426,10 +426,6 @@ page_busy(vnode_t *vp, int64_t start, in continue; } vm_page_sbusy(pp); - } else if (pp == NULL) { - pp = vm_page_alloc(obj, OFF_TO_IDX(start), - VM_ALLOC_SYSTEM | VM_ALLOC_IFCACHED | - VM_ALLOC_SBUSY); } else { ASSERT(pp != NULL && !pp->valid); pp = NULL; Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Tue May 23 07:27:30 2017 (r318716) @@ -1401,12 +1401,9 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(uobj); goto retry; - } else if (m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(uobj, &m, 1, - NULL, NULL); - else - /* A cached page was reactivated. */ - rv = VM_PAGER_OK; + } + rv = vm_pager_get_pages(uobj, &m, 1, NULL, + NULL); vm_page_lock(m); if (rv == VM_PAGER_OK) { vm_page_deactivate(m); Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/i386/i386/pmap.c Tue May 23 07:27:30 2017 (r318716) @@ -306,7 +306,6 @@ static boolean_t pmap_is_modified_pvh(st static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static void pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde); -static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); static boolean_t pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva, @@ -316,7 +315,7 @@ static void pmap_remove_pde(pmap_t pmap, struct spglist *free); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva, struct spglist *free); -static void pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte); +static vm_page_t pmap_remove_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_remove_page(struct pmap *pmap, vm_offset_t va, struct spglist *free); static void pmap_remove_entry(struct pmap *pmap, vm_page_t m, @@ -1727,29 +1726,17 @@ pmap_insert_pt_page(pmap_t pmap, vm_page } /* - * Looks for a page table page mapping the specified virtual address in the - * specified pmap's collection of idle page table pages. Returns NULL if there - * is no page table page corresponding to the specified virtual address. + * Removes the page table page mapping the specified virtual address from the + * specified pmap's collection of idle page table pages, and returns it. + * Otherwise, returns NULL if there is no page table page corresponding to the + * specified virtual address. */ static __inline vm_page_t -pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va) +pmap_remove_pt_page(pmap_t pmap, vm_offset_t va) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); - return (vm_radix_lookup(&pmap->pm_root, va >> PDRSHIFT)); -} - -/* - * Removes the specified page table page from the specified pmap's collection - * of idle page table pages. The specified page table page must be a member of - * the pmap's collection. - */ -static __inline void -pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte) -{ - - PMAP_LOCK_ASSERT(pmap, MA_OWNED); - vm_radix_remove(&pmap->pm_root, mpte->pindex); + return (vm_radix_remove(&pmap->pm_root, va >> PDRSHIFT)); } /* @@ -2645,10 +2632,8 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t oldpde = *pde; KASSERT((oldpde & (PG_PS | PG_V)) == (PG_PS | PG_V), ("pmap_demote_pde: oldpde is missing PG_PS and/or PG_V")); - if ((oldpde & PG_A) != 0 && (mpte = pmap_lookup_pt_page(pmap, va)) != - NULL) - pmap_remove_pt_page(pmap, mpte); - else { + if ((oldpde & PG_A) == 0 || (mpte = pmap_remove_pt_page(pmap, va)) == + NULL) { KASSERT((oldpde & PG_W) == 0, ("pmap_demote_pde: page table page for a wired mapping" " is missing")); @@ -2786,11 +2771,10 @@ pmap_remove_kernel_pde(pmap_t pmap, pd_e vm_page_t mpte; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mpte = pmap_lookup_pt_page(pmap, va); + mpte = pmap_remove_pt_page(pmap, va); if (mpte == NULL) panic("pmap_remove_kernel_pde: Missing pt page."); - pmap_remove_pt_page(pmap, mpte); mptepa = VM_PAGE_TO_PHYS(mpte); newpde = mptepa | PG_M | PG_A | PG_RW | PG_V; @@ -2872,9 +2856,8 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t if (pmap == kernel_pmap) { pmap_remove_kernel_pde(pmap, pdq, sva); } else { - mpte = pmap_lookup_pt_page(pmap, sva); + mpte = pmap_remove_pt_page(pmap, sva); if (mpte != NULL) { - pmap_remove_pt_page(pmap, mpte); pmap->pm_stats.resident_count--; KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pde: pte page wire count error")); @@ -4616,9 +4599,8 @@ pmap_remove_pages(pmap_t pmap) if (TAILQ_EMPTY(&mt->md.pv_list)) vm_page_aflag_clear(mt, PGA_WRITEABLE); } - mpte = pmap_lookup_pt_page(pmap, pv->pv_va); + mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { - pmap_remove_pt_page(pmap, mpte); pmap->pm_stats.resident_count--; KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pages: pte page wire count error")); Modified: stable/11/sys/kern/kern_exec.c ============================================================================== --- stable/11/sys/kern/kern_exec.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/kern/kern_exec.c Tue May 23 07:27:30 2017 (r318716) @@ -1006,7 +1006,7 @@ exec_map_first_page(imgp) break; } else { ma[i] = vm_page_alloc(object, i, - VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + VM_ALLOC_NORMAL); if (ma[i] == NULL) break; } Modified: stable/11/sys/kern/uipc_shm.c ============================================================================== --- stable/11/sys/kern/uipc_shm.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/kern/uipc_shm.c Tue May 23 07:27:30 2017 (r318716) @@ -455,12 +455,9 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(object); goto retry; - } else if (m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(object, &m, 1, - NULL, NULL); - else - /* A cached page was reactivated. */ - rv = VM_PAGER_OK; + } + rv = vm_pager_get_pages(object, &m, 1, NULL, + NULL); vm_page_lock(m); if (rv == VM_PAGER_OK) { vm_page_deactivate(m); Modified: stable/11/sys/sys/vmmeter.h ============================================================================== --- stable/11/sys/sys/vmmeter.h Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/sys/vmmeter.h Tue May 23 07:27:30 2017 (r318716) @@ -75,9 +75,10 @@ struct vmmeter { u_int v_vnodepgsin; /* (p) vnode_pager pages paged in */ u_int v_vnodepgsout; /* (p) vnode pager pages paged out */ u_int v_intrans; /* (p) intransit blocking page faults */ - u_int v_reactivated; /* (f) pages reactivated from free list */ + u_int v_reactivated; /* (p) pages reactivated by the pagedaemon */ u_int v_pdwakeups; /* (p) times daemon has awaken from sleep */ u_int v_pdpages; /* (p) pages analyzed by daemon */ + u_int v_pdshortfalls; /* (p) page reclamation shortfalls */ u_int v_tcached; /* (p) total pages cached */ u_int v_dfree; /* (p) pages freed by daemon */ @@ -96,6 +97,7 @@ struct vmmeter { u_int v_active_count; /* (q) pages active */ u_int v_inactive_target; /* (c) pages desired inactive */ u_int v_inactive_count; /* (q) pages inactive */ + u_int v_laundry_count; /* (q) pages eligible for laundering */ u_int v_cache_count; /* (f) pages on cache queue */ u_int v_pageout_free_min; /* (c) min pages reserved for kernel */ u_int v_interrupt_free_min; /* (c) reserved pages for int code */ @@ -111,7 +113,6 @@ struct vmmeter { u_int v_vforkpages; /* (p) VM pages affected by vfork() */ u_int v_rforkpages; /* (p) VM pages affected by rfork() */ u_int v_kthreadpages; /* (p) VM pages affected by fork() by kernel */ - u_int v_spare[2]; }; #ifdef _KERNEL @@ -184,6 +185,25 @@ vm_paging_needed(void) (u_int)vm_pageout_wakeup_thresh); } +/* + * Return the number of pages we need to launder. + * A positive number indicates that we have a shortfall of clean pages. + */ +static inline int +vm_laundry_target(void) +{ + + return (vm_paging_target()); +} + +/* + * Obtain the value of a per-CPU counter. + */ +#define VM_METER_PCPU_CNT(member) \ + vm_meter_cnt(__offsetof(struct vmmeter, member)) + +u_int vm_meter_cnt(size_t); + #endif /* systemwide totals computed every five seconds */ Modified: stable/11/sys/vm/_vm_radix.h ============================================================================== --- stable/11/sys/vm/_vm_radix.h Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/_vm_radix.h Tue May 23 07:27:30 2017 (r318716) @@ -36,12 +36,8 @@ */ struct vm_radix { uintptr_t rt_root; - uint8_t rt_flags; }; -#define RT_INSERT_INPROG 0x01 -#define RT_TRIE_MODIFIED 0x02 - #ifdef _KERNEL static __inline boolean_t Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/swap_pager.c Tue May 23 07:27:30 2017 (r318716) @@ -1126,7 +1126,7 @@ swap_pager_getpages(vm_object_t object, if (shift != 0) { for (i = 1; i <= shift; i++) { p = vm_page_alloc(object, m[0]->pindex - i, - VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + VM_ALLOC_NORMAL); if (p == NULL) { /* Shift allocated pages to the left. */ for (j = 0; j < i - 1; j++) @@ -1144,8 +1144,7 @@ swap_pager_getpages(vm_object_t object, if (rahead != NULL) { for (i = 0; i < *rahead; i++) { p = vm_page_alloc(object, - m[reqcount - 1]->pindex + i + 1, - VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + m[reqcount - 1]->pindex + i + 1, VM_ALLOC_NORMAL); if (p == NULL) break; bp->b_pages[shift + reqcount + i] = p; @@ -1549,17 +1548,18 @@ swp_pager_async_iodone(struct buf *bp) * For write success, clear the dirty * status, then finish the I/O ( which decrements the * busy count and possibly wakes waiter's up ). + * A page is only written to swap after a period of + * inactivity. Therefore, we do not expect it to be + * reused. */ KASSERT(!pmap_page_is_write_mapped(m), ("swp_pager_async_iodone: page %p is not write" " protected", m)); vm_page_undirty(m); + vm_page_lock(m); + vm_page_deactivate_noreuse(m); + vm_page_unlock(m); vm_page_sunbusy(m); - if (vm_page_count_severe()) { - vm_page_lock(m); - vm_page_try_to_cache(m); - vm_page_unlock(m); - } } } @@ -1635,12 +1635,15 @@ swap_pager_isswapped(vm_object_t object, /* * SWP_PAGER_FORCE_PAGEIN() - force a swap block to be paged in * - * This routine dissociates the page at the given index within a - * swap block from its backing store, paging it in if necessary. - * If the page is paged in, it is placed in the inactive queue, - * since it had its backing store ripped out from under it. - * We also attempt to swap in all other pages in the swap block, - * we only guarantee that the one at the specified index is + * This routine dissociates the page at the given index within an object + * from its backing store, paging it in if it does not reside in memory. + * If the page is paged in, it is marked dirty and placed in the laundry + * queue. The page is marked dirty because it no longer has backing + * store. It is placed in the laundry queue because it has not been + * accessed recently. Otherwise, it would already reside in memory. + * + * We also attempt to swap in all other pages in the swap block. + * However, we only guarantee that the one at the specified index is * paged in. * * XXX - The code to page the whole block in doesn't work, so we @@ -1669,7 +1672,7 @@ swp_pager_force_pagein(vm_object_t objec vm_object_pip_wakeup(object); vm_page_dirty(m); vm_page_lock(m); - vm_page_deactivate(m); + vm_page_launder(m); vm_page_unlock(m); vm_page_xunbusy(m); vm_pager_page_unswapped(m); Modified: stable/11/sys/vm/vm_fault.c ============================================================================== --- stable/11/sys/vm/vm_fault.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_fault.c Tue May 23 07:27:30 2017 (r318716) @@ -485,11 +485,12 @@ int vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold) { - vm_prot_t prot; - vm_object_t next_object; struct faultstate fs; struct vnode *vp; + vm_object_t next_object, retry_object; vm_offset_t e_end, e_start; + vm_pindex_t retry_pindex; + vm_prot_t prot, retry_prot; int ahead, alloc_req, behind, cluster_offset, error, era, faultcount; int locked, nera, result, rv; u_char behavior; @@ -755,8 +756,7 @@ RetryFault:; unlock_and_deallocate(&fs); VM_WAITPFAULT; goto RetryFault; - } else if (fs.m->valid == VM_PAGE_BITS_ALL) - break; + } } readrest: @@ -1143,10 +1143,6 @@ readrest: * lookup. */ if (!fs.lookup_still_valid) { - vm_object_t retry_object; - vm_pindex_t retry_pindex; - vm_prot_t retry_prot; - if (!vm_map_trylock_read(fs.map)) { release_page(&fs); unlock_and_deallocate(&fs); Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_map.c Tue May 23 07:27:30 2017 (r318716) @@ -1858,9 +1858,7 @@ vm_map_submap( * limited number of page mappings are created at the low-end of the * specified address range. (For this purpose, a superpage mapping * counts as one page mapping.) Otherwise, all resident pages within - * the specified address range are mapped. Because these mappings are - * being created speculatively, cached pages are not reactivated and - * mapped. + * the specified address range are mapped. */ static void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, Modified: stable/11/sys/vm/vm_meter.c ============================================================================== --- stable/11/sys/vm/vm_meter.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_meter.c Tue May 23 07:27:30 2017 (r318716) @@ -209,29 +209,37 @@ vmtotal(SYSCTL_HANDLER_ARGS) } /* - * vcnt() - accumulate statistics from all cpus and the global cnt - * structure. + * vm_meter_cnt() - accumulate statistics from all cpus and the global cnt + * structure. * * The vmmeter structure is now per-cpu as well as global. Those * statistics which can be kept on a per-cpu basis (to avoid cache * stalls between cpus) can be moved to the per-cpu vmmeter. Remaining * statistics, such as v_free_reserved, are left in the global * structure. - * - * (sysctl_oid *oidp, void *arg1, int arg2, struct sysctl_req *req) */ -static int -vcnt(SYSCTL_HANDLER_ARGS) +u_int +vm_meter_cnt(size_t offset) { - int count = *(int *)arg1; - int offset = (char *)arg1 - (char *)&vm_cnt; + struct pcpu *pcpu; + u_int count; int i; + count = *(u_int *)((char *)&vm_cnt + offset); CPU_FOREACH(i) { - struct pcpu *pcpu = pcpu_find(i); - count += *(int *)((char *)&pcpu->pc_cnt + offset); + pcpu = pcpu_find(i); + count += *(u_int *)((char *)&pcpu->pc_cnt + offset); } - return (SYSCTL_OUT(req, &count, sizeof(int))); + return (count); +} + +static int +cnt_sysctl(SYSCTL_HANDLER_ARGS) +{ + u_int count; + + count = vm_meter_cnt((char *)arg1 - (char *)&vm_cnt); + return (SYSCTL_OUT(req, &count, sizeof(count))); } SYSCTL_PROC(_vm, VM_TOTAL, vmtotal, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE, @@ -246,8 +254,8 @@ SYSCTL_NODE(_vm_stats, OID_AUTO, misc, C #define VM_STATS(parent, var, descr) \ SYSCTL_PROC(parent, OID_AUTO, var, \ - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, &vm_cnt.var, 0, vcnt, \ - "IU", descr) + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, &vm_cnt.var, 0, \ + cnt_sysctl, "IU", descr) #define VM_STATS_VM(var, descr) VM_STATS(_vm_stats_vm, var, descr) #define VM_STATS_SYS(var, descr) VM_STATS(_vm_stats_sys, var, descr) @@ -271,9 +279,10 @@ VM_STATS_VM(v_vnodeout, "Vnode pager pag VM_STATS_VM(v_vnodepgsin, "Vnode pages paged in"); VM_STATS_VM(v_vnodepgsout, "Vnode pages paged out"); VM_STATS_VM(v_intrans, "In transit page faults"); -VM_STATS_VM(v_reactivated, "Pages reactivated from free list"); +VM_STATS_VM(v_reactivated, "Pages reactivated by pagedaemon"); VM_STATS_VM(v_pdwakeups, "Pagedaemon wakeups"); VM_STATS_VM(v_pdpages, "Pages analyzed by pagedaemon"); +VM_STATS_VM(v_pdshortfalls, "Page reclamation shortfalls"); VM_STATS_VM(v_tcached, "Total pages cached"); VM_STATS_VM(v_dfree, "Pages freed by pagedaemon"); VM_STATS_VM(v_pfree, "Pages freed by exiting processes"); @@ -288,6 +297,7 @@ VM_STATS_VM(v_wire_count, "Wired pages") VM_STATS_VM(v_active_count, "Active pages"); VM_STATS_VM(v_inactive_target, "Desired inactive pages"); VM_STATS_VM(v_inactive_count, "Inactive pages"); +VM_STATS_VM(v_laundry_count, "Pages eligible for laundering"); VM_STATS_VM(v_cache_count, "Pages on cache queue"); VM_STATS_VM(v_pageout_free_min, "Min pages reserved for kernel"); VM_STATS_VM(v_interrupt_free_min, "Reserved pages for interrupt code"); Modified: stable/11/sys/vm/vm_mmap.c ============================================================================== --- stable/11/sys/vm/vm_mmap.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_mmap.c Tue May 23 07:27:30 2017 (r318716) @@ -849,9 +849,6 @@ RestartScan: pindex = OFF_TO_IDX(current->offset + (addr - current->start)); m = vm_page_lookup(object, pindex); - if (m == NULL && - vm_page_is_cached(object, pindex)) - mincoreinfo = MINCORE_INCORE; if (m != NULL && m->valid == 0) m = NULL; if (m != NULL) Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_object.c Tue May 23 07:27:30 2017 (r318716) @@ -178,9 +178,6 @@ vm_object_zdtor(void *mem, int size, voi ("object %p has reservations", object)); #endif - KASSERT(vm_object_cache_is_empty(object), - ("object %p has cached pages", - object)); KASSERT(object->paging_in_progress == 0, ("object %p paging_in_progress = %d", object, object->paging_in_progress)); @@ -208,12 +205,9 @@ vm_object_zinit(void *mem, int size, int object->type = OBJT_DEAD; object->ref_count = 0; object->rtree.rt_root = 0; - object->rtree.rt_flags = 0; object->paging_in_progress = 0; object->resident_page_count = 0; object->shadow_count = 0; - object->cache.rt_root = 0; - object->cache.rt_flags = 0; mtx_lock(&vm_object_list_mtx); TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); @@ -792,8 +786,6 @@ vm_object_terminate(vm_object_t object) if (__predict_false(!LIST_EMPTY(&object->rvq))) vm_reserv_break_all(object); #endif - if (__predict_false(!vm_object_cache_is_empty(object))) - vm_page_cache_free(object, 0, 0); KASSERT(object->cred == NULL || object->type == OBJT_DEFAULT || object->type == OBJT_SWAP, @@ -1135,13 +1127,6 @@ shadowlookup: } else if ((tobject->flags & OBJ_UNMANAGED) != 0) goto unlock_tobject; m = vm_page_lookup(tobject, tpindex); - if (m == NULL && advise == MADV_WILLNEED) { - /* - * If the page is cached, reactivate it. - */ - m = vm_page_alloc(tobject, tpindex, VM_ALLOC_IFCACHED | - VM_ALLOC_NOBUSY); - } if (m == NULL) { /* * There may be swap even if there is no backing page @@ -1371,7 +1356,7 @@ retry: goto retry; } - /* vm_page_rename() will handle dirty and cache. */ + /* vm_page_rename() will dirty the page. */ if (vm_page_rename(m, new_object, idx)) { VM_OBJECT_WUNLOCK(new_object); VM_OBJECT_WUNLOCK(orig_object); @@ -1406,19 +1391,6 @@ retry: swap_pager_copy(orig_object, new_object, offidxstart, 0); TAILQ_FOREACH(m, &new_object->memq, listq) vm_page_xunbusy(m); - - /* - * Transfer any cached pages from orig_object to new_object. - * If swap_pager_copy() found swapped out pages within the - * specified range of orig_object, then it changed - * new_object's type to OBJT_SWAP when it transferred those - * pages to new_object. Otherwise, new_object's type - * should still be OBJT_DEFAULT and orig_object should not - * contain any cached pages within the specified range. - */ - if (__predict_false(!vm_object_cache_is_empty(orig_object))) - vm_page_cache_transfer(orig_object, offidxstart, - new_object); } VM_OBJECT_WUNLOCK(orig_object); VM_OBJECT_WUNLOCK(new_object); @@ -1471,6 +1443,13 @@ vm_object_scan_all_shadowed(vm_object_t backing_object = object->backing_object; + /* + * Initial conditions: + * + * We do not want to have to test for the existence of swap + * pages in the backing object. XXX but with the new swapper this + * would be pretty easy to do. + */ if (backing_object->type != OBJT_DEFAULT && backing_object->type != OBJT_SWAP) return (false); @@ -1622,8 +1601,7 @@ vm_object_collapse_scan(vm_object_t obje * backing object to the main object. * * If the page was mapped to a process, it can remain mapped - * through the rename. vm_page_rename() will handle dirty and - * cache. + * through the rename. vm_page_rename() will dirty the page. */ if (vm_page_rename(p, object, new_pindex)) { next = vm_object_collapse_scan_wait(object, NULL, next, @@ -1758,13 +1736,6 @@ vm_object_collapse(vm_object_t object) backing_object, object, OFF_TO_IDX(object->backing_object_offset), TRUE); - - /* - * Free any cached pages from backing_object. - */ - if (__predict_false( - !vm_object_cache_is_empty(backing_object))) - vm_page_cache_free(backing_object, 0, 0); } /* * Object now shadows whatever backing_object did. @@ -1893,7 +1864,7 @@ vm_object_page_remove(vm_object_t object (options & (OBJPR_CLEANONLY | OBJPR_NOTMAPPED)) == OBJPR_NOTMAPPED, ("vm_object_page_remove: illegal options for object %p", object)); if (object->resident_page_count == 0) - goto skipmemq; + return; vm_object_pip_add(object, 1); again: p = vm_page_find_least(object, start); @@ -1950,9 +1921,6 @@ next: vm_page_unlock(p); } vm_object_pip_wakeup(object); -skipmemq: - if (__predict_false(!vm_object_cache_is_empty(object))) - vm_page_cache_free(object, start, end); } /* @@ -2333,9 +2301,9 @@ sysctl_vm_object_list(SYSCTL_HANDLER_ARG * sysctl is only meant to give an * approximation of the system anyway. */ - if (m->queue == PQ_ACTIVE) + if (vm_page_active(m)) kvo.kvo_active++; - else if (m->queue == PQ_INACTIVE) + else if (vm_page_inactive(m)) kvo.kvo_inactive++; } Modified: stable/11/sys/vm/vm_object.h ============================================================================== --- stable/11/sys/vm/vm_object.h Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_object.h Tue May 23 07:27:30 2017 (r318716) @@ -79,17 +79,6 @@ * * vm_object_t Virtual memory object. * - * The root of cached pages pool is protected by both the per-object lock - * and the free pages queue mutex. - * On insert in the cache radix trie, the per-object lock is expected - * to be already held and the free pages queue mutex will be - * acquired during the operation too. - * On remove and lookup from the cache radix trie, only the free - * pages queue mutex is expected to be locked. - * These rules allow for reliably checking for the presence of cached - * pages with only the per-object lock held, thereby reducing contention - * for the free pages queue mutex. - * * List of locks * (c) const until freed * (o) per-object lock @@ -118,7 +107,6 @@ struct vm_object { vm_ooffset_t backing_object_offset;/* Offset in backing object */ TAILQ_ENTRY(vm_object) pager_object_list; /* list of all objects of this pager type */ LIST_HEAD(, vm_reserv) rvq; /* list of reservations */ - struct vm_radix cache; /* (o + f) root of the cache page radix trie */ void *handle; union { /* @@ -306,13 +294,6 @@ void vm_object_pip_wakeup(vm_object_t ob void vm_object_pip_wakeupn(vm_object_t object, short i); void vm_object_pip_wait(vm_object_t object, char *waitid); -static __inline boolean_t -vm_object_cache_is_empty(vm_object_t object) -{ - - return (vm_radix_is_empty(&object->cache)); -} - void umtx_shm_object_init(vm_object_t object); void umtx_shm_object_terminated(vm_object_t object); extern int umtx_shm_vnobj_persistent; Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Tue May 23 07:26:45 2017 (r318715) +++ stable/11/sys/vm/vm_page.c Tue May 23 07:27:30 2017 (r318716) @@ -155,8 +155,7 @@ static int vm_pageout_pages_needed; static uma_zone_t fakepg_zone; -static struct vnode *vm_page_alloc_init(vm_page_t m); -static void vm_page_cache_turn_free(vm_page_t m); +static void vm_page_alloc_check(vm_page_t m); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(uint8_t queue, vm_page_t m); static void vm_page_free_wakeup(void); @@ -391,6 +390,10 @@ vm_page_domain_init(struct vm_domain *vm "vm active pagequeue"; *__DECONST(u_int **, &vmd->vmd_pagequeues[PQ_ACTIVE].pq_vcnt) = &vm_cnt.v_active_count; + *__DECONST(char **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_name) = + "vm laundry pagequeue"; + *__DECONST(int **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_vcnt) = + &vm_cnt.v_laundry_count; vmd->vmd_page_count = 0; vmd->vmd_free_count = 0; vmd->vmd_segs = 0; @@ -1136,9 +1139,7 @@ void vm_page_dirty_KBI(vm_page_t m) { - /* These assertions refer to this operation by its public name. */ - KASSERT((m->flags & PG_CACHED) == 0, - ("vm_page_dirty: page in cache!")); + /* Refer to this operation by its public name. */ KASSERT(m->valid == VM_PAGE_BITS_ALL, ("vm_page_dirty: page is invalid!")); m->dirty = VM_PAGE_BITS_ALL; @@ -1262,9 +1263,8 @@ vm_page_insert_radixdone(vm_page_t m, vm /* * vm_page_remove: * - * Removes the given mem entry from the object/offset-page - * table and the object page list, but do not invalidate/terminate - * the backing store. + * Removes the specified page from its containing object, but does not + * invalidate any backing storage. * * The object must be locked. The page must be locked if it is managed. */ @@ -1272,6 +1272,7 @@ void vm_page_remove(vm_page_t m) { vm_object_t object; + vm_page_t mrem; if ((m->oflags & VPO_UNMANAGED) == 0) vm_page_assert_locked(m); @@ -1280,11 +1281,12 @@ vm_page_remove(vm_page_t m) VM_OBJECT_ASSERT_WLOCKED(object); if (vm_page_xbusied(m)) vm_page_xunbusy_maybelocked(m); + mrem = vm_radix_remove(&object->rtree, m->pindex); + KASSERT(mrem == m, ("removed page %p, expected page %p", mrem, m)); /* * Now remove from the object's list of backed pages. */ - vm_radix_remove(&object->rtree, m->pindex); TAILQ_REMOVE(&object->memq, m, listq); /* @@ -1433,9 +1435,7 @@ vm_page_replace(vm_page_t mnew, vm_objec * * Note: we *always* dirty the page. It is necessary both for the * fact that we moved it, and because we may be invalidating - * swap. If the page is on the cache, we have to deactivate it - * or vm_page_dirty() will panic. Dirty pages are not allowed - * on the cache. + * swap. * * The objects must be locked. */ @@ -1481,142 +1481,6 @@ vm_page_rename(vm_page_t m, vm_object_t } /* - * Convert all of the given object's cached pages that have a - * pindex within the given range into free pages. If the value - * zero is given for "end", then the range's upper bound is - * infinity. If the given object is backed by a vnode and it - * transitions from having one or more cached pages to none, the - * vnode's hold count is reduced. - */ -void -vm_page_cache_free(vm_object_t object, vm_pindex_t start, vm_pindex_t end) -{ - vm_page_t m; - boolean_t empty; - - mtx_lock(&vm_page_queue_free_mtx); - if (__predict_false(vm_radix_is_empty(&object->cache))) { - mtx_unlock(&vm_page_queue_free_mtx); - return; - } - while ((m = vm_radix_lookup_ge(&object->cache, start)) != NULL) { - if (end != 0 && m->pindex >= end) - break; - vm_radix_remove(&object->cache, m->pindex); - vm_page_cache_turn_free(m); - } - empty = vm_radix_is_empty(&object->cache); - mtx_unlock(&vm_page_queue_free_mtx); - if (object->type == OBJT_VNODE && empty) - vdrop(object->handle); -} - -/* - * Returns the cached page that is associated with the given - * object and offset. If, however, none exists, returns NULL. - * - * The free page queue must be locked. - */ -static inline vm_page_t -vm_page_cache_lookup(vm_object_t object, vm_pindex_t pindex) -{ - - mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - return (vm_radix_lookup(&object->cache, pindex)); -} - -/* - * Remove the given cached page from its containing object's - * collection of cached pages. - * - * The free page queue must be locked. - */ -static void -vm_page_cache_remove(vm_page_t m) -{ - - mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - KASSERT((m->flags & PG_CACHED) != 0, - ("vm_page_cache_remove: page %p is not cached", m)); - vm_radix_remove(&m->object->cache, m->pindex); - m->object = NULL; - vm_cnt.v_cache_count--; -} - -/* - * Transfer all of the cached pages with offset greater than or - * equal to 'offidxstart' from the original object's cache to the - * new object's cache. However, any cached pages with offset - * greater than or equal to the new object's size are kept in the - * original object. Initially, the new object's cache must be - * empty. Offset 'offidxstart' in the original object must - * correspond to offset zero in the new object. - * - * The new object must be locked. - */ -void -vm_page_cache_transfer(vm_object_t orig_object, vm_pindex_t offidxstart, - vm_object_t new_object) -{ - vm_page_t m; - - /* - * Insertion into an object's collection of cached pages - * requires the object to be locked. In contrast, removal does - * not. - */ - VM_OBJECT_ASSERT_WLOCKED(new_object); - KASSERT(vm_radix_is_empty(&new_object->cache), - ("vm_page_cache_transfer: object %p has cached pages", - new_object)); - mtx_lock(&vm_page_queue_free_mtx); - while ((m = vm_radix_lookup_ge(&orig_object->cache, - offidxstart)) != NULL) { - /* - * Transfer all of the pages with offset greater than or - * equal to 'offidxstart' from the original object's - * cache to the new object's cache. - */ - if ((m->pindex - offidxstart) >= new_object->size) - break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Tue May 23 08:01:25 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE439D7A5B5; Tue, 23 May 2017 08:01:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D1F6154D; Tue, 23 May 2017 08:01:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N81OEq092800; Tue, 23 May 2017 08:01:24 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N81OYI092799; Tue, 23 May 2017 08:01:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230801.v4N81OYI092799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318724 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:01:25 -0000 Author: trasz Date: Tue May 23 08:01:24 2017 New Revision: 318724 URL: https://svnweb.freebsd.org/changeset/base/318724 Log: MFC r317901: Improve error reporting in resizewin(1). Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:01:11 2017 (r318723) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:01:24 2017 (r318724) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -87,8 +88,7 @@ main(__unused int argc, __unused char ** gettimeofday(&now, NULL); timersub(&now, &then, &now); if (now.tv_sec >= 2) { - fprintf(stderr, "\n\n\nTimeout reading from terminal\n"); - fprintf(stderr, "Read %d bytes, %s\n", cnt, data); + warnx("timeout reading from terminal"); err = 1; goto out; } @@ -104,7 +104,7 @@ main(__unused int argc, __unused char ** cnt++; if (cnt == sizeof(data) - 2) { - fprintf(stderr, "Response too long\n"); + warnx("response too long"); err = 1; goto out; } @@ -113,7 +113,7 @@ main(__unused int argc, __unused char ** /* Parse */ if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) { err = 1; - fprintf(stderr, "Unable to parse response\n"); + warnx("unable to parse response"); goto out; } From owner-svn-src-stable-11@freebsd.org Tue May 23 08:02:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14A61D7A77F; Tue, 23 May 2017 08:02:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0278197D; Tue, 23 May 2017 08:02:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N82Lvk094984; Tue, 23 May 2017 08:02:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N82Ljl094983; Tue, 23 May 2017 08:02:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230802.v4N82Ljl094983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:02:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318725 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:02:23 -0000 Author: trasz Date: Tue May 23 08:02:21 2017 New Revision: 318725 URL: https://svnweb.freebsd.org/changeset/base/318725 Log: MFC r317905: Rename a variable, hopefully fixing build after r317901. Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:01:24 2017 (r318724) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:02:21 2017 (r318725) @@ -52,11 +52,11 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, err; + int ret, fd, cnt, error; char data[20]; struct timeval then, now; - err = 0; + error = 0; if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1) exit(1); @@ -72,7 +72,7 @@ main(__unused int argc, __unused char ** exit(1); if (write(fd, query, sizeof(query)) != sizeof(query)) { - err = 1; + error = 1; goto out; } @@ -89,14 +89,14 @@ main(__unused int argc, __unused char ** timersub(&now, &then, &now); if (now.tv_sec >= 2) { warnx("timeout reading from terminal"); - err = 1; + error = 1; goto out; } usleep(20000); continue; } - err = 1; + error = 1; goto out; } if (data[cnt] == 'R') @@ -105,25 +105,25 @@ main(__unused int argc, __unused char ** cnt++; if (cnt == sizeof(data) - 2) { warnx("response too long"); - err = 1; + error = 1; goto out; } } /* Parse */ if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) { - err = 1; + error = 1; warnx("unable to parse response"); goto out; } /* Finally, what we want */ if (ioctl(fd, TIOCSWINSZ, &w) == -1) - err = 1; + error = 1; out: /* Restore echo */ tcsetattr(fd, TCSANOW, &old); close(fd); - exit(err); + exit(error); } From owner-svn-src-stable-11@freebsd.org Tue May 23 08:04:38 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DD5CD7A816; Tue, 23 May 2017 08:04:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1EFD1B00; Tue, 23 May 2017 08:04:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N84aM9095113; Tue, 23 May 2017 08:04:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N84a2Y095112; Tue, 23 May 2017 08:04:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230804.v4N84a2Y095112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318726 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:04:38 -0000 Author: trasz Date: Tue May 23 08:04:36 2017 New Revision: 318726 URL: https://svnweb.freebsd.org/changeset/base/318726 Log: MFC r317909: Make resizewin(1) discard the terminal queues, to lower the chance for "unable to parse response" error which happens when youre typing too fast for the machine you're running it on. Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:02:21 2017 (r318725) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:04:36 2017 (r318726) @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, error; + int ret, fd, cnt, error, what; char data[20]; struct timeval then, now; @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** if (tcsetattr(fd, TCSANOW, &new) == -1) exit(1); + /* Discard input received so far */ + what = FREAD | FWRITE; + error = ioctl(fd, TIOCFLUSH, &what); + if (error != 0) + warn("ioctl"); + if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; goto out; From owner-svn-src-stable-11@freebsd.org Tue May 23 08:06:01 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E97D7A89F; Tue, 23 May 2017 08:06:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 676C31C6E; Tue, 23 May 2017 08:06:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N860XU095233; Tue, 23 May 2017 08:06:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N860X4095232; Tue, 23 May 2017 08:06:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230806.v4N860X4095232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318727 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:06:01 -0000 Author: trasz Date: Tue May 23 08:06:00 2017 New Revision: 318727 URL: https://svnweb.freebsd.org/changeset/base/318727 Log: MFC r317933: Use tcflush(3) instead of (nonstandard) TIOCFLUSH. Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:04:36 2017 (r318726) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:06:00 2017 (r318727) @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, error, what; + int ret, fd, cnt, error; char data[20]; struct timeval then, now; @@ -72,10 +72,9 @@ main(__unused int argc, __unused char ** exit(1); /* Discard input received so far */ - what = FREAD | FWRITE; - error = ioctl(fd, TIOCFLUSH, &what); + error = tcflush(fd, TCIOFLUSH); if (error != 0) - warn("ioctl"); + warn("tcflush"); if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; From owner-svn-src-stable-11@freebsd.org Tue May 23 08:07:41 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29578D7A907; Tue, 23 May 2017 08:07:41 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DECBB1DAF; Tue, 23 May 2017 08:07:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N87dAe095352; Tue, 23 May 2017 08:07:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N87d04095350; Tue, 23 May 2017 08:07:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230807.v4N87d04095350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318728 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:07:41 -0000 Author: trasz Date: Tue May 23 08:07:39 2017 New Revision: 318728 URL: https://svnweb.freebsd.org/changeset/base/318728 Log: MFC rr317934: Add resizewin -z. It makes resizewin not do anything if the terminal size is already set to something other than zero. It's supposed to be called from eg /etc/profile - it's not neccessary to query terminal size when logging in over the network, because the protocol used already takes care of this, but it's neccessary when logging over a serial line. Modified: stable/11/usr.bin/resizewin/resizewin.1 stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.1 ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:06:00 2017 (r318727) +++ stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:07:39 2017 (r318728) @@ -27,17 +27,27 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2016 +.Dd May 8, 2017 .Dt RESIZEWIN 1 .Os .Sh NAME .Nm resizewin .Nd update the kernel window size for the current TTY +.Sh SYNOPSIS +.Nm +.Op Fl z .Sh DESCRIPTION Query the terminal emulator window size with the .Dv TIOCSWINSZ ioctl and set the window size known by the kernel to the new values. The terminal is assumed to be VT100/ANSI compatible. +.Pp +The following options are available: +.Bl -tag -width ".Fl z" +.It Fl z +Do nothing unless the current kernel terminal size is zero. +.El +.Pp .Nm is functionally similar to .Xr resize 1 , Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:06:00 2017 (r318727) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:07:39 2017 (r318728) @@ -47,20 +47,50 @@ static const char query[] = "\033[999;999H" /* Move cursor */ "\033[6n" /* Get cursor position */ "\0338"; /* Restore cursor position */ + +static void +usage(void) +{ + + fprintf(stderr, "usage: resizewin [-z]\n"); + exit(1); +} + int -main(__unused int argc, __unused char **argv) +main(int argc, char **argv) { struct termios old, new; struct winsize w; - int ret, fd, cnt, error; + int ret, fd, ch, cnt, error, zflag; char data[20]; struct timeval then, now; error = 0; + zflag = 0; + while ((ch = getopt(argc, argv, "z")) != -1) { + switch (ch) { + case 'z': + zflag = 1; + break; + case '?': + default: + usage(); + } + } + argc -= optind; + if (argc != 0) + usage(); if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1) exit(1); + if (zflag) { + if (ioctl(fd, TIOCGWINSZ, &w) == -1) + exit(1); + if (w.ws_row != 0 && w.ws_col != 0) + exit(0); + } + /* Disable echo */ if (tcgetattr(fd, &old) == -1) exit(1); From owner-svn-src-stable-11@freebsd.org Tue May 23 08:08:24 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F3DBD7A9AC; Tue, 23 May 2017 08:08:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E61A1F14; Tue, 23 May 2017 08:08:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N88Ndi095432; Tue, 23 May 2017 08:08:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N88NKE095431; Tue, 23 May 2017 08:08:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230808.v4N88NKE095431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:08:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318729 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:08:24 -0000 Author: trasz Date: Tue May 23 08:08:23 2017 New Revision: 318729 URL: https://svnweb.freebsd.org/changeset/base/318729 Log: MFC r317935: Sort variable declarations; no functional changes. Modified: stable/11/usr.bin/resizewin/resizewin.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.c ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:07:39 2017 (r318728) +++ stable/11/usr.bin/resizewin/resizewin.c Tue May 23 08:08:23 2017 (r318729) @@ -61,9 +61,9 @@ main(int argc, char **argv) { struct termios old, new; struct winsize w; - int ret, fd, ch, cnt, error, zflag; - char data[20]; struct timeval then, now; + char data[20]; + int ch, cnt, error, fd, ret, zflag; error = 0; zflag = 0; From owner-svn-src-stable-11@freebsd.org Tue May 23 08:09:06 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DF06D7AA30; Tue, 23 May 2017 08:09:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9B351069; Tue, 23 May 2017 08:09:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N894Qn095511; Tue, 23 May 2017 08:09:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N8940P095510; Tue, 23 May 2017 08:09:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230809.v4N8940P095510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318730 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:09:06 -0000 Author: trasz Date: Tue May 23 08:09:04 2017 New Revision: 318730 URL: https://svnweb.freebsd.org/changeset/base/318730 Log: MFC r318116: Random updates to resizewin(1) man page. Modified: stable/11/usr.bin/resizewin/resizewin.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.1 ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:08:23 2017 (r318729) +++ stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:09:04 2017 (r318730) @@ -27,27 +27,38 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2017 +.Dd May 9, 2017 .Dt RESIZEWIN 1 .Os .Sh NAME .Nm resizewin -.Nd update the kernel window size for the current TTY +.Nd update terminal size .Sh SYNOPSIS .Nm .Op Fl z .Sh DESCRIPTION -Query the terminal emulator window size with the +The +.Nm +utility +queries the terminal emulator for the current window size and updates +the size known to the kernel using the .Dv TIOCSWINSZ -ioctl and set the window size known by the kernel to the new values. -The terminal is assumed to be VT100/ANSI compatible. +ioctl. .Pp The following options are available: .Bl -tag -width ".Fl z" .It Fl z Do nothing unless the current kernel terminal size is zero. +This is useful when run from user's profile (shell startup) scripts: +querying the window size is required for serial lines, but not when +logging in over the network, as protocols like TELNET or SSH already +handle the terminal size by themselves. .El .Pp +After a terminal window has been resized, running +.Nm +updates the kernel's window size to match the new size. +.Pp .Nm is functionally similar to .Xr resize 1 , @@ -56,21 +67,18 @@ which is part of the distribution. However, .Nm -only works with VT100/ANSI-compatible terminals and does -not emit commands to set environment variables. +only works with VT100/ANSI-compatible terminals and directly sets +the terminal size instead of emitting commands to set environment variables. .Pp -After a terminal window has been resized, running -.Nm -updates the kernel's window size to match the new size. -.Pp -Note that virtually all modern terninals support VT100/ANSI escape -sequences, including xterm, konsole, gnome-terminal iTerm, +The terminal is assumed to be VT100/ANSI compatible. +The VT100/ANSI escape sequences are supported by virtually all modern +terminals; this include xterm, konsole, gnome-terminal, iTerm, Terminal.app, and PuTTY. .Sh SEE ALSO -.Xr resize 1 , -.Xr stty 1 +.Xr stty 1 , +.Xr tty 4 .Sh HISTORY The .Nm command first appeared in -.Fx 11 . +.Fx 11.0 . From owner-svn-src-stable-11@freebsd.org Tue May 23 08:09:45 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C330CD7AAA0; Tue, 23 May 2017 08:09:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9252711EF; Tue, 23 May 2017 08:09:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N89iUg095586; Tue, 23 May 2017 08:09:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N89inn095585; Tue, 23 May 2017 08:09:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230809.v4N89inn095585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318731 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:09:45 -0000 Author: trasz Date: Tue May 23 08:09:44 2017 New Revision: 318731 URL: https://svnweb.freebsd.org/changeset/base/318731 Log: MFC r318138: Revert to pre-r318116 wording to not give the false impression that setting the kernels' idea of terminal size is somehow an alternative to environment variables. Modified: stable/11/usr.bin/resizewin/resizewin.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.1 ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:09:04 2017 (r318730) +++ stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:09:44 2017 (r318731) @@ -67,8 +67,8 @@ which is part of the distribution. However, .Nm -only works with VT100/ANSI-compatible terminals and directly sets -the terminal size instead of emitting commands to set environment variables. +only works with VT100/ANSI-compatible terminals and does not emit +commands to set environment variables. .Pp The terminal is assumed to be VT100/ANSI compatible. The VT100/ANSI escape sequences are supported by virtually all modern From owner-svn-src-stable-11@freebsd.org Tue May 23 08:10:37 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35572D7AB13; Tue, 23 May 2017 08:10:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0545E134E; Tue, 23 May 2017 08:10:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N8Aa2J095691; Tue, 23 May 2017 08:10:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N8Aah7095690; Tue, 23 May 2017 08:10:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230810.v4N8Aah7095690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318732 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:10:37 -0000 Author: trasz Date: Tue May 23 08:10:35 2017 New Revision: 318732 URL: https://svnweb.freebsd.org/changeset/base/318732 Log: MFC r318481: Language fixes. Modified: stable/11/usr.bin/resizewin/resizewin.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.1 ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:09:44 2017 (r318731) +++ stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:10:35 2017 (r318732) @@ -49,7 +49,7 @@ The following options are available: .Bl -tag -width ".Fl z" .It Fl z Do nothing unless the current kernel terminal size is zero. -This is useful when run from user's profile (shell startup) scripts: +This is useful when run from a user's profile (shell startup) scripts: querying the window size is required for serial lines, but not when logging in over the network, as protocols like TELNET or SSH already handle the terminal size by themselves. @@ -72,7 +72,7 @@ commands to set environment variables. .Pp The terminal is assumed to be VT100/ANSI compatible. The VT100/ANSI escape sequences are supported by virtually all modern -terminals; this include xterm, konsole, gnome-terminal, iTerm, +terminals, including xterm, konsole, gnome-terminal, iTerm, Terminal.app, and PuTTY. .Sh SEE ALSO .Xr stty 1 , From owner-svn-src-stable-11@freebsd.org Tue May 23 08:11:57 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B407D7ACA5; Tue, 23 May 2017 08:11:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E116315FE; Tue, 23 May 2017 08:11:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N8BtCD098639; Tue, 23 May 2017 08:11:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N8BtuV098638; Tue, 23 May 2017 08:11:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230811.v4N8BtuV098638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318733 - stable/11/bin/stty X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:11:57 -0000 Author: trasz Date: Tue May 23 08:11:55 2017 New Revision: 318733 URL: https://svnweb.freebsd.org/changeset/base/318733 Log: MFC r317904: .Xr resizewin from stty(1) man page. Modified: stable/11/bin/stty/stty.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/stty/stty.1 ============================================================================== --- stable/11/bin/stty/stty.1 Tue May 23 08:10:35 2017 (r318732) +++ stable/11/bin/stty/stty.1 Tue May 23 08:11:55 2017 (r318733) @@ -588,6 +588,7 @@ Same as the control character .Sh EXIT STATUS .Ex -std .Sh SEE ALSO +.Xr resizewin 1 , .Xr termios 4 .Sh STANDARDS The From owner-svn-src-stable-11@freebsd.org Tue May 23 08:41:42 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9341FD784BE; Tue, 23 May 2017 08:41:42 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26DAC13CD; Tue, 23 May 2017 08:41:42 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id g15so18010770wmc.2; Tue, 23 May 2017 01:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xuYvszDsPVBQKA7dC/HJVDM2nwYpy7dHUh7h4nIXzT0=; b=ZsVwLdFAHHEBH0DqvNPpmcmxX4phGcAL/sBbIsclbuYgigNf9yq7ogihHI3sBgCBVG 1bQcL9X81di5ACNoHMQ6FdAvDgJubGdwXIEb45vqXatwrQbKGtCsmWkFeDsmnnocXFsa tOEeDBjeUkoc9/rINCtq0ueMkIftqcjAAI9rWwBv7m8u/BMhTIx4BYiJvKk8uDln4jBb oaXHGIjxdLpojCzi3LYiTw9bYf+pOaqUK41mLXqMxUjN/vgdnzLriBT2/xVcQxMssqM2 t1cegDgbbxNBX+28s6SdU2AFyKO2IjmJRBFLe4oRbOq716yCB43g+xI2RSZLIc4lDyRQ QHPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=xuYvszDsPVBQKA7dC/HJVDM2nwYpy7dHUh7h4nIXzT0=; b=OYrIn/vn+blAleuTp6IrIGdMwYRL0NEy25lvshuoH8cSzQ/lhyiVjB+LE102qIDtld +LdkSGcDTddw3WBwtdoMOf2aZmkGLK4RqHYAasuyFebpC3B6ZnZqlqNuwuZF5rIJogY8 YcHj2qdVop9cY379FLiABK8hjEEZisLLH0JfBJ3boqCAtPsDZvWojG9Vaa+eqipwCGry OND3tHQftgj0vhPJcaI8WsVA/TVPuBo8yIKeosvwfiUPWkK71+FDmMiqVo+kVOgrVRr9 S8vI/lh5tTzcG5dWpsNuA5WWyVoMk3W8jT7IQsQA/LFcr6CYUNLIpdx/V08yXVjGjjcO +EDQ== X-Gm-Message-State: AODbwcAZUIpF4EZE86KyTy73R/lu12Z5alcl1m5Q9rPReGwKPFQ0vhmd lnkfDf5Bmo95IjC/ X-Received: by 10.80.187.68 with SMTP id y62mr20440846ede.51.1495528900290; Tue, 23 May 2017 01:41:40 -0700 (PDT) Received: from localhost (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id g29sm24993eda.43.2017.05.23.01.41.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2017 01:41:39 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Tue, 23 May 2017 09:41:36 +0100 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Nick Hibma Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r318630 - stable/11/sbin/dhclient Message-ID: <20170523084136.m4apjlyyvpaoqpwt@dhcp-3-128.uk.xensource.com> References: <201705221028.v4MASHNe041436@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705221028.v4MASHNe041436@repo.freebsd.org> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:41:42 -0000 On Mon, May 22, 2017 at 10:28:17AM +0000, Nick Hibma wrote: > Author: n_hibma > Date: Mon May 22 10:28:17 2017 > New Revision: 318630 > URL: https://svnweb.freebsd.org/changeset/base/318630 > > Log: > MFC: > > ------------------------------------------------------------------------ > r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines > > Fix the output of very large rebind, renew and lease time options in > lease file. > > Some routers set very large values for rebind time (Netgear) and these > are erroneously reported as negative in the leasefile. This was due to a > wrong printf format specification of %ld for an unsigned long on 32-bit > platforms. > > ------------------------------------------------------------------------ > r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines > > Fix handling of large DHCP expiry values. > > They would overflow a signed 32-bit time_t on 32 bit architectures. This > was taken care of, but a compiler optimisation makes this behave > erratically. This could be resolved by adding a -fwrapv flag, but > instead we can check the value before adding the current timestamp to > it. > > In the lease file values are still wrong though: > > option dhcp-rebinding-time -644245096; > > PR: 218980 > > Modified: > stable/11/sbin/dhclient/dhclient.c > stable/11/sbin/dhclient/options.c This is missing the mergeinfo in stable/11. Roger. From owner-svn-src-stable-11@freebsd.org Tue May 23 09:20:32 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5BE2D793A2; Tue, 23 May 2017 09:20:32 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F86E1ABC; Tue, 23 May 2017 09:20:32 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N9KV75024307; Tue, 23 May 2017 09:20:31 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N9KVqk024306; Tue, 23 May 2017 09:20:31 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705230920.v4N9KVqk024306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Tue, 23 May 2017 09:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318735 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 09:20:32 -0000 Author: n_hibma Date: Tue May 23 09:20:31 2017 New Revision: 318735 URL: https://svnweb.freebsd.org/changeset/base/318735 Log: Commit the mergeinfo for the commit to sbin/dhclient. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-11@freebsd.org Tue May 23 12:04:01 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67CCFD78472; Tue, 23 May 2017 12:04:01 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2895F125D; Tue, 23 May 2017 12:04:01 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NC40pL092892; Tue, 23 May 2017 12:04:00 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NC40Ll092888; Tue, 23 May 2017 12:04:00 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705231204.v4NC40Ll092888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 23 May 2017 12:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318742 - in stable/11/sys/arm: arm include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:04:01 -0000 Author: mmel Date: Tue May 23 12:03:59 2017 New Revision: 318742 URL: https://svnweb.freebsd.org/changeset/base/318742 Log: MFC r318021,r318251: r318021: Introduce pmap_remap_vm_attr(), it allows to remap one VM memattr class to another. r318251: Clarify usage rules for pmap_remap_vm_attr(). Not a functional change. Modified: stable/11/sys/arm/arm/pmap-v6.c stable/11/sys/arm/include/pmap-v6.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/11/sys/arm/arm/pmap-v6.c Tue May 23 12:00:08 2017 (r318741) +++ stable/11/sys/arm/arm/pmap-v6.c Tue May 23 12:03:59 2017 (r318742) @@ -497,6 +497,42 @@ pmap_set_tex(void) } /* + * Remap one vm_meattr class to another one. This can be useful as + * workaround for SOC errata, e.g. if devices must be accessed using + * SO memory class. + * + * !!! Please note that this function is absolutely last resort thing. + * It should not be used under normal circumstances. !!! + * + * Usage rules: + * - it shall be called after pmap_bootstrap_prepare() and before + * cpu_mp_start() (thus only on boot CPU). In practice, it's expected + * to be called from platform_attach() or platform_late_init(). + * + * - if remapping doesn't change caching mode, or until uncached class + * is remapped to any kind of cached one, then no other restriction exists. + * + * - if pmap_remap_vm_attr() changes caching mode, but both (original and + * remapped) remain cached, then caller is resposible for calling + * of dcache_wbinv_poc_all(). + * + * - remapping of any kind of cached class to uncached is not permitted. + */ +void +pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr) +{ + int old_idx, new_idx; + + /* Map VM memattrs to indexes to tex_class table. */ + old_idx = pte2_attr_tab[(int)old_attr]; + new_idx = pte2_attr_tab[(int)new_attr]; + + /* Replace TEX attribute and apply it. */ + tex_class[old_idx] = tex_class[new_idx]; + pmap_set_tex(); +} + +/* * KERNBASE must be multiple of NPT2_IN_PG * PTE1_SIZE. In other words, * KERNBASE is mapped by first L2 page table in L2 page table page. It * meets same constrain due to PT2MAP being placed just under KERNBASE. Modified: stable/11/sys/arm/include/pmap-v6.h ============================================================================== --- stable/11/sys/arm/include/pmap-v6.h Tue May 23 12:00:08 2017 (r318741) +++ stable/11/sys/arm/include/pmap-v6.h Tue May 23 12:03:59 2017 (r318742) @@ -189,6 +189,7 @@ vm_offset_t pmap_preboot_reserve_pages(u vm_offset_t pmap_preboot_get_vpages(u_int); void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t, vm_memattr_t); +void pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr); #endif /* _KERNEL */ #endif /* !_MACHINE_PMAP_V6_H_ */ From owner-svn-src-stable-11@freebsd.org Tue May 23 12:40:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7AD4D7995A; Tue, 23 May 2017 12:40:51 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92A9A1896; Tue, 23 May 2017 12:40:51 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NCeoYA008487; Tue, 23 May 2017 12:40:50 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NCeobS008485; Tue, 23 May 2017 12:40:50 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201705231240.v4NCeobS008485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Tue, 23 May 2017 12:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318743 - in stable: 10/sys/sys 11/sys/kern 11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:40:51 -0000 Author: badger Date: Tue May 23 12:40:50 2017 New Revision: 318743 URL: https://svnweb.freebsd.org/changeset/base/318743 Log: move p_sigqueue to the end of struct proc In order to preserve KBI in stable branches, replace the existing p_sigqueue slot with padding and move the expanded (as of r315949) p_sigqueue to the end of the struct. This is a repeat of r317529 (which concerned td_sigqueue in struct thread) for p_sigqueue in struct proc. Virtualbox modules (and possibly others) are affected without this fix. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D10843 Modified: stable/11/sys/kern/kern_thread.c stable/11/sys/sys/proc.h Changes in other areas also in this revision: Modified: stable/10/sys/sys/proc.h Modified: stable/11/sys/kern/kern_thread.c ============================================================================== --- stable/11/sys/kern/kern_thread.c Tue May 23 12:03:59 2017 (r318742) +++ stable/11/sys/kern/kern_thread.c Tue May 23 12:40:50 2017 (r318743) @@ -87,11 +87,11 @@ _Static_assert(offsetof(struct proc, p_f "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0xbc, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x3d0, +_Static_assert(offsetof(struct proc, p_filemon) == 0x3c0, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x3e0, +_Static_assert(offsetof(struct proc, p_comm) == 0x3d0, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b0, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4a0, "struct proc KBI p_emuldata"); #endif #ifdef __i386__ @@ -107,11 +107,11 @@ _Static_assert(offsetof(struct proc, p_f "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0x74, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x278, +_Static_assert(offsetof(struct proc, p_filemon) == 0x268, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x284, +_Static_assert(offsetof(struct proc, p_comm) == 0x274, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x304, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x2f4, "struct proc KBI p_emuldata"); #endif Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Tue May 23 12:03:59 2017 (r318742) +++ stable/11/sys/sys/proc.h Tue May 23 12:40:50 2017 (r318743) @@ -567,8 +567,8 @@ struct proc { struct mtx p_itimmtx; /* Lock for the virt/prof timers */ struct mtx p_profmtx; /* Lock for the profiling */ struct ksiginfo *p_ksi; /* Locked by parent proc lock */ - sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ -#define p_siglist p_sigqueue.sq_signals + uint64_t padding1[4]; + void *padding2[4]; /* The following fields are all zeroed upon creation in fork. */ #define p_startzero p_oppid @@ -660,6 +660,8 @@ struct proc { u_int p_ptevents; /* (c) ptrace() event mask. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ + sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ +#define p_siglist p_sigqueue.sq_signals }; #define p_session p_pgrp->pg_session From owner-svn-src-stable-11@freebsd.org Tue May 23 14:54:59 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C137CD7A68C; Tue, 23 May 2017 14:54:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 902CA11B1; Tue, 23 May 2017 14:54:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NEsw3B064476; Tue, 23 May 2017 14:54:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NEswUK064475; Tue, 23 May 2017 14:54:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705231454.v4NEswUK064475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 23 May 2017 14:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318746 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 14:54:59 -0000 Author: gjb Date: Tue May 23 14:54:58 2017 New Revision: 318746 URL: https://svnweb.freebsd.org/changeset/base/318746 Log: Document the requirement for two SA entries, following the IPSEC overhaul. Submitted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 23 14:38:59 2017 (r318745) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 23 14:54:58 2017 (r318746) @@ -779,6 +779,13 @@ sponsor="&yandex;">Support for the UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type has been removed. + + + Following the IPSEC code refactoring, + it is now necessary to have a security association + (SA) entry for both inbound and outbound + directions. + From owner-svn-src-stable-11@freebsd.org Tue May 23 15:04:31 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46F3AD7ABF8; Tue, 23 May 2017 15:04:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16BF21A52; Tue, 23 May 2017 15:04:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NF4UH5068438; Tue, 23 May 2017 15:04:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NF4Usj068437; Tue, 23 May 2017 15:04:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705231504.v4NF4Usj068437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 23 May 2017 15:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318747 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 15:04:31 -0000 Author: gjb Date: Tue May 23 15:04:29 2017 New Revision: 318747 URL: https://svnweb.freebsd.org/changeset/base/318747 Log: Move the SA entry to the tcpmd5 module addition. Submitted by: ae Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 23 14:54:58 2017 (r318746) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 23 15:04:29 2017 (r318747) @@ -457,6 +457,13 @@ ipsec and tcpmd5 kernel modules have been added. + + Following the addition of the tcpmd5 + module, it is now necessary to have a security association + (SA) entry for both inbound and outbound + directions. + + The &man.ipfw.4; packet filter has been updated to add support for named dynamic states. @@ -779,13 +786,6 @@ sponsor="&yandex;">Support for the UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type has been removed. - - - Following the IPSEC code refactoring, - it is now necessary to have a security association - (SA) entry for both inbound and outbound - directions. - From owner-svn-src-stable-11@freebsd.org Tue May 23 17:00:58 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29BBCD7BDBA; Tue, 23 May 2017 17:00:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC294161D; Tue, 23 May 2017 17:00:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NH0u7n014756; Tue, 23 May 2017 17:00:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NH0ucv014751; Tue, 23 May 2017 17:00:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705231700.v4NH0ucv014751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 23 May 2017 17:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318752 - in stable/11: sbin/geom/class/mirror sys/geom/mirror X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 17:00:58 -0000 Author: mav Date: Tue May 23 17:00:56 2017 New Revision: 318752 URL: https://svnweb.freebsd.org/changeset/base/318752 Log: MFC r309321: Add `gmirror create` subcommand, alike to gstripe, gconcat, etc. It is quite specific mode of operation without storing on-disk metadata. It can be useful in some cases in combination with some external control tools handling mirror creation and disks hot-plug. Sponsored by: iXsystems, Inc. Modified: stable/11/sbin/geom/class/mirror/geom_mirror.c stable/11/sbin/geom/class/mirror/gmirror.8 stable/11/sys/geom/mirror/g_mirror.c stable/11/sys/geom/mirror/g_mirror.h stable/11/sys/geom/mirror/g_mirror_ctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/geom/class/mirror/geom_mirror.c ============================================================================== --- stable/11/sbin/geom/class/mirror/geom_mirror.c Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sbin/geom/class/mirror/geom_mirror.c Tue May 23 17:00:56 2017 (r318752) @@ -79,6 +79,16 @@ struct g_command class_commands[] = { "[-adfFhnv] [-b balance] [-s slice] name\n" "[-v] -p priority name prov" }, + { "create", G_FLAG_VERBOSE, NULL, + { + { 'b', "balance", GMIRROR_BALANCE, G_TYPE_STRING }, + { 'F', "nofailsync", NULL, G_TYPE_BOOL }, + { 'n', "noautosync", NULL, G_TYPE_BOOL }, + { 's', "slice", GMIRROR_SLICE, G_TYPE_NUMBER }, + G_OPT_SENTINEL + }, + "[-Fnv] [-b balance] [-s slice] name prov ..." + }, { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov ..." }, Modified: stable/11/sbin/geom/class/mirror/gmirror.8 ============================================================================== --- stable/11/sbin/geom/class/mirror/gmirror.8 Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sbin/geom/class/mirror/gmirror.8 Tue May 23 17:00:56 2017 (r318752) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 27, 2013 +.Dd November 27, 2016 .Dt GMIRROR 8 .Os .Sh NAME @@ -43,6 +43,13 @@ .Op Fl v .Ar prov ... .Nm +.Cm create +.Op Fl Fnv +.Op Fl b Ar balance +.Op Fl s Ar slice +.Ar name +.Ar prov ... +.Nm .Cm configure .Op Fl adfFhnv .Op Fl b Ar balance @@ -170,6 +177,12 @@ Defaults to 4096 bytes. .El .It Cm clear Clear metadata on the given providers. +.It Cm create +Similar to +.Cm label, +but creates mirror without storing on-disk metadata in last sector. +This special "manual" operation mode assumes some external control to manage +mirror detection after reboot, device hot-plug and other external events. .It Cm configure Configure the given device. .Pp Modified: stable/11/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.c Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sys/geom/mirror/g_mirror.c Tue May 23 17:00:56 2017 (r318752) @@ -698,6 +698,8 @@ g_mirror_clear_metadata(struct g_mirror_ g_topology_assert_not(); sx_assert(&disk->d_softc->sc_lock, SX_LOCKED); + if (disk->d_softc->sc_type != G_MIRROR_TYPE_AUTOMATIC) + return (0); error = g_mirror_write_metadata(disk, NULL); if (error == 0) { G_MIRROR_DEBUG(2, "Metadata on %s cleared.", @@ -763,6 +765,8 @@ g_mirror_update_metadata(struct g_mirror sc = disk->d_softc; sx_assert(&sc->sc_lock, SX_LOCKED); + if (sc->sc_type != G_MIRROR_TYPE_AUTOMATIC) + return; if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_WIPE) == 0) g_mirror_fill_metadata(sc, disk, &md); error = g_mirror_write_metadata(disk, &md); @@ -2919,8 +2923,9 @@ end: return (error); } -static struct g_geom * -g_mirror_create(struct g_class *mp, const struct g_mirror_metadata *md) +struct g_geom * +g_mirror_create(struct g_class *mp, const struct g_mirror_metadata *md, + u_int type) { struct g_mirror_softc *sc; struct g_geom *gp; @@ -2943,6 +2948,7 @@ g_mirror_create(struct g_class *mp, cons gp->access = g_mirror_access; gp->dumpconf = g_mirror_dumpconf; + sc->sc_type = type; sc->sc_id = md->md_mid; sc->sc_slice = md->md_slice; sc->sc_balance = md->md_balance; @@ -3119,6 +3125,8 @@ g_mirror_taste(struct g_class *mp, struc sc = gp->softc; if (sc == NULL) continue; + if (sc->sc_type != G_MIRROR_TYPE_AUTOMATIC) + continue; if (sc->sc_sync.ds_geom == gp) continue; if (strcmp(md.md_name, sc->sc_name) != 0) @@ -3131,7 +3139,7 @@ g_mirror_taste(struct g_class *mp, struc break; } if (gp == NULL) { - gp = g_mirror_create(mp, &md); + gp = g_mirror_create(mp, &md, G_MIRROR_TYPE_AUTOMATIC); if (gp == NULL) { G_MIRROR_DEBUG(0, "Cannot create device %s.", md.md_name); @@ -3279,6 +3287,19 @@ g_mirror_dumpconf(struct sbuf *sb, const } else { g_topology_unlock(); sx_xlock(&sc->sc_lock); + sbuf_printf(sb, "%s", indent); + switch (sc->sc_type) { + case G_MIRROR_TYPE_AUTOMATIC: + sbuf_printf(sb, "AUTOMATIC"); + break; + case G_MIRROR_TYPE_MANUAL: + sbuf_printf(sb, "MANUAL"); + break; + default: + sbuf_printf(sb, "UNKNOWN"); + break; + } + sbuf_printf(sb, "\n"); sbuf_printf(sb, "%s%u\n", indent, (u_int)sc->sc_id); sbuf_printf(sb, "%s%u\n", indent, sc->sc_syncid); sbuf_printf(sb, "%s%u\n", indent, sc->sc_genid); Modified: stable/11/sys/geom/mirror/g_mirror.h ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.h Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sys/geom/mirror/g_mirror.h Tue May 23 17:00:56 2017 (r318752) @@ -165,11 +165,15 @@ struct g_mirror_event { #define G_MIRROR_DEVICE_STATE_STARTING 0 #define G_MIRROR_DEVICE_STATE_RUNNING 1 +#define G_MIRROR_TYPE_MANUAL 0 +#define G_MIRROR_TYPE_AUTOMATIC 1 + /* Bump syncid on first write. */ #define G_MIRROR_BUMP_SYNCID 0x1 /* Bump genid immediately. */ #define G_MIRROR_BUMP_GENID 0x2 struct g_mirror_softc { + u_int sc_type; /* Device type (manual/automatic). */ u_int sc_state; /* Device state. */ uint32_t sc_slice; /* Slice size. */ uint8_t sc_balance; /* Balance algorithm. */ @@ -220,7 +224,11 @@ struct g_mirror_softc { }; #define sc_name sc_geom->name +struct g_mirror_metadata; + u_int g_mirror_ndisks(struct g_mirror_softc *sc, int state); +struct g_geom * g_mirror_create(struct g_class *mp, + const struct g_mirror_metadata *md, u_int type); #define G_MIRROR_DESTROY_SOFT 0 #define G_MIRROR_DESTROY_DELAYED 1 #define G_MIRROR_DESTROY_HARD 2 Modified: stable/11/sys/geom/mirror/g_mirror_ctl.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror_ctl.c Tue May 23 16:59:24 2017 (r318751) +++ stable/11/sys/geom/mirror/g_mirror_ctl.c Tue May 23 17:00:56 2017 (r318752) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -301,6 +302,182 @@ g_mirror_ctl_configure(struct gctl_req * } static void +g_mirror_create_orphan(struct g_consumer *cp) +{ + + KASSERT(1 == 0, ("%s called while creating %s.", __func__, + cp->provider->name)); +} + +static void +g_mirror_ctl_create(struct gctl_req *req, struct g_class *mp) +{ + struct g_mirror_metadata md; + struct g_geom *gp; + struct g_consumer *cp; + struct g_provider *pp; + struct g_mirror_softc *sc; + struct sbuf *sb; + const char *name; + char param[16]; + int *nargs; + intmax_t *val; + int *ival; + const char *sval; + int bal; + unsigned attached, no, sectorsize; + off_t mediasize; + + nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); + if (nargs == NULL) { + gctl_error(req, "No '%s' argument.", "nargs"); + return; + } + if (*nargs <= 2) { + gctl_error(req, "Too few arguments."); + return; + } + + strlcpy(md.md_magic, G_MIRROR_MAGIC, sizeof(md.md_magic)); + md.md_version = G_MIRROR_VERSION; + name = gctl_get_asciiparam(req, "arg0"); + if (name == NULL) { + gctl_error(req, "No 'arg%u' argument.", 0); + return; + } + strlcpy(md.md_name, name, sizeof(md.md_name)); + md.md_mid = arc4random(); + md.md_all = *nargs - 1; + md.md_genid = 0; + md.md_syncid = 1; + md.md_sync_offset = 0; + val = gctl_get_paraml(req, "slice", sizeof(*val)); + if (val == NULL) { + gctl_error(req, "No slice argument."); + return; + } + md.md_slice = *val; + sval = gctl_get_asciiparam(req, "balance"); + if (sval == NULL) { + gctl_error(req, "No balance argument."); + return; + } + bal = balance_id(sval); + if (bal < 0) { + gctl_error(req, "Invalid balance algorithm."); + return; + } + md.md_balance = bal; + md.md_mflags = 0; + md.md_dflags = 0; + ival = gctl_get_paraml(req, "noautosync", sizeof(*ival)); + if (ival != NULL && *ival) + md.md_mflags |= G_MIRROR_DEVICE_FLAG_NOAUTOSYNC; + ival = gctl_get_paraml(req, "nofailsync", sizeof(*ival)); + if (ival != NULL && *ival) + md.md_mflags |= G_MIRROR_DEVICE_FLAG_NOFAILSYNC; + /* These fields not used in manual mode. */ + bzero(md.md_provider, sizeof(md.md_provider)); + md.md_provsize = 0; + + g_topology_lock(); + mediasize = OFF_MAX; + sectorsize = 0; + gp = g_new_geomf(mp, "%s", md.md_name); + gp->orphan = g_mirror_create_orphan; + cp = g_new_consumer(gp); + for (no = 1; no < *nargs; no++) { + snprintf(param, sizeof(param), "arg%u", no); + name = gctl_get_asciiparam(req, param); + if (name == NULL) { + gctl_error(req, "No 'arg%u' argument.", no); +err: + g_destroy_consumer(cp); + g_destroy_geom(gp); + g_topology_unlock(); + return; + } + if (strncmp(name, "/dev/", strlen("/dev/")) == 0) + name += strlen("/dev/"); + pp = g_provider_by_name(name); + if (pp == NULL) { + G_MIRROR_DEBUG(1, "Disk %s is invalid.", name); + gctl_error(req, "Disk %s is invalid.", name); + goto err; + } + g_attach(cp, pp); + if (g_access(cp, 1, 0, 0) != 0) { + G_MIRROR_DEBUG(1, "Can't open disk %s.", name); + gctl_error(req, "Can't open disk %s.", name); +err2: + g_detach(cp); + goto err; + } + if (pp->mediasize == 0 || pp->sectorsize == 0) { + G_MIRROR_DEBUG(1, "Disk %s has no media.", name); + gctl_error(req, "Disk %s has no media.", name); + g_access(cp, -1, 0, 0); + goto err2; + } + if (pp->mediasize < mediasize) + mediasize = pp->mediasize; + if (pp->sectorsize > sectorsize) + sectorsize = pp->sectorsize; + g_access(cp, -1, 0, 0); + g_detach(cp); + } + g_destroy_consumer(cp); + g_destroy_geom(gp); + md.md_mediasize = mediasize; + md.md_sectorsize = sectorsize; + md.md_mediasize -= (md.md_mediasize % md.md_sectorsize); + + gp = g_mirror_create(mp, &md, G_MIRROR_TYPE_MANUAL); + if (gp == NULL) { + gctl_error(req, "Can't create %s.", md.md_name); + g_topology_unlock(); + return; + } + + sc = gp->softc; + g_topology_unlock(); + sx_xlock(&sc->sc_lock); + sc->sc_flags |= G_MIRROR_DEVICE_FLAG_TASTING; + sb = sbuf_new_auto(); + sbuf_printf(sb, "Can't attach disk(s) to %s:", gp->name); + for (attached = 0, no = 1; no < *nargs; no++) { + snprintf(param, sizeof(param), "arg%u", no); + name = gctl_get_asciiparam(req, param); + if (strncmp(name, "/dev/", strlen("/dev/")) == 0) + name += strlen("/dev/"); + pp = g_provider_by_name(name); + if (pp == NULL) { + G_MIRROR_DEBUG(1, "Provider %s disappear?!", name); + sbuf_printf(sb, " %s", name); + continue; + } + md.md_did = arc4random(); + md.md_priority = no - 1; + if (g_mirror_add_disk(sc, pp, &md) != 0) { + G_MIRROR_DEBUG(1, "Disk %u (%s) not attached to %s.", + no, pp->name, gp->name); + sbuf_printf(sb, " %s", pp->name); + continue; + } + attached++; + } + sbuf_finish(sb); + sc->sc_flags &= ~G_MIRROR_DEVICE_FLAG_TASTING; + if (md.md_all != attached || + (sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { + g_mirror_destroy(gp->softc, G_MIRROR_DESTROY_HARD); + gctl_error(req, "%s", sbuf_data(sb)); + } else + sx_xunlock(&sc->sc_lock); + sbuf_delete(sb); +} + +static void g_mirror_ctl_rebuild(struct gctl_req *req, struct g_class *mp) { struct g_mirror_metadata md; @@ -401,6 +578,7 @@ g_mirror_ctl_insert(struct gctl_req *req struct g_provider *provider; struct g_consumer *consumer; } *disks; + off_t mdsize; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -462,16 +640,6 @@ g_mirror_ctl_insert(struct gctl_req *req gctl_error(req, "Unknown provider %s.", name); continue; } - if (sc->sc_provider->mediasize > - pp->mediasize - pp->sectorsize) { - gctl_error(req, "Provider %s too small.", name); - continue; - } - if ((sc->sc_provider->sectorsize % pp->sectorsize) != 0) { - gctl_error(req, "Invalid sectorsize of provider %s.", - name); - continue; - } cp = g_new_consumer(sc->sc_geom); if (g_attach(cp, pp) != 0) { g_destroy_consumer(cp); @@ -479,9 +647,40 @@ g_mirror_ctl_insert(struct gctl_req *req continue; } if (g_access(cp, 0, 1, 1) != 0) { + gctl_error(req, "Cannot access provider %s.", name); +err: g_detach(cp); g_destroy_consumer(cp); - gctl_error(req, "Cannot access provider %s.", name); + continue; + } + mdsize = (sc->sc_type == G_MIRROR_TYPE_AUTOMATIC) ? + pp->sectorsize : 0; + if (sc->sc_provider->mediasize > pp->mediasize - mdsize) { + gctl_error(req, "Provider %s too small.", name); +err2: + g_access(cp, 0, -1, -1); + goto err; + } + if ((sc->sc_provider->sectorsize % pp->sectorsize) != 0) { + gctl_error(req, "Invalid sectorsize of provider %s.", + name); + goto err2; + } + if (sc->sc_type != G_MIRROR_TYPE_AUTOMATIC) { + g_access(cp, 0, -1, -1); + g_detach(cp); + g_destroy_consumer(cp); + g_topology_unlock(); + sc->sc_ndisks++; + g_mirror_fill_metadata(sc, NULL, &md); + md.md_priority = *priority; + if (*inactive) + md.md_dflags |= G_MIRROR_DISK_FLAG_INACTIVE; + if (g_mirror_add_disk(sc, pp, &md) != 0) { + sc->sc_ndisks--; + gctl_error(req, "Disk %s not inserted.", name); + } + g_topology_lock(); continue; } disks[n].provider = pp; @@ -872,6 +1071,8 @@ g_mirror_config(struct gctl_req *req, st g_topology_unlock(); if (strcmp(verb, "configure") == 0) g_mirror_ctl_configure(req, mp); + else if (strcmp(verb, "create") == 0) + g_mirror_ctl_create(req, mp); else if (strcmp(verb, "rebuild") == 0) g_mirror_ctl_rebuild(req, mp); else if (strcmp(verb, "insert") == 0) From owner-svn-src-stable-11@freebsd.org Tue May 23 22:11:47 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 423B5D7BFD1; Tue, 23 May 2017 22:11:47 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C9D81710; Tue, 23 May 2017 22:11:46 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NMBk9L046290; Tue, 23 May 2017 22:11:46 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NMBkXA046289; Tue, 23 May 2017 22:11:46 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201705232211.v4NMBkXA046289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 23 May 2017 22:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318759 - stable/11/usr.bin/sed X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 22:11:47 -0000 Author: brd (doc,ports committer) Date: Tue May 23 22:11:45 2017 New Revision: 318759 URL: https://svnweb.freebsd.org/changeset/base/318759 Log: MFC r316030, r317378: Add some useful examples to the sed man page. Reviewed by: wblock, bcr Differential Revision: https://reviews.freebsd.org/D9958 Modified: stable/11/usr.bin/sed/sed.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sed/sed.1 ============================================================================== --- stable/11/usr.bin/sed/sed.1 Tue May 23 20:51:48 2017 (r318758) +++ stable/11/usr.bin/sed/sed.1 Tue May 23 22:11:45 2017 (r318759) @@ -31,7 +31,7 @@ .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd May 10, 2016 +.Dd March 27, 2017 .Dt SED 1 .Os .Sh NAME @@ -586,6 +586,36 @@ as described in .Xr environ 7 . .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Replace +.Ql bar +with +.Ql baz +when piped from another command: +.Bd -literal -offset indent +echo "An alternate word, like bar, is sometimes used in examples." | sed 's/bar/baz/' +.Ed +.Pp +Using backlashes can sometimes be hard to read and follow: +.Bd -literal -offset indent +echo "/home/example" | sed 's/\\/home\\/example/\\/usr\\/local\\/example/' +.Ed +.Pp +Using a different separator can be handy when working with paths: +.Bd -literal -offset indent +echo "/home/example" | sed 's#/home/example#/usr/local/example#' +.Ed +.Pp +Replace all occurances of +.Ql foo +with +.Ql bar +in the file +.Pa test.txt , +without creating a backup of the file: +.Bd -literal -offset indent +sed -i '' -e 's/foo/bar/g' test.txt +.Ed .Sh SEE ALSO .Xr awk 1 , .Xr ed 1 , From owner-svn-src-stable-11@freebsd.org Wed May 24 00:00:57 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47CC2D7A677; Wed, 24 May 2017 00:00:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F02611693; Wed, 24 May 2017 00:00:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O00tlQ091894; Wed, 24 May 2017 00:00:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O00t5j091891; Wed, 24 May 2017 00:00:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705240000.v4O00t5j091891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 May 2017 00:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318763 - in stable/11/sys: amd64/conf i386/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 00:00:57 -0000 Author: jhb Date: Wed May 24 00:00:55 2017 New Revision: 318763 URL: https://svnweb.freebsd.org/changeset/base/318763 Log: MFC 310177: Enable EARLY_AP_STARTUP on amd64 and i386 kernels by default. PR: 199321, 203682 Discussed with: re (kib) Relnotes: yes Modified: stable/11/sys/amd64/conf/GENERIC stable/11/sys/amd64/conf/MINIMAL stable/11/sys/i386/conf/GENERIC Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/conf/GENERIC ============================================================================== --- stable/11/sys/amd64/conf/GENERIC Tue May 23 23:40:17 2017 (r318762) +++ stable/11/sys/amd64/conf/GENERIC Wed May 24 00:00:55 2017 (r318763) @@ -85,6 +85,7 @@ options KDB_TRACE # Print a stack trac # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel options DEVICE_NUMA # I/O Device Affinity +options EARLY_AP_STARTUP # CPU frequency control device cpufreq Modified: stable/11/sys/amd64/conf/MINIMAL ============================================================================== --- stable/11/sys/amd64/conf/MINIMAL Tue May 23 23:40:17 2017 (r318762) +++ stable/11/sys/amd64/conf/MINIMAL Wed May 24 00:00:55 2017 (r318763) @@ -93,6 +93,7 @@ options MALLOC_DEBUG_MAXZONES=8 # Separ # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel options DEVICE_NUMA # I/O Device Affinity +options EARLY_AP_STARTUP # CPU frequency control device cpufreq Modified: stable/11/sys/i386/conf/GENERIC ============================================================================== --- stable/11/sys/i386/conf/GENERIC Tue May 23 23:40:17 2017 (r318762) +++ stable/11/sys/i386/conf/GENERIC Wed May 24 00:00:55 2017 (r318763) @@ -85,6 +85,7 @@ options KDB_TRACE # Print a stack trac # To make an SMP kernel, the next two lines are needed options SMP # Symmetric MultiProcessor Kernel device apic # I/O APIC +options EARLY_AP_STARTUP # CPU frequency control device cpufreq From owner-svn-src-stable-11@freebsd.org Wed May 24 00:36:28 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FF8AD6B1E4; Wed, 24 May 2017 00:36:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 355E218A4; Wed, 24 May 2017 00:36:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O0aRIK006104; Wed, 24 May 2017 00:36:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O0aRLM006103; Wed, 24 May 2017 00:36:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705240036.v4O0aRLM006103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 May 2017 00:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318764 - stable/11/lib/libsysdecode X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 00:36:28 -0000 Author: jhb Date: Wed May 24 00:36:27 2017 New Revision: 318764 URL: https://svnweb.freebsd.org/changeset/base/318764 Log: MFC 315283: Fix sysdecode_cap_rights which currently prints bogus capability rights. PR: 217787 Modified: stable/11/lib/libsysdecode/flags.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/flags.c ============================================================================== --- stable/11/lib/libsysdecode/flags.c Wed May 24 00:00:55 2017 (r318763) +++ stable/11/lib/libsysdecode/flags.c Wed May 24 00:36:27 2017 (r318764) @@ -963,23 +963,15 @@ sysdecode_umtx_rwlock_flags(FILE *fp, u_ return (print_mask_0ul(fp, umtxrwlockflags, flags, rem)); } -/* XXX: This should be in */ -#define CAPMASK(right) ((right) & (((uint64_t)1 << 57) - 1)) - void sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp) { struct name_table *t; - int idx; bool comma; comma = false; for (t = caprights; t->str != NULL; t++) { - idx = ffs(CAPIDXBIT(t->val)) - 1; - if (CAPARSIZE(rightsp) < idx) - continue; - if ((rightsp->cr_rights[CAPIDXBIT(t->val)] & CAPMASK(t->val)) == - CAPMASK(t->val)) { + if (cap_rights_is_set(rightsp, t->val)) { fprintf(fp, "%s%s", comma ? "," : "", t->str); comma = true; } From owner-svn-src-stable-11@freebsd.org Wed May 24 01:06:10 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6147D6BD1A; Wed, 24 May 2017 01:06:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B635D1CF2; Wed, 24 May 2017 01:06:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O169YJ018662; Wed, 24 May 2017 01:06:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O169cZ018661; Wed, 24 May 2017 01:06:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705240106.v4O169cZ018661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 May 2017 01:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318770 - stable/11/lib/libsysdecode X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 01:06:11 -0000 Author: jhb Date: Wed May 24 01:06:09 2017 New Revision: 318770 URL: https://svnweb.freebsd.org/changeset/base/318770 Log: MFC 315310: Spell "const" properly. PR: 217797 Modified: stable/11/lib/libsysdecode/sysdecode_ioctlname.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/sysdecode_ioctlname.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_ioctlname.3 Wed May 24 01:03:30 2017 (r318769) +++ stable/11/lib/libsysdecode/sysdecode_ioctlname.3 Wed May 24 01:06:09 2017 (r318770) @@ -37,7 +37,7 @@ .In sys/types.h .In stdbool.h .In sysdecode.h -.Ft conts char * +.Ft const char * .Fn sysdecode_ioctlname "unsigned long request" .Sh DESCRIPTION The From owner-svn-src-stable-11@freebsd.org Wed May 24 03:26:16 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB384D7B3D1; Wed, 24 May 2017 03:26:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CEB11006; Wed, 24 May 2017 03:26:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O3QF9M076765; Wed, 24 May 2017 03:26:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O3QF5o076764; Wed, 24 May 2017 03:26:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705240326.v4O3QF5o076764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 May 2017 03:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318771 - stable/11/usr.bin/kdump X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 03:26:16 -0000 Author: jhb Date: Wed May 24 03:26:15 2017 New Revision: 318771 URL: https://svnweb.freebsd.org/changeset/base/318771 Log: MFC 315334: Decode arguments to chflagsat(). Modified: stable/11/usr.bin/kdump/kdump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/kdump/kdump.c ============================================================================== --- stable/11/usr.bin/kdump/kdump.c Wed May 24 01:06:09 2017 (r318770) +++ stable/11/usr.bin/kdump/kdump.c Wed May 24 03:26:15 2017 (r318771) @@ -876,6 +876,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in quad_slots = 1; switch (ktr->ktr_code) { case SYS_bindat: + case SYS_chflagsat: case SYS_connectat: case SYS_faccessat: case SYS_fchmodat: @@ -1018,6 +1019,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in narg--; break; case SYS_chflags: + case SYS_chflagsat: case SYS_fchflags: case SYS_lchflags: print_number(ip, narg, c); From owner-svn-src-stable-11@freebsd.org Wed May 24 03:56:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A873CD7BCD0; Wed, 24 May 2017 03:56:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6085010B4; Wed, 24 May 2017 03:56:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O3um6G089439; Wed, 24 May 2017 03:56:48 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O3umks089438; Wed, 24 May 2017 03:56:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705240356.v4O3umks089438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 03:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318772 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 03:56:49 -0000 Author: np Date: Wed May 24 03:56:48 2017 New Revision: 318772 URL: https://svnweb.freebsd.org/changeset/base/318772 Log: MFC r317170, r317389, and r317390. r317170: Remove redundant assignment. r317389: Frames that are not considered for LRO should not be counted in LRO statistics. r317390: Flush the LRO ctrl as soon as lro_mbufs fills up. There is no need to wait for the next enqueue from the driver. Sponsored by: Chelsio Communications Modified: stable/11/sys/netinet/tcp_lro.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_lro.c ============================================================================== --- stable/11/sys/netinet/tcp_lro.c Wed May 24 03:26:15 2017 (r318771) +++ stable/11/sys/netinet/tcp_lro.c Wed May 24 03:56:48 2017 (r318772) @@ -110,7 +110,6 @@ tcp_lro_init_args(struct lro_ctrl *lc, s lc->lro_bad_csum = 0; lc->lro_queued = 0; lc->lro_flushed = 0; - lc->lro_cnt = 0; lc->lro_mbuf_count = 0; lc->lro_mbuf_max = lro_mbufs; lc->lro_cnt = lro_entries; @@ -889,18 +888,12 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, /* check if packet is not LRO capable */ if (__predict_false(mb->m_pkthdr.csum_flags == 0 || (lc->ifp->if_capenable & IFCAP_LRO) == 0)) { - lc->lro_flushed++; - lc->lro_queued++; /* input packet to network layer */ (*lc->ifp->if_input) (lc->ifp, mb); return; } - /* check if array is full */ - if (__predict_false(lc->lro_mbuf_count == lc->lro_mbuf_max)) - tcp_lro_flush_all(lc); - /* create sequence number */ lc->lro_mbuf_data[lc->lro_mbuf_count].seq = (((uint64_t)M_HASHTYPE_GET(mb)) << 56) | @@ -908,7 +901,11 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, ((uint64_t)lc->lro_mbuf_count); /* enter mbuf */ - lc->lro_mbuf_data[lc->lro_mbuf_count++].mb = mb; + lc->lro_mbuf_data[lc->lro_mbuf_count].mb = mb; + + /* flush if array is full */ + if (__predict_false(++lc->lro_mbuf_count == lc->lro_mbuf_max)) + tcp_lro_flush_all(lc); } /* end */ From owner-svn-src-stable-11@freebsd.org Wed May 24 04:42:32 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BD37D78957; Wed, 24 May 2017 04:42:32 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D5A71713; Wed, 24 May 2017 04:42:32 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O4gVPC010645; Wed, 24 May 2017 04:42:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O4gVqd010644; Wed, 24 May 2017 04:42:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705240442.v4O4gVqd010644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 04:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318773 - stable/11/sys/dev/cxgbe/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 04:42:32 -0000 Author: np Date: Wed May 24 04:42:31 2017 New Revision: 318773 URL: https://svnweb.freebsd.org/changeset/base/318773 Log: MFC r311846: cxgbe(4): Refresh t4_msg.h, mainly for definitions related to the crypto engine. Modified: stable/11/sys/dev/cxgbe/common/t4_msg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_msg.h Wed May 24 03:56:48 2017 (r318772) +++ stable/11/sys/dev/cxgbe/common/t4_msg.h Wed May 24 04:42:31 2017 (r318773) @@ -106,6 +106,7 @@ enum { CPL_RX_FCOE_DIF = 0x4A, CPL_RX_DATA_DIF = 0x4B, CPL_ERR_NOTIFY = 0x4D, + CPL_RX_TLS_CMP = 0x4E, CPL_RDMA_READ_REQ = 0x60, CPL_RX_ISCSI_DIF = 0x60, @@ -113,6 +114,11 @@ enum { CPL_SET_LE_REQ = 0x80, CPL_PASS_OPEN_REQ6 = 0x81, CPL_ACT_OPEN_REQ6 = 0x83, + CPL_TX_TLS_PDU = 0x88, + CPL_TX_TLS_SFO = 0x89, + + CPL_TX_SEC_PDU = 0x8A, + CPL_TX_TLS_ACK = 0x8B, CPL_RDMA_TERMINATE = 0xA2, CPL_RDMA_WRITE = 0xA4, @@ -129,6 +135,7 @@ enum { CPL_TRACE_PKT = 0xB0, CPL_RX2TX_DATA = 0xB1, + CPL_TLS_DATA = 0xB1, CPL_ISCSI_DATA = 0xB2, CPL_FCOE_DATA = 0xB3, @@ -136,6 +143,7 @@ enum { CPL_FW4_PLD = 0xC1, CPL_FW4_ACK = 0xC3, CPL_SRQ_TABLE_RPL = 0xCC, + CPL_RX_PHYS_DSGL = 0xD0, CPL_FW6_MSG = 0xE0, CPL_FW6_PLD = 0xE1, @@ -200,6 +208,7 @@ enum { ULP_MODE_RDMA = 4, ULP_MODE_TCPDDP = 5, ULP_MODE_FCOE = 6, + ULP_MODE_TLS = 8, }; enum { @@ -993,6 +1002,23 @@ struct cpl_abort_req_rss { __u8 status; }; +struct cpl_abort_req_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + +#define S_ABORT_RSS_STATUS 0 +#define M_ABORT_RSS_STATUS 0xff +#define V_ABORT_RSS_STATUS(x) ((x) << S_ABORT_RSS_STATUS) +#define G_ABORT_RSS_STATUS(x) (((x) >> S_ABORT_RSS_STATUS) & M_ABORT_RSS_STATUS) + +#define S_ABORT_RSS_SRQIDX 8 +#define M_ABORT_RSS_SRQIDX 0xffffff +#define V_ABORT_RSS_SRQIDX(x) ((x) << S_ABORT_RSS_SRQIDX) +#define G_ABORT_RSS_SRQIDX(x) (((x) >> S_ABORT_RSS_SRQIDX) & M_ABORT_RSS_SRQIDX) + + /* cpl_abort_req status command code in case of T6, * bit[0] specifies whether to send RST (0) to remote peer or suppress it (1) * bit[1] indicates ABORT_REQ was sent after a CLOSE_CON_REQ @@ -1014,6 +1040,12 @@ struct cpl_abort_rpl_rss { __u8 status; }; +struct cpl_abort_rpl_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + struct cpl_abort_rpl { WR_HDR; union opcode_tid ot; @@ -2612,6 +2644,7 @@ enum { FW_TYPE_RSSCPL = 4, FW_TYPE_WRERR_RPL = 5, FW_TYPE_PI_ERR = 6, + FW_TYPE_TLS_KEY = 7, }; struct cpl_fw2_pld { @@ -2712,7 +2745,8 @@ enum { ULP_TX_SC_IMM = 0x81, ULP_TX_SC_DSGL = 0x82, ULP_TX_SC_ISGL = 0x83, - ULP_TX_SC_PICTRL = 0x84 + ULP_TX_SC_PICTRL = 0x84, + ULP_TX_SC_MEMRD = 0x86 }; #define S_ULPTX_CMD 24 @@ -2763,6 +2797,12 @@ struct ulptx_idata { #define S_ULPTX_NSGE 0 #define M_ULPTX_NSGE 0xFFFF #define V_ULPTX_NSGE(x) ((x) << S_ULPTX_NSGE) +#define G_ULPTX_NSGE(x) (((x) >> S_ULPTX_NSGE) & M_ULPTX_NSGE) + +struct ulptx_sc_memrd { + __be32 cmd_to_len; + __be32 addr; +}; struct ulp_mem_io { WR_HDR; @@ -2817,6 +2857,21 @@ struct ulp_txpkt { }; /* ulp_txpkt.cmd_dest fields */ +#define S_ULP_TXPKT_DATAMODIFY 23 +#define M_ULP_TXPKT_DATAMODIFY 0x1 +#define V_ULP_TXPKT_DATAMODIFY(x) ((x) << S_ULP_TXPKT_DATAMODIFY) +#define G_ULP_TXPKT_DATAMODIFY(x) \ + (((x) >> S_ULP_TXPKT_DATAMODIFY) & M_ULP_TXPKT_DATAMODIFY_) +#define F_ULP_TXPKT_DATAMODIFY V_ULP_TXPKT_DATAMODIFY(1U) + +#define S_ULP_TXPKT_CHANNELID 22 +#define M_ULP_TXPKT_CHANNELID 0x1 +#define V_ULP_TXPKT_CHANNELID(x) ((x) << S_ULP_TXPKT_CHANNELID) +#define G_ULP_TXPKT_CHANNELID(x) \ + (((x) >> S_ULP_TXPKT_CHANNELID) & M_ULP_TXPKT_CHANNELID) +#define F_ULP_TXPKT_CHANNELID V_ULP_TXPKT_CHANNELID(1U) + +/* ulp_txpkt.cmd_dest fields */ #define S_ULP_TXPKT_DEST 16 #define M_ULP_TXPKT_DEST 0x3 #define V_ULP_TXPKT_DEST(x) ((x) << S_ULP_TXPKT_DEST) @@ -3044,4 +3099,542 @@ struct cpl_rx_mps_pkt { #define X_CPL_RX_MPS_PKT_TYPE_QFC (1 << 2) #define X_CPL_RX_MPS_PKT_TYPE_PTP (1 << 3) +struct cpl_tx_tls_sfo { + __be32 op_to_seg_len; + __be32 pld_len; + __be64 rsvd; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +/* cpl_tx_tls_sfo macros */ +#define S_CPL_TX_TLS_SFO_OPCODE 24 +#define M_CPL_TX_TLS_SFO_OPCODE 0xff +#define V_CPL_TX_TLS_SFO_OPCODE(x) ((x) << S_CPL_TX_TLS_SFO_OPCODE) +#define G_CPL_TX_TLS_SFO_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_OPCODE) & M_CPL_TX_TLS_SFO_OPCODE) + +#define S_CPL_TX_TLS_SFO_DATA_TYPE 20 +#define M_CPL_TX_TLS_SFO_DATA_TYPE 0xf +#define V_CPL_TX_TLS_SFO_DATA_TYPE(x) ((x) << S_CPL_TX_TLS_SFO_DATA_TYPE) +#define G_CPL_TX_TLS_SFO_DATA_TYPE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_DATA_TYPE) & M_CPL_TX_TLS_SFO_DATA_TYPE) + +#define S_CPL_TX_TLS_SFO_CPL_LEN 16 +#define M_CPL_TX_TLS_SFO_CPL_LEN 0xf +#define V_CPL_TX_TLS_SFO_CPL_LEN(x) ((x) << S_CPL_TX_TLS_SFO_CPL_LEN) +#define G_CPL_TX_TLS_SFO_CPL_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_CPL_LEN) & M_CPL_TX_TLS_SFO_CPL_LEN) +#define S_CPL_TX_TLS_SFO_SEG_LEN 0 +#define M_CPL_TX_TLS_SFO_SEG_LEN 0xffff +#define V_CPL_TX_TLS_SFO_SEG_LEN(x) ((x) << S_CPL_TX_TLS_SFO_SEG_LEN) +#define G_CPL_TX_TLS_SFO_SEG_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_SEG_LEN) & M_CPL_TX_TLS_SFO_SEG_LEN) + +struct cpl_tls_data { + RSS_HDR + __be32 op_tid; + __be32 length_pkd; + __be32 seq; + __be32 r1; +}; + +#define S_CPL_TLS_DATA_OPCODE 24 +#define M_CPL_TLS_DATA_OPCODE 0xff +#define V_CPL_TLS_DATA_OPCODE(x) ((x) << S_CPL_TLS_DATA_OPCODE) +#define G_CPL_TLS_DATA_OPCODE(x) \ + (((x) >> S_CPL_TLS_DATA_OPCODE) & M_CPL_TLS_DATA_OPCODE) + +#define S_CPL_TLS_DATA_TID 0 +#define M_CPL_TLS_DATA_TID 0xffffff +#define V_CPL_TLS_DATA_TID(x) ((x) << S_CPL_TLS_DATA_TID) +#define G_CPL_TLS_DATA_TID(x) \ + (((x) >> S_CPL_TLS_DATA_TID) & M_CPL_TLS_DATA_TID) + +#define S_CPL_TLS_DATA_LENGTH 0 +#define M_CPL_TLS_DATA_LENGTH 0xffff +#define V_CPL_TLS_DATA_LENGTH(x) ((x) << S_CPL_TLS_DATA_LENGTH) +#define G_CPL_TLS_DATA_LENGTH(x) \ + (((x) >> S_CPL_TLS_DATA_LENGTH) & M_CPL_TLS_DATA_LENGTH) + +struct cpl_rx_tls_cmp { + RSS_HDR + __be32 op_tid; + __be32 pdulength_length; + __be32 seq; + __be32 ddp_report; + __be32 r; + __be32 ddp_valid; +}; + +#define S_CPL_RX_TLS_CMP_OPCODE 24 +#define M_CPL_RX_TLS_CMP_OPCODE 0xff +#define V_CPL_RX_TLS_CMP_OPCODE(x) ((x) << S_CPL_RX_TLS_CMP_OPCODE) +#define G_CPL_RX_TLS_CMP_OPCODE(x) \ + (((x) >> S_CPL_RX_TLS_CMP_OPCODE) & M_CPL_RX_TLS_CMP_OPCODE) + +#define S_CPL_RX_TLS_CMP_TID 0 +#define M_CPL_RX_TLS_CMP_TID 0xffffff +#define V_CPL_RX_TLS_CMP_TID(x) ((x) << S_CPL_RX_TLS_CMP_TID) +#define G_CPL_RX_TLS_CMP_TID(x) \ + (((x) >> S_CPL_RX_TLS_CMP_TID) & M_CPL_RX_TLS_CMP_TID) + +#define S_CPL_RX_TLS_CMP_PDULENGTH 16 +#define M_CPL_RX_TLS_CMP_PDULENGTH 0xffff +#define V_CPL_RX_TLS_CMP_PDULENGTH(x) ((x) << S_CPL_RX_TLS_CMP_PDULENGTH) +#define G_CPL_RX_TLS_CMP_PDULENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_PDULENGTH) & M_CPL_RX_TLS_CMP_PDULENGTH) + +#define S_CPL_RX_TLS_CMP_LENGTH 0 +#define M_CPL_RX_TLS_CMP_LENGTH 0xffff +#define V_CPL_RX_TLS_CMP_LENGTH(x) ((x) << S_CPL_RX_TLS_CMP_LENGTH) +#define G_CPL_RX_TLS_CMP_LENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_LENGTH) & M_CPL_RX_TLS_CMP_LENGTH) + +#define S_SCMD_SEQ_NO_CTRL 29 +#define M_SCMD_SEQ_NO_CTRL 0x3 +#define V_SCMD_SEQ_NO_CTRL(x) ((x) << S_SCMD_SEQ_NO_CTRL) +#define G_SCMD_SEQ_NO_CTRL(x) \ + (((x) >> S_SCMD_SEQ_NO_CTRL) & M_SCMD_SEQ_NO_CTRL) + +/* StsFieldPrsnt- Status field at the end of the TLS PDU */ +#define S_SCMD_STATUS_PRESENT 28 +#define M_SCMD_STATUS_PRESENT 0x1 +#define V_SCMD_STATUS_PRESENT(x) ((x) << S_SCMD_STATUS_PRESENT) +#define G_SCMD_STATUS_PRESENT(x) \ + (((x) >> S_SCMD_STATUS_PRESENT) & M_SCMD_STATUS_PRESENT) +#define F_SCMD_STATUS_PRESENT V_SCMD_STATUS_PRESENT(1U) + +/* ProtoVersion - Protocol Version 0: 1.2, 1:1.1, 2:DTLS, 3:Generic, + * 3-15: Reserved. */ +#define S_SCMD_PROTO_VERSION 24 +#define M_SCMD_PROTO_VERSION 0xf +#define V_SCMD_PROTO_VERSION(x) ((x) << S_SCMD_PROTO_VERSION) +#define G_SCMD_PROTO_VERSION(x) \ + (((x) >> S_SCMD_PROTO_VERSION) & M_SCMD_PROTO_VERSION) + +/* EncDecCtrl - Encryption/Decryption Control. 0: Encrypt, 1: Decrypt */ +#define S_SCMD_ENC_DEC_CTRL 23 +#define M_SCMD_ENC_DEC_CTRL 0x1 +#define V_SCMD_ENC_DEC_CTRL(x) ((x) << S_SCMD_ENC_DEC_CTRL) +#define G_SCMD_ENC_DEC_CTRL(x) \ + (((x) >> S_SCMD_ENC_DEC_CTRL) & M_SCMD_ENC_DEC_CTRL) +#define F_SCMD_ENC_DEC_CTRL V_SCMD_ENC_DEC_CTRL(1U) + +/* CipherAuthSeqCtrl - Cipher Authentication Sequence Control. */ +#define S_SCMD_CIPH_AUTH_SEQ_CTRL 22 +#define M_SCMD_CIPH_AUTH_SEQ_CTRL 0x1 +#define V_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + ((x) << S_SCMD_CIPH_AUTH_SEQ_CTRL) +#define G_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + (((x) >> S_SCMD_CIPH_AUTH_SEQ_CTRL) & M_SCMD_CIPH_AUTH_SEQ_CTRL) +#define F_SCMD_CIPH_AUTH_SEQ_CTRL V_SCMD_CIPH_AUTH_SEQ_CTRL(1U) + +/* CiphMode - Cipher Mode. 0: NOP, 1:AES-CBC, 2:AES-GCM, 3:AES-CTR, + * 4:Generic-AES, 5-15: Reserved. */ +#define S_SCMD_CIPH_MODE 18 +#define M_SCMD_CIPH_MODE 0xf +#define V_SCMD_CIPH_MODE(x) ((x) << S_SCMD_CIPH_MODE) +#define G_SCMD_CIPH_MODE(x) \ + (((x) >> S_SCMD_CIPH_MODE) & M_SCMD_CIPH_MODE) + +/* AuthMode - Auth Mode. 0: NOP, 1:SHA1, 2:SHA2-224, 3:SHA2-256 + * 4-15: Reserved */ +#define S_SCMD_AUTH_MODE 14 +#define M_SCMD_AUTH_MODE 0xf +#define V_SCMD_AUTH_MODE(x) ((x) << S_SCMD_AUTH_MODE) +#define G_SCMD_AUTH_MODE(x) \ + (((x) >> S_SCMD_AUTH_MODE) & M_SCMD_AUTH_MODE) + +/* HmacCtrl - HMAC Control. 0:NOP, 1:No truncation, 2:Support HMAC Truncation + * per RFC 4366, 3:IPSec 96 bits, 4-7:Reserved + */ +#define S_SCMD_HMAC_CTRL 11 +#define M_SCMD_HMAC_CTRL 0x7 +#define V_SCMD_HMAC_CTRL(x) ((x) << S_SCMD_HMAC_CTRL) +#define G_SCMD_HMAC_CTRL(x) \ + (((x) >> S_SCMD_HMAC_CTRL) & M_SCMD_HMAC_CTRL) + +/* IvSize - IV size in units of 2 bytes */ +#define S_SCMD_IV_SIZE 7 +#define M_SCMD_IV_SIZE 0xf +#define V_SCMD_IV_SIZE(x) ((x) << S_SCMD_IV_SIZE) +#define G_SCMD_IV_SIZE(x) \ + (((x) >> S_SCMD_IV_SIZE) & M_SCMD_IV_SIZE) + +/* NumIVs - Number of IVs */ +#define S_SCMD_NUM_IVS 0 +#define M_SCMD_NUM_IVS 0x7f +#define V_SCMD_NUM_IVS(x) ((x) << S_SCMD_NUM_IVS) +#define G_SCMD_NUM_IVS(x) \ + (((x) >> S_SCMD_NUM_IVS) & M_SCMD_NUM_IVS) + +/* EnbDbgId - If this is enabled upper 20 (63:44) bits if SeqNumber + * (below) are used as Cid (connection id for debug status), these + * bits are padded to zero for forming the 64 bit + * sequence number for TLS + */ +#define S_SCMD_ENB_DBGID 31 +#define M_SCMD_ENB_DBGID 0x1 +#define V_SCMD_ENB_DBGID(x) ((x) << S_SCMD_ENB_DBGID) +#define G_SCMD_ENB_DBGID(x) \ + (((x) >> S_SCMD_ENB_DBGID) & M_SCMD_ENB_DBGID) + +/* IV generation in SW. */ +#define S_SCMD_IV_GEN_CTRL 30 +#define M_SCMD_IV_GEN_CTRL 0x1 +#define V_SCMD_IV_GEN_CTRL(x) ((x) << S_SCMD_IV_GEN_CTRL) +#define G_SCMD_IV_GEN_CTRL(x) \ + (((x) >> S_SCMD_IV_GEN_CTRL) & M_SCMD_IV_GEN_CTRL) +#define F_SCMD_IV_GEN_CTRL V_SCMD_IV_GEN_CTRL(1U) + +/* More frags */ +#define S_SCMD_MORE_FRAGS 20 +#define M_SCMD_MORE_FRAGS 0x1 +#define V_SCMD_MORE_FRAGS(x) ((x) << S_SCMD_MORE_FRAGS) +#define G_SCMD_MORE_FRAGS(x) (((x) >> S_SCMD_MORE_FRAGS) & M_SCMD_MORE_FRAGS) + +/*last frag */ +#define S_SCMD_LAST_FRAG 19 +#define M_SCMD_LAST_FRAG 0x1 +#define V_SCMD_LAST_FRAG(x) ((x) << S_SCMD_LAST_FRAG) +#define G_SCMD_LAST_FRAG(x) (((x) >> S_SCMD_LAST_FRAG) & M_SCMD_LAST_FRAG) + +/* TlsCompPdu */ +#define S_SCMD_TLS_COMPPDU 18 +#define M_SCMD_TLS_COMPPDU 0x1 +#define V_SCMD_TLS_COMPPDU(x) ((x) << S_SCMD_TLS_COMPPDU) +#define G_SCMD_TLS_COMPPDU(x) (((x) >> S_SCMD_TLS_COMPPDU) & M_SCMD_TLS_COMPPDU) + +/* KeyCntxtInline - Key context inline after the scmd OR PayloadOnly*/ +#define S_SCMD_KEY_CTX_INLINE 17 +#define M_SCMD_KEY_CTX_INLINE 0x1 +#define V_SCMD_KEY_CTX_INLINE(x) ((x) << S_SCMD_KEY_CTX_INLINE) +#define G_SCMD_KEY_CTX_INLINE(x) \ + (((x) >> S_SCMD_KEY_CTX_INLINE) & M_SCMD_KEY_CTX_INLINE) +#define F_SCMD_KEY_CTX_INLINE V_SCMD_KEY_CTX_INLINE(1U) + +/* TLSFragEnable - 0: Host created TLS PDUs, 1: TLS Framgmentation in ASIC */ +#define S_SCMD_TLS_FRAG_ENABLE 16 +#define M_SCMD_TLS_FRAG_ENABLE 0x1 +#define V_SCMD_TLS_FRAG_ENABLE(x) ((x) << S_SCMD_TLS_FRAG_ENABLE) +#define G_SCMD_TLS_FRAG_ENABLE(x) \ + (((x) >> S_SCMD_TLS_FRAG_ENABLE) & M_SCMD_TLS_FRAG_ENABLE) +#define F_SCMD_TLS_FRAG_ENABLE V_SCMD_TLS_FRAG_ENABLE(1U) + +/* MacOnly - Only send the MAC and discard PDU. This is valid for hash only + * modes, in this case TLS_TX will drop the PDU and only + * send back the MAC bytes. */ +#define S_SCMD_MAC_ONLY 15 +#define M_SCMD_MAC_ONLY 0x1 +#define V_SCMD_MAC_ONLY(x) ((x) << S_SCMD_MAC_ONLY) +#define G_SCMD_MAC_ONLY(x) \ + (((x) >> S_SCMD_MAC_ONLY) & M_SCMD_MAC_ONLY) +#define F_SCMD_MAC_ONLY V_SCMD_MAC_ONLY(1U) + +/* AadIVDrop - Drop the AAD and IV fields. Useful in protocols + * which have complex AAD and IV formations Eg:AES-CCM + */ +#define S_SCMD_AADIVDROP 14 +#define M_SCMD_AADIVDROP 0x1 +#define V_SCMD_AADIVDROP(x) ((x) << S_SCMD_AADIVDROP) +#define G_SCMD_AADIVDROP(x) \ + (((x) >> S_SCMD_AADIVDROP) & M_SCMD_AADIVDROP) +#define F_SCMD_AADIVDROP V_SCMD_AADIVDROP(1U) + +/* HdrLength - Length of all headers excluding TLS header + * present before start of crypto PDU/payload. */ +#define S_SCMD_HDR_LEN 0 +#define M_SCMD_HDR_LEN 0x3fff +#define V_SCMD_HDR_LEN(x) ((x) << S_SCMD_HDR_LEN) +#define G_SCMD_HDR_LEN(x) \ + (((x) >> S_SCMD_HDR_LEN) & M_SCMD_HDR_LEN) + +struct cpl_tx_sec_pdu { + __be32 op_ivinsrtofst; + __be32 pldlen; + __be32 aadstart_cipherstop_hi; + __be32 cipherstop_lo_authinsert; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +#define S_CPL_TX_SEC_PDU_OPCODE 24 +#define M_CPL_TX_SEC_PDU_OPCODE 0xff +#define V_CPL_TX_SEC_PDU_OPCODE(x) ((x) << S_CPL_TX_SEC_PDU_OPCODE) +#define G_CPL_TX_SEC_PDU_OPCODE(x) \ + (((x) >> S_CPL_TX_SEC_PDU_OPCODE) & M_CPL_TX_SEC_PDU_OPCODE) + +/* RX Channel Id */ +#define S_CPL_TX_SEC_PDU_RXCHID 22 +#define M_CPL_TX_SEC_PDU_RXCHID 0x1 +#define V_CPL_TX_SEC_PDU_RXCHID(x) ((x) << S_CPL_TX_SEC_PDU_RXCHID) +#define G_CPL_TX_SEC_PDU_RXCHID(x) \ +(((x) >> S_CPL_TX_SEC_PDU_RXCHID) & M_CPL_TX_SEC_PDU_RXCHID) +#define F_CPL_TX_SEC_PDU_RXCHID V_CPL_TX_SEC_PDU_RXCHID(1U) + +/* Ack Follows */ +#define S_CPL_TX_SEC_PDU_ACKFOLLOWS 21 +#define M_CPL_TX_SEC_PDU_ACKFOLLOWS 0x1 +#define V_CPL_TX_SEC_PDU_ACKFOLLOWS(x) ((x) << S_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define G_CPL_TX_SEC_PDU_ACKFOLLOWS(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ACKFOLLOWS) & M_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define F_CPL_TX_SEC_PDU_ACKFOLLOWS V_CPL_TX_SEC_PDU_ACKFOLLOWS(1U) + +/* Loopback bit in cpl_tx_sec_pdu */ +#define S_CPL_TX_SEC_PDU_ULPTXLPBK 20 +#define M_CPL_TX_SEC_PDU_ULPTXLPBK 0x1 +#define V_CPL_TX_SEC_PDU_ULPTXLPBK(x) ((x) << S_CPL_TX_SEC_PDU_ULPTXLPBK) +#define G_CPL_TX_SEC_PDU_ULPTXLPBK(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ULPTXLPBK) & M_CPL_TX_SEC_PDU_ULPTXLPBK) +#define F_CPL_TX_SEC_PDU_ULPTXLPBK V_CPL_TX_SEC_PDU_ULPTXLPBK(1U) + +/* Length of cpl header encapsulated */ +#define S_CPL_TX_SEC_PDU_CPLLEN 16 +#define M_CPL_TX_SEC_PDU_CPLLEN 0xf +#define V_CPL_TX_SEC_PDU_CPLLEN(x) ((x) << S_CPL_TX_SEC_PDU_CPLLEN) +#define G_CPL_TX_SEC_PDU_CPLLEN(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CPLLEN) & M_CPL_TX_SEC_PDU_CPLLEN) + +/* PlaceHolder */ +#define S_CPL_TX_SEC_PDU_PLACEHOLDER 10 +#define M_CPL_TX_SEC_PDU_PLACEHOLDER 0x1 +#define V_CPL_TX_SEC_PDU_PLACEHOLDER(x) ((x) << S_CPL_TX_SEC_PDU_PLACEHOLDER) +#define G_CPL_TX_SEC_PDU_PLACEHOLDER(x) \ + (((x) >> S_CPL_TX_SEC_PDU_PLACEHOLDER) & \ + M_CPL_TX_SEC_PDU_PLACEHOLDER) + +/* IvInsrtOffset: Insertion location for IV */ +#define S_CPL_TX_SEC_PDU_IVINSRTOFST 0 +#define M_CPL_TX_SEC_PDU_IVINSRTOFST 0x3ff +#define V_CPL_TX_SEC_PDU_IVINSRTOFST(x) ((x) << S_CPL_TX_SEC_PDU_IVINSRTOFST) +#define G_CPL_TX_SEC_PDU_IVINSRTOFST(x) \ + (((x) >> S_CPL_TX_SEC_PDU_IVINSRTOFST) & \ + M_CPL_TX_SEC_PDU_IVINSRTOFST) + +/* AadStartOffset: Offset in bytes for AAD start from + * the first byte following + * the pkt headers (0-255 + * bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTART 24 +#define M_CPL_TX_SEC_PDU_AADSTART 0xff +#define V_CPL_TX_SEC_PDU_AADSTART(x) ((x) << S_CPL_TX_SEC_PDU_AADSTART) +#define G_CPL_TX_SEC_PDU_AADSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTART) & \ + M_CPL_TX_SEC_PDU_AADSTART) + +/* AadStopOffset: offset in bytes for AAD stop/end from the first byte following + * the pkt headers (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTOP 15 +#define M_CPL_TX_SEC_PDU_AADSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AADSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AADSTOP) +#define G_CPL_TX_SEC_PDU_AADSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTOP) & M_CPL_TX_SEC_PDU_AADSTOP) + +/* CipherStartOffset: offset in bytes for encryption/decryption start from the + * first byte following the pkt headers (0-1023 + * bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTART 5 +#define M_CPL_TX_SEC_PDU_CIPHERSTART 0x3ff +#define V_CPL_TX_SEC_PDU_CIPHERSTART(x) ((x) << S_CPL_TX_SEC_PDU_CIPHERSTART) +#define G_CPL_TX_SEC_PDU_CIPHERSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTART) & \ + M_CPL_TX_SEC_PDU_CIPHERSTART) + +/* CipherStopOffset: offset in bytes for encryption/decryption end + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0x1f +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_HI) + +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_LO 28 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_LO 0xf +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_LO) + +/* AuthStartOffset: offset in bytes for authentication start from + * the first byte following the pkt headers (0-1023) + * */ +#define S_CPL_TX_SEC_PDU_AUTHSTART 18 +#define M_CPL_TX_SEC_PDU_AUTHSTART 0x3ff +#define V_CPL_TX_SEC_PDU_AUTHSTART(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTART) +#define G_CPL_TX_SEC_PDU_AUTHSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTART) & \ + M_CPL_TX_SEC_PDU_AUTHSTART) + +/* AuthStopOffset: offset in bytes for authentication + * end from end of the payload of this command (0-511 Bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHSTOP 9 +#define M_CPL_TX_SEC_PDU_AUTHSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTOP) +#define G_CPL_TX_SEC_PDU_AUTHSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTOP) & \ + M_CPL_TX_SEC_PDU_AUTHSTOP) + +/* AuthInsrtOffset: offset in bytes for authentication insertion + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHINSERT 0 +#define M_CPL_TX_SEC_PDU_AUTHINSERT 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHINSERT(x) ((x) << S_CPL_TX_SEC_PDU_AUTHINSERT) +#define G_CPL_TX_SEC_PDU_AUTHINSERT(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHINSERT) & \ + M_CPL_TX_SEC_PDU_AUTHINSERT) + +struct cpl_rx_phys_dsgl { + __be32 op_to_tid; + __be32 pcirlxorder_to_noofsgentr; + struct rss_header rss_hdr_int; +}; + +#define S_CPL_RX_PHYS_DSGL_OPCODE 24 +#define M_CPL_RX_PHYS_DSGL_OPCODE 0xff +#define V_CPL_RX_PHYS_DSGL_OPCODE(x) ((x) << S_CPL_RX_PHYS_DSGL_OPCODE) +#define G_CPL_RX_PHYS_DSGL_OPCODE(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_OPCODE) & M_CPL_RX_PHYS_DSGL_OPCODE) + +#define S_CPL_RX_PHYS_DSGL_ISRDMA 23 +#define M_CPL_RX_PHYS_DSGL_ISRDMA 0x1 +#define V_CPL_RX_PHYS_DSGL_ISRDMA(x) ((x) << S_CPL_RX_PHYS_DSGL_ISRDMA) +#define G_CPL_RX_PHYS_DSGL_ISRDMA(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_ISRDMA) & M_CPL_RX_PHYS_DSGL_ISRDMA) +#define F_CPL_RX_PHYS_DSGL_ISRDMA V_CPL_RX_PHYS_DSGL_ISRDMA(1U) + +#define S_CPL_RX_PHYS_DSGL_RSVD1 20 +#define M_CPL_RX_PHYS_DSGL_RSVD1 0x7 +#define V_CPL_RX_PHYS_DSGL_RSVD1(x) ((x) << S_CPL_RX_PHYS_DSGL_RSVD1) +#define G_CPL_RX_PHYS_DSGL_RSVD1(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_RSVD1) & M_CPL_RX_PHYS_DSGL_RSVD1) + +#define S_CPL_RX_PHYS_DSGL_PCIRLXORDER 31 +#define M_CPL_RX_PHYS_DSGL_PCIRLXORDER 0x1 +#define V_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define G_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCIRLXORDER) & \ + M_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define F_CPL_RX_PHYS_DSGL_PCIRLXORDER V_CPL_RX_PHYS_DSGL_PCIRLXORDER(1U) + +#define S_CPL_RX_PHYS_DSGL_PCINOSNOOP 30 +#define M_CPL_RX_PHYS_DSGL_PCINOSNOOP 0x1 +#define V_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define G_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCINOSNOOP) & \ + M_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define F_CPL_RX_PHYS_DSGL_PCINOSNOOP V_CPL_RX_PHYS_DSGL_PCINOSNOOP(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNTENB 29 +#define M_CPL_RX_PHYS_DSGL_PCITPHNTENB 0x1 +#define V_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define G_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNTENB) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define F_CPL_RX_PHYS_DSGL_PCITPHNTENB V_CPL_RX_PHYS_DSGL_PCITPHNTENB(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNT 27 +#define M_CPL_RX_PHYS_DSGL_PCITPHNT 0x3 +#define V_CPL_RX_PHYS_DSGL_PCITPHNT(x) ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNT) +#define G_CPL_RX_PHYS_DSGL_PCITPHNT(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNT) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNT) + +#define S_CPL_RX_PHYS_DSGL_DCAID 16 +#define M_CPL_RX_PHYS_DSGL_DCAID 0x7ff +#define V_CPL_RX_PHYS_DSGL_DCAID(x) ((x) << S_CPL_RX_PHYS_DSGL_DCAID) +#define G_CPL_RX_PHYS_DSGL_DCAID(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_DCAID) & \ + M_CPL_RX_PHYS_DSGL_DCAID) + +#define S_CPL_RX_PHYS_DSGL_NOOFSGENTR 0 +#define M_CPL_RX_PHYS_DSGL_NOOFSGENTR 0xffff +#define V_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_NOOFSGENTR) +#define G_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_NOOFSGENTR) & \ + M_CPL_RX_PHYS_DSGL_NOOFSGENTR) + +/* CPL_TX_TLS_ACK */ +struct cpl_tx_tls_ack { + __be32 op_to_Rsvd2; + __be32 PldLen; + __be64 Rsvd3; +}; + +#define S_CPL_TX_TLS_ACK_OPCODE 24 +#define M_CPL_TX_TLS_ACK_OPCODE 0xff +#define V_CPL_TX_TLS_ACK_OPCODE(x) ((x) << S_CPL_TX_TLS_ACK_OPCODE) +#define G_CPL_TX_TLS_ACK_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_ACK_OPCODE) & M_CPL_TX_TLS_ACK_OPCODE) + +#define S_CPL_TX_TLS_ACK_RSVD1 23 +#define M_CPL_TX_TLS_ACK_RSVD1 0x1 +#define V_CPL_TX_TLS_ACK_RSVD1(x) ((x) << S_CPL_TX_TLS_ACK_RSVD1) +#define G_CPL_TX_TLS_ACK_RSVD1(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD1) & M_CPL_TX_TLS_ACK_RSVD1) +#define F_CPL_TX_TLS_ACK_RSVD1 V_CPL_TX_TLS_ACK_RSVD1(1U) + +#define S_CPL_TX_TLS_ACK_RXCHID 22 +#define M_CPL_TX_TLS_ACK_RXCHID 0x1 +#define V_CPL_TX_TLS_ACK_RXCHID(x) ((x) << S_CPL_TX_TLS_ACK_RXCHID) +#define G_CPL_TX_TLS_ACK_RXCHID(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RXCHID) & M_CPL_TX_TLS_ACK_RXCHID) +#define F_CPL_TX_TLS_ACK_RXCHID V_CPL_TX_TLS_ACK_RXCHID(1U) + +#define S_CPL_TX_TLS_ACK_FWMSG 21 +#define M_CPL_TX_TLS_ACK_FWMSG 0x1 +#define V_CPL_TX_TLS_ACK_FWMSG(x) ((x) << S_CPL_TX_TLS_ACK_FWMSG) +#define G_CPL_TX_TLS_ACK_FWMSG(x) \ + (((x) >> S_CPL_TX_TLS_ACK_FWMSG) & M_CPL_TX_TLS_ACK_FWMSG) +#define F_CPL_TX_TLS_ACK_FWMSG V_CPL_TX_TLS_ACK_FWMSG(1U) + +#define S_CPL_TX_TLS_ACK_ULPTXLPBK 20 +#define M_CPL_TX_TLS_ACK_ULPTXLPBK 0x1 +#define V_CPL_TX_TLS_ACK_ULPTXLPBK(x) ((x) << S_CPL_TX_TLS_ACK_ULPTXLPBK) +#define G_CPL_TX_TLS_ACK_ULPTXLPBK(x) \ + (((x) >> S_CPL_TX_TLS_ACK_ULPTXLPBK) & M_CPL_TX_TLS_ACK_ULPTXLPBK) +#define F_CPL_TX_TLS_ACK_ULPTXLPBK V_CPL_TX_TLS_ACK_ULPTXLPBK(1U) + +#define S_CPL_TX_TLS_ACK_CPLLEN 16 +#define M_CPL_TX_TLS_ACK_CPLLEN 0xf +#define V_CPL_TX_TLS_ACK_CPLLEN(x) ((x) << S_CPL_TX_TLS_ACK_CPLLEN) +#define G_CPL_TX_TLS_ACK_CPLLEN(x) \ + (((x) >> S_CPL_TX_TLS_ACK_CPLLEN) & M_CPL_TX_TLS_ACK_CPLLEN) + +#define S_CPL_TX_TLS_ACK_COMPLONERR 15 +#define M_CPL_TX_TLS_ACK_COMPLONERR 0x1 +#define V_CPL_TX_TLS_ACK_COMPLONERR(x) ((x) << S_CPL_TX_TLS_ACK_COMPLONERR) +#define G_CPL_TX_TLS_ACK_COMPLONERR(x) \ + (((x) >> S_CPL_TX_TLS_ACK_COMPLONERR) & M_CPL_TX_TLS_ACK_COMPLONERR) +#define F_CPL_TX_TLS_ACK_COMPLONERR V_CPL_TX_TLS_ACK_COMPLONERR(1U) + +#define S_CPL_TX_TLS_ACK_LCB 14 +#define M_CPL_TX_TLS_ACK_LCB 0x1 +#define V_CPL_TX_TLS_ACK_LCB(x) ((x) << S_CPL_TX_TLS_ACK_LCB) +#define G_CPL_TX_TLS_ACK_LCB(x) \ + (((x) >> S_CPL_TX_TLS_ACK_LCB) & M_CPL_TX_TLS_ACK_LCB) +#define F_CPL_TX_TLS_ACK_LCB V_CPL_TX_TLS_ACK_LCB(1U) + +#define S_CPL_TX_TLS_ACK_PHASH 13 +#define M_CPL_TX_TLS_ACK_PHASH 0x1 +#define V_CPL_TX_TLS_ACK_PHASH(x) ((x) << S_CPL_TX_TLS_ACK_PHASH) +#define G_CPL_TX_TLS_ACK_PHASH(x) \ + (((x) >> S_CPL_TX_TLS_ACK_PHASH) & M_CPL_TX_TLS_ACK_PHASH) +#define F_CPL_TX_TLS_ACK_PHASH V_CPL_TX_TLS_ACK_PHASH(1U) + +#define S_CPL_TX_TLS_ACK_RSVD2 0 +#define M_CPL_TX_TLS_ACK_RSVD2 0x1fff +#define V_CPL_TX_TLS_ACK_RSVD2(x) ((x) << S_CPL_TX_TLS_ACK_RSVD2) +#define G_CPL_TX_TLS_ACK_RSVD2(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD2) & M_CPL_TX_TLS_ACK_RSVD2) + #endif /* T4_MSG_H */ From owner-svn-src-stable-11@freebsd.org Wed May 24 06:49:03 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AF87D7BC5B; Wed, 24 May 2017 06:49:03 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FA161B2C; Wed, 24 May 2017 06:49:03 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O6n2Or060628; Wed, 24 May 2017 06:49:02 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O6n2xI060627; Wed, 24 May 2017 06:49:02 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705240649.v4O6n2xI060627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 24 May 2017 06:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318776 - stable/11/contrib/binutils/gas/config X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 06:49:03 -0000 Author: mmel Date: Wed May 24 06:49:01 2017 New Revision: 318776 URL: https://svnweb.freebsd.org/changeset/base/318776 Log: MFC r318135: Fix parsing of 'vmov Q.F32,Q.F32' instruction. Modified: stable/11/contrib/binutils/gas/config/tc-arm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- stable/11/contrib/binutils/gas/config/tc-arm.c Wed May 24 05:30:36 2017 (r318775) +++ stable/11/contrib/binutils/gas/config/tc-arm.c Wed May 24 06:49:01 2017 (r318776) @@ -5211,12 +5211,6 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].present = 1; } } - else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS) - /* Case 2: VMOV.
, # - Case 3: VMOV.
, # - Case 10: VMOV.F32 , # - Case 11: VMOV.F64
, # */ - inst.operands[i].immisfloat = 1; else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_NSDQ, &rtype, &optype)) != FAIL) { @@ -5253,9 +5247,15 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].reg = val; inst.operands[i].isreg = 1; - inst.operands[i++].present = 1; + inst.operands[i].present = 1; } } + else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS) + /* Case 2: VMOV.
, # + Case 3: VMOV.
, # + Case 10: VMOV.F32 , # + Case 11: VMOV.F64
, # */ + inst.operands[i].immisfloat = 1; else if (parse_big_immediate (&ptr, i) == SUCCESS) /* Case 2: VMOV.
, # Case 3: VMOV.
, # */ @@ -5337,7 +5337,7 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].isvec = 1; inst.operands[i].issingle = 1; inst.operands[i].vectype = optype; - inst.operands[i++].present = 1; + inst.operands[i].present = 1; } } else From owner-svn-src-stable-11@freebsd.org Wed May 24 09:01:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26DA5D7B67F; Wed, 24 May 2017 09:01:56 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECD411F4A; Wed, 24 May 2017 09:01:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O91tY4014521; Wed, 24 May 2017 09:01:55 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O91tVF014520; Wed, 24 May 2017 09:01:55 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705240901.v4O91tVF014520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 24 May 2017 09:01:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318777 - stable/11/sbin/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 09:01:56 -0000 Author: ae Date: Wed May 24 09:01:54 2017 New Revision: 318777 URL: https://svnweb.freebsd.org/changeset/base/318777 Log: MFC r318400: Allow zero port specification in table entries with type flow. PR: 217620 Modified: stable/11/sbin/ipfw/tables.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/tables.c ============================================================================== --- stable/11/sbin/ipfw/tables.c Wed May 24 06:49:01 2017 (r318776) +++ stable/11/sbin/ipfw/tables.c Wed May 24 09:01:54 2017 (r318777) @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj if ((p = strchr(arg, ',')) != NULL) *p++ = '\0'; - if ((port = htons(strtol(arg, NULL, 10))) == 0) { + port = htons(strtol(arg, &pp, 10)); + if (*pp != '\0') { if ((sent = getservbyname(arg, NULL)) == NULL) errx(EX_DATAERR, "Unknown service: %s", arg); - else - key = sent->s_port; + port = sent->s_port; } - tfe->sport = port; - arg = p; } @@ -1304,16 +1302,14 @@ tentry_fill_key_type(char *arg, ipfw_obj if ((p = strchr(arg, ',')) != NULL) *p++ = '\0'; - if ((port = htons(strtol(arg, NULL, 10))) == 0) { + port = htons(strtol(arg, &pp, 10)); + if (*pp != '\0') { if ((sent = getservbyname(arg, NULL)) == NULL) errx(EX_DATAERR, "Unknown service: %s", arg); - else - key = sent->s_port; + port = sent->s_port; } - tfe->dport = port; - arg = p; } From owner-svn-src-stable-11@freebsd.org Wed May 24 09:03:47 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE79AD7B7B8; Wed, 24 May 2017 09:03:47 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE60811FC; Wed, 24 May 2017 09:03:47 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O93kSM018170; Wed, 24 May 2017 09:03:46 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O93kVa018169; Wed, 24 May 2017 09:03:46 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705240903.v4O93kVa018169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 24 May 2017 09:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318778 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 09:03:48 -0000 Author: ae Date: Wed May 24 09:03:46 2017 New Revision: 318778 URL: https://svnweb.freebsd.org/changeset/base/318778 Log: MFC r318399: Set M_BCAST and M_MCAST flags on mbuf sent via divert socket. r290383 has changed how mbufs sent by divert socket are handled. Previously they are always handled by slow path processing in ip_input(). Now ip_tryforward() is invoked from ip_input() before in_broadcast() check. Since diverted packet lost all mbuf flags, it passes the broadcast check in ip_tryforward() due to missing M_BCAST flag. In the result the broadcast packet is forwarded to the wire instead of be consumed by network stack. Add in_broadcast() check to the div_output() function. And restore the M_BCAST flag if destination address is broadcast for the given network interface. PR: 209491 Modified: stable/11/sys/netinet/ip_divert.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_divert.c ============================================================================== --- stable/11/sys/netinet/ip_divert.c Wed May 24 09:01:54 2017 (r318777) +++ stable/11/sys/netinet/ip_divert.c Wed May 24 09:03:46 2017 (r318778) @@ -489,6 +489,14 @@ div_output(struct socket *so, struct mbu /* Send packet to input processing via netisr */ switch (ip->ip_v) { case IPVERSION: + /* + * Restore M_BCAST flag when destination address is + * broadcast. It is expected by ip_tryforward(). + */ + if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) + m->m_flags |= M_MCAST; + else if (in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) + m->m_flags |= M_BCAST; netisr_queue_src(NETISR_IP, (uintptr_t)so, m); break; #ifdef INET6 From owner-svn-src-stable-11@freebsd.org Wed May 24 11:09:08 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ECB8D7A622; Wed, 24 May 2017 11:09:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 109381794; Wed, 24 May 2017 11:09:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OB970W068502; Wed, 24 May 2017 11:09:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OB97kZ068501; Wed, 24 May 2017 11:09:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241109.v4OB97kZ068501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318782 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:09:08 -0000 Author: avg Date: Wed May 24 11:09:06 2017 New Revision: 318782 URL: https://svnweb.freebsd.org/changeset/base/318782 Log: MFC r316643: use msr 0xc001100c to discover multi-node AMD processors Modified: stable/11/sys/x86/x86/mp_x86.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/mp_x86.c ============================================================================== --- stable/11/sys/x86/x86/mp_x86.c Wed May 24 10:09:54 2017 (r318781) +++ stable/11/sys/x86/x86/mp_x86.c Wed May 24 11:09:06 2017 (r318782) @@ -235,7 +235,9 @@ static void topo_probe_amd(void) { u_int p[4]; + uint64_t v; int level; + int nodes_per_socket; int share_count; int type; int i; @@ -294,13 +296,18 @@ topo_probe_amd(void) caches[1].present = 1; } if (((p[3] >> 18) & 0x3fff) != 0) { - - /* - * TODO: Account for dual-node processors - * where each node within a package has its own - * L3 cache. - */ - caches[2].id_shift = pkg_id_shift; + nodes_per_socket = 1; + if ((amd_feature2 & AMDID2_NODE_ID) != 0) { + /* + * Handle multi-node processors that + * have multiple chips, each with its + * own L3 cache, on the same die. + */ + v = rdmsr(0xc001100c); + nodes_per_socket = 1 + ((v >> 3) & 0x7); + } + caches[2].id_shift = + pkg_id_shift - mask_width(nodes_per_socket); caches[2].present = 1; } } From owner-svn-src-stable-11@freebsd.org Wed May 24 11:10:57 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E815D7A7E3; Wed, 24 May 2017 11:10:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FF971AB7; Wed, 24 May 2017 11:10:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OBAulR068656; Wed, 24 May 2017 11:10:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OBAujr068655; Wed, 24 May 2017 11:10:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241110.v4OBAujr068655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318783 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:10:57 -0000 Author: avg Date: Wed May 24 11:10:55 2017 New Revision: 318783 URL: https://svnweb.freebsd.org/changeset/base/318783 Log: MFC r316853: dtrace: fix normalization of stddev aggregation Sponsored by: Panzura Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed May 24 11:09:06 2017 (r318782) +++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed May 24 11:10:55 2017 (r318783) @@ -389,8 +389,10 @@ dt_stddev(uint64_t *data, uint64_t norma * The standard approximation for standard deviation is * sqrt(average(x**2) - average(x)**2), i.e. the square root * of the average of the squares minus the square of the average. + * When normalizing, we should divide the sum of x**2 by normal**2. */ dt_divide_128(data + 2, normal, avg_of_squares); + dt_divide_128(avg_of_squares, normal, avg_of_squares); dt_divide_128(avg_of_squares, data[0], avg_of_squares); norm_avg = (int64_t)data[1] / (int64_t)normal / (int64_t)data[0]; From owner-svn-src-stable-11@freebsd.org Wed May 24 11:38:32 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BAFAD7B21D; Wed, 24 May 2017 11:38:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D0131AEC; Wed, 24 May 2017 11:38:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OBcV0v081340; Wed, 24 May 2017 11:38:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OBcVhO081339; Wed, 24 May 2017 11:38:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241138.v4OBcVhO081339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318785 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:38:32 -0000 Author: avg Date: Wed May 24 11:38:31 2017 New Revision: 318785 URL: https://svnweb.freebsd.org/changeset/base/318785 Log: MFC r316854: rename vfs.zfs.debug_flags to vfs.zfs.debugflags Since this is a stable branch vfs.zfs.debug_flags sysctl is also kept. The corresponing tunable could never work. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 11:11:13 2017 (r318784) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 11:38:31 2017 (r318785) @@ -353,9 +353,13 @@ sysctl_vfs_zfs_debug_flags(SYSCTL_HANDLE return (0); } -SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags, CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing."); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, + CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(int), + sysctl_vfs_zfs_debug_flags, "IU", + "Debug flags for ZFS testing (deprecated, see vfs.zfs.debugflags)."); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_synctime_ms, CTLFLAG_RDTUN, &zfs_deadman_synctime_ms, 0, From owner-svn-src-stable-11@freebsd.org Wed May 24 14:22:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5CD4D7B2EE; Wed, 24 May 2017 14:22:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5B081D6F; Wed, 24 May 2017 14:22:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OEMM1x053337; Wed, 24 May 2017 14:22:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OEMMrt053336; Wed, 24 May 2017 14:22:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705241422.v4OEMMrt053336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 24 May 2017 14:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318787 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 14:22:24 -0000 Author: gjb Date: Wed May 24 14:22:22 2017 New Revision: 318787 URL: https://svnweb.freebsd.org/changeset/base/318787 Log: Document r318763, EARLY_AP_STARTUP enabled by default. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 24 11:38:43 2017 (r318786) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 24 14:22:22 2017 (r318787) @@ -443,6 +443,12 @@ IPSEC_FILTERTUNNEL kernel option has been removed, which was deprecated by the net.inet.ipsec.filtertunnel sysctl. + + The EARLY_AP_STARTUP + option has been enabled by default on &arch.amd64; and + &arch.i386; architectures, which when enabled releases + Application Processors (APs) earlier in the + kernel startup process. From owner-svn-src-stable-11@freebsd.org Wed May 24 16:39:20 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3B1AD7CDE6; Wed, 24 May 2017 16:39:20 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2A671E8B; Wed, 24 May 2017 16:39:20 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OGdJRu007459; Wed, 24 May 2017 16:39:19 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OGdJW6007458; Wed, 24 May 2017 16:39:19 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201705241639.v4OGdJW6007458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 24 May 2017 16:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318791 - stable/11/sys/dev/sdhci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 16:39:20 -0000 Author: loos Date: Wed May 24 16:39:19 2017 New Revision: 318791 URL: https://svnweb.freebsd.org/changeset/base/318791 Log: MFC r312346: Set the the wp_disabled flag when asked to. While here, add the missing new line. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c Wed May 24 16:30:38 2017 (r318790) +++ stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c Wed May 24 16:39:19 2017 (r318791) @@ -90,7 +90,7 @@ cd_setup(struct sdhci_fdt_gpio *gpio, ph gpio->slot->opt |= SDHCI_NON_REMOVABLE; gpio->cd_disabled = true; if (bootverbose) - device_printf(dev, "Non-removable media"); + device_printf(dev, "Non-removable media\n"); return; } @@ -177,8 +177,12 @@ wp_setup(struct sdhci_fdt_gpio *gpio, ph dev = gpio->dev; - if (OF_hasprop(node, "wp-disable")) + if (OF_hasprop(node, "wp-disable")) { + gpio->wp_disabled = true; + if (bootverbose) + device_printf(dev, "Write protect disabled\n"); return; + } if (gpio_pin_get_by_ofw_property(dev, node, "wp-gpios", &gpio->wp_pin)) return; From owner-svn-src-stable-11@freebsd.org Wed May 24 17:51:09 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9623FD7BF5F; Wed, 24 May 2017 17:51:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48E3A19C5; Wed, 24 May 2017 17:51:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OHp8DI036090; Wed, 24 May 2017 17:51:08 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OHp84s036087; Wed, 24 May 2017 17:51:08 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241751.v4OHp84s036087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 17:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318796 - in stable/11/sys/dev/cxgbe: . common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:51:09 -0000 Author: np Date: Wed May 24 17:51:07 2017 New Revision: 318796 URL: https://svnweb.freebsd.org/changeset/base/318796 Log: MFC r316774: cxgbe: Query some more RDMA related parameters from the firmware. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/common.h stable/11/sys/dev/cxgbe/offload.h stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/common.h Wed May 24 17:50:34 2017 (r318795) +++ stable/11/sys/dev/cxgbe/common/common.h Wed May 24 17:51:07 2017 (r318796) @@ -366,6 +366,9 @@ struct adapter_params { unsigned int ofldq_wr_cred; unsigned int eo_wr_cred; + + unsigned int max_ordird_qp; + unsigned int max_ird_adapter; }; #define CHELSIO_T4 0x4 Modified: stable/11/sys/dev/cxgbe/offload.h ============================================================================== --- stable/11/sys/dev/cxgbe/offload.h Wed May 24 17:50:34 2017 (r318795) +++ stable/11/sys/dev/cxgbe/offload.h Wed May 24 17:51:07 2017 (r318796) @@ -121,6 +121,7 @@ struct t4_virt_res { struct t4_range pbl; struct t4_range qp; struct t4_range cq; + struct t4_range srq; struct t4_range ocq; struct t4_range l2t; }; Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 17:50:34 2017 (r318795) +++ stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 17:51:07 2017 (r318796) @@ -3490,6 +3490,21 @@ get_params__post_init(struct adapter *sc sc->vres.cq.size = val[3] - val[2] + 1; sc->vres.ocq.start = val[4]; sc->vres.ocq.size = val[5] - val[4] + 1; + + param[0] = FW_PARAM_PFVF(SRQ_START); + param[1] = FW_PARAM_PFVF(SRQ_END); + param[2] = FW_PARAM_DEV(MAXORDIRD_QP); + param[3] = FW_PARAM_DEV(MAXIRD_ADAPTER); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query RDMA parameters(3): %d.\n", rc); + return (rc); + } + sc->vres.srq.start = val[0]; + sc->vres.srq.size = val[1] - val[0] + 1; + sc->params.max_ordird_qp = val[2]; + sc->params.max_ird_adapter = val[3]; } if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START); From owner-svn-src-stable-11@freebsd.org Wed May 24 18:14:59 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ED3AD7CA9E; Wed, 24 May 2017 18:14:59 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D7C210F6; Wed, 24 May 2017 18:14:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OIEwXP048178; Wed, 24 May 2017 18:14:58 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OIEvNT048170; Wed, 24 May 2017 18:14:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241814.v4OIEvNT048170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 18:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318798 - in stable/11: contrib/ofed/libcxgb4/src sys/dev/cxgb/ulp/iw_cxgb sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 18:14:59 -0000 Author: np Date: Wed May 24 18:14:57 2017 New Revision: 318798 URL: https://svnweb.freebsd.org/changeset/base/318798 Log: MFC r311880, r314167, r316118, r316571, r316573, r316580, r316936-r316937, r316940, and r317410. r311880: The iw_cxgb and iw_cxgbe drivers should not use a FreeBSD device_t where a linuxkpi style device is expected. If OFED/linuxkpi actually starts using this field then we'll have to figure out whether to create fake devices for these drivers or have linuxkpi deal with NULL device. This mismatch was first reported as part of D6585. r314167: cxgbe/iw_cxgbe: Minor changes for T6. r316118: cxgbe/iw_cxgbe: T6 has no limit on the amount of memory that can be registered in one ib_reg_phys_mr. r316571: cxgbe/iw_cxgbe: Remove bad cast that resulted in incorrect length for memory regions larger than 4GB. r316573: cxgbe/iw_cxgbe: Replace a magic constant with something more readable (and accurate). T4 and later have an extra bit for page shift so the maximum page size is 8TB (shift of 12 + 31) instead of 128MB (12 + 15). This saves space in the chip's PBL (physical buffer list) when registering very large memory regions. r316580: cxgbe/iw_cxgbe: Remove another bad cast. This should have been included in r316571. r316936: cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. r316937: cxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device. r316940: cxgbe/iw_cxgbe: Report the actual values of various parameters as configured by the firmware. r317410: cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the iw_cxgb4 Linux driver. Sponsored by: Chelsio Communications Modified: stable/11/contrib/ofed/libcxgb4/src/t4.h stable/11/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c stable/11/sys/dev/cxgbe/iw_cxgbe/device.c stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c stable/11/sys/dev/cxgbe/iw_cxgbe/provider.c stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c stable/11/sys/dev/cxgbe/iw_cxgbe/t4.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ofed/libcxgb4/src/t4.h ============================================================================== --- stable/11/contrib/ofed/libcxgb4/src/t4.h Wed May 24 17:52:56 2017 (r318797) +++ stable/11/contrib/ofed/libcxgb4/src/t4.h Wed May 24 18:14:57 2017 (r318798) @@ -102,7 +102,7 @@ #define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) #define T4_MAX_NUM_STAG (1<<15) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 Modified: stable/11/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- stable/11/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Wed May 24 18:14:57 2017 (r318798) @@ -1094,7 +1094,7 @@ int iwch_register_device(struct iwch_dev memcpy(dev->ibdev.node_desc, IWCH_NODE_DESC, sizeof(IWCH_NODE_DESC)); dev->ibdev.phys_port_cnt = sc->params.nports; dev->ibdev.num_comp_vectors = 1; - dev->ibdev.dma_device = dev->rdev.adap->dev; + dev->ibdev.dma_device = NULL; dev->ibdev.query_device = iwch_query_device; dev->ibdev.query_port = iwch_query_port; dev->ibdev.modify_port = iwch_modify_port; Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/device.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/device.c Wed May 24 18:14:57 2017 (r318798) @@ -330,7 +330,7 @@ c4iw_modevent(module_t mod, int cmd, voi case MOD_LOAD: rc = c4iw_mod_load(); if (rc == 0) - printf("iw_cxgbe: Chelsio T4/T5 RDMA driver loaded.\n"); + printf("iw_cxgbe: Chelsio T4/T5/T6 RDMA driver loaded.\n"); break; case MOD_UNLOAD: Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 24 18:14:57 2017 (r318798) @@ -157,49 +157,70 @@ static inline int c4iw_num_stags(struct return (int)(rdev->adap->vres.stag.size >> 5); } -#define C4IW_WR_TO (10*HZ) +#define C4IW_WR_TO (60*HZ) struct c4iw_wr_wait { int ret; - atomic_t completion; + struct completion completion; }; static inline void c4iw_init_wr_wait(struct c4iw_wr_wait *wr_waitp) { wr_waitp->ret = 0; - atomic_set(&wr_waitp->completion, 0); + init_completion(&wr_waitp->completion); } static inline void c4iw_wake_up(struct c4iw_wr_wait *wr_waitp, int ret) { wr_waitp->ret = ret; - atomic_set(&wr_waitp->completion, 1); - wakeup(wr_waitp); + complete(&wr_waitp->completion); } static inline int c4iw_wait_for_reply(struct c4iw_rdev *rdev, struct c4iw_wr_wait *wr_waitp, - u32 hwtid, u32 qpid, const char *func) + u32 hwtid, u32 qpid, const char *func) { struct adapter *sc = rdev->adap; unsigned to = C4IW_WR_TO; + int ret; + int timedout = 0; + struct timeval t1, t2; + + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + goto out; + } - while (!atomic_read(&wr_waitp->completion)) { - tsleep(wr_waitp, 0, "c4iw_wait", to); - if (SIGPENDING(curthread)) { - printf("%s - Device %s not responding - " - "tid %u qpid %u\n", func, - device_get_nameunit(sc->dev), hwtid, qpid); - if (c4iw_fatal_error(rdev)) { - wr_waitp->ret = -EIO; - break; - } - to = to << 2; - } - } + getmicrotime(&t1); + do { + ret = wait_for_completion_timeout(&wr_waitp->completion, to); + if (!ret) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s not responding after %ld.%06ld " + "seconds - tid %u qpid %u\n", func, + device_get_nameunit(sc->dev), t2.tv_sec, t2.tv_usec, + hwtid, qpid); + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + break; + } + to = to << 2; + timedout = 1; + } + } while (!ret); + +out: + if (timedout) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s reply after %ld.%06ld seconds - " + "tid %u qpid %u\n", func, device_get_nameunit(sc->dev), + t2.tv_sec, t2.tv_usec, hwtid, qpid); + } if (wr_waitp->ret) - CTR4(KTR_IW_CXGBE, "%s: FW reply %d tid %u qpid %u", - device_get_nameunit(sc->dev), wr_waitp->ret, hwtid, qpid); + CTR4(KTR_IW_CXGBE, "%p: FW reply %d tid %u qpid %u", sc, + wr_waitp->ret, hwtid, qpid); return (wr_waitp->ret); } Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c Wed May 24 18:14:57 2017 (r318798) @@ -46,12 +46,15 @@ __FBSDID("$FreeBSD$"); #define T4_ULPTX_MIN_IO 32 #define C4IW_MAX_INLINE_SIZE 96 -static int mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) +static int +mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) { - return (is_t4(dev->rdev.adap) || + + return ((is_t4(dev->rdev.adap) || is_t5(dev->rdev.adap)) && - length >= 8*1024*1024*1024ULL; + length >= 8*1024*1024*1024ULL); } + static int write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) { @@ -342,7 +345,8 @@ static int build_phys_page_list(struct i } /* Find largest page shift we can use to cover buffers */ - for (*shift = PAGE_SHIFT; *shift < 27; ++(*shift)) + for (*shift = PAGE_SHIFT; *shift < PAGE_SHIFT + M_FW_RI_TPTE_PS; + ++(*shift)) if ((1ULL << *shift) & mask) break; @@ -439,7 +443,7 @@ int c4iw_reregister_phys_mem(struct ib_m mhp->attr.zbva = 0; mhp->attr.va_fbo = *iova_start; mhp->attr.page_size = shift - 12; - mhp->attr.len = (u32) total_size; + mhp->attr.len = total_size; mhp->attr.pbl_size = npages; } @@ -511,7 +515,7 @@ struct ib_mr *c4iw_register_phys_mem(str mhp->attr.va_fbo = *iova_start; mhp->attr.page_size = shift - 12; - mhp->attr.len = (u32) total_size; + mhp->attr.len = total_size; mhp->attr.pbl_size = npages; ret = register_mem(rhp, php, mhp, shift); if (ret) Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 24 18:14:57 2017 (r318798) @@ -190,7 +190,7 @@ static int c4iw_mmap(struct ib_ucontext "%s:6 USER DB-GTS addr %p region %p, reglen %u", __func__, addr, va_udbs_res, len_udbs_res); #ifdef DOT5 - if (is_t5(rdev->lldi.adapter_type) && map_udb_as_wc) + if (!is_t4(rdev->lldi.adapter_type) && map_udb_as_wc) vma->vm_page_prot = t4_pgprot_wc(vma->vm_page_prot); else #endif @@ -307,6 +307,7 @@ c4iw_query_device(struct ib_device *ibde { struct c4iw_dev *dev = to_c4iw_dev(ibdev); struct adapter *sc = dev->rdev.adap; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; CTR3(KTR_IW_CXGBE, "%s ibdev %p, props %p", __func__, ibdev, props); @@ -320,13 +321,15 @@ c4iw_query_device(struct ib_device *ibde props->vendor_id = pci_get_vendor(sc->dev); props->vendor_part_id = pci_get_device(sc->dev); props->max_mr_size = T4_MAX_MR_SIZE; - props->max_qp = T4_MAX_NUM_QP; - props->max_qp_wr = T4_MAX_QP_DEPTH; + props->max_qp = sc->vres.qp.size / 2; + props->max_qp_wr = T4_MAX_QP_DEPTH(spg_ndesc); props->max_sge = T4_MAX_RECV_SGE; props->max_sge_rd = 1; - props->max_qp_rd_atom = c4iw_max_read_depth; - props->max_qp_init_rd_atom = c4iw_max_read_depth; - props->max_cq = T4_MAX_NUM_CQ; + props->max_res_rd_atom = sc->params.max_ird_adapter; + props->max_qp_rd_atom = min(sc->params.max_ordird_qp, + c4iw_max_read_depth); + props->max_qp_init_rd_atom = props->max_qp_rd_atom; + props->max_cq = sc->vres.qp.size; props->max_cqe = T4_MAX_CQ_DEPTH; props->max_mr = c4iw_num_stags(&dev->rdev); props->max_pd = T4_MAX_NUM_PD; @@ -429,7 +432,7 @@ c4iw_register_device(struct c4iw_dev *de strlcpy(ibdev->node_desc, C4IW_NODE_DESC, sizeof(ibdev->node_desc)); ibdev->phys_port_cnt = sc->params.nports; ibdev->num_comp_vectors = 1; - ibdev->dma_device = sc->dev; + ibdev->dma_device = NULL; ibdev->query_device = c4iw_query_device; ibdev->query_port = c4iw_query_port; ibdev->modify_port = c4iw_modify_port; Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c Wed May 24 18:14:57 2017 (r318798) @@ -133,6 +133,7 @@ static int create_qp(struct c4iw_rdev *r int ret; int eqsize; struct wrqe *wr; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; wq->sq.qid = c4iw_get_qpid(rdev, uctx); if (!wq->sq.qid) @@ -214,8 +215,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ @@ -237,8 +237,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ V_FW_RI_RES_WR_CPRIO(0) | /* don't keep in chip cache */ @@ -1523,7 +1522,7 @@ c4iw_create_qp(struct ib_pd *pd, struct struct c4iw_create_qp_resp uresp; int sqsize, rqsize; struct c4iw_ucontext *ucontext; - int ret; + int ret, spg_ndesc; struct c4iw_mm_entry *mm1, *mm2, *mm3, *mm4; CTR2(KTR_IW_CXGBE, "%s ib_pd %p", __func__, pd); @@ -1541,12 +1540,13 @@ c4iw_create_qp(struct ib_pd *pd, struct if (attrs->cap.max_inline_data > T4_MAX_SEND_INLINE) return ERR_PTR(-EINVAL); + spg_ndesc = rhp->rdev.adap->params.sge.spg_len / EQ_ESIZE; rqsize = roundup(attrs->cap.max_recv_wr + 1, 16); - if (rqsize > T4_MAX_RQ_SIZE) + if (rqsize > T4_MAX_RQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); sqsize = roundup(attrs->cap.max_send_wr + 1, 16); - if (sqsize > T4_MAX_SQ_SIZE) + if (sqsize > T4_MAX_SQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); ucontext = pd->uobject ? to_c4iw_ucontext(pd->uobject->context) : NULL; @@ -1556,9 +1556,10 @@ c4iw_create_qp(struct ib_pd *pd, struct if (!qhp) return ERR_PTR(-ENOMEM); qhp->wq.sq.size = sqsize; - qhp->wq.sq.memsize = (sqsize + 1) * sizeof *qhp->wq.sq.queue; + qhp->wq.sq.memsize = (sqsize + spg_ndesc) * sizeof *qhp->wq.sq.queue + + 16 * sizeof(__be64); qhp->wq.rq.size = rqsize; - qhp->wq.rq.memsize = (rqsize + 1) * sizeof *qhp->wq.rq.queue; + qhp->wq.rq.memsize = (rqsize + spg_ndesc) * sizeof *qhp->wq.rq.queue; if (ucontext) { qhp->wq.sq.memsize = roundup(qhp->wq.sq.memsize, PAGE_SIZE); Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/t4.h ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/t4.h Wed May 24 17:52:56 2017 (r318797) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/t4.h Wed May 24 18:14:57 2017 (r318798) @@ -59,21 +59,17 @@ #define CIDXINC_SHIFT 0 #define CIDXINC(x) ((x) << CIDXINC_SHIFT) -#define T4_MAX_NUM_QP (1<<16) -#define T4_MAX_NUM_CQ (1<<15) -#define T4_MAX_NUM_PD (1<<15) -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) -#define T4_MAX_EQ_SIZE (65520 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_IQ_SIZE (65520 - 1) -#define T4_MAX_RQ_SIZE (8192 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_SQ_SIZE (T4_MAX_EQ_SIZE - 1) -#define T4_MAX_QP_DEPTH (T4_MAX_RQ_SIZE - 1) -#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) +#define T4_MAX_NUM_PD 65536 +#define T4_MAX_EQ_SIZE 65520 +#define T4_MAX_IQ_SIZE 65520 +#define T4_MAX_RQ_SIZE(n) (8192 - (n) - 1) +#define T4_MAX_SQ_SIZE(n) (T4_MAX_EQ_SIZE - (n) - 1) +#define T4_MAX_QP_DEPTH(n) (T4_MAX_RQ_SIZE(n)) +#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 2) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) #define A_PCIE_MA_SYNC 0x30b4 struct t4_status_page { From owner-svn-src-stable-11@freebsd.org Wed May 24 19:18:37 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 575D9D7CB9F; Wed, 24 May 2017 19:18:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28F7711F9; Wed, 24 May 2017 19:18:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OJIa8o072656; Wed, 24 May 2017 19:18:36 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OJIaB7072655; Wed, 24 May 2017 19:18:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241918.v4OJIaB7072655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 19:18:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318801 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 19:18:37 -0000 Author: np Date: Wed May 24 19:18:36 2017 New Revision: 318801 URL: https://svnweb.freebsd.org/changeset/base/318801 Log: MFC r314131: Avoid NULL dereference in a couple of sysctl handlers in ibcore. iw_cxgbe sets ib_device->dma_device to NULL (since r311880). Sponsored by: Chelsio Communications Modified: stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed May 24 18:54:21 2017 (r318800) +++ stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed May 24 19:18:36 2017 (r318801) @@ -1225,7 +1225,7 @@ show_dev_device(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", @@ -1238,7 +1238,7 @@ show_dev_vendor(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", From owner-svn-src-stable-11@freebsd.org Wed May 24 19:57:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8B6AD7C9E1; Wed, 24 May 2017 19:57:23 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 985D91CF1; Wed, 24 May 2017 19:57:23 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OJvMaC089344; Wed, 24 May 2017 19:57:22 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OJvMps089337; Wed, 24 May 2017 19:57:22 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241957.v4OJvMps089337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 19:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318803 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 19:57:23 -0000 Author: np Date: Wed May 24 19:57:22 2017 New Revision: 318803 URL: https://svnweb.freebsd.org/changeset/base/318803 Log: MFC r313346: cxgbe/t4_tom: Fix CLIP entry refcounting on the passive side. Every IPv6 connection being handled by the TOE should have a reference on its CLIP entry. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c stable/11/sys/dev/cxgbe/tom/t4_listen.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_connect.c Wed May 24 19:19:02 2017 (r318802) +++ stable/11/sys/dev/cxgbe/tom/t4_connect.c Wed May 24 19:57:22 2017 (r318803) @@ -402,7 +402,7 @@ t4_connect(struct toedev *tod, struct so if ((inp->inp_vflag & INP_IPV6) == 0) DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); - toep->ce = hold_lip(td, &inp->in6p_laddr); + toep->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (toep->ce == NULL) DONT_OFFLOAD_ACTIVE_OPEN(ENOENT); Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_listen.c Wed May 24 19:19:02 2017 (r318802) +++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Wed May 24 19:57:22 2017 (r318803) @@ -209,7 +209,7 @@ alloc_lctx(struct adapter *sc, struct in !IN6_ARE_ADDR_EQUAL(&in6addr_any, &inp->in6p_laddr)) { struct tom_data *td = sc->tom_softc; - lctx->ce = hold_lip(td, &inp->in6p_laddr); + lctx->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (lctx->ce == NULL) { free(lctx, M_CXGBE); return (NULL); @@ -1584,6 +1584,8 @@ reset: INP_WLOCK_ASSERT(new_inp); MPASS(so->so_vnet == lctx->vnet); toep->vnet = lctx->vnet; + if (inc.inc_flags & INC_ISIPV6) + toep->ce = hold_lip(sc->tom_softc, &inc.inc6_laddr, lctx->ce); /* * This is for the unlikely case where the syncache entry that we added Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.c Wed May 24 19:19:02 2017 (r318802) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.c Wed May 24 19:57:22 2017 (r318803) @@ -730,12 +730,12 @@ search_lip(struct tom_data *td, struct i } struct clip_entry * -hold_lip(struct tom_data *td, struct in6_addr *lip) +hold_lip(struct tom_data *td, struct in6_addr *lip, struct clip_entry *ce) { - struct clip_entry *ce; mtx_lock(&td->clip_table_lock); - ce = search_lip(td, lip); + if (ce == NULL) + ce = search_lip(td, lip); if (ce != NULL) ce->refcount++; mtx_unlock(&td->clip_table_lock); Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.h Wed May 24 19:19:02 2017 (r318802) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.h Wed May 24 19:57:22 2017 (r318803) @@ -321,7 +321,8 @@ uint64_t calc_opt0(struct socket *, stru uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); void set_tcpddp_ulp_mode(struct toepcb *); int negative_advice(int); -struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *); +struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *, + struct clip_entry *); void release_lip(struct tom_data *, struct clip_entry *); /* t4_connect.c */ From owner-svn-src-stable-11@freebsd.org Wed May 24 20:10:39 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED948D7CCA3; Wed, 24 May 2017 20:10:39 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC61F1391; Wed, 24 May 2017 20:10:39 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKAcdA093636; Wed, 24 May 2017 20:10:38 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKAcba093635; Wed, 24 May 2017 20:10:38 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201705242010.v4OKAcba093635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Wed, 24 May 2017 20:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318805 - stable/11/sys/dev/tws X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:10:40 -0000 Author: jpaetzel Date: Wed May 24 20:10:38 2017 New Revision: 318805 URL: https://svnweb.freebsd.org/changeset/base/318805 Log: MFC 318401 Increase the number of LUNs this hardware can support. Experimentally we know this value works, but the hardware may support an even higher value. PR: 213876 Reported by: J.Catrysse@proximedia.be Modified: stable/11/sys/dev/tws/tws.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/tws/tws.h ============================================================================== --- stable/11/sys/dev/tws/tws.h Wed May 24 20:01:12 2017 (r318804) +++ stable/11/sys/dev/tws/tws.h Wed May 24 20:10:38 2017 (r318805) @@ -67,7 +67,7 @@ extern int tws_queue_depth; #define TWS_DRIVER_VERSION_STRING "10.80.00.005" #define TWS_MAX_NUM_UNITS 65 -#define TWS_MAX_NUM_LUNS 16 +#define TWS_MAX_NUM_LUNS 32 #define TWS_MAX_IRQS 2 #define TWS_SCSI_INITIATOR_ID 66 #define TWS_MAX_IO_SIZE 0x20000 /* 128kB */ From owner-svn-src-stable-11@freebsd.org Wed May 24 20:25:41 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFC0DD8024E; Wed, 24 May 2017 20:25:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A15351FD8; Wed, 24 May 2017 20:25:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKPeZN001519; Wed, 24 May 2017 20:25:40 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKPenJ001518; Wed, 24 May 2017 20:25:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705242025.v4OKPenJ001518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 24 May 2017 20:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318807 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:25:41 -0000 Author: asomers Date: Wed May 24 20:25:40 2017 New Revision: 318807 URL: https://svnweb.freebsd.org/changeset/base/318807 Log: MFC r317715: ifconfig displays ND6_IFF_NO_DAD as "IGNORELOOP" PR: 218958 Reviewed by: kristof Differential Revision: https://reviews.freebsd.org/D10543 Modified: stable/11/sbin/ifconfig/af_nd6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/af_nd6.c ============================================================================== --- stable/11/sbin/ifconfig/af_nd6.c Wed May 24 20:13:49 2017 (r318806) +++ stable/11/sbin/ifconfig/af_nd6.c Wed May 24 20:25:40 2017 (r318807) @@ -57,8 +57,7 @@ static const char rcsid[] = #define MAX_SYSCTL_TRY 5 #define ND6BITS "\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \ "\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \ - "\007NO_RADR\010NO_PREFER_IFACE\011IGNORELOOP\012NO_DAD" \ - "\020DEFAULTIF" + "\007NO_RADR\010NO_PREFER_IFACE\011NO_DAD\020DEFAULTIF" static int isnd6defif(int); void setnd6flags(const char *, int, int, const struct afswtch *); From owner-svn-src-stable-11@freebsd.org Wed May 24 20:28:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A26A7D8030F; Wed, 24 May 2017 20:28:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F6801295; Wed, 24 May 2017 20:28:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKSm8b001844; Wed, 24 May 2017 20:28:48 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKSmL3001842; Wed, 24 May 2017 20:28:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242028.v4OKSmL3001842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318808 - in stable/11: share/man/man4 sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:28:49 -0000 Author: np Date: Wed May 24 20:28:48 2017 New Revision: 318808 URL: https://svnweb.freebsd.org/changeset/base/318808 Log: MFC r313318: cxgbe(4): Allow tunables that control the number of queues to be set to '-n' to tell the driver to create _up to_ 'n' queues if enough cores are available. For example, setting hw.cxgbe.nrxq10g="-32" will result in 16 queues if the system has 16 cores, 32 if it has 32. There is no change in the default number of queues of any type. Sponsored by: Chelsio Communications Modified: stable/11/share/man/man4/cxgbe.4 stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/cxgbe.4 ============================================================================== --- stable/11/share/man/man4/cxgbe.4 Wed May 24 20:25:40 2017 (r318807) +++ stable/11/share/man/man4/cxgbe.4 Wed May 24 20:28:48 2017 (r318808) @@ -167,6 +167,10 @@ Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . +There are multiple tunables that control the number of queues of various +types. +A negative value for such a tunable instructs the driver to create +up to that many queues if there are enough CPU cores available. .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g Number of tx queues used for a 10Gb or higher-speed port. Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 20:25:40 2017 (r318807) +++ stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 20:28:48 2017 (r318808) @@ -232,8 +232,8 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Tunables. See tweak_tunables() too. * * Each tunable is set to a default value here if it's known at compile-time. - * Otherwise it is set to -1 as an indication to tweak_tunables() that it should - * provide a reasonable default when the driver is loaded. + * Otherwise it is set to -n as an indication to tweak_tunables() that it should + * provide a reasonable default (upto n) when the driver is loaded. * * Tunables applicable to both T4 and T5 are under hw.cxgbe. Those specific to * T5 are under hw.cxl. @@ -243,27 +243,27 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Number of queues for tx and rx, 10G and 1G, NIC and offload. */ #define NTXQ_10G 16 -int t4_ntxq10g = -1; +int t4_ntxq10g = -NTXQ_10G; TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq10g); #define NRXQ_10G 8 -int t4_nrxq10g = -1; +int t4_nrxq10g = -NRXQ_10G; TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq10g); #define NTXQ_1G 4 -int t4_ntxq1g = -1; +int t4_ntxq1g = -NTXQ_1G; TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1g); #define NRXQ_1G 2 -int t4_nrxq1g = -1; +int t4_nrxq1g = -NRXQ_1G; TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g); #define NTXQ_VI 1 -static int t4_ntxq_vi = -1; +static int t4_ntxq_vi = -NTXQ_VI; TUNABLE_INT("hw.cxgbe.ntxq_vi", &t4_ntxq_vi); #define NRXQ_VI 1 -static int t4_nrxq_vi = -1; +static int t4_nrxq_vi = -NRXQ_VI; TUNABLE_INT("hw.cxgbe.nrxq_vi", &t4_nrxq_vi); static int t4_rsrv_noflowq = 0; @@ -271,37 +271,37 @@ TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4 #ifdef TCP_OFFLOAD #define NOFLDTXQ_10G 8 -static int t4_nofldtxq10g = -1; +static int t4_nofldtxq10g = -NOFLDTXQ_10G; TUNABLE_INT("hw.cxgbe.nofldtxq10g", &t4_nofldtxq10g); #define NOFLDRXQ_10G 2 -static int t4_nofldrxq10g = -1; +static int t4_nofldrxq10g = -NOFLDRXQ_10G; TUNABLE_INT("hw.cxgbe.nofldrxq10g", &t4_nofldrxq10g); #define NOFLDTXQ_1G 2 -static int t4_nofldtxq1g = -1; +static int t4_nofldtxq1g = -NOFLDTXQ_1G; TUNABLE_INT("hw.cxgbe.nofldtxq1g", &t4_nofldtxq1g); #define NOFLDRXQ_1G 1 -static int t4_nofldrxq1g = -1; +static int t4_nofldrxq1g = -NOFLDRXQ_1G; TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g); #define NOFLDTXQ_VI 1 -static int t4_nofldtxq_vi = -1; +static int t4_nofldtxq_vi = -NOFLDTXQ_VI; TUNABLE_INT("hw.cxgbe.nofldtxq_vi", &t4_nofldtxq_vi); #define NOFLDRXQ_VI 1 -static int t4_nofldrxq_vi = -1; +static int t4_nofldrxq_vi = -NOFLDRXQ_VI; TUNABLE_INT("hw.cxgbe.nofldrxq_vi", &t4_nofldrxq_vi); #endif #ifdef DEV_NETMAP #define NNMTXQ_VI 2 -static int t4_nnmtxq_vi = -1; +static int t4_nnmtxq_vi = -NNMTXQ_VI; TUNABLE_INT("hw.cxgbe.nnmtxq_vi", &t4_nnmtxq_vi); #define NNMRXQ_VI 2 -static int t4_nnmrxq_vi = -1; +static int t4_nnmrxq_vi = -NNMRXQ_VI; TUNABLE_INT("hw.cxgbe.nnmrxq_vi", &t4_nnmrxq_vi); #endif @@ -9553,6 +9553,22 @@ uld_active(struct adapter *sc, int uld_i #endif /* + * t = ptr to tunable. + * nc = number of CPUs. + * c = compiled in default for that tunable. + */ +static void +calculate_nqueues(int *t, int nc, const int c) +{ + int nq; + + if (*t > 0) + return; + nq = *t < 0 ? -*t : c; + *t = min(nc, nq); +} + +/* * Come up with reasonable defaults for some of the tunables, provided they're * not set by the user (in which case we'll use the values as is). */ @@ -9565,7 +9581,7 @@ tweak_tunables(void) #ifdef RSS t4_ntxq10g = rss_getnumbuckets(); #else - t4_ntxq10g = min(nc, NTXQ_10G); + calculate_nqueues(&t4_ntxq10g, nc, NTXQ_10G); #endif } @@ -9574,18 +9590,17 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_ntxq1g = rss_getnumbuckets(); #else - t4_ntxq1g = min(nc, NTXQ_1G); + calculate_nqueues(&t4_ntxq1g, nc, NTXQ_1G); #endif } - if (t4_ntxq_vi < 1) - t4_ntxq_vi = min(nc, NTXQ_VI); + calculate_nqueues(&t4_ntxq_vi, nc, NTXQ_VI); if (t4_nrxq10g < 1) { #ifdef RSS t4_nrxq10g = rss_getnumbuckets(); #else - t4_nrxq10g = min(nc, NRXQ_10G); + calculate_nqueues(&t4_nrxq10g, nc, NRXQ_10G); #endif } @@ -9594,31 +9609,19 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_nrxq1g = rss_getnumbuckets(); #else - t4_nrxq1g = min(nc, NRXQ_1G); + calculate_nqueues(&t4_nrxq1g, nc, NRXQ_1G); #endif } - if (t4_nrxq_vi < 1) - t4_nrxq_vi = min(nc, NRXQ_VI); + calculate_nqueues(&t4_nrxq_vi, nc, NRXQ_VI); #ifdef TCP_OFFLOAD - if (t4_nofldtxq10g < 1) - t4_nofldtxq10g = min(nc, NOFLDTXQ_10G); - - if (t4_nofldtxq1g < 1) - t4_nofldtxq1g = min(nc, NOFLDTXQ_1G); - - if (t4_nofldtxq_vi < 1) - t4_nofldtxq_vi = min(nc, NOFLDTXQ_VI); - - if (t4_nofldrxq10g < 1) - t4_nofldrxq10g = min(nc, NOFLDRXQ_10G); - - if (t4_nofldrxq1g < 1) - t4_nofldrxq1g = min(nc, NOFLDRXQ_1G); - - if (t4_nofldrxq_vi < 1) - t4_nofldrxq_vi = min(nc, NOFLDRXQ_VI); + calculate_nqueues(&t4_nofldtxq10g, nc, NOFLDTXQ_10G); + calculate_nqueues(&t4_nofldtxq1g, nc, NOFLDTXQ_1G); + calculate_nqueues(&t4_nofldtxq_vi, nc, NOFLDTXQ_VI); + calculate_nqueues(&t4_nofldrxq10g, nc, NOFLDRXQ_10G); + calculate_nqueues(&t4_nofldrxq1g, nc, NOFLDRXQ_1G); + calculate_nqueues(&t4_nofldrxq_vi, nc, NOFLDRXQ_VI); if (t4_toecaps_allowed == -1) t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; @@ -9645,11 +9648,8 @@ tweak_tunables(void) #endif #ifdef DEV_NETMAP - if (t4_nnmtxq_vi < 1) - t4_nnmtxq_vi = min(nc, NNMTXQ_VI); - - if (t4_nnmrxq_vi < 1) - t4_nnmrxq_vi = min(nc, NNMRXQ_VI); + calculate_nqueues(&t4_nnmtxq_vi, nc, NNMTXQ_VI); + calculate_nqueues(&t4_nnmrxq_vi, nc, NNMRXQ_VI); #endif if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) From owner-svn-src-stable-11@freebsd.org Wed May 24 20:33:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DA75D8068F; Wed, 24 May 2017 20:33:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DB961A30; Wed, 24 May 2017 20:33:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKXoaS006198; Wed, 24 May 2017 20:33:50 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKXn3B006197; Wed, 24 May 2017 20:33:49 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242033.v4OKXn3B006197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318810 - in stable/11/release: . tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:33:51 -0000 Author: np Date: Wed May 24 20:33:49 2017 New Revision: 318810 URL: https://svnweb.freebsd.org/changeset/base/318810 Log: MFC r307008: Add the ability to override the size of the swap partition when building VM images. The default continues to be 1G. Sponsored by: Chelsio Communications Modified: stable/11/release/Makefile.vm stable/11/release/tools/vmimage.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/release/Makefile.vm ============================================================================== --- stable/11/release/Makefile.vm Wed May 24 20:29:20 2017 (r318809) +++ stable/11/release/Makefile.vm Wed May 24 20:33:49 2017 (r318810) @@ -8,6 +8,7 @@ VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G +SWAPSIZE?= 1G VMBASE?= vm VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image Modified: stable/11/release/tools/vmimage.subr ============================================================================== --- stable/11/release/tools/vmimage.subr Wed May 24 20:29:20 2017 (r318809) +++ stable/11/release/tools/vmimage.subr Wed May 24 20:33:49 2017 (r318810) @@ -11,7 +11,7 @@ trap "cleanup" INT QUIT TRAP ABRT TERM write_partition_layout() { if [ -z "${NOSWAP}" ]; then - SWAPOPT="-p freebsd-swap/swapfs::1G" + SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" fi _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" From owner-svn-src-stable-11@freebsd.org Wed May 24 20:52:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39F4DD7C02F; Wed, 24 May 2017 20:52:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16FE11FC3; Wed, 24 May 2017 20:52:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKqmj6014699; Wed, 24 May 2017 20:52:48 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKqlBD014694; Wed, 24 May 2017 20:52:47 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705242052.v4OKqlBD014694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 24 May 2017 20:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318813 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:52:49 -0000 Author: asomers Date: Wed May 24 20:52:47 2017 New Revision: 318813 URL: https://svnweb.freebsd.org/changeset/base/318813 Log: MFC r317755, r317758 r317755: Various Coverity fixes in ifconfig(8) * Exit early if kldload(2) fails (1011259). This is the only change that affects ifconfig's behavior. * Close memory and resource leaks (1305624, 1305205, 1007100) * Mark usage() as _Noreturn (1305806, 1305750) * Fix some dereference after null checks (1011474, 270774) Reported by: Coverity CID: 1305624, 1305205, 1007100, 1305806, 1305750, 1011474, CID: 270774, 1011259 Reviewed by: cem Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10587 r317758: Unbreak ifconfig for mlx4en(4) after r317755 ifconfig doesn't correctly infer mlx interfaces' module names, so it will attempt to load the mlx(4) module even when not necessary. Reported by: rstone X-MFC-With: 317755 Sponsored by: Spectra Logic Corp Modified: stable/11/sbin/ifconfig/af_inet6.c stable/11/sbin/ifconfig/ifclone.c stable/11/sbin/ifconfig/ifconfig.c stable/11/sbin/ifconfig/iflagg.c stable/11/sbin/ifconfig/ifpfsync.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/11/sbin/ifconfig/af_inet6.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/af_inet6.c Wed May 24 20:52:47 2017 (r318813) @@ -349,12 +349,14 @@ in6_getaddr(const char *s, int which) bzero(&hints, sizeof(struct addrinfo)); hints.ai_family = AF_INET6; error = getaddrinfo(s, NULL, &hints, &res); + if (error != 0) { + if (inet_pton(AF_INET6, s, &sin->sin6_addr) != 1) + errx(1, "%s: bad value", s); + } else { + bcopy(res->ai_addr, sin, res->ai_addrlen); + freeaddrinfo(res); + } } - if (error != 0) { - if (inet_pton(AF_INET6, s, &sin->sin6_addr) != 1) - errx(1, "%s: bad value", s); - } else - bcopy(res->ai_addr, sin, res->ai_addrlen); } static int Modified: stable/11/sbin/ifconfig/ifclone.c ============================================================================== --- stable/11/sbin/ifconfig/ifclone.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/ifclone.c Wed May 24 20:52:47 2017 (r318813) @@ -87,6 +87,7 @@ list_cloners(void) putchar('\n'); free(buf); + close(s); } struct clone_defcb { Modified: stable/11/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/11/sbin/ifconfig/ifconfig.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/ifconfig.c Wed May 24 20:52:47 2017 (r318813) @@ -106,7 +106,7 @@ static int ifconfig(int argc, char *cons static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl, struct ifaddrs *ifa); static void tunnel_status(int s); -static void usage(void); +static void usage(void) _Noreturn; static struct afswtch *af_getbyname(const char *name); static struct afswtch *af_getbyfamily(int af); @@ -802,26 +802,24 @@ top: */ p = (setaddr ? &setifdstaddr_cmd : &setifaddr_cmd); } - if (p->c_u.c_func || p->c_u.c_func2) { - if (p->c_parameter == NEXTARG) { - if (argv[1] == NULL) - errx(1, "'%s' requires argument", - p->c_name); - p->c_u.c_func(argv[1], 0, s, afp); + if (p->c_parameter == NEXTARG && p->c_u.c_func) { + if (argv[1] == NULL) + errx(1, "'%s' requires argument", + p->c_name); + p->c_u.c_func(argv[1], 0, s, afp); + argc--, argv++; + } else if (p->c_parameter == OPTARG && p->c_u.c_func) { + p->c_u.c_func(argv[1], 0, s, afp); + if (argv[1] != NULL) argc--, argv++; - } else if (p->c_parameter == OPTARG) { - p->c_u.c_func(argv[1], 0, s, afp); - if (argv[1] != NULL) - argc--, argv++; - } else if (p->c_parameter == NEXTARG2) { - if (argc < 3) - errx(1, "'%s' requires 2 arguments", - p->c_name); - p->c_u.c_func2(argv[1], argv[2], s, afp); - argc -= 2, argv += 2; - } else - p->c_u.c_func(*argv, p->c_parameter, s, afp); - } + } else if (p->c_parameter == NEXTARG2 && p->c_u.c_func2) { + if (argc < 3) + errx(1, "'%s' requires 2 arguments", + p->c_name); + p->c_u.c_func2(argv[1], argv[2], s, afp); + argc -= 2, argv += 2; + } else if (p->c_u.c_func) + p->c_u.c_func(*argv, p->c_parameter, s, afp); argc--, argv++; } @@ -1297,8 +1295,8 @@ printb(const char *s, unsigned v, const printf("%s=%o", s, v); else printf("%s=%x", s, v); - bits++; if (bits) { + bits++; putchar('<'); while ((i = *bits++) != '\0') { if (v & (1 << (i-1))) { @@ -1376,8 +1374,11 @@ ifmaybeload(const char *name) } } - /* not present, we should try to load it */ - kldload(ifkind); + /* + * Try to load the module. But ignore failures, because ifconfig can't + * infer the names of all drivers (eg mlx4en(4)). + */ + (void) kldload(ifkind); } static struct cmd basic_cmds[] = { Modified: stable/11/sbin/ifconfig/iflagg.c ============================================================================== --- stable/11/sbin/ifconfig/iflagg.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/iflagg.c Wed May 24 20:52:47 2017 (r318813) @@ -200,24 +200,17 @@ static void lagg_status(int s) { struct lagg_protos lpr[] = LAGG_PROTOS; - struct lagg_reqport rp, rpbuf[LAGG_MAX_PORTS]; + struct lagg_reqport rpbuf[LAGG_MAX_PORTS]; struct lagg_reqall ra; struct lagg_reqopts ro; struct lagg_reqflags rf; struct lacp_opreq *lp; const char *proto = ""; - int i, isport = 0; + int i; - bzero(&rp, sizeof(rp)); bzero(&ra, sizeof(ra)); bzero(&ro, sizeof(ro)); - strlcpy(rp.rp_ifname, name, sizeof(rp.rp_ifname)); - strlcpy(rp.rp_portname, name, sizeof(rp.rp_portname)); - - if (ioctl(s, SIOCGLAGGPORT, &rp) == 0) - isport = 1; - strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname)); ra.ra_size = sizeof(rpbuf); ra.ra_port = rpbuf; @@ -257,8 +250,6 @@ lagg_status(int s) sep = ","; } } - if (isport) - printf(" laggdev %s", rp.rp_ifname); putchar('\n'); if (verbose) { printf("\tlagg options:\n"); Modified: stable/11/sbin/ifconfig/ifpfsync.c ============================================================================== --- stable/11/sbin/ifconfig/ifpfsync.c Wed May 24 20:41:26 2017 (r318812) +++ stable/11/sbin/ifconfig/ifpfsync.c Wed May 24 20:52:47 2017 (r318813) @@ -120,6 +120,7 @@ setpfsync_syncpeer(const char *val, int if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1) err(1, "SIOCSETPFSYNC"); + freeaddrinfo(peerres); } /* ARGSUSED */ From owner-svn-src-stable-11@freebsd.org Wed May 24 20:54:15 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F185D7C156; Wed, 24 May 2017 20:54:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F492139B; Wed, 24 May 2017 20:54:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKsE3L014875; Wed, 24 May 2017 20:54:14 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKsEqY014874; Wed, 24 May 2017 20:54:14 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242054.v4OKsEqY014874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318815 - stable/11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:54:15 -0000 Author: np Date: Wed May 24 20:54:14 2017 New Revision: 318815 URL: https://svnweb.freebsd.org/changeset/base/318815 Log: MFC r307380: Fix typo in comments. Modified: stable/11/sys/sys/mbuf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/mbuf.h ============================================================================== --- stable/11/sys/sys/mbuf.h Wed May 24 20:53:01 2017 (r318814) +++ stable/11/sys/sys/mbuf.h Wed May 24 20:54:14 2017 (r318815) @@ -334,7 +334,7 @@ struct mbuf { #define M_HASHTYPE_RSS_TCP_IPV6 M_HASHTYPE_HASH(4) /* TCPv6 4-tuple */ #define M_HASHTYPE_RSS_IPV6_EX M_HASHTYPE_HASH(5) /* IPv6 2-tuple + * ext hdrs */ -#define M_HASHTYPE_RSS_TCP_IPV6_EX M_HASHTYPE_HASH(6) /* TCPv6 4-tiple + +#define M_HASHTYPE_RSS_TCP_IPV6_EX M_HASHTYPE_HASH(6) /* TCPv6 4-tuple + * ext hdrs */ /* Non-standard RSS hash types */ #define M_HASHTYPE_RSS_UDP_IPV4 M_HASHTYPE_HASH(7) /* IPv4 UDP 4-tuple*/ From owner-svn-src-stable-11@freebsd.org Wed May 24 21:18:14 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4BDDD7C772; Wed, 24 May 2017 21:18:14 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C6F81FF2; Wed, 24 May 2017 21:18:14 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLIDXx023535; Wed, 24 May 2017 21:18:13 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLIDZs023534; Wed, 24 May 2017 21:18:13 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705242118.v4OLIDZs023534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 24 May 2017 21:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318817 - stable/11/sbin/camcontrol X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:18:14 -0000 Author: asomers Date: Wed May 24 21:18:13 2017 New Revision: 318817 URL: https://svnweb.freebsd.org/changeset/base/318817 Log: MFC r317759: Fix memory leaks in camcontrol Reported by: Coverity CID: 1331674, 1331675 Reviewed by: ken Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10588 Modified: stable/11/sbin/camcontrol/fwdownload.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/fwdownload.c ============================================================================== --- stable/11/sbin/camcontrol/fwdownload.c Wed May 24 21:02:53 2017 (r318816) +++ stable/11/sbin/camcontrol/fwdownload.c Wed May 24 21:18:13 2017 (r318817) @@ -550,8 +550,7 @@ fw_validate_ibm(struct cam_device *dev, fprintf(stdout, "Firmware file is valid for this drive.\n"); retval = 0; bailout: - if (ccb != NULL) - cam_freeccb(ccb); + cam_freeccb(ccb); return (retval); } @@ -753,8 +752,8 @@ fw_check_device_ready(struct cam_device goto bailout; } bailout: - if (ccb != NULL) - cam_freeccb(ccb); + free(ptr); + cam_freeccb(ccb); return (retval); } @@ -913,8 +912,7 @@ fw_download_img(struct cam_device *cam_d bailout: if (quiet == 0) progress_complete(&progress, size - img_size); - if (ccb != NULL) - cam_freeccb(ccb); + cam_freeccb(ccb); return (retval); } @@ -923,6 +921,7 @@ fwdownload(struct cam_device *device, in char *combinedopt, int printerrors, int task_attr, int retry_count, int timeout) { + union ccb *ccb = NULL; struct fw_vendor *vp; char *fw_img_path = NULL; struct ata_params *ident_buf = NULL; @@ -965,8 +964,6 @@ fwdownload(struct cam_device *device, in if ((devtype == CC_DT_ATA) || (devtype == CC_DT_ATA_BEHIND_SCSI)) { - union ccb *ccb; - ccb = cam_getccb(device); if (ccb == NULL) { warnx("couldn't allocate CCB"); @@ -976,7 +973,6 @@ fwdownload(struct cam_device *device, in if (ata_do_identify(device, retry_count, timeout, ccb, &ident_buf) != 0) { - cam_freeccb(ccb); retval = 1; goto bailout; } @@ -1048,6 +1044,7 @@ fwdownload(struct cam_device *device, in fprintf(stdout, "Firmware download successful\n"); bailout: + cam_freeccb(ccb); free(buf); return (retval); } From owner-svn-src-stable-11@freebsd.org Wed May 24 21:53:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17222D8063D; Wed, 24 May 2017 21:53:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA49410FC; Wed, 24 May 2017 21:53:48 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLrlA7040593; Wed, 24 May 2017 21:53:47 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLrlSh040591; Wed, 24 May 2017 21:53:47 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242153.v4OLrlSh040591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 21:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318825 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:53:49 -0000 Author: np Date: Wed May 24 21:53:47 2017 New Revision: 318825 URL: https://svnweb.freebsd.org/changeset/base/318825 Log: MFC r309725: cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities any more (since r307394). Do it in the driver instead. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 21:52:20 2017 (r318824) +++ stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 21:53:47 2017 (r318825) @@ -1444,6 +1444,10 @@ cxgbe_vi_attach(device_t dev, struct vi_ if (vi->nofldrxq != 0) ifp->if_capabilities |= IFCAP_TOE; #endif +#ifdef DEV_NETMAP + if (vi->nnmrxq != 0) + ifp->if_capabilities |= IFCAP_NETMAP; +#endif ifp->if_capenable = T4_CAP_ENABLE; ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6; @@ -1462,7 +1466,7 @@ cxgbe_vi_attach(device_t dev, struct vi_ ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP - if (vi->nnmrxq != 0) + if (ifp->if_capabilities & IFCAP_NETMAP) cxgbe_nm_attach(vi); #endif sb = sbuf_new_auto(); Modified: stable/11/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:52:20 2017 (r318824) +++ stable/11/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:53:47 2017 (r318825) @@ -870,7 +870,7 @@ cxgbe_nm_attach(struct vi_info *vi) na.nm_register = cxgbe_netmap_reg; na.num_tx_rings = vi->nnmtxq; na.num_rx_rings = vi->nnmrxq; - netmap_attach(&na); /* This adds IFCAP_NETMAP to if_capabilities */ + netmap_attach(&na); } void From owner-svn-src-stable-11@freebsd.org Wed May 24 22:47:47 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0100AD80451; Wed, 24 May 2017 22:47:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C52691862; Wed, 24 May 2017 22:47:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMljN5062030; Wed, 24 May 2017 22:47:45 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMljXC062029; Wed, 24 May 2017 22:47:45 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242247.v4OMljXC062029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 22:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318835 - stable/11/sys/dev/cxgbe/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:47:47 -0000 Author: np Date: Wed May 24 22:47:45 2017 New Revision: 318835 URL: https://svnweb.freebsd.org/changeset/base/318835 Log: MFC r316172: cxgbe: Don't call t4_edc_err_read for errors not related to the EDCs. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Wed May 24 22:40:56 2017 (r318834) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Wed May 24 22:47:45 2017 (r318835) @@ -4332,7 +4332,8 @@ static void mem_intr_handler(struct adap if (v & F_ECC_CE_INT_CAUSE) { u32 cnt = G_ECC_CECNT(t4_read_reg(adapter, cnt_addr)); - t4_edc_err_read(adapter, idx); + if (idx <= MEM_EDC1) + t4_edc_err_read(adapter, idx); t4_write_reg(adapter, cnt_addr, V_ECC_CECNT(M_ECC_CECNT)); CH_WARN_RATELIMIT(adapter, From owner-svn-src-stable-11@freebsd.org Wed May 24 23:08:18 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A53CCD809AA; Wed, 24 May 2017 23:08:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8CC1248; Wed, 24 May 2017 23:08:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ON8Hrm070620; Wed, 24 May 2017 23:08:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ON8HGm070619; Wed, 24 May 2017 23:08:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242308.v4ON8HGm070619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 23:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318837 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 23:08:18 -0000 Author: np Date: Wed May 24 23:08:17 2017 New Revision: 318837 URL: https://svnweb.freebsd.org/changeset/base/318837 Log: MFC r316506: cxgbe(4): Program the global RSS key once instead of once per ifnet. Modified: stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 22:48:17 2017 (r318836) +++ stable/11/sys/dev/cxgbe/t4_main.c Wed May 24 23:08:17 2017 (r318837) @@ -4238,6 +4238,10 @@ int adapter_full_init(struct adapter *sc) { int rc, i; +#ifdef RSS + uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; + uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; +#endif ASSERT_SYNCHRONIZED_OP(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); @@ -4263,6 +4267,14 @@ adapter_full_init(struct adapter *sc) taskqueue_start_threads(&sc->tq[i], 1, PI_NET, "%s tq%d", device_get_nameunit(sc->dev), i); } +#ifdef RSS + MPASS(RSS_KEYSIZE == 40); + rss_getkey((void *)&raw_rss_key[0]); + for (i = 0; i < nitems(rss_key); i++) { + rss_key[i] = htobe32(raw_rss_key[nitems(rss_key) - 1 - i]); + } + t4_write_rss_key(sc, &rss_key[0], -1); +#endif if (!(sc->flags & IS_VF)) t4_intr_enable(sc); @@ -4370,8 +4382,6 @@ vi_full_init(struct vi_info *vi) int nbuckets = rss_getnumbuckets(); int hashconfig = rss_gethashconfig(); int extra; - uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; - uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; #endif ASSERT_SYNCHRONIZED_OP(sc); @@ -4401,17 +4411,10 @@ vi_full_init(struct vi_info *vi) vi->rss_size); } #ifdef RSS - MPASS(RSS_KEYSIZE == 40); if (vi->nrxq != nbuckets) { if_printf(ifp, "nrxq (%d) != kernel RSS buckets (%d);" "performance will be impacted.\n", vi->nrxq, nbuckets); } - - rss_getkey((void *)&raw_rss_key[0]); - for (i = 0; i < nitems(rss_key); i++) { - rss_key[i] = htobe32(raw_rss_key[nitems(rss_key) - 1 - i]); - } - t4_write_rss_key(sc, &rss_key[0], -1); #endif rss = malloc(vi->rss_size * sizeof (*rss), M_CXGBE, M_ZERO | M_WAITOK); for (i = 0; i < vi->rss_size;) { From owner-svn-src-stable-11@freebsd.org Thu May 25 00:16:02 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9C31D7BE71; Thu, 25 May 2017 00:16:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87C9211B1; Thu, 25 May 2017 00:16:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P0G1ar099476; Thu, 25 May 2017 00:16:01 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P0G1TW099473; Thu, 25 May 2017 00:16:01 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250016.v4P0G1TW099473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 00:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318839 - in stable/11/sys/dev/cxgbe: . common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 00:16:02 -0000 Author: np Date: Thu May 25 00:16:01 2017 New Revision: 318839 URL: https://svnweb.freebsd.org/changeset/base/318839 Log: MFC r316971: cxgbe: Add a tunable to configure the SGE time scaler, which is available starting with T6. The values in the timer holdoff registers are multiplied by the scaling factor before use. dev...holdoff_timers shows the final values of the timers in microseconds. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/common.h stable/11/sys/dev/cxgbe/common/t4_hw.c stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/common.h Wed May 24 23:08:45 2017 (r318838) +++ stable/11/sys/dev/cxgbe/common/common.h Thu May 25 00:16:01 2017 (r318839) @@ -210,7 +210,7 @@ struct tp_rdma_stats { }; struct sge_params { - int timer_val[SGE_NTIMERS]; + int timer_val[SGE_NTIMERS]; /* final, scaled values */ int counter_val[SGE_NCOUNTERS]; int fl_starve_threshold; int fl_starve_threshold2; Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Wed May 24 23:08:45 2017 (r318838) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Thu May 25 00:16:01 2017 (r318839) @@ -7907,7 +7907,7 @@ int t4_init_sge_params(struct adapter *a { u32 r; struct sge_params *sp = &adapter->params.sge; - unsigned i; + unsigned i, tscale = 1; r = t4_read_reg(adapter, A_SGE_INGRESS_RX_THRESHOLD); sp->counter_val[0] = G_THRESHOLD_0(r); @@ -7915,15 +7915,24 @@ int t4_init_sge_params(struct adapter *a sp->counter_val[2] = G_THRESHOLD_2(r); sp->counter_val[3] = G_THRESHOLD_3(r); + if (chip_id(adapter) >= CHELSIO_T6) { + r = t4_read_reg(adapter, A_SGE_ITP_CONTROL); + tscale = G_TSCALE(r); + if (tscale == 0) + tscale = 1; + else + tscale += 2; + } + r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_0_AND_1); - sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)); - sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)); + sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)) * tscale; + sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_2_AND_3); - sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)); - sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)); + sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)) * tscale; + sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_4_AND_5); - sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)); - sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)); + sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)) * tscale; + sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)) * tscale; r = t4_read_reg(adapter, A_SGE_CONM_CTRL); sp->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1; Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Wed May 24 23:08:45 2017 (r318838) +++ stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 00:16:01 2017 (r318839) @@ -150,6 +150,13 @@ TUNABLE_INT("hw.cxgbe.largest_rx_cluster static int safest_rx_cluster = PAGE_SIZE; TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); +/* + * The interrupt holdoff timers are multiplied by this value on T6+. + * 1 and 3-17 (both inclusive) are legal values. + */ +static int tscale = 1; +TUNABLE_INT("hw.cxgbe.tscale", &tscale); + struct txpkts { u_int wr_type; /* type 0 or type 1 */ u_int npkt; /* # of packets in this work request */ @@ -391,6 +398,12 @@ t4_sge_modload(void) cong_drop = 0; } + if (tscale != 1 && (tscale < 3 || tscale > 17)) { + printf("Invalid hw.cxgbe.tscale value (%d)," + " using 1 instead.\n", tscale); + tscale = 1; + } + extfree_refs = counter_u64_alloc(M_WAITOK); extfree_rels = counter_u64_alloc(M_WAITOK); counter_u64_zero(extfree_refs); @@ -583,6 +596,15 @@ t4_tweak_chip_settings(struct adapter *s V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5])); t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5, v); + if (chip_id(sc) >= CHELSIO_T6) { + m = V_TSCALE(M_TSCALE); + if (tscale == 1) + v = 0; + else + v = V_TSCALE(tscale - 2); + t4_set_reg_field(sc, A_SGE_ITP_CONTROL, m, v); + } + /* 4K, 16K, 64K, 256K DDP "page sizes" */ v = V_HPZ0(0) | V_HPZ1(2) | V_HPZ2(4) | V_HPZ3(6); t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, v); From owner-svn-src-stable-11@freebsd.org Thu May 25 00:34:02 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90A7AD802FC; Thu, 25 May 2017 00:34:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54D661B38; Thu, 25 May 2017 00:34:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P0Y1hY007634; Thu, 25 May 2017 00:34:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P0Y1OI007633; Thu, 25 May 2017 00:34:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705250034.v4P0Y1OI007633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 25 May 2017 00:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318841 - stable/11/contrib/elftoolchain/nm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 00:34:02 -0000 Author: emaste Date: Thu May 25 00:34:01 2017 New Revision: 318841 URL: https://svnweb.freebsd.org/changeset/base/318841 Log: MFC r318603: nm: document 'r' symbol type PR: 219245 Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/elftoolchain/nm/nm.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/nm/nm.1 ============================================================================== --- stable/11/contrib/elftoolchain/nm/nm.1 Thu May 25 00:16:41 2017 (r318840) +++ stable/11/contrib/elftoolchain/nm/nm.1 Thu May 25 00:34:01 2017 (r318841) @@ -24,7 +24,7 @@ .\" .\" $Id: nm.1 3195 2015-05-12 17:22:19Z emaste $ .\" -.Dd February 15, 2015 +.Dd May 21, 2017 .Os .Dt NM 1 .Sh NAME @@ -304,6 +304,8 @@ A local (uninitialized data) symbol. .It d A local data symbol. +.It r +A local read-only data symbol. .It t A local text symbol. .It v From owner-svn-src-stable-11@freebsd.org Thu May 25 00:43:58 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E947D80687; Thu, 25 May 2017 00:43:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C37B91223; Thu, 25 May 2017 00:43:57 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P0huJs011915; Thu, 25 May 2017 00:43:56 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P0huqS011913; Thu, 25 May 2017 00:43:56 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250043.v4P0huqS011913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 00:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318842 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 00:43:58 -0000 Author: np Date: Thu May 25 00:43:56 2017 New Revision: 318842 URL: https://svnweb.freebsd.org/changeset/base/318842 Log: MFC r317041: cxgbe: Add tunables to control the number of LRO entries and the number of rx mbufs that should be presorted before LRO. There is no change in default behavior. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Thu May 25 00:34:01 2017 (r318841) +++ stable/11/sys/dev/cxgbe/adapter.h Thu May 25 00:43:56 2017 (r318842) @@ -322,6 +322,7 @@ enum { IQ_HAS_FL = (1 << 1), /* iq associated with a freelist */ IQ_INTR = (1 << 2), /* iq takes direct interrupt */ IQ_LRO_ENABLED = (1 << 3), /* iq is an eth rxq with LRO enabled */ + IQ_ADJ_CREDIT = (1 << 4), /* hw is off by 1 credit for this iq */ /* iq state */ IQS_DISABLED = 0, Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 00:34:01 2017 (r318841) +++ stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 00:43:56 2017 (r318842) @@ -157,6 +157,18 @@ TUNABLE_INT("hw.cxgbe.safest_rx_cluster" static int tscale = 1; TUNABLE_INT("hw.cxgbe.tscale", &tscale); +/* + * Number of LRO entries in the lro_ctrl structure per rx queue. + */ +static int lro_entries = TCP_LRO_ENTRIES; +TUNABLE_INT("hw.cxgbe.lro_entries", &lro_entries); + +/* + * This enables presorting of frames before they're fed into tcp_lro_rx. + */ +static int lro_mbufs = 0; +TUNABLE_INT("hw.cxgbe.lro_mbufs", &lro_mbufs); + struct txpkts { u_int wr_type; /* type 0 or type 1 */ u_int npkt; /* # of packets in this work request */ @@ -1371,6 +1383,13 @@ t4_vi_intr(void *arg) t4_intr(irq->rxq); } +static inline int +sort_before_lro(struct lro_ctrl *lro) +{ + + return (lro->lro_mbuf_max != 0); +} + /* * Deals with anything and everything on the given ingress queue. */ @@ -1390,6 +1409,7 @@ service_iq(struct sge_iq *iq, int budget STAILQ_HEAD(, sge_iq) iql = STAILQ_HEAD_INITIALIZER(iql); #if defined(INET) || defined(INET6) const struct timeval lro_timeout = {0, sc->lro_timeout}; + struct lro_ctrl *lro = &rxq->lro; #endif KASSERT(iq->state == IQS_BUSY, ("%s: iq %p not BUSY", __func__, iq)); @@ -1404,6 +1424,23 @@ service_iq(struct sge_iq *iq, int budget fl_hw_cidx = 0; /* to silence gcc warning */ } +#if defined(INET) || defined(INET6) + if (iq->flags & IQ_ADJ_CREDIT) { + MPASS(sort_before_lro(lro)); + iq->flags &= ~IQ_ADJ_CREDIT; + if ((d->rsp.u.type_gen & F_RSPD_GEN) != iq->gen) { + tcp_lro_flush_all(lro); + t4_write_reg(sc, sc->sge_gts_reg, V_CIDXINC(1) | + V_INGRESSQID((u32)iq->cntxt_id) | + V_SEINTARM(iq->intr_params)); + return (0); + } + ndescs = 1; + } +#else + MPASS((iq->flags & IQ_ADJ_CREDIT) == 0); +#endif + /* * We always come back and check the descriptor ring for new indirect * interrupts and other responses after running a single handler. @@ -1515,8 +1552,9 @@ service_iq(struct sge_iq *iq, int budget #if defined(INET) || defined(INET6) if (iq->flags & IQ_LRO_ENABLED && + !sort_before_lro(lro) && sc->lro_timeout != 0) { - tcp_lro_flush_inactive(&rxq->lro, + tcp_lro_flush_inactive(lro, &lro_timeout); } #endif @@ -1556,9 +1594,14 @@ process_iql: #if defined(INET) || defined(INET6) if (iq->flags & IQ_LRO_ENABLED) { - struct lro_ctrl *lro = &rxq->lro; - - tcp_lro_flush_all(lro); + if (ndescs > 0 && lro->lro_mbuf_count > 8) { + MPASS(sort_before_lro(lro)); + /* hold back one credit and don't flush LRO state */ + iq->flags |= IQ_ADJ_CREDIT; + ndescs--; + } else { + tcp_lro_flush_all(lro); + } } #endif @@ -1847,10 +1890,14 @@ t4_eth_rx(struct sge_iq *iq, const struc } #if defined(INET) || defined(INET6) - if (iq->flags & IQ_LRO_ENABLED && - tcp_lro_rx(lro, m0, 0) == 0) { - /* queued for LRO */ - } else + if (iq->flags & IQ_LRO_ENABLED) { + if (sort_before_lro(lro)) { + tcp_lro_queue_mbuf(lro, m0); + return (0); /* queued for sort, then LRO */ + } + if (tcp_lro_rx(lro, m0, 0) == 0) + return (0); /* queued for LRO */ + } #endif ifp->if_input(ifp, m0); @@ -3041,10 +3088,10 @@ alloc_rxq(struct vi_info *vi, struct sge FL_UNLOCK(&rxq->fl); #if defined(INET) || defined(INET6) - rc = tcp_lro_init(&rxq->lro); + rc = tcp_lro_init_args(&rxq->lro, vi->ifp, lro_entries, lro_mbufs); if (rc != 0) return (rc); - rxq->lro.ifp = vi->ifp; /* also indicates LRO init'ed */ + MPASS(rxq->lro.ifp == vi->ifp); /* also indicates LRO init'ed */ if (vi->ifp->if_capenable & IFCAP_LRO) rxq->iq.flags |= IQ_LRO_ENABLED; From owner-svn-src-stable-11@freebsd.org Thu May 25 01:00:59 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 115A8D80B63; Thu, 25 May 2017 01:00:59 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6E601A2A; Thu, 25 May 2017 01:00:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P10vKJ017120; Thu, 25 May 2017 01:00:57 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P10v0I017117; Thu, 25 May 2017 01:00:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250100.v4P10v0I017117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318843 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:00:59 -0000 Author: np Date: Thu May 25 01:00:57 2017 New Revision: 318843 URL: https://svnweb.freebsd.org/changeset/base/318843 Log: MFC r317820 and r317837. r317820: cxgbe(4): Update the list of PCIe devices claimed by the driver. At this point any board with a T6 should just work. r317837: cxgbe(4): Update the VF device ids too. This should have been part of r317820. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_iov.c stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_iov.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_iov.c Thu May 25 00:43:56 2017 (r318842) +++ stable/11/sys/dev/cxgbe/t4_iov.c Thu May 25 01:00:57 2017 (r318843) @@ -92,11 +92,25 @@ struct { {0x5013, "Chelsio T580-CHR"}, #endif }, t6iov_pciids[] = { + {0x6000, "Chelsio T6-DBG-25"}, /* 2 x 10/25G, debug */ {0x6001, "Chelsio T6225-CR"}, /* 2 x 10/25G */ {0x6002, "Chelsio T6225-SO-CR"}, /* 2 x 10/25G, nomem */ + {0x6003, "Chelsio T6425-CR"}, /* 4 x 10/25G */ + {0x6004, "Chelsio T6425-SO-CR"}, /* 4 x 10/25G, nomem */ + {0x6005, "Chelsio T6225-OCP-SO"}, /* 2 x 10/25G, nomem */ + {0x6006, "Chelsio T62100-OCP-SO"}, /* 2 x 40/50/100G, nomem */ {0x6007, "Chelsio T62100-LP-CR"}, /* 2 x 40/50/100G */ {0x6008, "Chelsio T62100-SO-CR"}, /* 2 x 40/50/100G, nomem */ + {0x6009, "Chelsio T6210-BT"}, /* 2 x 10GBASE-T */ {0x600d, "Chelsio T62100-CR"}, /* 2 x 40/50/100G */ + {0x6010, "Chelsio T6-DBG-100"}, /* 2 x 40/50/100G, debug */ + {0x6011, "Chelsio T6225-LL-CR"}, /* 2 x 10/25G */ + {0x6014, "Chelsio T61100-OCP-SO"}, /* 1 x 40/50/100G, nomem */ + {0x6015, "Chelsio T6201-BT"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6080, "Chelsio T6225 80"}, + {0x6081, "Chelsio T62100 81"}, }; static int t4iov_attach_child(device_t dev); Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 00:43:56 2017 (r318842) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:00:57 2017 (r318843) @@ -623,13 +623,25 @@ struct { #endif }, t6_pciids[] = { {0xc006, "Chelsio Terminator 6 FPGA"}, /* T6 PE10K6 FPGA (PF0) */ - {0x6400, "Chelsio T6225-DBG"}, /* 2 x 10/25G, debug */ + {0x6400, "Chelsio T6-DBG-25"}, /* 2 x 10/25G, debug */ {0x6401, "Chelsio T6225-CR"}, /* 2 x 10/25G */ {0x6402, "Chelsio T6225-SO-CR"}, /* 2 x 10/25G, nomem */ + {0x6403, "Chelsio T6425-CR"}, /* 4 x 10/25G */ + {0x6404, "Chelsio T6425-SO-CR"}, /* 4 x 10/25G, nomem */ + {0x6405, "Chelsio T6225-OCP-SO"}, /* 2 x 10/25G, nomem */ + {0x6406, "Chelsio T62100-OCP-SO"}, /* 2 x 40/50/100G, nomem */ {0x6407, "Chelsio T62100-LP-CR"}, /* 2 x 40/50/100G */ {0x6408, "Chelsio T62100-SO-CR"}, /* 2 x 40/50/100G, nomem */ + {0x6409, "Chelsio T6210-BT"}, /* 2 x 10GBASE-T */ {0x640d, "Chelsio T62100-CR"}, /* 2 x 40/50/100G */ - {0x6410, "Chelsio T62100-DBG"}, /* 2 x 40/50/100G, debug */ + {0x6410, "Chelsio T6-DBG-100"}, /* 2 x 40/50/100G, debug */ + {0x6411, "Chelsio T6225-LL-CR"}, /* 2 x 10/25G */ + {0x6414, "Chelsio T61100-OCP-SO"}, /* 1 x 40/50/100G, nomem */ + {0x6415, "Chelsio T6201-BT"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6480, "Chelsio T6225 80"}, + {0x6481, "Chelsio T62100 81"}, }; #ifdef TCP_OFFLOAD Modified: stable/11/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_vf.c Thu May 25 00:43:56 2017 (r318842) +++ stable/11/sys/dev/cxgbe/t4_vf.c Thu May 25 01:00:57 2017 (r318843) @@ -112,11 +112,25 @@ struct { {0x5813, "Chelsio T580-CHR VF"}, #endif }, t6vf_pciids[] = { + {0x6800, "Chelsio T6-DBG-25 VF"}, /* 2 x 10/25G, debug */ {0x6801, "Chelsio T6225-CR VF"}, /* 2 x 10/25G */ {0x6802, "Chelsio T6225-SO-CR VF"}, /* 2 x 10/25G, nomem */ + {0x6803, "Chelsio T6425-CR VF"}, /* 4 x 10/25G */ + {0x6804, "Chelsio T6425-SO-CR VF"}, /* 4 x 10/25G, nomem */ + {0x6805, "Chelsio T6225-OCP-SO VF"}, /* 2 x 10/25G, nomem */ + {0x6806, "Chelsio T62100-OCP-SO VF"}, /* 2 x 40/50/100G, nomem */ {0x6807, "Chelsio T62100-LP-CR VF"}, /* 2 x 40/50/100G */ {0x6808, "Chelsio T62100-SO-CR VF"}, /* 2 x 40/50/100G, nomem */ + {0x6809, "Chelsio T6210-BT VF"}, /* 2 x 10GBASE-T */ {0x680d, "Chelsio T62100-CR VF"}, /* 2 x 40/50/100G */ + {0x6810, "Chelsio T6-DBG-100 VF"}, /* 2 x 40/50/100G, debug */ + {0x6811, "Chelsio T6225-LL-CR VF"}, /* 2 x 10/25G */ + {0x6814, "Chelsio T61100-OCP-SO VF"}, /* 1 x 40/50/100G, nomem */ + {0x6815, "Chelsio T6201-BT VF"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6880, "Chelsio T6225 80 VF"}, + {0x6881, "Chelsio T62100 81 VF"}, }; static d_ioctl_t t4vf_ioctl; From owner-svn-src-stable-11@freebsd.org Thu May 25 01:09:47 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3EF2D80E71; Thu, 25 May 2017 01:09:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C32F41154; Thu, 25 May 2017 01:09:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P19j7p020395; Thu, 25 May 2017 01:09:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P19j2r020394; Thu, 25 May 2017 01:09:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705250109.v4P19j2r020394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 May 2017 01:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318845 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:09:47 -0000 Author: markj Date: Thu May 25 01:09:45 2017 New Revision: 318845 URL: https://svnweb.freebsd.org/changeset/base/318845 Log: MFC r318191: Let ptracestop() suspend threads sleeping in an SBDRY section. Modified: stable/11/sys/kern/kern_sig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Thu May 25 01:01:35 2017 (r318844) +++ stable/11/sys/kern/kern_sig.c Thu May 25 01:09:45 2017 (r318845) @@ -2495,6 +2495,7 @@ sig_suspend_threads(struct thread *td, s PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); + MPASS(sending || td == curthread); wakeup_swapper = 0; FOREACH_THREAD_IN_PROC(p, td2) { @@ -2511,10 +2512,9 @@ sig_suspend_threads(struct thread *td, s */ KASSERT(!TD_IS_SUSPENDED(td2), ("thread with deferred stops suspended")); - if (TD_SBDRY_INTR(td2) && sending) { + if (TD_SBDRY_INTR(td2)) wakeup_swapper |= sleepq_abort(td2, TD_SBDRY_ERRNO(td2)); - } } else if (!TD_IS_SUSPENDED(td2)) { thread_suspend_one(td2); } From owner-svn-src-stable-11@freebsd.org Thu May 25 01:15:54 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5094D80618; Thu, 25 May 2017 01:15:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6B0E1AF0; Thu, 25 May 2017 01:15:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1Frie024642; Thu, 25 May 2017 01:15:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1FrNd024640; Thu, 25 May 2017 01:15:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705250115.v4P1FrNd024640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 May 2017 01:15:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318847 - in stable/11/sys: dev/drm2/ttm kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:15:54 -0000 Author: markj Date: Thu May 25 01:15:53 2017 New Revision: 318847 URL: https://svnweb.freebsd.org/changeset/base/318847 Log: MFC r318476, r318478: Fix up some kern_yield() usages. Modified: stable/11/sys/dev/drm2/ttm/ttm_bo_vm.c stable/11/sys/kern/kern_fail.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- stable/11/sys/dev/drm2/ttm/ttm_bo_vm.c Thu May 25 01:14:34 2017 (r318846) +++ stable/11/sys/dev/drm2/ttm/ttm_bo_vm.c Thu May 25 01:15:53 2017 (r318847) @@ -126,7 +126,7 @@ reserve: ret = ttm_bo_reserve(bo, false, false, false, 0); if (unlikely(ret != 0)) { if (ret == -EBUSY) { - kern_yield(0); + kern_yield(PRI_USER); goto reserve; } } @@ -139,7 +139,7 @@ reserve: case -EBUSY: case -ERESTARTSYS: case -EINTR: - kern_yield(0); + kern_yield(PRI_USER); goto reserve; default: retval = VM_PAGER_ERROR; Modified: stable/11/sys/kern/kern_fail.c ============================================================================== --- stable/11/sys/kern/kern_fail.c Thu May 25 01:14:34 2017 (r318846) +++ stable/11/sys/kern/kern_fail.c Thu May 25 01:15:53 2017 (r318847) @@ -612,7 +612,7 @@ fail_point_eval_nontrivial(struct fail_p break; case FAIL_POINT_YIELD: - kern_yield(-1); + kern_yield(PRI_UNCHANGED); break; case FAIL_POINT_DELAY: From owner-svn-src-stable-11@freebsd.org Thu May 25 01:14:35 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87C43D804A6; Thu, 25 May 2017 01:14:35 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57EA41869; Thu, 25 May 2017 01:14:35 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1EYLb024412; Thu, 25 May 2017 01:14:34 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1EYkO024410; Thu, 25 May 2017 01:14:34 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250114.v4P1EYkO024410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318846 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:14:35 -0000 Author: np Date: Thu May 25 01:14:34 2017 New Revision: 318846 URL: https://svnweb.freebsd.org/changeset/base/318846 Log: MFC r318124: ip6_output runs with the inp lock held, just like ip_output. Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Thu May 25 01:09:45 2017 (r318845) +++ stable/11/sys/netinet6/ip6_output.c Thu May 25 01:14:34 2017 (r318846) @@ -324,6 +324,7 @@ ip6_output(struct mbuf *m0, struct ip6_p uint32_t id; if (inp != NULL) { + INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); if ((flags & IP_NODEFAULTFLOWID) == 0) { /* unconditionally set flowid */ From owner-svn-src-stable-11@freebsd.org Thu May 25 01:17:08 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 869E5D80771; Thu, 25 May 2017 01:17:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 557D01C54; Thu, 25 May 2017 01:17:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1H7di024773; Thu, 25 May 2017 01:17:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1H7EJ024772; Thu, 25 May 2017 01:17:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705250117.v4P1H7EJ024772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 May 2017 01:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318848 - stable/11/sys/dev/drm2/ttm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:17:08 -0000 Author: markj Date: Thu May 25 01:17:07 2017 New Revision: 318848 URL: https://svnweb.freebsd.org/changeset/base/318848 Log: MFC r318479: Don't bother enqueuing a page immediately before freeing it. Modified: stable/11/sys/dev/drm2/ttm/ttm_page_alloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/drm2/ttm/ttm_page_alloc.c ============================================================================== --- stable/11/sys/dev/drm2/ttm/ttm_page_alloc.c Thu May 25 01:15:53 2017 (r318847) +++ stable/11/sys/dev/drm2/ttm/ttm_page_alloc.c Thu May 25 01:17:07 2017 (r318848) @@ -136,7 +136,7 @@ ttm_vm_page_free(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("ttm got unmanaged %p", m)); m->flags &= ~PG_FICTITIOUS; m->oflags |= VPO_UNMANAGED; - vm_page_unwire(m, PQ_INACTIVE); + vm_page_unwire(m, PQ_NONE); vm_page_free(m); } From owner-svn-src-stable-11@freebsd.org Thu May 25 01:31:14 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DB59D7C794; Thu, 25 May 2017 01:31:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE933199D; Thu, 25 May 2017 01:31:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1VCkn031788; Thu, 25 May 2017 01:31:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1VCX3031787; Thu, 25 May 2017 01:31:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250131.v4P1VCX3031787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318849 - in stable: 10/release 11/release X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:31:14 -0000 Author: gjb Date: Thu May 25 01:31:12 2017 New Revision: 318849 URL: https://svnweb.freebsd.org/changeset/base/318849 Log: MFC r308737, r308779: r308737: Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwise mkimg(1) does not create the second partition after r307008. r308779: Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh for the vm-image target, missed in r308737. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/Makefile.vm Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/Makefile.vm Directory Properties: stable/10/ (props changed) Modified: stable/11/release/Makefile.vm ============================================================================== --- stable/11/release/Makefile.vm Thu May 25 01:17:07 2017 (r318848) +++ stable/11/release/Makefile.vm Thu May 25 01:31:12 2017 (r318849) @@ -55,7 +55,7 @@ ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:t cw-${_CW:tl}: mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ @@ -89,7 +89,7 @@ vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . for FORMAT in ${VMFORMATS} mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ From owner-svn-src-stable-11@freebsd.org Thu May 25 01:40:43 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23240D800EF; Thu, 25 May 2017 01:40:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E127116AF; Thu, 25 May 2017 01:40:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1egnr033930; Thu, 25 May 2017 01:40:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1ef4t033921; Thu, 25 May 2017 01:40:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250140.v4P1ef4t033921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318850 - in stable/11/sys: conf dev/cxgbe dev/cxgbe/common modules/cxgbe/if_cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:40:43 -0000 Author: np Date: Thu May 25 01:40:40 2017 New Revision: 318850 URL: https://svnweb.freebsd.org/changeset/base/318850 Log: MFC r317702, r317847, r318307 r317702: cxgbe(4): Support routines for Tx traffic scheduling. - Create a new file, t4_sched.c, and move all of the code related to traffic management from t4_main.c and t4_sge.c to this file. - Track both Channel Rate Limiter (ch_rl) and Class Rate Limiter (cl_rl) parameters in the PF driver. - Initialize all the cl_rl limiters with somewhat arbitrary default rates and provide routines to update them on the fly. - Provide routines to reserve and release traffic classes. r317847: cxgbe(4): The Tx scheduler initialization either works or doesn't. It doesn't need a refresh in either case. r318307: cxgbe(4): Avoid an out of bounds access when an attempt to unbind a tx queue from a traffic class fails. Sponsored by: Chelsio Communications Added: stable/11/sys/dev/cxgbe/t4_sched.c - copied, changed from r317702, head/sys/dev/cxgbe/t4_sched.c Modified: stable/11/sys/conf/files stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/common/common.h stable/11/sys/dev/cxgbe/common/t4_hw.c stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_sge.c stable/11/sys/dev/cxgbe/t4_vf.c stable/11/sys/modules/cxgbe/if_cxgbe/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/conf/files Thu May 25 01:40:40 2017 (r318850) @@ -1269,6 +1269,8 @@ dev/cxgbe/t4_main.c optional cxgbe pci compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/t4_sched.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sge.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_l2t.c optional cxgbe pci \ Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/adapter.h Thu May 25 01:40:40 2017 (r318850) @@ -231,15 +231,36 @@ struct vi_info { uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ }; +struct tx_ch_rl_params { + enum fw_sched_params_rate ratemode; /* %port (REL) or kbps (ABS) */ + uint32_t maxrate; +}; + enum { - /* tx_sched_class flags */ - TX_SC_OK = (1 << 0), /* Set up in hardware, active. */ + TX_CLRL_REFRESH = (1 << 0), /* Need to update hardware state. */ + TX_CLRL_ERROR = (1 << 1), /* Error, hardware state unknown. */ }; -struct tx_sched_class { +struct tx_cl_rl_params { int refcount; - int flags; - struct t4_sched_class_params params; + u_int flags; + enum fw_sched_params_rate ratemode; /* %port REL or ABS value */ + enum fw_sched_params_unit rateunit; /* kbps or pps (when ABS) */ + enum fw_sched_params_mode mode; /* aggr or per-flow */ + uint32_t maxrate; + uint16_t pktsize; +}; + +/* Tx scheduler parameters for a channel/port */ +struct tx_sched_params { + /* Channel Rate Limiter */ + struct tx_ch_rl_params ch_rl; + + /* Class WRR */ + /* XXX */ + + /* Class Rate Limiter */ + struct tx_cl_rl_params cl_rl[]; }; struct port_info { @@ -251,7 +272,7 @@ struct port_info { int up_vis; int uld_vis; - struct tx_sched_class *tc; /* traffic classes for this channel */ + struct tx_sched_params *sched_params; struct mtx pi_lock; char lockname[16]; @@ -825,6 +846,9 @@ struct adapter { struct memwin memwin[NUM_MEMWIN]; /* memory windows */ + struct mtx tc_lock; + struct task tc_task; + const char *last_op; const void *last_op_thr; int last_op_flags; @@ -1106,8 +1130,6 @@ int t4_detach_common(device_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int t4_map_bars_0_and_4(struct adapter *); int t4_map_bar_2(struct adapter *); -int t4_set_sched_class(struct adapter *, struct t4_sched_params *); -int t4_set_sched_queue(struct adapter *, struct t4_sched_queue *); int t4_setup_intr_handlers(struct adapter *); void t4_sysctls(struct adapter *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); @@ -1168,6 +1190,15 @@ int t4_set_tracer(struct adapter *, stru int t4_trace_pkt(struct sge_iq *, const struct rss_header *, struct mbuf *); int t5_trace_pkt(struct sge_iq *, const struct rss_header *, struct mbuf *); +/* t4_sched.c */ +int t4_set_sched_class(struct adapter *, struct t4_sched_params *); +int t4_set_sched_queue(struct adapter *, struct t4_sched_queue *); +int t4_init_tx_sched(struct adapter *); +int t4_free_tx_sched(struct adapter *); +void t4_update_tx_sched(struct adapter *); +int t4_reserve_cl_rl_kbps(struct adapter *, int, u_int, int *); +void t4_release_cl_rl_kbps(struct adapter *, int, int); + static inline struct wrqe * alloc_wrqe(int wr_len, struct sge_wrq *wrq) { Modified: stable/11/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/common.h Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/common/common.h Thu May 25 01:40:40 2017 (r318850) @@ -774,6 +774,13 @@ int t4_sched_params(struct adapter *adap int rateunit, int ratemode, int channel, int cl, int minrate, int maxrate, int weight, int pktsize, int sleep_ok); +int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode, + unsigned int maxrate, int sleep_ok); +int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl, + int weight, int sleep_ok); +int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl, + int mode, unsigned int maxrate, int pktsize, + int sleep_ok); int t4_config_watchdog(struct adapter *adapter, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int timeout, unsigned int action); Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Thu May 25 01:40:40 2017 (r318850) @@ -9396,6 +9396,79 @@ int t4_sched_params(struct adapter *adap NULL, sleep_ok); } +int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode, + unsigned int maxrate, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CH_RL; + cmd.u.params.ch = channel; + cmd.u.params.rate = ratemode; /* REL or ABS */ + cmd.u.params.max = cpu_to_be32(maxrate);/* % or kbps */ + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + +int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl, + int weight, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + if (weight < 0 || weight > 100) + return -EINVAL; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CL_WRR; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.weight = cpu_to_be16(weight); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + +int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl, + int mode, unsigned int maxrate, int pktsize, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CL_RL; + cmd.u.params.mode = mode; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.unit = FW_SCHED_PARAMS_UNIT_BITRATE; + cmd.u.params.rate = FW_SCHED_PARAMS_RATE_ABS; + cmd.u.params.max = cpu_to_be32(maxrate); + cmd.u.params.pktsize = cpu_to_be16(pktsize); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + /* * t4_config_watchdog - configure (enable/disable) a watchdog timer * @adapter: the adapter Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:40:40 2017 (r318850) @@ -1010,9 +1010,6 @@ t4_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - pi->tc = malloc(sizeof(struct tx_sched_class) * - sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (port_top_speed(pi) >= 10) { n10g++; } else { @@ -1100,6 +1097,7 @@ t4_attach(device_t dev) M_ZERO | M_WAITOK); t4_init_l2t(sc, M_WAITOK); + t4_init_tx_sched(sc); /* * Second pass over the ports. This time we know the number of rx and @@ -1324,6 +1322,9 @@ t4_detach_common(device_t dev) for (i = 0; i < sc->intr_count; i++) t4_free_irq(sc, &sc->irq[i]); + if ((sc->flags & (IS_VF | FW_OK)) == FW_OK) + t4_free_tx_sched(sc); + for (i = 0; i < MAX_NPORTS; i++) { pi = sc->port[i]; if (pi) { @@ -1333,7 +1334,6 @@ t4_detach_common(device_t dev) mtx_destroy(&pi->pi_lock); free(pi->vi, M_CXGBE); - free(pi->tc, M_CXGBE); free(pi, M_CXGBE); } } @@ -5350,9 +5350,9 @@ cxgbe_sysctls(struct port_info *pi) * dev.(cxgbe|cxl).X.tc. */ oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "tc", CTLFLAG_RD, NULL, - "Tx scheduler traffic classes"); + "Tx scheduler traffic classes (cl_rl)"); for (i = 0; i < sc->chip_params->nsched_cls; i++) { - struct tx_sched_class *tc = &pi->tc[i]; + struct tx_cl_rl_params *tc = &pi->sched_params->cl_rl[i]; snprintf(name, sizeof(name), "%d", i); children2 = SYSCTL_CHILDREN(SYSCTL_ADD_NODE(ctx, @@ -7867,10 +7867,9 @@ static int sysctl_tc_params(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; - struct tx_sched_class *tc; - struct t4_sched_class_params p; + struct tx_cl_rl_params tc; struct sbuf *sb; - int i, rc, port_id, flags, mbps, gbps; + int i, rc, port_id, mbps, gbps; rc = sysctl_wire_old_buffer(req, 0); if (rc != 0) @@ -7885,52 +7884,34 @@ sysctl_tc_params(SYSCTL_HANDLER_ARGS) MPASS(sc->port[port_id] != NULL); i = arg2 & 0xffff; MPASS(i < sc->chip_params->nsched_cls); - tc = &sc->port[port_id]->tc[i]; - - rc = begin_synchronized_op(sc, NULL, HOLD_LOCK | SLEEP_OK | INTR_OK, - "t4tc_p"); - if (rc) - goto done; - flags = tc->flags; - p = tc->params; - end_synchronized_op(sc, LOCK_HELD); - if ((flags & TX_SC_OK) == 0) { - sbuf_printf(sb, "none"); - goto done; - } + mtx_lock(&sc->tc_lock); + tc = sc->port[port_id]->sched_params->cl_rl[i]; + mtx_unlock(&sc->tc_lock); - if (p.level == SCHED_CLASS_LEVEL_CL_WRR) { - sbuf_printf(sb, "cl-wrr weight %u", p.weight); - goto done; - } else if (p.level == SCHED_CLASS_LEVEL_CL_RL) - sbuf_printf(sb, "cl-rl"); - else if (p.level == SCHED_CLASS_LEVEL_CH_RL) - sbuf_printf(sb, "ch-rl"); - else { - rc = ENXIO; + if (tc.flags & TX_CLRL_ERROR) { + sbuf_printf(sb, "error"); goto done; } - if (p.ratemode == SCHED_CLASS_RATEMODE_REL) { + if (tc.ratemode == SCHED_CLASS_RATEMODE_REL) { /* XXX: top speed or actual link speed? */ gbps = port_top_speed(sc->port[port_id]); - sbuf_printf(sb, " %u%% of %uGbps", p.maxrate, gbps); - } - else if (p.ratemode == SCHED_CLASS_RATEMODE_ABS) { - switch (p.rateunit) { + sbuf_printf(sb, " %u%% of %uGbps", tc.maxrate, gbps); + } else if (tc.ratemode == SCHED_CLASS_RATEMODE_ABS) { + switch (tc.rateunit) { case SCHED_CLASS_RATEUNIT_BITS: - mbps = p.maxrate / 1000; - gbps = p.maxrate / 1000000; - if (p.maxrate == gbps * 1000000) + mbps = tc.maxrate / 1000; + gbps = tc.maxrate / 1000000; + if (tc.maxrate == gbps * 1000000) sbuf_printf(sb, " %uGbps", gbps); - else if (p.maxrate == mbps * 1000) + else if (tc.maxrate == mbps * 1000) sbuf_printf(sb, " %uMbps", mbps); else - sbuf_printf(sb, " %uKbps", p.maxrate); + sbuf_printf(sb, " %uKbps", tc.maxrate); break; case SCHED_CLASS_RATEUNIT_PKTS: - sbuf_printf(sb, " %upps", p.maxrate); + sbuf_printf(sb, " %upps", tc.maxrate); break; default: rc = ENXIO; @@ -7938,7 +7919,7 @@ sysctl_tc_params(SYSCTL_HANDLER_ARGS) } } - switch (p.mode) { + switch (tc.mode) { case SCHED_CLASS_MODE_CLASS: sbuf_printf(sb, " aggregate"); break; @@ -8840,225 +8821,6 @@ read_i2c(struct adapter *sc, struct t4_i return (rc); } -static int -in_range(int val, int lo, int hi) -{ - - return (val < 0 || (val <= hi && val >= lo)); -} - -static int -set_sched_class_config(struct adapter *sc, int minmax) -{ - int rc; - - if (minmax < 0) - return (EINVAL); - - rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4sscc"); - if (rc) - return (rc); - rc = -t4_sched_config(sc, FW_SCHED_TYPE_PKTSCHED, minmax, 1); - end_synchronized_op(sc, 0); - - return (rc); -} - -static int -set_sched_class_params(struct adapter *sc, struct t4_sched_class_params *p, - int sleep_ok) -{ - int rc, top_speed, fw_level, fw_mode, fw_rateunit, fw_ratemode; - struct port_info *pi; - struct tx_sched_class *tc; - - if (p->level == SCHED_CLASS_LEVEL_CL_RL) - fw_level = FW_SCHED_PARAMS_LEVEL_CL_RL; - else if (p->level == SCHED_CLASS_LEVEL_CL_WRR) - fw_level = FW_SCHED_PARAMS_LEVEL_CL_WRR; - else if (p->level == SCHED_CLASS_LEVEL_CH_RL) - fw_level = FW_SCHED_PARAMS_LEVEL_CH_RL; - else - return (EINVAL); - - if (p->mode == SCHED_CLASS_MODE_CLASS) - fw_mode = FW_SCHED_PARAMS_MODE_CLASS; - else if (p->mode == SCHED_CLASS_MODE_FLOW) - fw_mode = FW_SCHED_PARAMS_MODE_FLOW; - else - return (EINVAL); - - if (p->rateunit == SCHED_CLASS_RATEUNIT_BITS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; - else if (p->rateunit == SCHED_CLASS_RATEUNIT_PKTS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE; - else - return (EINVAL); - - if (p->ratemode == SCHED_CLASS_RATEMODE_REL) - fw_ratemode = FW_SCHED_PARAMS_RATE_REL; - else if (p->ratemode == SCHED_CLASS_RATEMODE_ABS) - fw_ratemode = FW_SCHED_PARAMS_RATE_ABS; - else - return (EINVAL); - - /* Vet our parameters ... */ - if (!in_range(p->channel, 0, sc->chip_params->nchan - 1)) - return (ERANGE); - - pi = sc->port[sc->chan_map[p->channel]]; - if (pi == NULL) - return (ENXIO); - MPASS(pi->tx_chan == p->channel); - top_speed = port_top_speed(pi) * 1000000; /* Gbps -> Kbps */ - - if (!in_range(p->cl, 0, sc->chip_params->nsched_cls) || - !in_range(p->minrate, 0, top_speed) || - !in_range(p->maxrate, 0, top_speed) || - !in_range(p->weight, 0, 100)) - return (ERANGE); - - /* - * Translate any unset parameters into the firmware's - * nomenclature and/or fail the call if the parameters - * are required ... - */ - if (p->rateunit < 0 || p->ratemode < 0 || p->channel < 0 || p->cl < 0) - return (EINVAL); - - if (p->minrate < 0) - p->minrate = 0; - if (p->maxrate < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) - return (EINVAL); - else - p->maxrate = 0; - } - if (p->weight < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_WRR) - return (EINVAL); - else - p->weight = 0; - } - if (p->pktsize < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) - return (EINVAL); - else - p->pktsize = 0; - } - - rc = begin_synchronized_op(sc, NULL, - sleep_ok ? (SLEEP_OK | INTR_OK) : HOLD_LOCK, "t4sscp"); - if (rc) - return (rc); - tc = &pi->tc[p->cl]; - tc->params = *p; - rc = -t4_sched_params(sc, FW_SCHED_TYPE_PKTSCHED, fw_level, fw_mode, - fw_rateunit, fw_ratemode, p->channel, p->cl, p->minrate, p->maxrate, - p->weight, p->pktsize, sleep_ok); - if (rc == 0) - tc->flags |= TX_SC_OK; - else { - /* - * Unknown state at this point, see tc->params for what was - * attempted. - */ - tc->flags &= ~TX_SC_OK; - } - end_synchronized_op(sc, sleep_ok ? 0 : LOCK_HELD); - - return (rc); -} - -int -t4_set_sched_class(struct adapter *sc, struct t4_sched_params *p) -{ - - if (p->type != SCHED_CLASS_TYPE_PACKET) - return (EINVAL); - - if (p->subcmd == SCHED_CLASS_SUBCMD_CONFIG) - return (set_sched_class_config(sc, p->u.config.minmax)); - - if (p->subcmd == SCHED_CLASS_SUBCMD_PARAMS) - return (set_sched_class_params(sc, &p->u.params, 1)); - - return (EINVAL); -} - -int -t4_set_sched_queue(struct adapter *sc, struct t4_sched_queue *p) -{ - struct port_info *pi = NULL; - struct vi_info *vi; - struct sge_txq *txq; - uint32_t fw_mnem, fw_queue, fw_class; - int i, rc; - - rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4setsq"); - if (rc) - return (rc); - - if (p->port >= sc->params.nports) { - rc = EINVAL; - goto done; - } - - /* XXX: Only supported for the main VI. */ - pi = sc->port[p->port]; - vi = &pi->vi[0]; - if (!(vi->flags & VI_INIT_DONE)) { - /* tx queues not set up yet */ - rc = EAGAIN; - goto done; - } - - if (!in_range(p->queue, 0, vi->ntxq - 1) || - !in_range(p->cl, 0, sc->chip_params->nsched_cls - 1)) { - rc = EINVAL; - goto done; - } - - /* - * Create a template for the FW_PARAMS_CMD mnemonic and value (TX - * Scheduling Class in this case). - */ - fw_mnem = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | - V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH)); - fw_class = p->cl < 0 ? 0xffffffff : p->cl; - - /* - * If op.queue is non-negative, then we're only changing the scheduling - * on a single specified TX queue. - */ - if (p->queue >= 0) { - txq = &sc->sge.txq[vi->first_txq + p->queue]; - fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); - rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, - &fw_class); - goto done; - } - - /* - * Change the scheduling on all the TX queues for the - * interface. - */ - for_each_txq(vi, i, txq) { - fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); - rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, - &fw_class); - if (rc) - goto done; - } - - rc = 0; -done: - end_synchronized_op(sc, 0); - return (rc); -} - int t4_os_find_pci_capability(struct adapter *sc, int cap) { Copied and modified: stable/11/sys/dev/cxgbe/t4_sched.c (from r317702, head/sys/dev/cxgbe/t4_sched.c) ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Tue May 2 20:38:10 2017 (r317702, copy source) +++ stable/11/sys/dev/cxgbe/t4_sched.c Thu May 25 01:40:40 2017 (r318850) @@ -357,7 +357,6 @@ t4_init_tx_sched(struct adapter *sc) n * sizeof(*tc), M_CXGBE, M_ZERO | M_WAITOK); tc = &pi->sched_params->cl_rl[0]; for (j = 0; j < n; j++, tc++) { - tc->flags = TX_CLRL_REFRESH; tc->refcount = 0; tc->ratemode = FW_SCHED_PARAMS_RATE_ABS; tc->rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; @@ -365,8 +364,11 @@ t4_init_tx_sched(struct adapter *sc) tc->maxrate = init_kbps[min(j, nitems(init_kbps) - 1)]; tc->pktsize = ETHERMTU; /* XXX */ - t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, tc->mode, - tc->maxrate, tc->pktsize, 1); + if (t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, + tc->mode, tc->maxrate, tc->pktsize, 1) == 0) + tc->flags = 0; + else + tc->flags = TX_CLRL_ERROR; } } Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 01:40:40 2017 (r318850) @@ -5234,7 +5234,7 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) struct port_info *pi; struct adapter *sc; struct sge_txq *txq; - struct tx_sched_class *tc; + struct tx_cl_rl_params *tc; int qidx = arg2, rc, tc_idx; uint32_t fw_queue, fw_class; @@ -5248,14 +5248,14 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) if (rc != 0 || req->newptr == NULL) return (rc); + if (sc->flags & IS_VF) + return (EPERM); + /* Note that -1 is legitimate input (it means unbind). */ if (tc_idx < -1 || tc_idx >= sc->chip_params->nsched_cls) return (EINVAL); - rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4stc"); - if (rc) - return (rc); - + mtx_lock(&sc->tc_lock); if (tc_idx == txq->tc_idx) { rc = 0; /* No change, nothing to do. */ goto done; @@ -5269,35 +5269,45 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) fw_class = 0xffffffff; /* Unbind. */ else { /* - * Bind to a different class. Ethernet txq's are only allowed - * to bind to cl-rl mode-class for now. XXX: too restrictive. + * Bind to a different class. */ - tc = &pi->tc[tc_idx]; - if (tc->flags & TX_SC_OK && - tc->params.level == SCHED_CLASS_LEVEL_CL_RL && - tc->params.mode == SCHED_CLASS_MODE_CLASS) { - /* Ok to proceed. */ - fw_class = tc_idx; - } else { - rc = tc->flags & TX_SC_OK ? EBUSY : ENXIO; + tc = &pi->sched_params->cl_rl[tc_idx]; + if (tc->flags & TX_CLRL_ERROR) { + /* Previous attempt to set the cl-rl params failed. */ + rc = EIO; goto done; + } else { + /* + * Ok to proceed. Place a reference on the new class + * while still holding on to the reference on the + * previous class, if any. + */ + fw_class = tc_idx; + tc->refcount++; } } + mtx_unlock(&sc->tc_lock); + rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4stc"); + if (rc) + return (rc); rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, &fw_class); + end_synchronized_op(sc, 0); + + mtx_lock(&sc->tc_lock); if (rc == 0) { if (txq->tc_idx != -1) { - tc = &pi->tc[txq->tc_idx]; + tc = &pi->sched_params->cl_rl[txq->tc_idx]; MPASS(tc->refcount > 0); tc->refcount--; } - if (tc_idx != -1) { - tc = &pi->tc[tc_idx]; - tc->refcount++; - } txq->tc_idx = tc_idx; + } else if (tc_idx != -1) { + tc = &pi->sched_params->cl_rl[tc_idx]; + MPASS(tc->refcount > 0); + tc->refcount--; } done: - end_synchronized_op(sc, 0); + mtx_unlock(&sc->tc_lock); return (rc); } Modified: stable/11/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_vf.c Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/dev/cxgbe/t4_vf.c Thu May 25 01:40:40 2017 (r318850) @@ -673,9 +673,6 @@ t4vf_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - pi->tc = malloc(sizeof(struct tx_sched_class) * - sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (port_top_speed(pi) >= 10) { n10g++; } else { Modified: stable/11/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- stable/11/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 25 01:31:12 2017 (r318849) +++ stable/11/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 25 01:40:40 2017 (r318850) @@ -21,6 +21,7 @@ SRCS+= t4_l2t.c SRCS+= t4_main.c SRCS+= t4_mp_ring.c SRCS+= t4_netmap.c +SRCS+= t4_sched.c SRCS+= t4_sge.c SRCS+= t4_tracer.c From owner-svn-src-stable-11@freebsd.org Thu May 25 01:43:40 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D48AD80480; Thu, 25 May 2017 01:43:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B421C90; Thu, 25 May 2017 01:43:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1hdGc037911; Thu, 25 May 2017 01:43:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1hdtq037910; Thu, 25 May 2017 01:43:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250143.v4P1hdtq037910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318852 - stable/11/usr.sbin/efivar X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:43:40 -0000 Author: gjb Date: Thu May 25 01:43:39 2017 New Revision: 318852 URL: https://svnweb.freebsd.org/changeset/base/318852 Log: MFC r318599, r318643: r318599 (bjk): Updates for efivar.8 Fix spelling, appease igor and mandoc -Tlint, and adopt the language style to be more consistent with our corpus. r318643: Correct the "first appeared in" version for efivar(8). Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/efivar/efivar.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/efivar/efivar.8 ============================================================================== --- stable/11/usr.sbin/efivar/efivar.8 Thu May 25 01:43:28 2017 (r318851) +++ stable/11/usr.sbin/efivar/efivar.8 Thu May 25 01:43:39 2017 (r318852) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2017 +.Dd May 22, 2017 .Dt EFIVAR 8 .Os .Sh NAME .Nm efivar -.Nd UEFI environemnt variable interaction +.Nd UEFI environment variable interaction .Sh SYNOPSIS .Nm .Op Fl abdDHlLNpRtw @@ -58,7 +58,7 @@ This program manages .Pq UEFI environment variables. UEFI variables have three part: A namespace, a name and a value. -The namespace is a GUID that's self assigned by the group defining the +The namespace is a GUID that is self assigned by the group defining the variables. The name is a Unicode name for the variable. The value is binary data. @@ -70,7 +70,7 @@ The following options are available: Specify the name of the variable to operate on. The .Ar name -argument is the GUID of variable, followed by a dash, followed by the +argument is the GUID of the variable, followed by a dash, followed by the UEFI variable name. The GUID may be in numeric format, or may be one of the well known symbolic name (see @@ -86,19 +86,19 @@ This flag implies unless the .Fl -append flag is given. -This is not well understood and currently unimplemented. +This behavior is not well understood and is currently unimplemented. .It Fl a Fl -append Append the specified value to the UEFI variable rather than replacing -it.p +it. .It Fl t Ar attr Fl -attributes Ar attr -Specify, in user hostile hexidecimal, the attributes for this +Specify, in hexadecimal, the attributes for this variable. See section 7.2 (GetVariable subsection, Related Definitions) of the UEFI Specification for hex values to use. .It Fl A Fl -ascii Display the variable data as modified ascii: All printable characters are printed, while unprintable characters are rendered as a two-digit -hexadecimal number preceeded by a % character. +hexadecimal number preceded by a % character. .It Fl b Fl -binary Display the variable data as binary data. Usually will be used with the @@ -155,31 +155,29 @@ can be used to specify simple strings. Display the .Ar name environment variable. +.El .Sh COMPATIBILITY The .Nm -program is intended to be compatible (strict superset) with a progam -of the same name included in the Red Hat libefivar package. -.Pp -Except the +program is intended to be compatible (strict superset) with a program +of the same name included in the Red Hat libefivar package, +but the .Fl d and .Fl -print-decimal -flags are not implmenented and never will be. +flags are not implemented and never will be. +.Pp The .Fl d -flag is a short-hand for +flag is short for .Fl -device-path . .Sh SEE ALSO Appendix A of the UEFI specification has the format for GUIDs. All GUIDs .Dq Globally Unique Identifiers have the format described in RFC 4122. -.El -.Pp -.Xr efivar 8 .Sh HISTORY The .Nm utility first appeared in -.Fx 12.0 . +.Fx 11.1 . From owner-svn-src-stable-11@freebsd.org Thu May 25 01:45:45 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09B0BD806DF; Thu, 25 May 2017 01:45:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B43691213; Thu, 25 May 2017 01:45:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1jhiD038235; Thu, 25 May 2017 01:45:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1jhP1038233; Thu, 25 May 2017 01:45:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250145.v4P1jhP1038233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318853 - in stable: 10/release 10/release/scripts 11/release 11/release/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:45:45 -0000 Author: gjb Date: Thu May 25 01:45:43 2017 New Revision: 318853 URL: https://svnweb.freebsd.org/changeset/base/318853 Log: MFC r318646: Allow PORTSDIR to be overridden in the pkg-stage target. PR: 218393 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/Makefile stable/11/release/scripts/pkg-stage.sh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/Makefile stable/10/release/scripts/pkg-stage.sh Directory Properties: stable/10/ (props changed) Modified: stable/11/release/Makefile ============================================================================== --- stable/11/release/Makefile Thu May 25 01:43:39 2017 (r318852) +++ stable/11/release/Makefile Thu May 25 01:45:43 2017 (r318853) @@ -266,7 +266,7 @@ packagesystem: base.txz kernel.txz ${EXT pkg-stage: .if !defined(NOPKG) - env REPOS_DIR=${.CURDIR}/pkg_repos/ \ + env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ sh ${.CURDIR}/scripts/pkg-stage.sh mkdir -p ${.OBJDIR}/dvd/packages/repos/ cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ Modified: stable/11/release/scripts/pkg-stage.sh ============================================================================== --- stable/11/release/scripts/pkg-stage.sh Thu May 25 01:43:39 2017 (r318852) +++ stable/11/release/scripts/pkg-stage.sh Thu May 25 01:45:43 2017 (r318853) @@ -10,6 +10,7 @@ export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" +export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES="archivers/unzip devel/subversion @@ -33,8 +34,8 @@ x11/kde4 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). -if [ ! -f /usr/ports/Makefile ]; then - echo "*** /usr/ports is missing! ***" +if [ ! -f ${PORTSDIR}/Makefile ]; then + echo "*** ${PORTSDIR} is missing! ***" echo "*** Skipping pkg-stage.sh ***" echo "*** Unset NOPORTS to fix this ***" exit 0 @@ -42,7 +43,7 @@ fi if [ ! -x /usr/local/sbin/pkg ]; then /etc/rc.d/ldconfig restart - /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean + /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean fi export DVD_DIR="dvd/packages" @@ -58,7 +59,7 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "/usr/ports/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else echo "*** Skipping nonexistent port: ${_P}" From owner-svn-src-stable-11@freebsd.org Thu May 25 02:00:00 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86779D8011B; Thu, 25 May 2017 02:00:00 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60E891236; Thu, 25 May 2017 02:00:00 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1xxi6043558; Thu, 25 May 2017 01:59:59 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1xxDK043555; Thu, 25 May 2017 01:59:59 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250159.v4P1xxDK043555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318854 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 02:00:00 -0000 Author: np Date: Thu May 25 01:59:58 2017 New Revision: 318854 URL: https://svnweb.freebsd.org/changeset/base/318854 Log: MFC r318014, r318091, r318125, and r318263. r318014: cxgbe(4): Fixes related to the knob that controls link autonegotiation. - Do not leak the adapter lock in sysctl_autoneg. - Accept only 0 or 1 as valid settings for autonegotiation. - A fixed speed must be requested by the driver when autonegotiation is disabled otherwise the firmware will reject the l1cfg command. Use the top speed supported by the port for now. r318091: cxgbe(4): Do not assume that if_qflush is always followed by inteface-down. r318125: Adjust whitespace and fix a comment. No functional change. r318263: cxgbe(4): netmap-only interrupts for a VI do not have an associated rxq or ofld_rxq and should be ignored by vi_intr_iq. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Thu May 25 01:45:43 2017 (r318853) +++ stable/11/sys/dev/cxgbe/adapter.h Thu May 25 01:59:58 2017 (r318854) @@ -204,11 +204,11 @@ struct vi_info { int first_intr; /* These need to be int as they are used in sysctl */ - int ntxq; /* # of tx queues */ - int first_txq; /* index of first tx queue */ - int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ - int nrxq; /* # of rx queues */ - int first_rxq; /* index of first rx queue */ + int ntxq; /* # of tx queues */ + int first_txq; /* index of first tx queue */ + int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ + int nrxq; /* # of rx queues */ + int first_rxq; /* index of first rx queue */ int nofldtxq; /* # of offload tx queues */ int first_ofld_txq; /* index of first offload tx queue */ int nofldrxq; /* # of offload rx queues */ @@ -399,6 +399,7 @@ enum { EQ_TYPEMASK = 0x3, /* 2 lsbits hold the type (see above) */ EQ_ALLOCATED = (1 << 2), /* firmware resources allocated */ EQ_ENABLED = (1 << 3), /* open for business */ + EQ_QFLUSH = (1 << 4), /* if_qflush in progress */ }; /* Listed in order of preference. Update t4_sysctls too if you change these */ @@ -704,7 +705,7 @@ struct sge_nm_txq { struct sge { int nrxq; /* total # of Ethernet rx queues */ - int ntxq; /* total # of Ethernet tx tx queues */ + int ntxq; /* total # of Ethernet tx queues */ int nofldrxq; /* total # of TOE rx queues */ int nofldtxq; /* total # of TOE tx queues */ int nnmrxq; /* total # of netmap rx queues */ @@ -1086,6 +1087,24 @@ port_top_speed(const struct port_info *p } static inline int +port_top_speed_raw(const struct port_info *pi) +{ + + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) + return (FW_PORT_CAP_SPEED_100G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) + return (FW_PORT_CAP_SPEED_40G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) + return (FW_PORT_CAP_SPEED_25G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) + return (FW_PORT_CAP_SPEED_10G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) + return (FW_PORT_CAP_SPEED_1G); + + return (0); +} + +static inline int tx_resume_threshold(struct sge_eq *eq) { Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:45:43 2017 (r318853) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu May 25 01:59:58 2017 (r318854) @@ -995,6 +995,7 @@ t4_attach(device_t dev) lc->autoneg = t4_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE; } + lc->requested_speed = port_top_speed_raw(pi); rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) { @@ -1868,12 +1869,15 @@ cxgbe_qflush(struct ifnet *ifp) if (vi->flags & VI_INIT_DONE) { for_each_txq(vi, i, txq) { TXQ_LOCK(txq); - txq->eq.flags &= ~EQ_ENABLED; + txq->eq.flags |= EQ_QFLUSH; TXQ_UNLOCK(txq); while (!mp_ring_is_idle(txq->r)) { mp_ring_check_drainage(txq->r, 0); pause("qflush", 1); } + TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_QFLUSH; + TXQ_UNLOCK(txq); } } if_qflush(ifp); @@ -5883,7 +5887,12 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) if ((lc->supported & FW_PORT_CAP_ANEG) == 0) return (ENOTSUP); - val = val ? AUTONEG_ENABLE : AUTONEG_DISABLE; + if (val == 0) + val = AUTONEG_DISABLE; + else if (val == 1) + val = AUTONEG_ENABLE; + else + return (EINVAL); if (lc->autoneg == val) return (0); /* no change */ @@ -5896,6 +5905,7 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) lc->autoneg = old; + end_synchronized_op(sc, 0); return (rc); } Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 01:45:43 2017 (r318853) +++ stable/11/sys/dev/cxgbe/t4_sge.c Thu May 25 01:59:58 2017 (r318854) @@ -960,6 +960,11 @@ vi_intr_iq(struct vi_info *vi, int idx) return (&sc->sge.fwq); nintr = vi->nintr; +#ifdef DEV_NETMAP + /* Do not consider any netmap-only interrupts */ + if (vi->flags & INTR_RXQ && vi->nnmrxq > vi->nrxq) + nintr -= vi->nnmrxq - vi->nrxq; +#endif KASSERT(nintr != 0, ("%s: vi %p has no exclusive interrupts, total interrupts = %d", __func__, vi, sc->intr_count)); @@ -2443,6 +2448,13 @@ cannot_use_txpkts(struct mbuf *m) return (needs_tso(m)); } +static inline int +discard_tx(struct sge_eq *eq) +{ + + return ((eq->flags & (EQ_ENABLED | EQ_QFLUSH)) != EQ_ENABLED); +} + /* * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to * be consumed. Return the actual number consumed. 0 indicates a stall. @@ -2468,7 +2480,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_ total = 0; TXQ_LOCK(txq); - if (__predict_false((eq->flags & EQ_ENABLED) == 0)) { + if (__predict_false(discard_tx(eq))) { while (cidx != pidx) { m0 = r->items[cidx]; m_freem(m0); From owner-svn-src-stable-11@freebsd.org Thu May 25 09:27:34 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E96CDD81A1A; Thu, 25 May 2017 09:27:34 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B96F81547; Thu, 25 May 2017 09:27:34 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P9RXgE029263; Thu, 25 May 2017 09:27:33 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P9RXPO029262; Thu, 25 May 2017 09:27:33 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201705250927.v4P9RXPO029262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Thu, 25 May 2017 09:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318864 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 09:27:35 -0000 Author: jlh Date: Thu May 25 09:27:33 2017 New Revision: 318864 URL: https://svnweb.freebsd.org/changeset/base/318864 Log: MFC r318863: Replace stale handbook URL with the proper one. Modified: stable/11/UPDATING Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Thu May 25 09:21:21 2017 (r318863) +++ stable/11/UPDATING Thu May 25 09:27:33 2017 (r318864) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. basically know what you are doing. If not, then please consult the FreeBSD handbook: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-stable-11@freebsd.org Thu May 25 10:47:19 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E775BD809DB; Thu, 25 May 2017 10:47:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B01B81FC4; Thu, 25 May 2017 10:47:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PAlIZa062260; Thu, 25 May 2017 10:47:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PAlIAi062259; Thu, 25 May 2017 10:47:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251047.v4PAlIAi062259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 10:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318866 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 10:47:20 -0000 Author: gjb Date: Thu May 25 10:47:18 2017 New Revision: 318866 URL: https://svnweb.freebsd.org/changeset/base/318866 Log: Document r318785, vfs.zfs.debug_flags -> vfs.zfs.debugflags rename. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 09:34:29 2017 (r318865) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 10:47:18 2017 (r318866) @@ -719,7 +719,10 @@ ZFS -   + The + vfs.zfs.debug_flags &man.sysctl.8; has been + deprecated in favor of + vfs.zfs.debugflags. From owner-svn-src-stable-11@freebsd.org Thu May 25 10:56:34 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90A1DD80D27; Thu, 25 May 2017 10:56:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 606BD167B; Thu, 25 May 2017 10:56:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PAuXgM066357; Thu, 25 May 2017 10:56:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PAuXAH066356; Thu, 25 May 2017 10:56:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251056.v4PAuXAH066356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 10:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318868 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 10:56:34 -0000 Author: gjb Date: Thu May 25 10:56:33 2017 New Revision: 318868 URL: https://svnweb.freebsd.org/changeset/base/318868 Log: Document r318660, various NFS client fixes. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 10:49:56 2017 (r318867) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 10:56:33 2017 (r318868) @@ -713,7 +713,13 @@ Networked Storage -   + The NFS client now + properly handles NFS4ERR_BAD_SESSION errors + received from an NFS server. Additionally, + the kernel RPC client has been updated to + prevent creating new TCP connections when + ERESTART is received from + &man.sosend.9;. From owner-svn-src-stable-11@freebsd.org Thu May 25 11:05:21 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 503EFD8115C; Thu, 25 May 2017 11:05:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F6B01BFB; Thu, 25 May 2017 11:05:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PB5K6t070250; Thu, 25 May 2017 11:05:20 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PB5K8s070249; Thu, 25 May 2017 11:05:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251105.v4PB5K8s070249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 11:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318870 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 11:05:21 -0000 Author: gjb Date: Thu May 25 11:05:19 2017 New Revision: 318870 URL: https://svnweb.freebsd.org/changeset/base/318870 Log: Document r312790, EC2 IPv6 by default. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 11:05:19 2017 (r318869) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 11:05:19 2017 (r318870) @@ -688,6 +688,10 @@ Support for synthetic keyboards has been added for virtual machines running on Microsoft® Hyper-V™. + + The &os; virtual machines provided on + Amazon® EC2™ now enable IPv6 by + default. From owner-svn-src-stable-11@freebsd.org Thu May 25 11:05:20 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68745D81156; Thu, 25 May 2017 11:05:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 317D61BFA; Thu, 25 May 2017 11:05:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PB5J2W070207; Thu, 25 May 2017 11:05:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PB5Juv070206; Thu, 25 May 2017 11:05:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251105.v4PB5Juv070206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 11:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318869 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 11:05:20 -0000 Author: gjb Date: Thu May 25 11:05:19 2017 New Revision: 318869 URL: https://svnweb.freebsd.org/changeset/base/318869 Log: Document r318660, Amazon EFS support in the NFS client. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 10:56:33 2017 (r318868) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 11:05:19 2017 (r318869) @@ -720,6 +720,10 @@ prevent creating new TCP connections when ERESTART is received from &man.sosend.9;. + + The NFS client now + supports the Amazon® Elastic File System™ + (EFS). From owner-svn-src-stable-11@freebsd.org Thu May 25 12:04:25 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 012EAD78D72; Thu, 25 May 2017 12:04:25 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6C251E30; Thu, 25 May 2017 12:04:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PC4NFi094759; Thu, 25 May 2017 12:04:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PC4Nv7094758; Thu, 25 May 2017 12:04:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705251204.v4PC4Nv7094758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 12:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318871 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 12:04:25 -0000 Author: gjb Date: Thu May 25 12:04:23 2017 New Revision: 318871 URL: https://svnweb.freebsd.org/changeset/base/318871 Log: Further expand the r318785 entry, noting vfs.zfs.debugflags can be set in loader.conf(5), whereas vfs.zfs.debug_flags could not. Submitted by: avg Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 11:05:19 2017 (r318870) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 25 12:04:23 2017 (r318871) @@ -736,7 +736,10 @@ The vfs.zfs.debug_flags &man.sysctl.8; has been deprecated in favor of - vfs.zfs.debugflags. + vfs.zfs.debugflags. Additionally, + vfs.zfs.debugflags can now be configured in + &man.loader.conf.5;, whereas + vfs.zfs.debug_flags could not. From owner-svn-src-stable-11@freebsd.org Thu May 25 16:15:20 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99469D81905; Thu, 25 May 2017 16:15:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 754D012E0; Thu, 25 May 2017 16:15:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PGFJbd098567; Thu, 25 May 2017 16:15:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PGFJZN098563; Thu, 25 May 2017 16:15:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705251615.v4PGFJZN098563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 25 May 2017 16:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318882 - in stable/11/contrib/llvm: include/llvm/MC lib/MC lib/Target/ARM/MCTargetDesc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 16:15:20 -0000 Author: dim Date: Thu May 25 16:15:19 2017 New Revision: 318882 URL: https://svnweb.freebsd.org/changeset/base/318882 Log: MFC r318655: Pull in r302416 from upstream llvm trunk (by Martin Storsjö): [ARM] Clear the constant pool cache on explicit .ltorg directives Multiple ldr pseudoinstructions with the same constant value will reuse the same constant pool entry. However, if the constant pool is explicitly flushed with a .ltorg directive, we should not try to reference constants in the previous pool any longer, since they may be out of range. This fixes assembling hand-written assembler source which repeatedly loads the same constant value, across a binary size larger than the pc-relative fixup range for ldr instructions (4096 bytes). Such assembler source already uses explicit .ltorg instructions to emit constant pools with regular intervals. However if we try to reuse constants emitted in earlier pools, they end up out of range. This makes the output of the testcase match what binutils gas does (prior to this patch, it would fail to assemble). Differential Revision: https://reviews.llvm.org/D32847 This should fix "out of range pc-relative fixup value" errors, when compiling certain ARM inline assembly for www/webkit-gtk[23]. Reported by: mmel Modified: stable/11/contrib/llvm/include/llvm/MC/ConstantPools.h stable/11/contrib/llvm/lib/MC/ConstantPools.cpp stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/include/llvm/MC/ConstantPools.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/MC/ConstantPools.h Thu May 25 14:54:22 2017 (r318881) +++ stable/11/contrib/llvm/include/llvm/MC/ConstantPools.h Thu May 25 16:15:19 2017 (r318882) @@ -60,6 +60,8 @@ public: // Return true if the constant pool is empty bool empty(); + + void clearCache(); }; class AssemblerConstantPools { @@ -83,6 +85,7 @@ class AssemblerConstantPools { public: void emitAll(MCStreamer &Streamer); void emitForCurrentSection(MCStreamer &Streamer); + void clearCacheForCurrentSection(MCStreamer &Streamer); const MCExpr *addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc); Modified: stable/11/contrib/llvm/lib/MC/ConstantPools.cpp ============================================================================== --- stable/11/contrib/llvm/lib/MC/ConstantPools.cpp Thu May 25 14:54:22 2017 (r318881) +++ stable/11/contrib/llvm/lib/MC/ConstantPools.cpp Thu May 25 16:15:19 2017 (r318882) @@ -54,6 +54,10 @@ const MCExpr *ConstantPool::addEntry(con bool ConstantPool::empty() { return Entries.empty(); } +void ConstantPool::clearCache() { + CachedEntries.clear(); +} + // // AssemblerConstantPools implementation // @@ -95,6 +99,13 @@ void AssemblerConstantPools::emitForCurr } } +void AssemblerConstantPools::clearCacheForCurrentSection(MCStreamer &Streamer) { + MCSection *Section = Streamer.getCurrentSectionOnly(); + if (ConstantPool *CP = getConstantPool(Section)) { + CP->clearCache(); + } +} + const MCExpr *AssemblerConstantPools::addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc) { Modified: stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Thu May 25 14:54:22 2017 (r318881) +++ stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Thu May 25 16:15:19 2017 (r318882) @@ -33,6 +33,7 @@ const MCExpr *ARMTargetStreamer::addCons void ARMTargetStreamer::emitCurrentConstantPool() { ConstantPools->emitForCurrentSection(Streamer); + ConstantPools->clearCacheForCurrentSection(Streamer); } // finish() - write out any non-empty assembler constant pools. From owner-svn-src-stable-11@freebsd.org Thu May 25 17:22:15 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43AF0D812DB; Thu, 25 May 2017 17:22:15 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B7F15FE; Thu, 25 May 2017 17:22:15 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PHMETK027218; Thu, 25 May 2017 17:22:14 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PHME9h027216; Thu, 25 May 2017 17:22:14 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705251722.v4PHME9h027216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 25 May 2017 17:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318885 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 17:22:15 -0000 Author: truckman Date: Thu May 25 17:22:13 2017 New Revision: 318885 URL: https://svnweb.freebsd.org/changeset/base/318885 Log: MFC r318511 The result of right shifting a negative signed value is implementation defined. On machines without arithmetic shift instructions, zero bits may be shifted in from the left, giving a large positive result instead of the desired divide-by power-of-2. Fix this by operating on the absolute value and compensating for the possible negation later. Reverse the order of the underflow/overflow tests and the exponential decay calculation to avoid the possibility of an erroneous overflow detection if p is a sufficiently small non-negative value. Also check for negative values of prob before doing the exponential decay to avoid another instance of of right shifting a negative value. Tested by: Rasool Al-Saadi Modified: stable/11/sys/netpfil/ipfw/dn_aqm_pie.c stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 16:41:07 2017 (r318884) +++ stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 17:22:13 2017 (r318885) @@ -206,6 +206,7 @@ calculate_drop_prob(void *x) int64_t p, prob, oldprob; struct dn_aqm_pie_parms *pprms; struct pie_status *pst = (struct pie_status *) x; + int p_isneg; pprms = pst->parms; prob = pst->drop_prob; @@ -221,6 +222,12 @@ calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -243,37 +250,47 @@ calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication overflow/underflow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; Modified: stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 16:41:07 2017 (r318884) +++ stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 17:22:13 2017 (r318885) @@ -377,6 +377,7 @@ fq_calculate_drop_prob(void *x) struct dn_aqm_pie_parms *pprms; int64_t p, prob, oldprob; aqm_time_t now; + int p_isneg; now = AQM_UNOW; pprms = pst->parms; @@ -393,6 +394,12 @@ fq_calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -415,37 +422,47 @@ fq_calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication over/under flow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; From owner-svn-src-stable-11@freebsd.org Thu May 25 18:55:11 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFBD3D8267E; Thu, 25 May 2017 18:55:11 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97189164C; Thu, 25 May 2017 18:55:11 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PItA1h066511; Thu, 25 May 2017 18:55:10 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PItAwY066510; Thu, 25 May 2017 18:55:10 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201705251855.v4PItAwY066510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Thu, 25 May 2017 18:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318893 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 18:55:11 -0000 Author: stevek Date: Thu May 25 18:55:10 2017 New Revision: 318893 URL: https://svnweb.freebsd.org/changeset/base/318893 Log: MFC r318314 Add information to open(2) man page about the O_VERIFY flag. PR: 219262 Reviewed by: bjk wblock Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Modified: stable/11/lib/libc/sys/open.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/open.2 ============================================================================== --- stable/11/lib/libc/sys/open.2 Thu May 25 18:46:13 2017 (r318892) +++ stable/11/lib/libc/sys/open.2 Thu May 25 18:55:10 2017 (r318893) @@ -119,6 +119,7 @@ O_NOCTTY ignored O_TTY_INIT ignored O_DIRECTORY error if file is not a directory O_CLOEXEC set FD_CLOEXEC upon open +O_VERIFY verify the contents of the file .Ed .Pp Opening a file with @@ -237,6 +238,15 @@ may be used to set .Dv FD_CLOEXEC flag for the newly returned file descriptor. .Pp +.Dv O_VERIFY +may be used to indicate to the kernel that the contents of the file should +be verified before allowing the open to proceed. +The details of what +.Dq verified +means is implementation specific. +The run-time linker (rtld) uses this flag to ensure shared objects have +been verified before operating on them. +.Pp If successful, .Fn open returns a non-negative integer, termed a file descriptor. From owner-svn-src-stable-11@freebsd.org Thu May 25 22:39:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDE2AD8076A; Thu, 25 May 2017 22:39:49 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 811321948; Thu, 25 May 2017 22:39:49 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PMdmn9060333; Thu, 25 May 2017 22:39:48 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PMdmQh060331; Thu, 25 May 2017 22:39:48 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705252239.v4PMdmQh060331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 25 May 2017 22:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318904 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 22:39:49 -0000 Author: truckman Date: Thu May 25 22:39:48 2017 New Revision: 318904 URL: https://svnweb.freebsd.org/changeset/base/318904 Log: MFC r318527 Fix the queue delay estimation in PIE/FQ-PIE when the timestamp (TS) method is used. When packet timestamp is used, the "current_qdelay" keeps storing the last queue delay value calculated in the dequeue function. Therefore, when a burst of packets arrives followed by a pause, the "current_qdelay" will store a high value caused by the burst and stick to that value during the pause because the queue delay measurement is done inside the dequeue function. This causes the drop probability calculation function to calculate high drop probability value instead of zero and prevents the burst allowance mechanism from working properly. Fix this problem by resetting "current_qdelay" inside the drop probability calculation function when the queue length is zero and TS option is used. Submitted by: Rasool Al-Saadi Modified: stable/11/sys/netpfil/ipfw/dn_aqm_pie.c stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 21:59:19 2017 (r318903) +++ stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 22:39:48 2017 (r318904) @@ -211,11 +211,16 @@ calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)pst->pq->ni.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!pst->pq->ni.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * Modified: stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 21:59:19 2017 (r318903) +++ stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 22:39:48 2017 (r318904) @@ -383,11 +383,16 @@ fq_calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)q->stats.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!q->stats.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * From owner-svn-src-stable-11@freebsd.org Fri May 26 00:25:10 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E813D7ADE3; Fri, 26 May 2017 00:25:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D20381EA0; Fri, 26 May 2017 00:25:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q0P8c4004703; Fri, 26 May 2017 00:25:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q0P8DU004702; Fri, 26 May 2017 00:25:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705260025.v4Q0P8DU004702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 May 2017 00:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318909 - stable/11/cddl/contrib/opensolaris/lib/libzpool/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 00:25:10 -0000 Author: mav Date: Fri May 26 00:25:08 2017 New Revision: 318909 URL: https://svnweb.freebsd.org/changeset/base/318909 Log: MFC r318516: Fix time handling in cv_timedwait_hires(). pthread_cond_timedwait() receives absolute time, not relative. Passing wrong time there caused two threads of zdb to spin in a tight loop. Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 26 00:19:50 2017 (r318908) +++ stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 26 00:25:08 2017 (r318909) @@ -363,7 +363,7 @@ cv_timedwait_hires(kcondvar_t *cv, kmute int flag) { int error; - timestruc_t ts; + timespec_t ts; hrtime_t delta; ASSERT(flag == 0 || flag == CALLOUT_FLAG_ABSOLUTE); @@ -376,8 +376,13 @@ top: if (delta <= 0) return (-1); - ts.tv_sec = delta / NANOSEC; - ts.tv_nsec = delta % NANOSEC; + clock_gettime(CLOCK_REALTIME, &ts); + ts.tv_sec += delta / NANOSEC; + ts.tv_nsec += delta % NANOSEC; + if (ts.tv_nsec >= NANOSEC) { + ts.tv_sec++; + ts.tv_nsec -= NANOSEC; + } ASSERT(mutex_owner(mp) == curthread); mp->m_owner = NULL; From owner-svn-src-stable-11@freebsd.org Fri May 26 08:57:02 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03AA6D8255B; Fri, 26 May 2017 08:57:02 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C76A01BEC; Fri, 26 May 2017 08:57:01 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q8v0bi013629; Fri, 26 May 2017 08:57:00 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q8v0fv013628; Fri, 26 May 2017 08:57:00 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705260857.v4Q8v0fv013628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 26 May 2017 08:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318918 - stable/11/sys/dev/xen/blkfront X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 08:57:02 -0000 Author: royger Date: Fri May 26 08:57:00 2017 New Revision: 318918 URL: https://svnweb.freebsd.org/changeset/base/318918 Log: MFC r318520: xen/blkfront: correctly detach a disk with active users Modified: stable/11/sys/dev/xen/blkfront/blkfront.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/11/sys/dev/xen/blkfront/blkfront.c Fri May 26 06:09:11 2017 (r318917) +++ stable/11/sys/dev/xen/blkfront/blkfront.c Fri May 26 08:57:00 2017 (r318918) @@ -1578,11 +1578,14 @@ xbd_backend_changed(device_t dev, Xenbus break; case XenbusStateClosing: - if (sc->xbd_users > 0) - xenbus_dev_error(dev, -EBUSY, - "Device in use; refusing to close"); - else + if (sc->xbd_users > 0) { + device_printf(dev, "detaching with pending users\n"); + KASSERT(sc->xbd_disk != NULL, + ("NULL disk with pending users\n")); + disk_gone(sc->xbd_disk); + } else { xbd_closing(dev); + } break; } } From owner-svn-src-stable-11@freebsd.org Fri May 26 08:59:17 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B99CD82653; Fri, 26 May 2017 08:59:17 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38A061D4F; Fri, 26 May 2017 08:59:17 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q8xGJS013766; Fri, 26 May 2017 08:59:16 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q8xGha013765; Fri, 26 May 2017 08:59:16 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705260859.v4Q8xGha013765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 26 May 2017 08:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318919 - stable/11/sys/dev/xen/netfront X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 08:59:17 -0000 Author: royger Date: Fri May 26 08:59:16 2017 New Revision: 318919 URL: https://svnweb.freebsd.org/changeset/base/318919 Log: MFC r318523, r318631: xen/netfront: don't drop the ring RX lock with inconsistent ring state xen/netfront: don't drop the RX lock in xn_rxeof Modified: stable/11/sys/dev/xen/netfront/netfront.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/11/sys/dev/xen/netfront/netfront.c Fri May 26 08:57:00 2017 (r318918) +++ stable/11/sys/dev/xen/netfront/netfront.c Fri May 26 08:59:16 2017 (r318919) @@ -1161,17 +1161,18 @@ xn_rxeof(struct netfront_rxq *rxq) struct mbufq mbufq_rxq, mbufq_errq; int err, work_to_do; - do { - XN_RX_LOCK_ASSERT(rxq); - if (!netfront_carrier_ok(np)) - return; - - /* XXX: there should be some sane limit. */ - mbufq_init(&mbufq_errq, INT_MAX); - mbufq_init(&mbufq_rxq, INT_MAX); + XN_RX_LOCK_ASSERT(rxq); + + if (!netfront_carrier_ok(np)) + return; + + /* XXX: there should be some sane limit. */ + mbufq_init(&mbufq_errq, INT_MAX); + mbufq_init(&mbufq_rxq, INT_MAX); - ifp = np->xn_ifp; + ifp = np->xn_ifp; + do { rp = rxq->ring.sring->rsp_prod; rmb(); /* Ensure we see queued responses up to 'rp'. */ @@ -1191,7 +1192,7 @@ xn_rxeof(struct netfront_rxq *rxq) } m->m_pkthdr.rcvif = ifp; - if ( rx->flags & NETRXF_data_validated ) { + if (rx->flags & NETRXF_data_validated) { /* * According to mbuf(9) the correct way to tell * the stack that the checksum of an inbound @@ -1214,50 +1215,43 @@ xn_rxeof(struct netfront_rxq *rxq) } (void )mbufq_enqueue(&mbufq_rxq, m); - rxq->ring.rsp_cons = i; } - mbufq_drain(&mbufq_errq); + rxq->ring.rsp_cons = i; - /* - * Process all the mbufs after the remapping is complete. - * Break the mbuf chain first though. - */ - while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + xn_alloc_rx_buffers(rxq); - /* XXX: Do we really need to drop the rx lock? */ - XN_RX_UNLOCK(rxq); + RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); + } while (work_to_do); + + mbufq_drain(&mbufq_errq); + /* + * Process all the mbufs after the remapping is complete. + * Break the mbuf chain first though. + */ + while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); #if (defined(INET) || defined(INET6)) - /* Use LRO if possible */ - if ((ifp->if_capenable & IFCAP_LRO) == 0 || - lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { - /* - * If LRO fails, pass up to the stack - * directly. - */ - (*ifp->if_input)(ifp, m); - } -#else + /* Use LRO if possible */ + if ((ifp->if_capenable & IFCAP_LRO) == 0 || + lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { + /* + * If LRO fails, pass up to the stack + * directly. + */ (*ifp->if_input)(ifp, m); -#endif - - XN_RX_LOCK(rxq); } - - rxq->ring.rsp_cons = i; +#else + (*ifp->if_input)(ifp, m); +#endif + } #if (defined(INET) || defined(INET6)) - /* - * Flush any outstanding LRO work - */ - tcp_lro_flush_all(lro); + /* + * Flush any outstanding LRO work + */ + tcp_lro_flush_all(lro); #endif - - xn_alloc_rx_buffers(rxq); - - RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); - } while (work_to_do); } static void From owner-svn-src-stable-11@freebsd.org Fri May 26 13:06:15 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C78AD8154C; Fri, 26 May 2017 13:06:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C4841B34; Fri, 26 May 2017 13:06:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QD6EBs018572; Fri, 26 May 2017 13:06:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QD6EY8018571; Fri, 26 May 2017 13:06:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705261306.v4QD6EY8018571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 26 May 2017 13:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318948 - stable/11/tools/build/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 13:06:15 -0000 Author: gjb Date: Fri May 26 13:06:13 2017 New Revision: 318948 URL: https://svnweb.freebsd.org/changeset/base/318948 Log: MFC r318748: Honor WITHOUT_TFTP for check-old* and delete-old* targets. PR: 217949 Sponsored by: The FreeBSD Foundation Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Fri May 26 12:13:58 2017 (r318947) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Fri May 26 13:06:13 2017 (r318948) @@ -8329,6 +8329,13 @@ OLD_FILES+=usr/share/man/man1/colcrt.1.g OLD_FILES+=usr/share/man/man1/ul.1.gz .endif +.if ${MK_TFTP} == no +OLD_FILES+=usr/bin/tftp +OLD_FILES+=usr/libexec/tftpd +OLD_FILES+=usr/share/man/man1/tftp.1.gz +OLD_FILES+=usr/share/man/man8/tftpd.8.gz +.endif + .if ${MK_TIMED} == no OLD_FILES+=usr/sbin/timed OLD_FILES+=usr/sbin/timedc From owner-svn-src-stable-11@freebsd.org Fri May 26 15:13:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06AD6D82A6D; Fri, 26 May 2017 15:13:48 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC9311B46; Fri, 26 May 2017 15:13:47 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QFDk4Y071764; Fri, 26 May 2017 15:13:46 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QFDkh0071759; Fri, 26 May 2017 15:13:46 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201705261513.v4QFDkh0071759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 26 May 2017 15:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318950 - in stable/11/contrib/blacklist: bin include lib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 15:13:48 -0000 Author: lidl Date: Fri May 26 15:13:46 2017 New Revision: 318950 URL: https://svnweb.freebsd.org/changeset/base/318950 Log: MFC r318755: Extend libblacklist support with new action types The original blacklist library supported two notification types: - failed auth attempt, which incremented the failed login count by one for the remote address - successful auth attempt, which reset the failed login count to zero for that remote address When the failed login count reached the limit in the configuration file, the remote address would be blocked by a packet filter. This patch implements a new notification type, "abusive behavior", and accepts, but does not act on an additional type, "bad username". It is envisioned that a system administrator will configure a small list of "known bad usernames" that should be blocked immediately. Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/blacklist/bin/blacklistd.c stable/11/contrib/blacklist/include/bl.h stable/11/contrib/blacklist/include/blacklist.h stable/11/contrib/blacklist/lib/blacklist.c stable/11/contrib/blacklist/lib/libblacklist.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/bin/blacklistd.c ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.c Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/bin/blacklistd.c Fri May 26 15:13:46 2017 (r318950) @@ -214,6 +214,17 @@ process(bl_t bl) } switch (bi->bi_type) { + case BL_ABUSE: + /* + * If the application has signaled abusive behavior, + * set the number of fails to be one less than the + * configured limit. Fallthrough to the normal BL_ADD + * processing, which will increment the failure count + * to the threshhold, and block the abusive address. + */ + if (c.c_nfail != -1) + dbi.count = c.c_nfail - 1; + /*FALLTHROUGH*/ case BL_ADD: dbi.count++; dbi.last = ts.tv_sec; @@ -249,6 +260,9 @@ process(bl_t bl) dbi.count = 0; dbi.last = 0; break; + case BL_BADUSER: + /* ignore for now */ + break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } Modified: stable/11/contrib/blacklist/include/bl.h ============================================================================== --- stable/11/contrib/blacklist/include/bl.h Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/include/bl.h Fri May 26 15:13:46 2017 (r318950) @@ -40,7 +40,9 @@ typedef enum { BL_INVALID, BL_ADD, - BL_DELETE + BL_DELETE, + BL_ABUSE, + BL_BADUSER } bl_type_t; typedef struct { Modified: stable/11/contrib/blacklist/include/blacklist.h ============================================================================== --- stable/11/contrib/blacklist/include/blacklist.h Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/include/blacklist.h Fri May 26 15:13:46 2017 (r318950) @@ -43,4 +43,13 @@ int blacklist_sa_r(struct blacklist *, i const struct sockaddr *, socklen_t, const char *); __END_DECLS +/* action values for user applications */ +#define BLACKLIST_API_ENUM 1 +enum { + BLACKLIST_AUTH_OK = 0, + BLACKLIST_AUTH_FAIL, + BLACKLIST_ABUSIVE_BEHAVIOR, + BLACKLIST_BAD_USER +}; + #endif /* _BLACKLIST_H */ Modified: stable/11/contrib/blacklist/lib/blacklist.c ============================================================================== --- stable/11/contrib/blacklist/lib/blacklist.c Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/lib/blacklist.c Fri May 26 15:13:46 2017 (r318950) @@ -61,7 +61,27 @@ int blacklist_sa_r(struct blacklist *bl, int action, int rfd, const struct sockaddr *sa, socklen_t slen, const char *msg) { - return bl_send(bl, action ? BL_ADD : BL_DELETE, rfd, sa, slen, msg); + int internal_action; + + /* internal values are not the same as user application values */ + switch (action) { + case BLACKLIST_AUTH_FAIL: + internal_action = BL_ADD; + break; + case BLACKLIST_AUTH_OK: + internal_action = BL_DELETE; + break; + case BLACKLIST_ABUSIVE_BEHAVIOR: + internal_action = BL_ABUSE; + break; + case BLACKLIST_BAD_USER: + internal_action = BL_BADUSER; + break; + default: + internal_action = BL_INVALID; + break; + } + return bl_send(bl, internal_action, rfd, sa, slen, msg); } int Modified: stable/11/contrib/blacklist/lib/libblacklist.3 ============================================================================== --- stable/11/contrib/blacklist/lib/libblacklist.3 Fri May 26 13:09:16 2017 (r318949) +++ stable/11/contrib/blacklist/lib/libblacklist.3 Fri May 26 15:13:46 2017 (r318950) @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 22, 2015 +.Dd May 5, 2017 .Dt LIBBLACKLIST 3 .Os .Sh NAME @@ -76,13 +76,9 @@ The .Fn blacklist function sends a message to .Xr blacklistd 8 , -with an +with an integer .Ar action -argument specifying -.Dv 1 -for a failed connection or -.Dv 0 -for a successful connection, +argument specifying the type of notification, a file descriptor .Ar fd specifying the accepted file descriptor connected to the client, @@ -91,6 +87,30 @@ and an optional message in the argument. .Pp The +.Ar action +parameter can take these values: +.Bl -tag -width ".Va BLACKLIST_ABUSIVE_BEHAVIOR" +.It Va BLACKLIST_AUTH_FAIL +There was an unsuccessful authentication attempt. +.It Va BLACKLIST_AUTH_OK +A user successfully authenticated. +.It Va BLACKLIST_ABUSIVE_BEHAVIOR +The sending daemon has detected abusive behavior +from the remote system. The remote address should +be blocked as soon as possible. +.It Va BLACKLIST_BAD_USER +The sending daemon has determined the username +presented for authentication is invalid. The +.Xr blacklistd 8 +daemon compares the username to a configured list of forbidden +usernames and +blocks the address immediately if a forbidden username matches. +(The +.Ar BLACKLIST_BAD_USER +support is not currently available.) +.El +.Pp +The .Fn blacklist_r function is more efficient because it keeps the blacklist state around. .Pp @@ -102,8 +122,13 @@ functions can be used with unconnected s .Xr getpeername 2 will not work, the server will pass the peer name in the message. .Pp -All functions log errors to -.Xr syslogd 8 . +By default, +.Xr syslogd 8 +is used for message logging. +The internal +.Fn bl_create +function can be used to create the required internal +state and specify a custom logging function. .Sh RETURN VALUES The function .Fn blacklist_open From owner-svn-src-stable-11@freebsd.org Fri May 26 17:11:28 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B82FED83060; Fri, 26 May 2017 17:11:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81B2113F0; Fri, 26 May 2017 17:11:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QHBR4v018147; Fri, 26 May 2017 17:11:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QHBRNo018145; Fri, 26 May 2017 17:11:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705261711.v4QHBRNo018145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 26 May 2017 17:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318961 - stable/11/usr.bin/truss X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 17:11:28 -0000 Author: jhb Date: Fri May 26 17:11:27 2017 New Revision: 318961 URL: https://svnweb.freebsd.org/changeset/base/318961 Log: MFC 315335,315336,315496,315497,315500,315502,315504,315509,315523,315524, 315525: Decode more system call arguments in truss. 315335: Remove duplicate argument from linux_stat64() decoding. 315336: Automate the handling of QUAD_ALIGN and QUAD_SLOTS. Previously, the offset in a system call description specified the array index of the start of a system call argument. For most system call arguments this was the same as the index of the argument in the function signature. 64-bit arguments (off_t and id_t values) passed on 32-bit platforms use two slots in the array however. This was handled by adding (QUAD_SLOTS - 1) to the slot indicies of any subsequent arguments after a 64-bit argument (though written as ("{ Quad, 1 }, { Int, 1 + QUAD_SLOTS }" rather than "{ Quad, 1 }, { Int, 2 + QUAD_SLOTS - 1 }"). If a system call contained multiple 64-bit arguments (such as posix_fadvise()), then additional arguments would need to use 'QUAD_SLOTS * 2' but remember to subtract 2 from the initial number, etc. In addition, 32-bit powerpc requires 64-bit arguments to be 64-bit aligned, so if the effective index in the array of a 64-bit argument is odd, it needs QUAD_ALIGN added to the current and any subsequent slots. However, if the effective index in the array of a 64-bit argument was even, QUAD_ALIGN was omitted. This approach was messy and error prone. This commit replaces it with automated pre-processing of the system call table to do fixups for 64-bit argument offsets. The offset in a system call description now indicates the index of an argument in the associated function call's signature. A fixup function is run against each decoded system call description during startup on 32-bit platforms. The fixup function maintains an 'offset' value which holds an offset to be added to each remaining system call argument's index. Initially offset is 0. When a 64-bit system call argument is encountered, the offset is first aligned to a 64-bit boundary (only on powerpc) and then incremented to account for the second argument slot used by the argument. This modified 'offset' is then applied to any remaining arguments. This approach does require a few things that were not previously required: 1) Each system call description must now list arguments in ascending order (existing ones all do) without using duplicate slots in the register array. A new assert() should catch any future descriptions which violate this rule. 2) A system call description is still permitted to omit arguments (though none currently do), but if the call accepts 64-bit arguments those cannot be omitted or incorrect results will be displated on 32-bit systems. 315496: Decode the arguments passed to cap_fcntls_get() and cap_fcntls_limit(). 315497: Decode arguments passed to posix_fadvise(). 315500: Decode file flags passed to *chflags*(). While here, decode arguments passed to fchflags() and chflagsat(). 315502: Decode flock() operation. 315504: Decode arguments passed to getfsstat(). Note that this does not yet decode the statfs structures returned by getfsstat(). 315509: Decode arguments passed to kldsym() and kldunloadf(). This does not currently decode the kld_sym_lookup structure passed to kldsym(). 315523: Add a Sizet type for 'size_t' values and use it instead of Int. Various size_t arguments were previously decoded as Int values instead which would have truncated values above 2^31 on 64-bit systems. 315524: Decode arguments to madvise(). 315525: Improve decoding of last arguments to ioctl() and sendto(). Decode the last argument to ioctl() as a pointer rather than an int. Eventually this could use 'int' for the _IOWINT() case and pointers for all others. The last argument to sendto() is a socklen_t value, not a pointer. Modified: stable/11/usr.bin/truss/syscall.h stable/11/usr.bin/truss/syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/truss/syscall.h ============================================================================== --- stable/11/usr.bin/truss/syscall.h Fri May 26 16:36:30 2017 (r318960) +++ stable/11/usr.bin/truss/syscall.h Fri May 26 17:11:27 2017 (r318961) @@ -45,6 +45,8 @@ enum Argtype { None = 1, Hex, Octal, Int Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, + CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, + Kldunloadflags, Sizet, Madvice, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: stable/11/usr.bin/truss/syscalls.c ============================================================================== --- stable/11/usr.bin/truss/syscalls.c Fri May 26 16:36:30 2017 (r318960) +++ stable/11/usr.bin/truss/syscalls.c Fri May 26 17:11:27 2017 (r318961) @@ -71,20 +71,6 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #include "syscall.h" -/* 64-bit alignment on 32-bit platforms. */ -#if !defined(__LP64__) && defined(__powerpc__) -#define QUAD_ALIGN 1 -#else -#define QUAD_ALIGN 0 -#endif - -/* Number of slots needed for a 64-bit argument. */ -#ifdef __LP64__ -#define QUAD_SLOTS 1 -#else -#define QUAD_SLOTS 2 -#endif - /* * This should probably be in its own file, sorted alphabetically. */ @@ -106,10 +92,17 @@ static struct syscall decoded_syscalls[] { Int, 3 } } }, { .name = "break", .ret_type = 1, .nargs = 1, .args = { { Ptr, 0 } } }, + { .name = "cap_fcntls_get", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CapFcntlRights | OUT, 1 } } }, + { .name = "cap_fcntls_limit", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CapFcntlRights, 1 } } }, { .name = "chdir", .ret_type = 1, .nargs = 1, .args = { { Name, 0 } } }, { .name = "chflags", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Hex, 1 } } }, + .args = { { Name | IN, 0 }, { FileFlags, 1 } } }, + { .name = "chflagsat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Name | IN, 1 }, { FileFlags, 2 }, + { Atflags, 3 } } }, { .name = "chmod", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "chown", .ret_type = 1, .nargs = 3, @@ -135,6 +128,8 @@ static struct syscall decoded_syscalls[] { .name = "faccessat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Accessmode, 2 }, { Atflags, 3 } } }, + { .name = "fchflags", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { FileFlags, 1 } } }, { .name = "fchmod", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Octal, 1 } } }, { .name = "fchmodat", .ret_type = 1, .nargs = 4, @@ -146,6 +141,8 @@ static struct syscall decoded_syscalls[] { Atflags, 4 } } }, { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, + { .name = "flock", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Flockop, 1 } } }, { .name = "fstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Stat | OUT, 1 } } }, { .name = "fstatat", .ret_type = 1, .nargs = 4, @@ -154,13 +151,15 @@ static struct syscall decoded_syscalls[] { .name = "fstatfs", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { StatFs | OUT, 1 } } }, { .name = "ftruncate", .ret_type = 1, .nargs = 2, - .args = { { Int | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, + .args = { { Int | IN, 0 }, { QuadHex | IN, 1 } } }, { .name = "futimens", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Timespec2 | IN, 1 } } }, { .name = "futimes", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Timeval2 | IN, 1 } } }, { .name = "futimesat", .ret_type = 1, .nargs = 3, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timeval2 | IN, 2 } } }, + { .name = "getfsstat", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Long, 1 }, { Getfsstatmode, 2 } } }, { .name = "getitimer", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Itimerval | OUT, 2 } } }, { .name = "getpeername", .ret_type = 1, .nargs = 3, @@ -178,7 +177,7 @@ static struct syscall decoded_syscalls[] { .name = "gettimeofday", .ret_type = 1, .nargs = 2, .args = { { Timeval | OUT, 0 }, { Ptr, 1 } } }, { .name = "ioctl", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Ioctl, 1 }, { Hex, 2 } } }, + .args = { { Int, 0 }, { Ioctl, 1 }, { Ptr, 2 } } }, { .name = "kevent", .ret_type = 1, .nargs = 6, .args = { { Int, 0 }, { Kevent, 1 }, { Int, 2 }, { Kevent | OUT, 3 }, { Int, 4 }, { Timespec, 5 } } }, @@ -194,12 +193,16 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 } } }, { .name = "kldstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Ptr, 1 } } }, + { .name = "kldsym", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Kldsymcmd, 1 }, { Ptr, 2 } } }, { .name = "kldunload", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, + { .name = "kldunloadf", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Kldunloadflags, 1 } } }, { .name = "kse_release", .ret_type = 0, .nargs = 1, .args = { { Timespec, 0 } } }, { .name = "lchflags", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Hex, 1 } } }, + .args = { { Name | IN, 0 }, { FileFlags, 1 } } }, { .name = "lchmod", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "lchown", .ret_type = 1, .nargs = 3, @@ -210,12 +213,13 @@ static struct syscall decoded_syscalls[] .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 }, { Atflags, 4 } } }, { .name = "lseek", .ret_type = 2, .nargs = 3, - .args = { { Int, 0 }, { QuadHex, 1 + QUAD_ALIGN }, - { Whence, 1 + QUAD_SLOTS + QUAD_ALIGN } } }, + .args = { { Int, 0 }, { QuadHex, 1 }, { Whence, 2 } } }, { .name = "lstat", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, { .name = "lutimes", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Timeval2 | IN, 1 } } }, + { .name = "madvise", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Sizet, 1 }, { Madvice, 2 } } }, { .name = "mkdir", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "mkdirat", .ret_type = 1, .nargs = 3, @@ -229,16 +233,16 @@ static struct syscall decoded_syscalls[] { .name = "mknodat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Int, 3 } } }, { .name = "mmap", .ret_type = 1, .nargs = 6, - .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, - { Int, 4 }, { QuadHex, 5 + QUAD_ALIGN } } }, + .args = { { Ptr, 0 }, { Sizet, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, + { Int, 4 }, { QuadHex, 5 } } }, { .name = "modfind", .ret_type = 1, .nargs = 1, .args = { { Name | IN, 0 } } }, { .name = "mount", .ret_type = 1, .nargs = 4, .args = { { Name, 0 }, { Name, 1 }, { Int, 2 }, { Ptr, 3 } } }, { .name = "mprotect", .ret_type = 1, .nargs = 3, - .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 } } }, + .args = { { Ptr, 0 }, { Sizet, 1 }, { Mprot, 2 } } }, { .name = "munmap", .ret_type = 1, .nargs = 2, - .args = { { Ptr, 0 }, { Int, 1 } } }, + .args = { { Ptr, 0 }, { Sizet, 1 } } }, { .name = "nanosleep", .ret_type = 1, .nargs = 1, .args = { { Timespec, 0 } } }, { .name = "open", .ret_type = 1, .nargs = 3, @@ -254,21 +258,22 @@ static struct syscall decoded_syscalls[] .args = { { Ptr, 0 }, { Pipe2, 1 } } }, { .name = "poll", .ret_type = 1, .nargs = 3, .args = { { Pollfd, 0 }, { Int, 1 }, { Int, 2 } } }, + { .name = "posix_fadvise", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { QuadHex, 1 }, { QuadHex, 2 }, + { Fadvice, 3 } } }, { .name = "posix_openpt", .ret_type = 1, .nargs = 1, .args = { { Open, 0 } } }, { .name = "procctl", .ret_type = 1, .nargs = 4, - .args = { { Idtype, 0 }, { Quad, 1 + QUAD_ALIGN }, - { Procctl, 1 + QUAD_ALIGN + QUAD_SLOTS }, - { Ptr, 2 + QUAD_ALIGN + QUAD_SLOTS } } }, + .args = { { Idtype, 0 }, { Quad, 1 }, { Procctl, 2 }, { Ptr, 3 } } }, { .name = "read", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 } } }, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Sizet, 2 } } }, { .name = "readlink", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Int, 2 } } }, + .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Sizet, 2 } } }, { .name = "readlinkat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name, 1 }, { Readlinkres | OUT, 2 }, - { Int, 3 } } }, + { Sizet, 3 } } }, { .name = "recvfrom", .ret_type = 1, .nargs = 6, - .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 }, { Hex, 3 }, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Sizet, 2 }, { Hex, 3 }, { Sockaddr | OUT, 4 }, { Ptr | OUT, 5 } } }, { .name = "rename", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Name, 1 } } }, @@ -282,8 +287,8 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 }, { Fd_set, 1 }, { Fd_set, 2 }, { Fd_set, 3 }, { Timeval, 4 } } }, { .name = "sendto", .ret_type = 1, .nargs = 6, - .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 }, { Hex, 3 }, - { Sockaddr | IN, 4 }, { Ptr | IN, 5 } } }, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Sizet, 2 }, { Hex, 3 }, + { Sockaddr | IN, 4 }, { Int | IN, 5 } } }, { .name = "setitimer", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Itimerval, 1 }, { Itimerval | OUT, 2 } } }, { .name = "setrlimit", .ret_type = 1, .nargs = 2, @@ -326,7 +331,7 @@ static struct syscall decoded_syscalls[] { .name = "thr_self", .ret_type = 1, .nargs = 1, .args = { { Ptr, 0 } } }, { .name = "truncate", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, + .args = { { Name | IN, 0 }, { QuadHex | IN, 1 } } }, #if 0 /* Does not exist */ { .name = "umount", .ret_type = 1, .nargs = 2, @@ -349,13 +354,10 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 }, { ExitStatus | OUT, 1 }, { Waitoptions, 2 }, { Rusage | OUT, 3 } } }, { .name = "wait6", .ret_type = 1, .nargs = 6, - .args = { { Idtype, 0 }, { Quad, 1 + QUAD_ALIGN }, - { ExitStatus | OUT, 1 + QUAD_ALIGN + QUAD_SLOTS }, - { Waitoptions, 2 + QUAD_ALIGN + QUAD_SLOTS }, - { Rusage | OUT, 3 + QUAD_ALIGN + QUAD_SLOTS }, - { Ptr, 4 + QUAD_ALIGN + QUAD_SLOTS } } }, + .args = { { Idtype, 0 }, { Quad, 1 }, { ExitStatus | OUT, 2 }, + { Waitoptions, 3 }, { Rusage | OUT, 4 }, { Ptr, 5 } } }, { .name = "write", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 } } }, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Sizet, 2 } } }, /* Linux ABI */ { .name = "linux_access", .ret_type = 1, .nargs = 2, @@ -374,11 +376,11 @@ static struct syscall decoded_syscalls[] { .name = "linux_open", .ret_type = 1, .nargs = 3, .args = { { Name, 0 }, { Hex, 1 }, { Octal, 2 } } }, { .name = "linux_readlink", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Name | OUT, 1 }, { Int, 2 } } }, + .args = { { Name, 0 }, { Name | OUT, 1 }, { Sizet, 2 } } }, { .name = "linux_socketcall", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { LinuxSockArgs, 1 } } }, - { .name = "linux_stat64", .ret_type = 1, .nargs = 3, - .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 } } }, + { .name = "linux_stat64", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, /* CloudABI system calls. */ { .name = "cloudabi_sys_clock_res_get", .ret_type = 1, .nargs = 1, @@ -811,14 +813,77 @@ print_mask_arg(bool (*decoder)(FILE *, i fprintf(fp, "|0x%x", rem); } +static void +print_mask_arg32(bool (*decoder)(FILE *, uint32_t, uint32_t *), FILE *fp, + uint32_t value) +{ + uint32_t rem; + + if (!decoder(fp, value, &rem)) + fprintf(fp, "0x%x", rem); + else if (rem != 0) + fprintf(fp, "|0x%x", rem); +} + +#ifndef __LP64__ +/* + * Add argument padding to subsequent system calls afater a Quad + * syscall arguments as needed. This used to be done by hand in the + * decoded_syscalls table which was ugly and error prone. It is + * simpler to do the fixup of offsets at initalization time than when + * decoding arguments. + */ +static void +quad_fixup(struct syscall *sc) +{ + int offset, prev; + u_int i; + + offset = 0; + prev = -1; + for (i = 0; i < sc->nargs; i++) { + /* This arg type is a dummy that doesn't use offset. */ + if ((sc->args[i].type & ARG_MASK) == PipeFds) + continue; + + assert(prev < sc->args[i].offset); + prev = sc->args[i].offset; + sc->args[i].offset += offset; + switch (sc->args[i].type & ARG_MASK) { + case Quad: + case QuadHex: +#ifdef __powerpc__ + /* + * 64-bit arguments on 32-bit powerpc must be + * 64-bit aligned. If the current offset is + * not aligned, the calling convention inserts + * a 32-bit pad argument that should be skipped. + */ + if (sc->args[i].offset % 2 == 1) { + sc->args[i].offset++; + offset++; + } +#endif + offset++; + default: + break; + } + } +} +#endif + void init_syscalls(void) { struct syscall *sc; STAILQ_INIT(&syscalls); - for (sc = decoded_syscalls; sc->name != NULL; sc++) + for (sc = decoded_syscalls; sc->name != NULL; sc++) { +#ifndef __LP64__ + quad_fixup(sc); +#endif STAILQ_INSERT_HEAD(&syscalls, sc, entries); + } } static struct syscall * @@ -1104,6 +1169,9 @@ print_arg(struct syscall_args *sc, unsig case Long: fprintf(fp, "%ld", args[sc->offset]); break; + case Sizet: + fprintf(fp, "%zu", (size_t)args[sc->offset]); + break; case Name: { /* NULL-terminated string. */ char *tmp2; @@ -1801,6 +1869,49 @@ print_arg(struct syscall_args *sc, unsig case Pipe2: print_mask_arg(sysdecode_pipe2_flags, fp, args[sc->offset]); break; + case CapFcntlRights: { + uint32_t rights; + + if (sc->type & OUT) { + if (get_struct(pid, (void *)args[sc->offset], &rights, + sizeof(rights)) == -1) { + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } + } else + rights = args[sc->offset]; + print_mask_arg32(sysdecode_cap_fcntlrights, fp, rights); + break; + } + case Fadvice: + print_integer_arg(sysdecode_fadvice, fp, args[sc->offset]); + break; + case FileFlags: { + fflags_t rem; + + if (!sysdecode_fileflags(fp, args[sc->offset], &rem)) + fprintf(fp, "0x%x", rem); + else if (rem != 0) + fprintf(fp, "|0x%x", rem); + break; + } + case Flockop: + print_mask_arg(sysdecode_flock_operation, fp, args[sc->offset]); + break; + case Getfsstatmode: + print_integer_arg(sysdecode_getfsstat_mode, fp, + args[sc->offset]); + break; + case Kldsymcmd: + print_integer_arg(sysdecode_kldsym_cmd, fp, args[sc->offset]); + break; + case Kldunloadflags: + print_integer_arg(sysdecode_kldunload_flags, fp, + args[sc->offset]); + break; + case Madvice: + print_integer_arg(sysdecode_madvice, fp, args[sc->offset]); + break; case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); From owner-svn-src-stable-11@freebsd.org Fri May 26 19:02:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71999D83AF9; Fri, 26 May 2017 19:02:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 415ED1FF0; Fri, 26 May 2017 19:02:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QJ2lZP067296; Fri, 26 May 2017 19:02:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QJ2lsn067295; Fri, 26 May 2017 19:02:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705261902.v4QJ2lsn067295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 26 May 2017 19:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318963 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 19:02:48 -0000 Author: gjb Date: Fri May 26 19:02:46 2017 New Revision: 318963 URL: https://svnweb.freebsd.org/changeset/base/318963 Log: MFC r314935 (thompsa): Change ec2.conf to use the pkg tool from a chroot rather than trying to bootstrap it and fail from the livecd readonly filesystem. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/ec2.conf Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/tools/ec2.conf Directory Properties: stable/10/ (props changed) Modified: stable/11/release/tools/ec2.conf ============================================================================== --- stable/11/release/tools/ec2.conf Fri May 26 17:44:47 2017 (r318962) +++ stable/11/release/tools/ec2.conf Fri May 26 19:02:46 2017 (r318963) @@ -32,7 +32,8 @@ vm_extra_pre_umount() { # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. - env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg rm ${DESTDIR}/var/db/pkg/repo-*.sqlite # The size of the EC2 root disk can be configured at instance launch From owner-svn-src-stable-11@freebsd.org Fri May 26 19:19:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A25CD83DD2; Fri, 26 May 2017 19:19:49 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5DFC186C; Fri, 26 May 2017 19:19:48 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QJJleM071840; Fri, 26 May 2017 19:19:47 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QJJlhH071838; Fri, 26 May 2017 19:19:47 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705261919.v4QJJlhH071838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Fri, 26 May 2017 19:19:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318965 - stable/11/etc/rc.d X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 19:19:49 -0000 Author: n_hibma Date: Fri May 26 19:19:47 2017 New Revision: 318965 URL: https://svnweb.freebsd.org/changeset/base/318965 Log: MFC 317729: Silence sysctl in startup scripts. This makes 'stop' behave consistently with 'start' in the script. Also use $SYSCTL instead of sysctl for consistency within that script. Modified: stable/11/etc/rc.d/ipfw stable/11/etc/rc.d/routing Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.d/ipfw ============================================================================== --- stable/11/etc/rc.d/ipfw Fri May 26 19:11:24 2017 (r318964) +++ stable/11/etc/rc.d/ipfw Fri May 26 19:19:47 2017 (r318965) @@ -56,7 +56,7 @@ ipfw_start() # if checkyesno firewall_logging; then echo 'Firewall logging enabled.' - sysctl net.inet.ip.fw.verbose=1 >/dev/null + ${SYSCTL} net.inet.ip.fw.verbose=1 >/dev/null fi if checkyesno firewall_logif; then ifconfig ipfw0 create @@ -78,11 +78,11 @@ ipfw_poststart() # Enable the firewall # - if ! ${SYSCTL} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then + if ! ${SYSCTL} net.inet.ip.fw.enable=1 >/dev/null 2>&1; then warn "failed to enable IPv4 firewall" fi if afexists inet6; then - if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 + if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 >/dev/null 2>&1 then warn "failed to enable IPv6 firewall" fi @@ -95,9 +95,9 @@ ipfw_stop() # Disable the firewall # - ${SYSCTL} net.inet.ip.fw.enable=0 + ${SYSCTL} net.inet.ip.fw.enable=0 >/dev/null if afexists inet6; then - ${SYSCTL} net.inet6.ip6.fw.enable=0 + ${SYSCTL} net.inet6.ip6.fw.enable=0 >/dev/null fi # Stop firewall coscripts Modified: stable/11/etc/rc.d/routing ============================================================================== --- stable/11/etc/rc.d/routing Fri May 26 19:11:24 2017 (r318964) +++ stable/11/etc/rc.d/routing Fri May 26 19:19:47 2017 (r318965) @@ -286,7 +286,7 @@ static_inet6() esac ifconfig ${ipv6_default_interface} inet6 defaultif - sysctl net.inet6.ip6.use_defaultzone=1 + ${SYSCTL} net.inet6.ip6.use_defaultzone=1 > /dev/null } static_atm() From owner-svn-src-stable-11@freebsd.org Sat May 27 00:30:53 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EB26D82552; Sat, 27 May 2017 00:30:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE1F716BB; Sat, 27 May 2017 00:30:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R0UpTK002370; Sat, 27 May 2017 00:30:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R0UpRk002365; Sat, 27 May 2017 00:30:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705270030.v4R0UpRk002365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 27 May 2017 00:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318971 - in stable/11: lib/libc/gen lib/libc/sys sbin/zfsbootcfg share/man/man9 usr.sbin/efidp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 00:30:53 -0000 Author: gjb Date: Sat May 27 00:30:51 2017 New Revision: 318971 URL: https://svnweb.freebsd.org/changeset/base/318971 Log: MFC r318794, r318795: Update the "first appeared in" version in several manual pages. Sponsored by: The FreeBSD Foundation Modified: stable/11/lib/libc/gen/sem_timedwait.3 stable/11/lib/libc/sys/fsync.2 stable/11/sbin/zfsbootcfg/zfsbootcfg.8 stable/11/share/man/man9/mutex.9 stable/11/usr.sbin/efidp/efidp.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/sem_timedwait.3 ============================================================================== --- stable/11/lib/libc/gen/sem_timedwait.3 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/lib/libc/gen/sem_timedwait.3 Sat May 27 00:30:51 2017 (r318971) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2017 +.Dd May 24, 2017 .Dt SEM_TIMEDWAIT 3 .Os .Sh NAME @@ -160,4 +160,4 @@ function first appeared in The .Fn sem_clockwait_np function first appeared in -.Fx 12.0 . +.Fx 11.1 . Modified: stable/11/lib/libc/sys/fsync.2 ============================================================================== --- stable/11/lib/libc/sys/fsync.2 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/lib/libc/sys/fsync.2 Sat May 27 00:30:51 2017 (r318971) @@ -34,7 +34,7 @@ .\" @(#)fsync.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 17, 2016 +.Dd May 24, 2017 .Dt FSYNC 2 .Os .Sh NAME @@ -119,7 +119,7 @@ system call appeared in The .Fn fdatasync system call appeared in -.Fx 12.0 +.Fx 11.1 . .Sh BUGS The .Fn fdatasync Modified: stable/11/sbin/zfsbootcfg/zfsbootcfg.8 ============================================================================== --- stable/11/sbin/zfsbootcfg/zfsbootcfg.8 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/sbin/zfsbootcfg/zfsbootcfg.8 Sat May 27 00:30:51 2017 (r318971) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2016 +.Dd May 24, 2017 .Dt ZFSBOOTCFG 8 .Os .Sh NAME @@ -86,7 +86,7 @@ To clear the boot options: .Sh HISTORY .Nm appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS This manual page was written by .An Andriy Gapon Aq Mt avg@FreeBSD.org . Modified: stable/11/share/man/man9/mutex.9 ============================================================================== --- stable/11/share/man/man9/mutex.9 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/share/man/man9/mutex.9 Sat May 27 00:30:51 2017 (r318971) @@ -28,7 +28,7 @@ .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ .\" $FreeBSD$ .\" -.Dd July 18, 2016 +.Dd May 24, 2017 .Dt MUTEX 9 .Os .Sh NAME @@ -557,4 +557,4 @@ and The .Fn mtx_trylock_spin function was added in -.Fx 12.0 . +.Fx 11.1 . Modified: stable/11/usr.sbin/efidp/efidp.8 ============================================================================== --- stable/11/usr.sbin/efidp/efidp.8 Fri May 26 22:22:48 2017 (r318970) +++ stable/11/usr.sbin/efidp/efidp.8 Sat May 27 00:30:51 2017 (r318971) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 5, 2017 +.Dd May 24, 2017 .Dt EFIDP 8 .Os .Sh NAME @@ -50,4 +50,4 @@ have the format described in RFC 4122. The .Nm utility first appeared in -.Fx 12.0 . +.Fx 11.1 . From owner-svn-src-stable-11@freebsd.org Sat May 27 01:36:00 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5126D827D4; Sat, 27 May 2017 01:36:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C8AD1E98; Sat, 27 May 2017 01:36:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R1ZxmW026600; Sat, 27 May 2017 01:35:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R1ZxRG026597; Sat, 27 May 2017 01:35:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705270135.v4R1ZxRG026597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 27 May 2017 01:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318972 - stable/11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 01:36:00 -0000 Author: emaste Date: Sat May 27 01:35:59 2017 New Revision: 318972 URL: https://svnweb.freebsd.org/changeset/base/318972 Log: MFC r312599 (cem): Add remaining ELF compression definitions and structs PR: 219417 Modified: stable/11/sys/sys/elf32.h stable/11/sys/sys/elf64.h stable/11/sys/sys/elf_common.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/elf32.h ============================================================================== --- stable/11/sys/sys/elf32.h Sat May 27 00:30:51 2017 (r318971) +++ stable/11/sys/sys/elf32.h Sat May 27 01:35:59 2017 (r318972) @@ -254,4 +254,10 @@ typedef struct { Elf32_Half si_flags; /* per symbol flags */ } Elf32_Syminfo; +typedef struct { + Elf32_Word ch_type; + Elf32_Word ch_size; + Elf32_Word ch_addralign; +} Elf32_Chdr; + #endif /* !_SYS_ELF32_H_ */ Modified: stable/11/sys/sys/elf64.h ============================================================================== --- stable/11/sys/sys/elf64.h Sat May 27 00:30:51 2017 (r318971) +++ stable/11/sys/sys/elf64.h Sat May 27 01:35:59 2017 (r318972) @@ -257,4 +257,11 @@ typedef struct { Elf64_Half si_flags; /* per symbol flags */ } Elf64_Syminfo; +typedef struct { + Elf64_Word ch_type; + Elf64_Word ch_reserved; + Elf64_Xword ch_size; + Elf64_Xword ch_addralign; +} Elf64_Chdr; + #endif /* !_SYS_ELF64_H_ */ Modified: stable/11/sys/sys/elf_common.h ============================================================================== --- stable/11/sys/sys/elf_common.h Sat May 27 00:30:51 2017 (r318971) +++ stable/11/sys/sys/elf_common.h Sat May 27 01:35:59 2017 (r318972) @@ -849,6 +849,13 @@ typedef struct { #define SYMINFO_CURRENT 1 #define SYMINFO_NUM 2 +/* Values for ch_type (compressed section headers). */ +#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE */ +#define ELFCOMPRESS_LOOS 0x60000000 /* OS-specific */ +#define ELFCOMPRESS_HIOS 0x6fffffff +#define ELFCOMPRESS_LOPROC 0x70000000 /* Processor-specific */ +#define ELFCOMPRESS_HIPROC 0x7fffffff + /* * Relocation types. * From owner-svn-src-stable-11@freebsd.org Sat May 27 07:47:54 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C266AD8458C; Sat, 27 May 2017 07:47:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 841FD1834; Sat, 27 May 2017 07:47:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R7lri6076849; Sat, 27 May 2017 07:47:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R7lrMx076844; Sat, 27 May 2017 07:47:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270747.v4R7lrMx076844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 07:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318976 - in stable/11/sys: arm/arm arm64/arm64 mips/mips x86/x86 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 07:47:54 -0000 Author: hselasky Date: Sat May 27 07:47:52 2017 New Revision: 318976 URL: https://svnweb.freebsd.org/changeset/base/318976 Log: MFC r318353: Avoid use of contiguous memory allocations in busdma when possible. This patch improves the boundary checks in busdma to allow more cases using the regular page based kernel memory allocator. Especially in the case of having a non-zero boundary in the parent DMA tag. For example AMD64 based platforms set the PCI DMA tag boundary to PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous memory allocations to be preferred when allocating more than PAGE_SIZE bytes. Even if the required alignment was less than PAGE_SIZE bytes. This patch also fixes the nsegments check for using kmem_alloc_attr() when the maximum segment size is less than PAGE_SIZE bytes. Updated some comments describing the code in question. Differential Revision: https://reviews.freebsd.org/D10645 Reviewed by: kib, jhb, gallatin, scottl Sponsored by: Mellanox Technologies Modified: stable/11/sys/arm/arm/busdma_machdep-v4.c stable/11/sys/arm/arm/busdma_machdep-v6.c stable/11/sys/arm64/arm64/busdma_bounce.c stable/11/sys/mips/mips/busdma_machdep.c stable/11/sys/x86/x86/busdma_bounce.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/busdma_machdep-v4.c ============================================================================== --- stable/11/sys/arm/arm/busdma_machdep-v4.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/arm/arm/busdma_machdep-v4.c Sat May 27 07:47:52 2017 (r318976) @@ -736,8 +736,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { *vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/11/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- stable/11/sys/arm/arm/busdma_machdep-v6.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/arm/arm/busdma_machdep-v6.c Sat May 27 07:47:52 2017 (r318976) @@ -779,7 +779,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * (the allocator aligns buffers to their size boundaries). * - There's no need to handle lowaddr/highaddr exclusion zones. * else allocate non-contiguous pages if... - * - The page count that could get allocated doesn't exceed nsegments. + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. * - The alignment constraint isn't larger than a page boundary. * - There are no boundary-crossing constraints. * else allocate a block of contiguous pages because one or more of the @@ -788,8 +790,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !exclusion_bounce(dmat)) { *vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/11/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- stable/11/sys/arm64/arm64/busdma_bounce.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/arm64/arm64/busdma_bounce.c Sat May 27 07:47:52 2017 (r318976) @@ -461,22 +461,35 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm (*mapp)->flags = DMAMAP_FROM_DMAMEM; /* - * XXX: - * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact - * alignment guarantees of malloc need to be nailed down, and the - * code below should be rewritten to take that into account. + * Allocate the buffer from the malloc(9) allocator if... + * - It's small enough to fit into a single power of two sized bucket. + * - The alignment is less than or equal to the maximum size + * - The low address requirement is fulfilled. + * else allocate non-contiguous pages if... + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. + * - The alignment constraint isn't larger than a page boundary. + * - There are no boundary-crossing constraints. + * else allocate a block of contiguous pages because one or more of the + * constraints is something that only the contig allocator can fulfill. * - * In the meantime, we'll warn the user if malloc gets it wrong. + * NOTE: The (dmat->common.alignment <= dmat->maxsize) check + * below is just a quick hack. The exact alignment guarantees + * of malloc(9) need to be nailed down, and the code below + * should be rewritten to take that into account. + * + * In the meantime warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); - } else if (dmat->common.nsegments >= btoc(dmat->common.maxsize) && + } else if (dmat->common.nsegments >= + howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && - (dmat->common.boundary == 0 || - dmat->common.boundary >= dmat->common.lowaddr)) { + (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, Modified: stable/11/sys/mips/mips/busdma_machdep.c ============================================================================== --- stable/11/sys/mips/mips/busdma_machdep.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/mips/mips/busdma_machdep.c Sat May 27 07:47:52 2017 (r318976) @@ -680,7 +680,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * (the allocator aligns buffers to their size boundaries). * - There's no need to handle lowaddr/highaddr exclusion zones. * else allocate non-contiguous pages if... - * - The page count that could get allocated doesn't exceed nsegments. + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. * - The alignment constraint isn't larger than a page boundary. * - There are no boundary-crossing constraints. * else allocate a block of contiguous pages because one or more of the @@ -689,8 +691,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/11/sys/x86/x86/busdma_bounce.c ============================================================================== --- stable/11/sys/x86/x86/busdma_bounce.c Sat May 27 06:24:06 2017 (r318975) +++ stable/11/sys/x86/x86/busdma_bounce.c Sat May 27 07:47:52 2017 (r318976) @@ -396,23 +396,36 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm else attr = VM_MEMATTR_DEFAULT; - /* - * XXX: - * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact - * alignment guarantees of malloc need to be nailed down, and the - * code below should be rewritten to take that into account. + /* + * Allocate the buffer from the malloc(9) allocator if... + * - It's small enough to fit into a single power of two sized bucket. + * - The alignment is less than or equal to the maximum size + * - The low address requirement is fulfilled. + * else allocate non-contiguous pages if... + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. + * - The alignment constraint isn't larger than a page boundary. + * - There are no boundary-crossing constraints. + * else allocate a block of contiguous pages because one or more of the + * constraints is something that only the contig allocator can fulfill. + * + * NOTE: The (dmat->common.alignment <= dmat->maxsize) check + * below is just a quick hack. The exact alignment guarantees + * of malloc(9) need to be nailed down, and the code below + * should be rewritten to take that into account. * - * In the meantime, we'll warn the user if malloc gets it wrong. + * In the meantime warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); - } else if (dmat->common.nsegments >= btoc(dmat->common.maxsize) && + } else if (dmat->common.nsegments >= + howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && - (dmat->common.boundary == 0 || - dmat->common.boundary >= dmat->common.lowaddr)) { + (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, From owner-svn-src-stable-11@freebsd.org Sat May 27 08:25:10 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89111D81210; Sat, 27 May 2017 08:25:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39B601B1D; Sat, 27 May 2017 08:25:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R8P9FV092933; Sat, 27 May 2017 08:25:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R8P9L3092931; Sat, 27 May 2017 08:25:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270825.v4R8P9L3092931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 08:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318978 - in stable/11/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 08:25:10 -0000 Author: hselasky Date: Sat May 27 08:25:08 2017 New Revision: 318978 URL: https://svnweb.freebsd.org/changeset/base/318978 Log: MFC r318820: Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. Modified: stable/11/sys/dev/sound/pcm/feeder_mixer.c stable/11/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/pcm/feeder_mixer.c ============================================================================== --- stable/11/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:17:59 2017 (r318977) +++ stable/11/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:25:08 2017 (r318978) @@ -131,10 +131,10 @@ static struct feed_mixer_info feed_mixer sizeof(feed_mixer_info_tab[0]))) #define FEEDMIXER_DATA(i, c) ((void *) \ - ((uintptr_t)((((i) & 0x1f) << 5) | \ - ((c) & 0x1f)))) -#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 5) & 0x1f) -#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x1f) + ((uintptr_t)((((i) & 0x1f) << 7) | \ + ((c) & 0x7f)))) +#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 7) & 0x1f) +#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x7f) static int feed_mixer_init(struct pcm_feeder *f) Modified: stable/11/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/11/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:17:59 2017 (r318977) +++ stable/11/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:25:08 2017 (r318978) @@ -74,7 +74,7 @@ BEGIN { FXSHIFT = 16; FXONE = shl(1, FXSHIFT); - SND_CHN_MAX = 18; + SND_CHN_MAX = 127; PCM_8_BPS = 1; PCM_16_BPS = 2; @@ -103,9 +103,9 @@ BEGIN { printf("/*\n"); printf(" * Fast unsigned 32bit integer division and rounding, accurate for\n"); printf(" * x = 1 - %d. This table should be enough to handle possible\n", FXONE); - printf(" * division for 1 - 72 (more can be generated though..).\n"); + printf(" * division for 1 - 508 (more can be generated though..).\n"); printf(" *\n"); - printf(" * 72 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); + printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); From owner-svn-src-stable-11@freebsd.org Sat May 27 11:12:12 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75C68D83898; Sat, 27 May 2017 11:12:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F2A9110B; Sat, 27 May 2017 11:12:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RBCBV0063275; Sat, 27 May 2017 11:12:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RBCB9Y063274; Sat, 27 May 2017 11:12:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271112.v4RBCB9Y063274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 11:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318983 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 11:12:12 -0000 Author: bapt Date: Sat May 27 11:12:11 2017 New Revision: 318983 URL: https://svnweb.freebsd.org/changeset/base/318983 Log: MFC r318900: update pci_vendors to 2017.05.25 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Sat May 27 10:50:35 2017 (r318982) +++ stable/11/share/misc/pci_vendors Sat May 27 11:12:11 2017 (r318983) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.04.03 -# Date: 2017-04-03 03:15:02 +# Version: 2017.05.25 +# Date: 2017-05-25 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -76,16 +76,16 @@ 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. - 0105 Rhino R1T1 - 0205 Rhino R4FXO + 0105 R1T1 + 0205 R4FXO 0206 RCB4FXO 4-channel FXO analog telphony card - 0305 Rhino R4T1 - 0405 Rhino R8FXX + 0305 R4T1 + 0405 R8FXX 0406 RCB8FXX 8-channel modular analog telphony card - 0505 Rhino R24FXX + 0505 R24FXX 0506 RCB24FXS 24-Channel FXS analog telphony card - 0605 Rhino R2T1 - 0705 Rhino R24FXS + 0605 R2T1 + 0705 R24FXS 0706 RCB24FXO 24-Channel FXO analog telphony card 0905 R1T3 Single T3 Digital Telephony Card 0906 RCB24FXX 24-channel modular analog telphony card @@ -249,6 +249,7 @@ 0014 MegaRAID Tri-Mode SAS3516 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter + 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 0015 MegaRAID Tri-Mode SAS3416 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -430,6 +431,7 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 30c0 SAS 9201-16i 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] @@ -544,6 +546,7 @@ 0097 SAS3008 PCI-Express Fusion-MPT SAS-3 1000 3090 SAS9311-8i 1000 30e0 SAS9300-8i + 1000 3130 SAS 9300-16i 1028 1f45 HBA330 Adapter 1028 1f46 12Gbps HBA 1028 1f53 HBA330 Mini @@ -1100,7 +1103,7 @@ 1028 0085 Rage 3D LT Pro 4c46 Rage Mobility 128 AGP 2X/Mobility M3 1002 0155 IBM Thinkpad A22p - 1014 0155 IBM Thinkpad A22p + 1014 0155 Thinkpad A22p 1028 00b1 Latitude C600 4c47 3D Rage IIC PCI / Mobility Radeon 7500/7500C 4c49 3D Rage LT PRO PCI @@ -2213,6 +2216,7 @@ 1043 04a8 Radeon RX 480 1043 04b0 Radeon RX 470 1043 04fb Radeon RX 480 + 1043 04fd Radeon RX 480 8GB 1462 3411 Radeon RX 470 1462 3413 Radeon RX 480 148c 2372 Radeon RX 480 @@ -2939,7 +2943,7 @@ 6985 Polaris12 6986 Polaris12 6987 Polaris12 - 699f Polaris12 + 699f Lexa PRO [Radeon RX 550] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -3955,6 +3959,7 @@ 1438 Liverpool Processor Root Port 1439 Family 16h Processor Functions 5:1 145b Zeppelin Non-Transparent Bridge + 145c USB3 Host Controller 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4039,6 +4044,7 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) + 43bb USB 3.1 XHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -6025,9 +6031,9 @@ 1077 e4f8 FastLinQ QL45611H 100GbE Adapter (SR-IOV VF) 2020 ISP2020A Fast!SCSI Basic Adapter 2031 ISP8324-based 16Gb Fibre Channel to PCI Express Adapter - 103c 17e7 HP SN1000Q 16Gb Single Port Fibre Channel Adapter - 103c 17e8 HP SN1000Q 16Gb Dual Port Fibre Channel Adapter - 103c 1939 HP QMH2672 16Gb Dual Port Fibre Channel Adapter + 103c 17e7 SN1000Q 16Gb Single Port Fibre Channel Adapter + 103c 17e8 SN1000Q 16Gb Dual Port Fibre Channel Adapter + 103c 1939 QMH2672 16Gb Dual Port Fibre Channel Adapter 103c 8002 3830C 16G Fibre Channel Host Bus Adapter 2071 ISP2714-based 16/32Gb Fibre Channel to PCIe Adapter 1077 0283 QLE2764 Quad Port 32Gb Fibre Channel to PCIe Adapter @@ -6047,10 +6053,10 @@ 1077 02a8 QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter 1077 02ab QLE2740 Single Port 32Gb FC to PCIe Gen3 x8 Adapter 1077 02ac QLE2742 Dual Port 32Gb FC to PCIe Gen3 x8 Adapter - 1590 00f9 HPE StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter - 1590 00fa HPE StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter - 1590 0203 HPE StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter - 1590 0204 HPE StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter + 1590 00f9 StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter + 1590 00fa StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter + 1590 0203 StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter + 1590 0204 StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter 2300 QLA2300 64-bit Fibre Channel Adapter 2312 ISP2312-based 2Gb Fibre Channel to PCI-X HBA 103c 0131 2Gb Fibre Channel - Single port [A7538A] @@ -6065,7 +6071,7 @@ 103c 3262 StorageWorks 81Q 103c 3263 StorageWorks 82Q 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine - 1590 00fc HPE StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter + 1590 00fc StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter 3022 ISP4022-based Ethernet NIC 3032 ISP4032-based Ethernet IPv6 NIC 4010 ISP4010-based iSCSI TOE HBA @@ -8954,7 +8960,7 @@ 0396 G73 0397 G73M [GeForce Go 7700] 0398 G73M [GeForce Go 7600] - 1025 006c Acer 9814 WKMI + 1025 006c Aspire 9814WKMi 0399 G73M [GeForce Go 7600 GT] 039a G73M [Quadro NVS 300M] 039b G73M [GeForce Go 7900 SE] @@ -9912,6 +9918,7 @@ 0dfa GF108GLM [Quadro 1000M] 0dfc GF108GLM [NVS 5200M] 0e08 GF119 HDMI Audio Controller + 1043 83a0 ENGT520 SILENT # 1024MB with passive cooling (heatsink) 10b0 104a Gainward GeForce GT 610 0e09 GF110 High Definition Audio Controller @@ -10045,6 +10052,7 @@ 103a GK110GL [Quadro K6000] 103c GK110GL [Quadro K5200] 1040 GF119 [GeForce GT 520] + 1043 83a0 ENGT520 SILENT 1042 GF119 [GeForce 510] 1048 GF119 [GeForce 605] 1049 GF119 [GeForce GT 620 OEM] @@ -10694,6 +10702,7 @@ 17fd GM200GL [Tesla M40] 1b00 GP102 [TITAN X] 1b01 GP102 + 1b02 GP102 [TITAN Xp] 1b06 GP102 [GeForce GTX 1080 Ti] 1b30 GP102GL [Quadro P6000] 1b38 GP102GL [Tesla P40] @@ -10738,7 +10747,7 @@ 1cb1 GP107GL [Quardo P1000] 1cb2 GP107GL [Quardo P600] 1cb3 GP107GL [Quardo P400] - 1d01 GP108 + 1d01 GP108 [GeForce GT 1030] 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -10771,6 +10780,12 @@ e260 OneConnect FCoE Initiator (Lancer) e268 OneConnect 10Gb FCoE Converged Network Adapter (Lancer-VF) e300 Lancer Gen6: LPe32000 Fibre Channel Host Adapter + 10df e310 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e311 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e312 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e322 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e323 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e325 Lancer Gen6: LPe31000 Fibre Channel Host Adapter f011 Saturn: LightPulse Fibre Channel Host Adapter f015 Saturn: LightPulse Fibre Channel Host Adapter f085 LP850 Fibre Channel Host Adapter @@ -11562,8 +11577,8 @@ 1043 8095 A7V8X Motherboard (Realtek ALC650 codec) 1043 80a1 A7V8X-X Motherboard 1043 80b0 A7V600/K8V-X/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX]) - 1043 80f3 ASUSTek SK8V motherboard - 1043 810d Asus P5VD1-X (AD1888 codec [SoundMax]) + 1043 80f3 SK8V motherboard + 1043 810d P5VD1-X (AD1888 codec [SoundMax]) 1043 812a A8V Deluxe motherboard (Realtek ALC850 codec) 10ec 8168 High Definition Audio 1106 3059 L7VMM2 Motherboard @@ -12248,7 +12263,7 @@ 0070 6701 WinTV HVR-1110 1019 4cb5 Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) 1043 0210 FlyTV mini Asus Digimatrix - 1043 4843 ASUS TV-FM 7133 + 1043 4843 TV-FM 7133 1043 4845 TV-FM 7135 1043 4862 P7131 Dual 1043 4876 My Cinema-P7131 Hybrid @@ -12322,7 +12337,7 @@ 0000 4071 Behold TV 407 FM 1019 4cb4 Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) 1043 0210 Digimatrix TV - 1043 4840 ASUS TV-FM 7134 + 1043 4840 TV-FM 7134 1043 4842 TV-FM 7134 1131 0000 SAA713x-based TV tuner card 1131 2004 EUROPA V3 reference design @@ -13039,7 +13054,7 @@ 103c 30c1 Compaq 6910p 1043 1237 A6J-Q008 1043 1967 V6800V - 1043 1987 Asus A4K and Z81K notebooks, possibly others ( mid-2005 machines ) + 1043 1987 A4K and Z81K notebooks, possibly others ( mid-2005 machines ) 104d 80df Vaio PCG-FX403 104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP 104d 814e VAIO GRZ390Z @@ -13048,7 +13063,7 @@ 144d c00c P30/P35 notebook 14ef 0220 PCD-RP-220S 17aa 201c ThinkPad X60/X60s - 17aa 20c4 ThinkPad T61 + 17aa 20c4 ThinkPad T61/R61 17aa 20c6 ThinkPad R61 0477 RL5c477 0478 RL5c478 @@ -13098,7 +13113,7 @@ 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop 1043 1237 A6J-Q008 - 1043 1967 ASUS V6800V + 1043 1967 V6800V 10f7 8338 Panasonic CF-Y5 laptop 144d c018 X20 IV 17aa 201d ThinkPad X60/X60s @@ -13114,14 +13129,15 @@ 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop + 17aa 20c5 ThinkPad R61 17aa 20c7 ThinkPad R61 0841 R5C841 CardBus/SD/SDIO/MMC/MS/MSPro/xD/IEEE1394 0843 R5C843 MMC Host Controller 1025 0121 Aspire 5920G 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 - 1028 01f5 Dell Inspiron 1501 - 1028 024f Dell Latitude e6500 + 1028 01f5 Inspiron 1501 + 1028 024f Latitude e6500 103c 03b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cf Pavilion dv9500/9600/9700 series @@ -13144,9 +13160,11 @@ 1028 040a Latitude E6410 1028 040b Latitude E6510 e823 PCIe SDXC/MMC Host Controller + 17aa 21cf ThinkPad T520 e832 R5C832 PCIe IEEE 1394 Controller 1028 040a Latitude E6410 1028 040b Latitude E6510 + 17aa 21cf ThinkPad T520 e852 PCIe xD-Picture Card Controller 1181 Telmatics International 1183 Fujikura Ltd @@ -15143,7 +15161,7 @@ 0206 GPS180PEX GPS Receiver (PCI Express) 0207 GLN180PEX GPS/GLONASS receiver (PCI Express) 0208 GPS180AMC GPS Receiver (PCI Express / MicroTCA / AdvancedMC) - 0209 GRC181PEX GPS/GLONASS/BEIDOU receiver (PCI Express) + 0209 GNS181PEX GPS/Galileo/GLONASS/BEIDOU receiver (PCI Express) 0301 TCR510PCI IRIG Timecode Reader 0302 TCR167PCI IRIG Timecode Reader 0303 TCR511PCI IRIG Timecode Reader @@ -15746,8 +15764,8 @@ 1409 0103 PAR4008A 1409 0104 PAR4018A 140a DSP Research Inc -# Formerly RAMiX, Inc. -140b GE Intelligent Platforms +# Formerly RAMiX, GE Fanuc, GE Intelligent Platforms +140b Abaco Systems, Inc. 140c Elmic Systems Inc 140d Matsushita Electric Works Ltd 140e Goepel Electronic GmbH @@ -16062,6 +16080,7 @@ 509e T520-509E Unified Wire Ethernet Controller 509f T540-509F Unified Wire Ethernet Controller 50a0 T540-50A0 Unified Wire Ethernet Controller + 50a1 T540-50A1 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16113,6 +16132,7 @@ 549e T520-509E Unified Wire Ethernet Controller 549f T540-509F Unified Wire Ethernet Controller 54a0 T540-50A0 Unified Wire Ethernet Controller + 54a1 T540-50A1 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16164,6 +16184,7 @@ 559e T520-509E Unified Wire Storage Controller 559f T540-509F Unified Wire Storage Controller 55a0 T540-50A0 Unified Wire Storage Controller + 55a1 T540-50A1 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16215,6 +16236,7 @@ 569e T520-509E Unified Wire Storage Controller 569f T540-509F Unified Wire Storage Controller 56a0 T540-50A0 Unified Wire Storage Controller + 56a1 T540-50A1 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16305,6 +16327,7 @@ 589e T520-509E Unified Wire Ethernet Controller [VF] 589f T540-509F Unified Wire Ethernet Controller [VF] 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] + 58a1 T540-50A1 Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16470,6 +16493,8 @@ 1028 1fc2 Express Flash NVMe PM1725 1.6TB SFF 1028 1fc4 Express Flash NVMe PM1725 1.6TB AIC a822 NVMe SSD Controller 172Xa + 1014 0621 PCIe3 1.6TB NVMe Flash Adapter II x8 + 1014 0622 PCIe3 3.2TB NVMe Flash Adapter II x8 1028 1fd9 Express Flash PM1725a 800GB SFF 1028 1fda Express Flash PM1725a 1.6TB SFF 1028 1fdb Express Flash PM1725a 3.2TB SFF @@ -16663,7 +16688,10 @@ 14ca PE Logic Corp. 14cb Billionton Systems Inc 14cc NAKAYO Telecommunications Inc -14cd Universal Scientific Ind. +14cd Universal Global Scientific Industrial Co.,Ltd + 0001 USI-1514-1GbaseT [OCP1] + 0002 USI-4227-SFP [OCP2] + 0003 USI-X557-10GbaseT [OCP3] 14ce Whistle Communications 14cf TEK Microsystems Inc. 14d0 Ericsson Axe R & D @@ -16767,6 +16795,7 @@ 1028 02f1 PowerEdge R510 BCM5716 Gigabit Ethernet 163c NetXtreme II BCM5716S Gigabit Ethernet 163d NetXtreme II BCM57811 10-Gigabit Ethernet + 1043 858a PEB-10G/57811-1S 163e NetXtreme II BCM57811 10 Gigabit Ethernet Multi Function 163f NetXtreme II BCM57811 10-Gigabit Ethernet Virtual Function 1641 NetXtreme BCM57787 Gigabit Ethernet PCIe @@ -16892,7 +16921,7 @@ 1734 1061 PRIMERGY RX/TX S2 series onboard LAN 165a NetXtreme BCM5722 Gigabit Ethernet PCI Express # Dual NIC server - 1014 0378 IBM System x3350 (Machine type 4192) + 1014 0378 System x3350 (Machine type 4192) 1028 020f PowerEdge R300 Broadcom NetXtreme 5722 1028 0210 PowerEdge T300 Broadcom NetXtreme 5722 1028 0225 PowerEdge T105 Broadcom NetXtreme 5722 @@ -16992,6 +17021,7 @@ 1693 NetLink BCM5787M Gigabit Ethernet PCI Express 1025 0121 Aspire 5920G 103c 30c0 6710b + 17aa 20d5 ThinkPad R61 1694 NetLink BCM57790 Gigabit Ethernet PCIe 1696 NetXtreme BCM5782 Gigabit Ethernet 103c 12bc d530 CMT (DG746A) @@ -17128,6 +17158,8 @@ 16d5 BCM57407 NetXtreme-E 10GBase-T Ethernet Controller 16d6 BCM57412 NetXtreme-E 10Gb RDMA Ethernet Controller 16d7 BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller + 14e4 1202 BCM957412M4122 OCP 1x25G Type1 wRoCE + 14e4 1404 BCM957414M4142 OCP 2x25G Type1 wRoCE 1590 020e Ethernet 25Gb 2-port 631SFP28 Adapter 1590 0211 Ethernet 25Gb 2-port 631FLR-SFP28 Adapter 16d8 BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller @@ -17622,7 +17654,7 @@ 1002 00f8 ATI TV Wonder Pro 1002 00f9 ATI TV Wonder 1002 a101 HDTV Wonder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 6611 Winfast TV 2000XP Expert 107d 6613 Leadtek Winfast 2000XP Expert 107d 6620 Leadtek Winfast DV2000 @@ -17668,7 +17700,7 @@ 0070 9002 Nova-T DVB-T Model 909 0070 9402 WinTV-HVR1100 DVB-T/Hybrid 0070 9600 WinTV 88x MPEG Encoder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 663c Leadtek PVR 2000 107d 665f WinFast DTV1000-T 14f1 0187 Conexant DVB-T reference design @@ -18099,6 +18131,18 @@ 103c 18ce InfiniBand QDR/EN 10Gb Dual Port 544M Adapter 103c 18cf InfiniBand FDR/EN 10/40Gb Dual Port 544M Adapter 103c 18d6 InfiniBand FDR/EN 10/40Gb Dual Port 544QSFP Adapter + 15b3 0025 ConnectX-3 IB QDR Dual Port Mezzanine Card + 15b3 0026 ConnectX-3 IB FDR Dual Port Mezzanine Card + 15b3 0059 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Mezzanine Card + 15b3 0065 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Adapter + 15b3 0066 ConnectX-3 IB FDR10 Dual Port Mezzanine Card + 15b3 0067 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Adapter + 15b3 0071 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Mezzanine Card +# SVID = 15B3 SSID = 0078 + 15b3 0078 ConnectX-3 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 40 GbE Dual Port QSFP+ Adapter +# SVID = 15B3 SSID = 0080 + 15b3 0080 ConnectX-3 10 GbE Dual Port SFP+ Adapter 1004 MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] 1005 MT27510 Family 1006 MT27511 Family @@ -18111,6 +18155,9 @@ 117c 0091 FastFrame NQ42 117c 0092 FastFrame NQ11 117c 0093 FastFrame NQ12 + 15b3 0078 ConnectX-3 Pro 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 Pro 40 GbE Dual Port QSFP+ Adapter + 15b3 0080 ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter 1009 MT27530 Family 100a MT27531 Family 100b MT27540 Family @@ -18122,8 +18169,16 @@ 1011 MT27600 [Connect-IB] 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] + 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 + 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter + 15b3 0034 ConnectX-4 VPI IB EDR/100 GbE Dual Port QSFP28 Adapter + 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter + 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb + 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G + 15b3 0025 ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC 1016 MT27710 Family [ConnectX-4 Lx Virtual Function] 1017 MT27800 Family [ConnectX-5] 1018 MT27800 Family [ConnectX-5 Virtual Function] @@ -18711,6 +18766,7 @@ 0033 AR958x 802.11abgn Wireless Network Adapter 168c a120 AR9582 802.11a/n WLAN Mini-PCIe Adapter 0034 AR9462 Wireless Network Adapter + 1028 020b Wireless 1601 802.11abgn Adapter 1028 0300 Wireless 1802 802.11abgn Adapter 1a56 2003 Killer Wireless-N 1202 Half-size Mini PCIe Card 0036 QCA9565 / AR9565 Wireless Network Adapter @@ -20220,7 +20276,12 @@ 1af4 1100 QEMU Virtual Machine 0006 PCI Rocker Ethernet switch device 0007 PCI SD Card Host Controller Interface + 0008 QEMU PCIe Host bridge + 0009 QEMU PCI Expander bridge 000a PCI-PCI bridge (multiseat) + 000b QEMU PCIe Expander bridge + 000c QEMU PCIe Root port + 000d QEMU XHCI Host Controller 0100 QXL paravirtual graphic card 1af4 1100 QEMU Virtual Machine 1b37 Signal Processing Devices Sweden AB @@ -20446,6 +20507,8 @@ 0006 ExaNIC X10-HPT 1cf7 Subspace Dynamics 1d00 Pure Storage +1d18 RME + 0001 Fireface UFX+ 1d1d CNEX Labs 1f1f QEMU NVM Express LightNVM Controller 2807 8800 series NVMe SSD @@ -20460,6 +20523,7 @@ 1d44 DPT a400 PM2x24/PM3224 1d49 Lenovo +1d4c Diamanti, Inc. 1d5c Fantasia Trading LLC 1d61 Technobox, Inc. 1d62 Nebbiolo Technologies @@ -21148,10 +21212,13 @@ 0001 I-30xx Scanner Interface 5555 Genroco, Inc 0003 TURBOstor HFP-832 [HiPPI NIC] + 3b00 Epiphan DVI2PCIe video capture card 5646 Vector Fabrics BV 5654 VoiceTronix Pty Ltd 5678 Dawicontrol Computersysteme GmbH 5700 Netpower +# alternately Extreme Engineering Solutions, Inc. +5845 X-ES, Inc. 584d AuzenTech Co., Ltd. 5851 Exacq Technologies 8008 tDVR8008 8-port video capture card @@ -21261,7 +21328,7 @@ 8086 1315 Centrino Wireless-N 1000 BGN 8086 1316 Centrino Wireless-N 1000 BG 0085 Centrino Advanced-N 6205 [Taylor Peak] - 8086 1311 Centrino Advanced-N 6205 AGN + 8086 1311 Centrino Advanced-N 6205 (802.11a/b/g/n) 8086 1316 Centrino Advanced-N 6205 ABG 0087 Centrino Advanced-N + WiMAX 6250 [Kilmer Peak] 8086 1301 Centrino Advanced-N + WiMAX 6250 2x2 AGN @@ -21307,6 +21374,7 @@ 1028 04da Vostro 3750 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 144d c652 NP300E5C series laptop + 17aa 21cf ThinkPad T520 0105 Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 0106 2nd Generation Core Processor Family Integrated Graphics Controller @@ -21324,6 +21392,7 @@ 0122 2nd Generation Core Processor Family Integrated Graphics Controller 0126 2nd Generation Core Processor Family Integrated Graphics Controller 1028 04cc Vostro 3350 + 17aa 21cf ThinkPad T520 0150 Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller 1043 84ca P8 series motherboard 15d9 0624 X9SCM-F Motherboard @@ -22821,8 +22890,9 @@ 4c53 1090 Cx9/Vx9 mainboard 1462 82870P2 P64H2 Hot Plug Controller 1501 82567V-3 Gigabit Network Connection - 1502 82579LM Gigabit Network Connection + 1502 82579LM Gigabit Network Connection (Lewisville) 1028 04a3 Precision M4600 + 17aa 21ce ThinkPad T520 8086 357a Server Board S1200BTS 1503 82579V Gigabit Network Connection 1043 849c P8P67 Deluxe Motherboard @@ -22961,6 +23031,8 @@ 1059 0111 T4007 1GbE interface 1059 0120 T4008 1GbE interface 1059 0130 T4009 1GbE interface + 1059 0140 T2035 1GbE interface + 1059 0150 RD-01068 1GbE interface 1538 I210 Gigabit Network Connection 1539 I211 Gigabit Network Connection 153a Ethernet Connection I217-LM @@ -23021,8 +23093,8 @@ 1028 1f99 Ethernet 10G 4P X710/I350 rNDC 1028 1f9c Ethernet 10G 4P X710 SFP+ rNDC 103c 0000 Ethernet 10Gb 562SFP+ Adapter - 103c 22fc HP Ethernet 10Gb 2-port 562FLR-SFP+ Adapter - 103c 22fd HP Ethernet 10Gb 2-port 562SFP+ Adapter + 103c 22fc Ethernet 10Gb 2-port 562FLR-SFP+ Adapter + 103c 22fd Ethernet 10Gb 2-port 562SFP+ Adapter 1137 0000 Ethernet Converged NIC X710-DA 1137 013b Ethernet Converged NIC X710-DA4 1137 020a Ethernet Converged NIC X710-DA2 @@ -23044,9 +23116,11 @@ 8086 000a Ethernet Controller X710 for 10GbE SFP+ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ + 8086 000e Ethernet Server Adapter OCP X710-2 8086 0010 Ethernet Converged Network Adapter X710 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ + 8086 4007 Ethernet Controller X710 for 10GbE SFP+ 1575 DSL6340 Thunderbolt 3 NHI [Alpine Ridge 2C 2015] 1576 DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015] 1577 DSL6540 Thunderbolt 3 NHI [Alpine Ridge 4C 2015] @@ -23060,6 +23134,7 @@ 1028 0000 Ethernet 10G X710-k bNDC 1028 1f98 Ethernet 10G 4P X710-k bNDC 1028 1f9e Ethernet 10G 2P X710-k bNDC + 1059 0150 RD-01068 10GbE-KR interface 1590 0000 Ethernet 2-port 563i Adapter 1590 00f8 Ethernet 2-port 563i Adapter 8086 0000 Ethernet Converged Network Adapter XL710-Q2 @@ -23087,8 +23162,8 @@ 108e 0000 Ethernet Controller X710 for 10GBASE-T 108e 4857 Ethernet Controller X710 for 10GBASE-T 1587 Ethernet Controller XL710 for 20GbE backplane - 103c 0000 HPE Ethernet 10/20Gb 2-port 660FLB Adapter - 103c 22fe HPE Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 0000 Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 22fe Ethernet 10/20Gb 2-port 660FLB Adapter 1588 Ethernet Controller XL710 for 20GbE backplane 103c 0000 Ethernet 10/20Gb 2-port 660M Adapter 103c 22ff Ethernet 10/20Gb 2-port 660M Adapter @@ -23099,6 +23174,7 @@ 8086 0001 Ethernet Converged Network Adapter X710-T4 8086 0002 Ethernet Converged Network Adapter X710-T4 8086 0003 Ethernet Converged Network Adapter X710-T + 8086 00a0 Ethernet Converged Network Adapter X710-T4 8086 1003 Ethernet Converged Network Adapter X710-T 158a Ethernet Controller XXV710 for 25GbE backplane 158b Ethernet Controller XXV710 for 25GbE SFP28 @@ -23111,6 +23187,7 @@ 8086 0006 Ethernet Network Adapter OCP XXV710-2 8086 0007 Ethernet Network Adapter OCP XXV710-1 8086 0008 Ethernet Network Adapter OCP XXV710-1 + 8086 4001 Ethernet Network Adapter XXV710-2 15a0 Ethernet Connection (2) I218-LM 15a1 Ethernet Connection (2) I218-V 15a2 Ethernet Connection (3) I218-LM @@ -23121,6 +23198,7 @@ 15a9 X552 Virtual Function 15aa Ethernet Connection X552 10 GbE Backplane 1059 0120 T4008 10GbE interface + 1059 0150 RD-01068 10GbE interface 15ab Ethernet Connection X552 10 GbE Backplane 15ac Ethernet Connection X552 10 GbE SFP+ 15ad Ethernet Connection X552/X557-AT 10GBASE-T @@ -23192,6 +23270,7 @@ 163b Broadwell-U Integrated Graphics 163d Broadwell-U Integrated Graphics 163e Broadwell-U Integrated Graphics + 1889 Ethernet Adaptive Virtual Function 1900 Skylake Host Bridge/DRAM Registers 1901 Skylake PCIe Controller (x16) 1902 HD Graphics 510 @@ -23294,37 +23373,43 @@ 1b48 82597EX 10GbE Ethernet Controller 8086 a01f PRO/10GbE LR Server Adapter 8086 a11f PRO/10GbE LR Server Adapter - 1c00 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c01 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c02 6 Series/C200 Series Chipset Family SATA AHCI Controller + 1c00 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 0-3) + 1c01 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 0-3) + 1c02 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller 1028 04aa XPS 8300 1043 844d P8 series motherboard 8086 7270 Server Board S1200BTS - 1c03 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller + 1c03 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller 1028 04a3 Precision M4600 1028 04b2 Vostro 3350 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] - 1c04 6 Series/C200 Series Chipset Family SATA RAID Controller + 1c04 6 Series/C200 Series Desktop SATA RAID Controller 103c 3118 Smart Array B110i SATA RAID Controller - 1c05 6 Series/C200 Series Chipset Family SATA RAID Controller - 1c08 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller - 1c09 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller + 1c05 6 Series/C200 Series Mobile SATA RAID Controller + 1c06 Z68 Express Chipset SATA RAID Controller + 1c08 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 4-5) + 1c09 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 4-5) 1c10 6 Series/C200 Series Chipset Family PCI Express Root Port 1 1028 04aa XPS 8300 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c12 6 Series/C200 Series Chipset Family PCI Express Root Port 2 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c14 6 Series/C200 Series Chipset Family PCI Express Root Port 3 1028 04da Vostro 3750 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c16 6 Series/C200 Series Chipset Family PCI Express Root Port 4 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 1c18 6 Series/C200 Series Chipset Family PCI Express Root Port 5 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS 1c1a 6 Series/C200 Series Chipset Family PCI Express Root Port 6 1028 04da Vostro 3750 @@ -23340,6 +23425,7 @@ 1028 04da Vostro 3750 1043 8418 P8P67 Deluxe Motherboard 1043 841b P8H67 Series Motherboard + 17aa 21cf ThinkPad T520 # Realtek ALC888 audio codec 8086 2008 DQ67SW board 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23349,6 +23435,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c24 6 Series/C200 Series Chipset Family Thermal Management Controller 1c25 6 Series/C200 Series Chipset Family DMI to PCI Bridge @@ -23358,6 +23445,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c27 6 Series/C200 Series Chipset Family USB Universal Host Controller #1 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23369,6 +23457,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c33 6 Series/C200 Series Chipset Family LAN Controller 1c35 6 Series/C200 Series Chipset Family VECI Controller @@ -23378,6 +23467,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c3b 6 Series/C200 Series Chipset Family MEI Controller #2 1c3c 6 Series/C200 Series Chipset Family IDE-r Controller @@ -23405,6 +23495,7 @@ 1c4e Q67 Express Chipset Family LPC Controller 1c4f QM67 Express Chipset Family LPC Controller 1028 04a3 Precision M4600 + 17aa 21cf ThinkPad T520 1c50 B65 Express Chipset Family LPC Controller 1c51 6 Series/C200 Series Chipset Family LPC Controller 1c52 C202 Chipset Family LPC Controller @@ -23532,12 +23623,12 @@ 1e1e 7 Series/C210 Series Chipset Family PCI Express Root Port 8 1849 1e1e Motherboard 1e20 7 Series/C216 Chipset Family High Definition Audio Controller - 1028 054b Dell XPS One 2710 + 1028 054b XPS One 2710 1043 108d VivoBook X202EV 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A 1043 8415 P8H77-I Motherboard - 1043 8445 ASUS P8Z77-V LX Motherboard + 1043 8445 P8Z77-V LX Motherboard 144d c652 NP300E5C series laptop 1849 1898 Z77 Extreme4 motherboard 1e22 7 Series/C216 Chipset Family SMBus Controller @@ -23685,10 +23776,10 @@ 201c Sky Lake-E Non-Transparent Bridge Registers 2021 Sky Lake-E CBDMA Registers 2024 Sky Lake-E MM/Vt-d Configuration Registers - 2030 Sky Lake-E PCI Express Root Port 1A - 2031 Sky Lake-E PCI Express Root Port 1B - 2032 Sky Lake-E PCI Express Root Port 1C - 2033 Sky Lake-E PCI Express Root Port 1D + 2030 Sky Lake-E PCI Express Root Port A + 2031 Sky Lake-E PCI Express Root Port B + 2032 Sky Lake-E PCI Express Root Port C + 2033 Sky Lake-E PCI Express Root Port D 2035 Sky Lake-E RAS Configuration Registers 204c Sky Lake-E M3KTI Registers 204d Sky Lake-E M3KTI Registers @@ -24533,7 +24624,7 @@ 258a E7221 Integrated Graphics Controller 2590 Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller 1014 0575 ThinkPad X41 / Z60t - 1028 0182 Dell Latitude C610 + 1028 0182 Latitude C610 103c 0934 Compaq nw8240/nx8220 103c 099c NX6110/NC6120 104d 81b7 Vaio VGN-S3XP @@ -24822,7 +24913,7 @@ 1014 05b7 ThinkPad Z60t # based on the PTGD1-LA motherboard 103c 2a09 PufferM-UL8E - 1043 1173 Asus A6VC + 1043 1173 A6VC 1043 814e P5GD1-VW Mainboard 1462 7028 915P/G Neo2 1af4 1100 QEMU Virtual Machine @@ -24848,7 +24939,7 @@ 1028 0177 Dimension 8400 1028 0179 Optiplex GX280 1028 0182 Latitude D610 Laptop - 1028 0187 Dell Precision M70 Laptop + 1028 0187 Precision M70 Laptop 1028 0188 Inspiron 6000 laptop 103c 0934 Compaq nw8240/nx8220 103c 0944 Compaq NC6220 @@ -25222,7 +25313,7 @@ 103c 30a3 Compaq nw8440 103c 30d5 530 Laptop 1043 1123 A6J-Q008 - 1043 13c4 Asus G2P + 1043 13c4 G2P 1043 817f P5LD2-VM Mainboard (Realtek ALC 882 codec) 1043 8290 P5KPL-VM Motherboard 1043 82ea P5KPL-CM Motherboard @@ -25240,7 +25331,7 @@ 152d 0753 Softmodem 1734 10ad Conexant softmodem SmartCP 17aa 2010 ThinkPad R60/T60/X60 series - 17aa 3802 Lenovo 3000 C200 audio [Realtek ALC861VD] + 17aa 3802 3000 C200 audio [Realtek ALC861VD] 8086 1112 DeskTop Board D945GTP 8086 27d8 DeskTop Board D945GTP 8086 d618 DeskTop Board D510MO @@ -25311,6 +25402,7 @@ 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E + 17aa 20a5 ThinkPad R61 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2820 82801H (ICH8 Family) 4 port SATA Controller [IDE mode] 1028 01da OptiPlex 745 @@ -25337,6 +25429,7 @@ 2828 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [IDE mode] 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b + 17aa 20a8 ThinkPad R61 e4bf cc47 CCG-RUMBA 2829 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] 1025 0121 Aspire 5920G @@ -25353,7 +25446,7 @@ 1028 040b Latitude E6510 e4bf 50c1 PC1-GROOVE 2830 82801H (ICH8 Family) USB UHCI Controller #1 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25413,7 +25506,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2835 82801H (ICH8 Family) USB UHCI Controller #5 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25441,7 +25534,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 283a 82801H (ICH8 Family) USB2 EHCI Controller #2 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25496,14 +25589,14 @@ 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theather) 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 - 1028 01f9 Dell Latitude D630 - 1028 01ff Dell Precision M4300 + 1028 01f9 Latitude D630 + 1028 01ff Precision M4300 1028 0256 Studio 1735 103c 2802 Compaq dc7700p 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 - 1043 1339 Asus M51S series + 1043 1339 M51S series 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E 104d 9008 Vaio VGN-SZ79SN_C @@ -25843,7 +25936,7 @@ 29f7 3200/3210 Chipset Serial KT Controller 29f9 3210 Chipset Host-Secondary PCI Express Bridge 2a00 Mobile PM965/GM965/GL960 Memory Controller Hub - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p @@ -25862,16 +25955,16 @@ 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a03 Mobile GM965/GL960 Integrated Graphics Controller (secondary) 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a04 Mobile PM965/GM965 MEI Controller 103c 30c1 Compaq 6910p @@ -26074,7 +26167,7 @@ 2e16 4 Series Chipset PT IDER Controller 2e17 4 Series Chipset Serial KT Controller 2e20 4 Series Chipset DRAM Controller - 1028 0283 Dell Vostro 220 + 1028 0283 Vostro 220 1043 82d3 P5Q Deluxe Motherboard 1458 5000 GA-EP45-DS5/GA-EG45M-DS2H Motherboard 2e21 4 Series Chipset PCI Express Root Port @@ -26585,16 +26678,20 @@ 37d1 Ethernet Connection X722 for 1GbE 1590 0216 Ethernet 1Gb 2-port 368i Adapter 1590 0217 Ethernet 1Gb 2-port 368FLR-MMT Adapter + 1590 0247 Ethernet 1Gb 4-port 369i Adapter 17aa 4020 Intel Ethernet Connection X722 for 1GbE 17aa 4021 Intel Ethernet Connection X722 for 1GbE 17aa 4022 Intel Ethernet Connection X722 for 1GbE 37d2 Ethernet Connection X722 for 10GBASE-T + 14cd 0030 Ethernet OCP 2x10G RJ45 Phy Card [USI-X557-10GbaseT] 1590 0218 Ethernet 10Gb 2-port 568FLR-MMT Adapter - 17aa 4020 Intel Ethernet Connection X722 for 10GBASE - 17aa 4021 Intel Ethernet Connection X722 for 10GBASE + 17aa 4020 Ethernet Connection X722 for 10GBASE-T + 17aa 4021 Ethernet Connection X722 for 10GBASE-T 17aa 4022 Ethernet Connection X722 for 10GBASE-T 37d3 Ethernet Connection X722 for 10GbE SFP+ 1590 0219 Ethernet 10Gb 2-port 568FLR-MMSFP+ Adapter + 17aa 4020 Ethernet Connection X722 for 10GbE SFP+ + 17aa 4021 Ethernet Connection X722 for 10GbE SFP+ 37d4 Ethernet Connection X722 for 10GbE QSFP+ 37d9 X722 Hyper-V Virtual Function 3a00 82801JD/DO (ICH10 Family) 4-port SATA IDE Controller @@ -26865,7 +26962,7 @@ 1028 02da OptiPlex 980 1028 040a Latitude E6410 1028 040b Latitude E6510 - 1043 1373 ASUSTek G73-series gaming laptop + 1043 1373 G73-series gaming laptop 144d c06a R730 Laptop 15d9 060d C7SIM-Q Motherboard 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] @@ -27013,7 +27110,7 @@ 4224 PRO/Wireless 2915ABG [Calexico2] Network Connection 4227 PRO/Wireless 3945ABG [Golan] Network Connection 8086 1010 ThinkPad R60e - 8086 1011 ThinkPad T60/R60e/X60s + 8086 1011 ThinkPad T60/R60e/X60s/R61 8086 1014 PRO/Wireless 3945BG Network Connection 4229 PRO/Wireless 4965 AG or AGN [Kedron] Network Connection 8086 1100 Vaio VGN-SZ79SN_C @@ -27132,6 +27229,8 @@ 5845 QEMU NVM Express Controller 1af4 1100 QEMU Virtual Machine 5902 HD Graphics 610 + 590f Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers + 5910 Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers 5912 HD Graphics 630 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit @@ -28223,7 +28322,7 @@ 9004 7888 AHA-2930UW SCSI Controller 8b78 ABA-1030 ec78 AHA-4944W/UW -# acquired by PMC-Sierra +# acquired by Microsemi 9005 Adaptec 0010 AHA-2940U2/U2W 9005 2180 AHA-2940U2 SCSI Controller @@ -28835,9 +28934,11 @@ f1d0 AJA Video cafe Kona SD cfee Xena LS/SD-22-DA/SD-DA daff KONA LHi + db01 Corvid22 db09 Corvid 24 dcaf Kona HD dfee Xena HD-DA + eb0e Corvid 44 efac Xena SD-MM/SD-22-MM facd Xena HD-MM f5f5 F5 Networks, Inc. From owner-svn-src-stable-11@freebsd.org Sat May 27 22:57:11 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EE15D8596C; Sat, 27 May 2017 22:57:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56DD21E86; Sat, 27 May 2017 22:57:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RMvA4S053224; Sat, 27 May 2017 22:57:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RMvA3T053223; Sat, 27 May 2017 22:57:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272257.v4RMvA3T053223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 22:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319004 - stable/11/lib/libgeom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 22:57:11 -0000 Author: ngie Date: Sat May 27 22:57:10 2017 New Revision: 319004 URL: https://svnweb.freebsd.org/changeset/base/319004 Log: MFC r317288,r317289: r317288: libgeom(3): apply minor polish - Use .Dv when mentioning NULL per mdoc(7). - Reword `g_device_path`, `g_open_by_ident`, and `g_providername`'s descriptions so they're less wordy. - Fix a typo in `g_device_path` (can not -> cannot). Tested with: igor, make manlint r317289: libgeom(3): note that stdio.h is required when referencing gctl_dump(3) gctl_dump(3) is only exposed when stdio.h is #include'd first, per its addition in r112510. The reasoning noted for the conditional "exposure" of the function was to "limit #include pollution". This addresses an issue I found with the documentation when looking at bug 218809, which in turn addresses a -Wimplicit-function-declaration compiler warning in `tools/regression/geom_gpt/test.c` (it uses gctl_dump(3)). Modified: stable/11/lib/libgeom/libgeom.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libgeom/libgeom.3 ============================================================================== --- stable/11/lib/libgeom/libgeom.3 Sat May 27 22:57:07 2017 (r319003) +++ stable/11/lib/libgeom/libgeom.3 Sat May 27 22:57:10 2017 (r319004) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2010 +.Dd April 22, 2017 .Dt LIBGEOM 3 .Os .Sh NAME @@ -63,6 +63,10 @@ .Sh LIBRARY .Lb libgeom .Sh SYNOPSIS +.Bd -literal +/* stdio.h is only required for `gctl_dump` */ +.Ed +.In stdio.h .In libgeom.h .Ss "Statistics Functions" .Ft void @@ -324,8 +328,8 @@ The .Fn g_device_path function returns the full path to a provider given a partial or full path to the device node. -If the device can not be found or is not a valid geom provider, NULL is -returned. +.Dv NULL +is returned if the device cannot be found or is not a valid geom provider. .Pp The .Fn g_get_ident @@ -344,20 +348,19 @@ string. .Pp The .Fn g_open_by_ident -function opens provider using its ident, unlike +function opens provider using its identification, unlike .Fn g_open -which uses provider's name. -If the +which uses the provider's name. +The function will store the provider's name in the .Fa name -argument is not -.Dv NULL , -the function will store provider's name there. +parameter if it is not +.Dv NULL . .Pp The .Fn g_providername function returns the provider name of an open file descriptor. -If the file descriptor does not point to a valid geom provider, NULL is -returned. +.Dv NULL +is returned the file descriptor does not point to a valid geom provider. .Pp All functions except .Fn g_providername From owner-svn-src-stable-11@freebsd.org Sat May 27 22:59:25 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26AEDD85A5F; Sat, 27 May 2017 22:59:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 020851122; Sat, 27 May 2017 22:59:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RMxO6k053391; Sat, 27 May 2017 22:59:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RMxNS3053389; Sat, 27 May 2017 22:59:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272259.v4RMxNS3053389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 22:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319005 - in stable/11: contrib/netbsd-tests/fs/tmpfs tests/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 22:59:25 -0000 Author: ngie Date: Sat May 27 22:59:23 2017 New Revision: 319005 URL: https://svnweb.freebsd.org/changeset/base/319005 Log: MFC r318546: sys/fs/tmpfs/vnd_test: make md(4) allocation dynamic The previous logic was flawed in the sense that it assumed that /dev/md3 was always available. This was a caveat I noted in r306038, that I hadn't gotten around to solving before now. Cache the device for the mountpoint after executing mdmfs, then use the cached value in basic_cleanup(..) when unmounting/disconnecting the md(4) device. Apply sed expressions to use reuse logic in the NetBSD code that could also be applied to FreeBSD, just with different tools. Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh stable/11/tests/sys/fs/tmpfs/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh ============================================================================== --- stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat May 27 22:57:10 2017 (r319004) +++ stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat May 27 22:59:23 2017 (r319005) @@ -28,6 +28,10 @@ # Verifies that vnd works with files stored in tmpfs. # +# Begin FreeBSD +MD_DEVICE_FILE=md.device +# End FreeBSD + atf_test_case basic cleanup basic_head() { atf_set "descr" "Verifies that vnd works with files stored in tmpfs" @@ -41,7 +45,10 @@ basic_body() { # Begin FreeBSD if true; then atf_check -s eq:0 -o empty -e empty mkdir mnt - atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md3 mnt + atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md mnt + md_dev=$(df mnt | awk 'NR != 1 { print $1 }' | xargs basename) + atf_check test -c /dev/$md_dev # Sanity check + echo -n $md_dev > $TMPDIR/$MD_DEVICE_FILE else # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig /dev/vnd3 disk.img @@ -67,31 +74,23 @@ basic_body() { done atf_check -s eq:0 -o empty -e empty umount mnt - # Begin FreeBSD - if true; then - atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 - else - # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig -u /dev/vnd3 - # Begin FreeBSD - fi - # End FreeBSD test_unmount touch done } basic_cleanup() { + # Begin FreeBSD + if md_dev=$(cat $TMPDIR/$MD_DEVICE_FILE); then + echo "Will try disconnecting $md_dev" + else + echo "$MD_DEVICE_FILE doesn't exist in $TMPDIR; returning early" + return 0 + fi + # End FreeBSD if [ ! -f done ]; then umount mnt 2>/dev/null 1>&2 - # Begin FreeBSD - if true; then - [ ! -c /dev/md3 ] || mdconfig -d -u 3 - else - # End FreeBSD vndconfig -u /dev/vnd3 2>/dev/null 1>&2 - # Begin FreeBSD - fi - # End FreeBSD fi } Modified: stable/11/tests/sys/fs/tmpfs/Makefile ============================================================================== --- stable/11/tests/sys/fs/tmpfs/Makefile Sat May 27 22:57:10 2017 (r319004) +++ stable/11/tests/sys/fs/tmpfs/Makefile Sat May 27 22:59:23 2017 (r319005) @@ -54,6 +54,9 @@ ATF_TESTS_SH_SED_mount_test= \ ATF_TESTS_SH_SED_readdir_test= -e 's,mknod fifo p,mkfifo fifo,g' ATF_TESTS_SH_SED_sizes_test= -e 's,-o -s,-o size=,g' ATF_TESTS_SH_SED_statvfs_test= -e 's,-o -s,-o size=,g' +ATF_TESTS_SH_SED_vnd_test= \ + -e 's,vndconfig -u /dev/vnd3,mdconfig -d -u $$md_dev,g' \ + -e 's,/dev/vnd3,/dev/$$md_dev,g' ATF_TESTS_SH_SED_vnode_leak_test= -e 's,-o -s,-o size=,g' .include From owner-svn-src-stable-11@freebsd.org Sat May 27 23:04:42 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AC66D85C3F; Sat, 27 May 2017 23:04:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1095715B7; Sat, 27 May 2017 23:04:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RN4f6D057258; Sat, 27 May 2017 23:04:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RN4eCw057256; Sat, 27 May 2017 23:04:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272304.v4RN4eCw057256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319006 - in stable/11: etc/mtree lib/libkvm lib/libkvm/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:04:42 -0000 Author: ngie Date: Sat May 27 23:04:40 2017 New Revision: 319006 URL: https://svnweb.freebsd.org/changeset/base/319006 Log: MFC r316099: lib/libkvm: start adding basic tests for kvm(3) - kvm_close: add a testcase to verify support for errno = EINVAL / -1 (see D10065) when kd == NULL is provided to the libcall. - kvm_geterr: -- Add a negative testcase for kd == NULL returning "" (see D10022). -- Add two positive testcases: --- test the error case using kvm_write on a O_RDONLY descriptor. --- test the "no error" case using kvm_read(3) and kvm_nlist(3) as helper routines and by injecting a bogus error message via _kvm_err (an internal API) _kvm_err was used as there isn't a formalized way to clear the error output, and because kvm_nlist always returns ENOENT with the NULL terminator today. - kvm_open, kvm_open2: -- Add some basic negative tests for kvm_open(3) and kvm_open2(3). Testing positive cases with a specific `corefile`/`execfile`/`resolver` requires more work and would require user intervention today in order to reliably test this out. Added: stable/11/lib/libkvm/tests/ - copied from r316099, head/lib/libkvm/tests/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/lib/libkvm/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Sat May 27 22:59:23 2017 (r319005) +++ stable/11/etc/mtree/BSD.tests.dist Sat May 27 23:04:40 2017 (r319006) @@ -316,6 +316,8 @@ .. libdevdctl .. + libkvm + .. libmp .. libnv Modified: stable/11/lib/libkvm/Makefile ============================================================================== --- stable/11/lib/libkvm/Makefile Sat May 27 22:59:23 2017 (r319005) +++ stable/11/lib/libkvm/Makefile Sat May 27 23:04:40 2017 (r319006) @@ -36,4 +36,10 @@ MLINKS+=kvm_nlist.3 kvm_nlist2.3 MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_open2.3 kvm_open.3 kvm_openfiles.3 MLINKS+=kvm_read.3 kvm_read2.3 kvm_read.3 kvm_write.3 +.include + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include From owner-svn-src-stable-11@freebsd.org Sat May 27 23:20:30 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AAD2D85F32; Sat, 27 May 2017 23:20:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE9BB1CF3; Sat, 27 May 2017 23:20:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNKSZN061522; Sat, 27 May 2017 23:20:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNKSIM061521; Sat, 27 May 2017 23:20:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272320.v4RNKSIM061521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319009 - stable/11/lib/libkvm/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:20:30 -0000 Author: ngie Date: Sat May 27 23:20:28 2017 New Revision: 319009 URL: https://svnweb.freebsd.org/changeset/base/319009 Log: MFC r319008: kvm_geterr_test: Compile out the portions that require kvm_open2(3) on systems that lack the libcall, based on __FreeBSD_version. kvm_open2(3) wasn't made available until r291406, which is in ^/stable/11, but not ^/stable/10. This makes some of kvm_geterr_test available for testing on ^/stable/10. Modified: stable/11/lib/libkvm/tests/kvm_geterr_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libkvm/tests/kvm_geterr_test.c ============================================================================== --- stable/11/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:19:32 2017 (r319008) +++ stable/11/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:20:28 2017 (r319009) @@ -65,6 +65,8 @@ ATF_TC_HEAD(kvm_geterr_positive_test_err atf_tc_set_md_var(tc, "require.user", "root"); } +/* 1100090 was where kvm_open2(3) was introduced. */ +#if __FreeBSD_version >= 1100091 ATF_TC_BODY(kvm_geterr_positive_test_error, tc) { kvm_t *kd; @@ -125,13 +127,16 @@ ATF_TC_BODY(kvm_geterr_positive_test_no_ ATF_REQUIRE_MSG(kvm_close(kd) == 0, "kvm_close failed: %s", strerror(errno)); } +#endif ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, kvm_geterr_negative_test_NULL); +#if __FreeBSD_version >= 1100091 ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_error); ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_no_error); +#endif return (atf_no_error()); } From owner-svn-src-stable-11@freebsd.org Sat May 27 23:24:34 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAE65D841C6; Sat, 27 May 2017 23:24:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89FF91290; Sat, 27 May 2017 23:24:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNOX52065675; Sat, 27 May 2017 23:24:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNOXps065674; Sat, 27 May 2017 23:24:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272324.v4RNOXps065674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319011 - stable/11/lib/libkvm/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:24:34 -0000 Author: ngie Date: Sat May 27 23:24:33 2017 New Revision: 319011 URL: https://svnweb.freebsd.org/changeset/base/319011 Log: MFC r319010: Fix #if conditional added in r319008 I committed an earlier version of the file by accident This is a no-op on ^/head and ^/stable/11. Modified: stable/11/lib/libkvm/tests/kvm_geterr_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libkvm/tests/kvm_geterr_test.c ============================================================================== --- stable/11/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:23:22 2017 (r319010) +++ stable/11/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:24:33 2017 (r319011) @@ -56,6 +56,8 @@ ATF_TC_BODY(kvm_geterr_negative_test_NUL ATF_REQUIRE(!errbuf_has_error(kvm_geterr(NULL))); } +/* 1100090 was where kvm_open2(3) was introduced. */ +#if __FreeBSD_version >= 1100091 ATF_TC(kvm_geterr_positive_test_error); ATF_TC_HEAD(kvm_geterr_positive_test_error, tc) { @@ -65,8 +67,6 @@ ATF_TC_HEAD(kvm_geterr_positive_test_err atf_tc_set_md_var(tc, "require.user", "root"); } -/* 1100090 was where kvm_open2(3) was introduced. */ -#if __FreeBSD_version >= 1100091 ATF_TC_BODY(kvm_geterr_positive_test_error, tc) { kvm_t *kd; From owner-svn-src-stable-11@freebsd.org Sat May 27 23:31:53 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A319D8462D; Sat, 27 May 2017 23:31:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15620194F; Sat, 27 May 2017 23:31:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNVqaR067962; Sat, 27 May 2017 23:31:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNVpZZ067959; Sat, 27 May 2017 23:31:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272331.v4RNVpZZ067959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319013 - stable/11/tools/regression/geom_gpt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:31:53 -0000 Author: ngie Date: Sat May 27 23:31:51 2017 New Revision: 319013 URL: https://svnweb.freebsd.org/changeset/base/319013 Log: MFC r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309: r317290: Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h #include below the stdio.h #include. gctl_dump(3) needs stdio.h, per reasoning noted in r317289. PR: 218809 r317291: Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c This is being done to reduce ambiguity and to make the tests more portable in the future to other locations in the source tree. r317292: gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly r317293: gctl_test_helper: apply polish - Staticize variables to fix warnings. - Sprinkle asserts around for calls that can fail - Apply style(9) for main(..) definition. - ANSIify usage(..) definition. r317294: Bump WARNS to 6 per previous commits which fixed warnings Tested with: clang (4.0), gcc (4.2.1, 6.3.0) r317295: The GPT class no longer exists; use the PART class instead r317304: gctl_test_helper: add diagnostic output for parse_retval(..) This will help end-users better diagnose issues with the function. r317306: gctl_test.t: minor tweaks - Declare $count with the `my` scope operator to permit `use strict`. - Add `use strict`. - Use `use warnings` instead of using `-w` in the shebang. - Don't unlink $cmd when done (prevents unnecessary rebuilding). - Improve the error message when running with insufficient permissions, e.g., non-root. r317307: Use verb=delete not verb=remove The `remove` verb hasn't been present in geom_part*(4) for well over a decade, if ever. I couldn't find any references to it in ^/stable/5 at least, which is around the timeframe that this test was written. r317308: gctl_test.t: more tweaks to try and update the code and get it functional (again?) - Make the logfile for $out be built off the basename for $cmd, instead of $cmd. (r317292 broke this assumption). - Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for mountpoints. - Reindent the umount directive block while here to match the rest of the code. r317309: gctl_test.t: improve error reporting with mdcfg and mount directives If the commands had failed previously, it would press on and result in a series of cascading failures. Fail early and continue on to the next case instead of executing additional commands after a previously failed series of steps. Added: stable/11/tools/regression/geom_gpt/Makefile - copied, changed from r317292, head/tools/regression/geom_gpt/Makefile stable/11/tools/regression/geom_gpt/gctl_test.t - copied, changed from r317291, head/tools/regression/geom_gpt/gctl_test.t stable/11/tools/regression/geom_gpt/gctl_test_helper.c - copied, changed from r317291, head/tools/regression/geom_gpt/gctl_test_helper.c Deleted: stable/11/tools/regression/geom_gpt/gctl.t stable/11/tools/regression/geom_gpt/test.c Modified: Directory Properties: stable/11/ (props changed) Copied and modified: stable/11/tools/regression/geom_gpt/Makefile (from r317292, head/tools/regression/geom_gpt/Makefile) ============================================================================== --- head/tools/regression/geom_gpt/Makefile Sat Apr 22 20:15:47 2017 (r317292, copy source) +++ stable/11/tools/regression/geom_gpt/Makefile Sat May 27 23:31:51 2017 (r319013) @@ -5,4 +5,6 @@ MAN= LIBADD+= geom +WARNS?= 6 + .include Copied and modified: stable/11/tools/regression/geom_gpt/gctl_test.t (from r317291, head/tools/regression/geom_gpt/gctl_test.t) ============================================================================== --- head/tools/regression/geom_gpt/gctl_test.t Sat Apr 22 20:06:11 2017 (r317291, copy source) +++ stable/11/tools/regression/geom_gpt/gctl_test.t Sat May 27 23:31:51 2017 (r319013) @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w +#!/usr/bin/env perl # # Copyright (c) 2005, 2006 Marcel Moolenaar # All rights reserved. @@ -26,13 +26,13 @@ # # $FreeBSD$ -my $srcdir = `dirname $0`; -chomp $srcdir; +use strict; +use warnings; + +use File::Basename; -my $cmd = "/tmp/gctl-$$"; -my $out = "$cmd.out"; my $disk = "/tmp/disk-$$"; -my $mntpt = "/tmp/mount-$$"; +my $mntpt_prefix = "/tmp/mount-$$"; my %steps = ( "000" => "gctl", @@ -70,9 +70,9 @@ my %steps = ( "054" => "conf", "060" => "gctl verb=add geom=%dev% type=516e7cb6-6ecf-11d6-8ff8-00022d09712b start=34 end=546 entry:8=1", "061" => "mount %dev%p1", - "062" => "gctl verb=remove geom=%dev% entry=1", + "062" => "gctl verb=delete geom=%dev% entry=1", "063" => "umount %dev%p1", - "064" => "gctl verb=remove geom=%dev% entry=1", + "064" => "gctl verb=delete geom=%dev% entry=1", "065" => "conf", "100" => "mdcfg destroy", "110" => "mdcfg create corrupted", @@ -132,20 +132,23 @@ if (exists $ENV{'TEST_VERBOSE'}) { } # Compile the driver... -my $st = system("cc -o $cmd -g $srcdir/gctl_test_helper.c -lgeom"); +my $st = system("make obj && make all"); if ($st != 0) { print "1..0 # SKIP error compiling test.c\n"; exit 0; } +chomp(my $cmd = `make '-V\${.OBJDIR}/\${PROG}'`); + +my $out = basename($cmd) . ".out"; # Make sure we have permission to use gctl... if (`$cmd` =~ "^FAIL Permission denied") { - print "1..0 # SKIP not enough permission\n"; + print "1..0 # SKIP insufficient permissions\n"; unlink $cmd; exit 0; } -$count = keys (%steps); +my $count = keys (%steps); print "1..$count\n"; my $nr = 1; @@ -158,13 +161,15 @@ foreach my $key (sort keys %steps) { $res =~ s/%dev%/$dev/g; if ($action =~ "^gctl") { + my $errmsg = ""; system("$cmd $verbose $args | tee $out 2>&1"); - $st = `tail -1 $out`; - if ($st =~ "^$res") { - print "ok $nr \# gctl($key)\n"; - } else { - print "not ok $nr \# gctl($key) - $st\n"; + chomp($st = `tail -1 $out`); + if ($st ne $res) { + $errmsg = "\"$st\" (actual) != \"$res\" (expected)\n"; } + printf("%sok $nr \# gctl($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); unlink $out; } elsif ($action =~ "^mdcfg") { if ($args =~ "^create") { @@ -191,17 +196,23 @@ foreach my $key (sort keys %steps) { } unlink $out; } elsif ($action =~ "^mount") { - system("mkdir $mntpt-$args"); - system("newfs $args"); - system("mount -t ufs /dev/$args $mntpt-$args"); - print "ok $nr \# mount($key)\n"; + my $errmsg = ""; + mkdir("$mntpt_prefix-$args"); + if (system("newfs /dev/$args") == 0) { + if (system("mount /dev/$args $mntpt_prefix-$args") != 0) { + $errmsg = "mount failed"; + } + } else { + $errmsg = "newfs failed"; + } + printf("%sok $nr # mount($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); } elsif ($action =~ "^umount") { - system("umount $mntpt-$args"); - system("rmdir $mntpt-$args"); - print "ok $nr \# umount($key)\n"; + system("umount $mntpt_prefix-$args"); + system("rmdir $mntpt_prefix-$args"); + print "ok $nr \# umount($key)\n"; } $nr += 1; } - -unlink $cmd; exit 0; Copied and modified: stable/11/tools/regression/geom_gpt/gctl_test_helper.c (from r317291, head/tools/regression/geom_gpt/gctl_test_helper.c) ============================================================================== --- head/tools/regression/geom_gpt/gctl_test_helper.c Sat Apr 22 20:06:11 2017 (r317291, copy source) +++ stable/11/tools/regression/geom_gpt/gctl_test_helper.c Sat May 27 23:31:51 2017 (r319013) @@ -28,6 +28,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -42,11 +44,11 @@ struct retval { char *value; }; -struct retval *retval; -int verbose; +static struct retval *retval; +static int verbose; static void -usage() +usage(void) { fprintf(stdout, "usage: %s [-v] param[:len][=value] ...\n", getprogname()); @@ -105,16 +107,18 @@ parse(char *arg, char **param, char **va return (0); } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { struct retval *rv; struct gctl_req *req; char *param, *value; const char *s; - int c, len; + int c, len, parse_retval; req = gctl_get_handle(); - gctl_ro_param(req, "class", -1, "GPT"); + assert(req != NULL); + gctl_ro_param(req, "class", -1, "PART"); while ((c = getopt(argc, argv, "v")) != -1) { switch (c) { @@ -129,10 +133,12 @@ int main(int argc, char *argv[]) } } - while (optind < argc) { - if (!parse(argv[optind++], ¶m, &value, &len)) { + for (; optind < argc; optind++) { + parse_retval = parse(argv[optind], ¶m, &value, &len); + if (parse_retval == 0) { if (len > 0) { rv = malloc(sizeof(struct retval)); + assert(rv != NULL); rv->param = param; rv->value = value; rv->retval = retval; @@ -140,7 +146,9 @@ int main(int argc, char *argv[]) gctl_rw_param(req, param, len, value); } else gctl_ro_param(req, param, -1, value); - } + } else + warnc(parse_retval, "failed to parse argument (%s)", + argv[optind]); } if (verbose)